KR20080058893A - Color to gray conversion method - Google Patents

Color to gray conversion method Download PDF

Info

Publication number
KR20080058893A
KR20080058893A KR1020060133090A KR20060133090A KR20080058893A KR 20080058893 A KR20080058893 A KR 20080058893A KR 1020060133090 A KR1020060133090 A KR 1020060133090A KR 20060133090 A KR20060133090 A KR 20060133090A KR 20080058893 A KR20080058893 A KR 20080058893A
Authority
KR
South Korea
Prior art keywords
gray
color
value
values
image
Prior art date
Application number
KR1020060133090A
Other languages
Korean (ko)
Inventor
김현철
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR1020060133090A priority Critical patent/KR20080058893A/en
Publication of KR20080058893A publication Critical patent/KR20080058893A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/40Picture signal circuits
    • H04N1/40012Conversion of colour to monochrome
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/40Picture signal circuits
    • H04N1/405Halftoning, i.e. converting the picture signal of a continuous-tone original into a corresponding signal showing only two levels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • H04N1/6002Corrections within particular colour systems
    • H04N1/6005Corrections within particular colour systems with luminance or chrominance signals, e.g. LC1C2, HSL or YUV

Abstract

A color to gray conversion method is provided to discriminate neighboring different colors through effective gray conversion when printing a color image in gray. A color to gray conversion method comprises the following steps of: preparing an original color image which will be outputted in a mono type(40); converting the same gray values into different gray values by performing gray conversion for the color image(45); performing halftoning after the gray conversion(46); and printing halftoned data in gray(47).

Description

컬러대그레이 변환 방법{Color to gray conversion method}Color to gray conversion method

도 1은 기존의 스캐닝 방법을 설명하기 위한 흐름도이다.1 is a flowchart illustrating a conventional scanning method.

도 2는 일반적인 컬러이미지를 도시한 도면이다.2 is a diagram illustrating a general color image.

도 3은 도 2의 컬러이미지의 그레이 변환된 이미지를 도시한 도면이다.FIG. 3 is a diagram illustrating a gray converted image of the color image of FIG. 2.

도 4는 본 발명의 컬러대그레이 변환 알고리즘을 설명하기 위한 흐름도이다.4 is a flowchart illustrating a color to gray conversion algorithm of the present invention.

도 5는 본 발명의 같은 그레이레벨을 가지는 컬러이미지들의 레이블링을 하기 위한 대상 픽셀의 가상 연산마스크를 도시한 도면이다.FIG. 5 is a diagram illustrating a virtual operation mask of a target pixel for labeling color images having the same gray level according to the present invention.

도 6은 도 5의 대상 픽셀의 가상 연산마스크를 가지고 본 발명의 레이블링 알고리즘을 설명하기 위한 도면이다.FIG. 6 is a diagram for describing a labeling algorithm of the present invention with a virtual operation mask of a target pixel of FIG. 5.

도 7 내지 도 9는 도 7의 레이블링 알고리즘을 통해 본 발명의 효과를 설명하기 위하여 원컬러이미지, HIS컬러 공간이미지, 레이블링 알고리즘 이미지를 각각 도시한 도면이다.7 to 9 illustrate one color image, an HIS color space image, and a labeling algorithm image, respectively, to explain the effect of the present invention through the labeling algorithm of FIG. 7.

도 10 내지 도 12는 본 발명의 백그라운드 조정 처리의 실제 예를 도시하기 위하여, 원컬러이미지, 본 발명의 백그라운드 조정 처리 결과 이미지, 및 기존 방법에 의한 이미지를 도시한 도면이다. 10 to 12 are diagrams showing a primary color image, a background adjustment process result image of the present invention, and an image by an existing method, to show a practical example of the background adjustment process of the present invention.

본 발명은 컬러 이미지를 흑백으로 인쇄할 때에 인접한 이미지들이 구별이 되도록 처리하는 컬러대그레이 변환 방법에 관한 것으로, 구체적으로는 컬러 이미지의 R,G,B 의 값이 같은 흑백(그레이) 값으로 계산 또는 사상(Mapping) 되더라도 컬러 색상적으로 다른 두 이미지가 인접한 곳에 위치해 있을 때 상호 다른 흑백(그레이)으로 구별되도록 출력하는 컬러대그레이 변환 방법에 관한 것이다.The present invention relates to a color-to-gray conversion method that processes adjacent images to distinguish when a color image is printed in black and white. Specifically, the R, G, and B values of the color image are calculated as the same black and white (gray) value. Alternatively, the present invention relates to a color-to-gray conversion method that outputs two different images to be distinguished from each other in black and white (gray) even when mapped to two different colors.

기존의 컬러 이미지(Color Image)를 그레이(그레이)로 변환하여 출력하는 동작은 다음 수학식 (1)과 같이 이루어진다.The operation of converting an existing color image to gray (gray) and outputting is performed as in Equation (1) below.

그레이(x,y) = 0.30*R(x,y) + 0.59*G(x,y) + 0.11*B(x,y)Gray (x, y) = 0.30 * R (x, y) + 0.59 * G (x, y) + 0.11 * B (x, y)

먼저 R,G,B 로 구성된 컬러 이미지에서 픽셀 위치 x,y 의 R,G,B 값을 상기 수학식에 따라 일반적인 그레이 계산 방법으로 변환한다. 이 변환식에서의 상수 값은 약간씩 다르나, 여기서 R,G,B 각각에 대해서 0.30. 0.59. 0.11을 예로 하고 있다.First, the R, G, B values of the pixel positions x, y in the color image composed of R, G, B are converted into a general gray calculation method according to the above equation. The constant values in this conversion are slightly different, where 0.30 for each of R, G, and B. 0.59. 0.11 is taken as an example.

이를 도 1을 참조하여 종래의 컬러 이미지를 그레이로 변환하여 프린팅하는 예를 설명하기로 한다.An example of converting and printing a conventional color image into gray will be described with reference to FIG. 1.

도 1에 의하면, 입력된 컬러 이미지(10)는 상기 수학식 (1)과 같은 컬러대그레이 변환 방법으로 변환되고(12), 그 계산된 그레이(x,y) 값은 그레이 감마 테이블(14)을 거쳐 프린터 엔진에 맞는 그레이 값으로 변환되고, 그레이 디도 하프토닝 테이블(그레이 dither 하프토닝 table) 에 따라 그레이 하프토닝(16)을 통해 이진 화된 다음 프린터로 전송되어 인쇄된다(18).According to FIG. 1, the input color image 10 is converted by a color-to-gray conversion method such as Equation (1), and the calculated gray (x, y) value is represented by the gray gamma table 14. The gray value is converted into gray values suitable for the printer engine through the gray half toning table 16, and then transmitted to the printer and printed (18) according to the gray dither half toning table.

R,G,B 컬러 값에 대한 그레이 변환 식은 여러 가지 있지만, 상기 수학식 (1)에서 알 수 있는 것처럼, R,G,B 값은 다르지만, 결과적으로 그레이 변환후 같은 그레이값을 가질 수 있는 경우의 수가 발생한다. Although there are various gray conversion formulas for R, G, and B color values, as shown in Equation (1), R, G, B values are different, but as a result, they may have the same gray value after gray conversion. Will occur.

도 2 및 도 3에 도시한 바와 같이 만약, 이러한 R,G,B 값의 그레이 변환 후 두 컬러 이미지(도 2)가 바로 옆에 인접되어 있으면, 같은 그레이 값으로 계산되기 때문에 모노(mono)로 인쇄된 출력물에서 이미지의 차이가 없어지게 되어 구별이 잘되지 않게 된다(도 3). 또한, 만약 어떤 알고리즘을 사용하여 컬러가 다른 두 색상이 같은 그레이로 변환되는 것을 다른 그레이 값으로 출력되게 하더라도 프린터 특성에 따라 사용자의 눈에 느끼는 두 그레이의 출력물이 같아지게 보이거나, 그레이에 대한 감마 테이블(Gamma Table)을 가지고 있다면 원하는 계산된 그레이만 달라질 뿐, 결국 프린터로 가는 하프토닝된 값은 의미가 없어지게 되어, 최종 출력물에서는 서로 구별이 되지 않게 된다.As shown in Figs. 2 and 3, if two color images (Fig. 2) are immediately adjacent to each other after the gray conversion of the R, G, and B values, they are calculated as the same gray values, so they are mono. In the printed output, there is no difference in the image, so that the distinction is difficult (Fig. 3). Also, even if an algorithm is used to output two different colors that are converted to the same gray color, the output of the two grays that the user sees may look the same or be gamma-gray depending on the characteristics of the printer. If you have a Gamma Table, only the calculated gray you want will be different, and the half-toned values going to the printer will be meaningless, and you will not be able to distinguish them in the final output.

기타 선행기술들로서는 한국공개특허 2002-057825에는 복수의 색을 갖는 화상 데이터 등으로 이루어지는 원 데이터를 구성하는 컬러 데이터를 각각 휘도 데이터로 변환하고, 프린터로 인쇄할 수 있는 색을 각 화소의 휘도 레벨에 따라 각 화소에 할당함으로써 원데이터 화상의 휘도 레벨을 기준으로 인쇄 데이터를 작성하는 것이 가능한 화상처리장치 및 그 방법이 개시되어 있다.As other prior arts, Korean Patent Laid-Open Publication No. 2002-057825 converts color data constituting original data consisting of image data having a plurality of colors and the like into luminance data, and converts colors that can be printed by a printer into luminance levels of respective pixels. Disclosed is an image processing apparatus and method capable of creating print data based on a luminance level of an original data image by allocating to each pixel.

다른 한국공개특허 2000-066828에는 연속 계조 화상의 화소값과 역치화된 이치 화소값 간의 계조 오차값을 기설정된 가중치에 따라 인접 화소들에 확산시켜 이 치화를 수행하는 오차 확산방법에서 중간조 처리를 수행하고자 하는 주목 화소값에 인접한 주변 화소의 계조 오차값을 감산 후, 랜덤값을 산출한 다음 제1 수정 주목 화소값에 가산하여 제2 수정 주목 화소값을 산출하여 오차 확산 처리를 수행하는 방법이 개시되어 있다.In another Korean Patent Laid-Open Publication No. 2000-066828, halftone processing is performed in an error diffusion method in which a gray scale error value between a pixel value of a continuous gray scale image and a thresholded binary pixel value is diffused to adjacent pixels according to a predetermined weight to perform binarization. After subtracting the gradation error value of the neighboring pixel adjacent to the pixel value of interest to be performed, a random value is calculated and then added to the first correction pixel value to calculate the second correction pixel value to perform an error diffusion process. Is disclosed.

한편, 일본공개특허 2005-246665에는 인화한 화상 데이터 중에 혼재한 이미지 부분과 텍스트 부분으로부터 텍스트 부분을 추출한 식별 수단과 식별 수단에 의하여 추출된 텍스트 부분의 농도 인식 수단과 농도 인식 수단에 근거하여, 텍스트 부분의 농도를 최대 농도 또는 최소 농도로 하는 농도 변환 수단과 2 개 이상의 잉크에 의하여 무채색을 얻어 그레이 스케일로 인화 가능한 인화 수단을 구비한 특징을 가진 화상형성장치가 개시되어 있다.On the other hand, Japanese Laid-Open Patent Publication No. 2005-246665 discloses text based on an identification means for extracting a text portion from an image portion and a text portion mixed in the printed image data and a density recognition means and a density recognition means for the text portion extracted by the identification means. Disclosed is an image forming apparatus having a density converting means for making the density of a portion the maximum density or the minimum density, and a printing means capable of obtaining achromatic color by two or more inks and printing them in gray scale.

또한, 미국특허 5,737,453에는 각 그레이 레벨값에 대해 다른 오차 분산 매트릭스를 제공하여 원화상의 목표 픽셀의 그레이 레벨값에 따라 오차 분산 매트릭스를 선택하여 오차 확산 하프토닝을 처리하는 장치가 개시되어 있다.In addition, US Patent No. 5,737, 453 discloses an apparatus for processing error diffusion halftoning by providing a different error dispersion matrix for each gray level value and selecting an error dispersion matrix according to the gray level value of the target pixel of the original image.

이들 모두 컬러 이미지의 그레이 변환값이 동일한 경우 출력에 구별이 되지 않는 경우에 대한 가르침은 없었다.There was no teaching on the case where they were indistinguishable in the output when the gray conversion values of the color images were the same.

