Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

thresholding to find and exclude homogeneous areas in glandular images - image processing

Asked by Nad on 5 Dec 2012

Hello there!

I am working on a problem trying to identify glands in an image and create a skeletonization of them. I am using the Matlab webinar advice and that has been working great for images where the glands are already identified (thanks Brett!). But there are some images (of course its cancer images), where there are some areas of glands and some areas that are bright (unfortunately, like glands) but are more homogeneous - I don't want those areas included!

I have been using graythresh, then im2bw to get the binary mask - but often times those bright homogeneous areas are included in the binary mask. Any other advice to exclude those areas? I feel like maybe the answer is simpler than i think.

Thanks! Nad

0 Comments

Nad

1 Answer

Answer by Image Analyst on 5 Dec 2012
Accepted answer

I haven't the slightest idea what you're looking for and I couldn't even hand draw it if I had to. To me the image in Example 2 looks like a total mess with nothing recognizable in it, so I wouldn't be able to find anything in it, by eye, hand, or computer.

6 Comments

Nad on 6 Dec 2012

Thanks for the tip. I read up on each of those. I applied stdfilt to some of my images with a few different Nhood values.

So if i understand this function (and my images results) correctly, once the stdfilt is applied, then the the darker areas of the filtered image correspond to areas where the standard deviation between neighboring pixels is low (i.e. more homogeneous). Therefore, I could use this to preprocess my images to exclude areas where the standard deviation is low...am i interpreting this correctly?

For others interested, there are nice tips on the texture filters that IA suggested here - http://www.mathworks.com/products/image/examples.html?file=/products/demos/shipping/images/ipextexturefilter.html

Image Analyst on 6 Dec 2012

Yes that is correct. You can identify low areas by thresholding:

mask = textureImage < someValue;

Then either process the whole image and multiply it by the mask to zero out low texture areas of your output image, or use mask to just extract a linear list of pixel values. It just depends on how you want to use this information.

Nad on 7 Dec 2012

I did an AND operation with my old image and the result of the texture filter. That seems to be working great in excluding those homogeneous areas.

Thanks for your help.

Image Analyst

Contact us