Hi there, could anyone suggest some techniques to generate boundary polygons like the yellow lines in this image, the input being the red pixels? As you can see there is noise outside the main shape which needs to be ignored, and missing areas within the shape which also need to be ignored. Pointers much appreciated, thank you.
what makes you think the “proper” contour for your point cloud is as you drew it? it could be more intricate…
To Draw a Polygon:
https://docs.opencv.org/master/dc/da5/tutorial_py_drawing_functions.html
To Detect a Polygon:
Also following are some methods that might help you.
- To Reduce Noise you can use different Blur Techniques Like Blur, Gaussian Blur, Median Blur.
Link: OpenCV - Blur (Averaging) - Tutorialspoint - You can use Bitwise Operator to Extract Red Area from Image.
Link: OpenCV Bitwise AND, OR, XOR, and NOT - PyImageSearch