hi_vpc_crop_resize_border_region

Function

Defines the VPC cropping, resizing, and border making information.

Definition

typedef struct {
    hi_vpc_pic_info dest_pic_info;
    hi_vpc_crop_region crop_region;
    hi_vpc_resize_info resize_info;
    hi_u32 dest_top_offset;
    hi_u32 dest_left_offset;
    hi_vpc_bord_type border_type;
    hi_vpc_scalar scalar_value;
} hi_vpc_crop_resize_border_region;

For details about basic data type hi_u32, see Basic Data Types.

Members

Member

Description

dest_pic_info

Information about the destination image. For details, see hi_vpc_pic_info.

crop_region

Information about the crop ROI. For details, see hi_vpc_crop_region.

resize_info

Image cropping and resizing information. For details, see hi_vpc_resize_info.

dest_top_offset

Top offset of the paste ROI on the destination image.

dest_left_offset

Left offset of the paste ROI on the destination image.

border_type

Border type. For details, see hi_vpc_bord_type.

scalar_value

Border color. Valid only when the border type is HI_BORDER_CONSTANT. For details, see hi_vpc_scalar.

The values of the color components (RGB or YUV) can be user-defined in sequence.

If both the input and output are in YUV format, the YUV component values are used. Otherwise, the RGB component values are used.

Precautions

By default, the cropped image is converted into the format of the destination image before it is resized and padded to the size of the destination image.