Automatic detection of human body parts especially human hands ...

2 downloads 0 Views 225KB Size Report
automatic object detection approach for human hands. Our proposed approach ... hands for work and thus hands get dirty all the time unless we clean our hands ...
International Journal of Video&Image Processing and Network Security IJVIPNS-IJENS Vol:13 No:01

21

Automatic Detection of Human Body Parts Especially Human Hands Considering Gamma Correction and Template Matching on Noisy Images T. M. Shahriar Sazzad, Sabrin Islam Abstract - Automatic object detection is one of the challenging tasks in the areas of image processing. We have proposed an automatic object detection approach for human hands. Our proposed approach is more efficient in compare to other existing approaches and faster as well.

This approach is fully automatic and thus no human intervention is required at all.

Index Term- Gamma correction, Binary image, Log function, Template matching, automatic detection.

I. INT RODUCT ION Human visualization plays a great value in the areas of image processing especially in the areas of detection. Every automatic or semi-automatic process is compared with the manual process to find the accuracy and hence without a better visualization it is hard for a manual process to detect object or objects accurately. In contrast with original natural images, dark images and bright images may give separate results. To resolve this issue it gamma correction is necessary for better human visualization. Another important point is to consider noises during detection process. Object detection is easy for less noisy images and vice-versa. Special care is necessary to remove noises. Noises may have similar color, shape and sizes in compare to required object or objects . To resolve this type of issues, template matching acts as a better role. Our proposed approach aspires to use a noisy image and then find human body parts especially hands. For the preliminary stage we have used gamma correction for better human visualization, log function to reduce noises as much as possible to get detect a single object as a template. Lastly template matching algorithm will help to identify the all the objects from a noisy image. The question may arise why we need to use noisy images. The reason is, most people do use hands for work and thus hands get dirty all the time unless we clean our hands before we eat. Previous research work indicates that skin color plays an important role [1][2][3][4][9][12] [13][15][16][17] although we have not considered skin color for our research because for noisy images skin color gets mixed up with background noises. II.

M ETHODOLOGY

Our proposed approach has used two steps to detect objects (human hands) from noisy images where step one includes gamma correction, Log function to remove background noise as much as possible without removing any parts from the desired object. Second step includes template matching to identify the required object or objects from the noisy images.

Fig. 1. First step: Object detection for template

Fig. 1 illustrates how to obtain an object for template matching. Depending on pixel resolution captured images using camera may be dark or may be bright in contrast to original images. For this reason, it is necessary to use gamma encoder for better visualization.

Fig. 2. a) Original RGB image, b) Converted binary image

From Fig. 2. a) it is clear there is no background noise and hence direct binary conversion can give the template. Fig. 2. b) is the resultant binary image. Moreover, there is no need to consider skin pixel either. This is too easy to get a template. However, as mentioned earlier that image are captured in cameras may have different resolution and hence it may happen that image can be darker

139401-2727-IJVIP NS-IJENS © February 2013 IJENS

IJE NS

International Journal of Video&Image Processing and Network Security IJVIPNS-IJENS Vol:13 No:01

22

than original one or vice-versa.

Fig. 3. a) Original image (brighter), b) Converted binary image

Fig. 6. a) Dark RGB image, b) Gamma corrected image

Log filter: We have used Log filter algorithm for preliminary filter because almost all other filters removes object parts when object color and noise color are similar. For 8-bit images, function f(p) = log(p) * 255/log(255) Fig. 4. a) Original image (darker), b) Converted binary image

From fig. 3 and 4 it is clear that skin pixel is not an important factor at all to detect an object even in a clear background image but depends on brightness, contrast and human visualization. Gamma encoding: Images are mostly RGB images. When images are captured using cameras due to light variation image quality may not be perfect for visualization all the time. Moreover, it may happen that instead of actual bright image the captured image may be dark and vise-versa. For this reason, it is necessary to use gamma correction for better human visualization and thus we have applied gamma encoder. There are some other conversion approaches also available but we have proposed that HSB is better than other approaches [5][6][7][8][10][11]. However, the corrected image may not be same as original one or gamma corrected brighter image and darker image may not look like exactly same either.

to each pixel (p) in the image. Lastly we have converted the image to binary to get the required template.

Fig. 7. a) Detected object from bright RGB image, b) detected object from dark RGB image

From fig. 7: it is clear that darker image can recover better than brighter image and hence can give better result. Detected object from dark image is nearly perfect template rather than detected object from brighter one because there is no hole found in the object detected from darker one.

Fig. 5. a) Bright RGB image, b) Gamma corrected image

Fig. 8. Second step: Final detection of objects using template matching algorithm from noisy images

The above fig. 8 illustrates how template matching works to detect desired object from a noisy image. We have us ed detected object from fig. 7 as our template and used that

139401-2727-IJVIP NS-IJENS © February 2013 IJENS

IJE NS

International Journal of Video&Image Processing and Network Security IJVIPNS-IJENS Vol:13 No:01

23

template using template matching algorithm to detect objects from a noisy image.

III. TEMPLAT E M AT CHING For noisy images edge can not detect the required feature rather it detects all the edges and hence template matching is used for this research. At this stage we need to use this detected hand shape as a template and hence we have used template matching algorithm to detect hand/hands from images. However, hand shape and size can differ from the given template. In that scenario, we need to consider the pixel size (larger or smaller than the template) and angle. Our algorithm can only detect similar or smaller hand/hands but not larger one in compare to the template. Moreover, it also considers an angle up-to 360 from left to right and vice-versa. This algorithm will search a specific object (image pattern) over an image of interest. Using this algorithm user can choose six matching methods such as 1) squared difference, 2) normalized squared difference, 3) cross correlation, 4) normalized cross correlation, 5) correlation coefficient and 6) normalized correlation coefficient. We have applied the existing template matching algorithm [14][18][19] which uses the following features:

