We will use
findContour () OpenCV
findContour () which helps to extract contours from an image.
The coordinates of each vertex of the path are hidden in the path itself. In this approach, we will use the numpy library to convert all of the path coordinates to a linear array. This line array will contain the x and y coordinates of each path. The key point here is that the first coordinate in the array will always be the coordinate of the topmost vertex and therefore can help in determining the orientation of the image.
In the following code, we will use an image named & # 39; test. jpg & # 39; to find outlines and print the coordinates of the vertices on the image itself.