v002 Blur distorts / artifacts when fullscreen

Lango's picture

Hi everyone

The problem is when i go full screen with the 'v002 Blur' patch the image goes wonky. Other blurs (that come with QC) do not have this problem.

My specs are

iMac 24inch, 2.93 Ghz Intel Core 2 Duo

4 GB 1067 MHz DDR3

NVIDIA GeForce GT 130 512MB

Using the built-in iSight

In the attached image, is of my app running at full screen. The top patch uses v002 Blur and the bottom uses disc blur.

From this post cybero suggested it may be because the iSight can't handle the 1920x1200 resolution of my screen. But wouldn't this also apply to the other blurs?

I posted this issue on the download page for v002 Blur, then the post disappeared after a day. Not sure what happened there. Maybe there is another way to let Vade know, the QC Maillist maybe? Or maybe he already knows and has addressed it and i just missed it.

Also I'm aware that this isn't about a kineme patch, is it okay I ask this question here? Or should I post somewhere else on the nets?

Cheers

Lango

PreviewAttachmentSize
v2 fullscreen bug.png
v2 fullscreen bug.png859.29 KB
v002 blur bug.qtz3.08 KB

cybero's picture
Re: v002 Blur distorts / artifacts when fullscreen

Thanks for the screen grab. Also thanks for the example bug. I wasn't able to reproduce exactly what you got a screen grab of. Even if I stretched the viewer window to maximum, still just two blurry pictures.No artefaction as shown in your screen grab.

However, when going full screen with this composition I did get real artefaction occurring at the very top of the screen , not along the left hand side as shown in your screen grab.

The differences in results are probably in part due to the fact that your camera is a built in CMOS Active Sensor fixed focus model rather than the CCD based standalone iSight.

What would be useful and generally demonstrative would be to hook up a really good quality video camera and give that a comparative.

iSight's are great little cameras, but they can only do so much.

I do believe Vade would or should be interested in this.

cybero's picture
Re: v002 Blur distorts / artifacts when fullscreen

Had another close look at your example bug.

Have you ever hovered your mouse over the blur patch image output when connected up to a renderer output patch like a billboard?

v002 blur 0n my iSight is 0,0 bounds and 640480 resolution. box blur is - 18, -18 bounds [outside of screen] 686526 resolution. gaussian blur is -3,-3 bounds and 640480 resolution. disc blur is -9, -9 bounds and 676499 resolution.

Cut a long and detailed story short. v002 blur is faster than others, probably will result in difficulties with a top or side video rendering artefact, only workaround is crop to good image area and loose the top edge. Pity, v002 does seem quicker, more subtly responsive.

It's definitely a reproducible bug Lango.

Oh and comments upon Vade's website don't seem to be held for very long. You might have more joy contacting Vade directly.

It does seem as though part of the problem is to do with the screen bounds. However this may in fact be entirely down to how well the v002 video related patches have or have not incorporated any or all of the available parameter flags for the iSight camera range.

See Apple's own notes on this for further details.

I have attached a screenshot of the artefaction resulting with v002 blur patch.

Also a comparative using the Gaussian Blur as it is also a 640*480 screen space resolution.

Although both are at full screen space they are not being rendered to the total space available and the artefaction still happens with the v002 blur patch.

The more blur applied in the v002 blur patch the greater the extent of that artefaction.

PreviewAttachmentSize
v002moreblurmoreartefactatr.jpg
v002moreblurmoreartefactatr.jpg25.1 KB
v002comparativeguassian.jpg
v002comparativeguassian.jpg20.92 KB

vade's picture
Re: v002 Blur distorts / artifacts when fullscreen

These issues arise when you force an aspect ratio in QC. I have no idea why. My latest beta blurs do this as well, but, I dont know what QC is doing differently to force the aspect.

No idea why. Just turn off the 4x3 aspect and it works fine.

vade's picture
Re: v002 Blur distorts / artifacts when fullscreen

The differences in origin and output size have to do with how Core Image works with convolution kernels.

The long and short of it is, technically speaking, if you blur an image, you also ought to blur the edges. This means the size of the image has increased. Its akin to taking a water droplet and smushing it around, it makes the area it covers larger.

Core image addresses these coordinate system changes by specifying the size of the image as being larger but making the origin not 0/0.

As far as I am concerned this makes life a royal pain in the fucking ass and I actively chose to ignore it. I do not really like Core Image's coordinate system DOD/ROI crap, it gets the way of how my brain works.

