1 | initial version |
You can try in this way:
You can try to convert to grayscale before the first threholding. You can try to use Canny operator instead of threholding and morphogical operator before findContours(). Basicaly whay you need is a binary image as input for findContours. Suggestion: you can also extract boundary in this way: A - (A EROSION B), where A is your image and B is your SE.
2 | No.2 Revision |
You can try in this way:
You can try to convert to grayscale before the first threholding.
threholding.
You can try to use Canny operator instead of threholding and morphogical operator before findContours().
Basicaly whay findContours().
Basically you need is a binary image as input for findContours.
findContours.
Suggestion: you can also extract boundary in this way: A - (A EROSION B), where A is your image and B is your SE.