3 ms·
Thanks for the hint! I deal with contour produced by OpenCV and it's the picture that I'm passing through that are resulting in weird set of lines. Imagine tak
by ramtatatam 5y ago
Thanks for the hint!
I deal with contour produced by OpenCV and it's the picture that I'm passing through that are resulting in weird set of lines. Imagine taking a photo of old map and trying to figure out where oceans and continents are. For very good quality photo tuned contour algorithm will find shapes of continents. With degrading quality of photo (also with bad light conditions) there will be more and more artifacts picked up by the algorithm. I take the resulting contour apart and treat it as separate lines in hope that this will help me remove those artifacts and only leave contours of continents.
- mindcrime 5y agoOK, gotcha. Sounds like an interesting problem. Another area that might be worth exploring is fractal geometry. Many real world shapes (coastlines, for example) have a fractal aspect. And given that there are means for calculating the fractal complexity of a section of such a thing, you might be able to do some iterative thing where you perform such a calculation over a part of your image, then start taking edges out, and see how much that affects the calculated value. It may be that lines that were never really part of the actual real world shape have a different impact when removed, compared to lines that were part of the actual shape. Or if that not exactly, the whole world of fractals and the associated math might have something that would be useful to you. https://users.math.yale.edu/public_html/People/frame/Fractals/ https://users.math.yale.edu/public_html/People/frame/Fractal... A clustering algorithm might also be useful. It may be that you can cluster the endpoint locations in such a way that the "artifact" lines will clearly fall outside the cluster, which might make it possible to spot and remove them.