This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: How to get the cropped image

Part Number: TDA4VM


Hello there:

   We are working on the TDA4VM.

   I want to get the cropped image.

   Now , We have already displayed the cropped image on our screen through the DP port.

   But , we want to get the finally displayed image.

   Is there any solution?

Thanks a lot  !

  • Hi Wang,

    Sorry, did not get your question. do you want to display cropped image or full image? 

    Regards,

    Brijesh

  • Hi , I want to get the real display image.(After cropping)

    It is easy to get the full image.

    The cropped image has already displayed on the screen.

    And I want to operate the cropped image in the other tiovx node.

    Thanks a lot  !

  • Hi,

    I am still confused. May be, can you draw diagram and show what exactly you are looking for? 

    Regards,

    Brijesh

  • The cropped image is already displayed on the screen.

    I want to get the cropped image ( 1280 *720) to the ohter node.

    Regards

  • So you mean you want to crop and then upscale the image to full resolution? 

    This can only be done in the DSS M2M node. It cannot crop, but you could change input size and start offset to crop the image and then use inline scalar to upscale image to full resolution..

    Regards,

    Brijesh

  • Thanks Brijesh.

    Our real requirement is as below.

    At the runtime of the graph , we need to crop the 1080P image.

    And the size of the crop paramater is not the same all the time.

    Base on the demo , we could easily display the cropped image.

    But if we want to get the cropped image to the other node , how to realize it ?

    Thanks a lot !

  • Hi Wang Wang,

    And the size of the crop paramater is not the same all the time.

    But i guess the size of the cropped window will remain same, isn't it? Only the position will change. You will crop 1280x720 image from the input 1920x1080 image and then merge it in the display and split them in the serializer. 

    In this case, i would suggest modifying existing display node to move the start pointer in the buffer and thus supporting cropping..  You could refer to TIVX_DISPLAY_SET_CROP_PARAMS control command in the display node. It supports cropping by moving pointer in the buffer.. 

    Regards,

    Brijesh

  • Hi Brijesh Jadav:

    But i guess the size of the cropped window will remain same, isn't it?

    The size of cropped window won't remain the same. Sometimes it is bigger than 720p and sometimes it is smaller than 720p. When the cropped size is smaller than 720p, I think upscaler should be done in pipeline to support super frame and split in two 720p display. Is there any approach to do this?

  • Hi xiaogang liu,

    I think it is supported, essentially scalar output will remain same, but input will changes, isn't it?

    can you please try running this SET_CROP_PARAMS ioctl?

    Regards,

    Brijesh

  • Hi Brijesh Jadav:

    I have tried TIVX_VPAC_MSC_CMD_SET_CROP_PARAMS. I define the output image to be 720p. If the required cropped zone in input image is bigger than 720p, it is OK.

    But if the required cropped zone in input image is smaller than 720p, TIVX_VPAC_MSC_CMD_SET_CROP_PARAMS is not enough. We can not get an output image bigger than cropped image. So how to deal with this case?

  • Hi xiaogang liu,

    i dont see any reasons why downscaling works but upscaling does not. Are you see any errors from the display drivers? What input resolution and output resolution are not working? what is input format? 

    Regards,

    Brijesh

  • Hi Brijesh Jadav:

    I use the kernel as following. The input_img is cropped zone and dst_image is 720p output image. The cropped zone image resolution has to be bigger than output image so that the vxScaleImageNode can be running.Simply I think vxScaleImageNode cannot do upscaling.

    vxScaleImageNode(graph, input_img, dst_image, VX_INTERPOLATION_NEAREST_NEIGHBOR);

  • Hi xiaogang liu,

    vxScaleImageNode does not support upscaling.. I thought you were using inline scalar in the video pipeline of the display.. Can you remove vxScaleNode or use it only for downscaling and then for cropping and zooming operation, can you use inline scalar from video pipeline? 

    Regards,

    Brijesh

  • Hi Brijesh Jadav:

    We have the requirement of one DSI input for two output. Just as the ds90uh941as document description, the split of left and right video must contain identical video formats and parameters. I do not know how to use a upscale interface for getting a zooming image in video pipeline. Is the interface accessible from application? I just know how to use it for display in DSS module.

  • Hi xiaogang liu,

    This is definitely possible, you could use two video pipelines, merge the frames in the overlay manager and send as a single frame of size 2H x V from the DSI output. The rest of the splitting work is in UB941.

    Regards,

    Brijesh