Why does just importing OpenCV cause massive CPU usage? : <p>I noticed something very odd in trying a motion detector for Raspberry Pi:</p>

<p>Removing the camera logging from the script, makes it use almost 0 CPU:</p>

<pre><code>#from gpiozero import MotionSensor
#import cv2
from datetime import datetime
from time import sleep
#camera = cv2.VideoCapture(0)
#pir = MotionSensor(4, queue_len=2, sample_rate=2, threshold=0.5)
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
PIR_PIN = 4
GPIO.setup(PIR_PIN, GPIO.IN)
while True:
    sleep(1)
    if GPIO.input(PIR_PIN):
        print( "detected!")
        filename = 'motionpics/' + datetime.now().strftime("%Y-%m-%d_%H.%M.%S.jpg")
        #ret, frame = camera.read()
        #cv2.imwrite(filename, frame)
        #camera.release()
        #pir.wait_for_no_motion()
</code></pre>

<p>However, uncommenting <em>just one line - the import cv2</em>, makes this script go to 300% CPU Usage!!</p>

<p>What is wrong with OpenCV and why can't I even start to use it to grab usb camera images without it using a bunch of cpu, and wearing down the battery?</p>
