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
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: 643 times
Last updated: Apr 02 '20
Area of a single pixel object in OpenCV
Weird result while finding angle
cv2.perspectiveTransform() with Python
cv2 bindings incompatible with numpy.dstack function?
Getting single frames from video with python
Line detection and timestamps, video, Python
Different behaviour of OpenCV Python arguments in 32 and 64-bit systems