Operator CONST

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.

I/O Properties

Property Value
Operator Type O
Input Link I, data input
Output Link O, data output

Supported Link Format

Link Parameter Input Link I Output Link O
Bit Width [1, 64]1 [1, 63]2
Arithmetic {unsigned, signed} {unsigned, signed}
Parallelism any as I
Kernel Columns any any3
Kernel Rows any any4
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D, VALT_SIGNAL} as I
Color Format any any
Color Flavor any any
Max. Img Width any as I
Max. Img Height any as I

1

입력 Bit Width의 범위는 [1, 64]입니다. Signed 입력의 경우 범위는 [2, 64]입니다. Unsigned 컬러 입력의 경우 범위는 [3, 63]이며, Signed 컬러의 경우 범위는 [6, 63]입니다.

2

부호 없는 arithmetic의 출력 범위는 [1, 63]입니다. 부호 있는 출력의 경우 범위는 [2, 64]입니다. 부호 없는 컬러 출력의 경우 범위는 [3, 63]이며, 부호 있는 컬러의 경우 범위는 [6, 63]입니다.

3 4

모든 커널 컴포넌트에 동일한 const 값이 사용됩니다.

Parameters

Value
Type static/dynamic 읽기/쓰기 매개변수
Default 0
Range 출력 링크의 arithmetic 및 Bit Width에 따라 다릅니다.

이 파라미터는 출력 링크의 값을 정의합니다. 파라미터가 Static으로 설정된 경우, 값은 디자인 타임에 선택됩니다. 파라미터가 Dynamic인 경우, 런타임 중에 값을 변경할 수 있습니다.

사용 예제

CONST 연산자의 사용법은 다음 예시와 같습니다:

  • 'Adaptive Threshold'

    로컬 적응형 임계값 처리를 위한 이진화 예시입니다. 8x8 픽셀의 커널 크기가 사용됩니다.

  • 'Line Mirror'

    Examples - 이미지를 수직 방향으로 미러링하는 방법을 보여줍니다. 병렬 단어와 픽셀의 미러링에 유의하십시오.

  • '레이저 삼각측량'

    예시 - High Speed의 견고한 레이저 라인 감지 알고리즘입니다. 이 알고리즘은 서브픽셀 해상도 결과를 얻기 위해 무게 중심 좌표를 결정합니다.