Help Center> Huawei HiLens> Developer Guide> Output Module> Outputting a Frame of Image
Updated on 2022-02-22 GMT+08:00

Outputting a Frame of Image

This API is used to display an image. When this API is called for the first time, the Display module sets the video size based on the size of the input images. In subsequent calling operations, the skill must ensure that the size of the input images is the same as that of the original images. The images to be displayed must be in NV21 format. Note that HDMI supports only one output channel and the width and height of the output image must be greater than or equal to 128. Otherwise, the output fails.

  • API calling

    hilens.Display.show(frame)

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Type

    Description

    frame

    Yes

    <class 'numpy.ndarray'> type

    Image to be displayed. The image must be in NV21 format.

  • Return value

    If the operation is successful, 0 is returned. Otherwise, the operation fails.