본 발명은 상술한 종래의 문제점들을 달성하기 위하여 컬러 이미지를 그레이로 출력할 경우 색상이 전혀 다른 두 이미지가 인접해 있을 경우 두개의 컬러 이미지의 컬러대그레이 변환값이 같아지지 않도록 보다 효과적으로 변환된 그레이값을 다른 값으로 변환하여 두 색상이 모노(단일컬러:Mono) 컬러로 출력시에도 구분할 수 있도록 하는 컬러대그레이 변환 방법을 제공하는 것을 목적으로 한다.According to the present invention, in order to achieve the above-described problems, when a color image is output in gray, when two images having completely different colors are adjacent to each other, the gray is more effectively converted so that the color-to-gray conversion values of the two color images are not the same. It is an object of the present invention to provide a color-to-gray conversion method that converts a value to another value so that two colors can be distinguished even when outputted in mono (mono) color.

상기 기술적 과제를 달성하기 위하여, 본 발명은 컬러대그레이 변환 방법에 있어서, 크게는 모노로 출력하고자 하는 원본 컬러 이미지 준비 단계, 컬러 이미지에 대해 그레이 변환하여 동일한 그레이값을 상호 다른 그레이값으로 변경하는 단계, 및 그레이 변환 후 하프토닝 단계, 하프토닝된 데이타를 그레이로 출력하는 단계로 구성된다.In order to achieve the above technical problem, the present invention, in the color-to-gray conversion method, the step of preparing the original color image to be largely output in mono, by converting the gray for the color image to change the same gray value to different gray values And a halftoning step after the gray conversion, and outputting the halftoned data in gray.

세부적으로는, 상기 그레이 값 변환 및 변경 단계는 그레이 변환을 할 때 HIS (색상, 명도, 채도: Hue, Intensity, Saturation) 컬러 공간(Color Space) 에서의 색상값을 에지연산자의 입력값으로 사용하는 단계; 이 에지값을 이용하여 레이블링 (Labeling) 연산자를 통하여 일련의 동일한 그레이 값을 가진 객체를 구분하는 단계; 및 구분된 위치들의 거리를 계산하여 그레이 값을 조정할지의 여부를 판단하는 단계를 포함한다.Specifically, the gray value conversion and change step uses the color value in the HIS color (Color, Brightness, Saturation: Hue, Intensity, Saturation) color space as the input value of the edge operator. step; Distinguishing objects having a series of identical gray values through a labeling operator using the edge values; And determining whether to adjust the gray value by calculating the distances of the separated locations.

바람직하기로는 그레이 값에 대한 레이블링된 값들의 픽셀 위치들의 거리가 특정 값 이상이면 그레이값을 변경시키지 않음을 특징으로 한다.Preferably, the gray value is not changed if the distance of the pixel positions of the labeled values to the gray value is greater than or equal to the specific value.

이하 첨부된 도면을 참조하여 본 발명의 동작에 대하여 보다 상세하게 설명하기로 한다.Hereinafter, the operation of the present invention will be described in detail with reference to the accompanying drawings.

프린터의 출력시 사용자가 컬러 이미지를 모노 이미지로 출력하기를 원해서, 출력 신호를 누르면 컬러 이미지 전체의 R,G,B 데이타가 메모리 버퍼로 전송된다. 전체 이미지에 대해서 HIS 컬러 공간으로 변환한다. HIS 컬러 공간으로의 변환 공 식은 다양하게 적용할 수 있으나 일반적으로 다음의 수학식 (2)와 같다. When the printer outputs, the user wants to output a color image as a mono image. When the output signal is pressed, R, G, and B data of the entire color image are transferred to the memory buffer. Convert to HIS color space for the entire image. The conversion formula to the HIS color space can be applied in various ways, but is generally as shown in Equation (2) below.

I = (R+G+B)/3I = (R + G + B) / 3

S = 1 - 3*min(R,G,B)S = 1-3 * min (R, G, B)

