Overview
This section describes the functions, API calling processes, and sample code of image/video/audio data processing.
Typical Functions
The following table describes the functions. For details about the functions of different media data processing versions supported by each product model, see Functions Supported by Each Product Model. AIPP is supported by all versions.
Typical Scenarios
The resolution and format of the source image or video can be processed to meet the model requirements. The following is an example of a typical scenario.
- Video decoding and resizing
The input video is in H.264 encoding format and the resolution is 1920 x 1080. However, the YOLOv3 model for object detection requires an RGB or YUV input image with the resolution of 416 x 416. In this case, you can process the video as follows.
Figure 2 Video decoding and resizing
- Image decoding, resizing, and format conversion
The input image is in JPEG encoding format and the resolution is 1280 x 720. However, the ResNet-50 model for image classification requires an RGB input image with the resolution of 224 x 224. In this case, you can process the image as follows.
Figure 3 Image decoding, resizing, and format conversion
- Image cropping, resizing, and format conversion
The input image is in YUV420SP format and the resolution is 1280 x 720. However, the ResNet-50 model for image classification requires an RGB input image with the resolution of 224 x 224. In this case, you can process the image as follows.
Figure 4 Image cropping, resizing, and format conversion