当前位置:网站首页>Halcon 3D 深度图转换为3D图像

Halcon 3D 深度图转换为3D图像

2022-06-12 05:30:00 Σίσυφος1900

一、简介

halcon学习之阈值分割(threshold、binary_threshold、dyn_threshold、var_threshold、auto_threshold、fast_threshold、)_zsffuture的博客-CSDN博客_fast_threshold算子


深度图转点云原理 - horsetail - 博客园

深度图像和 3D 点云互转只涉及相机内参矩阵,其中

  • fx,fy 分别为镜头 x,y 方向的焦距(成像平面到镜头的距离)
  • cx,cy 分别是光心(镜头中心点在成像平面的投影)在图像坐标系(原点位于图像左上角,水平为 x,垂直为 y)下的坐标。

 

二、算子介绍

1、阈值分割

auto_threshold (AerialImage, Regions, 5)
* auto_threshold(Image : Regions : Sigma : )
*根据直方图确定阈值自动全局阈值分割,运行原理,第一,计算灰度直方图。第二,高斯平滑后从直方图提取最小值。第三,根据提取的最小值进行阈值分割。sigma越大提取区域越少。

2、图像转换

*将分割后区域转换为标签图像。
region_to_label (Regions, LabelImage, 'byte', Width, Height)
* region_to_label根据它们的索引(1..n)将输入区域转换成标签图像,即,第一区域被绘成灰度值1,第二区域被绘成灰度值2等。仅使用正灰度值。
第三个参数 :  * 对于'byte'图像,索引以取256的模输入。默认是int2
*Width (input_control)要生成的图像的宽度
*Height (input_control) 要生成的图像的高度

3、 使用多项式将创建倾斜的灰色曲面 

gen_image_surface_first_order (X, 'real', 0, xishu, 0,  0, 0, Width, Height)
gen_image_surface_first_order (Y, 'real', -xishu, 0, 0, 0, 0, Width, Height)
*  使用一阶多项式创建倾斜的灰色曲面。 (输出图像,类型,垂直方向的参数,水平方向的参数,0阶参数,参考点的行坐标,列坐标,图像的宽高)。

* ImageSurface(r,c) = Alpha(r - Row) +Beta(c - Column) +Gamma
*gen_image_surface_first_order( : ImageSurface : Type, Alpha, Beta, Gamma, Row, Column, Width, Height : )
*ImageSurface (output_object) 新创建的图像矩阵。
*Type (input_control)像素类型  'byte'
*Alpha (input_control) 垂直方向的一阶系数
*Beta (input_control)水平方向上的一阶系数
*Gamma (input_control) 零阶系数
*Row (input_control)曲面参考点的行坐标
*Column (input_control)曲面参考点的列坐标
*Width (input_control) 图像宽度
*Height (input_control)  图像高度

原网站

版权声明
本文为[Σίσυφος1900]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_39354845/article/details/125209372