Use of a particular file from bunch of files

1 view (last 30 days)
I want to use a particular file from a bunch of files. So far I have used the following steps,
1) read and convert the image to binary
2) labeling the image using bwlabel()
3) used regionprops with BoundingBox attribute.
4) write each components to a new file based upon BoundingBox.
Now I have 11 files but I only need the file that has the face portion so that I can detect the edge of the particular file. How do I do that?

Accepted Answer

Image Analyst
Image Analyst on 31 Oct 2012
If you did the conversion to binary correctly, the binary image would identify only the faces and so you'd have an image with just face. Maybe do color classification, or use the Computer Vision System Toolbox which identifies faces.
  7 Comments
Image Analyst
Image Analyst on 20 Nov 2012
See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F You can specify the file pattern when you call dir:
filePattern = fullfile(folder, 'human*.jpg');
fileNames = dir(filePattern);
Sayak
Sayak on 20 Nov 2012
ooh. Simple use of wildcard. How did I miss that? Anyways, thanks for the answer and that awesome link.

Sign in to comment.

More Answers (0)

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!