2020-10-23 09:21:01 -0600 | received badge | ● Student (source) |
2020-04-03 03:32:47 -0600 | received badge | ● Popular Question (source) |
2017-01-18 06:16:20 -0600 | received badge | ● Scholar (source) |
2017-01-18 06:16:06 -0600 | received badge | ● Supporter (source) |
2017-01-17 06:53:23 -0600 | received badge | ● Editor (source) |
2017-01-17 06:40:47 -0600 | asked a question | Closing contours with approxPolyDP or convexHull Hello OpenCV Community, I'm currently trying to close the contours on the right of this picture: Sample . The reason for the opened contour lies in kabeja, a library to convert DXF files to images. It seems that on some images it doesn't convert the last pixel column (or row) and thats why the Sample picture is open. I had the idea to use Core.copyMakeBorder() in Opencv, to add some space to the picture. After that I tried to use Imgproc.approxPolyDP() to close the contour, but this doesn't work. I tried this with different Epsilon values: Eps3 Eps50 Eps125 The reason for that is maybe that the contour surrounds the line. It never closes the contour where i want it to do. I tried another method using Imgproc.convexHull(), which delivers this one: ConvexHull. This could be useful for me, but i have no idea how to take out the part of the convex hull i need and merge it together with the contour to close it. I hope that someone has an idea. Here is my method for Imgproc.approxPolyDP() And here the code for Imgproc.convexHull() Best regards, Brk |