Login  Register

Re: How to get the color information?? (isColorLut and isPseudoColorLut do not help)

Posted by Joris FA Meys on Feb 05, 2009; 10:22pm
URL: http://imagej.273.s1.nabble.com/How-to-get-the-image-information-tp3693833p3693839.html

On Thu, Feb 5, 2009 at 11:01 PM, Gabriel Landini <[hidden email]>wrote:

> On Thursday 05 February 2009 21:35:17 joris meys wrote:
> > The only thing I can think about is pick some random pixels and check if
> > the values in different channels are the same. If they differ, then you
> > have a color image. If they don't, you have a grey image.
>
> That would not work. If you hit a black/grey/white pixel in a colour image
> one
> would wrongly assume that it is grey, when it is not.
>
> G.
>
That's true, if you would check 1 pixel. But if you check 100 of them,
chances are unlikely they all are going to be black or grey when they're
not.

You have a point though with the sepia images or scanned pictures. There
this would not work at all. I would think about a statistical routine based
on the difference between the channels (one would expect the mean difference
to be bigger in color images), but that's a lot of work. If it's not a huge
set of pictures, it might not be worth the effort.

Kind regards
Joris