vpc_pyrdown
Applicability
Product |
Supported (√/x) |
|---|---|
x |
|
x |
|
x |
|
√ |
|
x |
Function Usage
Downsamples an image using a pyramid. Only YUV400 format images are supported. This API is asynchronous.
Prototype
- C Prototype
1hi_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
1task_id, ret = acl.himpi.vpc_pyrdown(chn, source_pic, dest_pic, filter_level, gaussian_filter, divisor, make_border_info, milli_sec)
Parameter Description
Parameter |
Description |
|---|---|
chn |
Int, channel ID for image processing. |
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 |
List, 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, information about border making. 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, in milliseconds.
|
Return Value Description
Return Value |
Description |
|---|---|
ret |
Int, error code.
|
task_id |
Int, task ID, used to identify a task. |