+ All Categories
Home > Documents > [IEEE 2010 2nd International Conference on Future Computer and Communication - Wuhan, China...

[IEEE 2010 2nd International Conference on Future Computer and Communication - Wuhan, China...

Date post: 09-Dec-2016
Category:
Upload: guo
View: 216 times
Download: 1 times
Share this document with a friend
4
The application of improved HSV color space model in image processing Li Shuhua College of Electronic and Information Engineering Inner Mongolia university Hohhot, China [email protected] Guo Gaizhi College of Computer and Information Technology Inner Mongolia Normal University Hohhot, China [email protected] AbstractGeneral HSV color space is another expression of RGB color space. As it expresses the perception color contacts clearer than RGB, and the calculation is very simple, it is adopted widely in the image processing. But because of the mathematical definition limitation , it may be inaccuracy to the color classification in some conditions and influences the stability of the algorithm. In this paper, some modification is proposed to the HSV mathematical definition, the instability is eliminated from formula, object tracking algorithm such as MEANSHIFT is tested for this improvement. In the real projects, the improved model should be widely used. Keywordst; color space, color space transformation, moving object detection, MEANSHIFT I. INTRODUCTION Color is an important vision property of image. And it is one of the perceptual features for the human to recognize an image. In the moving object detection, the color is more stable than the others features, such as local feature points. It is not sensitive to rotate, shift and scale. And the calculation is simple compared to the calculation of other invariant features, such as SIFT, SURF. So the color space model is adopted widely in the image processing, such as CBIR, object tracking. But as it’s initial mathematical definition no more consideration about reliability requirements of pattern recognition and machine learning that within–class distribution should be close and between-class distribution should be scattered, which inevitably leads to some non- robust factors. II. TRADITIONAL HSV COLOR MODEL[1] HSV color model is a kind of method to define color according to the three basic features of the color: hue, saturation and luminance. Hue(H) is the basic feature of color, and is just the color name, such as: red, yellow. According to the position in the standard color wheel, it ranges from 0 to 360. Saturation(S) is the color purity. Higher the value is, purer the color is . And it ranges between 0 and 100%. Luminance (V) is also named brightness, it ranges from 0 to 100%. This model is promoted by Alvy Ray Smith in 1978. It is a nonlinear transformation of RGB model. The mathematical definition is as followed formula 1.1 1.2 1.3: = + × = + × = + × = + × = = b if g r g if r b b g and r if b g b g and r if b g if max , 240 min max 60 max , 120 min max 60 max , 360 min max 60 max , 0 min max 60 min max 0 h 0 0 0 0 0 0 0 0 0 = = = otherwise if , max min 1 max min max 0 max , 0 s max = v H regularly is normalized between 0 and 360 , s and v between 0 and 1. Carefully analyze the definition above, if the main color is red (max = r), h will be between (0, 60) and (300, 360). While other two main colors max = g max = b varied between the range of 60 to 120 ,and 180 to 300, which peak is 120 and 240 respectively. So it can be assumed that if the other two colors are not the main color (that is, color shift influenced by ambient), which the normalized difference obey Gaussian distribution. In the (0, 360) , we expend the distribution of h in color band as followed Figure 1 Figure 1. color band expended (1.1) (1.2) (1.3) V2-10 978-1-4244-5824-0/$26.00 c 2010 IEEE
Transcript

May 12, 2010 15:42 RPS : Trim Size: 8.50in x 11.00in (IEEE) icfcc2010-lineup˙vol-2: F384

The application of improved HSV color space model in image processing

Li Shuhua College of Electronic and Information Engineering

Inner Mongolia university Hohhot, China

[email protected]

Guo Gaizhi College of Computer and Information Technology

Inner Mongolia Normal University Hohhot, China

[email protected]

Abstract—General HSV color space is another expression of RGB color space. As it expresses the perception color contacts clearer than RGB, and the calculation is very simple, it is adopted widely in the image processing. But because of the mathematical definition limitation , it may be inaccuracy to the color classification in some conditions and influences the stability of the algorithm. In this paper, some modification is proposed to the HSV mathematical definition, the instability is eliminated from formula, object tracking algorithm such as MEANSHIFT is tested for this improvement. In the real projects, the improved model should be widely used.

Keywordst; color space, color space transformation, moving object detection, MEANSHIFT

I. INTRODUCTION

Color is an important vision property of image. And it is one of the perceptual features for the human to recognize an image. In the moving object detection, the color is more stable than the others features, such as local feature points. It is not sensitive to rotate, shift and scale. And the calculation is simple compared to the calculation of other invariant features, such as SIFT, SURF. So the color space model is adopted widely in the image processing, such as CBIR, object tracking. But as it’s initial mathematical definitionno more consideration about reliability requirements of pattern recognition and machine learning that within–class distribution should be close and between-class distribution should be scattered, which inevitably leads to some non-robust factors.

II. TRADITIONAL HSV COLOR MODEL[1]

HSV color model is a kind of method to define color according to the three basic features of the color: hue, saturation and luminance.

Hue(H) is the basic feature of color, and is just the color name, such as: red, yellow. According to the position in the standard color wheel, it ranges from 0 to 360.

Saturation(S) is the color purity. Higher the value is, purer the color is . And it ranges between 0 and 100%.

Luminance (V) is also named brightness, it ranges from 0 to 100%.

This model is promoted by Alvy Ray Smith in 1978. It is a nonlinear transformation of RGB model. The mathematical definition is as followed formula 1.1 1.2 1.3:

⎪⎪⎪⎪⎪⎪

⎪⎪⎪⎪⎪⎪

=+−

−×

=+−

−×

⟨=+−

−×

≥=+−

−×

=

=

bifgr

gifrb

bgandrifbg

bgandrifbg

if

max,240minmax

60

max,120minmax

60

max,360minmax

60

max,0minmax

60

minmax0

h

00

00

00

00

0

⎪⎩

⎪⎨⎧

−=−

=

=otherwise

if

,max

min1

max

minmax

0max,0s

max=vH regularly is normalized between 0 and 360 , s and v

between 0 and 1. Carefully analyze the definition above, if the main color

is red (max = r), h will be between (0, 60) and (300, 360). While other two main colors max = g max = b varied between the range of 60 to 120 ,and 180 to 300, which peak is 120 and 240 respectively.

So it can be assumed that if the other two colors are not the main color (that is, color shift influenced by ambient), which the normalized difference obey Gaussian distribution. In the (0, 360) , we expend the distribution of h in color band as followed Figure 1

Figure 1. color band expended

(1.1)

(1.2)

(1.3)

V2-10978-1-4244-5824-0/$26.00 c©2010 IEEE

May 12, 2010 15:42 RPS : Trim Size: 8.50in x 11.00in (IEEE) icfcc2010-lineup˙vol-2: F384

It is obvious that if some color is the main color, the H mean can be used to express the basic feature. If the main color is g or b, there is no any problem to use the H mean. The mean changes around the peak of the Gaussian distribution. But if the main color is r, it can not be used. This can cause the instability of the algorithm in the real image processing project, such as: color-based image retrieval, color-based clustering, color-based segmentation which caused insurmountable error in theory for improving the accuracy and robust of the system..

while more than 50 percent of pixels in detection area the color g>b then the mean value is near at 0 60while more than 50 percent g<b, the mean value is near at300 360 . While pixels’ distribution of the two extremes is balanced , the average will occur in 180!, Obviously, this is not consistent with our intuitive understanding, when the main color is not changed (for red), its H mean do not represent their identity, because the reasons for the results of the formula defined unstable! Some scholars have already made improvements in [2], a solution to this problem is to establish H2SV space model of the h coordinates from radial coordinates to Cartesian coordinates, which thereby eliminating the space in polar coordinates in the bimodal distribution. and in practical applications achieved good results. Although such an approach achieve the desired result, but did not eliminate the problem from the principle.

III. SHSV (SHIFT-HSV) COLOR SPACE

In data mining or pattern recognition, it is not cared whether it fits the human’s vision feature that RGB is transformed to another space. The most importance is whether within-class distribution of the data in the new space is quite close and between-class distribution is very scattered. So if we shift band 60 degrees, then thedistribution is turned as followed Figure 2 and H formula is 3.1, 3.2, 3.2:

⎪⎪⎪⎪⎪

⎪⎪⎪⎪⎪

>

=+−

−×

=+−

−×

=+−

−×

<=

=

360,360

max,240minmax

60

max,120minmax

60

max,60minmax

60

0||minmax,0

h

o

00

00

00

o

hif

bifgr

gifrb

rifbg

hif

(3.1)

⎪⎩

⎪⎨⎧

−=−

=

=otherwise

if

,max

min1

max

minmax

0max,0s (3.2)

max=v (3.3)

h = 0/360, boundary condition set for abnormal occurs.

In this formula, s,v are unchanged.

In this defintion, each peak of r/g/b color is single modal distribution, at the boundary of degree 0 and 360, the color is belonged to red and blue color septurately. The main color of each peack will not shifted dramaticlly by ambient.

IV. EXPERIMENT RESULT AND CONCLUSION

In order to validate the model, the test is taken to a group of video frames with the instability feature based on the color histogram’s meanshift algorithm[3].

The tested video frames is the public CAVIAR data set[4] “ThreePastShop2cor.mpg “ sequences.

Figure3-5 is the color histogram and the relative back projection of the ROI scale with the original color HSV formula. Ideally, ROI scale should be the one with the highest projection value. But from the figure, except for the selected scale, the other scale’s projection value is high too (highlight scale). The histogram with two peak can not express the selected scale clearly, the background with the similar is highlighted.

Figure4-5 is the color histogram and the relative back projection of the ROI scale based on SHSV formula. It can be concluded that the projection effect has been improved greatly. Except for the ROI scale, the other one expresses the normal color spread, that is only several scale is highlighted.

In the video, the tracked person changes the position with another, the meanshift algorithm fails. After they make a change, the manual selected action is taken.

Figure 2. color band shifted

[Volume 2] 2010 2nd International Conference on Future Computer and Communication V2-11

May 12, 2010 15:42 RPS : Trim Size: 8.50in x 11.00in (IEEE) icfcc2010-lineup˙vol-2: F384

Figure 9 The trace is started in Frame 523. And in Frame 722, the trace is lost, and is dragged to the up-right scale with the similar color..Figure 10 The trace is started in Frame 523, And in the Frame 751, the trace is lost, and is dragged to the up scale with the similar color..Figure 9 is based on original HSV. And Figure 10 is based on SHSV.

From above, it can be concluded that the SHSV is more effective.

From the meanshift experiment, it can be concluded that the SHSV is more effective compared with the original HSV. It expresses the object’s color feature robustly. As the principle is obvious, large number of testes are not taken to the other algorithm such as color-based segmentationcolor-based aggregation. From the test in menshift, it can be predicted that SHVS should be more robust than original HSV in the other color-based algorithm.

Figure 4. H Histogram(bimodal distributionFigure 3. back projection

Figure 6. back projection Figure 7. H Histogram (unimodal distribution)

Figure 5. frame 387

Figure 8. frame 387

V2-12 2010 2nd International Conference on Future Computer and Communication [Volume 2]

May 12, 2010 15:42 RPS : Trim Size: 8.50in x 11.00in (IEEE) icfcc2010-lineup˙vol-2: F384

REFERENCES

[1] Raphael Gonzalez, Richard E. Woods “Digital Image Processing”, 2nd ed. Prentice Hall Press, ISBN 0-201-18075-8, p. 295. 2002

[2] T N Mundhenk, J Everist, C Landauer, L Itti, K Bellman, ”Distributed biologically-based real-time tracking in the absence of prior target information”, Proc. SPIE International Conference on Intelligent Robots and Computer Vision XXIII: Algorithms, Techniques, and Active Vision, (D P Casasent, E L Hall, J Roning Ed.), 6006:142-153., (2005)

[3] Comaniciu D, Ramesh V, and Meer P. ,”Kernel-based objecttracking”. IEEE Trans. on Pattern Analysis and Intelligence, 25(5): 564-577,2003

[4] Fisher R, et al. CAVIAR test case scenarios. 2003. http://homepages.inf.ed.ac.uk/rbf/CAVIAR

Figure 9 tracking started from frame 523 at Frame 722 tracking failed dragged to right-up area of same color

Figure 10 tracking started from frame 523 at Frame 751 tracking failed dragged to up area of same color

[Volume 2] 2010 2nd International Conference on Future Computer and Communication V2-13


Recommended