• No results found

Improved HIS Model with Application to Edge Detection for Color Image

N/A
N/A
Protected

Academic year: 2020

Share "Improved HIS Model with Application to Edge Detection for Color Image"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

Improved HIS Model with Application to Edge

Detection for Color Image

Linhua Zhang

Chongqing Key Lab of Operations Research and System, Department of Mathematics Science, Chongqing Normal University, Chongqing, P.R. China

Email: [email protected]

Xiuli Mao, Chuanbin Zhou and Ping Yu

Department of Mathematics Science, Chongqing Normal University, Chongqing, P.R. China {Maodiandian, chuanbin, yuping}@cqnu.edu.cn

AbstractHIS color space is based on the visual features of our eyes, and uses tone, brightness, saturation to manifest the color. While conducting edge detection on color images, in order to get better effects and consistent with human visual perception, a novel HIS-like color space is defined and it is obtained in the process of the improving HIS color model. Edge detection has been made on image which based on HIS color space and the improved HIS color space through Matlab software, combined with Roberts, Prewitt or Sobel detection operator and the vector gradient operator. Experimental results show that the proposed method effectively improves the accuracy of edge detection.

Index TermsEdge detection, Color image, HIS color space

I. INTRODUCTION

Edge is one of the most important and rudimental feature of an image. The goal of edge detection is to locate the pixels in the image that correspond to the edges of the objects seen in the image. Edge detection has played a great role in medical imaging, computer aided detection systems, biometrics, machine vision, scanning and handwriting analysis.

In the early years of digital image processing, a lot of methods were proposed for edge detection on images. In general, edge detection is considered a multi-stage process includes four different phases: conditioning, feature extracting, blending and scaling. It focuses on the feature extraction process, As to the feature extraction phase, most pioneering methods for edge detection are based on a convolution of the image with a given operator, typically implemented as a mask. The most famous ones are due to Sobel and Prewitt. Recently, some approaches based on wavelet-like filtering, cellular neural networks, principal component analysis, independent component analysis, fuzzy morphology have been explored [1-5].

However, Edge detection is related to distinct type of images includes binary images, gray-scale images or color images which can be obtained from complex background. There is not a universal technique can be dealt with them. For instance, more recent wavelet-based methods are only applicable to grayscale images, as the traditional definition of wavelets is not efficient for binary data; in many situations, strong edges between

colors become very weak in luminance and are difficult to detect.

The techniques used for color edge detection can be subdivided into two classes: the monochromatic-based techniques and vector-valued techniques. However, few research efforts have concentrated on the color-edge detection while most of works have been developed for edge detection in gray-scale images. Color-edge detection is an important research task in the field of image processing. Therefore more and more researchers have begun to study the edge detection technology of color image including the following three types mainly. The first one is that the color image is converted to a grey-scale image, and then edge detection is implemented by the gradient operator or difference operator. It would lose partial edge information of color image during converting procedure. The second one is that edge detection is implemented by the gradient operator or difference operator to R, G or B channel of color image respectively, then the detection results of every channel are combined into the edges of color image. It may contain more false negatives in the textured regions. The third one is based on the quaternion and vector, such as the technologies about color difference and vector dot product, and so on. The third one is based on the integer-order differential operator and it relies heavily on the integer-order differential operator. Although the above three type methods can detect the edge of color image, they still have some shortcomings [6-8].

Most common implementations still concern the early, simple methods except for some very specific situations. Consequently, simplicity has been one of our aims when considering the original uses in the improved HIS color space.

(2)

red-green-blue color space, while all other color models derive from the transformation of linear or nonlinear. One of the more common color spaces is the HIS, namely, the color-brightness-saturation model. Compared with RGB model, the greatest advantage of HIS model is that it is more suitable for human to describe and explain colors, and the most majorcharacteristic of the HIS space model is that the correlation of the three components H, I, S is very small [9]. H refers to tone, is the essential difference and features diverse about various specific color; I represents lightness, is a property reflecting the brightness of the color in colored images or means the grayscale in color reduction images; S stands for saturation or purity, is the number of the colorful ingredients in colored images. With regard to lightness, it is incapable to measure, but represents the intensity concept. However, the tone and the saturation are the key parameters to determine the color information. Besides, there is YUV color model, the advantage lies in the mutual independence between brightness signal (Y) and the chrominance signals (U, V) [10]; YCbCr color model, Y means lightness, Cb represents blue color shading, Cr refers to the red color shading [11]; m1m2m3 color model, is a kind of color rate and color space introduced by givers to identify the object by histogram [12].

