I am trying to solve this problem by using of Monte-Carlo Flooding algorithm. As result I receive set of semicircles (the picture below), but the requested solution is for trapezoid like polygons. Please, can you suggest me an algorithm by which I will be able to transform this semicircles in polygons?
问问题
47 次
1 回答
1
首先,您使用 Suzuki-Abe 算法(Suzuki, S. 和 Abe, K.,通过边界跟踪对数字化二进制图像进行拓扑结构分析。CVGIP 30 1,pp 32-46 (1985))将您的片段提取为轮廓。在生成图像时,您将从图像中获取所有轮廓。
然后,您使用Ramer-Douglas-Peucker 算法将轮廓近似为多边形。
这是众所周知的库 - OpenCV,有关详细信息,请参阅链接https://docs.opencv.org/2.4.13.2/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html
于 2017-10-15T21:53:10.430 回答