I am trying to save the output of a simple face detector. I have a group image with multiple faces and want to store cropped images of each face individually, as well as a rotated version of the image. This is a simplified version of the code I am implementing and would be very grateful if someone could help me write the two output images (face_crop and imrotate) to one folder. The file names do not matter. Thank you!
I = imread('my group image')
bounding_box = step(vision.CascadeObjectDetector(), I)
for i:size(bounding_box, 1)
face_crop = imcrop(I, [227,227])
imrotate = (face_crop, 5, 'bilinear')