KR0155925B1 - Digital color image - Google Patents

Digital color image

Info

Publication number
KR0155925B1
KR0155925B1 KR1019950041651A KR19950041651A KR0155925B1 KR 0155925 B1 KR0155925 B1 KR 0155925B1 KR 1019950041651 A KR1019950041651 A KR 1019950041651A KR 19950041651 A KR19950041651 A KR 19950041651A KR 0155925 B1 KR0155925 B1 KR 0155925B1
Authority
KR
South Korea
Prior art keywords
pixel
color gamut
color
digital
value
Prior art date
Application number
KR1019950041651A
Other languages
Korean (ko)
Other versions
KR970029162A (en
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 KR1019950041651A priority Critical patent/KR0155925B1/en
Publication of KR970029162A publication Critical patent/KR970029162A/en
Application granted granted Critical
Publication of KR0155925B1 publication Critical patent/KR0155925B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/001Industrial image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour

Abstract

본 발명은 디지탈 칼라 영상의 참조변환을 통한 화소 색상분류방법에 관한 것으로서, 디지탈 칼라영상의 밝기 신호에 대한 출력값에 색상영역 속성을 포함하고 있는 룩업테이블을 생성하는 과정; 디지탈 칼라영상의 각 화소에 대한 상기 룩업테이블의 출력값을 저장장치에 저장하는 과정; 화소에 대한 데이터를 저장장치에서 읽어내는 과정; 상기 화소에 대한 데이타와, 색상영역을 마스크한 마스크 데이터를 비트 단위로 논리곱하여 그 결과가 상기 색상영역 마스크한 마스크 데이터와 같은지 판단하는 과정; 및 상기 판단과정에서 같으면 화소가 색상영역에 포함되고, 같지 않으면 회소가 색상영역에 포함되지 않는 것으로 분류하고, 화소가 없을 때까지 상기 과정을 반복하는 과정을 포함함을 특징으로 한다.The present invention relates to a pixel color classification method through a reference conversion of a digital color image, the method comprising: generating a lookup table including color gamut attributes in an output value of a brightness signal of a digital color image; Storing an output value of the lookup table for each pixel of the digital color image in a storage device; Reading data about a pixel from a storage device; Determining whether the result of the pixel and the mask data masking the color gamut are bit-wise multiplied in units of bits to determine whether the result is the same as the mask data masked in the color gamut; And if it is the same in the determination process, the pixel is included in the color gamut, and if not, the pixel is classified as not included in the color gamut, and the process is repeated until there is no pixel.

본 발명에 의하면 기존의 색상영역 분할 알고리즘 중 화소의 적록청값을 영역의 경계값과 비교하는 부분을 없애고 적록청 값의 비교 연선을 영상신호의 밝기값 참조 변환부에 직접 할당함으로써 입력 영상의 색상 분류에 따른 처리시간을 단축하고 프로그램의 구조를 단순화할 수 있다.According to the present invention, the color classification of the input image is eliminated by eliminating the part of comparing the red-green-blue value of the pixel with the boundary value of the area of the existing color gamut segmentation algorithm, and directly assigning a comparative twisted pair of the red-green-blue value to the brightness value reference converter of the video signal. The processing time can be shortened and the structure of the program can be simplified.

Description

디지탈 칼라 영상의 참조변환을 통한 화소 색상 분류방법Pixel Color Classification Method by Reference Conversion of Digital Color Image

제1도는 디지탈 칼라 영상신호를 저장하고, 처리하는 일반적인 하드웨어 구조를 도시한 것이다.1 illustrates a general hardware structure for storing and processing digital color video signals.

제2도는 종래의 룩업테이블 설정값의 내용을 도시한 것이다.2 shows the contents of a conventional lookup table setting value.

제3도는 화소값의 적록청(RGB)의 구성도를 도시한 것이다.3 is a diagram illustrating a configuration of red and green blue (RGB) of pixel values.

제4도는 중앙처리장치가 각 화소의 각 색상 영역 포함 여부를 판단하는 종래의 화소색상영역 분류 방법을 도시한 플로우 챠트이다.4 is a flowchart illustrating a conventional pixel color area classification method in which the CPU determines whether each pixel includes each color area.

제5도는 본 발명에 따른 룩업테이블을 생성하는 과정을 도시한 플로우챠트이다.5 is a flowchart illustrating a process of generating a lookup table according to the present invention.

제6도는 본 발명에 따른 디지탈 칼라 영상의 참조 변환을 통한 색상영역 분류 방법을 도시한 플로우 챠트이다.6 is a flowchart illustrating a color gamut classification method through reference transformation of a digital color image according to the present invention.

본 발명은 화소 색상 분류방법에 관한 것으로, 특히 디지탈 칼라 영상의 참조변환을 통한 화소 색상 분류방법에 관한 것이다.The present invention relates to a pixel color classification method, and more particularly, to a pixel color classification method through reference conversion of a digital color image.

디지탈 칼라 영상을 적록청(RGB)의 형태로 기억장치에 입력받아 중앙처리 장치가 그 자료를 연산하는 시스템에 있어서 입력되는 화소의 색상 값에 따라 영상을 몇 개의 영역으로 나누어 처리할 경우가 있다.In a system in which a digital color image is input to a storage device in the form of red-green blue (RGB), the central processing unit may process the image into several areas according to the color value of the input pixel.

이 때 일반적인 방법은 중앙처리 장치가 적록청의 값을 기준 값과 직접 비교하거나 또는 상기 적록청의 값으로부터 색도나 채도 등을 구하는 연산 작업을 하여 화소의 색상값에 따라 영상을 몇 개의 영역으로 나누어 처리한다.In this case, the general method of the central processing unit directly compares the value of red-green blue with a reference value, or calculates chromaticity or saturation from the value of red-green-blue, and divides the image into several areas according to the color value of the pixel. .

제1도는 디지탈 칼라 영상신호를 저장하고, 처리하는 일반적인 하드웨어 구조를 도시한 것으로서 그 개략적인 동작을 설명하면 다음과 같다. 먼저 외부로부터 들어온 디지탈 칼라 영상 신호가 아날로그/디지탈 변환기(100)를 통해 디지탈 신호로 변환되면 디지탈 영상신호의 적록청 값이 참조변환부(100)를 거쳐 변환된 적록청(RGB) 값을 출력한다.FIG. 1 shows a general hardware structure for storing and processing digital color video signals. The schematic operation thereof is as follows. First, when the digital color image signal input from the outside is converted into a digital signal through the analog / digital converter 100, the red-green-blue value of the digital image signal is converted through the reference converter 100 to output the red-green-blue (RGB) value. .

여기서 참조변환부(100)는 룩업테이블(Look Up Table : 이하 LUT라 함)로 이루어지는데, 디지탈 영상신호가 0에서 n-1 까지의 값을 가질 수 있는 시스템이라면 거기에 사용되는 LUT는 LUT(0)부터 LUT(n-1)까지 n개의 값을 저장하고 있으며 이 값들 역시 0에서 n-1까지의 값을 가질 수 있으며, 프로그램에 의하여 그 값들을 바꿀 수 있다. 이렇게 저장된 값들은 입력신호로 디지탈 신호값 i가 들어왔을 때 그것을 LUT(i)로 변환하여 출력할 수 있다. 예를 들면 입력 밝기 신호가 100일 때 만약 LUT(100)이 115의 값으로 프로그램 되어 있다면 변환되어 출력되는 값은 115가 된다. 이 LUT의 역할은 입력되는 영상을 메모리에 저장할 때 그 밝기값들을 사용자가 원하는 대로 변환하여 저장할 수 있게 하는 역할을 한다. 보통 들어온 신호값 그대로 저장할 경우에는 모든 LUT(i)를 i와 같게 즉 선형적으로 프로그램해 놓으면 된다. 영상신호가 칼라일 경우에는 입력신호가 적록청(RGB)로 나뉘어 들어오므로 그에 해당하는 LUT도 LUT_R, LUT_G, LUT_B 세 개가 사용되게 된다.Here, the reference conversion unit 100 is composed of a look up table (LUT). If the digital video signal can have a value from 0 to n-1, the LUT used therein is a LUT ( It stores n values from 0) to LUT (n-1), and these values can also have values from 0 to n-1, which can be changed by the program. The stored values can be converted into LUT (i) when the digital signal value i enters as an input signal and output. For example, if the LUT 100 is programmed with a value of 115 when the input brightness signal is 100, the converted value is 115. The role of this LUT is to allow the user to convert and store the brightness values as desired when storing the input image in memory. Normally, if you store the incoming signal value, you can program all LUT (i) as i. If the video signal is in color, the input signal is divided into red-green-blue (RGB), so that three LUTs, LUT_R, LUT_G, and LUT_B, are also used.

한편, 클럭발생부(12)에서 발생된 클럭을 받아 어드레스 생성부(130)에서 각 화소의 좌표를 어드레스로 생성하여 생성된 어드레스에 상기 참조변환부에서 출력된 적록청값을 프레임 기억장치(140)에 저장한다. 그러면 중앙처리 장치(150)는 상기 프레임 기억장치(140)에 저장된 각 화소의 적록청 색 값을 읽어 색상영역 분류알고리즘을 사용하여 각 화소의 색상을 영역별로 분류하게 된다.On the other hand, the frame generator 140 receives the clock generated by the clock generator 12 and generates the coordinates of each pixel in the address generator 130 as an address and outputs the red-green blue value output from the reference converter to the generated address. Store in Then, the central processing unit 150 reads the red-green-blue color value of each pixel stored in the frame memory device 140 and classifies the color of each pixel by area using a color gamut classification algorithm.

제2도는 종래의 룩업테이블 설정값의 내용을 도시한 것으로서, 종래의 경우에는 상기 참조변환부(110)의 각 밝기별 출력값이 입력값과 같도록 설정되는 경우가 대부분이다. 이는 색상의 분류를 중앙처리장치(150)가 담당했기 때문이다. 여기서 s는 각 화소를 표현할 때 사용되는 비트수를 의미한다. 예를 들어 적색(Red)을 8비트로 나타낸다고 하면 s는 8이 된다.FIG. 2 shows the contents of a conventional lookup table setting value. In the conventional case, the output value of each brightness of the reference conversion unit 110 is set to be equal to an input value. This is because the central processing unit 150 is responsible for classifying colors. Here, s means the number of bits used to represent each pixel. For example, if red is represented by 8 bits, s becomes 8.

제3도는 화소값의 적록청(RGB)의 구성을 도시한 것으로서, 화소값의 구성은 적록청 별로 각각 S개의 비트로 되어 있는 것으로 한다. 보통 S 값으로 8을 많이 사용하며, R, G, B가 합쳐져서 하나의화소를 이루므로 1 화소는 3×S 비트가 된다.FIG. 3 shows the configuration of the red-green blue (RGB) of the pixel value, and the configuration of the pixel value is assumed to be S bits for each of the red-green blue. Usually 8 is used as the S value, and R, G, and B are combined to form one pixel, so one pixel becomes 3 x S bits.

디지탈 칼라 영상 시스템에서 영상을 RGB 색깔에 따라 여러 영역으로 분할할 때 적록청을 세축으로 하면 직각좌표 공간이 된다. 여기서는 영역이 상기 직각 좌표 공간에서 형성되는 가상의 직육면체로 형성된다고 가정한다.When dividing an image into several areas according to RGB colors in a digital color imaging system, red-green blue is a three-dimensional space. It is assumed here that the region is formed of a virtual cuboid formed in the rectangular coordinate space.

만일 화소들을 영역별로 분류함에 있어서 각 영역이 1,2,..,a,..A-1,A 영역으로 나누어 진다고 하고(단, AS), 영역 a의 R축 최소값을 m_R(a), 최대값을 M_R(a)라 하고 G축 및 B축에 대해서도 마찬가지로 하면, 직육면체 모영의 영역 a는 다음과 같은 조건식을 만족하는 R, G ,B를 가지는 화소들의 집합으로 표현될 수있다.If the pixels are classified by regions, each region is divided into 1,2, .., a, .. A-1, A regions (where A S), if the R-axis minimum value of the region a is m_R (a) and the maximum value is M_R (a), and the G-axis and B-axis are similarly applied, the area a of the rectangular parallelepiped mother region R and G satisfies the following conditional expression. It can be expressed as a set of pixels having B.

m_R(a) ≤ R ≤M_R(a)m_R (a) ≤ R ≤ M_R (a)

m_G(a) ≤ G ≤ M_G(a)m_G (a) ≤ G ≤ M_G (a)

m_B(a) ≤ B ≤ M_B(a)m_B (a) ≤ B ≤ M_B (a)

화소 p가 상기의 조건식을 만족하면 Za(p)=1 로 하고 만족하지 않으면 Za(p)=0 으로 표현하면, 색상을 영역별로 분류하는 알고리즘은 모든 화소 p에 대하여 Z1(p), Z2(p),..,Za(p),..,ZA(p)가 0 인지 1인지 결정하는 것을 의미한다.If the pixel p satisfies the above conditional expression Za (p) = 1 and if it is not satisfied Za (p) = 0, the algorithm for classifying the color by area is Z 1 (p), Z for all pixels p. 2 (p), .., Z a (p), .., Z A (p) means to determine whether 0 or 1.

따라서 상기 제2도와 같이 LUT를 선형적으로 프로그램한 뒤 제1도에 도시된 시스템에서 중앙처리장치가 각 화소의 각 색상 영역 포함 여부를 판단하는 종래의 화소색상영역 분류 방법을 제4도에 도시된 플로우 챠트를 참조하여 설명하면 다음과 같다.Therefore, FIG. 4 illustrates a conventional method of classifying pixel color regions in which the LUT is linearly programmed as shown in FIG. 2 and then the CPU determines whether each color region of each pixel is included in the system shown in FIG. The following description will be given with reference to the flow chart.

먼저 분류할 화소 p가 있는가 판단하고(400단계), 있으면 중앙처리장치(150)가 화소 p를 구성하는 RGB값 즉 R(p), G(p), B(p)의 값을 프레임 저장장치(140)에서 읽어낸다. (410단계) 그리고 나서 영역이 있으면(420단계), 각 영역에 대해서 화소p가 영역에 포함되는지 판단한다. 먼저 m_R(a)R(p)M_R(a)인지 판단하고(430단계), 범위에 속하면 m_G(a)G(p)M_G(a)인지 판단하고(440단계), 범위에 속하면 m_B(a)B(p)M_B(a)인지를 판단하여(450단계), 하나라도 만족하지 않으면 화소 p는 영역 a에 속하지 않는 것으로 한다.(460단계) 그리고 나서 판단할 영역이 더 있으면(420단계), 상기 과정을 계속하고 판단할 영역이 없으면 분류할 화소가 더 있는지 검사하여(400단계), 없으면 종료한다. 한편 화소 p가 상기 430,440,450 단계의 조건을 모두 만족하면 화소 p가 영역 a에 속하는 것으로 하고(470단계), 다시 420단계로 가서 다음 영역에 대해 상기와 같은 검사를 한다.First, it is determined whether there is a pixel p to be classified (step 400), and if there is, the CPU 150 determines the RGB values constituting the pixel p, that is, R (p), G (p), and B (p). Read at (140). If there is an area (step 420), it is determined whether the pixel p is included in the area for each area. First m_R (a) R (p) Determine if M_R (a) (step 430), and if within the range m_G (a) G (p) Determine if M_G (a) (step 440), if it is in the range m_B (a) B (p) It is determined whether M_B (a) (step 450), and if any one is not satisfied, the pixel p does not belong to the area a (step 460). If there is no region to be determined, it is checked whether there are more pixels to be classified (step 400). On the other hand, if the pixel p satisfies the conditions of the steps 430, 440, and 450, the pixel p belongs to the area a (step 470), and the process goes to step 420 again to perform the same test for the next area.

그러나, 상기와 같은 방법은 입력 영상의 색상 분류에 따른 처리시간이 길어지며 프로그램의 구조가 복잡하게 되는 단점이 있다.However, the above method has a disadvantage in that the processing time according to the color classification of the input image becomes long and the structure of the program becomes complicated.

따라서 본 발명은 상술한 문제점을 해결하기 위해 창출된 것으로서, 기존의 색상 영역 분할 알고리즘 중 화소의 적록청 값을 영역의 경계값과 비교하는 부분을 없애고 적록청 값의 비교 연산을 영상신호의 밝기값 참조 변환부에 직접 할당함으로써 입력 영상의 색상 분류에 따른 처리시간을 단축하고 프로그램의 구조를 단순화 할 수 있는 디지탈 칼라 영상의 참조변환을 통한 화소 색상 분류방법을 제공함에 그 목적이 있다.Accordingly, the present invention has been made to solve the above-mentioned problem, and removes the portion of the existing color gamut segmentation algorithm comparing the red-green-blue value of the pixel with the boundary value of the area, and compares the red-green-blue value with the brightness value of the image signal. It is an object of the present invention to provide a pixel color classification method through reference conversion of a digital color image which can shorten the processing time according to the color classification of the input image and simplify the structure of the program by directly allocating the reference conversion unit.

상기의 목적을 달성하기 위한 본 발명에 따른 디지탈 칼라 영상의 참조변환을 통한 화소 색상 분류방법은 디지탈 칼라영상의 밝기 신호에 대한 출력값에 화소의 색상영역 포함여부를 나타내는 색상영역 속성을 포함하고 있는 룩업테이블을 생성하는 과정; 디지탈 칼라영상의 각 화소에 대한 상기 룩업테이블의 출력값을 저장장치에 저장하는 과정; 색상 분류대상인 화소에 대한 데이터를 저장장치에서 읽어 내는 과정; 상기 읽어낸 화소에 대한 데이터와, 색상영역을 마스크한 마스크 데이터를 비트 단위로 논리곱하여 그 결과가 상기 색상영역 마스크한 마스크 데이터와 같은지 판단하는 과정; 및 상기 판단과정에서 같으면 화소가 색상영역에 포함되고, 같지 않으면 화소가 색상영역에 포함되지 않는 것으로 분류하고, 분류대상인 화소가 없을때까지 상기 과정을 반복하는 과정을 포함함을 특징으로 한다.A pixel color classification method through a reference conversion of a digital color image according to the present invention for achieving the above object is a lookup that includes a color gamut attribute indicating whether or not to include the color gamut of the pixel in the output value for the brightness signal of the digital color image Creating a table; Storing an output value of the lookup table for each pixel of the digital color image in a storage device; Reading data about pixels which are color classification targets from a storage device; Determining whether the result is the same as the mask data masked with the color gamut by performing a logical AND on the data of the read pixel and the mask data masking the color gamut; And if it is the same in the determination process, the pixel is included in the color gamut, and if it is not the same, the pixel is classified as not included in the color gamut, and the process is repeated until there are no pixels to be classified.

그리고 상기 룩업테이블을 만드는 과정은 디지탈 칼라 영상의 밝기 신호(디지탈 신호 i)를 입력값으로 하고, 상기 밝기 신호에 대한 출력값은 색상영역의 갯수 이상의 비트로 구성하며, 상기 출력값을 구성하고 있는 각 비트에 하나의 색상영역을 할당하여, 색상영역 포함여부를 나타내게 하는 룩업테이블의 입력값과 출력값의 데이터 형식(Format)을 결정하는 과정; 상기 디지탈 신호 i에 대한 출력값을 i로 설정하는 과정; 상기 디지탈 신호 i가 각각의 색상영역에 대해 포함되는지를 검사하여 포함되면 그 영역을 담당하는 비티를 '1'로 세팅하고 포함되지 않으면 '0'으로 세팅하는 과정; 및 상기 모든 디지탈 신호 i에 대해서 상기 과정을 반복하는 과정을 포함함을 특징으로 한다.In the process of creating the lookup table, a brightness signal (digital signal i) of a digital color image is used as an input value, and an output value of the brightness signal is composed of more than a number of bits of a color gamut, and each bit constituting the output value. Determining a data format of an input value and an output value of the lookup table by allocating one color gamut to indicate whether the color gamut is included; Setting an output value for the digital signal i to i; Checking whether the digital signal i is included for each color gamut, and setting the bit number that is in charge of the area to '1' if it is included and to '0' if not included; And repeating the process for all the digital signals i.

이하에서 첨부된 도면을 참조하여 본 발명을 상세히 설명한다. 본 발명이 적용되는 하드웨어의 기본적인 구성은 상술한 제1도와 동일한 구조를 가지고 있으며, 화소값의 적록청 구성도 상술한 제3도와 같다. 그러나, 본 발명에서는 상술한 제2도의 룩업테이블의 설정값 및 화소의 색상 영역 분류 방법을 기존의 것과 달리한다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. The basic configuration of the hardware to which the present invention is applied has the same structure as that in FIG. 1 described above, and the configuration of red-green-blue of pixel values is also the same as that in FIG. 3 described above. However, in the present invention, the setting value of the lookup table and the color gamut classification method of the pixel of FIG.

먼저 여기서 사용되는 기호를 정의하면 a는 색상 영역을 나타내는데 0, 1, 2, ... 등의 값을 사용한다. 그리고 LUT_R(i), LUT_G(i), LUT_B(i)의 각 비트수는 영역의 수보다 같거나 많다. 또한 LUT_R(i), LUT_G(i), LUT_B(i)를 구성하는 비트에서 a번째 비트를 LUT_R(i)a, LUT_G(i)a, LUT_B(i)a로 표시한다.First, define the symbol used here, and a represents the color gamut, using values 0, 1, 2, ..., and so on. The number of bits of LUT_R (i), LUT_G (i), and LUT_B (i) is equal to or greater than the number of regions. In the bits constituting LUT_R (i), LUT_G (i), and LUT_B (i), the a-th bit is represented by LUT_R (i) a, LUT_G (i) a, and LUT_B (i) a.

영상신호 입력 밝기 값을 k라 할 때 적색(R),녹색(G), 청색(B)의 참조되는 룩업테이블의 설정값을 LUT_R(k), LUT_G(k), LUT_B(k)라 하자. 먼저 LUT_R(), LUT_G(), LUT_B()의 설정값을 구하기 위해 적색(R)에 대한 LUT_R()는 각 영역에 대해 m_R(a)kM_RB(a)의 조건을, 녹색(G)에 대한 LUT_R()는 각 영역에 대해 m_G(a)kM_G(a)의 조건을, 청색(B)에 대한 LUT_B()는 각 영역에 대해 m_B(a)kM_B(a)의 조건을 만족하는지를 보고 만족하면 1, 만족하지 않으면 0으로 설정한다. 이 때 상위 비트는 종래의 방법대로 선형적으로 프로그램한 후, 색상영역의 갯수대로 하위비트로부터 시작하여 상위비트 쪽으로 색상영역 하나에 한비트씩 할당하여 영역속성을 나타낸다. 이상을 제5도에 도시한 순서도를 기초로 설명하면 다음과 같다.When the image signal input brightness value is k, the set values of the lookup table referred to as red (R), green (G), and blue (B) are referred to as LUT_R (k), LUT_G (k), and LUT_B (k). First, LUT_R () for red (R) is calculated for each area m_R (a) to obtain the setting values of LUT_R (), LUT_G (), and LUT_B (). k The condition of M_RB (a), LUT_R () for green (G) is m_G (a) for each region. k The condition of M_G (a) and LUT_B () for blue (B) are m_B (a) for each region. k It is set to 1 if the condition of M_B (a) is satisfied and 0 if it is not satisfied. In this case, the upper bits are linearly programmed according to a conventional method, and then, as the number of color areas, the upper bits are assigned to one color area by one bit toward the upper bit to indicate the area attribute. The above is explained based on the flowchart shown in FIG.

먼저 LUT의 입력인 디지탈 신호 i가 있는가를 보고(500단계), 있으면 종래 방법대로 선형적으로 프로그램한다.(502단계) 즉 적색(R)에 대한 룩업테이블의 i번째 칸에 대한 값으로 i를 저장하고, 녹색(G), 청색(B)에 대해서도 마찬가지로 한다. 이를 기호로 표시하면 LUT_R(i)=i, LUT_G(i)=i, LUT_B(i)=i와 같다. 그리고 나서 색상영역 a에 대한 포함여부를 판단하기 위해 먼저 색상영역이 있는지 조사한다.(504단계) 색상영역이 있으면 m_R(a)iM_R(a)인지 검사하고(506단계), 범위에 속하면 LUT_R(i)a=1로 하고(508단계), 속하지 않으면 LUT_R(i)a=0로 한다.(510 단계) 그리고 나서 m_G(a)iM_G(a)인지 검사하고(512단계), 범위에 속하면 LUT_G(i)a=1로 하고(514단계), 속하지 않으면 LUT_G(i)a=0로 한다.(516단계) 계속해서 m_B(a)iM_B(a)인지 검사하고(518 단계), 범위에 속하면 LUT_B(i)a=1로 하고(520단계), 속하지 않으면 LUT_B(i)a=0로 한다.(522단계) 이렇게 해서 하나의 디지탈 신호 i에 대한 색상영역 속성을 포함한 값을 구하여 저장한 후 다른 디지탈 신호 i에 대한 색상영역 속성을 포함한 값을 구하여 저장한 후 다른 디지탈 신호 i에 대해서도 상기와 마찬가지의 과정을 통해 LUT의 모든 디지탈 신호 i에 대해 색상영역 속성을 포함한 데이터 값을 구하여 LUT를 완성한다.First, see if there is a digital signal i, which is the input of the LUT (step 500), and if so, program it linearly according to the conventional method (step 502), i.e., store i as the value for the i th column of the lookup table for red (R). The same applies to green (G) and blue (B). This symbol is expressed as LUT_R (i) = i, LUT_G (i) = i, and LUT_B (i) = i. Then, to determine whether the color gamut a is included, first, it is examined whether there is a color gamut (step 504). If there is a gamut, m_R (a) i Check if it is M_R (a) (step 506), or if it is within the range, set LUT_R (i) a = 1 (step 508), and if not, set LUT_R (i) a = 0 (step 510). Then m_G ( a) i Check if it is M_G (a) (step 512), if it is within the range, set LUT_G (i) a = 1 (step 514), and if not, set LUT_G (i) a = 0 (step 516). a) i Check if it is M_B (a) (step 518), if it is within the range, set LUT_B (i) a = 1 (step 520), and if not, set LUT_B (i) a = 0 (step 522). Obtain and store the value including the color gamut attribute for the digital signal i, and then obtain and store the value including the color gamut attribute for the other digital signal i, and then process all the digital values of the LUT through the same process for the other digital signals i. The LUT is completed by obtaining a data value including color gamut attributes for signal i.