As the correlation between the three components R, G, B is quite strong, sometimes the effect of edge detection by applying the three weights is not idealistic. So, in order to reduce the action of relevance factors between the three components and to make the selected color space more suitable for our human eyes to observe and to meet the need for certain application, we should transform the RGB image into the HIS space [13].The feasible formula for the transformation of RGB model into theHIS model is as follow [13]:

,

2 , .

B G

H

B G

α π α

=⎨

− >

⎩ (1)

3

R G H

I= + + (2)

( )

[

]

3

1 min , ,

S R G B

R G B

= −

+ + (3)

Of which,

1

2 2

( ) ( ) arccos

2 ( ) ( )( )

R G R B

R G R B G B α

⎧ ⎫

− + −

⎪ ⎪

= ⎨ ⎬

+

⎣ ⎦

⎩ ⎭

(4)

The relationship between luminance component I and R, G, B is linear, while the color component H and the saturation component S originate from the non-linear transformation of R, G, and B. Therefore, we should normalize these variables so as to get referential data and make sure the relative size of data is relatively low. Because the color cube of RGB color model itself is a unit cube normalizing the color value, obviously, the component value of R, G, B are all in the range of [0,1]. From above conversion formula, we can recognize that the luminance component I and the saturation component S are definitely in the range of [0, 1]. For the hue

component H, can be directly got by divide its value by2π.

II. EDGEDETECTIONOPERATORS

As we mentioned, most pioneering methods for edge detection are based on a convolution of the image with a given operator, typically such as Robert, Prewitt or Sobel edge detection operator which is expressed in Figure 1 to Figure 3 respectively [14-16].

The real world is filled with colorful images which has been a hot spot in the ream of edge detection studies by the increasingly fully development of the science and technology. According to the edge detection of color image, the original method is converting the color images to grayscale images, then using some classical operators that for grayscale images to identify the edge of images [17]. After that, using classical operators deal with red, green and blue three components respectively, and then combining those three colors by some specific procedure to shape the original edge of the image [18]. There are a lot of defects in these methods for color images detection, and the most widely used method at the moment is vector which have no need for decomposition of color components before combination and can conserving vectorial properties well. The effects of which are also the relatively well in recently, and its main view is taking

0

0

-1

1

1

-1

0

0

Figure 1. Roberts edge detection operator.

-1

0

1 -1

0

1 -1

0

1

-1

-1

-1 0

0

0 1

1

1

Figure 2. Prewitt edge detection operator

-1

0

1

-2

0

2

-1

0

1

-1

-2

-1

0

0

0

1

2

1

(3)

each pixels of the GRB image as a three-dimension vector, so the whole colored image is seemed as a vector field of two-dimensions and three-components. This paper is mainly talked about a frequently used vector gradient operator, whose thought is similar to gradient operator used in grayscale images, and the difference between them lies in the two- dimensions and three-components color vector space it used.

In the methods of using the vector gradient operator detect the edge of color images [19], supposing that the vector of color image representation as:

( )

(

( ) ( ) ( )

)

'

1 2 3

, , , , ,

f x y = f x y f x y f x y (5) Order r, g and b as f1, ,f2 f3 unit vector of three

components, then the horizontal and vertical operators may represent as shown below:

3

1 2 f

f f

x x x

∂ ∂

= + +

∂ ∂ ∂

u r g b (6) Then,

3

1 2 f

f f

y y y

∂ ∂

= + +

∂ ∂ ∂

v r g b (7)

( )

, f1 2 f2 2 f3 2

p x y

x x x

∂ ∂ ⎛ ⎞

⎛ ⎞ ⎛ ⎞

= =⎜ ⎟ +⎜ ⎟ +⎜

⎝ ⎠ ⎝ ⎠ ⎝ ⎠

u ui (8)

( )

, f1 2 f2 2 f3 2

q x y

y y y

⎛∂ ⎞ ⎛∂ ⎞ ⎛ ⎞

= =⎜ ⎟ +⎜ ⎟ +⎜

⎝ ⎠ ⎝ ⎠ ⎝ ⎠

v vi (9)

( )

3 3

1 1 2 2

,

t x y

f f f f f f

x y x y x y = ∂ ∂ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ∂ ∂ ∂ ∂ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ =⎜ ⎟+⎜ ⎟⎜ ⎟+ ⎟ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠

u vi

(10)

So pixel ( , )x y in the maximum change direction and the rate of change on these directions are as following:

1arctan 2 2

t

p q

α = ⎛⎜ ⎞⎟

⎝ ⎠ (11)

( )

(

) (

)

