Sunday, January 2, 2011

Canon dSLR, simple detail & moire solution for 1080p

Au revoir moire, Sayonara jaggies, Hello detail.

I do not know what this didn't occur to me earlier (of course it may have occurred to someone else earlier, I just haven't read about it - but have read a lot of complaining or wishing for fixes in Magic Lantern for things like this).

Moire and lack of detail and jaggies occur in the Canon dSLR videos because there is no down scaling algorthim (sucks), meaning you end up with 1920x1080 straight pixels from the massive resolution sensor, no accounting for the gap between the pixels.

Quite like a nearest-neighbour down size in photoshop.

Well, you can fix this with an optical blur filter, to put the details out of focus... wait there is merit in this.

Even crappy lenses are too sharp for nearest neighbour down sized 1080p video off a high resolution sensor.

If the sensor was actually 1080p there wouldn't be (much) of a problem with that.

You want to enlarge (put out of focus) image detail over the sensor so you don't have a bunch of missing spatial detail thats gone flying out the window with all the other pixels being thrown out. Similar to an AA filter in the camera for stills.

To demonstrate this I have prepared a still image from a 5D II (shamelessly stolen test image from dpreview), cropped a section that seemed good, and downsized to the same factor as 1080p would be (5616 / 1920) using the nearest neighbour 'filter' (no filter, raw pixels grabbed and others chucked out), bicubic filter, and lastly, one with a gaussian blur of 1 pixel (seemed to be most appropriate size for this test) and then downsized using the nearest neighbour method (as to emulate the 5D II + some kind of softening filter on the lens).

Images are then enlarged to 200% for pixel peeping purposes.

You will have to view/download the full image to see the differences, I made it all as one image for convenience, no sharpening has been applied.

I think that a full-sensor sampling in-camera then a gaussian blur or fast blur, then nearest neighbour down size would actually be pretty damn good - because we're not losing detail, but this also blurs the noise, and would have significantly better noise characteristics @ 1080p.

Given the real detail level of the 5D II 1080p video is at or just above 720p (if you don't believe me take a still of the sharpest 1080p Canon video and downsize it using bicubic filter in Photoshop to 720p or just above, then back up to 1080p and see if you can spot any detail loss), I think that the detail loss is due to the way the image is sampled (similar to nearest neighbour) which loses detail, that is it chucks out the gaps between what it keeps, which creates moire, jaggies, etc, further detail is lost I believe in the compression of the jaggies.

So I believe the right softening filter on the Canon dSLRs may increase the detail level present, along with removing moire and jaggies.

(Update: No I do not think a diffusion filter will work well, it's overlaying the origina sharp image with a soft one to reate the diffusion, you want a just a soft filter with no diffusion, a solid peace weakish soft filter I'd think)

No comments: