Skip to main content
Visitor II
July 3, 2024
Solved

Reducing image format conversion time on STM32MP13 devices

  • July 3, 2024
  • 2 replies
  • 1496 views

Hello all,

I'm using STM32MP135F-DK, taking picture with GC2145 camera and converting 1600x1200 raw image to png/jpeg formats to use later. I'm doing these according to the document at below link:

https://wiki.st.com/stm32mpu/wiki/STM32MP13_V4L2_camera_overview

I calculated how much time spent for below script:

##### 2 MP Setup

media-ctl -d /dev/media0 --set-v4l2 "'gc2145 1-003c':0[fmt:RGB565_2X8_BE/1600x1200@1/20 field:none]" 

media-ctl -d /dev/media0 --set-v4l2 "'gc2145 1-003c':0[fmt:RGB565_2X8_BE/1600x1200@1/20 field:none]" 

media-ctl -d /dev/media0 --set-v4l2 "'dcmipp_parallel':0[fmt:RGB565_2X8_BE/1600x1200]" 

media-ctl -d /dev/media0 --set-v4l2 "'dcmipp_parallel':1[fmt:RGB565_2X8_LE/1600x1200]" 

media-ctl -d /dev/media0 --set-v4l2 "'dcmipp_dump_postproc':0[fmt:RGB565_2X8_LE/1600x1200]" 



##### 2 MP Capture

v4l2-ctl --set-fmt-video=width=1600,height=1200,pixelformat=RGBP --stream-mmap --stream-count=1 --stream-to=grab-1600x1200-rgb565.raw 



##### 2 MP Convert

gst-launch-1.0 filesrc location= grab-1600x1200-rgb565.raw blocksize=3840000 ! "video/x-raw, format=(string)RGB16, width=(int)1600, height=(int)1200, framerate=(fraction)20/1" ! videoconvert ! pngenc ! filesink location=grab-1600x1200-rgb565_ex1.png

And the results are:

alpka_2-1719997562193.png

These results are too much for me. I saw that too much time spent especially on convert section.

I know that decreasing resolution might be one of the solutions, but is there any other suggestions to reduce that time?

    This topic has been closed for replies.
    Best answer by Erwan SZYMANSKI

    Hello @alpka ,
    Unfortunatly, no we have no other recommendation. The Galcore camera is the one we embed by default on STM32MP13 now and that is tested by ST, but we have no equivalent of the OV5640 on our side to propose. It will be up to you to chose a one that will reach your requirements. 

    Kind regards,
    Erwan.

    2 replies

    ST Employee
    July 3, 2024

    Hi alpka

     

    This post has been escalated to the ST Online Support Team for additional assistance.  We'll contact you directly.

    Kind Regards

    Joe

    STMicro Support

    Technical Moderator
    July 5, 2024

    Hello @alpka ,
    Please find out the outcomes from the expert who took a look at your issue :

    I hope it will help you yo go forward,
    Kind regards,
    Erwan.

    alpkaAuthor
    Visitor II
    July 5, 2024

    Hi Erwan,

    Yes I tried the JPEG, and the JPEG conversion is faster than PNG. I will also check other suggestions.

    As far as I know, OV5640 can directly take JPEG images but it's a end of life product. Do you have any other 5 MP camera suggestions?

    Thank you.

     

     

    Technical Moderator
    July 8, 2024

    Hello @alpka ,
    Unfortunatly, no we have no other recommendation. The Galcore camera is the one we embed by default on STM32MP13 now and that is tested by ST, but we have no equivalent of the OV5640 on our side to propose. It will be up to you to chose a one that will reach your requirements. 

    Kind regards,
    Erwan.