Halcon算子之scale_image_range

Halcon算子之scale_image_range

read_image (Image, 'fabrik')
scale_image_range (Image, ImageScaled, [100,50], [200,250])
* 将灰度值[-0.4,0.4]映射到[50,200]
scale_image_range(Grady,CurvatureRowScale,[-0.4,50],[0.4,200])

解释实例

read_image (Image, '../test.png')

rgb1_to_gray (Image, GrayImage)

get_domain (GrayImage, Domain)

get_region_points (Domain, Rows, Columns)

get_grayval (GrayImage, Rows, Columns, Grayval)

scale_image_range (GrayImage, ImageScaled, 100, 200)

get_grayval (ImageScaled, Rows, Columns, Grayval2)




简短描述

scale_image_range — Scale the gray values of an image from the interval [Min,Max] to [0,255]

签名

scale_image_range(Image : ImageScaled : Min, Max : )

描述

Convenience procedure to scale the gray values of the input image Image from the interval [Min,Max] to the interval [0,255] (default).
Gray values < 0 or > 255 (after scaling) are clipped.
If the image shall be scaled to an interval different from [0,255], this can be achieved by passing tuples with 2 values [From, To] as Min and Max.
Example:
scale_image_range (Image, ImageScaled, [100,50], [200,250])
maps the gray values of Image from the interval [100,200] to [50,250].
All other gray values will be clipped.

参数

Image (input_object)  (multichannel-)image(-array)object (byte / int1 / int2 / uint2 / int4 / int8 / real / cyclic / direction / complex)
The input image to be scaled
ImageScaled (output_object)  (multichannel-)image(-array)object (byte / int1 / int2 / uint2 / int4 / int8 / real / cyclic / direction / complex)
The scaled output image
Min (input_control)  number-array → (integer / real)
The minimum gray value which will be mapped to 0. If a tuple with two values is given, the first value will be mapped to the second value.
Default Value: 100
Max (input_control)  number(-array)(integer / real)
The maximum gray value which will be mapped to 255. If a tuple with two values is given, the first value will be mapped to the second value.
Default Value: 200
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
set_origin_pose是Halcon中用来设置相机姿态的算子之一。在机器视觉领域,相机姿态是指相机在三维世界中的位置和方向,是进行立体视觉及三维重建等操作的基石之一。相机姿态的描述主要有两种方法:欧拉角和四元数。 在Halcon中,set_origin_pose算子所设置的相机姿态采用的是欧拉角的方式进行描述。其参数有六个,分别为x、y、z方向上的旋转角度和相机的平移向量(tx、ty、tz),这六个参数可以通过平移向量和旋转角度来描述相机在三维世界坐标系中的位置和方向。set_origin_pose算子可用于将相机从一个位置移到另一个位置,以及旋转相机的方向。 使用set_origin_pose算子需要先获取当前相机姿态,然后设置新的姿态。一般情况下,获取当前相机姿态使用的是get_cam_param算子,该算子返回相机的内外参数,包括焦距、畸变系数、旋转角度及平移向量等。根据当前姿态和设置的姿态,可以确定相机需要旋转的角度和平移的距离,最终将相机移动到新的位置和方向。 set_origin_pose算子主要用于相机标定、三维重建、机器人导航等方面。通过调整相机的姿态,可以使图像对应于不同位置和方向的三维场景,实现更精确的视觉测量和准确定位。在实际应用中,需要结合其他算子,如gen_cam_proj_matrix2算子、hom_mat3d_to_pose算子等,才能完成更复杂的相机姿态设置和获取任务。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值