4
Processing the Shadow Part in Digital Images Ping Lu, Shigeru Kitakubo; Dept of System, Nippon Institute of Technology, 4-1 Gakuendai, Miyashiro, Saitama 345-8501, Japan. Abstract In the field of personal authentication system, types of hands are popularly used to certificate the identity of a person. There is an important part in the hand-shape recognition system. That is how to take photographs of hands. Whether you use a camera or a scanner to take a photograph, there exist some shadow parts around a hand image. As for this part, to judge whether the shadow is true or part of the hand plays an important role to improve the recognition rate. Actually if we can judge the range of the shadow of the hand image clearly we can raise the probability of the certification. In this paper we focus on the shadow part of hand images. We propose some algorithm to convert an original image into a better image to handle the hand-shape. Firstly, we convert the input color image into a grayscale image, then we extract the outline by using Fourier transform, and the true outline of the hand will be determined. After extracting the profile correctly, we will be able to certificate the identity of a person by using the characteristics of the hand, for example the length of each finger. Now the recognition methods using biometrics are spread in the world, we believe our project of processing the shadow part will be useful to the recognition system. Introduction Image processing is considered to be one of the most rapidly evolving areas of information technology today, with growing application in all areas of business. Image processing deals with images which are two-dimensional entities captured electronically through a scanner or camera system, and in this paper we aim at how to separate the hand region from background. We use a scanner and a digital still camera in our experiments. At first, we take advantage of a scanner to get the picture of the hand in the natural state. When we extract the outline of the hand in grayscale (256 continuous tone), we find it difficult to separate the shadow part. Thus we begin to make another experiment in which we use a digital still camera. In order to see the difference between the domain of the hand and the shadow part of the hand clearly, we try to make RGB histogram to make sure if the density difference between the hand and hand s shadow is big enough to separate them. In the following, we present the results of two experiments. In Experiment 1 we use a scanner, and in Experiment 2 we use a digital still camera. Experiment 1 Experimental apparatus; Scanner: Lexmark x3470 Image processing software: Adobe Photoshop 7.0 Software development environment: Microsoft Visual C++ 6.0 Microsoft Visual Basic 6.0 Figure 1. Algorithm of Experiment 1 The algorithm of this experiment is shown in Fig1. We will describe each step in the following: Step 1. We get the original images of hands using a scanner. Step 2. We trim each original image to get an image of 1,280 x 1,280 pixels. Step 3. We convert its mode to 8 bit grayscale. Fig.2 shows a sample of original images and, just to make the goal clear, an image of a hand finely separated from its background by using Adobe Photoshop. Figure 2. Scanned image (left) and a hand extracted by using Photoshop. Step 4. We binarize each image using one threshold value and calculate the area of a hand which we define as the number of white pixels. In the binarization process, we adopted 51 different threshold values ranging from 103 to 153 and at the same time we use the histogram to check the rate between the background area and the hand area. Fig. 3(a) shows a sample black-and-white image and Fig 3(b) shows its binarized image. Step 5. We binarize each image using two threshold values and calculate the area of a hand by counting the white pixels. We adopted a pair of threshold values 140 and 240. Pixels with the brightness value between these threshold values are converted to white. Change image size Convert the image to grayscale Separate a hand region from the background Binarize with one threshold Binarize with two thresholds Extract the outline Calculation the area Get an original image 320 © 2008, Society for Imaging Science and Technology

Processing the Shadow Part in Digital Images - imaging.org · an important part in the hand-shape recognition system. That is how to take photographs of hands. Whether you use a camera

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Processing the Shadow Part in Digital Images - imaging.org · an important part in the hand-shape recognition system. That is how to take photographs of hands. Whether you use a camera

Processing the Shadow Part in Digital ImagesPing Lu, Shigeru Kitakubo; Dept of System, Nippon Institute of Technology, 4-1 Gakuendai, Miyashiro, Saitama 345-8501, Japan.

AbstractIn the field of personal authentication system, types of hands

