设置首页收藏本站
开启左侧

轮廓分割,新人求助

[复制链接]
qweerzhou 发表于 2025-3-4 11:34:06 | 显示全部楼层 |阅读模式
本帖最后由 qweerzhou 于 2025-3-5 10:32 编辑

1.需要将一个闭合轮廓,按yello框示例图进行直线、拐线、圆弧分割,下面有应该分割成什么样的示例图。
2.另外需要对分割后的直线和弧线进行生成 成对关系,因为圆的轮廓是没有成对关系的,只有其他地方有,直线跟拐线因为一个直线线路是由两个直线组成,拐角的地方也是。
3.轮廓在xx.zip附件里,下载解压后改下基础demo路径即可
4.新人求求求助大佬。


轮廓分割后的结果示例

轮廓分割后的结果示例

实际轮廓

实际轮廓

xx.zip (376 Bytes, 下载次数: 5)


  1. * 基础 demo
  2. read_dict ('Y:/test/xx.json', [], [], DictHandle356)

  3. get_dict_tuple(DictHandle356, 'area_locations', area_locations)
  4. get_dict_tuple(area_locations, '1652', scope)

  5. get_dict_tuple(scope,'other_area' , other_area)
  6. get_dict_param(other_area, 'keys', [], GenParamValue)

  7. tuple_length (GenParamValue,  Length)

  8. for Index1 := 0 to Length-1 by 1
  9.         
  10.         key := GenParamValue[Index1]
  11.         
  12.         get_dict_tuple(other_area, key, other_area_info)
  13.         get_dict_tuple(other_area_info, 'outline', outline)
  14.         
  15.         get_dict_param (outline, 'keys', [], GenParamValue1)
  16.         
  17.         
  18.         rows := []
  19.         cols := []
  20.         
  21.         tuple_length (GenParamValue1, oLength)
  22.         for Index2 := 0 to oLength-1 by 1
  23.             oIndex := GenParamValue1[Index2]
  24.             get_dict_tuple(outline, oIndex, point)
  25.             get_dict_tuple(point, 0, x)
  26.             get_dict_tuple(point, 1, y)
  27.             tuple_concat(rows, y, rows)
  28.             
  29.             tuple_concat(cols, x, cols)
  30.             
  31.         endfor
  32.         
  33.         
  34.         gen_contour_polygon_xld(outline_xld, rows, cols)
  35.         dev_display(outline_xld)
  36.         segment_contours_xld(outline_xld, ContoursSplit, 'lines_circles', 0, 20, 100)
  37.         
  38. endfor
复制代码





奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表