How do I combine regions of regionprops?
Hello, I use regionprops to get different regions within an image.
Obj = regionprops(~bw,{'Area','Extrema','Boundingbox','MajorAxisLength','MinorAxisLength','ConvexHull','Centroid'});
According to some assumptions I would like to recombine some Objs of the struct
For example I would like to combine 2 objects where the y-coordinate of the centroid is quite similar. This means, that the some values, Area, Centroid, Bounding Box have to be recalculated. What would be the correct way to do that?
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
I believe you can set the label to be the same. For example, make blob 3 have a label of 2 and then blob 2 will now be the old blob 2 and the old blob 3
labeledImage(labeledImage == 3) = 2; % Merge blob 3 into blob 2.
Now call regionprops
props = regionprops(labeledImage, .........
SEE COMPLETE ANSWER CLICK THE LINK