tag:blogger.com,1999:blog-95295597041874472.post2801978640471208343..comments2023-10-24T08:39:17.505-07:00Comments on OpenCV- Working with OpenCV: Blob Detection, Connected Component (Pure Opencv)Aresh.Saharkhizhttp://www.blogger.com/profile/07959081897702084177noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-95295597041874472.post-12519845823518851162016-04-08T00:54:24.558-07:002016-04-08T00:54:24.558-07:00hello rafaelperrone,
to find the centroid of the...hello rafaelperrone, <br /> to find the centroid of the blob, get the min , max value of the blob and divide it by 2. simple. Anonymoushttps://www.blogger.com/profile/15401029266647970208noreply@blogger.comtag:blogger.com,1999:blog-95295597041874472.post-31621278594712705282012-08-27T13:22:23.220-07:002012-08-27T13:22:23.220-07:00I'm trying to find the centroid of the blobs u...I'm trying to find the centroid of the blobs using this code. I tried something like:<br /><br />cv::Moments m=cv::moments(blobs[0]);<br />float xCentroid = m.m10/m.m00;<br />float yCentroid = m.m01/m.m00;<br /><br />but this gave me inconsistent results, so I suppose it's wrong. Can you help me correcting it so I can find the centroid of the blobs?Anonymousnoreply@blogger.com