Regardless, that is not the issue, the issue is the QC composition posted forces an aspect ratio limitation, and somehow that bleeds into the blurs. Ive no idea why.

vade's picture
Re: v002 Blur distorts / artifacts when fullscreen

Ive no idea what you are talking about with regard to the imaging sensor, its completely ancillary to the issue. Its more likely how the address space of the texture and frame buffers are stored in the graphics cards, and the differences between yours and the ops' result in different types of glitches.

Also, USE CLEAR PATCHES.

vade's picture
Re: v002 Blur distorts / artifacts when fullscreen

Im not sure why your comment got deleted, that was not an active decision. Sorry about that. I suppose I should have a wiki or some forum, just email me at vade [at] vade [dot] info with issues, im happy to help out.

cybero's picture
Re: v002 Blur distorts / artifacts when fullscreen

Thanks for all your advice, Vade.

It really helps to clarify the issue entirely for me.

Guess until the bounds / Core Image coordinates play friendly with the v002 patch I'll just have to crop its output, or maybe even exploit the odd artefaction resulting as an unexpected graphics effect.

One thing is for sure, in my experience the inbuilt QC blurs may have great extent but can really crawl and crash, however when working upon the video with v002 blur I can get away with far subtler and rapid changes to the rate of blurring achieved.

Cheers

vade's picture
Re: v002 Blur distorts / artifacts when fullscreen

Wait, I dont understand you comment about

"Guess until the bounds / Core Image coordinates play friendly with the v002 patch I'll just have to crop its output, or maybe even exploit the odd artefaction resulting as an unexpected graphics effect."

My coordinates are 100% correct. They play fine. The origin and bounds changes you see are the RESULT of using the CI blurs, not mine. Thats expected because those blurs change the actual size of the image. Mine dont, thus no change.

Do you see artifacts from my blurs WHEN NOT using 4x3 forced aspect?

cybero's picture
Re: v002 Blur distorts / artifacts when fullscreen

Just to clarify about my comment quoted above and to respond to your question.

Quote:
Do you see artifacts from my blurs WHEN NOT using 4x3 forced aspect?

Well, I already understood about the bounds and origin differences between your blur patch and Apple's. Thanks for the earlier input about that.

OK - I now get that the problem reported lies specifically with the different way that the v002 blur works if one forces a specific ratio and that it stretches AOK if one is using the default Custom ratio - what I think of as stretchable. To be honest I hadn't even altered the previously posted composition's aspect ratio setting.

I have not been able to get any artefaction other than by forcing 4:3 or 16:9, etc.

[ I actually like the fact that I can either use the patch to get a kind of Bad TV effect by forcing aspect ratios or else use it within a Custom ratio viewer :-) ]

Thanks for confirming what the cause was and just to clarify for you, I wasn't by any means seeking to suggest that your coordinates or work were wrong at all.

Totally pertinent question about the aspect ratio.

My comment regarding using a crop only relates to using a fixed aspect ratio. Only then would one need to crop out the artefacted part [because the composition was being forced into an unsupported fixed aspect ratio].

I hope you don't mind answering one more question, but how well does v002 work with other video camera inputs, is it restricted to iSight or can it exploit higher quality video input ? Do they have to be firewire or can they be USB 2.0 also ? Mm, several questions there now I come to think of it.

vade's picture
Re: v002 Blur distorts / artifacts when fullscreen

v002 works on images in quartz composer. Cameras have nothing to do with anything, they are just a source of images. Performance is limited only by the speed of your GPU.

Lango's picture
Re: v002 Blur distorts / artifacts when fullscreen

vade wrote:
Also, USE CLEAR PATCHES.

For some reason I thought clear patches only needed to be used when dealing with openGL calls, but it never actually says that in the patch description.

Or does the billboard use openGL behind the scenes? never really thought about it (ramblings to myself)

vade wrote:
just email me at vade [at] vade [dot] info with issues, im happy to help out.

Thanks. I'll keep that in mind.

vade wrote:
These issues arise when you force an aspect ratio in QC ... Just turn off the 4x3 aspect and it works fine.

I'm assuming you are talking about the aspect ratio that can be set on the viewer.

If i set it to custom, yes, it does fix the problem. If you are interested vade, I have looked into this issue some more and updated my QC file. My findings were

  1. It only artifacts with the video input (using iSight) and forcing 4:3. It does not occur on custom, 16:9 or 16:10 ratios or with images.

  2. I have 3 images, one the same dimensions of the camera, one a 4:3 ratio and one a random picked ratio. They all work fine in fullscreen mode with all the forced aspect ratios.

  3. My iSight uses an aspect ratio of 1.25, the dimensions are 1280x1024. Although a few times, i swear, it came up as 640x480 and the aspect ratio of 1.33333.... (this is the same as 4:3). However i couldn't test those times and wasn't able to reproduce it.

