fisholith |
===== Update:
I just finished building the Percentile Filter and I have added a download for it, and included a description section for it below. ===== Downloads: - - Update: My FF1 "Median 3x3" filter and "Percentile 3x3" are now available in the Filters > Snippets section of the filter library. Median 3x3: http://www.filterforge.com/filters/8082.html Percentile 3x3: http://www.filterforge.com/filters/8083.html ===== Median Filter Info - - Overview: Okay, this is a true 3x3 (9 sample) median filter with an adjustable radius. By "true" median filter, I mean that a mathematical median calculation is being performed per pixel to determine the output image, as opposed to a process that simply attempts to simulate the look of a median. At very small radius values, where the samples are distributed over a contiguous area, the effect is exactly equivalent to a traditional median filter. At larger radius values, you are still seeing a genuine median result, though likely not the kind of result you would expect from a traditional median filter. This just has to do with the number of samples taken. - - Behavior: For each output pixel, a set of 9 (i.e. 3x3) input pixels is sampled, and the input pixel with the median brightness is selected and used as the output pixel, (though that is a bit of an over simplification). More specifically, the median brightness values of the red channel, green channel, and blue channel are selected independently. So the median red value might come from input pixel sample "1", the median green value might come from input pixel sample "8", and the median blue value might come from input pixel sample "3", making the output pixel a hybrid of the median R,G, and B values found among the 9 input pixel samples. In other words, this median filter is channel aware. - - Controls: Radius The "Radius" value determines how far apart sample rows and columns are in the 3x3 sample array. Note that increasing the "Radius" value will shift the sample rows and columns farther apart, but will still only sample 9 input pixels for each output pixel. Thus, at larger radius values, you will begin to see separations in the image features, although you will still be sing the true median result of those features. This differs from median filters in programs like Photoshop, wherein more samples are taken at larger radius values to preserve the smooth appearance. This type of functionality could theoretically be built into this median filter, at some later time, but for now, it always takes 9 samples per output pixel. Fine (max = 1%) By default, distance is measured as a percentage of the image's total width, where a value of 100 yields a 100% sample separation distance. However, with the "Fine (max = 1%)" option is enabled, a "Radius" value of 100 yields a 1% sample separation distance. I recommend that you have "Fine (max = 1%)" enabled, and use a small "Radius" value to achieve a conventional median effect. - - Additional Notes: I'm also working on building a similar Percentile filter, which will provide median, minimum, and maximum filter capabilities. ===== Percentile Filter Info - - Overview This is a true 3x3 (9 sample) "percentile" filter with an adjustable radius. It provides the functionality of a Median filter, a Maximum filter, and a Minimum filter. It provides 9 percentile gradations total. These gradations are images numbered 1 through 9, and are created as follows. Each pixel in an output image is selected from one of the 9 (i.e. 3x3) input samples. Image 1 contains only the darkest pixels, 2 contains the 2nd darkest pixels, 3 contains the 3rd darkest, and so on, all the way up to 9 which contains the brightest pixels. Image 5 is directly in the middle, and so given the 9 (i.e. 3x3) input samples, each output pixel in image 5 is the "median" (center most) of the 9 input samples. This means that image 5 is a "median" image. Likewise, image 1 is a "minimum" filter image, and image 9 is a "maximum" filter image. - - Controls: The Percentile Filter controls are the same as the Median Filter controls, but with the addition of the "Value" control, (full name "Value: 1mn, 5md, 9mx"). Value: 1mn, 5md, 9mx This selects one of the 9 percentile steps, starting with "1" at the darkest, and increasing to "9" at the brightest. There are 9 steps because 9 samples are taken per output pixel. A value of "5" selects the median brightness step, and results in a median filter. When the value is set to "5", the Percentile Filter will behave identically to the Median Filter described in the "Median Filter Info" section above. |
|
Posted: January 16, 2010 6:32 pm |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,713 Registered Users
+19 new in 30 days!
153,537 Posts
+6 new in 7 days!
15,348 Topics
+72 new in year!
20 unregistered users.