|
CS585:Image and Video Computing
Assignment
2: Binary Region Operation
|
|
|
|
|
Problem
Description:
The
goal of this assignment is to design and implement a program that detects
multipul faces in images automatically. The previous algorithm in assignment
1 has been used to detect the regions of multiple face. In order to find out the object face, and eliminate
other unwanted parts of segmented result, several different binary operations are applied on the images, such as region labeling, closing, opening.
Then, the interest of regions in images are filtered through the thresholds which are associated with different region properties, eg, region size, elongation and orientation. By this means,
we try to obtain the approximate solution as possible as we can.
|
|
Program
Codes:
main.cpp:
the main program read, process and output images.
vision.h vision.cpp: the two files implement the
binary operation on the image data. The main functions are listed as the
followings:
/* face detector */
"FaceDectect": the main program to detect the face region
"CalRegGeometry":
calculate the geometric property for each region
/* region labeling */
"LabelRegion", "LabelRegionDir4": the main program
to label region recursively
"MarkFaceRegion": mark the face region with different
intensity levels
/* region binary operation */
"Dilation", "Erosion":
the dilation operation, the erosion operation
|
|
Experimental
Result:
|
The following pictures show the experimental results
for current humam face detector. Based on the sampled skin color, the color
deviation threshold is set as 1500 in equation ((R-Ro)*(R-Ro)>THRESHOLD)||((R-Ro)*(R-Ro)>THRESHOLD)||((R-Ro)*(R-Ro)>THRESHOLD).
Moreover, during the face detector processing, the pixel number is used
to define face size, Emax/Emin is used to define elongation, and the skew
angle of center line of object is used to define orientation. The different
thresholds of them are chosen respectively in the specific smaple images
as the following.
|
|
skin color:197,177,152
deviation threshold: 1500
size1 filter: 50
size2 filter: 1000
elongation filter: <3
orientation filter: >60
|

boy source image
|

detected face
|

dilation
|

erosion
|

opening
|

closing
|

dilation-size1 filter
|

dilation-size-elongation filter
|

dilation-size2 filter
|
|
|
skin color:205,119,72
deviation threshold: 1500
size filter: 50
elongation filter: <3
orientation filter: >60
|

cousins source image
|

detected face
|

dilation
|

erosion
|

opening
|

closing
|

dilation-size filter
|

dilation-size-elongation filter
|

dilation-size-elongation-orientation filter
|
|
|
skin color:177,129,109
deviation threshold: 1500
size filter: 50
elongation filter: <3
orientation filter: >60
|

group source image
|

detected face
|

dilation
|

erosion
|

opening
|

closing
|

dilation-size1 filter
|

dilation-size1-elongation filter
|

dilation-size1-elongation-orientation filter
|

dilation-size2-elongation-orientation filter
|
|
skin color:156,96,80
deviation threshold: 1500
size filter: 50
elongation filter: <3
orientation filter: >60
detected face parameter:
elongation: 1.844
orientation: 85.68
|

jingbin source image
|

detected face
|

dilation
|

erosion
|

opening
|

closing
|

dilation-size filter
|

dilation-size-elongation filter
|
|
|
|
skin color:181,124,126
deviation threshold: 1500
size filter: 50
elongation filter: <3
orientation filter: >60
|

play source image
|

detected face
|

dilation
|

erosion
|

opening
|

closing
|

dilation-size filter
|

dilation-size-elongation filter
|

dilation-size-elongation-orientation filter
|
|
|
skin color:195,165,174
deviation threshold: 3000
size filter: 50
elongation filter: <3
orientation filter: >60
|

twopeople source image
|

detected face
|

dilation
|

erosion
|

opening
|

closing
|

dilation-size filter
|
|

dilation-size-elongation-orientation filter
|
|
|
Discussion
&Conclusion:
From the above experimental result, we could learn that automatic face
detection is very difficult, especially on some complicated scene. But after applying the binary operation and
morphological filter, some of result sound promising and attractive. This certifies these techniques are effective in some
situation. Anyway, to conquer this general problem of recognizing the human face in different kinds of scene,
the relatively complete prior knowledge should be learned and the complicated model should be set up maybe.
The conclusion on this topic is listed as follows:
-- It is hard to select a good deviation threshold
to detect the face region as completely as possible even after training
more sample images.
-- If there are similar shapes of interest regions in the image,
more complicated and detailed analysis should be done to
recognize the object face.
-- Generally speaking, only depending on this basic, low-level binary operation in the image,
it is almost impossible to achieve the purpose of automatic recognition. Several useful techniques, such as possibility distribution,
shape or appearance feature analysis, and relation model are combined into this application as the extra priori knowledge or constraints in order to
obtain the satisfied result.
|
|