KR20070111111A - Method of compressing and decompressing image and equipment thereof - Google Patents

Method of compressing and decompressing image and equipment thereof Download PDF

Info

Publication number
KR20070111111A
KR20070111111A KR1020060044036A KR20060044036A KR20070111111A KR 20070111111 A KR20070111111 A KR 20070111111A KR 1020060044036 A KR1020060044036 A KR 1020060044036A KR 20060044036 A KR20060044036 A KR 20060044036A KR 20070111111 A KR20070111111 A KR 20070111111A
Authority
KR
South Korea
Prior art keywords
data
bit
pixel
bits
image
Prior art date
Application number
KR1020060044036A
Other languages
Korean (ko)
Other versions
KR100798386B1 (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 KR1020060044036A priority Critical patent/KR100798386B1/en
Publication of KR20070111111A publication Critical patent/KR20070111111A/en
Application granted granted Critical
Publication of KR100798386B1 publication Critical patent/KR100798386B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/184Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder

Abstract

A method and an apparatus for compressing and decompressing an image are provided to process a small mount of data in a video RAM(Random Access Memory) served as a frame buffer by reducing the amount of video data to be processed and manufacture an encoder and an decoder by simple logic circuits, thereby improving video process rate. A method for compressing and decompressing an image comprises the following steps of: recognizing DN which is current pixel RGB data and DN-1' which is current pixel RGB data(30); computing MN which is a difference between DN and DN-1'(32); dividing MN into an up bit and a low bit and recognizing the up bit as a data bit when the up bit is not "0", and recognizing the down bit as a data bit when the up bit is "0"(34); and acquiring the DN as DN '' compressed by coding bits, position bits, and data bits(36).

Description

영상 압축방법과 신장방법 및 그 장치 {METHOD OF COMPRESSING AND DECOMPRESSING IMAGE AND EQUIPMENT THEREOF}Image Compression Method and Extension Method and Apparatus {METHOD OF COMPRESSING AND DECOMPRESSING IMAGE AND EQUIPMENT THEREOF}

도 1은 종래 기술에 의한 영상처리장치의 개략적인 구성을 도시한다.1 shows a schematic configuration of an image processing apparatus according to the prior art.

도 2는 본 발명에 따른 영상 압축방법과 신장방법에 대한 개략적인 흐름도를 도시한다.2 is a schematic flowchart of an image compression method and a decompression method according to the present invention.

도 3은 픽셀당 비트수가 18비트이고, 각 픽셀의 하나의 서브픽셀만을 제 1 영상 압축방법으로 압축하고 제 1 영상 신장방법으로 신장하는 실시예를 도시한다.FIG. 3 shows an embodiment in which the number of bits per pixel is 18 bits, and only one subpixel of each pixel is compressed by the first image compression method and expanded by the first image extension method.

도 4는 화면 상단의 첫 번째 픽셀의 RGB 데이터를 첫 번째 픽셀의 신장된 데이터로 인식하여 제 1 영상 압축방법으로 압축하고 제 1 영상 신장방법으로 신장하는 실시예를 나타낸다. 4 illustrates an embodiment in which the RGB data of the first pixel on the top of the screen is recognized as the stretched data of the first pixel, compressed by the first image compression method, and expanded by the first image extension method.

도 5는 픽셀당 비트수가 24비트이고, 가상의 픽셀을 화면의 상단 첫 번째 픽셀에 이웃하게 위치시키고 제 1 영상 압축방법으로 압축하고 제 1 영상 신장방법으로 신장하는 실시예를 도시한다.FIG. 5 illustrates an embodiment in which the number of bits per pixel is 24 bits, and the virtual pixels are positioned adjacent to the first pixel of the upper screen, compressed by the first image compression method, and expanded by the first image extension method.

도 6은 도 5의 실시예에 대한 변형된 제 1 영상 압축방법으로 압축하고 변형된 제 1 영상 신장방법으로 신장하는 실시예를 도시한다.FIG. 6 illustrates an embodiment of compressing by the modified first image compression method of the embodiment of FIG. 5 and stretching by the modified first image stretching method.

도 7은 도 3과 동일한 RGB 데이터를 제 2 영상 압축방법으로 압축하고 제 2 영상 신장방법으로 신장하는 실시예를 도시한다.FIG. 7 illustrates an embodiment in which the same RGB data as in FIG. 3 is compressed by the second image compression method and expanded by the second image extension method.

도 8은 도 4와 동일한 RGB 데이터를 제 2 영상 압축방법으로 압축하고 제 2 영상 신장방법으로 신장하는 실시예를 나타낸다. FIG. 8 illustrates an embodiment in which the same RGB data as in FIG. 4 is compressed by the second image compression method and expanded by the second image extension method.

도 9는 도 5와 동일한 RGB 데이터를 제 2 영상 압축방법으로 압축하고 제 2 영상 신장방법으로 신장하는 실시예를 도시한다.FIG. 9 illustrates an embodiment in which the same RGB data as in FIG. 5 is compressed by the second image compression method and expanded by the second image extension method.

도 10은 본 발명에 따른 압축방법 및 신장방법에 있어서 차이값을 구하는 순서의 여러 가지 방법을 도시한다10 illustrates various methods of obtaining the difference values in the compression method and the expansion method according to the present invention.

도 11은 제 2 영상 압축방법 및 제 2 영상 신장방법으로 압축 및 신장한 그림을 도시한다.FIG. 11 shows a picture compressed and decompressed by the second image compression method and the second image extension method.

도 12는 도 11에 도시된 그림에 대한 원래 데이터의 손실을 보상하기 위한 여러 보상값을 비교한 데이터 데이블이다.FIG. 12 is a data table comparing various compensation values for compensating for loss of original data for the figure shown in FIG. 11.

도 13은 본 발명에 따른 영상처리장치의 개략적인 구성을 도시한다.13 shows a schematic configuration of an image processing apparatus according to the present invention.

본 발명은 영상의 압축방법과 신장방법 및 그 장치에 관한 것으로, 보다 상세하게는 사람의 시각으로 느낄 수 없을 정도의 영상 손실을 유지하면서 간단한 방법의 안정적인 영상의 압축방법과 신장 방법 및 그 장치에 대한 것이다.The present invention relates to an image compression method and a stretching method and a device thereof, and more particularly, to a stable image compression method and a stretching method and a device thereof, while maintaining an image loss that can not be felt by human vision. It is about.

현재 전 세계는 멀티미디어 정보의 홍수 속에 살고 있다. 멀티미디어 정보는 텍스트, 정지화상, 동화상, 애니메이션, 사운드 등 다양한 형태로 존재한다. 이런 멀티미디어 정보는 기존의 아날로그 정보에서 디지털 정보로 변해가고 있으며, 통신기술, 인터넷, 디스플레이 장치 등의 급속한 발달에 따라 처리해야 되는 멀티미디어 정보의 데이터양은 증가하고 있다.The whole world now lives in a flood of multimedia information. Multimedia information exists in various forms such as text, still picture, moving picture, animation and sound. Such multimedia information is changing from conventional analog information to digital information, and the amount of data of multimedia information to be processed is increasing with the rapid development of communication technology, the Internet, and display devices.

멀티미디어 정보 중에서 가장 중요한 부분이 영상 데이터라 할 수 있다. 도 1은 기존의 영상 데이터를 처리하는 개략적인 흐름도이다. 영상 화면은 각 점의 명암이나 색깔의 RGB 픽셀로 구성되어질 수 있고, 중앙처리장치에서 상기 RGB 픽셀의 명암이나 색깔을 비트맵 형식으로 처리하여 비디오램 등의 저장부에 저장하고 화면에 어떤 내용을 나타내려면 상기 저장부의 해당 위치의 값을 바꾸어 출력부를 통해 패널로 출력한다. 예로서 640*480 화상도를 가지는 트루칼라인 하나의 정지 화면을 처리하기 위해서는, 트루칼라 하나의 픽셀당 24Bit가 필요하고 전체 화면은 640*480*24 즉, 한 프레임은 7,372,800Bit 약 0.9M 정도의 메모리가 소요된다. 나아가서 TV방송이나 비디오 신호는 사람의 시각으로 화면의 끊김이 없이 인식되기 위해서는 초당 30 내지 60프레임을 처리하여야 한다. 즉, 약 0.9M 정도의 데이터 용량의 화면을 초당 30 내지 60 프레임으로 처리하려면 그만큼의 저장 공간과 메모리 대역폭이 필요하다. 그러므로 더 높은 해상도에서 더 많은 색상을 더 자연스러운 영상으로 표현하고자하면 그에 따른 픽셀수와 프레임의 증가에 따라 더 많은 양의 저장 공간과 장시간의 정보처리시간이 필요하다.The most important part of the multimedia information may be referred to as image data. 1 is a schematic flowchart of processing existing image data. The video screen may be composed of RGB pixels of contrast or color of each point, and the central processing unit processes the contrast or color of the RGB pixels in a bitmap format and stores them in a storage unit such as a video RAM and displays some contents on the screen. To indicate, change the value of the corresponding position of the storage unit and output it to the panel through the output unit. For example, in order to process one true-calk still image with a 640 * 480 picture, one truecolor requires 24 bits per pixel and the entire screen is 640 * 480 * 24, i.e. about 7,372,800 bits about 0.9M. Takes up memory. Furthermore, a TV broadcast or video signal must process 30 to 60 frames per second in order to be recognized without interruption of the screen with human eyes. That is, to process a screen with a data capacity of about 0.9M at 30 to 60 frames per second, the storage space and memory bandwidth are required. Therefore, if you want to express more colors as a more natural image at higher resolution, more storage space and longer information processing time are required as the number of pixels and frames increases.

살펴본바와 같이 방대해지는 데이터량을 효율적으로 다루기 위하여 다양한 디지털 영상자료의 압축 및 복원기술이 등장하고 있다.As described above, in order to efficiently handle the huge amount of data, various digital image data compression and decompression techniques have emerged.

영상압축 알고리즘은 크게 2가지 방식으로 나눌 수 있다. 하나는 무손실부호화(Lossless coding)방식이고, 다른 하나는 손실부호화(Lossy coding)방식이다.Image compression algorithm can be largely divided into two methods. One is lossless coding, and the other is lossy coding.

상기 무손실부호화방식은 압축(Compression), 신장(Decompression)의 과정을 거쳐도 원래의 정보가 보존되어 품질 좋은 영상을 재현할 수 있는 방식이지만, 손실부호화방식에 비해 압축률이 떨어져 큰 용량의 영상데이터를 처리하기엔 적당하지 못하다. The lossless coding method is a method of reproducing a high quality image by preserving original information even after compression and decompression. However, the lossless coding method has a lower compression rate than a lossy coding method. Not suitable for processing

반면에 상기 손실부호화방식은 상당히 높은 압축률을 가지지만 압축과 신장과정에서 왜곡이 생겨 완전히 원래의 영상이 재생되지 않아 영상 품질이 떨어진다. On the other hand, the lossy coding method has a very high compression ratio, but distortion occurs during compression and decompression, so that the original image is not completely reproduced, thereby degrading the image quality.

상기 손실부호화방식으로 대표적인 것이 JPEG 기술이다.A representative example of the lossy coding scheme is JPEG technology.

JPEG(Joint Photographic Coding Experts Group)은 연속적인 이미지, 예를 들어 사진 같은 것을 압축하는데 쓰이는 방법이다. 화상 이미지들은 '정보의 반복됨'이 그리 많지 않아서 그 '정보의 반복됨'을 이용하여 압축을 하면 압축률이 떨어져 좋은 결과를 얻지 못한다. 그래서 JPEG는 주어진 정보 중에서 압축전에 정보를 버리는데, 바로 이 때문에 JPEG는 '압축과 복원'을 거치면 손실이 발생한다.Joint Photographic Coding Experts Group (JPEG) is a method used to compress continuous images, such as photographs. Image images are not so much 'repetitive of information', so when compressed using the 'repeated information', the compression rate is lowered and a good result is not obtained. Thus, JPEG discards any information before compression, which is why JPEG loses its compression and reconstruction.

JPEG는 이미지 데이터 가운데에서 인간의 눈에 비교적 민감한 High-pass(음영)부분은 그냥 놓아두고, Low-pass(색상)부분만을 중점적으로 압축시키는 것으로, 실제로는 이미지 정보가 손실되지만 육안으로는 판별이 잘 안된다는 특성을 이용한 것이다.JPEG mainly compresses only the low-pass part, leaving only the high-pass part that is relatively sensitive to the human eye in the image data. It's a good thing.

JPEG의 손실압축은 인간이 알아챌 수 없는 정보가 상당하기 때문에 이런 정보를 버리고 실질적인 데이터만을 이용하는 방법을 사용한다. The lossy compression of JPEG uses a lot of information that cannot be noticed by humans, so it discards this information and uses only actual data.

JPEG의 손실부호화 방식은 DCT를 기본으로 있다. DCT란 공간영역(Spatial Domain)과 주파수 영역(Frequency Domain)을 상호 변환시키는 일종의 Mapping 기술로서 공간 영역에서의 자연 영상을 주파수 영역의 낮은 주파수 성분으로부터 높은 주파수 성분으로까지 분해시킬 수 있다. JPEG's lossy coding scheme is based on DCT. DCT is a kind of mapping technology that converts a spatial domain and a frequency domain into each other, and can decompose a natural image in a spatial domain from a low frequency component to a high frequency component in the frequency domain.

JPEG는 압축률을 높이기 위하여 손실 코드화(DCT+양자화)와 무손실 코드화(DPCM, RLE, 허프만 코딩, 산술압축)를 결합하여 사용하고 화면을 볼록(8X8화소) 단위로 나누어 블록별로 DCT를 행하여 에너지를 저주파 계수에 집중시킨 후 양자화 하는 방식을 이용한다. 좀 더 자세히 각 단계를 살펴보면, 1단계에서는 DCT 변환을 이용하여 이미지의 64(8*8)개의 화소들이 낮은 신호값을 갖도록 하여 이미지 공간상의 중복된 신호 값을 줄여 압축률을 높이고, 2단계는 양자화 단계로 표현할 수 있는 신호값들이 들어있는 주어진 양자화 테이블을 이용하여 DCT 단계의 결과로 나온 64개의 값이 표현될 수 있는 근사치를 얻고, 3단계에서는 엔트로피 부호화를 통해 양자화 된 영상정보의 크기를 더욱 줄인다.JPEG uses a combination of lossy coding (DCT + quantization) and lossless coding (DPCM, RLE, Huffman coding, and arithmetic compression) to increase the compression rate. Focus on and then quantize it. Looking at each step in more detail, in step 1, the DCT transform is used to ensure that 64 (8 * 8) pixels in the image have a low signal value, thereby reducing the overlapping signal value in image space to increase the compression rate, and in the second step, quantization Using a given quantization table containing the signal values that can be expressed in steps, an approximation of 64 values resulting from the DCT step is obtained. In step 3, the size of quantized image information is further reduced through entropy coding. .

상기 JPEG 방식은 상술한 바와 같이 여러 단계를 거쳐 이루어지며, 상기 각각의 단계를 위한 복잡한 수식 및 그에 따른 장치가 요구되어지는 문제점이 있다.The JPEG method is performed through several steps as described above, and there is a problem in that a complicated equation for each step and a device according thereto are required.

또한 JPEG 방식에 의한 영상의 압축률은 영상의 내용에 따라 압축률의 변동폭이 매우 넓기 때문에 영상을 기록/재생하거나 영상을 전송하고자 할 때 기록/인출 시간 또는 전송시간이 압축될 영상의 내용에 따라 매우 가변적인 문제점이 있다.In addition, since the compression rate of the image by JPEG method varies widely according to the content of the image, when recording / reproducing or transmitting an image, the recording / fetching time or transmission time is very variable according to the content of the image to be compressed. There is a problem that is.

본 발명은 상기와 같은 문제점을 해결하고자 창안된 것으로서, 복잡한 수식 및 단계를 제거하고 효율적인 압축 방법으로 영상 정보를 처리하는데 있어서의 많은 양의 저장 공간과 높은 클럭 주파수의 필요를 줄이며, 압축률의 변동으로 인한 재생, 저장 및 전송 등에 소요되는 시간의 가변성으로 인한 버퍼링의 불안정성을 제거 한다.The present invention was devised to solve the above problems, eliminating the need for a large amount of storage space and a high clock frequency in processing image information by eliminating complicated equations and steps and by an efficient compression method, This eliminates the instability of buffering due to the variability of time required for playback, storage and transmission.

상기의 목적을 달성하기 위하여 본 발명은, 현재의 픽셀 RGB 데이터 DN과, 이전의 픽셀 RGB 데이터 DN-1에 기초한 신장된 데이터 DN-1'을 인식하는 단계; 상기 DN 대한 상기 DN-1'의 차이값 MN을 산출하는 단계; 상기 MN이 양수이거나 영이면 부호 비트를 0로 인식하고, 음수이면 부호 비트를 1로 인식하며, 상기 MN을 상부 비트와 하부 비트로 분리하여, 상기 상부 비트가 0이 아니면 위치 비트를 1로 하고 상기 상부 비트를 데이터 비트로 인식하고, 상기 상부 비트가 0이면 위치 비트를 0으로 하고 상기 하부 비트를 데이터 비트로 인식하는 단계; 및 상기 DN을 상기 부호 비트, 상기 위치 비트, 및 상기 테이터 비트로 변환하여 압축된 데이터 DN''로 얻는 단계를 포함하는 것을 특징으로 하는 영상 압축방법이다. (여기서, N = 1, 2, 3, ... n, ...이며, n은 자연수)In order to achieve the above object, the present invention provides a method for recognizing current pixel RGB data D N and expanded data D N-1 ′ based on previous pixel RGB data D N-1 ; Calculating a difference value of the D M N N the D N-1 'for; If the M N is positive or zero, the sign bit is recognized as 0. If the N N is negative, the sign bit is recognized as 1, and if the M N is divided into an upper bit and a lower bit, the position bit is set to 1 if the upper bit is not 0. Recognizing the upper bit as a data bit, and if the upper bit is 0, recognizing a position bit as 0 and recognizing the lower bit as a data bit; And converting the D N into the sign bit, the position bit, and the data bit to obtain compressed data D N ″. Where N = 1, 2, 3, ... n, ... where n is a natural number

또한 본 발명은 현재의 픽셀의 RGB 데이터에 대한 압축된 데이터 DN''와 이전 픽셀의 RGB 데이터 DN-1에 기초한 신장된 데이터 DN-1'을 인식하는 단계; 상기 압축된 데이터 DN''에서 부호 비트, 위치 비트, 및 데이터 비트를 산출하는 단계; 상기 위치 비트가 1인 경우 상기 데이터 비트를 MN의 상부 비트로 하고 상기 MN의 하부 비트는 0으로 인식하고 상기 위치 비트가 0인 경우 상기 데이터 비트를 MN의 하부 비트로 하고 상기 MN의 상부 비트는 0으로 인식하며, 상기 부호 비트가 0이면 상기 MN을 양수로 인식하고, 1이면 상기 MN을 음수로 인식하여 상기 차이값 MN을 복원하는 단계; 및 DN-1'에 상기 MN을 더하여 신장된 데이터 DN'을 얻는 단계를 포함하는 것을 특징으로 하는 영상 신장방법이다. The present invention also provides a method for recognizing compressed data D N ″ for RGB data of a current pixel and extended data D N-1 ′ based on RGB data D N-1 of a previous pixel; Calculating a sign bit, a position bit, and a data bit from the compressed data D N ″; If the position bit is 1, the upper portion of the data bit the M N upper bits and the M N lower bits is recognized as 0, and if the position bit is 0 and the lower bits of the data bit M N a M N of the Recognizing a bit as 0, recognizing the M N as a positive number if the sign bit is 0, and recognizing the M N as a negative value to restore the difference value M N ; And adding M N to D N-1 ′ to obtain extended data D N ′.

그리고 본 발명은 현재의 픽셀 RGB 데이터 DN과 이전의 픽셀 RGB 데이터 DN-1에 기초한 신장데이터 DN-1'을 인식하는 단계; 상기 DN 대한 상기 DN-1'의 차이값 MN을 산출하는 단계; 상기 MN의 절대값이, H비트(여기서 H는 상기 하나의 픽셀의 하나의 서브픽셀 RGB 데이터가 차지하는 비트수의 반을 나타낸다.)가 가질 수 있는 최대값보다 크면, 위치비트는 1로 인식하고 데이터 비트는 상기 DN의 상위로부터 H+1비트까지의 값으로 인식하며, 상기 MN의 절대값이, 상기 H비트가 가질 수 있는 최대값보다 작거나 같으면, 위치비트는 0으로 인식하고 데이터 비트는 상기 MN의 하위로부터 H+1비트까지의 값으로 인식하는 단계; 및 상기 DN을 상기 위치 비트 및 상기 데이터 비트로 변환하여 압축된 데이터 DN''로 얻는 단계를 포함하는 것을 특징으로 하는 영상 압축방법이다.And recognizing the decompression data D N-1 ′ based on the current pixel RGB data D N and the previous pixel RGB data D N-1 ; Calculating a difference value of the D M N N the D N-1 'for; If the absolute value of M N is greater than the maximum value that H bits (where H represents half of the number of bits occupied by one subpixel RGB data of the one pixel) can be recognized as a position bit 1 The data bit is recognized as a value from the upper side of the D N to the H + 1 bit, and if the absolute value of the M N is less than or equal to the maximum value that the H bit can have, the position bit is recognized as 0. Recognizing a data bit as a value from a lower level of M N to a H + 1 bit; And converting the D N into the position bits and the data bits to obtain compressed data D N ″.

또한 현재의 픽셀의 RGB 데이터에 대한 압축된 데이터 DN''와 이전 픽셀의 RGB 데이터 DN-1에 기초한 신장된 데이터 DN-1'을 인식하는 단계; 상기 압축된 데이터 DN''에서 위치 비트 및 데이터 비트를 산출하는 단계; 및 상기 위치 비트가 1이면, DN'의 상위로부터 H+1비트까지는 상기 데이터 비트가 가지는 값으로 인식하고 DN'의 하위로부터 H-1비트까지는 H-2비트가 가질 수 있는 최대값으로 인식하며, 상기 위치 비트가 0이면, 상기 데이터 비트의 첫 번째 비트는 부호 비트로 인식을 하고 나머지 비트가 가지는 값과 DN-1'을 더해준 값을 DN'로 인식하여, 상기 압축된 데이터 DN''에 대한 신장된 데이터 DN'으로 얻는 단계를 포함하는 것을 특징으로 하는 영상 신장방법이다.Recognizing the compressed data D N ″ for the RGB data of the current pixel and the decompressed data D N-1 ′ based on the RGB data D N-1 of the previous pixel; Calculating position bits and data bits from the compressed data D N ″; And when the position bit is 1, the upper part of D N 'is recognized as a value of the data bit from H + 1 bit and the lower value of D N ' is the maximum value that H-2 bit can have from H-1 bit. If the position bit is 0, the first bit of the data bit is recognized as a sign bit and the value added by the remaining bit and D N-1 'is recognized as D N ', thereby compressing the compressed data D. obtaining the N '' stretched data D N for " The image stretching method comprising the step.

나아가서 본 발명은 화면의 모든 픽셀에 대하여 순차적으로 각 픽셀의 RGB 데이터에 대한 압축된 데이터를 얻는 단계를 포함할 수 있다.Furthermore, the present invention may include obtaining compressed data for RGB data of each pixel sequentially for all pixels of the screen.

바람직하게는 화면 상단의 첫 번째 픽셀의 RGB 데이터 D1을 신장된 데이터 D1'로 인식하는 단계를 포함하는 것을 특징으로 하는 영상 압축방법이 될 수 있다.Preferably, the image compression method may include the step of recognizing the RGB data D 1 of the first pixel on the top of the screen as the extended data D 1 ′.

보다 바람직하게는 임의의 RGB 데이터 D0을 가지는 가상의 픽셀을 화면의 상단 첫 번째 픽셀에 이웃하게 위치시키고 상기 가상의 픽셀의 D0을 신장된 데이터 D0'로 인식하는 단계를 포함하는 것을 특징으로 하는 영상 압축방법이 될 수 있다.And more preferably characterized in that it comprises a step of recognizing in any RGB data D virtual pixel of having a zero neighborhood located at the first pixel at the top of the screen and extending the D 0 of the virtual pixel data D 0 ' It can be an image compression method.

나아가서 본 발명은 화면의 모든 픽셀에 대하여 순차적으로 각 픽셀 RGB 데이터의 압축된 데이터 대한 신장된 데이터를 얻는 단계를 포함할 수 있다.Furthermore, the present invention may include obtaining the decompressed data for the compressed data of each pixel RGB data sequentially for all the pixels of the screen.

또한 본 발명은 현재의 픽셀 RGB 데이터 DN과, 이전의 픽셀 RGB 데이터 DN-1에 기초한 신장된 데이터 DN-1' 사이의 차이값 MN을 산출하고, 상기 산출된 차이값 MN에 기초하여 상기 현재의 픽셀 RGB 데이터 DN를 압축하여 압축된 데이터 DN''을 얻는 엔코더; 상기 엔코더에 의해 산출된 압축된 데이터 DN''를 버퍼링하는 프레임 버퍼; 및 상기 프레임 버퍼에 의해 버퍼링된 압축된 데이터 DN''를 신장하여 신장된 데이터 DN'를 얻는 디코더를 포함하는 것을 특징으로 하는 영상처리장치이다.In another aspect, the present invention in the calculated between the current pixel RGB data D N and a previous pixel RGB data decompressed data based on the D N-1 D N-1 ' difference M N, said calculated difference value M N An encoder that compresses the current pixel RGB data D N based on the result to obtain compressed data D N ″; A frame buffer for buffering the compressed data D N ″ calculated by the encoder; And a decoder for decompressing the compressed data D N ″ buffered by the frame buffer to obtain the decompressed data D N ′.

바람직하게는 상기 엔코더는 상기 이전의 픽셀 RGB 데이터 DN-1에 기초한 신장된 데이터 DN-1'을 상기 디코더로부터 입력받는 것을 특징으로 하는 영상처리장치이다.Preferably, the encoder is an image processing apparatus characterized in that it receives the extended data D N-1 ′ based on the previous pixel RGB data D N-1 from the decoder.

보다 바람직하게는 상기 엔코더는 본 발명에 따른 두가지의 영상 압축방법 중 하나로 RGB 데이터를 압축할 수 있으며, 상기 디코더는 본 발명에 따른 두가지의 영상 신장방법 중 하나로 압축된 데이터를 신장할 수 있다.More preferably, the encoder can compress RGB data by one of two image compression methods according to the present invention, and the decoder can decompress the compressed data by one of two image extension methods according to the present invention.

또한 본 발명은 입력되는 영상의 각 픽셀의 RGB 데이터 신호를 엔코더로 출력하는 인터페이스 및 상기 디코더에 의해 신장된 DN'를 출력하는 출력부를 포함하는 것을 특징으로 하는 영상처리장치가 될 수 있다.The present invention may also be an image processing apparatus including an interface for outputting an RGB data signal of each pixel of an input image to an encoder and an output unit for outputting D N ′ extended by the decoder.

이하, 첨부된 도면을 참조하여 본 발명에 따른 영상 압축방법과 신장 방법 및 그 장치에 대하여 상세히 설명한다.Hereinafter, an image compression method, an extension method, and an apparatus thereof according to the present invention will be described in detail with reference to the accompanying drawings.

도 2는 본 발명에 따른 영상 압축방법과 신장방법에 대한 개략적인 흐름도를 도시한다.2 is a schematic flowchart of an image compression method and a decompression method according to the present invention.

도 2의 (a)를 참조하여 본 발명에 따른 영상 압축방법을 개략적으로 살펴보면, 영상의 RGB 신호가 입력되면, 현재 픽셀의 RGB 데이터 DN과 이전 픽셀의 RGB 데이터 DN-1에 기초하여 신장된 데이터 DN-1'를 인식하는 단계(30)를 거치고, 상기 DN에 대한 DN-1'의 차이값 MN을 구하는 단계(32)를 거친다.Referring to (a) of FIG. 2, a method of compressing an image according to the present invention will be described. When an RGB signal of an image is input, the image compression method is extended based on the RGB data D N of the current pixel and the RGB data D N-1 of the previous pixel. 'going through the step (30) for recognizing, D N-1 for the N D, the data D N-1 subjected to step 32 to obtain the difference value of M N.

이후에 본 발명에 따른 영상 압축방법 중 한가지는 상기 차이값 MN에 근거하여 부호 비트, 위치 비트 및 데이터 비트를 생성시키는 단계(34)를 거치고 상기 DN을 상기 부호 비트, 상기 위치 비트 및 상기 데이터 비트로 하여 압축된 데이터 DN''를 얻는 단계(36)를 거쳐서 압축된 영상신호가 생성된다. 이하에서는 상기 영상 압축방법을 제 1 영상 압축방법이라 칭한다.Subsequently, one of the image compression methods according to the present invention passes through step 34 of generating a sign bit, a position bit, and a data bit based on the difference value M N , wherein D N is represented by the sign bit, the position bit, and the data bit. A compressed video signal is generated through step 36 of obtaining compressed data D N ″ as data bits. Hereinafter, the image compression method will be referred to as a first image compression method.

본 발명에 따른 영상 압축방법 중 다른 한가지는 상기 차이값 MN에 근거하여 위치 비트 및 데이터 비트를 생성시키는 단계(34)를 거치고, 상기 DN을 상기 위치 비트 및 상기 데이터 비트로 하여 압축된 데이터 DN''를 얻는 단계(36)를 거쳐서 압 축된 영상신호가 생성된다. 이하에서는 상기 영상 압축방법을 제 2 영상 압축방법이라 칭한다.Another one of the image compression methods according to the present invention is the step (34) of generating position bits and data bits based on the difference value M N , and the data D compressed with D N as the position bits and the data bits. Through step 36 of obtaining N '', a compressed video signal is generated. Hereinafter, the image compression method will be referred to as a second image compression method.

또한 도 2의 (b)를 참조하여 본 발명에 따른 신장방법을 개략적으로 살펴보면, 상기 압축된 데이터가 입력되면, 이전 픽셀의 신장된 데이터 DN-1'와 현재 픽셀의 압축된 데이터 DN''를 인식하는 단계(40)를 거치고, 본 발명에 따른 영상 신장방법 중 한가지는 상기 DN''을 부호 비트, 위치 비트 및 데이터 비트로 산출하는 단계(42)를 거치고 상기 부호 비트, 상기 위치 비트 및 상기 데이터 비트에 근거하여 차이값 MN을 복원하는 단계(44)를 거치며, 이전 픽셀의 신장된 데이터 DN-1'에 상기 차이값 MN을 더하여 신장된 DN'을 얻는 단계(46)를 거쳐서 신장된 영상신호를 얻게 된다. 이하에서는 상기 영상 신장방법을 제 1 영상 신장방법이라 칭한다.In addition, referring to FIG. 2B, the decompression method according to the present invention will be described. When the compressed data is input, the decompressed data D N-1 ′ of the previous pixel and the compressed data D N ′ of the current pixel are input. 'going through the step 40 to recognize, one of the image height the process according to the invention the D N' going through the step 42 to calculate a "sign bit, where the bit and data bits, the sign bit, the positional bits And reconstructing the difference value M N based on the data bits (44), and adding the difference value M N to the extended data D N-1 ′ of the previous pixel to obtain the expanded D N ′ (46). The video signal extended through) is obtained. Hereinafter, the image decompression method will be referred to as a first image decompression method.

본 발명에 따른 영상 신장방법 중 다른 한가지는 상기 DN''을 위치 비트와 데이터 비트로 산출하는 단계(42)를 거치고 상기 데이터 비트를 보상하여 신장된 DN'를 얻거나 이전 픽셀의 신장된 데이터 DN-1'에 데이터 비트를 더하여 신장된 DN'를 얻는 단계(46)를 거쳐서 신장된 영상신호를 얻게 된다. 이하에서는 상기 영상 신장방법을 제 2 영상 신장방법이라 칭한다.Another one of the image height the process according to the invention the height data of the D N ', the position bits and data bits go through the step 42 of calculating a D N height to compensate for the data bits' Obtain or previous pixel The extended video signal is obtained through the step 46 of adding the data bits to D N-1 'to obtain the expanded D N '. Hereinafter, the image decompression method will be referred to as a second image decompression method.

이하 도 3 내지 6에서는 본 발명에 따른 제 1 영상 압축방법과 제 1 영상 신장방법에 대하여 실시예를 참조하여 자세히 살펴본다.3 to 6, the first image compression method and the first image extension method according to the present invention will be described in detail with reference to an embodiment.

도 3은 픽셀당 비트수가 18비트인 화면의 일부분으로서 각 픽셀의 하나의 서 브픽셀만을 본 발명에 따른 제 1 영상 압축방법으로 압축하고 제 1 영상 신장방법으로 신장하는 실시예를 도시한다.FIG. 3 illustrates an embodiment in which only one subpixel of each pixel is compressed by the first image compression method according to the present invention and expanded by the first image extension method as part of a screen having 18 bits per pixel.

픽셀당 비트수가 18비트인 경우 R, G 및 B의 각 서브픽셀은 6비트를 차지하고 도 3의 하나의 서브픽셀은 6비트이므로, 하나의 서브픽셀 데이터의 최고치는 26-1 즉, 63이 된다.When the number of bits per pixel is 18 bits, each subpixel of R, G, and B occupies 6 bits, and one subpixel of FIG. 3 is 6 bits, so the maximum value of one subpixel data is 2 6 -1, that is, 63 do.

도 3을 참조하여 제 1 영상 압축방법과 제 1 영상 신장방법을 설명한다.A first image compression method and a first image extension method will be described with reference to FIG. 3.

임의의 N번째 픽셀의 RGB 데이터 DN(210)이 55이고 N번째 이전인 N-1번째 픽셀의 신장된 데이터 DN-1'(202)이 50인 경우로서, DN(210)에 대한 DN-1'(202)의 차이값 MN을 산출하면 55-50으로 상기 차이값 MN은 5가 된다.If the RGB data D N 210 of any N th pixel is 55 and the extended data D N-1 ′ 202 of the N-1 th pixel, which is before the N th pixel, is 50, for D N 210. When the difference value M N of D N-1 ′ 202 is calculated, the difference value M N becomes 5.

제 1 영상 압축방법에서는 차이값이 양수이거나 영이면 부호 비트를 0으로 인식하고, 음수이면 부호 비트를 1로 인식하고, 상기 차이값을 상기 RGB 데이터가 차지하는 비트수와 동일한 비트수로 2진수 변환하여 상부 비트와 하부 비트로 분리를 한다.In the first image compression method, a sign bit is recognized as 0 if the difference value is positive or zero, and a sign bit is recognized as 1 if the difference value is negative, and the difference value is binary converted into the same number of bits as the number of bits occupied by the RGB data. To separate the upper and lower bits.

상기의 경우 차이값 MN은 5로 양수이므로 부호 비트는 0으로 인식되며, 상기 차이값 MN의 이진수 변환은 000101이 되고 상부 비트는 000으로 하부 비트는 101로 분리된다.In this case, since the difference value M N is positive as 5, the sign bit is recognized as 0. The binary conversion of the difference value M N is 000101, the upper bit is 000, and the lower bit is separated by 101.

여기서 상기 상부 비트가 0이 아니면 위치 비트를 1로 하고 상기 상부 비트를 데이터 비트로 인식하며, 상기 상부 비트가 0이면 위치 비트는 0으로 하고 상기 하부 비트를 데이터 비트로 인식하게 된다. 상기의 경우 상부 비트가 0이므로 위치 비트는 0으로 하고 상기 하부 비트 101을 데이터 비트로 인식하게 된다.If the upper bit is not 0, the position bit is 1 and the upper bit is recognized as the data bit. If the upper bit is 0, the position bit is 0 and the lower bit is recognized as the data bit. In this case, since the upper bit is 0, the position bit is 0 and the lower bit 101 is recognized as a data bit.

결국 부호 비트 0, 위치 비트 0, 및 데이터 비트 101로 인식이 되어 DN(210)는 0-0-101(211)의 5비트로 압축된다.Eventually it is recognized as sign bit 0, position bit 0, and data bit 101 so that D N 210 is compressed to 5 bits of 0-0-101 (211).

이번엔 상기 N번째 픽셀의 압축된 데이터 DN''(211)을 신장하는 제 1 영상 신장방법에 대하여 설명한다. 압축된 데이터 DN''(211)와 바로 이전 픽셀의 신장된 데이터 DN-1'(202)을 인식하면, DN''(211)는 0-0-101이고 DN-1'(202)은 50의 값을 가진다.A first image decompression method for decompressing the compressed data D N ″ 211 of the N th pixel will now be described. Recognizing the compressed data D N '' 211 and the stretched data D N-1 ′ 202 of the immediately preceding pixel, D N '' 211 is 0-0-101 and D N-1 '( 202 has a value of 50.

DN''(211)의 0-0-101로부터 부호 비트, 위치 비트, 및 데이터 비트를 산출하면 부호 비트는 0, 위치 비트는 0 및 데이터 비트는 101로 산출된다.If D N '0-0-101 from the' 211 calculates the sign bit, bit position, and a data bit, the sign bit is 0, the bit position is 0 and the data bit is calculated as 101.

여기서 상기 제 1 영상 신장방법은 상기 위치 비트가 1인 경우 상기 데이터 비트를 차이값 MN의 상부 비트로 하고 상기 MN의 하부 비트는 0으로 인식하며, 상기 위치 비트가 0인 경우 상기 데이터 비트를 차이값 MN의 하부 비트로 하고 상기 MN의 상부 비트는 0으로 인식한다. 따라서 DN''(211)의 상기 부호 비트는 0이므로 상기 데이터 비트 101이 차이값 MN의 하부 비트로 되고 상기 MN의 상부 비트는 0으로 인식된다. 그러므로 상기 MN은 000101이 되어 5가 된다. The first image decompression method recognizes the data bit as an upper bit of the difference value M N and the lower bit of M N as 0 when the position bit is 1, and recognizes the data bit when the position bit is 0. The lower bit of the difference value M N and the upper bit of the M N are recognized as zero. Therefore, D N, the sign bit of the '211 is zero because the data bits 101 and the lower bits of the difference M N upper bits of the M N is recognized to zero. Therefore, M N becomes 000101 to be 5.

상기 차이값 MN이 복원이 되면 이전의 N-1번째 픽셀의 신장된 데이터 DN- 1'(202)에 상기 차이값 MN을 더하여 신장된 데이터 DN'(212)을 얻게 되므로, 이전 픽셀의 신장된 데이터 DN-1'(202)의 50에 상기 MN의 5를 더하면 55가 되어 신장된 데이터 DN'(212)은 55가 된다.When the difference value M N is restored, the difference value M N is added to the extended data D N -1 ′ 202 of the previous N−1th pixel to obtain the expanded data D N ′ 212. 50 of the stretched data D N-1 ′ 202 of the pixel is added to 5 of M N to 55, and the extended data D N ′ 212 becomes 55.

나아가서 상기 실시예 도 3의 모든 픽셀에 대하여 순차적으로 각 픽셀의 RGB 데이터에 대한 압축된 데이터와 신장된 데이터를 구하여 보면, N+1번째 픽셀의 DN+1(220)이 55이고 이전 픽셀인 N번째 픽셀의 신장된 데이터 DN'(212)이 55로서, DN+1(220)에 대한 DN'(212)의 차이값 MN을 산출하면 55-55로 상기 차이값 MN+1은 0이 된다.Further, when the compressed data and the decompressed data of the RGB data of each pixel are sequentially obtained for all the pixels of FIG. 3, D N + 1 220 of the N + 1 th pixel is 55 and the previous pixel is obtained. If the extended data D N ′ 212 of the N th pixel is 55, and the difference value M N of D N ′ 212 with respect to D N + 1 220 is calculated, the difference value M N + is 55-55. 1 becomes 0.

상기 차이값 MN+1이 0이므로 위치 비트는 0이 되고, 상기 차이값 MN+1을 이진수 변환하여 상부 비트와 하부 비트로 분리하면 각각 000과 000이 된다. 여기서 상기 상부 비트가 0이므로 데이터 비트는 상기 하부 비트 000이 된다.Since the difference value M N + 1 is 0, the position bit becomes 0. When the difference value M N + 1 is binary-converted and separated into an upper bit and a lower bit, it becomes 000 and 000, respectively. Since the upper bit is 0, the data bit is the lower bit 000.

따라서 DN+1(220)에 대한 압축 데이터 DN+1''(221)은 0-0-000이 된다.Therefore, the compressed data D N + 1 ″ 221 for D N + 1 220 becomes 0-0-000.

압축된 데이터 DN+1''(221)을 제 1 영상 신장방법으로 신장하자면, DN+1''(221)의 0-0-000과 이전 픽셀의 신장된 데이터 DN'(212)의 55를 인식하고, DN+1''(221)의 0-0-000으로부터 부호 비트 0, 위치 비트 0, 및 데이터 비트 000을 산출하고, DN+1''(221)의 상기 위치 비트가 0이므로 상기 데이터 비트 000이 차이값 MN+1의 하부 비트로 되고 상기 MN+1의 상부 비트는 0으로 인식된다. 그러므로 상기 MN+1은 000000 이 되어 0이 되며, 이전 픽셀의 신장된 데이터 DN'(212)의 55에 상기 MN+1의 000000을 더하면 55가 되어 신장된 데이터 DN+1'(222)은 55가 된다.To expand the compressed data D N + 1 '' 221 by the first image stretching method, 0-0-000 of D N + 1 '' 221 and the extended data D N ′ 212 of the previous pixel. of recognizing the 55, D N + 1 ", the sign bit from the 0-0-000 221 0, bit position 0, and the output data bit 000 and, D N + 1, the position of the '221 Since the bit is zero, the data bit 000 becomes the lower bit of the difference value M N + 1 and the upper bit of the M N + 1 is recognized as zero. Therefore, M N + 1 becomes 000000 and becomes 0. If 55 of the extended data D N '212 of the previous pixel is added to 000000 of M N + 1, the extended data D N + 1 ' ( 222 becomes 55.

상술한 방법으로 N+2번째 픽셀의 RGB 데이터 DN+2(230)의 63을 압축하면 DN+2''(231)는 0-1-001이 되고, 압축된 데이터 DN+2''(231)를 신장 하면 DN+2'(232)는By compressing 63 of the RGB data D N + 2 230 of the N + 2 th pixel by the above-described method, D N + 2 '' 231 becomes 0-1-001, and the compressed data D N + 2 ' Increasing '(231) D N + 2 ' (232)

63이 된다.63.

N+3번째 픽셀의 DN+3(240)을 압축하자면, N+3번째 픽셀의 DN+3(240)이 47이고 이전 픽셀인 N+2번째 픽셀의 신장된 데이터 DN+2'(232)가 63으로서, DN+3(240)에 대한 DN+2'(232)의 차이값 MN+3을 산출하면 47-63으로 상기 차이값 MN+3은 -16이 된다.N + 3 beonjjae gritty pixel compress D N + 3 (240) in, N + 3 th pixel of D N + 3 (240) is 47 and the height data of the (N + 2) th pixel is the previous pixel D N + 2 ' If (232) is 63, and the difference value M N + 3 of D N + 2 '(232) with respect to D N + 3 240 is calculated, the difference value M N + 3 becomes -16. .

음수를 이진수로 표현하기 위하여 2의 보수를 사용하는 방법을 사용하면, 상기 차이값 MN+3이 음수이므로 부호 비트는 1이 되고, 상기 차이값 MN+3은 음수이므로 이진수 변환하기 위하여 2의 보수를 취하면 1110000이 되어, 부호 비트를 제외하고 상부 비트와 하부 비트로 분리하면 각각 110과 000이 된다. 여기서 상기 상부 비트가 0이 아니므로 데이터 비트는 상기 상부 비트 110이 된다.With the use of two's complement to represent a negative number in binary, the difference value M N + 3 is negative, because the sign bit is a 1, the difference value M N + 3 are negative, so to convert binary numbers 2 If you take the complement of, it becomes 1110000. If you divide the upper bit and lower bit except the sign bit, it becomes 110 and 000, respectively. Since the upper bit is not zero, the data bit becomes the upper bit 110.

따라서 N+3번째 픽셀의 DN+3(240)에 대한 압축데이터 DN+3''(241)은 1-1-110이 된다.Accordingly, the compressed data D N + 3 ″ 241 for the D N + 3 240 of the N + 3 th pixel becomes 1-1-110.

압축된 데이터 DN+3''(241)을 제 1 영상 신장방법으로 신장하자면, DN+3''(241)의 1-1-110과 이전 픽셀의 신장된 데이터 DN+2'(232)의 63을 인식하고, DN+3''(241)의 1-1-110으로부터 부호 비트 1, 위치 비트 1, 및 데이터 비트 110을 산출하고, DN+3''(241)의 상기 위치 비트가 1이므로 상기 데이터 비트 110이 차이값 MN+3의 상부 비트로 되고 상기 MN+3의 하부 비트는 0으로 인식된다. 그러므로 상기 MN+3은 110000이 되나 상기 부호 비트가 1이므로 음수의 2의 보수가 되어 110000은 111000으로 이를 10진수로 변환하면 상기 MN+3은 -16이 된다. To decompress the compressed data D N + 3 '' 241 by the first image stretching method, 1-1-110 of D N + 3 '' 241 and the decompressed data D N + 2 'of the previous pixel. 232), calculates the sign bit 1, the position bit 1, and the data bit 110 from 1-1-110 of D N + 3 '' 241, and calculates the value of D N + 3 '' 241. Since the position bit is 1, the data bit 110 becomes the upper bit of the difference value M N + 3 and the lower bit of the M N + 3 is recognized as 0. Therefore, M N + 3 is 110000, but since the sign bit is 1, it becomes a two's complement of negative number, and 110000 is 111000, which is converted to decimal, so that M N + 3 becomes -16.

이전 픽셀의 신장된 데이터 DN+2'(232)의 63에 상기 MN+3의 -16을 더하면 47이 되어 신장된 데이터 DN+3'(242)은 47이 된다.When 63 of the extended data D N + 2 ′ 232 of the previous pixel is added to −16 of M N + 3 , 47 becomes 47 and the expanded data D N + 3 ′ 242 becomes 47.

본 발명에 따른 RGB 데이터를 압축하기 위해서는 이전 픽셀의 신장된 데이터가 필요하므로 도 4에서는 화면 상단의 첫 번째 픽셀의 RGB 데이터 D1을 첫 번째 픽셀의 신장된 데이터 D1'로 인식하고 다음 픽셀인 두 번째 픽셀에서 RGB 데이터 D2를 압축하고 신장한다. In order to compress the RGB data according to the present invention, since the extended data of the previous pixel is required, in FIG. 4, the RGB data D 1 of the first pixel at the top of the screen is recognized as the extended data D 1 ′ of the first pixel. Compresses and decompresses the RGB data D 2 at the second pixel.

2번째 픽셀의 D2(320)가 18이고 이전 픽셀인 1번째 픽셀의 신장된 데이터 D1'(312)이 47로서, D2(320)에 대한 D1'(312)의 차이값 M2을 산출하면 18-47로 상기 차이값 M2는 -29가 된다.2, 18 is an elongated data of the first pixel of the previous pixel D 1 D 2 (320) of the second pixel (312) as a 47, D 1 to D 2 (320), the difference value of 312 M 2 The difference value M 2 is -29.

상기 차이값 M2가 음수이므로 부호 비트는 1이 되고, 상기 차이값 M2는 이진수 변환하기 위하여 2의 보수를 취하면 1100011이 되어, 2의 보수의 음수 표현상 나타는 첫 번째 비트의 1을 제외하고 상부 비트와 하부 비트로 분리하면 각각 100 과 011이 된다. 여기서 상기 상부 비트가 0이 아니므로 데이터 비트는 상기 상부 비트 100이 된다.Since the difference value M 2 is negative, the sign bit is 1, and the difference value M 2 becomes 1100011 when taking a two's complement to perform binary conversion, except for the first bit indicated by the negative representation of the two's complement. And the upper and lower bits are 100 and 011, respectively. Since the upper bit is not zero, the data bit becomes the upper bit 100.

따라서 2번째 픽셀의 D2(320)에 대한 압축데이터 D2''(321)는 1-1-100이 된다.Therefore, the compressed data D 2 ″ 321 of the second pixel D 2 320 becomes 1-1-100.

압축된 데이터 D2''(321)를 제 1 영상 신장방법으로 신장하자면, D2''(321)의 1-1-100과 이전 픽셀의 신장된 데이터 D1'(312)의 47을 인식하고, D2''(321)의 1-1-100으로부터 부호 비트 1, 위치 비트 1, 및 데이터 비트 100을 산출하고, D2''(321)의 상기 위치 비트가 1이므로 상기 데이터 비트 100이 차이값 M2의 상부 비트로 되고 상기 M2의 하부 비트는 0으로 인식된다. 그러므로 상기 M2는 100000이 되나 상기 부호 비트가 1이므로 음수의 2의 보수가 되어 100000은 1100000으로 이를 10진수로 변환하면 상기 M2는 -32가 된다. To expand the compressed data D 2 '' 321 by the first image stretching method, 1-1-100 of D 2 '' 321 and 47 of the extended data D 1 ′ 312 of the previous pixel are recognized. Calculates the sign bit 1, the position bit 1, and the data bit 100 from 1-1-100 of D 2 '' 321, and the data bit 100 because the position bit of D 2 '' 321 is 1, This bit becomes the upper bit of the difference value M 2 and the lower bit of the M 2 is recognized as zero. Thus, the M 2 are termed the 100,000 because the sign bit is 1 is the two's complement of a negative number is 100000 converting it to a decimal number to the M 2 1100000 is that -32.

이전 픽셀의 신장된 데이터 D1'(312)의 47에 상기 M2의 -32를 더하면 15가 되어 신장된 데이터 D2'(322)는 15가 된다.47 of the stretched data D 1 ′ 312 of the previous pixel is added to −32 of M 2 to 15, resulting in 15 stretched data D 2 ′ 322.

나머지 각 픽셀에 대하여 제 1 영상 압축방법으로 압축 및 제 1 영상 신장방법으로 신장은 상술한 내용으로 유추 가능하므로 생략하며, D3(330)의 63과 D4(340)의 63은 제 1 영상 압축방법으로 압축하면 각각 D3''(331)의 0-1-110과 D4''(341)의 0-0-000으로 압축되며, D3''(331)의 0-1-110과 D4''(341)의 0-0-000은 제 1 영상 신장방법으로 신장하면 각각 D3'(332)의 63과 D4'(342)의 63으로 신장된다.For each of the remaining pixels, the compression is performed by the first image compression method and the first image decompression method, so that the deduction can be inferred from the above description, and 63 of D 3 330 and 63 of D 4 340 are the first image. Compression method compresses to 0-1-110 of D 3 '' (331) and 0-0-000 of D 4 '' (341) respectively, and 0-1-110 of D 3 '' (331). And 0-0-000 of D 4 ″ 341 are extended to 63 of D 3 ′ 332 and 63 of D 4 ′ 342 when extended by the first image stretching method.

나아가서 도 5는 픽셀당 비트수가 24비트이고 하나의 서브픽셀은 8비트인 화면의 일부분으로서 각 픽셀의 하나의 서브픽셀만을 본 발명에 따라 제 1 영상 압축방법으로 압축하고 제 1 영상 신장방법으로 신장하는 실시예를 도시한다.Furthermore, FIG. 5 is a part of a screen in which the number of bits per pixel is 24 bits and one subpixel is 8 bits. Only one subpixel of each pixel is compressed by the first image compression method and expanded by the first image extension method according to the present invention. An embodiment is shown.

도 5에서는 가상의 픽셀을 화면의 상단 첫 번째 픽셀에 이웃하게 위치시키고 상기 가상 픽셀의 RGB 데이터를 D0로 하여 순차적으로 각 픽셀의 RGB 데이터를 본 발명의 제 1 영상 압축방법으로 압축하고 제 1 영상 신장방법으로 신장한다.In FIG. 5, the virtual pixels are positioned adjacent to the first pixel of the screen and the RGB data of the virtual pixel is set to D 0 , and the RGB data of each pixel is sequentially compressed using the first image compression method of the present invention. Stretch by the image stretching method.

가상의 픽셀의 D0(400)은 임의적으로 설정할 수 있으며 상황에 따라 적당한 값으로 고정시킬 수 있다. 상기의 경우 가상의 픽셀의 D0(400)은 RGB 데이터의 최고치 255로 설정하였고, 첫 번째 픽셀의 D1(410)을 압축하고 신장하는데 있어서 D0(400)을 신장된 데이터 D0'(402)으로 인식하게 된다.The virtual pixel D 0 400 may be arbitrarily set and may be fixed to an appropriate value according to a situation. For the D 0 (400) of the virtual pixel is a the D 0 (400) according to was set to the highest value 255 of the RGB data, compressing the first D 1 (410) of the second pixel, and height height data D 0 '( 402).

화면의 상단 첫 번째 픽셀의 D1(410)은 251이고 가상의 픽셀의 신장된 데이터 D0'(402)은 255이며, D1(410)에 대한 D0'(402)의 차이값 M1을 구하면 -4가 된다. The D 1 410 of the top first pixel of the screen is 251 and the stretched data D 0 '402 of the imaginary pixel is 255, and the difference of D 0 ' 402 for D 1 410 is M 1 The result is -4.

상기 차이값 M1이 음수이므로 부호 비트는 1이 되고, 이진수 변환하면 111111100이 되어, 음수 표현상 나타는 첫 번째 비트의 부호 비트 1을 제외하고 상부 비트와 하부 비트로 분리하면 각각 1111과 1100이 되며, 데이터 비트는 상기 상 부 비트 1111이 된다.Since the difference value M 1 is negative, the sign bit is 1, and when the binary conversion is performed, the sign bit is 111111100. When the binary bit is separated into the upper bit and the lower bit except for the sign bit 1 of the first bit, the number is 1111 and 1100. The data bit is the upper bit 1111.

따라서 첫 번째 픽셀의 D1(410)에 대한 압축데이터 D2''(411)는 1-1-1111이 된다.Therefore, the compressed data D 2 ″ 411 of the first pixel D 1 410 becomes 1-1-1111.

압축된 데이터 D1''(411)을 제 1 영상 신장방법으로 신장하자면, D1''(411)의 1-1-1111과 이전 픽셀의 신장된 데이터 D0'(402)의 255를 인식하고, D1''(411)의 1-1-1111로부터 부호 비트 1, 위치 비트 1, 및 데이터 비트 1111을 산출하고, 상기 위치 비트가 1이므로 상기 데이터 비트 1111이 차이값 M1의 상부 비트로 되고 상기 M1의 하부 비트는 0으로 인식된다. 그러므로 상기 M1은 11110000 되나 상기 부호 비트가 1이므로 111110000은 음수의 2의 보수이며 이를 10진수로 변환하면 상기 M1은 -16이 된다. To decompress the compressed data D 1 '' 411 by the first image decompression method, 1-1-1111 of D 1 '' 411 and 255 of the decompressed data D 0 '' 402 of the previous pixel are recognized. And a sign bit 1, a position bit 1, and a data bit 1111 from 1-1-1111 of D 1 '' 411, and since the position bit is 1, the data bit 1111 is the upper bit of the difference value M 1 . And the lower bit of M 1 is recognized as zero. Therefore, M 1 is 11110000, but since the sign bit is 1, 111110000 is a two's complement of a negative number. When M 1 is converted to a decimal number, M 1 becomes -16.

이전 픽셀의 신장된 데이터 D0'(402)의 255에 상기 M1의 -16을 더하면 239가 되어 신장된 데이터 D1'(412)은 239가 된다.Adding -16 of M 1 to 255 of the decompressed data D 0 ′ 402 of the previous pixel results in 239, resulting in 239 of decompressed data D 1 412.

나머지 각 픽셀에 대한 제 1 영상 압축방법으로 압축 및 제 1 영상 신장방법으로 신장은 상술한 내용으로 유추 가능하므로 생략한다.As the first image compression method for the remaining pixels and the first image expansion method, the decompression may be inferred as described above, and thus the description thereof is omitted.

여기서 주목할 점은 본 발명에 따라 압축 및 신장을 하게 되면 비록 원래의 데이터에 대한 에러가 발생하더라도 이웃한 몇 개의 픽셀을 지나는 동안에 에러의 오차가 줄어들게 되어 결국 신장된 데이터는 원래의 데이터를 따라가게 된다.It should be noted that the compression and decompression according to the present invention reduces the error of the error while passing through several neighboring pixels even if an error of the original data occurs, and thus the decompressed data follows the original data. .

상기 실시예를 보면 D1의 251과 D1'의 239 사이에 오차가 발생하나 D2의 251이 D2'의 251로 가면서 오차가 줄어들게 된다. 이는 현재픽셀의 RGB 데이터에 대한 이전 픽셀의 신장된 데이터의 차이를 상기 차이값으로 하기 때문에 발생하는 효과이다.In the above embodiments, one error occurs between the D 2 251 239 of the D 2 'of the D 1 and D 1 251 251 going to the error is reduced. This is an effect that occurs because the difference between the stretched data of the previous pixel and the RGB data of the current pixel is the difference value.

특히 영상화면의 경우 급격한 RGB 데이터 변화가 있기 보다는 이웃한 픽셀의 RGB 데이터에 대하여 서서히 변화가 되기 때문에 본 발명에 따른 신장된 데이터의 원래의 데이터를 따라가는 효과는 사람이 시각적으로 오차가 느껴지지 않도록 한다. 본 효과는 제 1 영상 압축방법 및 제 1 영상 신장방법에만 국한된 것이 아니라 이후에 설명될 제 2 영상 압축방법 및 제 2 영상 신장방법에서도 나타난다.In particular, in the case of a video screen, the RGB data of neighboring pixels is gradually changed rather than a sudden change in RGB data, so that the effect of following the original data of the stretched data according to the present invention does not cause a human visual error. . This effect is not limited to the first image compression method and the first image decompression method but also to the second image compression method and the second image decompression method which will be described later.

또한 본 발명에 따른 제 1 압축방법으로 RGB 데이터를 압축하는데 있어서, 상기 차이값을 구하는 방법으로 2의 보수를 더하는 방법을 사용할 수 있다. In addition, in compressing RGB data by the first compression method according to the present invention, a method of adding two's complement may be used as a method of obtaining the difference value.

도 5를 참조하여 2의 보수의 감산법으로 차이값을 구하는 과정을 설명하면, 가상의 픽셀의 D0(400)이 RGB 데이터의 최고치 255이고 D0(400)을 신장된 데이터 D0'(402)으로 인식하여 이를 이진수로 변환하면 11111111이 되고 상기 화면의 상단 첫 번째 픽셀의 D1(410)은 251이고 이를 이진수로 변환하면 11111011이 된다.Referring to FIG. 5, a process of obtaining a difference value by subtracting a two's complement is explained. D 0 400 of a virtual pixel is a maximum value 255 of RGB data, and D 0 400 is expanded data D 0 '( If it is recognized as a binary number and converted to a binary number, it becomes 11111111, and the D 1 410 of the upper first pixel of the screen is 251, and if it is converted into a binary number, it becomes 11111011.

D1(410)에 대한 D0'(402)의 차이값 M1을 구하기 위하여 D0'(402)의 이진수 값에 2의 보수를 취하면 100000001이 되고, D1(410)의 이진수 값 11111011에 D1(510) 의 2의 보수값 100000001 더하면 111111100이 된다.D 1 (410) the binary value of D 0 when the binary value of 402, 402, the difference value D 0 to obtain the M 1 of the "taking a 2's complement of being 100000001, D 1 (410) to 11,111,011 Add the two's complement value 100000001 of D 1 510 to 111111100.

여기서 111111100의 맨 앞 첫 번째 비트는 음수에 대한 2의 보수상의 부호 비트로 1은 음수를 나타내고 0은 양수를 나타내므로 상기의 경우 부호 비트가 1이므로 상기 차이값 M1이 음수임을 나타낸다. 부호비트를 제외한 차이값 M1의 11111100을 상부의 4비트와 하부의 4비트로 분리를 하면 상부 비트와 하부 비트는 각각 1111과 1100으로 나타낼 수 있고 상기 상부 비트가 0이 아니므로 위치 비트는 1이고 상부 비트 1111을 데이터 비트로 인식한다.Here, the first bit of 111111100 is a two's complementary sign bit with respect to a negative number, where 1 represents a negative number and 0 represents a positive number. Thus, since the sign bit is 1, the difference value M 1 is negative. If the 11111100 of the difference value M 1 excluding the sign bit is divided into 4 upper bits and 4 lower bits, the upper and lower bits may be represented as 1111 and 1100, respectively, and the position bit is 1 because the upper bit is not 0. The upper bit 1111 is recognized as a data bit.

따라서 D1(410)은 부호 비트 1, 위치 비트 1 및 데이터 비트 1111로 D1''(411)의 1-1-1111로 압축된다.Thus, D 1 410 is compressed into sign bit 1, position bit 1 and data bit 1111 into 1-1-1111 of D 1 ″ 411.

결국 2의 보수의 감산법으로 차이값을 구하여 압축을 하여도 동일한 결과값이 나옴을 알 수 있다.As a result, the same result is obtained even if the difference value is obtained by subtracting the two's complement.

나아가서 도 6은 도 5의 실시예를 본 발명에 따른 제 1 영상 압축방법 및 제 1 영상 신장방법의 변형으로, 차이값이 음수일 경우에 양수화하여 압축 또는 신장하는 실시예를 도시한다. Furthermore, FIG. 6 illustrates an embodiment in which the embodiment of FIG. 5 is modified from the first image compression method and the first image expansion method according to the present invention, and is positively compressed or decompressed when the difference value is negative.

화면의 상단 첫 번째 픽셀의 D1(410)은 251이고 가상의 픽셀의 신장된 데이터 D0'(404)은 255이며, D1(410)에 대한 D0'(404)의 차이값 M1을 구하면 -4가 된다. The D 1 410 of the top first pixel of the screen is 251 and the stretched data D 0 '(404) of the imaginary pixel is 255, and the difference of D 0 ' (404) for D 1 410 is M 1 The result is -4.

상기 차이값 M1은, 부호 비트로 상기 차이값 M1의 부호를 알 수 있으므로 계산의 편의상 상기 M1을 양수화하여 위치 비트와 데이터 비트를 산출하면, 상기 M1의 -4의 부호 비트는 1이 되고 상기 -4를 양수화 하면 4가 되어 이진수 변환하면 00000100이 된다. 이를 상부 비트와 하부 비트로 분리하면 각각 0000과 0100이 되며, 상기 상부 비트가 0이므로 위치 비트는 0이 되고 데이터 비트는 상기 하부 비트 0100이 된다.Since the difference value M 1 is a sign bit to know the sign of the difference value M 1 , for convenience of calculation, when the M 1 is positively calculated to calculate the position bit and the data bit, the sign bit of −4 of M 1 is 1; If -4 is positive, it becomes 4, and if it is converted to binary, it becomes 00000100. When the upper bit and the lower bit are separated into 0000 and 0100, respectively, since the upper bit is 0, the position bit becomes 0 and the data bit becomes the lower bit 0100.

따라서 첫 번째 픽셀의 D1(410)에 대한 압축데이터 D2''(413)는 1-0-0100이 된다.Therefore, the compressed data D 2 ″ 413 for the D 1 410 of the first pixel is 1-0-0100.

압축된 데이터 D1''(413)을 제 1 영상 신장방법으로 신장하자면, D1''(413)의 1-0-0100과 이전 픽셀의 신장된 데이터 D0'(404)의 255를 인식하고, D1''(413)의 1-0-0100으로부터 부호 비트 1, 위치 비트 0, 및 데이터 비트 0100을 산출하고, 상기 위치 비트가 0 이므로 데이터 비트 0100은 M1의 하부 비트가 되고 상기 M1의 상부 비트는 0으로 인식된다. 그러므로 상기 M1은 00000100이 되며 이를 10진수로 변환하면 4가 된다. 여기서 상기 부호 비트가 1로서 음수를 나타내므로 상기 M1은 음수가 되어 -4가 된다. To decompress the compressed data D 1 '' 413 by the first image decompression method, 1-0-0100 of D 1 '' 413 and 255 of the decompressed data D 0 '' 404 of the previous pixel are recognized. Calculates the sign bit 1, the position bit 0, and the data bit 0100 from 1-0-0100 of D 1 '' 413, and since the position bit is 0, the data bit 0100 becomes the lower bit of M 1 and The upper bit of M 1 is recognized as zero. Therefore, M 1 becomes 00000100, which is 4 when converted to decimal. Since the sign bit represents a negative number as 1, the M 1 becomes negative and becomes -4.

이전 픽셀의 신장된 데이터 D0'(404)의 255에 상기 M1의 -4를 더하면 251이 되어 신장된 데이터 D1'(414)은 251이 된다.When -4 of M 1 is added to 255 of the extended data D 0 '404 of the previous pixel, 251 becomes 251, and the expanded data D 1 414 becomes 251.

나머지 각 픽셀에 대한 압축 및 신장은 상술한 내용으로 유추 가능하므로 생략한다. Compression and decompression for the remaining pixels are omitted since they can be inferred from the above description.

이와 같이 차이값을 양수화하여 압축 및 신장을 하면 음수를 표현하기 위한 2의 보수계산을 사용할 필요가 없어진다. In this way, when the difference value is positively compressed and expanded, it is not necessary to use a two's complement calculation to express negative numbers.

살펴본 바와 같이 본 발명에 따른 제 1 영상 압축방법 및 제 1 영상 신장방법으로 영상을 처리하게 되면 간단한 단계만으로 하나의 픽셀이 18비트인 경우 하나의 서브픽셀 6비트를 5비트로 압축하여 하나의 픽셀은 15비트로 압축되고, 하나의 픽셀이 24비트인 경우 하나의 서브픽셀 8비트를 6비트로 압축하여 하나의 픽셀은 18비트로 압축된다. 따라서 처리해야 되는 영상 데이터의 양을 줄이게 되며 프레임 버퍼 역할을 하는 비디오 램에서 보다 적은 양의 데이터를 처리하게 되어 이로 인해 영상 처리속도가 향상된다.As described above, when the image is processed by the first image compression method and the first image expansion method according to the present invention, if one pixel is 18 bits in a simple step, one subpixel is compressed into 5 bits and one pixel is compressed. If one pixel is compressed to 15 bits, and one pixel is 24 bits, one subpixel is compressed to 6 bits, and one pixel is compressed to 18 bits. Therefore, the amount of image data to be processed is reduced, and a smaller amount of data is processed in the video RAM serving as a frame buffer, thereby improving image processing speed.

상술한 본 발명에 따른 제 1 영상 압축방법 및 제 1 영상 신장방법의 실시예와 동일한 각 픽셀의 RGB 데이터를 본 발명에 따른 제 2 영상 압축방법 및 제 2 영상 신장방법의 실시예로 도 7 내지 도 9에 도시하였으므로 이하에서는 중복되는 부분은 생략하고 제 2 영상 압축방법 및 제 2 영상 신장방법에 대하여 설명한다.7 to 9 are examples of a second image compression method and a second image expansion method according to the present invention, in which RGB data of each pixel is identical to those of the first image compression method and the first image extension method according to the present invention. 9, a description will be given of the second image compression method and the second image expansion method without any overlapping portions.

도 7에서는 N번째 픽셀의 RGB 데이터 DN(210)이 55이고 이전 픽셀의 신장된 데이터 DN-1'(206)이 50이며, DN(210)에 대한 DN-1'(206)의 차이값 MN 구하면 5가 되며 이를 이진수 변환하면 000101이 된다.'And 206 is 50, D N-1 to D N (210), FIG. 7, the RGB data D N (210) of the N-th pixel is 55 and the height data D N-1 of the previous pixel 206 The difference value M N is 5, and if it is converted to binary, it is 000101.

본 발명의 제 2 영상 압축방법에서는 하나의 픽셀의 하나의 서브픽셀의 RGB 데이터가 차지하는 비트수의 반을 H로 나타내며, 상기 실시예에서는 하나의 픽셀은 18비트이고 하나의 서브픽셀의 RGB 데이터가 차지하는 비트수는 6이므로 H는 3이 된다.In the second image compression method of the present invention, half of the number of bits occupied by RGB data of one subpixel of one pixel is represented by H. In this embodiment, one pixel is 18 bits and RGB data of one subpixel is Since the number of bits occupied is 6, H becomes 3.

또한 제 2 영상 압축방법에서는 차이값 MN의 절대값이 상기 H비트가 가질 수 있는 최대값보다 크면 위치 비트를 1로하고 데이터 비트는 DN의 상위로부터 H+1비트까지의 값으로 인식하며, 상기 MN의 절대값이 상기 H비트가 가질 수 있는 최대값보다 작거나 같으면 위치 비트를 0으로 하고 상기 MN의 상위로부터 H+1비트까지를 데이터 비트로 인식한다. Also, in the second image compression method, if the absolute value of the difference value M N is larger than the maximum value of the H bit, the position bit is 1 and the data bit is recognized as the value from the top of D N to the H + 1 bit. If the absolute value of the M N is less than or equal to the maximum value that the H bit can have, the position bit is set to 0, and the upper bits of the M N and H + 1 bits are recognized as data bits.

상기 실시예의 경우 상기 MN은 5로 H비트인 3비트가 가질 수 있는 최대값 111 즉, 7보다 작으므로 위치비트는 0이고 데이터 비트는 상기 MN의 하위로부터 4비트까지의 값으로 인식되므로, 상기 MN의 5를 이진수로 변환하면 000101이 되고 MN의 하위로부터 4비트까지의 값은 0101이 된다. 따라서 본 발명에 따른 제 2 압축 방법으로 DN(210)을 압축하면 위치 비트 0과 데이터 비트 0101로 압축되어, DN''(215)은 0-0101이 된다.In the case of the embodiment, since M N is 5, which is the maximum value that 3 bits H bits can have, that is, less than 7, position bits are 0 and data bits are recognized as values from the lower part of M N to 4 bits. If 5 of M N is converted to binary, the value is 000101, and the value from the lower part of M N to 4 bits is 0101. Therefore, when compressing a D N (210) in a second compression process according to the invention are compressed to the position 0 and the bit of data bits 0101, D N '' (215 ) is a 0-0101.

이번엔 상기 N번째 픽셀의 압축된 데이터 DN''(215)을 신장하는 제 2 영상 신장방법에 대하여 설명한다. 압축된 데이터 DN''(215)와 바로 이전 픽셀의 신장된 데이터 DN-1'(206)을 인식하면, DN''(215)는 0-0101이고 DN-1'(206)은 50의 값을 가진다.The second image decompression method for decompressing the compressed data D N ″ 215 of the N th pixel will now be described. Recognizing the compressed data D N '' 215 and the stretched data D N-1 '' 206 of the immediately preceding pixel, D N '' 215 is 0-0101 and D N-1 '' 206. Has a value of 50.

DN''(215)의 0-0101로부터 위치 비트와 데이터 비트를 산출하면 위치 비트는 0으로 데이터 비트는 0101로 산출된다.Computing the position bits and the data bits from 0-0101 of D N '' 215 yields the position bits as 0 and the data bits as 0101.

여기서 본 발명에 따른 제 2 영상 신장방법은 상기 위치 비트가 1이면, DN'의 상위로부터 H+1비트까지는 상기 데이터 비트가 가지는 값으로 인식하고 DN'의 하위로부터 H-1비트까지는 H-2비트가 가질 수 있는 최대값으로 인식하며, 상기 위치 비트가 0이면, 상기 데이터 비트의 첫 번째 비트는 부호 비트로 인식을 하고 나머지 비트가 가지는 값과 DN-1'을 더해준 값을 DN'로 인식한다.In the second image decompression method according to the present invention, when the position bit is 1, the upper part of the data bit is recognized as the value of the data bit from the upper part of D N 'to the H + 1 bit, and the lower part of the H to the H-1 bit from the lower part of D N '. If the position bit is 0, the first bit of the data bit is recognized as a sign bit, and the value of the remaining bits plus D N-1 'is added to D N. To be recognized.

제 2 영상 신장방법에 있어서, 위치 비트가 1인 경우 DN'의 하위로부터 H-1비트까지는 H-2비트가 가질 수 있는 최대값으로 인식하는 이유는 본 발명에 따른 제 2 영상 압축방법으로 압축을 하고 제 2 영상 신장방법으로 신장시에 원래 데이터에 대한 손실이 발생하게 되므로 상기 데이터의 손실에 대한 보상을 해주기 위해서이며 차후에 도 11을 참조하여 보다 자세히 설명한다. In the second image decompression method, when the position bit is 1, the reason for recognizing the lower value from D N 'to the H-1 bit as the maximum value that the H-2 bit can have is the second image compression method according to the present invention. Since the loss of the original data occurs when the image is compressed and expanded by the second image stretching method, the loss of the original data is compensated for, and will be described in detail later with reference to FIG. 11.

상기 실시예의 경우에, 상기 위치 비트가 0이므로 DN''(215)의 상기 데이터 비트의 첫 번째 비트인 0을 부호 비트로 인식하고, DN-1'의 50에 상기 데이터 비트에서 첫 번째 비트를 제외한 나머지 101을 더해준 값이 복원되는 DN'이 되므로 DN'은 50+5 즉, 55가 된다.In the case of the above embodiment, since the position bit is 0, 0, which is the first bit of the data bit of D N '' 215, is recognized as a sign bit, and the first bit in the data bit at 50 of D N-1 '. the remaining 101 a D N value is restored, except that deohaejun 'is therefore D N "is 50 + 5, i.e., 55.

나아가서 화면의 모든 픽셀에 대하여 순차적으로 각 픽셀의 RGB 데이터에 대한 제 2 압축방법으로 압축하고 제 2 영상 신장방법으로 신장을 하면, DN+1(220)이 55이고 DN'(216)이 55이며, DN+1(220)에 대한 DN'(216)의 차이값 MN+1 구하면 0이 되어 상기 MN+1은 3비트가 가질 수 있는 최대값 7보다 작으므로 위치비트는 0이고 데이터 비트는 상기 MN+1의 하위로부터 4비트까지의 값으로 인식되어 0000이 된다. 따라서 본 발명에 따른 제 2 압축 방법으로 DN+1(220)을 압축하면 위치 비트 0과 데이터 비트 0000으로 압축되어, DN+1''(225)은 0-0000이 된다. Furthermore, if all pixels on the screen are sequentially compressed using the second compression method for the RGB data of each pixel and expanded using the second image stretching method, D N + 1 220 is 55 and D N '(216) is 55, and the difference value of D N '(216) with respect to D N + 1 (220) M N + 1 is 0, and M N + 1 is smaller than the maximum value 3 bits can have, so the position bit is It is 0 and the data bit is recognized as a value from the lower 4 bits of M N + 1 to 0000. Thus, compressing D N + 1 220 with the second compression method according to the present invention compresses to position bit 0 and data bit 0000, such that D N + 1 ″ 225 becomes 0-0000.

또한 DN+1''(225)을 제 2 영상 신장방법으로 신장을 하자면, DN+1''(225)이 0-0000이고 DN'(216)이 55이며, DN+1''(225)로부터 위치 비트 0과 데이터 비트 0000을 산출하고, 위치비트가 0이므로 데이터 비트의 첫 번째 비트 0은 양수를 나타내고 나머지 000을 DN'(216)의 55에 더하여 주면 55가 된다. 따라서 DN+1''(225)에 대한 신장된 DN+1'(226)은 55가 된다.In addition, D N + 1 '' gritty to the height 225 to the second image height method, D N + 1 '' ( 225) is 0-0000 and D N '(216) 55 a, D N + 1' The position bit 0 and the data bit 0000 are calculated from '(225), and since the position bit is 0, the first bit 0 of the data bit represents a positive number and the remaining 000 is added to 55 of the D N ' 216 to be 55. Therefore, D N + 1 ", the D N + 1 to the height 225, 226 is 55.

이번엔 N+2번째 픽셀의 DN+2(230)에 대한 압축을 설명하자면, DN+2(230)가 63이고 DN+1'(226)이 55이며, DN+2(230)에 대한 DN+1'(226)의 차이값 MN+2를 구하면 8이 되어 상기 MN+2는 3비트가 가질 수 있는 최대값 7보다 크므로 위치비트는 1이 되고 데이터 비트는 상기 DN+2(230) 63의 이진수 값 111111의 상위로부터 4비트까지의 값으로 인식되어 1111이 된다. 따라서 본 발명에 따른 제 2 압축 방법으로 DN+2(230) 을 압축하면 위치 비트 1과 데이터 비트 1111으로 압축되어, DN+2''(235)는 1-1111이 된다. Now let's explain the compression of D N + 2 (230) of the N + 2th pixel: D N + 2 (230) is 63, D N + 1 '(226) is 55, and D N + 2 (230) For D N + 1 '(226), the difference value M N + 2 is 8 and M N + 2 is greater than the maximum value 7 that 3 bits can have, so the position bit is 1 and the data bit is D N + 2 (230) is recognized as a value from 4 bits up to the binary value 111111 and becomes 1111. Therefore, compressing D N + 2 230 with the second compression method according to the present invention compresses the position bit 1 and the data bit 1111, so that D N + 2 ″ 235 becomes 1-1111.

또한 DN+2''(235)를 제 2 영상 신장방법으로 신장을 하자면, DN+2''(235)가 1-1111이고 DN+1'(226)이 55이며, DN+2''(235)로부터 위치 비트 1과 데이터 비트 1111을 산출하고, 위치비트가 1이므로 DN+2'의 상위로부터 H+1비트인 4비트까지는 상기 데이터 비트 1111로 인식되고 DN+2'의 하위로부터 H-1비트인 2비트까지는 H-2비트인 1비트가 가질 수 있는 최대값인 1로 인식한다. 결국 DN+2'는 상위로부터 4비트까지는 1111이 되고 하위로부터 2비트까지는 01이 되어 111101이 되어 이를 십진수로 변환하면 61이 된다. 따라서 압축된 DN+2''(235)에 대한 신장된 DN+2'(236)는 61이 된다.In addition, if D N + 2 '' 235 is extended by the second image stretching method, D N + 2 '' 235 is 1-1111, D N + 1 ′ (226) is 55, and D N + Calculates position bit 1 and data bit 1111 from 2 " (235), and since the position bit is 1, up to 4 bits which are H + 1 bits from the top of D N + 2 'are recognized as data bit 1111 and D N + 2 Up to 2 bits, which are H-1 bits from the lower part of ', are recognized as 1, which is the maximum value that 1 bit, which is H-2 bits, can have. As a result, D N + 2 'becomes 1111 from the upper 4 bits, becomes 01111 from the lower 2 bits, becomes 111101, and converts it to decimal to 61. Thus, the stretched D N + 2 ′ 236 for the compressed D N + 2 ″ 235 becomes 61.

도 8에서는 화면 상단의 첫 번째 픽셀의 RGB 데이터 D1을 첫 번째 픽셀의 신장된 데이터 D1'로 인식하고 다음 픽셀인 두 번째 픽셀에서 RGB 데이터 D2를 압축하고 신장한다. In FIG. 8, the RGB data D 1 of the first pixel at the top of the screen is recognized as the extended data D 1 ′ of the first pixel, and the RGB data D 2 is compressed and decompressed at the second pixel, which is the next pixel.

2번째 픽셀의 D2(320)가 18이고 이전 픽셀인 1번째 픽셀의 신장된 데이터 D1'(316)이 47로서, D2(320)에 대한 D1'(316)의 차이값 M2을 산출하면 18-47로 상기 차이값 M2는 -29가 된다.2, 18 is an elongated data of the first pixel of the previous pixel D 1 D 2 (320) of the second pixel (316) as a 47, D 1 to D 2 (320), the difference value of 316 M 2 The difference value M 2 is -29.

상기 실시예에서는 하나의 픽셀은 18비트이고 하나의 서브픽셀의 RGB 데이터가 차지하는 비트수는 6이므로 H는 3이 된다.In this embodiment, H is 3 because one pixel is 18 bits and the number of bits occupied by RGB data of one subpixel is six.

상기 M2의 절대값은 29로 H비트인 3비트가 가질 수 있는 최대값 7보다 크므로 위치비트는 1이고 데이터 비트는 D2(320)의 상위로부터 4비트까지의 값으로 인식되므로, D2(320)의 18을 이진수로 변환하면 010010이 되고 상기 010010의 상위로부터 4비트까지의 값은 0100이 된다. 따라서 본 발명에 따른 제 2 압축 방법으로 D2(320)를 압축하면 위치 비트 1과 데이터 비트 0100으로 압축되어, D2''(325)는 1-0100이 된다.Since the absolute value of M 2 is 29, which is greater than the maximum value 7 that 3 bits, which are H bits, may have a position bit of 1 and a data bit is recognized as a value from 4 to 4 bits above D 2 320, D When 18 of 2 (320) is converted to a binary number, 010010 is obtained and values from the upper 4 bits of 010010 to 0100 are 0100. Thus, compressing D 2 320 with the second compression method according to the present invention compresses to position bit 1 and data bit 0100, resulting in D 2 ″ 325 being 1-0100.

이번엔 압축된 데이터 D2''(325)를 신장하는 제 2 영상 신장방법에 대하여 설명하면, 압축된 데이터 D2''(325)와 바로 이전 픽셀의 신장된 데이터 D1'(316)을 인식하면, D2''(325)는 1-0100이고 D1'(316)은 47의 값을 가진다.This time recognizes the height data D 1 '(316) of a "will be described with respect to a second image height how to extend the 325, the compressed data D 2' compressed data D 2 '' (325) and the immediately preceding pixel D 2 '' 325 is 1-0100 and D 1 '' 316 has a value of 47.

D2''(325)의 1-0100으로부터 위치 비트와 데이터 비트를 산출하면 위치 비트는 1로 데이터 비트는 0100이 되며, 상기 위치 비트가 1이므로, D2'의 상위로부터 H+1비트인 4비트까지는 상기 데이터 비트 0100으로 인식되고 D2'의 하위로부터 H-1비트인 2비트까지는 H-2비트인 1비트가 가질 수 있는 최대값인 1로 인식한다. 결국 D2'는 상위로부터 4비트까지는 0100이 되고 하위로부터 2비트까지는 01이 되어 010001이 되며, 이를 십진수로 변환하면 17이 된다. 따라서 압축된 D2''(325)에 대한 신장된 D2'(326)는 17이 된다.If the position bit and the data bit are calculated from 1-0100 of D 2 '' 325, the position bit is 1 and the data bit is 0100. Since the position bit is 1, H + 1 bit is higher than D 2 ′. Up to 4 bits are recognized as the data bit 0100 and up to 2 bits, which are H-1 bits from the lower part of D 2 ', are recognized as 1, which is the maximum value that 1 bit, which is H-2 bits, can have. As a result, D 2 'becomes 0100 from the upper 4 bits and 01 from the lower 2 bits to 010001, which is 17 when converted to decimal. Thus, the stretched D 2 '' 326 for the compressed D 2 '' 325 is 17.

나아가서 화면의 나머지 픽셀에 대하여 순차적으로 각 픽셀의 RGB 데이터에 대한 제 2 영상 압축방법으로 압축하고 제 2 영상 신장방법으로 신장하면, 그 과정은 상술한 내용으로 유추 가능하므로 생략하고, D3''(335)은 1-1111이 되고 그에 대한 신장된 D3'(336)은 61이 되며, D4''(345)는 0-1110이 되고 그에 대한 신장된 D4'(346)는 63이 된다. Further if in sequence for the remaining pixels on the screen compressed in the second image coding method for the RGB data of each pixel, and extending in a second image height method, the process is omitted because it can be inferred by the above-described information, D 3 '' (335) becomes 1-1111 and the elongated D 3 '(336) becomes 61, D 4 ''(345) becomes 0-1110 and the elongated D 4 ' (346) equals 63 do.

도 9에서는 가상의 픽셀을 화면의 상단 첫 번째 픽셀에 이웃하게 위치시키고 상기 가상 픽셀의 RGB 데이터를 D0로 하여 순차적으로 각 픽셀의 RGB 데이터를 본 발명의 제 2 영상 압축방법으로 압축하고 제 2 영상 신장방법으로 신장한다.In FIG. 9, the virtual pixels are positioned adjacent to the first pixel of the screen and the RGB data of the virtual pixel is set as D 0 , and the RGB data of each pixel is sequentially compressed by the second image compression method of the present invention. Stretch by the image stretching method.

상기 실시예의 경우 하나의 픽셀은 24비트로 하나의 서브픽셀의 RGB 데이터가 차지하는 비트수는 8이 되어 H는 4가 된다. In the above embodiment, one pixel is 24 bits, and the number of bits occupied by RGB data of one subpixel is 8, and H is 4.

화면의 상단 첫 번째 픽셀의 D1(410)은 251이고 가상의 픽셀의 D0(400)의 255를 신장된 데이터 D0'(406)으로 인식하며, D1(410)에 대한 D0'(406)의 차이값 M1을 구하면 -4가 된다.The D 1 410 of the top first pixel of the screen is 251 and 255 of D 0 400 of the imaginary pixel is recognized as extended data D 0 '(406), and D 0 ' for D 1 410 The difference value M 1 of (406) is -4.

상기 M1의 절대값은 4로 H비트인 4비트가 가질 수 있는 최대값 15보다 작으므로 위치비트는 0이고 데이터 비트는 상기 M1의 하위로부터 H+1인 5비트까지의 값 으로 인식되므로, 상기 M1의 -4를 이진수로 변환하면 111111100이 되고 상기 111111100의 하위로부터 5비트까지의 값은 11100이 된다. 따라서 본 발명에 따른 제 2 압축 방법으로 D1(410)을 압축하면 위치 비트 0과 데이터 비트 11100으로 압축되어, D1''(415)은 0-11100이 된다.An absolute value of the M 1 is less than the maximum 15 that can be the H bit of 4 bits have a 4-position bit is 0, the data bit is so recognized from the lower of said M 1 to a value of up to 5 bits of H + 1 When the -4 of M 1 is converted into a binary number, it is 111111100, and the value from the lower part of the 111111100 to 5 bits is 11100. Thus, compressing D 1 410 with the second compression method according to the present invention compresses to position bit 0 and data bit 11100, such that D 1 ″ 415 becomes 0-11100.

이번엔 압축된 데이터 D1''(415)을 신장하는 제 2 영상 신장방법에 대하여 설명하면, 압축된 데이터 D1''(415)과 바로 이전 픽셀의 신장된 데이터 D0'(406)을 인식하면, D1''(415)은 0-11100이고 D0'(406)은 255의 값을 가진다.This time recognizes the height data D 0 '(406) of a "will be described with respect to a second image height method for extending the 415, the compressed data D 1' of the compressed data D 1 '' (415) and the next pixel D 1 '' 415 is 0-11100 and D 0 '' 406 has a value of 255.

D1''(415)의 0-11100으로부터 위치 비트와 데이터 비트를 산출하면 위치 비트는 0과 데이터 비트는 11100이 되며, 상기 위치 비트가 0이므로, 상기 데이터 비트의 첫 번째 비트인 1은 부호 비트로 음수를 나타내어 음수의 2의 보수를 표현하는 11100을 10진수로 변환하면 -4가 된다. 따라서 상기 D0'에 상기 -4를 더하여준 값을 D1'로 인식한다. 결국 신장된 D1'(416)은 255에 -4를 더해준 251이 된다.Computing the position bits and the data bits from 0-11100 of D 1 '' 415 results in the position bits being 0 and the data bits being 11100. Since the position bits are 0, the first bit of the data bits, 1, is a sign. Converting 11100, which represents negative twos in bits and two's complement of negatives, to -4 results in -4 Accordingly, the value obtained by adding -4 to D 0 ′ is recognized as D 1 ′. Eventually the stretched D 1 '(416) is 251, plus -4 to 255.

나아가서 화면의 나머지 픽셀에 대하여 순차적으로 각 픽셀의 RGB 데이터에 대한 제 2 압축방법으로 압축하고 제 2 영상 신장방법으로 신장하면, 그 과정은 상술한 내용으로 유추 가능하므로 생략하고, D2''(425)는 1-00110이 되고 그에 대한 신장된 D2'(426)는 51이 되며, D3''(435)은 1-1111이 되고 그에 대한 신장된 D3'(436)은 247이 된다. Further, if the remaining pixels of the screen are sequentially compressed with the second compression method for the RGB data of each pixel and then expanded with the second image extension method, the process can be inferred from the above description, and thus, D 2 '' ( 425 becomes 1-00110 and the elongated D 2 ′ (426) becomes 51, and the D 3 '' (435) becomes 1-1111 and the elongated D 3 ′ (436) becomes 247. .

도 10은 상기 차이값을 구하는 순서의 여러 가지 방법을 도시한다.10 illustrates various methods of order of obtaining the difference values.

도 10에서 (a)는 화면 상단의 첫 번째 픽셀을 기준으로 각 행을 따라 상기 차이값을 구하는 방법이며, 도 10에서 (b)는 화면 상단의 첫 번째 픽셀을 기준으로 지그재그 형태로 상기 차이값을 구하는 방법을 나타내며, 도 10에서 (c)는 가상의 픽셀을 기준으로 하여 상기 차이값을 구하는 방법을 도시한다. 나아가서 본 발명의 차이값을 구하는 순서는 상기의 실시예에 국한 되지 않고 여러 가지 형태의 방법으로 변형될 수 있다. In Figure 10 (a) is a method for obtaining the difference value along each row based on the first pixel of the top screen, Figure 10 (b) is the difference value in a zigzag form based on the first pixel of the top screen In FIG. 10, (c) illustrates a method of obtaining the difference value based on a virtual pixel. Further, the order of obtaining the difference value of the present invention may be modified in various ways without being limited to the above embodiments.

도 11은 제 2 영상 압축방법 및 제 2 영상 신장방법으로 압축 및 신장한 그림을 도시하며, original은 원래의 영상화면을 나타내고 convert는 원래의 영상화면을 본 발명에 따른 압축 방법과 신장 방법으로 압축한 후 신장한 화면이다. 도 11에 나타난 바와 같이 본 발명은 사람의 눈으로 식별이 어려울 정도의 낮은 오차를 가지고 있으면서, 간단한 단계만으로 영상 신호를 압축 및 신장하여 그에 따라 처리해야 되는 영상 데이터의 양을 줄이고 처리속도를 증가시킨다.11 shows a picture compressed and decompressed by the second image compression method and the second image decompression method, where original represents the original image screen and convert converts the original image screen by the compression method and the decompression method according to the present invention. It is a screen stretched after one. As shown in FIG. 11, the present invention has a low error that is difficult to discern with the human eye, and compresses and stretches the video signal in a simple step, thereby reducing the amount of video data to be processed and increasing the processing speed. .

도 12는 도 11에 도시된 제 2 영상 압축방법 및 제 2 영상 신장방법으로 압축 및 신장한 그림에 대한 원래 데이터의 손실을 보상하기 위한 여러 보상값을 비교한 데이터 데이블이다.FIG. 12 is a data table comparing various compensation values for compensating for loss of original data for a picture compressed and expanded by the second image compression method and the second image extension method shown in FIG. 11.

도 11의 그림은 한 픽셀당 18비트로 표현되어 있으며, 하나의 서브픽셀은 6비트를 가진다. 상기 그림들을 본 발명에 따라 압축후 신장시에 데이터의 손실을 보상하기 위하여 00, 01, 10,및 11의 보상치를 더하여 보았다. 이는 본 발명에 따라 상기 그림들을 제 2 영상 신장방법으로 신장시에 위치 비트가 1이면 복원되는 데이터 DN'의 상위로부터 H+1 즉, 4비트까지는 원래의 데이터 값 DN을 가지게 되지만 나머지 H-1비트 즉, 2비트는 손실되기 때문에 최적의 보상값을 찾기 위해서이다.The picture of FIG. 11 is represented by 18 bits per pixel, and one subpixel has 6 bits. The above figures were added with compensation values of 00, 01, 10, and 11 to compensate for the loss of data during compression and compression in accordance with the present invention. According to the present invention, when the pictures are decompressed by the second image decompression method, if the position bit is 1, H + 1, i.e., up to 4 bits, has the original data value D N from the upper part of the data D N 'restored. Since -1 bit, or 2 bits, is lost, it is to find the optimal compensation value.

도시된 데이터 테이블에서 보다시피 (a)석양의 경우에는 보상치 10을 더하였을 때 최소의 에러가 발생되나 나머지 (b)겨울, (c)수련, 및 (d)푸른언덕은 보상치 01을 더하였을 때 최소의 에러가 발생된다.As shown in the data table shown, (a) at sunset, a minimum error occurs when 10 compensation is added, while the remaining (b) winter, (c) training, and (d) blue hills add compensation 01. If you do, the minimum error occurs.

따라서 일정한 통일성을 가져 모든 경우에 적용되도록 하기위하여 본 발명에서는 손실되는 H-1비트에 대하여 H-2비트가 가질 수 있는 최대값을 보상값으로 설정하였다. 상기 그림의 경우에는 H-2비트 즉, 1비트가 가질 수 있는 최대값인 01이 본 발명에 따른 보상값이 된다.Therefore, in the present invention, the maximum value that the H-2 bits can have with respect to the lost H-1 bits is set as a compensation value in order to be applied to all cases with a certain uniformity. In the case of the above figure, 01, which is the maximum value that H-2 bits, that is, one bit can have, is the compensation value according to the present invention.

그러므로 위에서 간단히 언급했듯이 제 2 영상 신장방법에 있어서, 위치 비트가 1인 경우 DN'의 하위로부터 H-1비트까지는 H-2비트가 가질 수 있는 최대값으로 인식하여 본 발명에 따른 제 2 영상 신장방법으로 신장시에 원래 데이터에 대한 손실의 보상을 해주게 된다. Therefore, as mentioned briefly above, in the second image decompression method, when the position bit is 1, the second image according to the present invention is recognized as the maximum value that the H-2 bit can have from the lower part of D N 'to the H-1 bit. The expansion method compensates for the loss of the original data at the time of stretching.

살펴본 바와 같이 본 발명에 따른 제 2 영상 압축방법 및 제 2 영상 신장방법은 압축 및 신장시에 발생할 수 있는 데이터의 손실에 대한 보상을 해주며, 간단한 단계만으로 처리해야 되는 영상 데이터의 양을 줄이게 되어 프레임 버퍼 역할을 하는 비디오 램에서 보다 적은 양의 데이터를 처리하게 되며 이로 인해 영상 처리속도가 향상된다.As described above, the second image compression method and the second image decompression method according to the present invention compensate for the loss of data that may occur during compression and decompression, and reduce the amount of image data to be processed in a simple step. The video RAM, which acts as a frame buffer, processes less data, which speeds up image processing.

도 13은 본 발명에 따른 영상처리장치의 개략적인 구성을 도시한다.13 shows a schematic configuration of an image processing apparatus according to the present invention.

본 발명의 영상처리장치의 주요구성부분은 엔코더(614), 저장부(616), 및 디코더(618)이다.The main components of the image processing apparatus of the present invention are an encoder 614, a storage 616, and a decoder 618.

엔코더(614)에서 현재 픽셀의 RGB 데이터 DN에 대한 이전 픽셀의 RGB 데이터 DN-1에 기초한 신장된 데이터 DN-1'의 차이값 MN에 기초하여 상기 현재 픽셀의 RGB 데이터 DN를 압축하여 압축된 데이터 DN''를 생성한다.Encoder 614 at the current pixel RGB data D N on the basis of the current difference between the value of the data D N-1 'height based on the RGB data D N-1 of a previous pixel to the RGB data of the pixels D N M N compressed to generate a compressed data D N ''.

엔코더(614)에서는 DN이 본 발명에 따른 제 1 영상 압축방법 또는 제 2 영상 압축방법으로 압축되어 압축된 데이터 DN''로 될 수 있다.In the encoder 614, D N may be compressed data D N ″ compressed by the first image compression method or the second image compression method according to the present invention.

상기 엔코더(614)에서 상기 압축된 데이터 DN''는 프레임 버퍼 역할을 하는 저장부(616)에서 버퍼링되어지고, 상기 버퍼링된 DN''는 디코더(618)에서 신장된다.In the encoder 614, the compressed data D N ″ is buffered in the storage unit 616 serving as a frame buffer, and the buffered D N ″ is expanded in the decoder 618.

디코더(618)에서는 압축된 상기 DN''이 본 발명에 따른 제 1 영상 신장방법 또는 제 2 영상 신장방법으로 신장되어 DN'이 될 수 있다.Decoder 618. The 'is extended in the first method or the second image height image height method in accordance with the present invention D is N, N compressed the D' may be.

또한 디코더(618)에서 신장된 상기 DN'은 순차적으로 이웃한 픽셀의 RGB 데이터 DN+1과의 차이값 MN+1을 산출하기 위해 엔코더(614)로도 전달된다.In addition, the D N ′ extended by the decoder 618 is sequentially transferred to the encoder 614 to calculate a difference value M N + 1 from the RGB data D N + 1 of neighboring pixels.

본 발명에 따른 상기 영상처리장치는 입력되는 영상의 각 픽셀의 RGB 데이터 신호를 상기 엔코더(614)로 전달하기 위한 인터페이스(612)와 신장된 데이터 DN'를 디스플레이 패널로 출력하기 위한 출력부(620)를 포함 할 수 있다.The image processing apparatus according to the invention is for outputting RGB data signal of each pixel of the input image wherein the interface (612) and an elongated data D N 'for delivery to the encoder 614 to the display panel output ( 620).

상기 본 발명에 따른 영상처리장치는 원래의 RGB 데이터를 본 발명에 따른 간단한 압축방법으로 압축하여 프레임 버퍼에 저장하고 버퍼링되므로 비디오램의 용량을 줄이고 영상 처리시간을 향상시킬 수 있다.The image processing apparatus according to the present invention compresses the original RGB data by the simple compression method according to the present invention, stores the data in a frame buffer, and buffers the data, thereby reducing the capacity of the video RAM and improving image processing time.

본 발명에 의한, 영상 압축과 신장 방법 및 그 장치는 본 발명의 기술적 사상의 범위 내에서 다양한 형태로 변형, 응용 가능하며 상기 실시예에 한정되지 않는다. 또한, 상기 실시예와 도면은 발명의 내용을 상세히 설명하기 위한 목적일 뿐, 발명의 기술적 사상의 범위를 한정하고자 하는 목적은 아니며, 이상에서 설명한 본 발명은 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 있어 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형, 및 변경이 가능하므로 상기 실시예 및 첨부된 도면에 한정되는 것은 아님은 물론이며, 후술하는 청구범위뿐만이 아니라 청구범위와 균등 범위를 포함하여 판단되어야 한다.The image compression and decompression method and apparatus according to the present invention can be modified and applied in various forms within the scope of the technical idea of the present invention and are not limited to the above embodiments. In addition, the embodiments and drawings are merely for the purpose of describing the contents of the invention in detail, and are not intended to limit the scope of the technical idea of the invention, the present invention described above is common knowledge in the technical field to which the present invention belongs As those skilled in the art can have various substitutions, modifications, and changes without departing from the spirit and scope of the present invention, it is not limited to the embodiments and the accompanying drawings. Judgment should be made including scope and equivalence.

본 발명은 간단한 단계만으로 영상 정보의 손실이 적은 압축 및 신장 방법을 구현하여, 처리해야 되는 영상 데이터의 양을 줄이게 되어 프레임 버퍼 역할을 하는 비디오 램에서 보다 적은 양의 데이터를 처리하게 되며 이로 인해 영상 처리속도가 향상시킨다.The present invention implements a compression and decompression method with low loss of image information in a simple step, thereby reducing the amount of image data to be processed, thereby processing a smaller amount of data in a video RAM serving as a frame buffer. Improved processing speed

또한 본 발명의 영상 압축률은 영상의 내용에 따라 압축률이 변동하는 것이 아니기 때문에 영상 데이터의 처리 시간의 안정성이 있다.In addition, since the compression rate does not vary depending on the content of the image, the image compression rate of the present invention has a stable processing time of the image data.

나아가서 본 발명의 압축 및 신장 방법을 이용하는 영상처리장치는 압축 방법이 복잡한 수식을 이용하는 것이 아니기 때문에 단순한 논리회로로 인코더 및 디코더를 제작하여 영상 데이터양을 줄이고 영상 정보의 처리속도를 향상시킬 수 있다. Furthermore, the image processing apparatus using the compression and decompression method of the present invention can reduce the amount of image data and improve the processing speed of image information by making encoders and decoders with simple logic circuits because the compression method does not use complex equations.

Claims (13)

현재의 픽셀 RGB 데이터 DN과, 이전의 픽셀 RGB 데이터 DN -1에 기초한 신장된 데이터 DN-1'을 인식하는 단계;Recognizing the current pixel RGB data D N and the decompressed data D N-1 ′ based on the previous pixel RGB data D N −1 ; 상기 DN 대한 상기 DN-1'의 차이값 MN을 산출하는 단계;Calculating a difference value of the D M N N the D N-1 'for; 상기 MN이 양수이거나 영이면 부호 비트를 0로 인식하고, 음수이면 부호 비트를 1로 인식하며,If the M N is positive or zero, the sign bit is recognized as 0, and if the N N is negative, the sign bit is recognized as 1, 상기 MN을 상부 비트와 하부 비트로 분리하여, The M N is divided into an upper bit and a lower bit, 상기 상부 비트가 0이 아니면 위치 비트를 1로 하고 상기 상부 비트를 데이터 비트로 인식하고, If the upper bit is not 0, the position bit is 1 and the upper bit is recognized as a data bit, 상기 상부 비트가 0이면 위치 비트를 0으로 하고 상기 하부 비트를 데이터 비트로 인식하는 단계; 및Recognizing a location bit as zero and recognizing the lower bit as a data bit if the upper bit is zero; And 상기 DN을 상기 부호 비트, 상기 위치 비트, 및 상기 테이터 비트로 압축된 데이터 DN''로 얻는 단계를 포함하는 것을 특징으로 하는 영상 압축방법. (여기서, N은 각 픽셀의 순서를 나타내고, N = 1, 2, 3, ... n, ...이며, n은 자연수)Image coding method comprising the steps of obtaining the N D to the sign bit, the bit position, and the mutator bit-compressed data D N ''. (Where N represents the order of each pixel, where N = 1, 2, 3, ... n, ..., n is a natural number) 현재의 픽셀의 RGB 데이터에 대한 압축된 데이터 DN''와 이전 픽셀의 RGB 데 이터 DN-1에 기초한 신장된 데이터 DN-1'을 인식하는 단계;Recognizing the compressed data D N ″ for the RGB data of the current pixel and the decompressed data D N-1 ′ based on the RGB data D N-1 of the previous pixel; 상기 압축된 데이터 DN''에서 부호 비트, 위치 비트, 및 데이터 비트를 산출하는 단계;Calculating a sign bit, a position bit, and a data bit from the compressed data D N ″; 상기 위치 비트가 1인 경우 상기 데이터 비트를 MN의 상부 비트로 하고 상기 MN의 하부 비트는 0으로 인식하고If the bit position is 1, the upper bits and the lower bits of the M N-bit data of the M N is recognized as 0 상기 위치 비트가 0인 경우 상기 데이터 비트를 MN의 하부 비트로 하고 상기 MN의 상부 비트는 0으로 인식하며,If the bit position is 0 and the lower bits of the data bit and the upper bit of the M N M N is recognized as 0, 상기 부호 비트가 0이면 상기 MN을 양수로 인식하고, 1이면 상기 MN을 음수로 인식하여 상기 차이값 MN을 복원하는 단계; 및Recognizing the M N as a positive number when the sign bit is 0 and recognizing the M N as a negative value when 1, restoring the difference value M N ; And DN-1'에 상기 MN을 더하여 신장된 데이터 DN'을 얻는 단계를 포함하는 것을 특징으로 하는 영상 신장방법. And adding the M N to the D N-1 'to obtain the extended data D N '. 현재의 픽셀 RGB 데이터 DN과 이전의 픽셀 RGB 데이터 DN-1에 기초한 신장데이터 DN-1'을 인식하는 단계;Recognizing the decompression data D N-1 ′ based on the current pixel RGB data D N and the previous pixel RGB data D N-1 ; 상기 DN 대한 상기 DN-1'의 차이값 MN을 산출하는 단계;Calculating a difference value of the D M N N the D N-1 'for; 상기 MN의 절대값이, H비트(여기서 H는 상기 하나의 픽셀의 하나의 서브픽셀 RGB 데이터가 차지하는 비트수의 반을 나타낸다.)가 가질 수 있는 최대값보다 크면, 위치비트는 1로 인식하고 데이터 비트는 상기 DN의 상위로부터 H+1비트까지의 값으로 인식하며,If the absolute value of M N is greater than the maximum value that H bits (where H represents half of the number of bits occupied by one subpixel RGB data of the one pixel) can be recognized as a position bit 1 The data bit is recognized as a value from the top of the D N to the H + 1 bit, 상기 MN의 절대값이, 상기 H비트가 가질 수 있는 최대값보다 작거나 같으면, 위치비트는 0으로 인식하고 데이터 비트는 상기 MN의 하위로부터 H+1비트까지의 값으로 인식하는 단계; 및If the absolute value of M N is less than or equal to the maximum value that the H bit can have, recognizing a position bit as 0 and recognizing a data bit as a value from a lower part of M N to a value of H + 1 bits; And 상기 DN을 상기 위치 비트 및 상기 데이터 비트로 압축된 데이터 DN''로 얻는 단계를 포함하는 것을 특징으로 하는 영상 압축방법.Image coding method comprising the steps of obtaining the D position to the N-bit data and the bit-compressed data D N ''. 현재의 픽셀의 RGB 데이터에 대한 압축된 데이터 DN''와 이전 픽셀의 RGB 데이터 DN-1에 기초한 신장된 데이터 DN-1'을 인식하는 단계;Recognizing the compressed data D N ″ for the RGB data of the current pixel and the decompressed data D N-1 ′ based on the RGB data D N-1 of the previous pixel; 상기 압축된 데이터 DN''에서 위치 비트 및 데이터 비트를 산출하는 단계; 및Calculating position bits and data bits from the compressed data D N ″; And 상기 위치 비트가 1이면, DN'의 상위로부터 H+1비트까지는 상기 데이터 비트가 가지는 값으로 인식하고 DN'의 하위로부터 H-1비트까지는 H-2비트가 가질 수 있는 최대값으로 인식하며,If the location bit is 1, the upper part of D N 'is recognized as the value of the data bit from H + 1 bit, and the lower part of D N ' is recognized as the maximum value that H-2 bit can have from H-1 bit. , 상기 위치 비트가 0이면, 상기 데이터 비트의 첫 번째 비트는 부호 비트로 인식을 하고 나머지 비트가 가지는 값과 DN-1'을 더해준 값을 DN'로 인식하여, 상기 압축된 데이터 DN''에 대한 신장된 데이터 DN'으로 얻는 단계를 포함하는 것을 특징으로 하는 영상 신장방법.When the position bit is 0, the first bit of the data bit is recognized as a sign bit, and the value added by the remaining bit and D N-1 'is recognized as D N ', thereby compressing the compressed data D N ''. Elongated data for D n 'get Image stretching method comprising the step. 제 1항 또는 제 3항에 있어서,The method according to claim 1 or 3, 화면의 모든 픽셀에 대하여 순차적으로 각 픽셀 RGB 데이터에 대한 압축된 데이터를 얻는 단계를 포함하는 것을 특징으로 하는 영상 압축방법.And obtaining compressed data for each pixel RGB data sequentially for all pixels of the screen. 제 5항에 있어서,The method of claim 5, 화면 상단의 첫 번째 픽셀의 RGB 데이터 D1을 신장된 데이터 D1'로 인식하는 단계를 포함하는 것을 특징으로 하는 영상 압축방법.And recognizing RGB data D 1 of the first pixel at the top of the screen as extended data D 1 ′. 제 5항에 있어서,The method of claim 5, 임의의 RGB 데이터 D0을 가지는 가상의 픽셀을 화면의 상단 첫 번째 픽셀에 이웃하게 위치시키고 상기 가상의 픽셀의 D0을 신장된 데이터 D0'로 인식하는 단계를 포함하는 것을 특징으로 하는 영상 압축방법.Image compression, characterized in that it comprises a step of recognizing in any RGB data D virtual pixel of having a zero neighborhood located at the first pixel at the top of the screen and extending the D 0 of the virtual pixel data D 0 ' Way. 제 2항 또는 제 4항에 있어서,The method according to claim 2 or 4, 화면의 모든 픽셀에 대하여 순차적으로 각 픽셀 RGB 데이터의 압축된 데이터에 대한 신장된 데이터를 얻는 단계를 포함하는 것을 특징으로 하는 영상 신장방법.And obtaining the decompressed data for the compressed data of each pixel RGB data sequentially for all the pixels of the screen. 현재의 픽셀 RGB 데이터 DN과, 이전의 픽셀 RGB 데이터 DN-1에 기초한 신장된 데이터 DN-1' 사이의 차이값 MN을 산출하고, 상기 산출된 차이값 MN에 기초하여 상기 현재의 픽셀 RGB 데이터 DN을 압축하여 압축된 데이터 DN''를 얻는 엔코더;Calculates a difference value M N between the current pixel RGB data D N and the extended data D N-1 ′ based on the previous pixel RGB data D N-1 , and based on the calculated difference value M N; An encoder for compressing pixel RGB data D N of to obtain compressed data D N ″; 상기 엔코더에 의해 산출된 압축 데이터 DN''를 버퍼링하는 프레임 버퍼; 및A frame buffer for buffering the compressed data D N ″ calculated by the encoder; And 상기 프레임 버퍼에 의해 버퍼링된 압축된 데이터 DN''를 신장하여 신장된 데이터 DN'을 얻는 디코더를 포함하는 것을 특징으로 하는 영상처리장치.And a decoder for decompressing the compressed data D N ″ buffered by the frame buffer to obtain the decompressed data D N ′. 제 9항에 있어서,The method of claim 9, 상기 엔코더는 상기 이전의 픽셀 RGB 데이터 DN-1에 기초한 신장된 데이터 DN-1'을 상기 디코더로부터 입력받는 것을 특징으로 하는 영상처리장치.And the encoder receives the extended data D N-1 ′ based on the previous pixel RGB data D N-1 from the decoder. 제 9항에 있어서,The method of claim 9, 상기 엔코더는 제 1항의 영상 압축방법 또는 제 3항의 영상 압축방법으로 RGB 데이터를 압축하는 것을 특징으로 하는 영상처리장치.And the encoder compresses the RGB data by the image compression method of claim 1 or the image compression method of claim 3. 제 9항에 있어서,The method of claim 9, 상기 디코더는 제 2항의 영상 신장방법 또는 제 4항의 영상 신장방법으로 압축된 데이터를 신장하는 것을 특징으로 하는 영상처리장치.The decoder extends the compressed data by the image decompression method of claim 2 or the image decompression method of claim 4. 제 9항에 있어서,The method of claim 9, 입력되는 영상의 각 픽셀의 RGB 데이터 신호를 엔코더로 출력하는 인터페이스 및 상기 디코더에 의해 신장된 DN'를 출력하는 출력부를 포함하는 것을 특징으로 하는 영상처리장치.And an output unit for outputting an RGB data signal of each pixel of the input image to an encoder, and an output unit for outputting D N 'extended by the decoder.
KR1020060044036A 2006-05-17 2006-05-17 Method of compressing and decompressing image and equipment thereof KR100798386B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060044036A KR100798386B1 (en) 2006-05-17 2006-05-17 Method of compressing and decompressing image and equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060044036A KR100798386B1 (en) 2006-05-17 2006-05-17 Method of compressing and decompressing image and equipment thereof

Publications (2)

Publication Number Publication Date
KR20070111111A true KR20070111111A (en) 2007-11-21
KR100798386B1 KR100798386B1 (en) 2008-01-28

Family

ID=39090111

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060044036A KR100798386B1 (en) 2006-05-17 2006-05-17 Method of compressing and decompressing image and equipment thereof

Country Status (1)

Country Link
KR (1) KR100798386B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100864278B1 (en) * 2007-06-22 2008-10-17 매그나칩 반도체 유한회사 Apparatus to processing data
US8861876B2 (en) 2012-06-22 2014-10-14 Samsung Display Co., Ltd. Pixel data compression device
KR20170059336A (en) * 2015-11-20 2017-05-30 삼성전자주식회사 Apparatus and method for continuous data compression

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW391129B (en) * 1998-04-30 2000-05-21 Hyundai Electronics Ind Apparatus and method for compressing image data outputted from image semsor having bayer pattern
KR20010059114A (en) * 1999-12-30 2001-07-06 박종섭 Method for compressing image data outputted from image sensor
KR20060056558A (en) * 2004-11-22 2006-05-25 주식회사 네빌소프트 Encoding and decoding method for video

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100864278B1 (en) * 2007-06-22 2008-10-17 매그나칩 반도체 유한회사 Apparatus to processing data
US8861876B2 (en) 2012-06-22 2014-10-14 Samsung Display Co., Ltd. Pixel data compression device
KR20170059336A (en) * 2015-11-20 2017-05-30 삼성전자주식회사 Apparatus and method for continuous data compression

Also Published As

Publication number Publication date
KR100798386B1 (en) 2008-01-28

Similar Documents

Publication Publication Date Title
US8285037B2 (en) Compression format and apparatus using the new compression format for temporarily storing image data in a frame memory
JP2646169B2 (en) Video compression and decompression methods
JP4491349B2 (en) Intra-coding method and apparatus for video data
US6603814B2 (en) Video compression scheme using wavelets
US20120057788A1 (en) Image processing apparatus and method
KR20040007687A (en) Method and system for achieving coding gains in wavelet-based image codecs
CN103458242A (en) Method for compressing and uncompressing image based on color classification and cluster
US11445160B2 (en) Image processing device and method for operating image processing device
US20210250575A1 (en) Image processing device
JP2010098352A (en) Image information encoder
KR100798386B1 (en) Method of compressing and decompressing image and equipment thereof
US8600181B2 (en) Method for compressing images and a format for compressed images
US11600026B2 (en) Data processing systems
US11190810B2 (en) Device and method for compressing image data using quantization parameter and entropy tables
US20210344900A1 (en) Image processing device
CN106954074B (en) Video data processing method and device
US20050129110A1 (en) Coding and decoding method and device
JP2007208796A (en) Video signal encoding transmission and decoding method
KR20010110053A (en) Method for compressing dynamic image information and system therefor
US20220201340A1 (en) Image processing device and method for operating image processing device
US20220201060A1 (en) Image processing device and method for operating image processing device
KR102543449B1 (en) Image processing device and method for operating image processing device
KR102465206B1 (en) Image processing device
KR20220149124A (en) A image signal processor, a method of operating a image signal processor and a image processing system including the image processing device
JPH0946553A (en) Filter

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
LAPS Lapse due to unpaid annual fee