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.
| 值 | |
|---|---|
| 键入 | static/dynamic read/write parameter |
| 默认 | 0 |
| 范围 | 取决于输出连接的 arithmetic 和 Bit Width |
|
该参数定义输出连接处的值。 如果该参数设置为 Static,则在设计时选择该值。 如果该参数设置为 Dynamic,则可以在运行时更改该值。 |
|
以下示例展示了 CONST 算子的用法:
-
局部自适应阈值的二值化示例。 使用了 8x8 像素的卷积核大小。
-
示例 - 展示了如何垂直镜像图像。 请注意并行字和像素的镜像。
-
示例 - 一种 High Speed 且稳健的激光线检测算法。 该算法可确定重心坐标,以获得亚像素分辨率的结果。





上一页