vade wrote:
v002 works on images in quartz composer

I also stumbled across another bug, which I included in my updated QC file. When I use -1 on the x scale in an image transform patch, then send this to your blur patch the result is a black image (no artifacting when full screen). Of note here is that the image i'm sending your blur patch has one of its bounds as a negative number.

Anyway, you have found a way around the bug but as I said, I have set up a quartz composer for you to look at if you want.

Regards

PreviewAttachmentSize
v002 blur bug.qtz1012.39 KB

cybero's picture
Re: v002 Blur distorts / artifacts when fullscreen

wow, you have been busy.

downloaded the updated blur 'bug' and gave up on the negative as any negative scaling produces a null video render, period.

then I went on to look at the aspect ratios issue.

instead of using your input images, I hooked up the video capture to the Image Transform, gave it a scaling of x =1 and y =1, all else set to 0.

I then jigged with the aspect ratio of the Viewer Window, 4:3, 16:9 and 16:10 all returned the artefaction effect previously reported when running the video input at full screen.

When set to Custom aspect ratio all artefaction disappeared when going to full screen.

This was true for all video input.

No such alteration was needed to obtain artefact free blurring at full screen resolution, at any aspect ratio when inputting a static image.

Lango's picture
Re: v002 Blur distorts / artifacts when fullscreen

Hey again cybero

cybero wrote:
any negative scaling produces a null video render, period.

In mine it is not a null image. It is an image, with different bounds, that is full of black pixels.

cybero wrote:
I then jigged with the aspect ratio of the Viewer Window, 4:3, 16:9 and 16:10 all returned the artefaction effect previously reported when running the video input at full screen.

I only got artefication from the video input when using 4:3, this is interesting that you get it for all ratios (except custom).

Do you mind if I ask what mac you are using? Also, what resolution is your iSight coming out as?

cybero wrote:
No such alteration was needed to obtain artefact free blurring at full screen resolution, at any aspect ratio when inputting a static image.

Yes, this is also interesting. The image that is the same size as the video input does not get artefacting.

cybero's picture
Re: v002 Blur distorts / artifacts when fullscreen

Dual 1.8 GHz Power PC G5 10.5.6 OS X iSight 0,0 [bounds] 640 * 480 pixel resolution - one of the original iSights :-) Graphics Card GeForce FX 5200 Apple Studio Display: Resolution: 1280 x 1024 Depth: 32-bit Color Core Image: Hardware Accelerated Main Display: Yes Mirror: Off Online: Yes Quartz Extreme: Supported

vade's picture
Re: v002 Blur distorts / artifacts when fullscreen

Thanks! This was a great bug report. It turns out the Apple example I had based all of my plugin code had some oddities wrt to the coordinate systems. Ive fixed this for the next series of blurs and other plugins, so now doing rotation, scaling and what not with the image transform patch applies exactly the same across my plugins like they do with QC standard ones.

The new blurs are going to be a bit different, as I've re-done the algorithm to do the downsampling / upsampling for the bluring (there was a bug in there that hurt performance), as well as implemented separable convolution kernels where appropriate for even more speed.

This means the next series of blurs will 'react' a bit differently, but should be even faster for larger images. If you want to beta test them, let me know. My email was above :)

I'd appreciate the feedback. Thanks.

gtoledo3's picture
Re: v002 Blur distorts / artifacts when fullscreen

My feedback, and I hope it doesn't come off wrong, because I LOVE THE V002 stuff, is.... if you are re-doing the blurs, it would be REALLY cool to have some more subtle blur levels available. I find myself wanting like 1/4 to 1/2 of the least available amount of blur in many scenarios. That is my MOST desired thing. I love the "look" of the blurs, they really have a great "creaminess" (I feel like I'm doing audio engineering using words like creamy, punchy, warm, glassy, ...lol)

Something that was like the zoom blur, but where you could add a "shape" input to define the ROI would be "the shit", as they say. I'm thinking things like an "oval" type of area, but being able to do rectangle would be awesome as well.

gtoledo3's picture
Re: v002 Blur distorts / artifacts when fullscreen

