当前位置:网站首页>Halcon知识:binocular_disparity 知识
Halcon知识:binocular_disparity 知识
2022-06-23 11:52:00 【无水先生】
一、提要
binocular_disparity 功能:通过互相关系来计算两个图形的双目视觉差,或为:binocular_disparity 使用相关技术计算两个校正图像之间的像素级对应关系。与binocular_distance 不同,结果不会转换为距离值。
二、算子解释
binocular_disparity(ImageRect1, ImageRect2 : Disparity, Score : Method, MaskWidth, MaskHeight, TextureThresh, MinDisparity, MaxDisparity, NumLevels, ScoreThresh, Filter, SubDisparity : )

输入数据:
输入图像:
- ImageRect1 左图
- ImageRect2 右图
输入控制量:
- Method, 有三个选项 'ncc', 'sad', 'ssd'
- MaskWidth, 计算相关的窗口大小:5, 7, 9, 11, 21
- MaskHeight, 计算相关的窗口大小:5, 7, 9, 11, 21
- TextureThresh, 纹理图像区域的方差阈值。
- MinDisparity, 预期差异的最小值。
- MaxDisparity, 预期差异的最大值。
- NumLevels, 金字塔级别的数量
- ScoreThresh, 相关函数的阈值
- Filter, 下游过滤器 'left_right_check', 'none'
- SubDisparity 视差的亚像素插值:'interpolation', 'none'
三、必要条件
该算法需要一个参考图像 ImageRect1 和一个搜索图像 ImageRect2,它们必须被校正,即对应的核线是平行的并且位于相同的图像行上 ()。如果违反此假设,则可以使用运算符 calibrate_cameras、gen_binocular_rectification_map 和 map_image 校正图像。
因此,给定参考图像 ImageRect1 中的像素,通过沿 ImageRect2 中的相应行搜索并匹配大小为 MaskWidth 和 MaskHeight 的矩形窗口内的局部邻域来选择 ImageRect2 中的同源像素。像素对应关系在单通道视差图像中返回,该图像根据公式为参考图像 ImageRect1 的每个像素 (r1,c1) 指定 ImageRect2 的合适匹配像素 (r2,c2)。每个视差值的质量度量在 Score 中返回,包含参考像素的匹配函数 S 的最佳结果。对于匹配,使用原始未处理图像的灰度值。
四、代码示例
* Set internal and external stereo parameters.
* Note that, typically, these values are the result of a prior
* calibration.
gen_cam_par_area_scan_division (0.01, -665, 5.2e-006, 5.2e-006, \
622, 517, 1280, 1024, CamParam1)
gen_cam_par_area_scan_division (0.01, -731, 5.2e-006, 5.2e-006, \
654, 519, 1280, 1024, CamParam2)
create_pose (0.1535,-0.0037,0.0447,0.17,319.84,359.89, \
'Rp+T', 'gba', 'point', RelPose)
* Compute the mapping for rectified images.
gen_binocular_rectification_map (Map1, Map2, CamParam1, CamParam2, RelPose, \
1, 'viewing_direction', 'bilinear', CamParamRect1,CamParamRect2, Cam1PoseRect1, \
Cam2PoseRect2,RelPoseRect)
* Compute the disparities in online images.
while (1)
grab_image_async (Image1, AcqHandle1, -1)
map_image (Image1, Map1, ImageRect1)
grab_image_async (Image2, AcqHandle2, -1)
map_image (Image2, Map2, ImageRect2)
binocular_disparity(ImageRect1, ImageRect2, Disparity, Score, 'sad', \
11, 11, 20, -40, 20, 2, 25, 'left_right_check','interpolation')
endwhile五、附录:3d重构的算子
binocular_disparity_mg
功能:通过多格子方法来计算两个图形的双目视觉差。
binocular_disparity_ms
功能:利用多扫描线优化方法计算校正后的立体图像对的视差。
binocular_distance
功能:通过互相关系来计算两个立体图形的双目视觉差。
binocular_distance_mg
功能:通过多格子方法来计算两个立体图形的双目视觉差。
binocular_distance_ms
功能:使用多扫描线优化计算校正立体图像对的距离值。
disparity_image_to_xyz
功能:吧一个观影距离转换为一个被矫正的3D立体点。
disparity_to_distance
功能:将影视距离转换矫正双目视觉立体系统中的间隔值。
disparity_to_point_3d
功能:将一个图像点和观影距离转换为一个矫正立体系统中的三维点。
distance_to_disparity
功能:将一个间隔值转换为一个矫正立体系统中的观影距离。
essential_to_fundamental_matrix
功能:计算一个从原始矩阵衍生而来的基本矩阵。
gen_binocular_proj_rectification
功能:计算弱双目视觉立体系统图像的投射矫正值。
gen_binocular_rectification_map_
功能:创建传输图,其描述从一个双目相机到一个普通的矫正图像面的图像的映射。
intersect_lines_of_sight
功能:从一个双目相机系统视觉中两条线的交点中获取一个三维点。
match_essential_matrix_ransack
功能:通过自动发掘图像点间对应关系来计算立体图像对的原始(本质)矩阵。
match_fundamental_matrix_distortion_ransac
功能:通过自动寻找图像点之间的对应关系,计算一对立体图像的基本矩阵和径向畸变系数。
match_fundamental_matrix_ransack
功能:通过自动发掘图像点间对应关系来计算立体图像对的基本矩阵。
match_rel_pose_ransack
功能:通过自动发掘图像点间对应关系来计算两个相机间的相对方位。
reconst3d_from_fundamental_matrix
功能:计算基于基本矩阵的点的投影的三维重建。
rel_pose_to_fundamental_matrix
功能:计算两个相机相关方向中获取的基本矩阵。
vector_to_essential_matrix
功能:计算给定图像点间映射和已知相机矩阵的原始矩阵,重建三维点。
vector_to_fundamental_matrix
功能:计算给定图像点间映射的集合的基本矩阵,重建三维点。
vector_to_fundamental_matrix_distortion
功能:给出一组图像点对应关系,计算基本矩阵和径向畸变系数,重建三维点。
vector_to_rel_pose
功能:计算给定图像点对应关系和已知相机参数的两相机相对方位,重建三维点。
- Depth From Focus焦点深度
depth_from_focus
功能:利用多倍聚焦灰度级提取高度(厚度)。
select_grayvalues_from_channels
功能:利用索引图像选择一个多通道图像的灰度值。
- Multi View Stereo多视角立体模型
clear_stereo_model
功能:清除指定多视角立体模型,释放内存空间。
create_stereo_model
功能:创建一个多视角立体模型。
get_stereo_model_image_pairs
功能:返回在立体模型中设置的图像对列表。
get_stereo_model_object
功能:获取立体重建的中间结果(图标)。
get_stereo_model_object_model_3d
功能:获取立体重建的中间三维对象模型
get_stereo_model_param
功能:提取多视角立体模型参数。
reconstruct_points_stereo
功能:重建多视角立体3D参考点。
reconstruct_surface_stereo
功能:重建多视角3D曲面。
set_stereo_model_image_pairs
功能:指定双目(成对)图像的表面立体重建。
set_stereo_model_param
功能:设置多视角立体模型参数。
- Photometric Stereo估测光源
estimate_al_am
功能:估测一个平面的反射率和反射光的数目。
estimate_sl_al_lr
功能:估测一个光源的倾斜度和一个平面的反射率。
estimate_sl_al_zc
功能:估测一个光源的倾斜度和一个平面的反射率。
estimate_tilt_lr
功能:估测一个光源的倾斜。
estimate_tilt_zc
功能:估测一个光源的倾斜。
photometric_stereo
功能:根据光度立体技术重建曲面。
reconstruct_height_field_from_gradient
功能:从曲面渐变重建曲面。
sfs_mod_lr
功能:从一个灰度值图像重建一个平面。
sfs_orig_lr
功能:从一个灰度值图像重建一个平面。
sfs_pentland
功能:从一个灰度值图像重建一个平面。
shade_height_field
功能:重建一个表面灰色突起的图像。
uncalibrated_photometric_stereo
功能:从几个不同照明的图像重建一个表面。
- Sheet of Light片光
apply_sheet_of_light_calibration
功能:应用校准变换到不一致的图像。
calibrate_sheet_of_light
功能:使用3D校准对象校准sheet-of-light设置表。
clear_sheet_of_light_model
功能:清除指定片光模型,释放内存空间。
create_sheet_of_light_calib_object
功能:为光校准工作表创建校准对象。
create_sheet_of_light_model
功能:创建一个基于3D测量的片光模型。
deserialize_sheet_of_light_model
功能:反序列化sheet-of-light model。
get_sheet_of_light_param
功能:提取片光模型的参数。
get_sheet_of_light_result
功能:提取一个通过片光技术获得的测量结果(图标)。
get_sheet_of_light_result_object_model_3d
能:提取一个通过片光技术获得的3D对象模型测量结果。
measure_profile_sheet_of_light
功能:对输入和存储的轮廓图像进行片光技术处理。
query_sheet_of_light_params
功能:对于给定的sheet-of-light model,获取可用于不同灯光操作器的通用图标或控制参数的名称。
read_sheet_of_light_model
功能:从文件中读取sheet-of-light 模型,然后创建一个新模型。
reset_sheet_of_light_model.
功能:重置sheet-of-light 模型。
serialize_sheet_of_light_model
功能:序列化sheet-of-light模型。
set_profile_sheet_of_light
功能:通过测量的视差设置sheet-of-light轮廓。
set_sheet_of_light_param
功能:设置片光模型对应的参数。
write_sheet_of_light_model
功能:将sheet-of-light模型表写入文件。
边栏推荐
- Openharmony application development [01]
- 六维图剖析:中国建筑集团有限公司企业成长性分析
- tensorflow2的GradientTape求梯度
- 利用XtraDiagram.DiagramControl进行流程图形的绘制和控制
- 2022施工员-装饰方向-岗位技能(施工员)操作证考试题库模拟考试平台操作
- 2022工具钳工(初级)考试练习题模拟考试平台操作
- Signature analysis of app x-zse-96 in a Q & a community
- 華為雲如何實現實時音視頻全球低時延網絡架構
- 汉源高科新一代绿色节能以太网接入工业交换机高效节能型千兆工业以太网交换机
- Redis 入门-第四篇-数据结构与对象-跳跃表
猜你喜欢

