MATLAB: I wish to crop the detected face from the image. Please help for the same.

#face recognitioncroppingeigen facesface detectionImage Processing Toolbox

% Create a detector object faceDetector = vision.CascadeObjectDetector;
% Read input image I = imread('visionteam.jpg'); This is the code given in Matlab hellp, can you suggest me how to crop the detected face and store it % Detect faces bbox = step(faceDetector, I);
% Create a shape inserter object to draw bounding boxes around detections shapeInserter = vision.ShapeInserter('BorderColor','Custom','CustomBorderColor',[255 255 0]);
% Draw boxes around detected faces and display results I_faces = step(shapeInserter, I, int32(bbox)); figure, imshow(I_faces), title('Detected faces');