H = COS-1 [ {(R-G)-(R-B){ / {2*sqrt((R-G)^2 + (R-B)(G-B)) } ]H = COS -1 [{(RG)-(RB) {/ {2 * sqrt ((RG) ^ 2 + (RB) (GB))}]

여기서, I는 명도, S는 채도, H는 색상이며, 0 ≤ R,G,B ≤ 1.0을 만족한다. min은 최소값을 취하는 함수이고, squart는 제곱근의 함수이다.Here, I is brightness, S is saturation, H is hue, and satisfies 0 ≦ R, G, B ≦ 1.0. min is the function that takes the minimum value, and squart is the function of the square root.

위 변환 공식에 의해 전체 이미지에서 해당 위치 x,y 의 픽셀값 R,G,B(x,y) 에 대한 HSI(x,y) 를 구할 수 있다. 이 식에서 색상이 다른데 휘도 즉, I 가 같은 값을 찾아야 하므로 다음과 같은 후보 영역의 x,y 집합을 구할 수 있으며, 위 식에서 휘도 I의 값은 같으나, 색상 H(x,y) 가 다른 곳의 후보 영역을 찾을 수 있다.By using the above conversion formula, HSI (x, y) for the pixel values R, G, B (x, y) of the corresponding position x, y in the entire image can be obtained. In this equation, since the colors are different and luminance, i.e., I must find the same value, we can find the x, y set of candidate regions as below.In the above equation, luminance I is the same, but color H (x, y) is different Candidate areas can be found.

이 식을 만족하는 집합을 0~255 까지의 그레이 레벨(Level)을 표현하는 8비트 처리 시스템에서 각 그레이 레벨에 대해 식을 만족하는 집합은 다음의 수학식 (3)을 나타낼 수 있다.In an 8-bit processing system expressing a gray level from 0 to 255 as a set that satisfies this expression, a set that satisfies the expression for each gray level may be represented by Equation (3) below.

HI [그레이Level] = { H0(x0,y0), H1(x1,y1), H2(x2,y2).... }HI [grayLevel] = {H0 (x0, y0), H1 (x1, y1), H2 (x2, y2) ....}

즉, 이 식의 의미는 그레이 레벨은 같지만, 색상이 틀린 영역이 x0,y0 의 픽셀과, x1,y1의 픽셀값, x2,y2 의 픽셀값 등등이 있으며 그 픽셀값의 색상(h) 값은 각각 H0,H1,H2,.. 임을 의미한다. In other words, the meaning of this expression is the same gray level, but there are pixels of x0, y0, pixels of x1, y1, pixels of x2, y2, etc., where the color is different. Mean H0, H1, H2, ... respectively.

그러면, 색상은 다르지만 그레이 레벨 값이 같은 지점을 알 수 있다. 그러나, 이것을 특별하게 처리를 해야하는지 말아야 하는지에 대해서 고민해야 한다. 만약, 두 컬러의 색상이 다르고, 그 그레이 값이 같다 하더라도, 이 두 컬러의 거리가 전체 이미지에서 볼 때 상호 넓게 떨어져 있다면 그레이 값을 달리하여 구분짓지 않더라고 중간에 다른 컬러 이미지에 의한 그레이 값들이 이 두 컬러를 구분 지어주게 되어 상호 구별될 수 있기 때문이다.Then, you can see where the colors are different but the gray level values are the same. However, you have to worry about whether you should do this specially. If the colors of the two colors are different and the gray values are the same, but if the distances of these two colors are far apart from each other when viewed in the whole image, the gray values from the other color images are not distinguished in the middle. This is because the two colors can be distinguished from each other.

그레이 변환 이전에 두 색상을 구분시켜주는 것은 두 컬러의 윤곽선이며, 이 두 윤곽선은 색상값에 의한 윤곽선으로 보아도 무방하다. 따라서, 전체 HIS 컬러 공간으로부터 색상(Hue)에 대한 윤곽선 값을 얻을 수 있다. 이 때의 공식은 일반적인 윤곽선 검출 연산자를 사용해도 무방하다.What distinguishes the two colors before the gray conversion is the outline of the two colors, which can be seen as the outline of the color values. Thus, an outline value for Hue can be obtained from the entire HIS color space. In this case, the general contour detection operator may be used.

도 4에 따르면, 컬러 이미지가 준비된 후(40), 상술한 바와 같이 윤곽선 검출 연산자를 사용하여, 전체 색상값에 대한 에지값을 구하고(41), 이 에지값에 대해 특정 임계치값 이상을 넘는 픽셀 x,y 의 값을 E(x,y) 라고 하면 E(x,y) 값은 다음의 수학식 (4)와 같다.According to FIG. 4, after the color image is prepared (40), an edge value for the entire color value is obtained (41) using the contour detection operator as described above, and the pixels exceeding a certain threshold value or more for this edge value. When the value of x, y is called E (x, y), the value of E (x, y) is expressed by the following equation (4).

E(x,y) = 1 IF EdgeValue(x,y) > T (임계치)E (x, y) = 1 IF EdgeValue (x, y)> T (threshold)

E(x,y) = 0 elseE (x, y) = 0 else

다음, 각 그레이 컬러 영역에서 같은 그레이 레벨 값을 가지는 컬러들을 레이블링(Labeling)연산을 하며, 여기에서 연산을 하기 위한 대상 픽셀 위치 P(x,y) 에 대한 인덱스(Index)는 P4 이고 그 가상의 연산 마스크는 도 5에 도시되어 있다.Next, labeling operations of colors having the same gray level value in each gray color area are performed, and the index to the target pixel position P (x, y) for operation is P4 and the virtual The operational mask is shown in FIG.

본 발명에서 같은 레이블링을 하기 위한 알고리즘은 도 6에 도시한 바와 같이 상하좌우 4개 방향에 대해, 즉 전체 이미지에 대해 스캔하며 연산한다. In the present invention, the algorithm for labeling is calculated by scanning in four directions of up, down, left and right, that is, the entire image, as shown in FIG. 6.

즉, Top-> Bottom and Left → Right (TBLR), Top->Bottom and Right → Left (TBRL), Bottom->Top and Left->Right (BTLR), Bottom->Top and Right->Left 이다. 또한, 여기서 얻어지는 값은 레이블[그레이] 라고 표현한다.That is, Top-> Bottom and Left → Right (TBLR), Top-> Bottom and Right → Left (TBRL), Bottom-> Top and Left-> Right (BTLR), Bottom-> Top and Right-> Left. In addition, the value obtained here is represented by a label [gray].

레이블링 알고리즘은 다음과 같다.The labeling algorithm is as follows.

(Labeling algorithm)(Labeling algorithm)

For GrayLevel = 0 To 255For GrayLevel = 0 To 255

LabelIndex = 0LabelIndex = 0

If H(x,y) is one of elements of HI[GrayLevel] If H (x, y) is one of elements of HI [GrayLevel]

If E(x,y) != 0 ThenIf E (x, y)! = 0 Then

If TBLR calculationIf TBLR calculation

P4 = P1*P3*(P0+P3)P4 = P1 * P3 * (P0 + P3)

If TBRL calculationIf TBRL calculation

P4 = P1*P5*(P2+P5)P4 = P1 * P5 * (P2 + P5)

If BTLR calculationIf BTLR calculation

P4 = P7*P3*(P6+P3)P4 = P7 * P3 * (P6 + P3)

If BTRL calculationIf BTRL calculation

P4 = P7*P5*(P8+P5)P4 = P7 * P5 * (P8 + P5)

If P4 >= 1 Then P4 = 1If P4> = 1 Then P4 = 1

Copy of E(x,y) = P4Copy of E (x, y) = P4

If P4 = 1 for all scan direction Then If P4 = 1 for all scan direction Then

Next GrayLevelNext GrayLevel

위 레이블링 연산을 통해 도 7내지 도 9에 도시한 바와 같은 효과를 얻을 수 있다. 도 7은 원래의 컬러 이미지로서, 위의 2개의 인접한 원은 색상이 H0(파랑)과 H1(보라)으로 상이하나 그레이값은 G0로 동일하고, 아래의 2개의 인접한 원은 색상이 H2(하늘색)과 H3(노랑)으로 상이하나 그레이값은 G3로 동일하므로, HIS컬러 공간 이미지로 변환시 도 8에 도시된 바와 같이 인접한 영역에서의 그레이 값이 동일하므로 구별이 되지 않았다. 그러나, 도 9에 도시한 바와 같이 레이블링 알고리즘에 의한 이미지 변환시에는 인접한 영역에서의 그레이값의 변화가 a, b로 차이가 있게 된다.Through the labeling operation, an effect as shown in FIGS. 7 to 9 can be obtained. 7 is the original color image, where the two adjacent circles above are different in color from H0 (blue) and H1 (purple), but the gray values are the same as G0, and the two adjacent circles below are in color H2 (light blue). ) And H3 (yellow), but because the gray value is the same as G3, the gray value in the adjacent area is the same as shown in Figure 8 when converted to HIS color space image was not distinguished. However, as shown in Fig. 9, in the image conversion by the labeling algorithm, the change of the gray value in the adjacent area is different between a and b.

도 4를 다시 참조하면, 마지막으로, 동일한 그레이 레벨에 서로 다른 레이블링이 되어 있는 픽셀의 거리를 계산한다(43). 그런 다음, 그레이 값의 변경이 필요한지를 체크한다(44). 만약 어떤 그레이 값에 대한 레이블링된 값들의 픽셀 위치들의 거리가 특정 값 이상이면 그레이값을 변경시키지 않는다.Referring back to FIG. 4, finally, the distance of pixels with different labeling at the same gray level is calculated (43). Then it is checked if a change in gray value is needed (44). If the distance of the pixel positions of the labeled values for a certain gray value is more than a certain value, then the gray value is not changed.

즉, 그러한 알고리즘은 다음과 같이 구성된다.That is, such an algorithm is constructed as follows.

(그레이값 변경 알고리즘)(Gray value change algorithm)

For all element of each Label[Gray] a vs. Label[Gray] bFor all element of each Label [Gray] a vs. Label [Gray] b

If Distance between a(x,y) and b(x,y) < TIf Distance between a (x, y) and b (x, y) <T

change Gray of one of Label[Gray]change Gray of one of Label [Gray]

ElseElse

Skip Skip

위 알고리즘을 통해서, 인접한 그레이 레벨의 그레이 값을 변환시킬 수 있다. 이는 도 10 내지 도 12에 도시하였다.With the above algorithm, we can convert the gray values of adjacent gray levels. This is illustrated in FIGS. 10 to 12.

도 7 내지 도 9에서 설명한 것과 마찬가지로, 도 10은 원래의 컬러 이미지로서, 위의 2개의 인접한 원은 색상이 H0(파랑)과 H1(보라)으로 상이하나 그레이값은 G0로 동일하고, 아래의 2개의 인접한 원은 색상이 H2(하늘색)과 H3(노랑)으로 상이하나 그레이값은 G3로 동일하므로, 기존 방법에 의하여 변환시 도 12에 도시된 바와 같이 인접한 영역에서의 그레이 값이 동일하므로 상호 인접한 원의 영역이 구별되지 않았다. 그러나, 도 11에 도시한 바와 같이 본 발명의 레이블링 알고리즘 및 픽셀 위치까지의 거리에 의한 이미지 변환시에는 인접한 영역에서의 그레이값의 변화에 차이를 표시할 수가 있게 된다. 즉, 위의 인접한 원들은 상호 다른 그레이값을 변경처리되어 구별되게 하였으며, 아래의 인접한 원들은 상호 동일한 그레이값으로 적용하여 구별되지 않도록 하였다.As shown in Figures 7-9, Figure 10 is the original color image, where the two adjacent circles above have different colors in H0 (blue) and H1 (purple) but the gray values are the same in G0, The two adjacent circles differ in color from H2 (light blue) and H3 (yellow), but the gray value is the same as G3. Therefore, the gray values in the adjacent areas are the same as shown in FIG. The area of the circle was not distinguished. However, as shown in Fig. 11, in the image conversion by the labeling algorithm of the present invention and the distance to the pixel position, the difference can be displayed in the change of the gray value in the adjacent region. In other words, the above adjacent circles are distinguished by different gray values, and the below adjacent circles are applied to the same gray value so that they are not distinguished.

상술한 바와 같이, 본 발명을 통하여, 컬러 이미지를 그레이로 인쇄할 때, 인접한 다른 색상의 컬러를 효과적인 그레이 변환을 통하여 구분할 수 있도록 출력할 수 있다.As described above, according to the present invention, when printing a color image in gray, it is possible to output the color of another adjacent color to be distinguished through an effective gray conversion.

Claims (3)

컬러대그레이 변환 방법에 있어서, In the color to gray conversion method, 모노로 출력하고자 하는 원본 컬러 이미지 준비 단계;Preparing an original color image to be output in mono; 컬러 이미지에 대해 그레이 변환하여 동일한 그레이값을 상호 다른 그레이값으로 변경하는 단계;Gray converting the color image to change the same gray value to different gray values; 그레이 변환 후 하프토닝 단계; 및Halftoning after gray conversion; And 하프토닝된 데이타를 그레이로 출력하는 단계를 포함하는 컬러대그레이 변환방법.And outputting the half-toned data in gray. 제1항에 있어서, 상기 그레이 값 변환 및 변경 단계는 The method of claim 1, wherein the converting and changing the gray value is performed. 그레이 변환을 할 때 HIS (색상, 명도, 채도: Hue, Intensity, Saturation) 컬러 공간(Color Space) 에서의 색상값을 에지연산자의 입력값으로 사용하는 단계; Using a color value in an HIS (Hue, Intensity, Saturation) color space as an input value of an edge operator when converting gray; 이 에지값을 이용하여 레이블링 (Labeling) 연산자를 통하여 일련의 동일한 그레이 값을 가진 객체를 구분하는 단계; 및Distinguishing objects having a series of identical gray values through a labeling operator using the edge values; And 구분된 위치들의 거리를 계산하여 그레이 값을 조정할지의 여부를 판단하는 단계를 포함하는 것을 특징으로 하는 컬러대그레이 변환방법.And determining whether to adjust the gray value by calculating the distance of the separated positions. 제2항에 있어서, 그레이 값에 대한 레이블링된 값들의 픽셀 위치들의 거리가 특정 값 이상이면 그레이값을 변경시키지 않음을 특징으로 하는 컬러대그레이 변환 방법.3. The method of claim 2, wherein the gray value is not changed if the distance of pixel positions of the labeled values to the gray value is greater than or equal to a specific value.
KR1020060133090A 2006-12-22 2006-12-22 Color to gray conversion method KR20080058893A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060133090A KR20080058893A (en) 2006-12-22 2006-12-22 Color to gray conversion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060133090A KR20080058893A (en) 2006-12-22 2006-12-22 Color to gray conversion method

Publications (1)

Publication Number Publication Date
KR20080058893A true KR20080058893A (en) 2008-06-26

Family

ID=39804191

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060133090A KR20080058893A (en) 2006-12-22 2006-12-22 Color to gray conversion method

Country Status (1)

Country Link
KR (1) KR20080058893A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011081226A1 (en) * 2009-12-29 2011-07-07 포항공과대학교 산학협력단 Method for converting color image to gray-scale image and recording medium in which program for performing same is recorded
KR101675030B1 (en) * 2015-05-08 2016-11-11 주식회사 에스원 Black and White Image Acquisition System accentuate Color Contrast and Method thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011081226A1 (en) * 2009-12-29 2011-07-07 포항공과대학교 산학협력단 Method for converting color image to gray-scale image and recording medium in which program for performing same is recorded
US8526719B2 (en) 2009-12-29 2013-09-03 Postech Academy-Industry Foundation Method of converting color image into grayscale image and recording medium storing program for performing the same
KR101675030B1 (en) * 2015-05-08 2016-11-11 주식회사 에스원 Black and White Image Acquisition System accentuate Color Contrast and Method thereof

Similar Documents

Publication Publication Date Title
KR950009697B1 (en) Area dis criminating systems for an image processing system
US5734801A (en) Method of and apparatus for producing color proof
JPH06501144A (en) How to display multitone images
JPH05501341A (en) Color digital halftone gradation processing method using vector error diffusion method
JP2008005317A (en) Image processor and image processing method, and computer program and recording medium
KR101116682B1 (en) Image forming apparatus and control method thereof
US6125200A (en) Removing non-text information from a color image
CN101166225A (en) Image processing apparatus and image processing method
US7679783B2 (en) System and method for extracting grayscale data within a prescribed tolerance
US6665435B1 (en) Image data processing method and corresponding device
KR20080058893A (en) Color to gray conversion method
US9374502B2 (en) Method for converting a full colour image to a monochrome image
JP2848558B2 (en) Color image processing equipment
US9826120B2 (en) Image process device that converts color image data into monochrome image data based on a converted brightness component value and image forming system including same
JP3927426B2 (en) Image processing method, image processing apparatus, and image forming apparatus including the same
EP1605684B1 (en) Method of processing a digital image in order to enhance the text portion of said image
JP3966404B2 (en) Image processing method, image processing apparatus, and image forming apparatus
JP3412699B2 (en) Image forming device
JPH11127353A (en) Image processor and image processing method
JP2004343216A (en) Image processing apparatus and image processing method
JP2002216205A (en) Seal print authenticity discrimination device
JP2618893B2 (en) Color image processing equipment
JPH0553106B2 (en)
JPH1127518A (en) Image-processing apparatus and image-processing method
KR20050062834A (en) Half toning processing method including color information

Legal Events

Date Code Title Description
WITN Withdrawal due to no request for examination