hi_mpi_vpc_batch_crop_resize_make_border
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
☓ |
Function Description
Extended API of hi_mpi_vpc_crop_resize_make_border, which supports the batch processing mode. Crops one or more ROIs from each source image, resizes the cropped images, pastes the resized images to each output canvas, and creates borders around the paste ROIs. This API is asynchronous.
Prototype
hi_s32 hi_mpi_vpc_batch_crop_resize_make_border(hi_vpc_chn chn, const hi_vpc_pic_info *source_pic[], hi_u32 pic_num, hi_vpc_crop_resize_border_region crop_resize_make_border_info[], hi_u32 count[], hi_u32 *task_id, hi_s32 milli_sec)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
chn |
Input |
Channel ID for image processing. Atlas 350 Accelerator Card: The value range is [0, 256). The maximum number of channels is 256. |
source_pic |
Input |
Pointer array of the source image information. |
pic_num |
Input |
Number of source images. Its length must be the same as that of the source_pic array and that of the count array. |
crop_resize_make_border_info |
Input |
Defines the cropping, resizing, and padding information. You need to set the buffer address of the destination image and the cropping, resizing, and padding information. The VPC stores the cropping, resizing, and padding results in the specified buffer address. Currently, only HI_BORDER_CONSTANT and HI_BORDER_REPLICATE are supported. The maximum resolution is 4096 x 4096. |
count |
Input |
Number of cropped, resized, and padded images. The sum of element values in the count array is equal to the length of the crop_resize_make_border_info array. The sum of element values in the count array must be in the range of [1, 256]. |
task_id |
Output |
Pointer to the task ID, which is used to identify a task. |
milli_sec |
Input |
Timeout interval (ms).
|
Returns
- 0: success
- Other values: failure. For details, see VPC Return Codes.
Restrictions
Model |
Restriction |
|---|---|
|
|
Atlas 350 Accelerator Card |
|