如何将蒙特卡洛泛洪算法的结果转换为多边形集?
How to convert the result of Monte-Carlo Flooding algorithm to set of polygons?
我正在尝试解决这个问题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?
首先,使用 Suzuki-Abe 算法(Suzuki, S. 和 Abe, K.,通过边界跟踪对数字化二值图像进行拓扑结构分析。CVGIP 30 1,第 32-46 页)将片段提取为轮廓( 1985)).您将在生成图像时从图像中去除所有轮廓。
然后,您使用 Ramer-Douglas-Peucker algorithm.
将等高线近似为多边形
有一个著名的库可以完成这一切 - OpenCV,详情请参阅 link https://docs.opencv.org/2.4.13.2/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html
我正在尝试解决这个问题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?
首先,使用 Suzuki-Abe 算法(Suzuki, S. 和 Abe, K.,通过边界跟踪对数字化二值图像进行拓扑结构分析。CVGIP 30 1,第 32-46 页)将片段提取为轮廓( 1985)).您将在生成图像时从图像中去除所有轮廓。
然后,您使用 Ramer-Douglas-Peucker algorithm.
将等高线近似为多边形有一个著名的库可以完成这一切 - OpenCV,详情请参阅 link https://docs.opencv.org/2.4.13.2/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html