About cpu usage

Published by yeongrok on

Home Forums Arducam USB Camera Shields About cpu usage

Viewing 3 reply threads
  • Author
    Posts
    • #23084
      yeongrok
      Participant

      Hello,

      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?

       

      2. 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 ?

    • #23125
      wong
      Moderator

      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.

    • #23192
      yeongrok
      Participant

      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?

       

    • #23225
      wong
      Moderator

      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.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.