hi_filter_2d_config

Description

2D convolutional filtering parameter.

Prototype

hi_filter_2d_config = {"filter": [h][w],
                       "kernel_size": hi_size,
                       "anchor": hi_point,
                       "delta": delta,
                       "border_type": hi_vpc_bord_type,
                       "scalar_value": hi_vpc_scalar,
                       "reserved": [2]}

Members

Member

Description

filter

List, user-defined convolution kernel.

It is a list with w columns and h rows. w and h correspond to the width and height attributes in the kernel_size attribute dictionary, respectively.

For example, [[1,2,3]] is a list with three columns and one row, and w and h are 3 and 1, respectively.

kernel_size

Dictionary, size of the convolution kernel. The width and height of kernel_size can only be set to 1, 3, or 5.

anchor

Dictionary, convolution kernel anchor, which needs to be set to (–1, –1). This field is reserved.

delta

Int, incremental value, which is added to each pixel value after convolution.

border_type

Int, border making type. Only the HI_BORDER_CONSTANT and HI_BORDER_REPLICATE modes are supported.

scalar_value

Dictionary, border making value.

reserved[2]

List, reserved. Do not explicitly access the reserved field in the code.