Title: Non-parametric color mapping techniques Post by: HPDZ on January 05, 2009, 11:53:17 PM I've written a short comparison of the rank-ordering and histogram methods (and some other typical ones) of mapping counts to colors
http://www.hpdz.net/TechInfo_Colorizing.htm (http://www.hpdz.net/TechInfo_Colorizing.htm). I made some test images and graphs showing the effect of each method on some different images. I call them "non-parametric" because they are not based on any analytic model of how the counts are distributed (e.g. linear, log); a similar name is used for statistical tests that do not assume how the data is distributed. This is a follow-up to a conversation between Duncan C and me in a different thread. Continuing to go into more detail on this issue in that thread seemed to off-topic, so I am starting a new one here. Title: Re: Non-parametric color mapping techniques Post by: Duncan C on August 27, 2009, 03:01:02 AM HPDZ,
I only now found this post. Excellent article. Thanks for taking the time to write it. Duncan C Title: Re: Non-parametric color mapping techniques Post by: HPDZ on September 21, 2009, 11:08:54 PM Duncan,
I just now found your reply. Glad you liked my article. Thanks for taking the time to read it. Mike Title: Re: Non-parametric color mapping techniques Post by: johandebock on February 11, 2010, 02:10:15 PM Thanks for the valuable info!
I implemented the Rank-Order Mapping mapping method in my Buddhabrot renderer from start. Now I also included the Histogram Mapping. Histogram Mapping produces much more detail in some images: Rank-Order Mapping: (http://img37.imageshack.us/img37/277/buddhabrot2000600955101.jpg) Histogram Mapping: (http://img693.imageshack.us/img693/4641/buddhabrot2000610955101.jpg) Title: Re: Non-parametric color mapping techniques Post by: KRAFTWERK on February 11, 2010, 03:36:02 PM Beautiful renders! :o
Title: Re: Non-parametric color mapping techniques Post by: Tglad on February 12, 2010, 01:41:23 AM Nice write up, it seems to be missing two points.
Firstly, what about when you want to zoom in on a fractal? With histogram or rank order mappings the colour for any point on the set will change as you zoom, which most people wouldn't want. Secondly, it doesn't seem to consider repeating the palette as a solution. If you use a log measure on the count and repeat the palette then the image will hardly vary when you change the max iterations, and the colouring will stay the same when you zoom in and out. Title: Re: Non-parametric color mapping techniques Post by: reesej2 on March 21, 2010, 05:02:19 AM The color certainly does change as you zoom, which is a problem if you're progressing through the Mandelbrot set, trying to find an interesting spot. I've tried this color method myself and it's VERY nice, but I'd advise just using it to highlight details once you've found a spot you like. The problem with using a log measure is that, while it is possible to get an even distribution with that method, it requires fine-tuning the parameters for every image. Otherwise, certain sections end up flat and plain, while others are so chaotic they're just static.
Title: Re: Non-parametric color mapping techniques Post by: Botond Kósa on April 14, 2010, 09:40:38 PM Hi Mike,
I've read your article on hpdz.net, and based on that idea I implemented rank-order mapping in my own Mandelbrot generator. I found that even rank-order mapping washes out the fine detail near the edges of the set. However, this can be corrected by transforming the output of the mapping (the [0,1] interval) with a function that also maps into [0,1], but has a higher differential at values near 1. The first attached example shows a minibrot with standard rank-order coloring. On the second image I transformed the mapping with the function 1-sqrt(1-u). Using cube root or fourth root can increase the effect even further. Botond Title: Re: Non-parametric color mapping techniques Post by: reesej2 on April 15, 2010, 12:27:25 AM Oh, interesting idea... it makes sense that rank-order wouldn't be the final word on the subject... I wonder if logarithms would help here, too. I've found that anywhere roots help, a logarithm helps even more.
Title: Re: Non-parametric color mapping techniques Post by: kram1032 on April 15, 2010, 12:40:42 AM getting best out of all worlds :)
Title: Re: Non-parametric color mapping techniques Post by: Timeroot on April 15, 2010, 01:28:46 AM One way to do it with logarithms would be with the function 1 + 1/(log(1-x)-1). This will still map [0,1] to [0,1] monotonically increasing, also with infinite derivative at x=1.
Title: Re: Non-parametric color mapping techniques Post by: ker2x on September 27, 2010, 11:53:34 PM anyone have a mirror ? the website is down :(
Title: Re: Non-parametric color mapping techniques Post by: blob on September 28, 2010, 12:26:46 AM Does not seem to be down from here. Try again.
Title: Re: Non-parametric color mapping techniques Post by: ker2x on September 28, 2010, 09:15:36 AM Does not seem to be down from here. Try again. indeed, it's back for me too. thank you :) Title: Re: Non-parametric color mapping techniques Post by: Sigillum Militum on April 03, 2012, 04:25:27 PM I'm glad you posted that. It's great to have such smart people here.
Title: Re: Non-parametric color mapping techniques Post by: tomnzed on September 05, 2012, 01:40:35 PM Thanks a lot for the post, lots of useful info :)
Title: Re: Non-parametric color mapping techniques Post by: SeryZone on April 05, 2014, 11:20:39 PM thank you very much!!! I experiment with my Iterations Equalization and I use logarithmic, because histogram take too much time for delphi programms...
Title: Re: Non-parametric color mapping techniques Post by: SeryZone on April 27, 2014, 03:12:18 PM I've written a short comparison of the rank-ordering and histogram methods (and some other typical ones) of mapping counts to colors http://www.hpdz.net/TechInfo_Colorizing.htm (http://www.hpdz.net/TechInfo_Colorizing.htm). I made some test images and graphs showing the effect of each method on some different images. I call them "non-parametric" because they are not based on any analytic model of how the counts are distributed (e.g. linear, log); a similar name is used for statistical tests that do not assume how the data is distributed. This is a follow-up to a conversation between Duncan C and me in a different thread. Continuing to go into more detail on this issue in that thread seemed to off-topic, so I am starting a new one here. Hello! how to realize rank-order equalization??? Please, even logarithmic do not give smooth results! Please, show me C code or Delphi - I can understand all! Title: Re: Non-parametric color mapping techniques Post by: johandebock on September 27, 2015, 02:13:12 PM Hello! how to realize rank-order equalization??? Please, even logarithmic do not give smooth results! Please, show me C code or Delphi - I can understand all! Check my code here: https://github.com/johandebock/BuddhaBrot-MT/blob/master/BuddhaBrot-MT.cpp coloring method = cm = 0 is my implementation of rank-order mapping coloring method = cm = 1 is my implementation of histogram mapping Easiest way is to search for hits on the normalisation value cm0n/cm1n in the code. 1st step is building up the histogram from the counts. 2nd step is using it to map the counts to colors in the color table. Title: Re: Non-parametric color mapping techniques Post by: FractalStefan on May 12, 2017, 03:43:08 PM One way to do it with logarithms would be with the function 1 + 1/(log(1-x)-1). This will still map [0,1] to [0,1] monotonically increasing, also with infinite derivative at x=1. There must be a miskake in this formula, since log(1-x) gives an error for x=1. The function x = log(x*4n+1) / log(4n+1) with n = [0...10] (set by a slider control) lets the user determine the degree of the gradient. Example images: Original (linear gradient) (http://www.stefanbion.de/tmp/linearity/Linear.png) n = 0.00 (http://www.stefanbion.de/tmp/linearity/Logarithm_0.00.png) n = 1.00 (http://www.stefanbion.de/tmp/linearity/Logarithm_1.00.png) n = 1.50 (http://www.stefanbion.de/tmp/linearity/Logarithm_1.50.png) n = 2.00 (http://www.stefanbion.de/tmp/linearity/Logarithm_2.00.png) n = 2.50 (http://www.stefanbion.de/tmp/linearity/Logarithm_2.50.png) Using a gamma function instead of a logarithmic one, the gradient becomes a bit softer: x = x1/Gamma (Gamma = 0.1...10) Example images: Original (linear gradient) (http://www.stefanbion.de/tmp/linearity/Linear.png) Gamma = 0.50 (http://www.stefanbion.de/tmp/linearity/Gamma_0.50.png) Gamma = 1.00 (this is equal to a linear gradient) (http://www.stefanbion.de/tmp/linearity/Gamma_1.00.png) Gamma = 1.50 (http://www.stefanbion.de/tmp/linearity/Gamma_1.50.png) Gamma = 2.00 (http://www.stefanbion.de/tmp/linearity/Gamma_2.00.png) Gamma = 2.50 (http://www.stefanbion.de/tmp/linearity/Gamma_2.50.png) Sometimes a simple 1/4 sinus curve yields good results: x = sin(x * Pi / 2) Example image: Original (linear gradient) (http://www.stefanbion.de/tmp/linearity/Linear.png) 1/4-Sinus (http://www.stefanbion.de/tmp/linearity/Sinus.png) This function automatically adapts the degree of the gradient to the number of visible iterations/colors: x = (log(iterations) - log(minIterations)) / (log(maxIterations) - log(g_minIterations)) Example image: Original (linear gradient) (http://www.stefanbion.de/tmp/linearity/Linear.png) Auto-Logarithm (http://www.stefanbion.de/tmp/linearity/Auto-Logarithm.png) The example images were created by this JavaScript application (http://www.stefanbion.de/fraktal-generator/mandelbrot-example.htm). Stefan Title: Re: Non-parametric color mapping techniques Post by: FractalStefan on May 16, 2017, 12:55:21 AM I just wrote a more detailed article about some non-linear color mapping functions including an comparison chart with example images: Color Mapping – Mapping an iteration count to a color in the Mandelbrot set (http://www.stefanbion.de/fraktal-generator/colormapping/) |