상기의 과정을 통해 만들어진 LUT에 대해 하나의 예를 들면 다음과 같다. 만일 분류하고자 하는 색상영역이 0, 1, 2의 세 개가 있다고 가정하고, 8비트로 구성된 디지탈 신호 157(이진수로 10011101)이 R신호에 대해서는 영역 0,1에 속하고, G신호에 대해서는 영역 2에 속하며, B신호에 대해서는 영역 1,2에 속한다고 하자. 그러면 LUT_R(157)=10011011, LUT_G(157)=10011100, LUB_B(157)=10011110와 같이 나타낼 수 있다. 즉, 색상영역이 0, 1, 2의 세 개이므로 하위 세 비트가 0 또는 1 로써 영역에 속하는지 아닌지를 LUT 내부에 포함하게 된다.An example of the LUT made through the above process is as follows. If there are three color gamuts to be classified, 0, 1, and 2, 8-bit digital signal 157 (10011101 in binary) belongs to area 0 and 1 for R signal, and area 2 for G signal. It belongs to the area 1 and 2 for the B signal. Then, LUT_R (157) = 10011011, LUT_G (157) = 10011100, and LUB_B (157) = 10011110. That is, since there are three color areas, 0, 1, and 2, the lower three bits include 0 or 1 in the LUT.

