The following pseudocode code works fine in reality, but I have a question concerning the appropriateness with what I am trying to do. I detect a few simple blobs ovoid to circular in nature, in a binary image. I am trying to find the blob centers:
The keypoints returned: do they contain the center coordinates of the blobs detected or should I calculate the centroid of the blob using using an algorithm, a bounding box middle or even by applying a moments function? Where do I go from here to find center coords?
Hi thanks for the recommended solution. Would a “geometric solution” be acceptable as well as simpler? I basically find the leftmost, rightmost, lower-most, higher-most pixel coordinates of the blob in the image plane and calculate the rectangular center from this virtual bounding box. Assuming a relatively symmetrical blob which I am using. How can I find the coordinates marked with “?”
I’ll have to do some reading about center of gravity versus geometric center and repost --honestly I don’t know the diff. I do know I want to avoid contours and to work with 1-2 round binary blobs that are moving. The algorithm should be light weight and with as few OpenCV fx calls as possible. I am presently using binary keypoints[x].x etc. as center image points but this is probably not right though close.