Following is a code to create a bounding box of the detected face.
clear all
clc
faceDetector = vision.CascadeObjectDetector;
I = imread('visionteam.jpg'); % RGB IMage
figure
imshow(I)
title('Input Image')
bboxes = step(faceDetector, I);
IFaces = insertObjectAnnotation(I, 'Rectangle', bboxes, 'Face');
figure, imshow(IFaces), title('Detected faces');
——————————————————————–
My question is:
How can I obtain pixel values inside this bounding box area?
Store the retrieved values in M by N by 3 matrix, after obtaining the pixel values under the bounding box area. How can it be done?
Best Answer