find vertically overlapped bounding boxes?

I want to extract vertically overlapped bounding boxes and connect them vertical line, attached image show the overlapped bounding box.
I am using below code, Can any one help me regarding extracted vertically overlapped boxes.
propied=regionprops(L,'Area','BoundingBox','MajorAxisLength');
X=[];
Y=[];
for n=1:size(propied,1)
rectangle('Position',propied(n).BoundingBox,'EdgeColor','r','LineWidth',1)
X =[X; propied(n).BoundingBox(1) propied(n).BoundingBox(3)+ propied(n).BoundingBox(1)];
Y =[Y; propied(n).BoundingBox(2) propied(n).BoundingBox(4)+propied(n).BoundingBox(2)];
end

Answers (0)

Categories

Find more on Simulink Design Optimization in Help Center and File Exchange

Asked:

on 7 May 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!