当前位置:网站首页>Halcon知识:binocular_disparity 知识
Halcon知识:binocular_disparity 知识
2022-06-23 03:49: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模型表写入文件。
边栏推荐
- 怎么用好MySQL索引
- After Huawei online battle service players quickly match, different players receive different lists of players in the same room
- 炫酷鼠标跟随动画js插件5种
- 摆烂LuoGu刷题记
- PTA:7-37 学号解析
- PTA:6-29 虚基类的应用-人与教师学生
- 无线网络安全的12个优秀实践
- Leetcode 1208. 尽可能使字符串相等(终于解决,晚安)
- 语料库数据处理个案实例(词性赋码、词性还原)
- Compilation, installation and global configuration section description of haproxy
猜你喜欢
![[multimode] unimo](/img/a5/a857e20e1432ef3623527c8655a49a.png)
[multimode] unimo

【二叉树进阶】AVLTree - 平衡二叉搜索树

【一起上水硕系列】Day Three - preview4

Flutter series: wrap in flutter

Pytorch---使用Pytorch的预训练模型实现四种天气分类问题

会话和守护进程

移动端城市列表排序js插件vercitylist.js

Avltree - arbre de recherche binaire équilibré

Implementation of VGA protocol based on FPGA

JD cloud distributed database stardb won the "stability practice pioneer" of China Academy of information technology
随机推荐
PTA: Simulation Implementation of 7-87 set (class template)
浅析2022年物联网现状
Static lookup tables and static lookup tables
LabVIEW在同一表中同时显示十六进制字符和普通字符
Prince language on insect date class
12 excellent practices of wireless network security
什么是元数据
麦肯锡:2021年量子计算市场投资增长强劲,人才缺口扩大
Introduction to deep learning
2022年烷基化工艺考题及模拟考试
Latest programming language rankings
Zhongang Mining: the demand for fluorite in the new energy and new material industry chain has increased greatly
Audio and video development journey (63) - animation and rendering of Lottie source code analysis
静态查找表和静态查找表
Cool mouse following animation JS plug-ins 5
PTA:7-58 图书音像出租管理
在 KubeSphere 上部署 Apache Pulsar
JVM调优简要思想及简单案例-为什么需要JVM调优?
Twitter与Shopify合作 将商家产品引入Twitter购物当中
Software development in 2022: five realities CIOs should know