상기에서 본 발명 방법에 따라 LUT가 만들어진 후에 외부영상신호가 입력되면 LUT를 통해 상기에서 설정된 출력값이 출력되고, 이는 어드레스 생성부(130)에서 생성된 프레임 메모리의 어드레스에 저장된다.When the external image signal is input after the LUT is made according to the method of the present invention, the output value set above is output through the LUT, which is stored in the address of the frame memory generated by the address generator 130.

한편 중앙처리장치(150)는 프레임 메모리(140)에서 화소를 읽어 색상 분류를 한다. 이를 위해 먼저 하나의 영역에 대하여 마스크 상수라는 것을 정한다. 이것은 R, G, B의 값에서 a번째 비트만 1 이고, 나머지는 모두 0인 상수를 의미한다. 이것을 MASK(a)라고 하기로 한다. 예를 들면 8비트 디지탈 신호에서 MASK(0)과 MASK(3)은 다음과 같이 된다.Meanwhile, the CPU 150 reads pixels from the frame memory 140 to classify colors. To do this, we first define a mask constant for one region. This is a constant in which only the a-th bit of the values of R, G, and B is 1, and all others are 0. This is called MASK (a). For example, in an 8-bit digital signal, MASK (0) and MASK (3) are as follows.

상기에서 만든 새로운 LUT 구조와 상기의 MASK 상수를 이용한 색상영역 판정 방법은 제6도와 같다.The color gamut determination method using the new LUT structure and the MASK constant described above is shown in FIG.

