1 | initial version |
From my experience, it helps you to avoid those situations where you might not get a blob of isolated points belonging to the shape you'd like to detect.
An example: the first image comes from a threshold of 75, the second one from a threshold of 95. These are sections of two close squares, but in the first case you won't fine any result because the borders are still connected in some points.
You can solve this by trying more threshold levels, or perform an erode to remove those points between the borders (if they're small enough).
2 | No.2 Revision |
From my experience, it helps you to avoid those situations where you might not get a blob of isolated points belonging to the shape you'd like to detect.
An example: the first image comes from a threshold of 75, the second one from a threshold of 95. These are sections of two close squares, but in the first case you won't fine any result because the borders are still connected in some points.
You can solve this by trying more threshold levels, or perform an erode to remove those points between the borders (if they're small enough).
3 | No.3 Revision |
From my experience, it helps you to avoid those situations where you might not get a blob of isolated points belonging to the shape you'd like to detect.
An example: the first image comes from a threshold of 75, the second one from a threshold of 95. These are sections of two close squares, but in the first case you won't fine any result because the borders are still connected in some points.
You can solve this by trying more threshold levels, levels (well, not as much as in squares.cpp example because the last 3 iterations are removing most of the points in the resulting binary image) or perform an erode to remove those points between the borders (if they're small enough).