Reduce Banding

jersmi's picture

I have been working with some very dark, fine video footage with gradient overlays where banding becomes pronounced. Any tips for minimizing? I haven't had any luck with anything built-in. How does the FCP filter handle this? In FCP I usually double/triple/quadruple the filter and turn noise to 100% -- not ideal.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

jersmi's picture
Re: Reduce Banding

p.s. footage is 1024x768 Photo-JPEG/80%. I've been using ProRes, too -- might look a tiny bit better.

psonice's picture
Re: Reduce Banding

Perhaps use a lossless codec? Otherwise you might want to try >8bit colour depth, not sure how you'd do this with video though.

Beyond that, removing the banding afterwards will be tricky. You could add a noise layer, that might mask it. Otherwise you'd need something a bit more complex. Perhaps a bilateral filter, set to cover a fairly wide area, with the cutoff set high enough to blur the banding. It'll remove some fine image detail though. (If you use bilateral, use the average value rather than the median for this, it'll help blend the banding more).

sbn..'s picture
Re: Reduce Banding

psonice wrote:
Perhaps use a lossless codec? Otherwise you might want to try >8bit colour depth, not sure how you'd do this with video though.

OpenExr can do 16bpc, but then you're looking at an image sequence. Blender exports and handles these fine (even with z-buffer and alpha), but the one Apple tool I've used, Motion, has sadly not lived up to the hype even though EXR is listed as supported.

I bought Motion when its price was cut recently, hoping to have some fun with my Blender renders. Sadly, scrubbing is entirely out of the question with 720p EXR sequences, and in a weird way where it doesn't even RAM preview. Don't know about FCP.

jersmi's picture
Re: Reduce Banding

Lossless codec = fps hit for live processing. Also, if I am adding a gradient overlay to the video, then banding happens later in the chain. I haven't tried >8-bit color in QC with live processing. Are CI filters reliant on color bit depth? Would Quartz Crystal render out anything useful? I have to do a little experimenting.

jersmi's picture
Re: Reduce Banding

Correction: the problem is not with the rendered video. The problem is with the core image filter I am using for overlays -- toneburst's random gradients. I tried bumping up the Render in Image to 16 and 32-bit, but it shows no difference. Is core image limited to 8-bit?

vade's picture
Re: Reduce Banding

No.

Core Image can render 32bpc (128bpp) bit floating point.

dust's picture
Re: Reduce Banding

you will never be able to get rid of all banding due to high contrast gradient overlays. mach bands are a perceptual phenomenon that has something to do with with how your retina processes the luminance of what it sees and how the brain tries to sharpen that image.

its kind of hard to explain but i studied this in school for a bit. try to follow me. the mach banding is created by later inhibition. lateral inhibition is basically a stimulated neuron that has the ability to reduce laterally or inhibit excitement in its nearest neighbor neurons.

if you think of this not in terms of neurobiology but in imaging terms... whats happening is when retina is trying to process the luminance channels of your gradient and when there is a dark next to light then your neurons try to sharpen that image in the middle by reducing stimuli laterally in both directions which in-turn creates the banding in the sharpened image the brain needs to process.

sure you can reduce this banding.... at what cost ? (i would have to see the image).... you can try to throw everything inside a render in image. use a sprite then add a lighting patch and bump up the attenuation to try and then smooth out some contrast... maybe even using a gama patch with exposure and things like image control may help as well.

jersmi's picture
Re: Reduce Banding

dust, that's a little wacky. video footage: no banding. toneburst's Random Gradient CI filter: banding. combine the two using the CI Dissolve patch: banding. i'm adjusting gamma/exposure/white point color (HSLA).

vade wrote:
Core Image can render 32bpc (128bpp) bit floating point.
does changing Render in Image settings change CI filter color bit depth?

i'm about to try a couple different projectors, too.

vade's picture
Re: Reduce Banding

Im honestly not sure. I suspect not.

I do know that for 8bpc (32bpp) images Core Images internal calculations happen in half float (16bpc, 64bpp).

Post a comp?

Play with "image color matching properties" on the gradient input to the compositing operation, not to the footage.

Also remember, at the end of the day, your display is 8 bits, and anything higher bit depth has to be dithered down to display bit depth to be seen.

jersmi's picture
Re: Reduce Banding

Here's a comp. Banding becomes more pronounced with gradients at low alphas. Understand that when projected, this kind of stuff really shows. I'm doing stuff where I pull things really dark, playing with perceptual limits,etc.

Edit: so the problem comes down to a general question about gradients in QC and if there is any way to reduce banding when the image is always output at 8-bit resolution.

PreviewAttachmentSize
tb_RandomGradients_Banding.qtz361.23 KB

dust's picture
Re: Reduce Banding

yeah i know that sounded wacky but I'm not making it up. mach bands are a perceptual phenomenon. honestly i have more experience creating them with qc and have not tried getting rid of them.

it seems using low saturation, low contrast, and low brightness with gama - exposure-whitepoint and post invert turned greatly reduces the banding. although and i know your trying to get rid of the bands but your patch is producing some really great bands with the expose brightness and contrast turned up.

jersmi's picture
Re: Reduce Banding

thanks for taking a peek, dust. yeah, mach bands -- i enjoy the perceptual illusion stuff, too. mach bands require an edge, and i'd like to lose the edge. this time the phenomenon is distracting, drawing attention to itself and taking away from the intent. i wish i understood a little more about it in QC. probably related to monitor display, too.

vade's picture
Re: Reduce Banding

Sorry I never got back to you on this. I was distracted by a potential bug in the OS on my system that this comp was demonstrating well.

I get occasional black lines, which look like a very strange p-buffer-not-flushing corruption, so I spent some time recording it and putting together a bug for Apple.

Fun times.

jersmi's picture
Re: Reduce Banding

yikes! no problem. thanks a lot for checking back.

I know the gradient issue is potentially a combination of factors (software + hardware). At the end of the day I would love a tool in QC to help alleviate banding issues. Been wondering for a while if anything could be done.

This comp is a subset of something I am working on to record live processing midi input (using Plogue Bidule and Value Historian) then output a high quality video of a live show later with Quartz Crystal.

btw, like every other solution, using color matching properties didn't really show any difference.

ShowBlender's picture
Re: Reduce Banding

If the explanation of Mach banding didn't help, I made an app(with Quartz) that emphasizes the Mach Banding effect with a histogram(hold down 'h') that shows the actual luminance. http://www.showblender.com/blog-1/2014/11/3/mach-banding has more details.

PreviewAttachmentSize
MachBanding.zip1.34 MB