Skip to main content
MSale
Associate III
November 7, 2019
Question

I interfaced Camera to the STM 32f746G . i used pixelData widget to show the camera feed and created GUI above it. the problem is that i have tearing when i am using GUI on top of the pixel widget. I think its synchronization problem

  • November 7, 2019
  • 6 replies
  • 3286 views

..

This topic has been closed for replies.

6 replies

Martin KJELDSEN
Principal III
November 7, 2019

You need to sync your frames with TouchGFX. The camera is maybe producing frames at a different rate, and you could be displaying the current screen while you're transferring data from the camera to the memory area of the pixel data widget.

/Martin

MSale
MSaleAuthor
Associate III
November 7, 2019

@Martin KJELDSEN​ 

The frame rate from the camera is 30 fps. Is there an application note how to synchronize the TouchGFX rate with the camera frame rate?

Martin KJELDSEN
Principal III
November 8, 2019

Hi @Community member​,

I'm affraid not. It's a very application specific issue. Can you confirm this is what's happening?

What you need to do is to protect the memory area defined for the pixel data widget using a semaphore unless you implement some other layer where the pixel data widget can get the next available frame (there may be multiple frames queued up). If you sync with TouchGFX your farmerate will most likely drop because the application won't run as fast as your camera is producing frames - Especially with additional gui on top.

This is where a second layer would come in handy - It's not something we support, officially, but it would be incredibly powerful to configure an additional layer to show output from a camera, and then a layer to show the TouchGFX gui application.

/Martin

MSale
MSaleAuthor
Associate III
November 11, 2019

Hi @Martin KJELDSEN​ 

Thanks for the information. i tried with the 2 layers but i have problem . when i put the camera frame buffer in layer 1 and GUI in layer 2 the camera freeze. when i change the order its working fine but the GUI widgets are very transparent. Do you think its related to external SDRAM?

Regards

Mahmoud

MSale
MSaleAuthor
Associate III
January 9, 2020

@Martin KJELDSEN​ 

The camera totally dissapear after executing touchgfx::HAL::getInstance()->taskEntry(); but this happen when the camera at 1st layer and touchgfx on second. also the live video is running well before starting the touchgx task vut once it start its gone and only the gui visible.

the frame of the camera is 261120.

i think the layer does not updating but for what reason thats i dont know yet.

the strange thing its running when i reverse the layer locations

Thanks in adcvance

Regards

Mahmoud

MSale
MSaleAuthor
Associate III
January 9, 2020

@Martin KJELDSEN​ 

Camera frame is 480*272*2 and its located at the 0xc0000000

touchgfx frame is at 0xc0400000

MSale
MSaleAuthor
Associate III
January 13, 2020

@Martin KJELDSEN​ 

Hi Martin,

I solved the problem and its working fine now bottom layer live video at 30fps without tearing and top layer the gui. thanks for your help really appreciated it.

Regards

Mahmoud

Martin KJELDSEN
Principal III
January 14, 2020

Glad to hear that. How did you end up solving it?

/Martin

MSale
MSaleAuthor
Associate III
January 14, 2020

@Martin KJELDSEN​ 

I made touchgfx update the 2 layers instead of 1.

i have another issue which is that i want to display the live video with alpha = 255 but for the widgets its not possible because it will override the live video. is there way to not blend the whole top layer, only the widgets

Kli.1
Associate
September 10, 2020

can I ask how to config 2 layer LTDC by useing CUBEMX for TOUCHGFX? CUBEMX warning me touchgfx can‘t use 2 layer config