I apologize for not sending you something about this bug, I noted it some time ago when I did a qtz called "focus", but I just avoided it (the visual problem)... I guess I am so used to CI stuff having weirdness at boundaries that it didn't occur to me as a bug.

I want to say that I just made the sprite bigger than the rendering destination as my solution? Been too long...

BTW, I have REALLY been working the v002 stuff out lately, I'm going to have to take a swing by your page...

Lango's picture
Re: v002 Blur distorts / artifacts when fullscreen

vade wrote:
If you want to beta test them, let me know. My email was above :)
Sounds good. I'll send you an email

cybero wrote:
640 * 480 pixel resolution - one of the original iSights

So you get artefacts at all forced resolutions, where as I only get it at 4:3.

This could be related to the fact that your iSight's aspect ratio is 1.333... and my iSight has an aspect ratio of 1.25.

I didn't realise the iSights were different, so I went looking and found this interesting bit of information.

Quote:
Apple has moved to using a sensor capable of 1280x1024 pixels, but when accessed using provided APIs, the image is re-sampled to 640x480 pixels. However, Quartz composer allows access to the 1280x1024 pixel video stream

I wonder if this has anything to do with why I seem to occasionally get 640x480, instead of the normal 1280x1024, from my iSight.

Overall I think my initial post has been answered.

Summed up it goes

Dealing with v002 blur

1st bug: Artefacting when using iSight and going full screen with a forced aspect ratio (always with 4:3, the others as well when using an old iSight)

Solutions: Use a custom ration. Also you may be able to make the sprite bigger than the rendering destination (from gtoledo3). I'm at work so I can't test this.

Notes: Should be fixed in next version

2nd bug: When image had been fliped (negative number in the bounds) the result is a black image.

Solution: None, flip the image after the v002 blur

Notes: Should be fixed in next version.

Once again I've been overwhelmed by all the help on this forum, it's very reassuring.

Cheers

gtoledo3's picture
Re: v002 Blur distorts / artifacts when fullscreen

I hate to have thrown that out there... b/c I haven't read through the whole thread... from reading through really quick, it seems like this is describing the same thing I had come across.

I was doing something with typography, and would get this kind of warbly edge up at the top. I think what I did was to take a rendering image destination patch, add some math to it, to knock it up in size, maybe .1, or .2? I don't have the qtz handy.

vade's picture
Re: v002 Blur distorts / artifacts when fullscreen

Thats exactly why I am re-coding them, and in the process noticed I had some non optimal issues in the current ones that needed fixing. Im also introducing two new blurs to the package, that are based off of some of the optical flow stuff.

But yea, I also feel the same way. Its like the 'levels' got too hot too quick, in audio terms. These should get hotter 'slower' and more logarithmically, if you know what I mean.

gtoledo3's picture
Re: v002 Blur distorts / artifacts when fullscreen

Yes! Exactly :o)

I have hesitated to email you with that suggestion for who knows why. Because they are so good to begin with really!

Another thing... when those glitch plugins came out, I was like "what the heck"? I don't know why, but I didn't "get it" at the time. Well I have certainly changed my tune on that!!! I have ended up enjoying them tremendously in the past week, much to my amazement! I don't mean that to come off wrong, it's just that I don't do "vj" type stuff so much, and it seemed very vj directed. HOWEVER, I have learned that they are a tremendously great way of adding some visual interest to video clips...

To go back to audio.... if I was doing remixes or something, and had a track that was recorded crappy, I might turn to an overt effect to make it "purposeful"- to make it so that the lack of audio quality of source material is no longer a consideration, because it is now a "cool tone"! The same hold true for all of the glitch stuff. I can take some pics or video from my decent panasonic cam, or from my laptop, or my cell phone, and something like the glitches that degrades, but adds a certain character, levels the field between all of the clips.

Granted, that doesn't fit everyone's thing, but for throwing together some music vid type stuff it certainly makes things much quicker to get something useable and visually interesting.

BTW, I should start a thread separate, but if anyone has any recommendations on HD cams, send 'em my way! :o) I've been impressed by the Sony HV series, but I went to a Best Buy just to look at them in person, and they had none, so I'm wondering if they are on the way out (sorry to get of topic).

psonice's picture
Re: v002 Blur distorts / artifacts when fullscreen

Vade, any chance of a version of the plugin that supports higher bit depth images? i.e. 16/32 bit modes. I tend to use higher bit depth a lot lately, and these plugins would be really handy!

vade's picture
Re: v002 Blur distorts / artifacts when fullscreen

Possibly maybe ;)