are popularly used to certificate the identity of a person. There isan important part in the hand-shape recognition system. That ishow to take photographs of hands. Whether you use a camera or ascanner to take a photograph, there exist some shadow partsaround a hand image. As for this part, to judge whether the shadowis true or part of the hand plays an important role to improve therecognition rate. Actually if we can judge the range of the shadowof the hand image clearly we can raise the probability of thecertification. In this paper we focus on the shadow part of handimages. We propose some algorithm to convert an original imageinto a better image to handle the hand-shape. Firstly, we convertthe input color image into a grayscale image, then we extract theoutline by using Fourier transform, and the true outline of the handwill be determined. After extracting the profile correctly, we willbe able to certificate the identity of a person by using thecharacteristics of the hand, for example the length of each finger.Now the recognition methods using biometrics are spread in theworld, we believe our project of processing the shadow part will beuseful to the recognition system.

IntroductionImage processing is considered to be one of the most rapidly

evolving areas of information technology today, with growingapplication in all areas of business. Image processing deals withimages which are two-dimensional entities captured electronicallythrough a scanner or camera system, and in this paper we aim athow to separate the hand region from background. We use ascanner and a digital still camera in our experiments. At first, wetake advantage of a scanner to get the picture of the hand in thenatural state. When we extract the outline of the hand in grayscale(256 continuous tone), we find it difficult to separate the shadowpart. Thus we begin to make another experiment in which we use adigital still camera. In order to see the difference between thedomain of the hand and the shadow part of the hand clearly, wetry to make RGB histogram to make sure if the density differencebetween the hand and hand s shadow is big enough to separatethem. In the following, we present the results of two experiments.In Experiment 1 we use a scanner, and in Experiment 2 we use adigital still camera.

Experiment 1

Experimental apparatus;Scanner: Lexmark x3470Image processing software: Adobe Photoshop 7.0Software development environment: Microsoft Visual C++ 6.0

Microsoft Visual Basic 6.0

Figure 1. Algorithm of Experiment 1

The algorithm of this experiment is shown in Fig1. We willdescribe each step in the following:

Step 1. We get the original images of hands using a scanner.Step 2. We trim each original image to get an image of 1,280

x 1,280 pixels.Step 3. We convert its mode to 8 bit grayscale. Fig.2 shows a

sample of original images and, just to make the goal clear, animage of a hand finely separated from its background by usingAdobe Photoshop.

Figure 2. Scanned image (left) and a hand extracted by using Photoshop.

Step 4. We binarize each image using one threshold value andcalculate the area of a hand which we define as the number ofwhite pixels. In the binarization process, we adopted 51 differentthreshold values ranging from 103 to 153 and at the same time weuse the histogram to check the rate between the background areaand the hand area. Fig. 3(a) shows a sample black-and-white imageand Fig 3(b) shows its binarized image.

Step 5. We binarize each image using two threshold valuesand calculate the area of a hand by counting the white pixels. Weadopted a pair of threshold values 140 and 240. Pixels with thebrightness value between these threshold values are converted towhite.

Change image size

Convert the image to grayscale

Separate a hand region from the background

Binarize with one threshold Binarize with two thresholds

Extract the outline Calculation the area

Get an original image

320 © 2008, Society for Imaging Science and Technology

Page 2: Processing the Shadow Part in Digital Images - imaging.org · an important part in the hand-shape recognition system. That is how to take photographs of hands. Whether you use a camera

Step 6. In order to check the result of extracting the outline ofthe hand, we extract the outline of the hand that deal withbinarization. Fig 4(b)show the outline of the hand

(a) (b)Figure 3. (a) Binarized image with one threshold (b)histogram ofbrightness value

(a) (b)

Figure 4. (a) Binarized image with two thresholds (b) result of theextraction of the outline of the hand

Results of Experiment 1The area of a hand and the variance and standard deviation of

the area are calculated as shown in Fig. 5. From this statistics andFig. 4(a), we can say that the observed area is larger than the actualarea of a hand because the outline of a hand is not extractedcorrectly, and the result of Fig. 4(b) indicates that the brightnessvalue of the background and the hand is close. On the other hand,we can see a hand in Fig. 4(a), and although the observed area islarger than the actual area of a hand, we can say the area of thehand is estimated to be smaller than the actual area because theshadow area over the hand was converted to black pixels in theprocess of binarization and after we extract the outline of the Fig4(a), the outline cannot be extract correctly .

Average value of the area

0200000400000600000800000

100000012000001400000

100

104

108

112

116

120

124

128

132

136

140

144

148

Threshold

pixe

ls

(a)

