October 16, 2021

Software Mile.com

Latest Software News and Hacks

Getting error while coding in matlab

Hi everyone. I’m working in face detection system using matlab. The code that I have written is working fine for image without face. But shows error(snap attached below) whenever there is a face in image.

Program:

function face(x) % x is the name of the image give at the time of function calling Img1= imread(x); Img = rgb2gray(Img1); faceDetector = vision.CascadeObjectDetector; faceDetector.MergeThreshold = 4; Boundingboxes = faceDetector(Img1) bboxes = faceDetector(Img1); if ~isempty(bboxes) pic = insertObjectAnnotation(Img1,’rectangle’,bboxes,’FACE’,’linewidth’,3); imshow(pic) title(‘detected faces’) end end

error snap

submitted by /u/bilal__Ahmad
[link] [comments]


Go to Source of this post
Author Of this post: /u/bilal__Ahmad
Title Of post: Getting error while coding in matlab
Author Link: {authorlink}