View Full Version : Digital image filtering on detail size

June 19th, 2014, 05:16 PM
As I mentioned in the thread about music box digitalization, I've been working a lot with image proccessing lately.

Now, my digital camera takes really grainy images, even on low iso settings with lots of light. There are several noise-removal filters, like blur (which work on frequency and sudden/gradual changes in color), but especially median convolution filters.

Median convolution filters are great for removing details smaller than a given size. It works by collecting all pixels in an area around a point in a source image, and selecting the median brightness of these pixels for the same point in the output image. The size of the filter determines what pixels are collected for every point. In effect, if a detail is smaller than the size of the filter then it will be reduced or removed in the filtered image. It keeps big details but removes small details; simple and easy. Unlike the blurr filter, the median filter will keep the remaining details "in focus", and previously sharp edges will remain sharp. Overdoing median filters will often make the image look like a painting, as you're left with only big-sized details that will somewhat mimic brush-strokes.

I did some experimentation, and in the end I came up with a procedure to more or less remove the noise without removing actual details. What I did was to calculate the average of the output on several median convolution filters of increasing sizes. This gives little response to pixel-size details, but the larger the detail the better the response. In effect the pixel sized details (mostly noise) almost blend completely into the bigger details, and anything that's supposed to be in the picture is well present.

What I realized is that this can be extended to a sort of detail "equalizer", where I can change the response of details of particular sizes! That's kinda cool, and certainly something I will be looking into in the future.

(Attached is an example of the results from the de-noise method. It has been color-ajusted and slightly sharpened before the median filters were applied.)