Redis 入门-第一篇-数据结构与对象-简单动态字符串(SDS)

得物多活架构设计之路由服务设计

Use monotone stack to solve problems

OpenHarmony应用开发【01】

HMS Core 视频编辑服务开放模板能力,助力用户一键Get同款酷炫视频

2022年全国最新消防设施操作员(初级消防设施操作员)模拟题及答案

Leetcode 1209. Delete all adjacent duplicates II in the string

并购增资或将有望启动东软越通新动能?

Go 语言使用 MySQL 的常见故障分析和应对方法

蓝桥杯单片机(一)——关闭外设及熄灭LED
随机推荐
使用单调栈解题
使用Mycat进行MySQL单库分表
Simulation questions and answers of the latest national fire-fighting facility operators (primary fire-fighting facility operators) in 2022
2022工具钳工(初级)考试练习题模拟考试平台操作
record
@黑马粉丝,这份「高温补贴」你还没领?
请问,maxcompute执行sql查询有时特别慢是什么原因
Mysql, how to calculate the maximum value using stored procedures
Leetcode 1209. 删除字符串中的所有相邻重复项 II(牛逼,终于过了)
请问连接oracle时,这个version 1.54 是什么的version?
想学习eTS开发?教你开发一款IQ-EQ测试应用
Invalid Navicat scheduled task
理财产品的赎回时间有规定吗?
Does the inductance have polarity?
[comprehensive written test questions] 30 Concatenate substrings of all words
Deep analysis and Simulation of list
64路PCM电话光端机64路电话+2路百兆以太网电话光端机64路电话PCM语音光端机
wc 统计已过时,cloc 每一行代码都有效
Signature analysis of app x-zse-96 in a Q & a community
go-zero微服务实战系列(六、缓存一致性保证)