Need help with analyizing images

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Need help with analyizing images

Vishwanath Somashekar
Hi,
I am new to using any image analysis and have been posed with a
problem. you can access a bunch of folders by click the following link
ftp://129.186.105.169

when it prompts for the user id and password, use mstremler for both.
you will see a few folders and if you open say Re0.8, you will see
some images which are numbered sequentially. from one image to the
other, you will see a increase in the purple color. It is very obvious
from the figure to see that, but I am having problem quantifying it by
doing some image analysis. Any help regarding this would be very
appreciated. I have so far played with just measuring mean intensities
and that doesn't seem to solve my problem.

Thanks,
Vishwa
Reply | Threaded
Open this post in threaded view
|

Re: Need help with analyizing images

dscho
Hi,

On Thu, 28 Jul 2005, Vishwanath Somashekar wrote:

> from one image to the other, you will see a increase in the purple
> color.

You might want to play around with "Image/Type/RGB Stack" and
"Image/Type/HSB Stack".

More generally, you also could write a macro, which labels pixels being
approximately the target color, like

-- snip --
targetRed=255;
targetGreen=50;
targetBlue=0;

for(i=0;i<getWidth();i++)
        for(j=0;j<getHeight();j++) {
                pixel=getPixel(i,j);
                red=((pixel>>16)&0xff);
                green=((pixel>>8)&0xff);
                blue=((pixel)&0xff);
                distance=floor(sqrt(((red-targetRed)*(red-targetRed)
                        +(green-targetGreen)*(green-targetGreen)
                        +(blue-targetBlue)*(blue-targetBlue))/3));
                newValue=(distance<<16)|(distance<<8)|distance;
                setPixel(i,j,newValue);
        }
-- snip --

This will set a gray value which represents the distance of the pixels's
color to the target color. By counting how many pixels have a newValue<20,
you have a measure "how purple the image is".

Hth,
Dscho