중앙처리 장치가 프레임 메모리에 저장된 각 화소에 대한 RGB 데이터를 차례로 읽어내어 영역 a에 속하는지 검사를 한다. 이를 위해 먼저 프레임 메모리에 색상영역에 분류할 화소 p가 있는지 검사한다.(600단계) 있으면 저장장치에 저장된 화소 p에 대한 RGB 데이터인 RGB(p)를 읽는다.(602단계) 그리고 나서 화소가 분류될 색상영역 a가 있는지 검사한다.(604단계) 있으면 상기 RGB(p)와 MASK(a)를 비트 논리곱(AND)을 하여(606)단계, 그 결과가 MASK(a)와 같은지 검사한다.(608단계) MASK(a)와 같으면 화소 p가 영역에 속하는 것으로 판단하고(610단계), 다르면 화소 p가 영역에 속하지 않는 것으로 판단한다.(612단계) 그리고 나서 또 다른 영역이 있으면 상기 (606단계)로 가고, 영역이 없으면 상기 (600단계)로 가서 또 다른 화소가 있는지 검사한다. 상기와 같이 해서 모든 화소에 대해 색상영역 분류를 완료한다.The central processing unit reads in turn the RGB data for each pixel stored in the frame memory and checks whether it belongs to the area a. To do this, it is first checked whether there is a pixel p to be classified in the color gamut in the frame memory (step 600). If there is, it reads RGB (p), which is RGB data for the pixel p stored in the storage device (step 602). In step 604, the RGB (p) and the MASK (a) are bitwise ANDed (step 606), and the result is equal to the MASK (a). If it is equal to MASK (a), it is determined that the pixel p belongs to the area (step 610), and if it is different, it is determined that the pixel p does not belong to the area (step 612). Go to step), if there is no area, go to step 600 to check if there is another pixel. The color gamut classification is completed for all the pixels as described above.

