MATLAB: Divide any blob into half

blobcentroidImage Processing Toolbox

I would like to find the equation of a line that passes through the centroid of a blob so that I can divide the blob into half. How can I achieve this after I get the centroid from regionprops() ?

Best Answer

Hg says the real need is for "cropping an image and one of the criteria is to reduce the size of a "long" blob by removing half of it." You can do that with imerode. But I asked for the context and you still haven't provided that. Why would you want to reduce the size of your segmented blobs by half? What is the point in doing that?