1 2

1 cos 2 2 sin 2 2

F

p q p q t

α α α = ⎧ + + + ⎫ ⎨ ⎣ ⎦⎬ ⎩ ⎭ (12)

The image edge is gained through threshold of ( )F α by this vector gradient method. According to tanα=tan(α π± ) , both α1and α1±π/ 2 are the maximum change direction of( , )x y . Obviously, F( )α

is not distinguished the direction local change of 180°.

III. THEEDGEDETECTIONOFCOLORIMAGE BASEDONHISCOLORMODEL

HIS color model better reflects the human visual experience on color, and for some images, the use of HIS color model can reduces the complexity of color image processing. Since the effects can be well changed as long as fine adjustment saturation component and brightness [20], therefore, in HIS color space, can greatly reduces the workload of edge detection of color image and meets the visual requirement [21]. In order to make further optimization in the detection effect, the improved HIS model can be got in the process of coordinate

transformation from RGB space to HIS space and under the condition of invariable tone, that is, no color displacement, improving the two components-saturation and brightness based on the practical application, the formula is as follows:

,

2 , .

B G H B G α π α ≤ ⎧ =⎨ − >

⎩ (13)

* 16 3

20

R G B

I = + + (14)

(

)

(

)

* 1 2 min , ,

5 max , , R G B S

R G B

⎡ ⎤

⎣ ⎦

= −

⎡ ⎤

⎣ ⎦ (15) In which,

1

2 2

( ) ( ) arccos

2 ( ) ( )( )

R G R B

R G R B G B

α ⎧ ⎫ − + − ⎪ ⎪ = ⎨ ⎬ ⎪ + ⎪ ⎣ ⎦ ⎩ ⎭ (16)

To study conveniently, the improved HIS model is called HI*S* model. By the following programs, we can convert the RGB model to the HI*S* model:

rgb=imread('D:\huoyan.jpg'); rgb=im2double(rgb); r=rgb(:,:,1); g=rgb(:,:,2); b=rgb(:,:,3); n=0.5*((r-g)+(r-b)); m=sqrt((r-g).^2+(r-b).*(g-b)); angle=acos(n./(m+eps)); H=angle; H(b>g)=2*pi-H(b>g); H=H/(2*pi); n=min(min(r,g),b); m=max(max(r,g),b); den(m==0)=eps; S=1-0.4.*n./m; H(S==0)=0; I=0.8*r+0.15*g+0.05*b; his=cat(3,H,S,I); imshow(his)

Similar to the original HIS model, we also need to do normalization process to each variable. Because RGB value are all in the [0, 1] scope, according to the above equation, we can know the luminance component I* and the saturation component S* must be in the range of [0, 1]. As for the tone component, 2π can be directly divided by its value.

Figure 4 is a comparison diagram on the edge detection of a flame picture, which through Matlab software implementation, combining the edge detection operator of Roberts, Prewitt and Sobel, also, in the use of vector gradient operator based on the HIS color model and the improved HI*S* model.

(4)

clc; close all; clear all;

f=imread('d:\huoyanGHIS.jpg'); sh=[1 0; 0 -1];

sv=[0 1; -1 0]; % roberts model OR: sh=[-1 -1 -1; 0 0 0; 1 1 1];

sv=[-1 0 1; -1 0 1; -1 0 1]; % prewitt model OR: sh=[-1 -2 -1; 0 0 0; 1 2 1];

sv=[-1 0 1; -2 0 2; -1 0 1]; % sobel model Rx=imfilter(double(f(:,:,1)),sh,'replicate'); Ry=imfilter(double(f(:,:,1)),sv,'replicate'); Gx=imfilter(double(f(:,:,2)),sh,'replicate'); Gy=imfilter(double(f(:,:,2)),sv,'replicate'); Bx=imfilter(double(f(:,:,3)),sh,'replicate'); By=imfilter(double(f(:,:,3)),sv,'replicate'); gxx=Rx.^2+ Gx.^2+ Bx.^2;

gyy=Ry.^2+ Gy.^2+ By.^2; gxy=Rx.*Ry+ Gx.*Gy+ Bx.*By; A=0.5*(atan(2*gxy./(gxx-gyy+eps)));

G1=0.5*((gxx+gyy)+(gxx-gyy).*cos(2*A)+2*gxy.*sin (2*A));

A = A+pi/2;

G2=0.5*((gxx+gyy)+(gxx-gyy).*cos(2*A)+2*gxy.*sin (2*A));

G1=G1.^0.5; G2=G2.^0.5;