Fig. 11. 6 objects have been detected without any false detection using template matching algorithm

IV.

EXPERIMENT AL RESULT

T ABLE I COMP ARISON OF P ROP OSED AND EXISTING ALGORITHM

Type of Algorithm Existing (Based on skin pixel)

No. of images 331

False hand detection 13.23%

Existing (other approaches)

331

12.87%

Proposed

331

6.91%

V. CONCLUSION We have proposed an automated approach to detect human body parts especially human hands from noisy images. Our proposed approach is better than other existing approaches especially who considers skin pixel for object detection. Still some areas need more care for brighter images. In future our goal is to minimize this issue.

Fig. 9. T emplate selection based on different features.

[1]

[2] [3] [4] [5] [6]

Fig. 10. Original image with noise [7]

REFERENCES D. S. Raghuvanshi and D. Agrawal,“ Human Face Detection by using Skin Color Segmentation, Face Features and Regions Properties”, International Journal of Computer Applications (0975 – 8887) Volume 38– No.9, January 2012. Q.T . Luong, “Color in computer vision", In Handbook of Pattern Recognition and Computer Vision, C.H. Chen, L.F. Pau, and P.S P. Wang (Eds.), Singapore: World Scientific, 311-368, 1993. A. Pentland, R.W. Picard, S. Sclaroff, “Photobook: Content-based manipulation of image databases", Int'l. J. of Comp. Vision vol. 18, 233- 254, 1996. P.J. Rousseeuw, A.M. Leroy, Robust Regression and Outlier Detection. New York: Wiley, 1987. W. Skarbek, A. Koschan, Colour Image Segmentation - A Survey, T echnical Report 94-32, T echnical University Berlin, October 1994. MD. Zahid Hasan, T . M. Shahriar Sazzad, Md. Hasibur Rahman. “Use of Gamma Encoder for Image Processing considering Human Visualization”, International Journal of Computer Applications, volume58, number: 10/9315-3547, ISBN: 973-93-80870-40-6, November, 2012. T . M. Shahriar Sazzad, Md. Zahid Hasan, Fatma Mohammed, Sabrin Islam. “Gamma encoding on image processing considering Human visualization, analysis and comparison” International

139401-2727-IJVIP NS-IJENS © February 2013 IJENS

IJE NS

International Journal of Video&Image Processing and Network Security IJVIPNS-IJENS Vol:13 No:01

[8]

[9] [10]

[11] [12]

[13] [14] [15] [16] [17]

[18] [19]

Journal for Computer Science and Engineering, ISSN: 0975-3397 Vol. 4 No. Dec 2012. T . M. Shahriar Sazzad, Sabrin Islam, Mohammad Mahbubur Rahman Khan Mamun, Md. Zahid Hasan, “Establishment of an efficient color model from existing models for better gamma encoding in image processing” International Journal of Image Processing, ISSN: 1985 – 2304 Vol. 7 Issue 1 Pages: 90 – 100, Feb 2013. M.J. Jones, J.M. Rehg, Statistical Color Models with Application to Skin Detection, Int. Journal of Computer Vision, Vol. 46, No. 1, pp. 81-96, 2002. K. Sobottka, I. Pitas, Looking for Faces and Facial Features in Color Images, Pattern Recognition and Image Analysis: Advances in Mathematical Theory and Applications, Vol. 7, No. 1, Russian Academy of Sciences, 1997. H. Palus, Representation of colour images in different colour spaces, S.J. Sangwine, R.E.N. Horne, T he Colour Image Processing Handbook, pp. 67-90, Chapman & Hall, 1998. B.D. Zarit, B.J. Super, F.K.H. Quek, Comparison of Five Color Models in Skin Pixel Classification, Int. Worksh op on Recognition, Analysis and Tracking of Faces and Gestures in RealT ime Systems, pp. 58-63, Greece, 1999. M.J. Jones and J.M. Rehg. Statistical Color Models with Application to Skin Detection. In Int. Conf. on Computer Vision and Pattern Recognition (CVPR’99), pages 274–280, 1999. R. Lienhart and J. Maydt. An Extended Set of Haar-like Features for Rapid Object Detection. In Int. Conf. on Image Processing (ICIP’01), pages 73–76, T hessaloniki, 2001. Albiol, A., T orres, L., Delp, E.: Optimum color spaces for skin detection. In: Proceedings of the International Conference on Image Processing (ICIP). (2001) I: 122–124 Lee, Y., Yoo, S.I.: An elliptical boundary model for skin color detection. In: Proc.of the Int. Conf. on Imaging Science, Systems, and T echnology. (2002) Yang, M., Ahuja, N.: Gaussian mixture model for human skin color and its application in image and video databases. In: In Proc. of the SPIE: Conference on Storage and Retrieval for Image and Video Databases (SPIE 99). Volume 3656. (1999) 458466 V. Delaitre, I Laptev, and J. Sivic. Recognizing human actions in still images: a study of bag-of-features and part -based representations. In Proc. BMVC., 2010. P. F. Felzenszwalb, R. B. Grishick, D. McAllester, and D. Ramanan. Object detection with discriminatively trained part based models. IEEE PAMI, 2010.

139401-2727-IJVIP NS-IJENS © February 2013 IJENS

IJE NS

24