What code can I use if I want to add a condition wherein if I show a picture that is not registered in the database folder it will display 'Unrecognized Face"? ????
clc; close; clear c=webcam; load myNet1; faceDetector = vision.CascadeObjectDetector; while true e = c.snapshot; bboxes = step(faceDetector,e); if(sum(sum(bboxes))~=0) es=imcrop(e,bboxes(1,:)); es=imresize(es,[227 227]); label=classify(myNet1,es); image(e); title(char(label)); drawnow; else image(e); title('No Face Detected'); end end
rgbImage = c.snapshot; personsName = YourDatabaseCheckingFunction(rgbImage); if isempty(personsName) % Did not recognize anyone that was in the database. title('This person is not recognized.', 'FontSize', 18) % Pop up a message if you'd like... message = sprintf('This person is not recognized.') uiwait(helpdlg(message)); else % Recognized the person, and we have a name that has been % returned from our database checking function. message = sprintf('I believe this person to be %s', personsName); title(message, 'FontSize', 18); uiwait(helpdlg(message)); end
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.