VG=mat2gray(max(G1,G2)); VG=(VG>0.2).*VG;

figure; imshow(VG)

From Figure 4, edge detection with Prewitt and Sobel operators can be found to be much better than that with Roberts operators. Meanwhile, the quality in image edge detection based on the original HIS model and the improved HI*S* model can be easily detected, compared with the latter, the former lacks of many fake edges ,reduces much workload relatively and makes the edge effect much more clear.

IV. CONCLUSION

We mainly discussed HIS model. Although the HIS model is derived from the RGB model by nonlinear changes, the HIS model is relatively more consistent to perception, it is also helpful to reduce the complexity of edge detection. Meanwhile, the paper in the original model based on the HIS brightness and saturation components of the fine-tuning and further optimized by the new HIS-color model. Tests show that the improved one based on edge detection image effects model is relatively good, it removed a lot of false edges, further reducing the workload, while the edge effect is clearer. A bad thing is that detection of the defects is prone to break; making some of the edge is not continuous, causing the loss of the edge. At the same time that the improved method of application is limited, only for parts of the image, the parameters with the type of images is changed in order to achieve optimal results. So we can see that the current color models are not absolutely advantageous, we

are looking forward to the emerging of a new color model with certain advantages.

Due to the consideration of a great many challenges, such as, false edge, lose of edge or the distortion of edge in edge-detection, there will be difficult to strike a balance no matter the common used synthesis method or the present used dominant vector method. It is a practical good choice to improve and to merge the existing algorithms to get optimal edge detection effect.

ACKNOWLEDGMENT

The authors are greatly indebted to anonymous referees for their constructive comments. The work described in this paper was partially supported by the National Natural Science Foundation of China (Grant No.60873201) and Natural Science Foundation Project of CQ CSTC (Grant No. 2009BB2389), the Doctoral Foundation Project of Chongqing Normal University (Grant No.07XLB036) and the Applying Basic Research Programs of Chongqing Education Committee (Grant No. KJ110614 and No. KJ100623).

(a) HIS fig (b) HI*S* fig

(a1) Roberts (b1) Roberts

(a2) Prewitt (b2) Prewitt

(a3) Sobel (b3) Sobel

(5)

REFERENCES

[1] J.Z. Hua, J.G. Wang, H.Q. Peng, J.Y.Yang, “A Novel Edge Detection Method Based on PCA,” International Journal of Advancements in Computing Technology, Vol. 3,

pp.228-238, April 2011.

[2] T. Batard, C.Saint-Jean, M. Berthier, “A Metric Approach to nD Images Edge Detection with Clifford Algebras,” J Math Imaging Vis, Vol.33, pp.296–312, Mar 2009.

[3] X.H. Han, Y.W. Chen, “A robust method based on ICA and mixture sparsity for edge detection in medical images,” Signal Image and Video Processing, Vol.5,

pp.39–47, Mar 2011.

[4] S.S.Agaian, S. C. Nercessian, E. E. Danahy, “Boolean Derivatives With Application to Edge Detection for Imaging Systems,” IEEE Trans Systems, Man and Cybernetics—Part B: Cybernetics, Vol. 40, pp.371-382 ,

April 2010.

[5] H.Q.Li, X.F. Liao, C.D. Li, H.Y.Huang, C.J.Li, “Edge detection of noisy images based on cellular neural networks,” Communications in Nonlinear Science and Numerical Simulation, Vol. 16, pp.3746-3759, Sep 2011.

[6] J.Y.Xu,L.N.Ye, W.Luo, “Color Edge Detection Using Multi-scale Quaternion Convolution,” Int J Imaging Systems and tech, Vol. 20, pp.354–358, April 2010.

[7] K.C. Liu, “Color-Edge Detection Based on Discrimination of Noticeable Color Contrasts,” Int J Imaging Systems and tech, Vol.19, pp.332–339, April 2009.

[8] C.B. Gao, J.L. Zhou, J.R. Hu, F.N. Lang, “Edge detection of color image based on quaternion fractional differential,”

IET Image Process, Vol. 5, pp.261–272, April 2011.

[9] .Z.Y.Huang, G.M.Sun, F.Li, “Segmentation of traffic signs based on RGB visual model,” Microelectronics and computer, Vol.21, pp.147-149, July 2004.

[10].K.Zhong, X.B.Lu, Y.Shi, Y.T.Xian, “The movement of the vehicle shadow elimination based on YUV color space,” Transportation and computing, Vol.3, pp. 110-112,

March 2003.

