I have directory, there are many images in this directory, I want to detect the face from images, and create the directories of image name store only the faces on that directory. How to do this, kindly help me
1 回表示 (過去 30 日間)
古いコメントを表示
myDir = 'C:\myImages\';
this is the name of directory which contains many images. i want to detect the faces from images and want to crop the face from image and save it like: For example. There is one image name 1.jpg, create the directory name 1 and inside directory there should faces stored which were present in the image 1.jpg.
6 件のコメント
Image Analyst
2017 年 11 月 30 日
Remants of original discussion(before they also get deleted):
myDir = 'C:\myImages\';
this is the name of directory which contains many images. i want to detect the faces from images and want to crop the face from image and save it like: For example. There is one image name 1.jpg, create the directory name 1 and inside directory there should faces stored which were present in the image 1.jpg.
回答 (1 件)
Image Analyst
2017 年 11 月 18 日
"i have done till face detection and cropping, but i am facing difficulty to save the cropped face "
OK, good that you've already done that, because that's the hardest part.
To save the cropped image, simply call imwrite:
baseFileName = sprintf('Face#%d.png', currentFaceIndex);
fullFileName = fullfile(outputFolder, baseFileName);
imwrite(croppedImage, fullFileName);
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!