From: Jan on
Dear

Is there a way to select the largest object in an image? For example a MRI image with the abdomen and two arms. The region of interest is the abdomen. Is there a possible way to only select the abdomen, a drawback for selecting the boundary is a smooth low frequency signal (bias field) that disrupts the image.

Thanks in advance
Jan
From: ImageAnalyst on
Yes but you need to segment out the objects you want first, then do
connected components labeling. You could probably do this, assuming
the arms don't touch the abdomen in the slice you're analyzing.
Something like this pseudocode:
threshold
imfill() - do a hole filling if desired,
bwlabel()
stats = regionprops()
areas = [stats.area]
[maxArea largestBlobIndex] = max(area)

If you want more, post an image to http://drop.io, or check out this
example on image processing:
http://www.mathworks.com/matlabcentral/fileexchange/25157
From: Jan on
Many thanks for your reply!!!
 | 
Pages: 1
Prev: .exe
Next: add binary constraints to portopt