Changing the Image Size
This API is used to change the size of an image.
- API calling
hilens.Preprocessor.resize(src, w, h, t)
- Parameter description
Table 1 Parameters Parameter
Mandatory
Type
Description
src
Yes
<class'numpy.ndarray'> object
Source image, which must be in the NV21 format. Width range: [64, 1920], a multiple of 2; Height range: [64, 1080], a multiple of 2.
w
Yes
Positive integer
Width of the image after zoom-in/out. Value range: [64, 1920], a multiple of 2.
h
Yes
Positive integer
Height of the image after zoom-in/out. Value range: [64, 1080], a multiple of 2.
t
Yes
Integer 0 or 1
Format of the target image. The value 0 indicates NV21, and value 1 indicates NV12.
- Return value
If the resize operation is successful, the resized image is returned, which is a <class'numpy.ndarray'> object.
If the resize operation fails, "ValueError" is reported.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot