Running Object detection on Raspberry Pi using OpenCV

I got an error when I ran the

Traceback (most recent call last):
File “/home/pi/Desktop/Object_Detection_Files/”, line 50, in <>
result, objectInfo = getObjects(img,0.45,0.2)
File “/home/pi/Desktop/Object_Detection_Files/”, line 21, in g>
classIds, confs, bbox = net.detect(img,confThreshold=thres,nmsThreshold=nms)
cv2.error: OpenCV(4.4.0) /home/pi/opencv-4.4.0/modules/imgproc/src/resize.cpp:3>

Please help me
OS = Raspberry Pi OS X11 64-bit
Board = Raspberry PI 4B 8GB

1 Like

I can try and help.
Are you following this tutorial by any chance?

If so, what is the print out of

  success, img =
  print(success, img)
  #result, objectInfo = getObjects(img,0.45,0.2)
1 Like