Connected Components - Descriptions

asked 2018-05-07 05:24:37 -0500

cjacquel gravatar image

Hello,

After the connectedcomponent function, how to have the area, center, and englobing rectangle of each region or component ?

Thank you, Christophe

edit retag flag offensive close merge delete

Comments

In the interest of learning, I dare say that you should to implement all of this code for yourself, and learn the OpenCV version later. I gave you code earlier. Accounting for the pixel indices of each section is just a matter of making a map<float, vector<Point2d> >. Getting the bounding box from these data is pretty straightforward.

sjhalayka gravatar imagesjhalayka ( 2018-05-07 11:45:33 -0500 )edit
1

for a change, take a look at docs before asking.

berak gravatar imageberak ( 2018-05-07 13:46:46 -0500 )edit