Operator Library: Base
CONST 算子在输出端提供一个固定值。 所有输入值都会被丢弃,并由该常量替代。 该常量可以通过参数 Value 进行定义。 它可以是静态值,也可以是动态值。 因此,该值可以在运行时进行更改。
请注意,对于诸如 RGB 等多通道分量格式,常量值是针对整个像素定义为一个单一值, 而不是针对单个分量定义。
Example: Output link RGB 24bit, constant value is set to 11862494 (0xB501DE). The output components will then be set to the following const values: R = 222 (0xDE), G = 01 (0x01) and B = 181 (0xB5). The constant concatenates the component values to a single value. The component 0 is placed in LSB area and the highest component in MSB area, i.e. for RGB, the constant value is {B-G-R}. Value = {component N-1, ..., component 0}, with N being the number of the components.
| 值 | |
|---|---|
| 键入 | 静态/动态读写参数 |
| 默认 | 0 |
| 范围 | 取决于输出链接的 Arithmetic 和 Bit Width |
|
此参数定义输出链接处的值。 如果该参数设为 Static,则该值在设计时选定。 如果该参数设为 Dynamic,则可以在运行时更改该值。 |
|
以下示例展示了 CONST 算子的用法:
-
局部自适应阈值二值化示例。 使用了 8×8 像素的 Kernel Size。
-
示例 - 展示了如何垂直镜像图像。 请注意并行字和像素的镜像。
-
示例 - 一个 High Speed 且稳健的激光线检测算法。 该算法可确定重心坐标,从而获得亚像素分辨率的结果。





上一页