Variance of the area

0

1000

2000

3000

4000

5000

6000

7000

8000

100 105 110 115 120 125 130 135 140 145 150

Threshold

Varia

nce

x1000000

(b)

Standard deviation of the area

0

10000

20000

30000

40000

50000

60000

70000

80000

90000

100 105 110 115 120 125 130 135 140 145 150

Threshold

Stan

dard

devi

atio

n

(c)Figure 5. (a) The average value of the area of a hand for each threshold(b) the variance of the area of a hand for each threshold (c) the standarddeviation of the area of a hand for each threshold

Experiment 2

Figure 6. Algorithm of Experiment 2

# white pixel = 136,657# black pixel = 13,343

Get an original with blue background

Set the threshold R>150, B<100

Extract a hand area

Trim edges off the picture

Get maximum gap of brightness value for each row

Separate the shadow area

ICISH'2008: International Conference on Imaging Science and Hardcopy 321

Page 3: Processing the Shadow Part in Digital Images - imaging.org · an important part in the hand-shape recognition system. That is how to take photographs of hands. Whether you use a camera

Experimental apparatus;Digital Camera: Olympus CAMEDIA C-4040ZIllumination: Copy Lamp 100V 250WSoftware development environment: Microsoft Visual Basic 6.0

One of the primary reasons why we could not separate a handfrom its background is that the background of scanned image, byordinary scanners, is white, whose tone value is not so differentfrom that of a hand. This leads us to the idea that we should takepictures with a digital still camera in front of the blue background.

Step 1. We take photos of a hand with and without using aflash. The hand is on a blue paper, illuminated by a copy lamp.The distance between the camera and the hand is 1.4m, and theangle of the copy lamp is 10 degrees left, 1.4m from the hand. SeeFig. 7. The size of original images is 750 pixels in width and 562pixels in height. See Fig. 8.

Figure 7. Experimental apparatus

Figure 8. Original images

Step 2. We set the threshold pair (R=150, B=100) and thepixel with the value R > 150 and B < 100 is changed the color towhite. Since each color pixel can be expressed by three values (R,G, B), we can check the number of the pixels and take advantageof it to make a density value and use the information of thehistogram to extract the part of domain you want. See Fig. 9.

Figure 9. Hand area whitened..

Step 3. We trim the surrounding edges that are more than 30pixels away from the hand (white area). See Fig. 10.

Figure 10. Surrounding edges trimmed

Figure 11.△ is the maximum gap of brightness

Step 4. In the image we get after Step 3, the shadow part(relatively dark area) contains both a part of the hand and thebackground. The shadowed hand part and the shadowedbackground part have different brightness values and the differencebetween these two tends to be bigger than the one between thelighted background and shadowed background. We make use ofthis and calculate the maximum gap of brightness value for eachrow (horizontal line), and then change both lighted and shadowedbackground color into black. See Fig. 11.

Step 5. When we extract the outline of the hand correctly , wechange the shadowed hand part to white, and finally, we canextract all the hand area without shadow. See Fig. 12.

Results of Experiment 2By using the maximum gap of brightness value for each row,

we can extract the outline of all the hand without shadow or wecan say we can extract the outline correctly.

322 © 2008, Society for Imaging Science and Technology

Page 4: Processing the Shadow Part in Digital Images - imaging.org · an important part in the hand-shape recognition system. That is how to take photographs of hands. Whether you use a camera

Figure 12. Two example images in which the shadowed hand areas wererecognized and whitened

ConclusionJudging from the result of two experiments we can say we

can extract the outline of the hand correctly under the condition ofnatural state. We propose some ideas to make the binarizationalgorithm more accurate especially for shadowed area. Since wedevelop the software to process images input via scanners ordigital still cameras, this research will contribute not only to thefield of biometrics certification but also to the field of generalimage processing.

References[1] Robert Ulichney, Digital Halftoning (The MIT Press, Cambridge,

Massachusetts, London, England, 1987).[2] Reiner Eschbach, Recent Progress in Digital Halftoning II (IS&T,

Springfield, VA, 1999).

Author BiographyLu Ping is a graduate student of Nippon Institute of Technology.

She is now studying image processing in Kitakubo Laboratory of NipponInstitute of Technology.

ICISH'2008: International Conference on Imaging Science and Hardcopy 323