简体   繁体   中英

MATLAB image processing HELP!

I am trying to find the area of some regions on an image.

alt text http://img821.imageshack.us/img821/7541/cell1.jpg

For example, I want find the area of the dark-large region on the upper left side. and I want to find the area of any of the closed geometry from the image.

How can I do that in matlab.

I looked online and I tried regionprops(), but it didn't identify the different regions.

filter your image using 'imfilter'. use 'fspecial' to define your filter. Then use an active contour model to segment the large objects. google 'active contour matlab'. use the 'polygon' and area function to find the area of enclosed contours.

I can reccomand you a few ways to do that:

a) Arithmetic mean filter:

f = imfilter(g, fspecial('average', [m n]))

b) Geometric mean filter

f = exp(imfilter(log(g), ones(m, n), 'replicate')) .^ (1/(m*n))

c) Harmonic mean filter

f = (m*n) ./ imfilter(1 ./ (g + eps), ones(m, n), 'replicate');

where n and m are size of a mask (for instace you can set m=3 n=3 )

I think you can use contour methods for this problem. Finally, you can extract with the help of a contourdata extracting function. Research, you will see it on the Mathworks web site.

To add to hkf's answer, you might want to apply some pre-processing to your image to make it easier to handle.

I think you're on the right track with noise reduction. Your contours look relatively easy to detect - maybe you could simply binarize your image, apply combinations of imdilate, imclose and imerode to take care of artifacts (this is mostly trial and error), then try detecting the contours.

Then, of course, the challenge is to find a recipe that works for all images, and not just one sample.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM