|
ImageAnalyst <imageanalyst@mailinator.com> wrote in message <ec647c85-2331-4123-a4a0-eeab69878119@j38g2000yqa.googlegroups.com>...
> twin:
> I deal with calibrated color images all the time so I'll try to
> explain a few things. First of all, you can't pass a color image into
> hist. I know - I tried it - it gives an error. You'd have to
> histogram each color plane by itself. The histogram (or 3 of them in
> the case of a color image), or the 3D gamut, can be one way to
> describe an image. To determine "distance" (as you call it) between
> two images, what you really do is to calculate the color difference,
> which is known as Delta E. Basically it is the square root of the sum
> of the squares of delta L squared plus delta A squared plus Delta B
> squared. At least that's one formula. There are other forms of Delta
> E for cases of close color matches (where Delta E < 5) that purport to
> be more accurate or relevant. There is a newsgroup sci.engr.color
> that you may want to look at. The only way that the method you gave
> could be correct is if you just calculated the mean R, G, and B values
> for the whole image and then converted that into an estimated mean L,
> A, and B values for the entire image. Then do the same for the other
> image and use the formula for Delta E to determine a color
> difference. It can work out OK but really it's best for the case
> where the entire region is just one fairly "uniform" color.
> Mathematically, this way is not the same as calculating the Delta E on
> a pixel-by pixel basis and then averaging all the Delta E's together.
>
> There are some simple "book" formulas at http://www.easyrgb.com/ that
> may help you. Of course they are only nominal "book" formulas that
> aren't really accurate unless you've calibrated your system against
> known colorimetric standards (such as a Macbeth chart). Nonetheless,
> they can work acceptably in many situations.
>
> OK, now back to your question. a bin doesn't correspond to a color.
> For example, let's say that you have 3 histograms: one for the red,
> one for the green, and one for the blue. Now let's say you're
> referring to bin #100 in the red histogram. Well those pixels that
> contributed to that bin could have come from tens of thousands of
> different colors - the only thing the colors have in common is that
> they have the same value for their red component, but the colors of
> the pixel could range from dark red to gray to magenta to yellow to
> just about anything, as long as the red value of the color was 100. I
> hope that explains it sufficiently for you.
>
> And I don't know what you're talking about when you talk about the
> similarity between bin i and j. That really has nothing to do with
> anything. It's not even the gray level cooccurrence matrix. For
> example, how the value in histogram bin 25 is related to the value in
> bin 138 is totally irrelevant. It says nothing about the colors that
> are present in the image.
>
> I'm not sure what the quadratic forms you mentioned had to do with
> anything. Anyway, it's irrelevant since you need to calculate Delta
> E. Maybe you were referring to the Delta E formula - but even then
> that doesn't make sense. Do you mean the histograms have some kind of
> quadratic shape? Even if they did, this doesn't matter since you need
> the Delta E and this does not depend on the shape of the histograms at
> all.
>
> Looks like you could use some additional education and tutorials in
> color. Here's a nice web site with a big list of color-related links:
> http://www.efg2.com/Lab/Library/Color/index.html
> Here you can find the color and gamma FAQ's:
> http://www.poynton.com/
> The Rochester Institute of Technology Munsell Color FAQ:
> http://www.cis.rit.edu/mcsl/faq/
> A list of hundreds of colors with their names:
> http://web.njit.edu/~kevin/rgb.txt.html
> A way to visualize the 3D color gamut of your image with this plug-in
> for free software ImageJ (very, very cool plug-in!!):
> http://rsb.info.nih.gov/ij/plugins/color-inspector.html
> Macbeth ColorChecker chart
> http://www.xrite.com/product_overview.aspx?ID=824
>
>
> Regards,
> ImageAnalyst (and ColorScientist too)
Hello again and thank for your time. It is true that I am new to this area and I still have more to read . I will try to explain a liitle bit more what I wanted to ask.
I have 2 images and I want to compute the difference between these 2 images using the following formula:
Di,j^2(h1,h2)=(h1-h2)'*M*(h1-h2) (formula for quadratic forms),
where h1,h2 are the color histograms for the 2 images (h1 and h2 were determined using hist(Y,0:n)), and M=[mij] where mij is the similarity between colors represented by bins i and j. This is why I asked how could I know which color each bins represents so that I can use Delta E formula to determine the distance between 2 colors(between color represented by bins i and j).
I hope now is more clear.
Thank you also for the links,
twin
|