상술한 바와 같이 본 발명에 의하면, 본 방법은 기존의 색상영역 분할 알고리즘 중 화소의 적록청 값을 영역의 경계값과 비교하는 부분을 없애고, 적록청 값의 비교 연산을 영상신호의 밝기값 참조 변환부에 직접 할당함으로써 입력 영상의 색상 분류에 따른 처리시간을 단축하고 프로그램의 구조를 단순화할 수 있다.As described above, according to the present invention, the method eliminates the portion of the existing color gamut partitioning algorithm that compares the red-green-blue value of the pixel with the boundary value of the area, and compares the red-green-blue value with reference to the brightness value of the video signal. By directly assigning to the unit, the processing time according to the color classification of the input image can be shortened and the structure of the program can be simplified.

그리고, 비젼 시스템을 이용한 각종 색상의 측정 및 그것을 이용한 검사에 관련된 분야 즉 칼라 TV화면 검사, PCB기판 검사, 화학공정 검사, 옷감검사, 농산물 검사, 제철공정 검사 등에 이용될 수 있다.And, it can be used in the field related to the measurement of various colors using the vision system and the inspection using the same, that is, color TV screen inspection, PCB substrate inspection, chemical process inspection, cloth inspection, agricultural product inspection, steel manufacturing process inspection.

