ContextCapture脚本编写

前期准备工作包括库的安装

[ContextCapture python脚本编写_contextcapture二次开发_扛着三脚架的码农的博客-CSDN博客](https://blog.csdn.net/qq_41475842/article/details/112959892)ContextCapture python脚本编写_contextcapture二次开发_扛着三脚架的码农的博客-CSDN博客

用户连接点的添加

主要参考文件来自于软件安装目录中的"sdk\doc\html\genindex.html",在"sdk\samples\automaster.py"代码的基础上修改

# 添加用户连接点UserTiePoints
    user_tie_points = block.getUserTiePoints()
    tie_points_list = get_tiePoint_from_xml(tiePointXml)
    # tie_points_list:元素是tie_point_list
    # tie_point_list元素是measurement_dict
    # measurement_dict包括x,y,PhotoId
    # 注意此处的PhotoId要与输入图片的顺序相对应
    for tie_point_list in tie_points_list:  # 一个连接点有多个measurement
        user_tie_point = ccmasterkernel.UserTiePoint()
        for tie_point_per_img in tie_point_list:
            measurement = ccmasterkernel.Measurement()
            measurement.imagePosition = ccmasterkernel.Point2d(tie_point_per_img['x'], tie_point_per_img['y'])
            measurement.photoId = tie_point_per_img['PhotoId']
            user_tie_point.addMeasurement(measurement)
        user_tie_points.addUserTiePoint(user_tie_point)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值