Great Article, and unlike many easily followed...BUT.. After everything going swimingly, I hit a hurdle.
Aim: To install and establish as basis for Facial Recognition, on a pi 3B with inbuilt picamera
Installed all steps as instructed.
Ran headshots.py -- no problem
trained the model using 10 images -- no problem
Ran python facial_req.py
[INFO] loading encodings + face detector...
VIDEOIO ERROR: V4L: can't open camera by index 2
Traceback (most recent call last):
File "facial_req.py", line 38, in <module>
frame = imutils.resize(frame, width=500)
File "/home/pi/.local/lib/python3.7/site-packages/imutils/convenience.py", line 69, in resize
(h, w) = image.shape[:2]
AttributeError: 'NoneType' object has no attribute 'shape'
Error raised in convenience.py (line 69). Which surprised me
(for 'convenience, this part of the imutils/convenience.py script is...(line 69 bolded)
def resize(image, width=None, height=None, inter=cv2.INTER_AREA):
# initialize the dimensions of the image to be resized and
# grab the image size
dim = None
(h, w) = image.shape[:2]
# if both the width and height are None, then return the
# original image
if width is None and height is None:
return image
Any pointers as to where I should focus my debugging?