[11].H.L.Zhang, Y.Li, H.S.Chang, “The pupil segmentation and face detection based on YCbCr model and morphology,” Computer simulation, Vol.5, pp.217-220,

June 2006.

[12].G.S.Liu, Z.Q.Lu, J.G.Xu, D.Y.Gao, “The stability analysis of several color models under different light conditions,”

The mini-micro computer system, Vol.35, pp. 882-885,

March 2002.

[13].W.Guo, H.J.Li, “Flame image segmentation based on HIS model,” Computer development and application, Vol.26,

pp.31-33, Sep 2009.

[14].Q.H.Wang, Digital Image Processing, Beijing: Beijing

University of Posts and Telecommunications Press, 2006, pp.101-103.

[15].P.G.Wu, J.H.Tong, Y.Liu,Y.Gao, Principles of Digital Image Processing, Beijing: China University of

Geosciences Press,2007, pp.169-175.

[16].F.Z.Liu, Q.Y.Wang, M.Zhu, Digital Image Processing and Analysis, Beijing: Tsinghua Press, 2006, pp.83-99.

[17].Y.Wu, D.J.Guo, Q.N.Liu, “A fast algorithm based on the HIS model deduction of Background Image,” Micro

computer application, Vol.21, pp.306-308, April 2006.

[18].D.Z.Xie, “Color images based on Canny edge detection theory,” Geophysical and Geochemical Exploration, Vol.7,

pp.370-373, Oct 2007.

[19].S.D.Chen, and K.Z.Liu, “Color image edge features and performance evaluation of face detection,” Journal of Software, Vol.5, pp.727-731, Aug 2005.

[20].Y.G.Tang, “The realize of the transformation between the GRB model and the Color image in VB,”. Technical information, Vol.11, pp.457-458, Dec 2009.

[21].J.S.Zhao, and L.Yang, “Automatic adjustment method for color image based on HIS color model,” Technical information, Vol.10, pp.102-104, May 2008.

Linhua Zhang was born in Sichuan

province, China in 1968. He received the BS degree and the MS degree in Mathematics from Southwest China University, Chongqing, China in 1990 and 1993, respectively. He received PhD degree in 2006 in technology for computer applications at Chongqing University, Chongqing, China.

From July 1993 to September 2007, he worked at Chongqing University, Chongqing, China. From October 2007 until now, he works as an associate professor at the Department of Mathematics, Chongqing Normal University, Chongqing, China. He has authored/coauthored more than 40 scientific papers. His current research interests include cryptography, chaos and digital watermarking.

Mr. Zhang is a fellow of Chinese Mathematical Society (CMS), Society for Industrial and Applied Mathematics (SIAM) and Chinese Computer Federation (CCF).

Xiuli Mao was born in Henan province,

China in 1987. She received the BS degree in Mathematics from Chongqing Normal University, Chongqing, China in 2010. She is current a master degree candidate in applied mathematics at Chongqing Normal university, Chongqing, China.

Chuanbin Zhou was born in Anhui

province, China in1987. He received the BS degree in Mathematics from China West Normal University, Sichuan, China in 2008, and he will receive the MA degree in Mathematics from Chongqing Normal University, Chongqing, China in 2011. Since 2008, he has published over 5 academic papers.

Ping Yu received the MS degree in system

Figure

Figure 3 respectively [14-16].
Figure 4 is a comparison diagram on the edge detection
Figure 4. Edge detection based on the improved HIS color space

References

Related documents

It is impressive to notice the low-tech sector has the same share of registered patents as high-tech and medium-high-tech sectors, though low-tech’s percentage of both

peripheral blood of Uygur patients in the acute and chronic phases of pigeon breeder’s lung.. Biqing Yu 1,2 , Xiaohong Yang 2 , Fengsen Li 3 *, Chao Wu 2 , Wenyi Wang 2 , Wei

A potential property buyer must obtain a non-encumbrance certificate from the Subregistrar’s Office, have a lawyer draft a sale’s deed, register the sale’s deed at

Fuzzy Logic Based Call Admission Control in 5G Cloud Radio Access Networks with Pre emption Sigwele et al EURASIP Journal on Wireless Communications and Networking (2017) 2017 157 DOI

The proposed algorithm of mathematical modeling was used for numerical analysis of the dynamics and evaporation of the droplet of water injected into a gas-vapor flow. Scheme

available or over-the-counter occlusal splints obtainable in commercial outlets for individuals in Chile, without the supervision of a professional, in stores or via the

S., Itakura, Y., and Kasahara, M.: Surface velocity vector field measurement of debris flow based on spa- tio temporal derivative space method, in: Debris-Flow Hazards