satyanarayana
Posts: 2
Joined: Thu Sep 22, 2022 7:52 am

OpenCV raspberry pi 4

Thu Sep 22, 2022 8:01 am

Hi friends,

I am using raspberry pi 4 and installed OpenCV 4.6 . Then I have tried example of removing noise from image which is 8 mega pixel usb camera image but when removing image noise CPU usage is going to 250-350% how to solve this issue .

Using this function from OpenCV cv.fastNlMeansDenoisingColored()

gordon77
Posts: 6790
Joined: Sun Aug 05, 2012 3:12 pm

Re: OpenCV raspberry pi 4

Thu Sep 22, 2022 10:14 am

What is the issue with high cpu usage, overheating ?

User avatar
jahboater
Posts: 8263
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: OpenCV raspberry pi 4

Thu Sep 22, 2022 11:21 am

satyanarayana wrote:
Thu Sep 22, 2022 8:01 am
CPU usage is going to 250-350% how to solve this issue .
It doesn't sound like an issue.

There are four CPU cores, so one or two of the cores are probably idle (meaning you have spare CPU power available for other tasks and the machine should be responsive).

100% CPU utilization of a core is never a problem.
Depending on the instruction mix it may, or may not, get warm, but the Pi will throttle back the CPU long before there is any risk of damage. If you think about it, CPU's are either idle or 100% utilized, there is no "in-between" value! 50% means 100% utilization for 50% of the time.

You may easily overclock a Pi4 to 2GHz or more which may reduce the time taken for your task.
(A Pi4 here runs permanently at 2.1GHz with no fan and never throttles).

To check your Pi for any issues such as throttling (currently or in the past), run the command

Code: Select all

vcgencmd get_throttled
if that says anything other than 0x0 (perfect health) then you might need to add a heat sink or a better power supply.
If it says 0x0 you have absolutely nothing to worry about - just carry on as you are.

In the old days when computers were very expensive, 100% CPU utilization was highly desirable! Otherwise you had a valuable asset doing nothing.

satyanarayana
Posts: 2
Joined: Thu Sep 22, 2022 7:52 am

Re: OpenCV raspberry pi 4

Thu Sep 22, 2022 11:46 am

gordon77 wrote:
Thu Sep 22, 2022 10:14 am
What is the issue with high cpu usage, overheating ?
live video is hanging with high cpu usage

Return to “C/C++”