acl.himpi.vpc_pyrdown
C Prototype |
hi_s32 hi_mpi_vpc_pyrdown(hi_vpc_chn chn, const hi_vpc_pic_info *source_pic, hi_vpc_pic_info dest_pic[], hi_u32 filter_level, hi_s8 gaussian_filter[][5], hi_u16 divisor, hi_vpc_make_border_info make_border_info, hi_u32 *task_id, hi_s32 milli_sec); |
|---|---|
Python Function |
task_id, ret = acl.himpi.vpc_pyrdown(chn, source_pic, dest_pic, filter_level, gaussian_filter, divisor, make_border_info, milli_sec) |
Function Usage |
Downsamples an image using a pyramid. Only YUV400 format images are supported. This API is asynchronous. The Atlas 200/300/500 Inference Product does not support this API in the current version. The Atlas Training Series Product does not support this API in the current version. |
Input Description |
chn: int, image processing channel ID. Atlas inference products: The value range of this parameter is [0, 256). The maximum number of channels is 256. source_pic: dict, input image information. For details, see hi_vpc_pic_info. Only YUV400 format images are supported. The allowed maximum resolution is 2048 x 2048. The allowed minimum resolution varies with filter_level as follows:
dest_pic: dict, target image information. For details, see hi_vpc_pic_info. The length of this array is the same as that of the filter_level parameter.
filter_level: int, number of layers in the pyramid. Must be in the range of [1, 4]. gaussian_filter: Gaussian filtering parameter. A 5 x 5 list needs to be passed. You can pass None to use the default value. For details, see the following.
gaussian_filter = [
[1, 4, 6, 4, 1],
[4, 16, 24, 16, 4],
[6, 24, 36, 24, 6],
[4, 16, 24, 16, 4],
[1, 4, 6, 4, 1]
]
divisor: int, a divisor of the filter. Must be a power of 2. make_border_info: dict, border paddidng information. For details, see hi_vpc_make_border_info. A border with a length of 2 pixels is created. The supported border types are HI_BORDER_CONSTANT, HI_BOARD_REPLICATE, and HI_BOARD_REFLECT. milli_sec: int, timeout interval (ms).
|
Return Value |
ret: int, error code.
task_id: int, task ID, used to identify a task. |