POV-Ray : Newsgroups : povray.binaries.images : Automated RGB histogram / color map WIP Server Time
18 Apr 2024 23:38:56 EDT (-0400)
  Automated RGB histogram / color map WIP (Message 11 to 18 of 18)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Kenneth
Subject: Re: Automated RGB histogram / color map WIP
Date: 21 Mar 2017 18:10:01
Message: <web.58d1a3e1bd0e9b4f883fb31c0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > Another run:   :)
>
> Grr...   Windows drives me insane sometimes.

I know the feeling!! (see my recent *erroneous* post about what I thought was a
problem in POV's v3.7.1 beta 4.)

Your second image (with the mostly-black business card example) clarified
something for me. I originally thought that your upper-right color histogram was
supposed to be showing not only the color components of the example, but the
*amount* of each color as well. (I.e., I was wondering why the amount of pure
black occupied such a tiny area at the center apex of the histogram.) But I
think I see now that the histogram only represents the colors themselves, not
the color amounts.

I was thinking: To show the amount of each color, perhaps your lower-right
discretised view of the colors could be composed of actual 3-D cylinders-- the
longer the cylinder, the more of that color in the example being worked with.
(The 'black cylinder' there looks kind of 3-D anyway-- jutting out in -z -- so
perhaps you've already thought of this. The other colors don't show that(?), at
least as far as I can tell. Perhaps exaggerating the 'length' of all the color
cylinders there might help, in that regard.) Anyway, just an idea.


Post a reply to this message

From: Bald Eagle
Subject: Re: Automated RGB histogram / color map WIP
Date: 22 Mar 2017 07:55:00
Message: <web.58d2658ebd0e9b4fc437ac910@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> I originally thought that your upper-right color histogram was
> supposed to be showing not only the color components of the example, but the
> *amount* of each color as well.

The upper right plot is just a straight 1:1 plotting of the color values from
the evalpigment function.  The variable Step determines how densely the image is
sampled (to reduce time for large images)

> (I.e., I was wondering why the amount of pure
> black occupied such a tiny area at the center apex of the histogram.) But I
> think I see now that the histogram only represents the colors themselves, not
> the color amounts.

> I was thinking: To show the amount of each color, perhaps your lower-right
> discretised view of the colors could be composed of actual 3-D cylinders-- the
> longer the cylinder, the more of that color in the example being worked with.
> (The 'black cylinder' there looks kind of 3-D anyway-- jutting out in -z -- so
> perhaps you've already thought of this. The other colors don't show that(?), at
> least as far as I can tell. Perhaps exaggerating the 'length' of all the color
> cylinders there might help, in that regard.) Anyway, just an idea.

The _lower_ right "plot"  IS exactly that - and that's one of the interesting
things that this sort of analysis shows - just how much white/gray/black
contributes to "color" images.
Look at the debug stream output from the message pane:

[Top Left]     - Plotting Finely discretized RGB gamut with  125000 spheres

[Bottom Left]  - Plotting Roughly Discretized RGB gamut with      75 spheres

Image file dimensions:   600 x   314
Reading 1 out of every  5 color values from     188400 pixels in image file...

[Top Right]    - Plotting Full RGB gamut of image file in hexagonal grid...

[Bottom Right] - Displaying roughly discretized (averaged) colors of image
file...


Calculated Color Map:

Average RGB = <0.00, 0.00, 0.00> | Level:     241
Average RGB = <0.20, 0.00, 0.00> | Level:     155
Average RGB = <0.40, 0.00, 0.00> | Level:      20
Average RGB = <0.20, 0.20, 0.00> | Level:      11
Average RGB = <0.40, 0.20, 0.00> | Level:      44
Average RGB = <0.60, 0.20, 0.00> | Level:      15
Average RGB = <0.40, 0.40, 0.00> | Level:       5
Average RGB = <0.60, 0.40, 0.00> | Level:      12
Average RGB = <0.60, 0.60, 0.00> | Level:       1
Average RGB = <0.00, 0.00, 0.00> | Level:    4541
Average RGB = <0.00, 0.00, 0.20> | Level:      21
Average RGB = <0.00, 0.20, 0.20> | Level:      25
Average RGB = <0.00, 0.20, 0.40> | Level:      20
Average RGB = <0.00, 0.40, 0.40> | Level:      17
Average RGB = <0.00, 0.40, 0.60> | Level:      93
Average RGB = <0.00, 0.40, 0.80> | Level:       2
Average RGB = <0.00, 0.60, 0.60> | Level:       4
Average RGB = <0.00, 0.60, 0.80> | Level:       1
Average RGB = <0.00, 0.00, 0.00> | Level:     108
Average RGB = <0.20, 0.00, 0.00> | Level:       2

That's like 200 times as many black pixels as anything else.

I'll probably add another ceiling threshold to remove the very large values, or
just scale them down to that value so that everything else won't get squashed
down so much.

The whole histogram is unioned in the code and then rotated -x*90 to make it
"face out" - it could be rotated -45 or 0 degrees to give something more
obviously 3D, but for testing I didn't want to obscure too many color values
from the camera.

The most frequently occurring color value determines the size of the "Maximum"
variables, and then the whole 3D cylinder histogram gets scaled down based on
that.  So, the proportions of colors ought to be "to scale"

Unless of course I screwed something up in the calculations and things are
getting out of whack between top right and bottom right.


Post a reply to this message

From: Bald Eagle
Subject: Re: Automated RGB histogram / color map WIP
Date: 22 Mar 2017 12:55:00
Message: <web.58d2ac43bd0e9b4fc437ac910@news.povray.org>
This guy has a very interesting blog that I stumbled across, and this post has
some interesting things to say about HSV color space, and complex numbers - both
of which I've been dabbling with recently.
He also has some cool ideas with regard to laser cutting and interesting ways of
(re)interpreting hue and luminance, for reproducing photos.
He also has some good explanations of gamma - a topic we all know intimately and
love.  ;)

