From: Joseph on
Hello,
I'm a new matlab user that's using contourf extensively for histologic blood cell analysis.
Basically I take the contourf of a microscopy image and set the number of levels to 5. Individual cells are seen on the image as a series of contour regions against a blue background (the region defined by the lowest contour).
I want to process the plot so that I have an image matrix of 1's and 0s such that 1 represents the blue and 0 represents everything else. Then I'm going to contrain my analysis to only regions within cells (which are going to be defined by the zeros).
The returned cdata from the contour functions does not seem to do this, but rather returns contour lines.
Does anyone know of a way to get spatial regions rather than locations of lines?
One approach I have tried is to use getframe of the contourf plot. This however returns an image that is not the same size as the original that was sent into the contour plot, despite the fact that I am setting my axis appropriately.
I'd really appreciate the help. Thanks!
joe
From: ImageAnalyst on
joe  :
Why not make it easier for us and post your images and your code?

Without seeing the image I have no idea why you chose to use contourf
rather than the more typical thresholding, labeling, and regionprops
way of doing it, nor do I know if contourf would be preferable to the
usual method. From what you've told me so far, I doubt your method is
better than the more traditional method (feel free to prove me wrong
with an example).

Once you've found the blobs, what do you want to measure about them?
Their shape, intensity, color, etc.???
-ImageAnalyst

From: Joseph on
Thanks for your fast reply!
Apologies I do not see where I can upload an image on the reply form. I do have images that I would be happy to upload if you can direct me?
Initially I want to analyze intensity of the cells. Or average intensity over the pixels that define a cell.
Sometimes cells are close together. I have found that simple region growing has issues in discriminating cells that abut eachother. All things being equal, the center of a cell is brighter than it's periphery. Level sets with multiple levels tends to isolate the cells very well.
Of course I could write an adaptive threhold/region grow to try to solve the problem, but matlab has the trivial level set function contour and I'm trying to get away with a faster solution. It would take me, as a beginner in matlab, a day or two to code that and I thought there must be a solution that I just can't find via google and the matlab documentation.
I do sincerely appreciate your attention. thanks again!
From: ImageAnalyst on
Contouring will get you the same boundaries as thresholding I
believe. Not sure how level sets (http://en.wikipedia.org/wiki/
Level_set_method) would do it - maybe you can post some code.

You can post your image here: http://drop.io

Maybe Steve Eddins's cell segmentation algorithm would work for you:
http://blogs.mathworks.com/steve/2006/06/02/cell-segmentation/
From: Francis Burton on
In article <1cfcc087-a513-48b7-b3cb-690bc3858770(a)z8g2000yqz.googlegroups.com>,
ImageAnalyst <imageanalyst(a)mailinator.com> wrote:
>Contouring will get you the same boundaries as thresholding I
>believe. Not sure how level sets (http://en.wikipedia.org/wiki/
>Level_set_method) would do it - maybe you can post some code.

An application of countouring is described in a paper by
Guberman et al. (2008) to get cell outline information with
sub-pixel resolution:

http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2581597/?tool=pubmed

The PDF should be freely downloadable. The software, which is
written in MATLAB, can be obtained from here:

http://www.molbio1.princeton.edu/labs/gitai/psicic/psicic.html

>You can post your image here: http://drop.io
>
>Maybe Steve Eddins's cell segmentation algorithm would work for you:
>http://blogs.mathworks.com/steve/2006/06/02/cell-segmentation/

Segmenting cells can be hard, and often people end up developing
their own heuristic / image processing chain that "works". Perhaps
that should be surprising given the biological diversity of cells
and the variety of preparation methods and imaging modalities.

Francis