Claims (2)

디지탈 칼라 영상의 참조변환을 통한 화소 색상 분류방법에 있어서, 디지탈 칼라영상의 밝기 신호에 대한 출력값에 화소의 색상영역 포함여부를 나타내는 색상영역 속성을 포함하고 있는 룩업테이블을 생성하는 제1과정; 디지탈 칼라영상의 각 화소에 대한 상기 룩업테이블의 출력값을 저장장치에 저장하는 제2과정; 색상 분류대상인 화소에 대한 데이터를 저장장치에서 읽어 내는 제3과정; 상기 읽어낸 화소에 대한 데이터와, 색상영역을 마스크한 마스크 데이터를 비트 단위로 논리곱하여 그 결과가 상기 색상영역 마스크한 마스크 데이터와 같은지 판단하는 제4과정; 및 상기 판단과정에서 같으면 화소가 색상영역에 포함되고, 같지 않으면 화소가 색상영역에 포함되지 않는 것으로 분류하고, 분류대상인 화소가 없을 때까지 상기 제2과정부터 수행을 반복하는 제5과정을 포함함을 특징으로 하는 디지탈 칼라 영상의 참조변환을 통한 화소 색상 분류방법.A pixel color classification method through reference transformation of a digital color image, the method comprising: generating a lookup table including a color gamut attribute indicating whether a pixel includes a color gamut in an output value of a brightness signal of a digital color image; A second step of storing an output value of the lookup table for each pixel of the digital color image in a storage device; A third step of reading data about pixels to be classified into colors from a storage device; A fourth step of logically multiplying data of the read pixel and mask data masking a color gamut by a bit unit to determine whether a result is the same as the mask data masking the color gamut; And a fifth process of classifying the pixel as being included in the color gamut if the same is the same in the determination process, and classifying that the pixel is not included in the color gamut if it is not the same, and repeating the operation from the second process until there are no pixels to be classified. A pixel color classification method through reference conversion of a digital color image, characterized in that the. 제1항에 있어서, 상기 룩업테이블을 만드는 제1과정은 디지탈 칼라 영상의 밝기 신호(디지탈 신호 i)를 입력값으로 하고, 상기 밝기 신호에 대한 출력값은 색상영역의 갯수 이상의 비트로 구성하며, 상기 출력값을 구성하고 있는 각 비트에 하나의 색상영역을 할당하여 색상영역 포함여부를 나타내게 하는 룩업테이블의 입력값과 출력값의 데이터 형식(Format)을 결정하는제21과정; 상기 디지탈 신호 i에 대한 출력값을 i로 설정하는 제22과정; 상기 디지탈 신호 i가 각각의 색상영역에 대해 포함되는지를 검사하여 포함되면 '1'로 세팅하고 포함되지 않으면 '0'으로 세팅하는 제23과정; 및 상기 모든 디지탈 신호 i에 대해서 상기 제22과정과 제23과정을 반복하는 제24과정을 포함함을 특징으로 하는 디지탈 칼라 영상의 참조변환을 통한 화소 색상 분류방법.The method of claim 1, wherein the first process of creating the lookup table comprises a brightness signal (digital signal i) of a digital color image as an input value, and an output value of the brightness signal includes at least a number of bits of a color gamut. Determining a data format of an input value and an output value of a lookup table by allocating one color gamut to each bit constituting the bit to indicate whether the color gamut is included; A twenty-second step of setting an output value for the digital signal i to i; A twenty-third step of checking whether the digital signal i is included in each color gamut and setting it to '1' if it is included and to setting it to '0' if it is not included; And a twenty-fourth step of repeating the twenty-second process and the twenty-third process with respect to all the digital signals i.
KR1019950041651A 1995-11-16 1995-11-16 Digital color image KR0155925B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019950041651A KR0155925B1 (en) 1995-11-16 1995-11-16 Digital color image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019950041651A KR0155925B1 (en) 1995-11-16 1995-11-16 Digital color image

