how to find centroid, area, orientation of a particular region in an image
i need this for my project. i need to find the above mentioned features of an object
If you have a mask over the region, you can convert it to a shape.
If the region in question is already a shape, you have jackpot-all those features are implemented to shapes. This article should be super useful for you. If in doubt, c++ is exactly the same, but different syntax.
Orientation can calculated from a fitted line. Be aware, that orientation is may trickier than first seems, look out for symmetries, and how you handle rotational errors.
Asked: 2020-04-02 09:09:39 -0600
Seen: 502 times
Last updated: Apr 02 '20