About cpu usage


I’m using USB3.0_UC-425_Rev.C+UC-628_Rev.B+OV5647 on Ubuntu 18.04.

  1. It uses more than 100% cpu (out of 800% - 8 cores). Is this normal? How can I reduce cpu usage without fps drop and image size reduction?


  1. I put sleep into Capture thread to make it slow down and to reduce cpu usage. But It didn’t work and I got USB_DATA_LEN error. Can you explain what is wrong ?

Hi @yeongrok ,

Image format conversion and image display occupy most CPU resources.

If you comment out the conversion, display and key reading part of the code, the CPU will return to the normal level.

Hi @wong,

I’ve tried to comment out image display but it doesn’t help to reduce cpu usage.

Do you have any idea for my second question?


Hi @yeongrok ,

  1. If you modify the code according to the picture I attached, the CPU usage should be around 20-40%.

  2. Regarding your second question, please do not add a delay in the Capture thread, it will affect the reception of USB data and cause data loss.