Reputation: 1
I am using matlab to detect faces.
Unfortunately, some videos don't work. It gives me the following error
Attempted to access bbox(1,:); index out of bounds because size(bbox)=[0,4].
Error in tracking (line 13) faceImage = imcrop(videoFrame,bbox(1,:));
Upvotes: 0
Views: 44
Reputation: 114796
It seems like your face detector could not find any face for the specific frame videoFrame
: the bounding box you got (bbox
) is empty:
size(bbox)=[0,4]
You might want to add a condition before cropping that numel(bbox) > 0
.
Upvotes: 3