Publications (2)

Publication Number Publication Date
KR970029162A KR970029162A (en) 1997-06-26
KR0155925B1 true KR0155925B1 (en) 1998-11-16

Family

ID=19434329

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019950041651A KR0155925B1 (en) 1995-11-16 1995-11-16 Digital color image

Country Status (1)

Country Link
KR (1) KR0155925B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100602261B1 (en) * 2005-01-18 2006-07-19 삼성전자주식회사 Method for creating color-mapping look-up table and method for color-mapping in use of the look up table

Also Published As

Publication number Publication date
KR970029162A (en) 1997-06-26

Similar Documents

Publication Publication Date Title
US4490797A (en) Method and apparatus for controlling the display of a computer generated raster graphic system
JPH01204589A (en) Collor correction method
JP3679139B2 (en) Color image converter
KR20060048146A (en) Segmentation technique of a color image according to colors
JP2647033B2 (en) Lookup table creation method and lookup table creation device
JPH01321578A (en) Picture display system
KR0155925B1 (en) Digital color image
JP2002041000A (en) Liquid crystal display device and its color correcting method
JP3482106B2 (en) Luminance image generation method and apparatus, and recording medium recording this method
US5502642A (en) HSL neighborhoods in CMY color space
US20100302400A1 (en) Specific Color Detection Applicator
US5367616A (en) Isopleth generator for applying isopleths to digital picture data and method therefor
US6714180B1 (en) Automatic control of gray scaling algorithms
JP2601265B2 (en) Color correction method
JPH0935053A (en) Image reducing method and device therefor
JPH08202871A (en) Picture information processor
US5359705A (en) Method of displaying composite satellite imagery
JPS6224373A (en) Color picture processor
JP3215156B2 (en) Color image processing method
JPH09127924A (en) Image subtractive color display method
JPH05290133A (en) Color image processor
JP3230533B2 (en) Image processing apparatus and method
JPH01311374A (en) Method for displaying restricted color
JPH08331373A (en) Color image reduction device and color image reduction method
JPH0721346A (en) Limited color display procession method in image processing

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20070628

Year of fee payment: 10

LAPS Lapse due to unpaid annual fee