KR100307368B1 - Method for composing color space and quantizing color - Google Patents
Method for composing color space and quantizing color Download PDFInfo
- Publication number
- KR100307368B1 KR100307368B1 KR1019980019403A KR19980019403A KR100307368B1 KR 100307368 B1 KR100307368 B1 KR 100307368B1 KR 1019980019403 A KR1019980019403 A KR 1019980019403A KR 19980019403 A KR19980019403 A KR 19980019403A KR 100307368 B1 KR100307368 B1 KR 100307368B1
- Authority
- KR
- South Korea
- Prior art keywords
- max
- color
- value
- space
- values
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Processing (AREA)
Abstract
Description
본 발명은 이미지 처리를 위한 색좌표 변환 및 양자화 방법에 관한 것으로서 특히 RGB 색모델에서 HSV 색모델로의 변환방법과 HSV 색양자화 방법에 관한 것이다.The present invention relates to a color coordinate conversion and quantization method for image processing, and more particularly, to a method for converting from an RGB color model to an HSV color model and a method for HSV color quantization.
본 발명이 적용되는 예시로서 이미지 처리를 위한 시스템으로 근래에 이미지 (image)를 내용기반으로 검색하기 위한 활발한 연구가 이루어지고 있고 또한 상품화된 이미지 검색엔진이나 응용 프로그램들이 다양하게 제시되고 있다.As an example to which the present invention is applied, an active research for searching an image based on a content as a system for image processing has been made recently, and various commercialized image search engines and application programs have been proposed.
이러한 내용기반 이미지 검색에서 사용되는 가장 중요한 정보는 색정보이고, 이 색정보를 어떠한 방법으로 얼마나 정확하게 효율적으로 구해내는가에 따라서 이미지 검색엔진(응용프로그램)들의 성능이 좌우된다.The most important information used in such content-based image retrieval is color information, and the performance of image retrieval engines (applications) depends on how accurately and efficiently how to obtain this color information.
컴퓨터로 표현되는 색의 갯수는 나날이 급증하고 있으나 일반적으로 색은 그 보다 작은 수로 양자화(정량화)하여 사용한다.The number of colors represented by computers is increasing day by day, but in general, colors are quantized (quantified) to smaller numbers.
컴퓨터에서는 색을 적(R),녹(G),청(B)의 3원색을 기준으로 하는 이른바 색좌표공간(Color Space)으로 표현되지만, R,G,B는 사람의 시각적인 변화를 바로 표현하지 못하는 제약이 있기 때문에 대부분의 경우 색을 색상(Hue), 포화도 (Saturation), 크기(Value)의 HSV색공간으로 변환한 후에 사용하게 된다.In computer, colors are expressed as so-called color spaces based on the three primary colors of red (R), green (G), and blue (B), but R, G, and B express human visual changes. In most cases, color is converted to the HSV color space of Hue, Saturation, and Value.
도1은 RGB 색좌표공간에서 HSV 색좌표 공간으로의 변환방법과 HSV 색좌표공간의 구조를 나타낸다.1 shows a method of converting from an RGB color coordinate space to an HSV color coordinate space and a structure of the HSV color coordinate space.
RGB 색좌표공간에서 HSV 색좌표 공간으로의 변환방법은The conversion method from RGB color coordinate space to HSV color coordinate space is
max = MAX(r,g,b) : 입력 r,g,b값중 가장 큰 값.max = MAX (r, g, b): The largest value among the input r, g, b values.
min = MIN(r,g,b) : 입력 r,g,b값중 가장 작은 값.min = MIN (r, g, b): The smallest of the input r, g, b values.
v = max : 입력 r,g,b값중 가장 큰 값v = max: the largest of the input r, g, b values
s = (max-min)/max : 최대값과 최소값의 차 값을 최대값으로 정규화한 값s = (max-min) / max: Normalized value of difference between maximum value and minimum value
h = (g-b)/(max-min)*60 if(r=max. ∩.g-b≥0)h = (g-b) / (max-min) * 60 if (r = max. ∩.g-b≥0)
(g-b)/(max-min)*60+300 if(r=max. ∩.g-b<0)(g-b) / (max-min) * 60 + 300 if (r = max. ∩.g-b <0)
(2.0+(b-r)/(max-min))*60 if(g=max)(2.0+ (b-r) / (max-min)) * 60 if (g = max)
(4.0+(r-g)/(max-min))*60 if(b=max)(4.0+ (r-g) / (max-min)) * 60 if (b = max)
undifined (=gray clolr)if(max=min)undifined (= gray clolr) if (max = min)
단, 0 ≤r,g,b ≤1, 0 ≤v ≤1, 0 ≤s ≤1, 0 ≤h ≤360.However, 0 ≦ r, g, b ≦ 1, 0 ≦ v ≦ 1, 0 ≦ s ≦ 1, 0 ≦ h ≦ 360.
위의 과정을 수행하여 RGB-HSV 변환을 수행하면 도1에 도시된 바와같이 원통형의 공간으로 변환된다.When the RGB-HSV conversion is performed by the above process, it is converted into a cylindrical space as shown in FIG.
이 원통형의 HSV 색좌표공간에서 횡단면상의 원중심은 그레이(gray), 원의 가장 바깥쪽 테두리 부분은 순색으로서 원통의 반지름이 S, V축(+) 방향으로 밝은 색, V축(-) 방향으로 어두운 색(흑색), 그리고 원통의 중심을 지나는 축으로 부터의 각도는 H를 각각 표현하게 된다.In this cylindrical HSV color coordinate space, the center of the circle on the cross section is gray, the outermost edge of the circle is pure color, and the radius of the cylinder is bright in the S, V-axis (+) direction and in the V-axis (-) direction. The dark color (black) and the angle from the axis through the center of the cylinder represent H, respectively.
종래의 HSV 색공간에서도 같은 공간상에서 사람의 시각이 느끼는 색의 변화폭이 각각 다르게 나타나며, HSV 색공간상에서 색을 단순 양자화하게 되면 양자화된 색들이 모든 색을 고르게 표현하지 못하고 시각적 색변화를 고려하여 벡터 양자화하려면 양자화모델화의 어려움과 더불어 많은 계산량이 요구되어, 이 것을 이용한 내용기반 이미지 검색성능을 저하시키는 한 요인이 된다.Even in the conventional HSV color space, the change of color that human eyes feel in the same space is different, and when the quantized color is simply quantized in the HSV color space, the quantized colors do not represent all colors evenly and take into consideration the visual color change. Quantization requires a lot of computational complexity along with the difficulty of quantization modeling, which is one factor that degrades the content-based image retrieval performance.
예를 들면 HSV 색좌표공간인 원통의 바닥쪽으로 갈수록 흑색이 되는데 이 부분에서는 S축 방향인 원통의 반지름 방향으로 색이 분포된다고 해도 사람의 시각적 특성에 의해서 거의 색구분이 이루어지기 어렵다.For example, the color becomes black toward the bottom of the cylinder, which is the HSV color coordinate space. Even though the color is distributed in the radial direction of the cylinder in the S-axis direction, color separation is hardly achieved by human visual characteristics.
즉, 정량적, 수치적으로는 색구분이 이루어질 수 있다고 해도 낮은 V에서는 색차를 거의 인식하지 못하기 때문에 이러한 사람의 시감각적 특성에 상관없이 종래의 원통형 HSV 색좌표공간을 이용해서 색양자화를 수행한다면 위와같은 제약과 문제점을 그대로 안게 되는 것이다.That is, even if color separation can be made quantitatively and numerically, color difference is hardly recognized at low V. Therefore, if color quantization is performed using a conventional cylindrical HSV color coordinate space regardless of the visual and sensory characteristics of the person, You will have the same limitations and problems.
그러므로 모든 색영역을 고르게 분포시키면서 사람의 시각적인 관점에서 색의 변화가 고르게 나타나는 색공간 구조와 그 안에서의 색양자화 방법이 요구되고 있다.Therefore, there is a demand for a color space structure in which color changes are evenly distributed from the visual point of view of the human body, and a method of color quantization therein.
본 발명에서는 모든 색영역을 고르게 분포시키면서 사람의 시각적인 관점에서 색의 변화가 고르게 나타나도록 하기 위하여 RGB 색좌표공간에서 HSV 색좌표 공간으로의 변환시 V값에 따라 S의 최대값을 달리하는 S'(S'=max-min)를 정의하고, 이 S'를 한축으로 하는 HS'V 색좌표공간을 제공한다.In the present invention, S '(S) which varies the maximum value of S according to the V value when converting from the RGB color coordinate space to the HSV color coordinate space in order to uniformly distribute all the color gamuts and to make the color change appear evenly from a human visual point of view. '= max-min)' and provide HS'V color coordinate space with S 'as one axis.
본 발명은 내용기반 이미지 검색을 위하여 RGB로 표현되는 색은 우선 본 발명의 HS'V 색좌표공간으로 변환되며 이 새로운 색좌표공간상에서 색을 양자화하여 새로운 값으로 향상시킬 수 있도록 한 색양자화방법을 제공한다.The present invention provides a color quantization method in which a color represented by RGB for content-based image retrieval is first converted into the HS'V color coordinate space of the present invention and quantized in the new color coordinate space to be improved to a new value. .
도 1은 종래에 RGB 색좌표공간에서 HSV 색좌표공간으로의 변환을 나타낸 도면.BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a diagram showing a conventional conversion from an RGB color coordinate space to an HSV color coordinate space.
도 2는 본 발명의 색좌표변환방법을 나타낸 도면.2 is a view showing a color coordinate conversion method of the present invention.
도 3은 본 발명의 색좌표변환 원리를 나타낸 도면.3 is a diagram showing the principle of color coordinate transformation of the present invention.
본 발명의 색좌표 공간을 구성하는 방법을 도 2에 나타내었다.The method of configuring the color coordinate space of the present invention is shown in FIG.
도 2에 나타낸 바와 같이, 기존의 RGB 색좌표공간을 HS'V(단, S'=max-min) 색좌표공간으로 변환한다.As shown in Fig. 2, the existing RGB color coordinate space is converted into the HS'V (S '= max-min) color coordinate space.
여기서 S'=max-min으로 정의하여 입력 r,g,b 중에서 최대값인 것과 최소값인 것의 차값을 의미하도록 하였고, 도 3에 나타낸 바와 같이 종래의 HSV 색좌표(원통의 중심축을 지나는 종단면으로서 2차원 S-V 평면)와 비교해 볼때 원점(O)방향으로 c값을 오무린 형태가 된다.Here, S '= max-min is defined to mean the difference between the maximum value and the minimum value among the inputs r, g, and b, and as shown in FIG. 3, a conventional HSV color coordinate (a two-dimensional cross section through a central axis of a cylinder). Compared to the SV plane), the value c is folded into the origin (O) direction.
즉, 도 2와같이 아래쪽이 꼭지점이 되는 역원뿔 형태의 HS'V 색좌표공간 구조로 되며, RGB에서 HS'V로의 색좌표공간 변환을 하게 된다.That is, as shown in FIG. 2, the bottom cone has an inverted cone-shaped HS'V color coordinate space structure, and the color coordinate space conversion from RGB to HS'V is performed.
그러므로 RGB에서 HS'V로의 색좌표 공간변환은Therefore, the color coordinate space conversion from RGB to HS'V
max = MAX(r,g,b) : 입력 r,g,b값중 가장 큰 값.max = MAX (r, g, b): The largest value among the input r, g, b values.
min = MIN(r,g,b) : 입력 r,g,b값중 가장 작은 값.min = MIN (r, g, b): The smallest of the input r, g, b values.
v = max : 입력 r,g,b값중 가장 큰 값v = max: the largest of the input r, g, b values
s' = (max-min)/max * max = s*max = max-mins' = (max-min) / max * max = s * max = max-min
h = (g-b)/(max-min)*60 if(r=max. ∩.g-b≥0)h = (g-b) / (max-min) * 60 if (r = max. ∩.g-b≥0)
(g-b)/(max-min)*60+300 if(r=max. ∩.g-b<0)(g-b) / (max-min) * 60 + 300 if (r = max. ∩.g-b <0)
(2.0+(b-r)/(max-min))*60 if(g=max)(2.0+ (b-r) / (max-min)) * 60 if (g = max)
(4.0+(r-g)/(max-min))*60 if(b=max)(4.0+ (r-g) / (max-min)) * 60 if (b = max)
undefined (=gray color)if(max=min)undefined (= gray color) if (max = min)
단, 0 ≤r,g,b ≤1, 0 ≤v ≤1, 0 ≤s ≤1, 0 ≤h ≤360.However, 0 ≦ r, g, b ≦ 1, 0 ≦ v ≦ 1, 0 ≦ s ≦ 1, 0 ≦ h ≦ 360.
의 계산을 통해서 간단하게 이루어 질 수 있다.This can be done simply by calculating.
도 2에서 보이고 있는 바와 같이, 본 발명의 HS'V 색좌표 공간에서는 사람의 시감각적 특성에 합치되는 색양자화를 수행할 수 있게 된다.As shown in Figure 2, in the HS'V color coordinate space of the present invention it is possible to perform the color quantization matching the visual and sensory characteristics of the person.
즉, 사람의 시감각적 특성상 흰색쪽으로 갈수록 순색과 그레이(Gray) 및 색상의 색구분을 용이하게 할 수 있으므로, 이 부분은 HS'V 횡단면이 원판일때 그 지름과 단면적이 최대한 큰 영역을 가지게 되고, 상대적으로 흑색쪽으로 갈수록 순색과 그레이 및 색상의 구분이 이루어지지 않으므로(아주 어두운 색에 대해서는 그 색감이 거의 대동소이하게 보여진다) 이 부분은 HS'V 횡단면이 원판일때 그 지름과 단면적이 최소의 영역(궁극적으로는 꼭지점)을 가지게 되어, 이 부분에 대한 색 인덱스 맵핑을 기존의 HSV에서는 성기게 해야 하지만 본 발명의 HS'V에서는 이러한 문제를 해결할 수 있게 된다.In other words, as the human body senses its visual and visual characteristics, it is easy to distinguish between pure colors, grays, and colors, so that this part has an area with the largest diameter and cross-sectional area when the HS'V cross section is a disc. As the direction toward black is relatively indistinguishable, the distinction between pure color, gray and color is almost insignificant (the color is almost the same for very dark colors), and this part is the area where the diameter and cross-sectional area of the HS'V cross section is the minimum. (Ultimately vertices), the color index mapping for this portion should be sparse in the existing HSV, but this problem can be solved in the HS'V of the present invention.
색양자화는 상기 RGB로 부터 HS'V로의 변환을 수행하고, 상기 HS'V 색좌표공간상의 임의의 한 위치의 인덱스를 그 양자화값으로 맵핑시킴으로써 이루어진다.Color quantization is performed by performing conversion from the RGB to HS'V and mapping an index of any one position in the HS'V color coordinate space to its quantization value.
본 발명을 통해 제공되는 색좌표공간과 이 것을 이용한 색양자화 방법은 RGB에서 HSV로의 색좌표공간 변환시 V의 값에 따라 S의 최대값을 달리하는 S'(=max-min)을 정의하고 HS'V 색좌표공간으로의 변환후에 이 HS'V 색좌표 공간상에서 해당값의 인덱스를 가지도록 하므로써, 종래의 원통형 HSV 색좌표공간으로의 변환시의 문제점(낮은 V에서의 불필요한 색차)를 해결하였다.The color coordinate space provided through the present invention and the method of color quantization using the same define S '(= max-min) that varies the maximum value of S according to the value of V when converting the color coordinate space from RGB to HSV, and HS'V color coordinate. By converting the space into the HS'V color coordinate space after the conversion to the space, a problem (unnecessary color difference at low V) in the conventional cylindrical HSV color coordinate space is solved.
또한, HSV 전체 공간에서의 양자화 방법도 S'를 정의하므로써, 양자화 영역간의 보다 고른 색변화를 갖게 하여 양자화 효율을 높인다.In addition, the quantization method in the entire HSV space also defines S ', thereby increasing the quantization efficiency by providing a more even color change between the quantization regions.
Claims (3)
Priority Applications (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1019980019403A KR100307368B1 (en) | 1998-05-28 | 1998-05-28 | Method for composing color space and quantizing color |
US09/239,528 US6310969B1 (en) | 1998-05-28 | 1999-01-29 | Color coordinate space structure and color quantizing and variable gray area designating method therein |
EP99107415A EP0961489A1 (en) | 1998-05-28 | 1999-04-26 | Color coordinate space structure and color quantizing and variable gray area designating method therein |
JP14442899A JP3200705B2 (en) | 1998-05-28 | 1999-05-25 | Setting method of color coordinate space structure, color quantization and variable gray area |
CNB991078918A CN1161969C (en) | 1998-05-28 | 1999-05-28 | Color coordinate space structure and color quantizing and variable gray area designating method therein |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1019980019403A KR100307368B1 (en) | 1998-05-28 | 1998-05-28 | Method for composing color space and quantizing color |
Publications (2)
Publication Number | Publication Date |
---|---|
KR19990086431A KR19990086431A (en) | 1999-12-15 |
KR100307368B1 true KR100307368B1 (en) | 2001-11-30 |
Family
ID=37530425
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1019980019403A KR100307368B1 (en) | 1998-05-28 | 1998-05-28 | Method for composing color space and quantizing color |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100307368B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102676291B1 (en) * | 2023-06-28 | 2024-06-19 | 주식회사 카비 | Method and apparatus for automatic selection and auto-labeling of image frames from video data for building deep learning training data |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20010081894A (en) * | 2000-02-18 | 2001-08-29 | 구자홍 | Multimedia Query System And Histogram Converting System Based On Contents |
KR102329862B1 (en) | 2015-02-10 | 2021-11-23 | 삼성전자주식회사 | Method and electronic device for converting color of image |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR19990081410A (en) * | 1998-04-29 | 1999-11-15 | 구자홍 | Color coordinate space structure and color quantization method using this color coordinate |
-
1998
- 1998-05-28 KR KR1019980019403A patent/KR100307368B1/en not_active IP Right Cessation
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR19990081410A (en) * | 1998-04-29 | 1999-11-15 | 구자홍 | Color coordinate space structure and color quantization method using this color coordinate |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102676291B1 (en) * | 2023-06-28 | 2024-06-19 | 주식회사 카비 | Method and apparatus for automatic selection and auto-labeling of image frames from video data for building deep learning training data |
Also Published As
Publication number | Publication date |
---|---|
KR19990086431A (en) | 1999-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Hanbury | Constructing cylindrical coordinate colour spaces | |
JP3205836B2 (en) | Color quantization method using color coordinate space structure, color coordinates and color spraying | |
Cheng et al. | Color image segmentation based on homogram thresholding and region merging | |
CN108701217A (en) | A kind of face complexion recognition methods, device and intelligent terminal | |
JP3200705B2 (en) | Setting method of color coordinate space structure, color quantization and variable gray area | |
Jurio et al. | A comparison study of different color spaces in clustering based image segmentation | |
KR20050049007A (en) | Method and apparatus for color control in color image | |
JP2005216296A (en) | Method for retrieving multi-media using color quantization method based on hmmd color space | |
CN111476849A (en) | Object color recognition method and device, electronic equipment and storage medium | |
US6782127B1 (en) | Method of quantization in color space | |
Shah et al. | Image blurring and sharpening inspired three-way clustering approach | |
KR100307368B1 (en) | Method for composing color space and quantizing color | |
JP2003008912A (en) | Device and method for calculating color gamut, and storage medium | |
Chang et al. | Deformed trademark retrieval based on 2D pseudo-hidden Markov model | |
KR100307822B1 (en) | Method for quantizing color using color coordinates | |
CN117496254A (en) | Intelligent identification method, device and equipment for black tea fermentation state and storage medium | |
CN114998614B (en) | Image processing method, device and equipment and readable storage medium | |
CN115830343A (en) | Color identification method based on HSV color space | |
Pham | Spline-based color sequences for univariate, bivariate and trivariate mapping | |
CN112365485B (en) | Melanoma identification method based on Circular LBP and color space conversion algorithm | |
CN113658157A (en) | Color segmentation method and device based on HSV space | |
Bhurchandi et al. | An analytical approach for sampling the RGB color space considering physiological limitations of human vision and its application for color image analysis | |
CN110009647A (en) | A method of separation paper photo Central Plains topic stem and answer person's handwriting | |
Wibawa | Vector quantization based color blindness test images | |
CN112200242B (en) | Color classification method, computer equipment, terminal and medium for drawing Thangka image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20090619 Year of fee payment: 9 |
|
LAPS | Lapse due to unpaid annual fee |