https://loomsci.wordpress.com/2015/08/23/avoiding-hue-wrapping-in-filtered-images/


Post a reply to this message

From: Bald Eagle
Subject: Re: Automated RGB histogram / color map WIP
Date: 30 May 2017 08:05:01
Message: <web.592d5f6bbd0e9b4fc437ac910@news.povray.org>
Needed to work on generating a decent color map for a simple wood, and realized
my image processor needed some editing to fix a bug.

Comparing the top right and lower right results, the algorithm seems to spit out
a color summary that is far to yellow.  The wood hues seem to be more on the
reddish / pink side.   Not sure why yet.

Also need to figure a way to do cracks, dust, splits, iron-tannate stains, faded
marker, and ink-filled scratches.


Post a reply to this message


Attachments:
Download 'hexagonalcolorhistogram.png' (375 KB)

Preview of image 'hexagonalcolorhistogram.png'
hexagonalcolorhistogram.png


 

From: Bald Eagle
Subject: Re: Automated RGB histogram / color map WIP
Date: 30 May 2017 08:05:02
Message: <web.592d5fc5bd0e9b4fc437ac910@news.povray.org>
WIP:

Added a modifier to each channel, and think I need to add an overall one to
desaturate the color a bit.   All straight rgb colors.


Post a reply to this message


Attachments:
Download 'typesettingtray.png' (2110 KB)

Preview of image 'typesettingtray.png'
typesettingtray.png


 

From: Bald Eagle
Subject: Re: Automated RGB histogram / color map WIP
Date: 26 May 2018 08:45:01
Message: <web.5b0955ab24e753a410874a080@news.povray.org>
I just came across this video, where Michael shows some online RGB image
analyzers.

https://www.youtube.com/watch?v=eXUUClgd-Eo

and some users comment that LAB might be a better color space.

I might have to explore writing something in another language that can analyze
color and conveniently spit it out in a formatted ready-to-use color map.


I'm also wondering if (at some point in the far distant future) there's a way
for POV-Ray to write directly to the clipboard so that a scene can be run, and
the selected "debug" messages can be pasted into another scene without having to
go through the usual editor view message pane..... rigamarole.


Post a reply to this message

From: Stephen
Subject: Re: Automated RGB histogram / color map WIP
Date: 26 May 2018 10:18:20
Message: <5b096cac@news.povray.org>
On 26/05/2018 13:40, Bald Eagle wrote:
> I'm also wondering if (at some point in the far distant future) there's a way
> for POV-Ray to write directly to the clipboard so that a scene can be run, and
> the selected "debug" messages can be pasted into another scene without having to
> go through the usual editor view message pane..... rigamarole.

I thought that you could redirect debug to a text file. Would that not do?

-- 

Regards
     Stephen


Post a reply to this message

From: Mike Horvath
Subject: Re: Automated RGB histogram / color map WIP
Date: 31 May 2018 20:19:05
Message: <5b1090f9$1@news.povray.org>
On 5/26/2018 8:40 AM, Bald Eagle wrote:
> I just came across this video, where Michael shows some online RGB image
> analyzers.
> 
> https://www.youtube.com/watch?v=eXUUClgd-Eo
> 
> and some users comment that LAB might be a better color space.
> 
> I might have to explore writing something in another language that can analyze
> color and conveniently spit it out in a formatted ready-to-use color map.
> 
> 
> I'm also wondering if (at some point in the far distant future) there's a way
> for POV-Ray to write directly to the clipboard so that a scene can be run, and
> the selected "debug" messages can be pasted into another scene without having to
> go through the usual editor view message pane..... rigamarole.
> 

I don't see what makes LAB a better space for "visualizations". It's 
unintuitive as hell. Why not use the Munsell system instead?


Mike


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.