KR100412176B1 - Document segmentation compression, reconstruction system and method - Google Patents

Document segmentation compression, reconstruction system and method Download PDF

Info

Publication number
KR100412176B1
KR100412176B1 KR10-2002-0004196A KR20020004196A KR100412176B1 KR 100412176 B1 KR100412176 B1 KR 100412176B1 KR 20020004196 A KR20020004196 A KR 20020004196A KR 100412176 B1 KR100412176 B1 KR 100412176B1
Authority
KR
South Korea
Prior art keywords
image
foreground
background
wavelet
color
Prior art date
Application number
KR10-2002-0004196A
Other languages
Korean (ko)
Other versions
KR20030063850A (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 KR10-2002-0004196A priority Critical patent/KR100412176B1/en
Publication of KR20030063850A publication Critical patent/KR20030063850A/en
Application granted granted Critical
Publication of KR100412176B1 publication Critical patent/KR100412176B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

본 발명은 문자와 이미지가 포함된 문서의 분할, 압축 그리고 복원 시스템 및 방법에 관한 것으로서, 더 상세하게는 문자(text)와 이미지(image)가 함께 구성되는 문서(document)의 경우에 문자와 이미지를 분할(segmentation)하여 문자는 문자대로 이미지는 이미지대로 각각 부호화하고 다시 복호화하는 문서의 분할, 압축 그리고 복원 시스템 및 방법에 관한 것이다.The present invention relates to a system and method for segmenting, compressing, and restoring a document including text and images. More particularly, the present invention relates to text and images in the case of a document composed of text and images. The present invention relates to a system and method for segmenting, compressing, and restoring a document by encoding and re-decoding each character by character and literally image by image.

본 발명에 의한 문서의 압축 시스템은, 문자와 이미지가 포함된 문서를 문자에 해당하는 포그라운드(foreground) 영상과, 배경 및 그림의 이미지에 해당하는 백그라운드(background) 영상과, 비트맵(bitmap) 영상으로 분리하여 생성하는 문서분할 모듈과; 상기 비트맵 영상을 입력으로 받아 부호화를 하여 JBG 파일을 생성하는 JBIG 부호기와; 상기 포그라운드 영상과 백그라운드 영상을 입력으로 받아 웨이블릿 리프팅 방식으로 웨이블릿 변환을 수행하여 웨이블릿 계수를 출력하는 FDWT부와; 상기 웨이블릿 계수를 입력으로 받아 부호화하여 비트스트림을 생성하는 비트평면 부호기로 구성된다.According to the present invention, a document compression system includes a foreground image corresponding to a character and a background image corresponding to an image of a background and a picture, and a bitmap. A document splitting module for separating and generating an image; A JBIG encoder for generating a JBG file by receiving the bitmap image as an input and encoding the bitmap image; An FDWT unit which receives the foreground image and the background image as inputs and performs wavelet transform by a wavelet lifting method to output wavelet coefficients; And a bit plane encoder that receives the wavelet coefficient as an input and encodes the wavelet coefficient to generate a bitstream.

Description

문자와 이미지가 포함된 문서의 압축, 복원 시스템 및 방법 {Document segmentation compression, reconstruction system and method}Document segmentation compression, reconstruction system and method

본 발명은 문자와 이미지가 포함된 문서의 분할, 압축 그리고 복원 시스템 및 방법에 관한 것으로서, 더 상세하게는 문자(text)와 이미지(image)가 함께 구성되는 문서(document)의 경우에 문자와 이미지를 분할(segmentation)하여 문자는 문자대로 이미지는 이미지대로 각각 부호화하고 다시 복호화하는 문서의 분할, 압축그리고 복원 시스템 및 방법에 관한 것이다.The present invention relates to a system and method for segmenting, compressing, and restoring a document including text and images. More particularly, the present invention relates to text and images in the case of a document composed of text and images. The present invention relates to a segmentation, compression, and decompression system and method for document segmentation by encoding and re-decoding of characters into characters and images into images.

현재 가장 많이 사용하고 있는 정지 영상을 위한 압축 방법은 JPEG(Joint Photographic Experts Group) 부호화이다.The most common compression method for still images is JPEG (Joint Photographic Experts Group) encoding.

JPEG와 같은 손실 압축 방법은 압축률을 높임에 따라 원 영상에 대한 손실 또한 높아진다.Lossy compression methods, such as JPEG, increase the compression rate, resulting in higher loss of the original image.

일반적으로 영상을 JPEG와 같은 손실 압축법으로 압축했을 경우, 복원한 영상은 사람의 눈에 보기에 무리가 없다.In general, when the image is compressed using a lossy compression method such as JPEG, the reconstructed image can be easily seen by the human eye.

그러나 신문, 잡지 등과 같은 높은 해상도의 문서를 스캔한 영상, 즉 문자가 포함되어 있고, 문자에 대한 중요도가 비교적 높은 영상을 JPEG과 같은 손실 압축법으로 압축했을 경우 복원한 영상에서 문자를 알아보기는 힘들다.However, if a scanned image of a high resolution document such as a newspaper or a magazine, that is, a character is included and the image of a relatively high importance for the character is compressed by a lossy compression method such as JPEG, the image is not recognized. Hard.

문자는 일반적으로 이미지에 비해 영상에서 차지하는 면적이 극히 적고 미세하기 때문에 영상의 적은 손실도 문자에 대해서는 큰 영향을 끼치기 때문이다.This is because a character generally has an extremely small and fine area of an image compared to an image, so even a small loss of an image has a great effect on the character.

즉, 종래에는 문자와 이미지를 함께 압축하고 복원하였으며, 이미지를 압축하고 복원하는 방법과 같은 방법으로 문자를 압축하고 복원하는 경우에 문자가 많이 뭉개지고 희미해져서 눈으로 읽기가 어렵게 되는 경우가 많이 있었다.That is, in the past, text and images were compressed and restored together, and when compressing and restoring characters in the same way as compressing and restoring images, characters were often shuffled and blurred, making it difficult to read with eyes. .

또한 종래에는 웨이블릿 리프팅 방식의 정수 변환(integer transform)을 수행하는 데 있어서, 1) 문자만을 포함한 문자 영상, 2) 간단한 흑백 영상, 3) 복잡한 흑백 영상, 4) 간단한 컬러 영상, 5) 자연 영상, 총 5가지 경우만을 고려하여 처리하였기 때문에 영상의 종류에 따라서 적합하게 정수 변환을 선택할 수 없어 손실이 많이 발생하게 되었다.In addition, conventionally, in performing an integer transform of the wavelet lifting method, 1) a character image including only a character, 2) a simple monochrome image, 3) a complex monochrome image, 4) a simple color image, 5) a natural image, Since only five cases were considered, the integer conversion could not be selected according to the type of image.

본 발명은 상술한 문제점을 해결하기 위하여 안출된 것으로서, 문서를 압축하기 전에 문서 분할 부분에서 문자와 이미지를 분할하여 문자는 문자대로 이미지는 이미지대로 각각 부호화하고 다시 복호화함으로써 문자와 이미지가 포함된 문서를 동시에 압축하고 복원할 수 있고 입력되는 영상에 적합하게 정수변환을 선택할 수 있어 손실을 감소시킬 수 있으며, 따라서 문서의 높은 압축 효과와 높은 품질을 유지할 수 있는 문자와 이미지가 포함된 문서의 압축, 복원 시스템 및 방법을 제공하는데 그 목적이 있는 것이다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and before a document is compressed, a document and a document containing a character and an image are divided by encoding and decoding the characters and the images, respectively, and the images, respectively, as images. Can be compressed and reconstructed at the same time, and integer conversion can be selected to suit the input image, thereby reducing the loss. Therefore, the compression of documents containing characters and images that can maintain high compression and high quality of documents, It is an object of the present invention to provide a restoration system and method.

상술한 목적을 달성하기 위하여 본 발명은, 문자와 이미지가 포함된 문서를, 문자에 해당하는 포그라운드 영상과, 배경 및 그림의 이미지에 해당하는 백그라운드 영상과, 비트맵 영상으로 분리하여 생성하는 문서분할 모듈과; 상기 비트맵 영상을 입력으로 받아 부호화를 하여 JBG 파일을 생성하는 JBIG 부호기와; 상기 포그라운드 영상과 백그라운드 영상을 입력으로 받아 색차 변환과 다운샘플링을 수행하고, 리프팅 방식으로 웨이블릿 변환을 수행하여 웨이블릿 계수를 출력하는 FDWT부와; 상기 웨이블릿 계수를 입력으로 받아 그레이코드(graycode) 변환과 양자화를 수행하고, 비트평면 방식에 의하여 부호화를 수행화하여 비트스트림을 생성하는 비트평면(Bit-plane) 부호기를 포함하는 문자와 이미지가 포함된 문서의 압축 시스템을 제공하고자 한다.In order to achieve the above object, the present invention, a document for generating a document containing a character and an image, separated into a foreground image corresponding to the character, a background image corresponding to the image of the background and pictures, and a bitmap image A splitting module; A JBIG encoder for generating a JBG file by receiving the bitmap image as an input and encoding the bitmap image; An FDWT unit which receives the foreground image and the background image as inputs, performs color difference conversion and downsampling, and performs wavelet transform by a lifting method to output wavelet coefficients; Contains a character and an image including a bit-plane encoder that receives the wavelet coefficient as an input, performs graycode transformation and quantization, and generates a bitstream by performing encoding by a bitplane method. It is intended to provide a compression system for compiled documents.

또한 본 발명은, 포그라운드 영상과 백그라운드 영상의 비트스트림을 입력으로 받아 웨이블릿 계수를 생성하고 역 그레이코드 변환을 수행하는 비트평면 복호기와; JBG 파일의 비트스트림을 입력으로 받아 비트맵 영상을 생성하는 JBIG 복호기와; 상기 웨이블릿 계수를 입력으로 받아 역 웨이블릿 변환, 업샘플링, 색차 변환을 수행하여 문자에 해당하는 포그라운드 영상과, 이미지에 해당하는 백그라운드 영상을 생성하는 IDWT부와; 상기 비트맵 영상과, 포그라운드 영상과, 백그라운드 영상을 원래의 문서로 복원하는 문서 재구성부를 포함하는 문자와 이미지가 포함된 문서의 압축 시스템을 제공하고자 한다.In addition, the present invention includes a bit plane decoder for receiving a bit stream of the foreground image and the background image as an input to generate wavelet coefficients and perform inverse gray code conversion; A JBIG decoder which receives a bitstream of a JBG file as an input and generates a bitmap image; An IDWT unit which receives the wavelet coefficient as an input and performs inverse wavelet transform, upsampling, and color difference conversion to generate a foreground image corresponding to a character and a background image corresponding to the image; An object of the present invention is to provide a compression system for a document including text and images including a bitmap image, a foreground image, and a document reconstruction unit for restoring a background image to an original document.

또한 본 발명은, 문자와 이미지가 포함된 문서의 전체 영상을, 비트맵 영상과, 문자의 포그라운드 영상과, 이미지의 백그라운드 영상으로 분리하는 제1과정과; 상기 비트맵 영상을 부호화하여 JBG 파일로 생성하는 제2과정과; 상기 포그라운드 영상에 대해 리프팅 방식으로 웨이블릿 변환을 수행하여 웨이블릿 계수를 출력하고, 상기 웨이블릿 계수를 부호화하여 비트스트림을 생성하는 제3과정과; 상기 백그라운드 영상에 대해 리프팅 방식으로 웨이블릿 변환을 수행하여 웨이블릿 계수를 출력하고, 상기 웨이블릿 계수를 부호화하여 비트스트림을 생성하는 제4과정을; 포함하는 문자와 이미지가 포함된 문서의 압축 방법을 제공하고자 한다.In addition, the present invention, the first step of separating the entire image of the document containing the character and the image into a bitmap image, the foreground image of the character, and the background image of the image; Generating a JBG file by encoding the bitmap image; Performing a wavelet transform on the foreground image by a lifting method to output wavelet coefficients, and encoding the wavelet coefficients to generate a bitstream; Performing a wavelet transform on the background image by a lifting method to output wavelet coefficients, and encoding the wavelet coefficients to generate a bitstream; It is intended to provide a method of compressing a document that includes text and images to include.

또한 본 발명은, JBG 파일을 복호화하여 비트맵 영상을 생성하는 제1과정과; 포그라운드 영상의 비트스트림을 복호화하여 웨이블릿 계수를 생성하고, 상기 웨이블릿 계수에 대해 역 웨이블릿 변환을 수행하여 포그라운드 영상을 생성하는 제2과정과; 백그라운드 영상의 비트스트림을 복호화하여 웨이블릿 계수를 생성하고, 상기 웨이블릿 계수에 대해 역 웨이블릿 변환을 수행하여 백그라운드 영상을 생성하는 제3과정과; 상기 비트맵 영상과, 포그라운드 영상과 백그라운드 영상을 원래의문서로 재구성하여 복원하는 제4과정을; 포함하는 문자와 이미지가 포함된 문서의 복원 방법을 제공하고자 한다.The present invention also provides a first process for decoding a JBG file to generate a bitmap image; Decoding a bitstream of the foreground image to generate wavelet coefficients, and performing inverse wavelet transform on the wavelet coefficients to generate a foreground image; Generating a wavelet coefficient by decoding the bitstream of the background image and generating a background image by performing inverse wavelet transform on the wavelet coefficient; A fourth step of reconstructing and reconstructing the bitmap image, the foreground image, and the background image into an original document; An object of the present invention is to provide a method of restoring a document including text and images.

도 1은 본 발명에 따른 문서의 압축 시스템의 블록도이다.1 is a block diagram of a system for compressing a document according to the present invention.

도 2는 본 발명에 따른 문서의 복원 시스템의 블록도이다.2 is a block diagram of a system for restoring a document according to the present invention.

도 3은 본 발명에 따른 문서의 압축시에 FDWT를 수행하는 TSFB의 구조이다.3 is a structure of a TSFB for performing FDWT upon compression of a document according to the present invention.

도 4는 본 발명에 따른 TSFB의 분석과정을 나타내는 도면이다.4 is a diagram illustrating an analysis process of TSFB according to the present invention.

도 5는 본 발명에 따른 변환에 대한 1차원의 가역적인 리프팅 변환과정을 나타내는 도면이다.5 is a diagram illustrating a one-dimensional reversible lifting transformation process for transformations according to the present invention.

도 6은 본 발명에 따른 1차원의 각 픽셀에 대해서 리프팅을 순차수만큼 수행하는 의사코드부이다.FIG. 6 is a pseudo code part for performing lifting for each pixel in one dimension according to the present invention.

도 7은 본 발명에 따른 색차신호 다운샘플링 과정을 나타내는 도면이다.7 is a diagram illustrating a color difference signal downsampling process according to the present invention.

도 8은 본 발명에 따른 웨이블릿 계수의 양자화 과정을 나타내는 도면이다.8 is a diagram illustrating a quantization process of wavelet coefficients according to the present invention.

도 9a와 도 9b는 본 발명에 따른 웨이블릿 계수값의 비트평면과 서브블록에 대한 처리과정을 나타내는 도면이다.9A and 9B illustrate a process of processing a bit plane and a subblock of a wavelet coefficient value according to the present invention.

도 10은 본 발명에 따른 TSFB의 합성과정을 나타내는 도면이다.10 is a diagram illustrating a synthesis process of TSFB according to the present invention.

도 11은 본 발명에 따른 영상 복원과정을 나타내는 도면이다.11 is a diagram illustrating an image restoration process according to the present invention.

도 12a에서 도 12c는 원래의 실험영상이다.12A to 12C are original experimental images.

도 13a 및 도 13b는 본 발명에 따른 백그라운드 영상과 포그라운드 영상의 압축률이다.13A and 13B are compression ratios of a background image and a foreground image according to the present invention.

도 14a 및 도 14b는 본 발명에 따른 백그라운드 영상과 포그라운드 영상의 PSNR 수치이다.14A and 14B are PSNR values of a background image and a foreground image according to the present invention.

도 15a 내지 도 15c는 원래의 실험영상을 압축하고 복원한 후의 복원영상이다.15A to 15C are reconstructed images after compressing and reconstructing the original experimental image.

<도면의 주요부분에 대한 부호의 설명><Description of Symbols for Main Parts of Drawings>

100 : 문서분할 모듈 110 : JBIG 부호기100: document splitting module 110: JBIG encoder

120,132 : FDWT부 122,134 : 비트평면 부호기120,132: FDWT section 122,134: bit plane encoder

124,135 : 반복길이 부호기 126,136 : 산술 부호기124,135: repeat length encoder 126,136: arithmetic encoder

210 : JBIG 복호기 220,230 : 산술 복호기210: JBIG decoder 220,230: Arithmetic decoder

222,232 : 반복길이 복호기 224,234 : 비트평면 복호기222,232: Repeat length decoder 224,234: Bit plane decoder

226,236 : IDWT부 240 : 문서 재구성부226,236: IDWT unit 240: document reconstruction unit

이하 본 발명을 첨부된 도면을 참고로 하여 설명하면 다음과 같다.Hereinafter, the present invention will be described with reference to the accompanying drawings.

도 1은 본 발명에 따른 문서의 압축 시스템의 블록도이다.1 is a block diagram of a system for compressing a document according to the present invention.

먼저 본 발명에 따른 부호 시스템의 기본적인 구성을 살펴보면, 문자와 이미지가 포함된 문서를, 문자에 해당하는 포그라운드 영상과, 배경 및 그림의 이미지에 해당하는 백그라운드 영상과, 비트맵 영상으로 분리하여 생성하는 문서분할 모듈(100)과;First, referring to the basic configuration of the sign system according to the present invention, a document containing a character and an image is generated by separating the foreground image corresponding to the character, the background image corresponding to the background and the image of the image, and the bitmap image. A document splitting module 100;

상기 비트맵 영상을 입력으로 받아 부호화를 하여 JBG 파일을 생성하는 JBIG 부호기와(110);A JBIG encoder 110 which receives the bitmap image as an input and encodes the bitmap image to generate a JBG file;

상기 포그라운드 영상과 백그라운드 영상을 입력으로 받아 색차 변환, 다운샘플링, 리프팅 방식으로 웨이블릿 변환을 수행하여 웨이블릿 계수를 출력하는 FDWT부(120,132)와;An FDWT unit (120, 132) for receiving the foreground image and the background image as inputs and performing wavelet transformation by color difference conversion, downsampling, and lifting method to output wavelet coefficients;

상기 웨이블릿 계수를 입력으로 받아 그레이코드(graycode) 변환과 양자화를 수행하고, 비트평면 방식에 의하여 부호화를 수행화하여 비트스트림을 생성하는 비트평면(Bit-plane) 부호기(122,134)로 이루어진다.Bit-plane encoders 122 and 134 which receive the wavelet coefficients as inputs, perform graycode transformation and quantization, and generate a bitstream by performing encoding by a bit-plane method.

문자와 이미지가 포함된 문서의 압축에 있어서, 문서의 전체 영상을 문자에 해당하는 포그라운드(foreground) 영역과 배경 및 그림의 이미지에 해당하는 백그라운드(background) 영역으로 분리하여 이들 영역에 대하여 각각 다른 압축 방법을사용하는 것이 필요하고, 이때 문서를 포그라운드 영역과 백그라운드 영역 및 비트맵 영역으로 분리하는 작업의 수행은 문서분할 모듈(100)에 의해서 이루어진다.In the compression of a document containing text and images, the entire image of the document is divided into a foreground area corresponding to a character and a background area corresponding to an image of a background and a picture, respectively. It is necessary to use a compression method, and the document splitting module 100 performs the task of separating the document into the foreground area, the background area, and the bitmap area.

다음은 본 발명에 따른 시스템의 압축 과정이다.The following is a compression process of the system according to the present invention.

(1) 입력 영상을 포그라운드 영역과 백그라운드 영역 그리고 비트맵으로 분할한다.(1) The input image is divided into a foreground area, a background area, and a bitmap.

(2) 분할된 포그라운드 영역과 백그라운드 영역에 대하여 색차 변환을 수행한다.(2) Color difference conversion is performed on the divided foreground area and the background area.

(3) 색차 변환된 Y,U,V 신호에서 색차 값에 해당되는 U,V 값을 다운샘플링한다.(3) Downsample the U and V values corresponding to the chrominance values in the chrominance-converted Y, U and V signals.

이때 휘도값 Y와 색차값 U,V의 다운샘플링 비율은 4:1:1 이다.At this time, the downsampling ratio of the luminance value Y and the color difference values U and V is 4: 1: 1.

(4) 각 Y,U,V 콤포넌트에 대하여 웨이블릿 변환을 수행한다.(4) Wavelet transform is performed on each of the Y, U, and V components.

(5) 생성된 웨이블릿 계수에 대하여 그레이코드 변환을 수행한다.(5) Gray code conversion is performed on the generated wavelet coefficients.

(6) 그레이 코드로 변환된 웨이블릿 계수에 대하여, 각 서브밴드별로 양자화를 수행한다.(6) Quantization is performed for each subband with respect to the wavelet coefficients converted into gray codes.

이때 LL, LH, HL, HH 서브밴드에 대하여 각기 다른 양자화를 적용한다.In this case, different quantizations are applied to the LL, LH, HL, and HH subbands.

(7) 다음에 양자화된 웨이블릿 계수에 대하여 비트평면을 구성하고, 각 비트평면 내에 서브블록을 구성한다.(7) Next, a bit plane is formed for the quantized wavelet coefficients, and a subblock is formed in each bit plane.

(8) 비트평면 내의 각 서브블록에 대하여 서브블록 부호화를 수행한다.(8) Subblock encoding is performed on each subblock in the bit plane.

(9) 생성된 비트스트림에 대하여 반복길이 부호화와 적응 산술 부호화를 수행한다.(9) Iterative length coding and adaptive arithmetic coding are performed on the generated bitstream.

문자와 이미지가 포함된 문서의 전체적인 영상은 .bmp 파일, .jpg 파일, .tiff 파일로 문서분할 모듈(100)에 입력된다.The entire image of the document including the text and the image is input to the document splitting module 100 as a .bmp file, a .jpg file, or a .tiff file.

도 12a, 도 12b, 도 12c는 원래 문서의 영상이다.12A, 12B, and 12C are images of the original document.

상기 문서분할 모듈(100)은 K-평균(K-means) 알고리즘을 기반으로 컬러 클러스터링을 한다.The document splitting module 100 performs color clustering based on the K-means algorithm.

상기 K-평균 알고리즘을 이용한 컬러 클러스터링은 RGB 좌표상에 어떠한 영상의 컬러 분포를 놓고 보았을 때 영상의 모든 픽셀(Pixel)값과 각 클러스터에 속해 있는 픽셀들의 평균값과의 거리를 비교하여 클러스터링하는 알고리즘으로서, 처음에 나눌 클러스터의 개수만큼 각 클러스터의 평균값을 초기화한다.Color clustering using the K-average algorithm is an algorithm for clustering by comparing the distance between all pixel values of an image and an average value of pixels belonging to each cluster when the color distribution of an image is placed on RGB coordinates. Initialize each cluster by the number of clusters to divide first.

본 발명에서는 전체 영상을 포그라운드 컬러와 백그라운드 컬러로 클러스터링하며, K-평균 알고리즘을 이용한 컬러 클러스터링은 다음과 같은 순서로 작동한다.In the present invention, the entire image is clustered in the foreground color and the background color, and color clustering using the K-average algorithm operates in the following order.

1. 첫째 포그라운드 컬러는 검은색으로 백그라운드 컬러는 흰색으로 초기화한다.1. Reset the foreground color to black and the background color to white.

2. 영상의 모든 픽셀값과 포그라운드 컬러와 백그라운드 컬러와의 거리를 각각 비교하여 더 가까운 쪽에 포함시킨다.2. Compare all pixel values in the image with the distance between the foreground and background colors, and include them on the closer side.

3. 포그라운드에 포함되는 픽셀과 백그라운드에 포함되는 픽셀에 대한 각각의 평균을 구하여 포그라운드 컬러와 백그라운드 컬러로 갱신하여 준다.3. The average of each pixel included in the foreground and the pixel included in the background is calculated and updated to the foreground color and the background color.

4. 각각의 컬러가 모두 모아질 때까지 2와 3을 반복한다.4. Repeat steps 2 and 3 until all colors are collected.

그런데 일반적인 문서의 이미지는 두 가지 컬러로 제한되어 있는 경우가 드물고, 문서의 디자인과 명암의 상태는 영상 전체에 걸쳐서 백그라운드 컬러와 포그라운드 컬러의 변화를 유발시키므로 컬러 변화 문제에 대응할 필요가 생긴다.However, the image of a general document is rarely limited to two colors, and the design and contrast of the document cause a change in the background color and the foreground color throughout the image.

이 알고리즘이 상기 K-평균 컬러 클러스터링 알고리즘을 확장한 블록 바이컬러 클러스터링(block bicolor clustering) 알고리즘이다.This algorithm is a block bicolor clustering algorithm that extends the K-means color clustering algorithm.

상기 블록 바이컬러 클러스터링 알고리즘은 전체 영상을 여러 개의 정사각형 블록으로 나누어 K-평균 컬러 클러스터링 알고리즘을 적용시킨 것으로서 영상 전체에 걸친 컬러 변화 문제에 대응할 수 있다.The block bicolor clustering algorithm applies a K-average color clustering algorithm by dividing an entire image into a plurality of square blocks, and can cope with a color change problem of the entire image.

정사각형 블록의 크기는 한 문장 안에서 문자의 색깔 변화를 감지할 수 있을 만큼 충분히 작아야 한다.The size of the square block should be small enough to detect the change in color of a character in a sentence.

이 경우에 작은 블록의 블록 전체가 포그라운드 영역 혹은 백그라운드 영역에 위치하는 문제가 발생할 수 있고, 이때에는 가장 밝은 픽셀의 컬러값을 백그라운드 컬러로 설정한다.In this case, the entire block of the small block may be located in the foreground area or the background area. In this case, the color value of the brightest pixel is set as the background color.

이 방법은 문자 혹은 이미지중 어느 한쪽이 포함되어 있지 않은 그리고 매우 연속적인 픽셀을 포함한 블록에서, 연속적인 픽셀값의 특성상 포그라운드로 할 수 없는 픽셀을 포그라운드로 선택하여 블록의 픽셀을 포그라운드와 백그라운드로 구분해야만 하며, 이에 대응하기 위하여 블록 바이컬러 클러스터링 알고리즘을 확장한 알고리즘이 멀티스케일 바이컬러 클러스터링(multiscale bicolor clustering) 알고리즘이다.This method selects pixels in the foreground that are not in the foreground because of the nature of the continuous pixel values in blocks that do not contain either characters or images and that are very continuous. In order to cope with this, the algorithm that extends the block bicolor clustering algorithm is a multiscale bicolor clustering algorithm.

상기 멀티스케일 바이컬러 클러스터링 알고리즘은 하나의 블록 크기 대신 블록 크기가 작아지는 연속적인 그리드(grid)를 고려한 것으로써 다음과 같이 수행된다.The multiscale bicolor clustering algorithm is performed by considering a continuous grid in which the block size becomes smaller instead of one block size.

1. 전체 영상을 일정한 블록 크기의 그리드로 나누어 블록 바이컬러 클러스터링 알고리즘을 적용한다.1. The block bicolor clustering algorithm is applied by dividing the whole image into a grid of a certain block size.

2. 전체 영상을 이전 그리드의 블록 크기보다 작은 블록 크기의 그리드로 나눈다.2. Divide the entire image into a grid of block size smaller than the block size of the previous grid.

3. 각 블록들의 포그라운드 컬러와 백그라운드 컬러를 현재 블록들이 속해 있는 이전 그리드 블록의 포그라운드 컬러와 백그라운드 컬러로 초기화 한다.3. Initialize the foreground and background colors of each block to the foreground and background colors of the previous grid block to which the current blocks belong.

4. 각 블록들에 대하여 블록 안의 모든 픽셀값과 포그라운드 컬러와 백그라운드 컬러와의 거리를 각각 비교하여 더 가까운 쪽에 포함시킨다.4. For each block, compare all pixel values in the block and the distances between the foreground and background colors, respectively, and include them on the closer side.

5. 포그라운드에 포함되는 픽셀들과 백그라운드에 포함되는 픽셀들 각각에 이전 그리드 블록의 포그라운드 컬러와 백그라운드 컬러값을 더하여 그 평균값을 포그라운드 컬러와 백그라운드 컬러로 갱신한다.5. The foreground and background color values of the previous grid block are added to each of the pixels included in the foreground and the pixels included in the background, and the average value is updated to the foreground color and the background color.

6. 각각의 컬러가 모두 모아질 때까지 4와 5를 반복하고, 일정 블록의 크기가 될 때까지 2부터 반복한다.6. Repeat 4 and 5 until each color is collected and repeat from 2 until it is the size of a block.

상기 멀티스케일 바이컬러 클러스터링 알고리즘은 블록을 초기화할 때, 이전 블록의 포그라운드 컬러와 백그라운드 컬러를 사용한다.The multiscale bicolor clustering algorithm uses the foreground color and the background color of the previous block when initializing the block.

이러한 컬러 초기화 과정은 이전 블록에서 선택된 포그라운드 컬러와 백그라운드 컬러에 가까운 컬러를 선택하도록 하는 경향을 만들어 내며, 상기 블록 바이컬러 클러스터링 알고리즘은 작은 블록 크기 문제를 해결하여 준다.This color initialization process creates a tendency to select a color close to the background color and the foreground color selected in the previous block, and the block bicolor clustering algorithm solves the small block size problem.

상기 멀티스케일 바이컬러 클러스터링 알고리즘은 처음 그리드 블록의 포그라운드 컬러를 검은색으로, 백그라운드 컬러를 흰색으로 초기화하여 클러스터링함으로써, 결과적으로는 검은색에 가까운 컬러값을 가진 픽셀은 포그라운드 컬러로, 흰색에 가까운 컬러값을 가진 픽셀은 백그라운드 컬러로 추출된다.The multiscale bicolor clustering algorithm clusters the grid color by initializing the foreground color of the grid block to black and initializing the background color to white. As a result, pixels having a color value close to black become a foreground color and white. Pixels with near color values are extracted as the background color.

예를 들어 검은색 바탕에 흰색 문자가 있는 경우는 반전해야 할 필요성이 있다.For example, if you have white text on a black background, you need to reverse it.

이 경우에는 포그라운드/백그라운드 반전(foreground/background inverting) 알고리즘을 통하여 반전을 수행한다.In this case, the inversion is performed through the foreground / background inverting algorithm.

상기 포그라운드/백그라운드 반전 알고리즘은 추출된 포그라운드 영역에서 하나의 포그라운드 또는 백그라운드 픽셀들의 모임인 객체를 추출하여 하나의 객체가 전체 영상에서 차지하는 면적과, 각 객체들 간의 위치관계를 이용하여 백그라운드로 반전할 것인지를 결정하고 반전을 수행한다.The foreground / background inversion algorithm extracts an object, which is a collection of one foreground or background pixels, from the extracted foreground area, and uses the area occupied in the entire image and the background relation between the objects. Determine if you want to invert and perform the inversion.

상기한 K-평균 컬러 클러스터링 알고리즘을 기반으로 멀티스케일 바이컬러 클러스터링 알고리즘과, 포그라운드/백그라운드 반전 알고리즘으로 구성된 문서분할 모듈(100)에 의해 .bmp, .jpg, .tiff 파일 영상을 입력으로 받아 전체 영상을 분할하여 문자에 해당하는 포그라운드 영상과, 이미지에 해당하는 백그라운드 영상을 생성하고 또한 비트맵 영상을 생성한다.Based on the K-average color clustering algorithm, the document segmentation module 100 consisting of a multiscale bicolor clustering algorithm and a foreground / background inversion algorithm receives .bmp, .jpg, and .tiff file images as input. The image is divided to generate a foreground image corresponding to a character, a background image corresponding to the image, and a bitmap image.

일반적으로 많이 사용되는 컬러 모델에는 RGB, CMY, YUV, YIQ 컬러 모델들이 있다.Commonly used color models include RGB, CMY, YUV, and YIQ color models.

예를 들어 하드웨어나 범용적인 컬러 비디오 카메라에서는 RGB 모델이 채택되고, 컬러 프린터에서는 CMY(Cyan,Magenta,Blue) 모델이 채택되며, 컬러 프린터에서는 YIQ 모델을 사용한다.For example, the RGB model is adopted for hardware or general purpose color video cameras, the CMY (Cyan, Magenta, Blue) model for color printers, and the YIQ model for color printers.

YUV 컬러 모델과 같은 휘도신호와 색차신호는 RGB 컬러모델에 비해서 압축을 용이하게 할 수 있다.Luminance signals and chrominance signals, such as the YUV color model, can be easily compressed as compared to the RGB color model.

인간의 시각은 색차신호보다 휘도신호에 더 민감하기 때문에 색차신호값과 휘도신호값을 같은 비중으로 압축을 수행할 필요는 없다.Since the human eye is more sensitive to the luminance signal than the color difference signal, it is not necessary to compress the color difference signal value and the luminance signal value with the same specific gravity.

상기한 이유로 본 발명에서는 백그라운드 영상과 포그라운드 영상에 대해서 각각 RGB 컬러모델을 YUV 컬러모델로 변환하는 색차변환을 수행한다.For this reason, the present invention performs color difference conversion for converting an RGB color model into a YUV color model for the background image and the foreground image, respectively.

아래의 수학식 1은 RGB 신호를 YUV로 변환하는 식이다.Equation 1 below converts an RGB signal to YUV.

수학식 1에 의해 RGB 컬러를 YUV 컬러로 변환한 후, Y,U,V 컴포넌트에 대하여 Y:U:V는 4:1:1로 다운샘플링(downsampling)을 수행한다.After converting the RGB color to the YUV color by Equation 1, Y: U: V performs downsampling at 4: 1: 1 on the Y, U, and V components.

여기서 다운샘플링은 영상 샘플의 갯수를 줄인다는 의미로, 샘플의 갯수를 감소시켜 전체 영상의 크기를 줄임으로써 영상을 부호화하는 데 소요되는 시간을 단축하기 위해서이다.Here, downsampling means to reduce the number of image samples, and to reduce the time required to encode an image by reducing the number of samples to reduce the size of the entire image.

이와 같은 방법으로 상기 문서분할 모듈(100)을 거쳐서 생성된 포그라운드 영상 및 백그라운드 영상은 색차 변환, 다운샘플링, FDWT부(120,132)를 거쳐서 웨이블릿 변환을 수행한다.In this way, the foreground image and the background image generated through the document dividing module 100 perform color difference conversion, downsampling, and wavelet transform through the FDWT units 120 and 132.

상기 FDWT부((Forward Discrete Wavelet Transform),120,132)에서는 리프팅방식(Lifting scheme)의 웨이블릿 변환을 수행한다.The FDWT unit (Forward Discrete Wavelet Transform) (120,132) performs a wavelet transform of the lifting scheme (Lifting scheme).

웨이블릿 변환을 구현하는 데 사용되는 리프팅 방식(lifting scheme)은 최근에 제안된 방식이다.The lifting scheme used to implement the wavelet transform is a recently proposed scheme.

웨이블릿 리프팅 방식은 순방향 웨이블릿 변환(forward wavelet transform)으로부터 간단하게 역방향(inverse) 웨이블릿 변환을 얻을 수 있는 가역적(reversible)인 방법이고, 웨이블릿 계수가 정수가 될 수 있는 정수 변환이며, 그리고 웨이블릿 변환을 수행하는 과정에서 별도의 기억장소를 사용하지 않는다는 장점이 있다.The wavelet lifting method is a reversible method that can simply obtain an inverse wavelet transform from a forward wavelet transform, is an integer transform in which wavelet coefficients can be integers, and performs wavelet transforms. The advantage of not using a separate memory in the process.

본 발명에서는 다음 12가지 웨이블릿 변환의 수식을 제공한다.In the present invention, the following twelve wavelet transform equations are provided.

여기서 x[n]은 입력신호, s[n]은 로우패스 서브밴드(lowpass subband) 신호, d[n]은 하이패스 서브밴드(highpass subband) 신호를 나타나고, s0[n]은 x[2n], d0[n]은 x[2n+1]을 나타낸다.Where x [n] is the input signal, s [n] is the lowpass subband signal, d [n] is the highpass subband signal, and s 0 [n] is x [2n ], d 0 [n] represents x [2n + 1].

(5/3) 변환(5/3) Convert

순방향 변환Forward conversion

역방향 변환Reverse conversion

(2/6) 변환(2/6) Convert

순방향 변환Forward conversion

역방향 변환Reverse conversion

(SP+B) 변환(SP + B) Convert

순방향 변환Forward conversion

역방향 변환Reverse conversion

(9/7-M) 변환(9 / 7-M) Convert

순방향 변환Forward conversion

역방향 변환Reverse conversion

(2/10) 변환(2/10) Convert

순방향 변환Forward conversion

역방향 변환Reverse conversion

(5/11-C) 변환(5 / 11-C) Convert

순방향 변환Forward conversion

역방향 변환Reverse conversion

(5/11-A) 변환(5 / 11-A) Convert

순방향 변환Forward conversion

역방향 변환Reverse conversion

(6/14) 변환(6/14) Convert

순방향 변환Forward conversion

역방향 변환Reverse conversion

SPC+C 변환SPC + C Conversion

순방향 변환Forward conversion

역방향 변환Reverse conversion

(13/7-T) 변환(13 / 7-T) Convert

순방향 변환Forward conversion

역방향 변환Reverse conversion

(13/7-C) 변환(13 / 7-C) Convert

순방향 변환Forward conversion

역방향 변환Reverse conversion

(9/7-F) 변환(9 / 7-F) Convert

순방향 변환Forward conversion

역방향 변환Reverse conversion

이러한 웨이블릿 변환을 수행하기 위한 핵심 자료구조로는 Enc_t로서, 이 자료구조는 웨이블릿 변환을 위한 트리 구조(Tree Structure)와 이미지의 각 컴포넌트에 대한 실제 데이터 및 변환을 위한 모든 정보를 포함하고 있는 구조체이다.The core data structure for performing the wavelet transformation is Enc_t, which is a tree structure for wavelet transformation and a structure containing all data for transformation and actual data for each component of the image. .

상기 트리 구조를 보이고 있는 TSFB(Tree-Structured Filter Bank)는 입력 영상을 분해(decomposition) 레벨에 따라서 트리 구조를 생성한다.A tree-structured filter bank (TSFB) showing the tree structure generates a tree structure according to a decomposition level of an input image.

예를 들어 분해 레벨이 3인 경우 도 3의 트리 구조가 생성된다.For example, if the decomposition level is 3, the tree structure of FIG. 3 is generated.

트리 구조에서 각 노드들은 해당 레벨의 밴드(band)에 대한 정보를 포함하며 영상에 대한 버퍼 포인트와 크기 등에 관한 모든 정보를 포함하고 있다.In the tree structure, each node includes information on a band of a corresponding level and includes all information about a buffer point and a size of an image.

Enc_t 구조체가 설정된 후에, 이 구조체의 데이터를 바탕으로 웨이블릿 리프팅 알고리즘을 수행하는 TSFB 분석(analyze) 과정을 거치게 된다.After the Enc_t structure is set, a TSFB analysis process is performed to perform a wavelet lifting algorithm based on the data of the structure.

도 4에서 실제 영상 데이터에 대해서 스플릿(Split)을 수행한다.In FIG. 4, a split is performed on the actual image data.

짝수(even)에 해당하는 부분은 상위부분으로, 홀수(odd)부분은 하위부분으로 분할된 후, 상위 부분은 LIFT1을 통하여 로우패스(lowpass) 필터를 거치고, 하위 부분은 LIFT0을 통하여 하이패스(highpass) 필터를 거친다.Even part is divided into upper part, odd part is divided into lower part, upper part goes through lowpass filter through LIFT1, and lower part goes through highpass (LIFT0). highpass) filter.

이와 같은 과정을 순차수(number_of_sequence)만큼 반복하여 수행함으로써 1차원(수직)에 대해서 웨이블릿 리프팅이 수행된다.By repeating this process by the number (number_of_sequence), wavelet lifting is performed for one dimension (vertical).

수직축에 대한 1차원 리프팅 수행 후에 수평축에 대하여 리프팅을 수행하면, 전체 이미지 즉 2차원 영상에 대하여 리프팅이 수행된 결과를 얻어낼 수 있다.If lifting is performed on the horizontal axis after the one-dimensional lifting on the vertical axis, the result of the lifting on the entire image, that is, the two-dimensional image, can be obtained.

도 5는 상기 수학식 2의 (5/3) 변환에 대한 1차원의 가역적인(reversible) 리프팅 변환 과정을 나타내고 그 변환 수식은 수학식 14와 같다.FIG. 5 illustrates a one-dimensional reversible lifting transformation process for the (5/3) transformation of Equation 2, and the transformation equation is represented by Equation 14.

도 6은 1차원의 각 픽셀에 대해서 웨이블릿 리프팅을 순차수만큼 수행하는 의사(擬似)코드(pseudo-code)부이다.FIG. 6 is a pseudo-code section for performing wavelet lifting for each pixel of one-dimensional order.

이를 수직, 수평에 대하여 각각 수행함으로써 4개의 분할된 밴드 즉, LL, HL, LH, HH를 얻을 수 있다.By doing this for the vertical and horizontal, respectively, four divided bands, LL, HL, LH, and HH, can be obtained.

이상과 같이 포그라운드 영상과 백그라운드 영상은 각각 색차 변환, 다운샘플링, FDWT부(120,132)를 거쳐 웨이블릿 계수로 변환된다.As described above, the foreground image and the background image are converted into wavelet coefficients through color difference conversion, downsampling, and FDWT units 120 and 132, respectively.

출력된 웨이블릿 계수는 다시 그레이코드로 변환되고 양자화 과정을 거친다.The output wavelet coefficients are converted into gray codes again and subjected to quantization.

양자화 과정을 거친 후에 포그라운드 영상과 백그라운드 영상의 웨이블릿 계수들은 비트평면 부호기(134,122)를 거쳐 부호화되어 비트스트림으로 생성된다.After the quantization process, the wavelet coefficients of the foreground image and the background image are encoded through the bit plane encoders 134 and 122 to be generated as bitstreams.

상기 비트평면 부호기(122,134)는 영상을 비트들로 구성된 여러개의 비트평면(Bit-plane)으로 나누는 데서 시작한다.The bit plane encoders 122 and 134 start by dividing an image into a number of bit planes composed of bits.

가장 중요한 비트(most significant bit)를 중심으로 비트평면 0을 생성하고, 가장 덜 중요한 비트(least significant bit)를 마지막 비트평면으로 생성한다.Generate bit plane 0 around the most significant bit, and generate the least significant bit as the last bit plane.

하나의 비트평면은 다시 적절한 크기(2x2∼64x64)의 서브블록으로 나누어진다.One bit plane is divided into subblocks of appropriate sizes (2x2 to 64x64).

상기 비트평면 부호기(122,134)는 서브블록들로 나누어진 비트평면에 대하여 각 서브블록마다 반복길이 부호화와 산술 부호화 과정을 거쳐서 비트스트림을 생성한다.The bit plane encoders 122 and 134 generate bitstreams through repetition length encoding and arithmetic encoding for each subblock for the bit plane divided into subblocks.

이를 자세히 설명하면, 일반적으로 비트평면 부호화는 컬러 영상으로부터 비트평면을 구성하여 이진 영상(binary image)을 만들고 각 이진 영상에 대해서 압축을 수행하는 것이다.In detail, in general, bit plane encoding is to construct a binary image by constructing a bit plane from a color image and perform compression on each binary image.

본 발명에서는 웨이블릿 변환을 수행한 웨이블릿 계수값에 대해서 비트평면을 구성하여 이진 데이터를 생성한 다음에 서브블록 부호화를 수행한다.In the present invention, the binary data is generated by constructing a bit plane with respect to the wavelet coefficient value on which the wavelet transform is performed, and then performing subblock encoding.

그러나, 이러한 비트평면 부호화의 단점은 계수값의 조그마한 변화가 전체 비트평면을 복잡하게 만들 수 있다는 것으다.However, a disadvantage of such bitplane coding is that small changes in coefficient values can complicate the entire bitplane.

예를 들어, 한 계수값이 127(01111111)이고 인접한 계수값이 128(100000000)이라면 계수값은 단지 1이지만 전체 비트평면에서 인접한 모든 비트값이 다르게 나타난다.For example, if one count value is 127 (01111111) and the adjacent count value is 128 (100000000), the count value is only 1, but all adjacent bit values appear differently in the entire bit plane.

이러한 경우는 비트의 중복성을 통한 압축에 효과적이지 못하므로 서브블록부호화를 수행하기 전에 각 필셀의 값을 그레이코드(graycode)로 변환해야 한다.This case is not effective for compression through redundancy of bits. Therefore, the value of each cell must be converted to graycode before performing subblock encoding.

아래의 수학식 15는 m-비트의 비트평면에 대해서 m개의 그레이코드 gm-1…g2g1g0으로 변환하는 경우에 변환식이다.Equation 15 below shows m gray codes g m-1 ... For m- bit bit planes. g 2 g 1 g 0 For conversion to 0 .

여기서,는 XOR 연산을 나타내고,는 웨이블릿 계수에 대한 비트값들이다.here, Represents an XOR operation, Wow Are bit values for the wavelet coefficient.

다시 설명하면 웨이블릿 계수 비트값들을 그레이코드로 변환된 후, 최상위 비트는 그대로 그레이코드가 되고(), 그 다름 그레이코드 값은 다음 하위 두개의 비트값들을 XOR한 것으로 대체되는 것이다().In other words, after converting wavelet coefficient bit values to gray code, the most significant bit is gray code as it is ( The other gray code value is replaced by the XOR of the next two lower bit values ( ).

상기 수학식 15에 의해 127(01111111)은 그레이코드로 변환후 01000000값으로 바뀌고, 이웃하는 값이 128(10000000)일 경우 그레이코드로 변환후 11000000값으로 변환된다.In Equation 15, 127 (01111111) is converted to a gray code value after conversion to gray code, and when a neighboring value is 128 (10000000), it is converted to gray code value after conversion to 11 million value.

즉, 비트평면에서 이웃하는 비트 사이의 값의 변화는 현저히 줄어든다.That is, the change in the value between neighboring bits in the bit plane is significantly reduced.

이는 비트간의 중복성을 증가시켜 압축을 더욱 효과적으로 할 수 있게 한다.This increases the redundancy between bits, making compression more efficient.

그레이코드로 변환된 웨이블릿 계수는 최소 2바이트의 저장공간을 요구하며, 계수값을 줄여서 비트평면 부호화의 효율을 높이고 압축율을 최대화하기 위하여 양자화(quantization)를 수행한다.The wavelet coefficients converted to gray codes require at least 2 bytes of storage space, and quantization is performed to reduce the coefficients to increase the efficiency of bitplane coding and maximize compression.

본 발명에서는 웨이블릿 계수값을 쉬프트(shift)하는 방식으로 양자화을 구현한다.In the present invention, quantization is implemented by shifting wavelet coefficient values.

웨이블릿 변환을 통한 서브밴드들중에서 이미지의 평균값을 담고 있는 LL밴드의 쉬프트는 LH, HL, HH밴드보다 상대적으로 적게 하여 복원된 영상의 왜곡현상을 최소화하고, 또한 상대적으로 LH, HL, HH밴드의 쉬프트를 크게 함으로서 압축률을 높일 수 있다.The shift of the LL band, which contains the average value of the image among the subbands by wavelet transform, is relatively smaller than the LH, HL, and HH bands to minimize the distortion of the reconstructed image, and also the relative LH, HL, and HH bands. By increasing the shift, the compression ratio can be increased.

또한 색차변환을 통한 Y, U, V신호값에서 색차값을 담고 있는 U, V신호의 쉬프트를 Y신호에 비해 상대적으로 크게 하여 압축률을 높일 수 있다.In addition, in the Y, U, and V signal values through color difference conversion, the U and V signals containing color difference values may be relatively larger than the Y signal, thereby increasing the compression ratio.

도 8은 웨이블릿 계수의 양자화 과정을 나타낸다.8 shows a quantization process of wavelet coefficients.

이미지의 평균값을 나타내는 LL밴드의 계수값을 n비트만큼 쉬프트하고, LH, HL밴드에 추가적으로 1비트(n+1)를, HH 밴드에 대해서는 추가적으로 2비트(n+2)를 더 쉬프트한다.The coefficient value of the LL band representing the average value of the image is shifted by n bits, and an additional 1 bit (n + 1) is further shifted to the LH and HL bands, and an additional 2 bits (n + 2) to the HH band.

쉬프트 연산을 수행한 후 다시 역방향으로 쉬프트 연산을 수행하면, 결과적으로 LL밴드는 n비트만큼의 0값이 설정된다.If the shift operation is performed again in the reverse direction after the shift operation is performed, as a result, the LL band has a zero value set by n bits.

상술한 양자화를 거친 후에 웨이블릿 계수를 비트평면 기반하에서 서브블록으로 분할하고, 각 서브블륵에 대해서 비트평면 부호화를 수행한다.After the above quantization, the wavelet coefficients are divided into subblocks on the basis of bit planes, and bit plane coding is performed on each subblock.

이러한 쉬프트 양자화 과정을 거치면 계수값의 비트에서 0값이 증가하게 되고, 이러한 0값의 증가는 서브블록 부호화에서 "중요하지 않은(insignificant)" 서브블록의 증가를 가져오게 된다.Through this shift quantization process, a zero value is increased in a bit of a coefficient value, and this increase of the zero value results in an increase of an "insignificant" subblock in subblock encoding.

도 9a는 웨이블릿 계수값의 비트평면을 나타내고 도 9b는 각 비트평면에 대해 서브블록의 처리과정을 나타낸다.FIG. 9A shows the bit plane of the wavelet coefficient value and FIG. 9B shows the processing of the subblock for each bit plane.

비트평면 부호기(122,134)는 비트평면이 포함하고 있는 각 서브블록에 대해서 "중요성(significance)" 여부를 조사한다.The bitplane encoders 122 and 134 check whether "significance" is present for each subblock included in the bitplane.

중요성 여부는 서브블록에서 1의 존재 여부에 따라 결정된다.Importance is determined by the presence of 1 in the subblock.

1값이 단 한개라도 존재하면 그 서브블록은 "중요한(significant)" 서브블록으로 간주된다.If only one value exists, that subblock is considered a "significant" subblock.

상기 서브블록 내의 값이 모두 0이라면 그 서브블록은 "중요하지 않은(insignificant)" 서브블록으로 간주되어 부호화에서 제외되고, 단지 전체 비트평면에서 그 서브블록 위치에 대한 정보만이 서브블록 맵에 기록된다.If the value in the subblock is all zero, the subblock is considered to be an "insignificant" subblock and excluded from encoding, and only information about the subblock position in the entire bitplane is written to the subblock map. do.

중요한 서브블록은 서브블록 전체가 부호화되며 서브블록 맵에는 중요한 서브블록을 나타내는 값으로 1값을 저장한다.An important subblock is encoded with the entire subblock and a value of 1 representing a significant subblock is stored in the subblock map.

비트평면에 기반한 서브블록 부호화는 전체 비트평면에 대해서 각각 수행되고, 중요 서브블록에 대해서는 비트스트림을 출력한다.The subblock encoding based on the bit plane is performed for the entire bit plane, respectively, and outputs the bitstream for the important subblocks.

이때 서브블록 내의 비트는 좌측상단에서 우측하단으로 스캔하면서 부호화를 한다.At this time, the bits in the subblock are encoded while scanning from the upper left to the lower right.

중요하지 않은 서브블록은 어떠한 비트스트림도 출력하지 않으며, 단지 서브블록 맵에 그 서브블록의 위치정보를 기록한다.An unimportant subblock does not output any bitstream, only writes the location information of the subblock in the subblock map.

한편, 비트맵 영상을 부호화하여 .jbg 파일을 생성하는 JBIG 부호기(110)는 이진 영상을 고능률로 부호화할 수 있다.Meanwhile, the JBIG encoder 110 encoding the bitmap image to generate a .jbg file may encode the binary image with high efficiency.

여기서 JBIG 부호기(110)는 JBIG-1 또는 JBIG-2를 의미한다.Here, the JBIG encoder 110 means JBIG-1 or JBIG-2.

JBIG(Joint Bi-level Image Experts Group)는 이진 영상(Bi-level Image) 그리고 그레이스케일(grayscale) 영상을 부호화한다.The Joint Bi-level Image Experts Group (JBIG) encodes a bi-level image and a grayscale image.

JBIG는 이진 영상의 손실/무손실 압출을 위해 ISO/IEC 11544(ITU-T T.82) 권고안으로 규정되어 있다.JBIG is defined in ISO / IEC 11544 (ITU-T T.82) Recommendation for Lossless / Lossless Extrusion of Binary Images.

JBIG는 주위의 화소로부터 부호화 화소를 예측하면서 부호화를 수행하기 때문에 이진 영상을 고능률로 부호화할 수 있다.Since JBIG performs encoding while predicting encoded pixels from surrounding pixels, binary images can be encoded with high efficiency.

상기 비트평면 부호화기(122,134)를 거쳐서 부호화된 포그라운드 영상과 백그라운드 영상은 반복길이 부호기(124,135)와 산술부호기(126,136)를 거친다.The foreground image and the background image encoded by the bit plane encoders 122 and 134 pass through the repetition length encoders 124 and 135 and the arithmetic encoders 126 and 136.

반복길이 부호화 방법은 픽셀 블록을 하나의 픽셀값과 그 반복횟수로 나타내는 방법으로 동일한 값을 갖는 픽셀들을 하나의 코드로 사용하여 나타냄으로서 영상 내에 존재하는 값의 중복성을 감소시키는 방법이다.The repetition length coding method is a method of reducing a redundancy of values existing in an image by representing pixels having the same value as one code by representing a pixel block as one pixel value and the number of repetitions thereof.

예를 들어, 첫번째 픽셀값이 234이고 동일한 값을 갖는 픽셀이 연속적으로 이웃하여 14픽셀이 나타난다면 234@14로 부호화를 한다.For example, if the first pixel value is 234 and pixels having the same value are adjacent to each other and 14 pixels appear, the encoding is 234 @ 14.

원래의 영상은 15픽셀의 값을 표현하기 위하여 15바이트가 필요한 것에 반하여 위와 같이 반복길이 부호화를 수행한 다음에는 2바이트로 표현이 가능하다.The original image requires 15 bytes to represent a value of 15 pixels, whereas after the repetition length encoding is performed as described above, it can be represented by 2 bytes.

산술부호기(126,136)의 적응 산술(adaptive arithmetic) 부호화 알고리즘을 사용한다.An adaptive arithmetic coding algorithm of arithmetic encoders 126 and 136 is used.

상술한 바와 같은 부호화 방법은, 문자와 이미지가 포함된 .bmp, .jpg, .tiff 파일의 문서는 문서분할 모듈(100)에 의해서 비트맵 영상과 문자의 포그라운드 영상과 이미지의 백그라운드 영상으로 분할된다(제1과정).In the encoding method as described above, documents of .bmp, .jpg, and .tiff files containing characters and images are divided into bitmap images, foreground images of characters, and background images of images by the document splitting module 100. (Step 1)

상기 비트맵 영상은 JBIG 부호기(110)를 거쳐 부호화되어 .jbg 파일로 생성된다(제2과정).The bitmap image is encoded through the JBIG encoder 110 and generated as a .jbg file (second step).

상기 포그라운드 영상은 리프팅 방식을 사용하여 웨이블릿 변환을 수행하는 FDWT부(120)를 거쳐 웨이블릿 계수로 출력되고, 상기 웨이블릿 계수를 입력으로 받는 비트평면 부호기(122)를 거쳐 부호화되어 비트스트림을 생성한다(제3과정).The foreground image is output as a wavelet coefficient through the FDWT unit 120 performing wavelet transformation using a lifting method, and is encoded through a bit plane encoder 122 that receives the wavelet coefficient as an input to generate a bitstream. (Step 3).

상기 백그라운드 영상은 리프팅 방식을 사용하여 웨이블릿 변환을 수행하는 FDWT부(122)를 거쳐 웨이블릿 계수로 출력되고, 상기 웨이블릿 계수를 입력으로 받는 비트평면 부호기(134)를 거쳐 부호화되어 비트스트림을 생성한다(제4과정).The background image is output as a wavelet coefficient through the FDWT unit 122 performing wavelet transform using a lifting method, and is encoded through a bit plane encoder 134 receiving the wavelet coefficient as an input to generate a bitstream ( Step 4).

제3과정과 제4과정을 거친 포그라운드 영상과 백그라운드 영상은 계속하여 반복길이 부호기(124,135)에 의해 영상내에 존재하는 값의 중복성이 감소되고, 적응 산술 부호기(126,136)에 의해 구간의 크기가 줄어들어 이 구간 내에 존재하는 값만 부호화되어 압축이 완료된다.The foreground image and the background image which have undergone the third and fourth processes are continuously reduced in redundancy of values existing in the image by the repetition length encoders 124 and 135, and the size of the interval is reduced by the adaptive arithmetic encoders 126 and 136. Only values that exist within this interval are encoded to complete the compression.

복호화 과정은 부호화의 반대 과정을 거치며, 이하는 복호화 과정을 나타낸다.The decoding process is the reverse process of encoding, and the following shows the decoding process.

(1) 포그라운드와 백그라운드에 대한 비트스트림에 대하여 적응 산술 복호화와 반복길이 복호화를 수행한다.(1) Adaptive arithmetic decoding and repetition length decoding are performed on the bitstream of the foreground and the background.

(2) 비트맵에 대한 비트스트림은 JBIG 복호기(210)에서 복호화되어 비트맵을 생성한다.(2) The bitstream for the bitmap is decoded by the JBIG decoder 210 to generate a bitmap.

(3) 포그라운드와 백그라운드 영역에 대한 비트스트림은 비트평면 복호화를 수행하여 비트평면을 구성한다.(3) The bitstreams of the foreground and background regions are formed by performing bitplane decoding.

(4) 생성된 웨이블릿 계수에 대하여 역 그레이코드 변환을 수행한다.(4) Inverse gray code conversion is performed on the generated wavelet coefficients.

(5) 생성된 Y,U,V 각 컴포넌트에 대하여 역 웨이블릿 변환을 수행한다.(5) Inverse wavelet transform is performed on each of the generated Y, U, and V components.

(6) 생성된 Y,U,V 컴포넌트에서 U,V 컴포넌트 값을 업샘플링한다.(6) Upsample the U, V component values in the generated Y, U, V components.

이때 휘도값 Y와 색차값 U,V의 업샘플링 비율은 1:4:4 이다.In this case, the upsampling ratio of the luminance value Y and the color difference values U and V is 1: 4: 4.

(7) YUV 컬러에서 RGB 컬러로 색차 변환을 수행하고, 색차 변환은 포그라운드 영상과 백그라운드 영상에 대하여 각각 수행한다.(7) Color difference conversion is performed from YUV color to RGB color, and color difference conversion is performed on the foreground image and the background image, respectively.

(8) 색차 변환된 포그라운드 영상, 백그라운드 영상, 그리고 비트맵으로 원 영상을 복원한다.(8) The original image is reconstructed with the foreground image, the background image, and the bitmap, which are color difference converted.

이러한 복원 시스템의 구조는 도 2에서 처럼, 포그라운드 영상과 백그라운드 영상의 비트스트림을 입력으로 받아 웨이블릿 계수를 생성하고 역 그레이코드 변환을 수행하는 비트평면 복호기(220,230)와;The structure of the reconstruction system includes bit plane decoders 220 and 230 that receive a bitstream of a foreground image and a background image as inputs, generate wavelet coefficients, and perform inverse gray code conversion;

JBG 파일의 비트스트림을 입력으로 받아 비트맵 영상을 생성하는 JBIG 복호기(210)와;A JBIG decoder 210 for receiving a bitstream of a JBG file as an input and generating a bitmap image;

상기 웨이블릿 계수를 입력으로 받아 역 웨이블릿 변환, 업샘플링, YUV에서 RGB로의 색차 변환을 수행하여 문자에 해당하는 포그라운드 영상과, 이미지에 해당하는 백그라운드 영상을 생성하는 IDWT부(226,236)와;IDWT units (226, 236) for receiving the wavelet coefficient as an input and performing inverse wavelet transform, upsampling, and color difference conversion from YUV to RGB to generate a foreground image corresponding to a character and a background image corresponding to the image;

상기 비트맵 영상과, 포그라운드 영상과, 백그라운드 영상을 원래의 문서로 재구성하는 재구성부(240)로 구성된다.And a reconstruction unit 240 for reconstructing the bitmap image, the foreground image, and the background image into the original document.

상기 JBIG 복호기(210)는 비트스트림을 입력으로 받아 복호화를 수행하여 비트맵 영상을 생성한다.The JBIG decoder 210 receives a bitstream as an input and decodes the bitstream to generate a bitmap image.

도 2에서 비트스트림을 입력으로 하여 적응 산술 복호기(220,230)에 의해 상술한 복호화 과정을 거친다.In FIG. 2, the bitstream is input and subjected to the above-described decoding process by the adaptive arithmetic decoders 220 and 230.

반복길이 복호기(222,232)는 동일한 값을 갖는 픽셀들을 하나의 코드를 사용하여 나타내는 부호화의 역과정으로 복호화를 수행한다.The repetition length decoders 222 and 232 perform decoding in a reverse process of encoding in which pixels having the same value are represented using one code.

예를 들어 234@12로 부호화한 값을 첫번째 픽셀값이 234이고 동일한 값을 픽셀이 연속적으로 이웃하여 14의 픽셀이 나타난 것으로 표시하여 복호화한다.For example, the value encoded by 234 @ 12 is decoded by indicating that the first pixel value is 234 and the same value is displayed as 14 pixels with consecutive pixels neighboring.

상기 비트평면 복호기(224,234)는 비트스트림을 입력으로 받아 웨이블릿 계수를 생성하고 역 그레이코드 변환을 수행하여 웨이블릿 계수를 생성한다.The bit plane decoders 224 and 234 receive the bitstreams as inputs, generate wavelet coefficients, and perform inverse gray code transformation to generate wavelet coefficients.

IDWT부(226,236)는 웨이블릿 계수를 입력으로 받아 문자에 해당하는 포그라운드 영상과 이미지에 해당되는 백그라운드 영상을 생성한다.The IDWT units 226 and 236 receive wavelet coefficients as inputs and generate a foreground image corresponding to a character and a background image corresponding to the image.

상기 IDWT(Inverse Discrete Wavelet Transform)의 자료구조는 도 3의 FDWT 자료구조와 같다.The data structure of the Inverse Discrete Wavelet Transform (IDWT) is the same as the FDWT data structure of FIG. 3.

도 10은 TSFB의 합성(synthesize)과정을 나타낸다.10 shows a synthesis process of TSFB.

상기 합성 과정은 도 4의 분석과정의 역과정으로서, LIFT1, LIFT0, 합성을 순차수만큼 1차원(수직)에 대해서 수행하고, 또 1차원(수평)에 대해 반복 수행함으로써 원래의 영상을 얻을 수 있다.The synthesis process is an inverse process of the analysis process of FIG. 4, and the original image can be obtained by performing LIFT1, LIFT0, synthesis on one dimension (vertical) by the order of repetition, and repeatedly performing the same on one dimension (horizontal). have.

이를 수직, 수평에 대하여 각각 수행함으로서 도 11에서와 같이 포그라운드 영상과 백그라운드 영상에 대한 원래의 영상을 얻는다.By doing this for the vertical and horizontal, respectively, as shown in Figure 11 to obtain the original image for the foreground image and the background image.

이와 같은 방법으로, 비트맵 영상과, 포그라운드 영상과 백그라운드 영상이 생성되면, 이는 문서 재구성부((document reconstruction),240)에 의해원래(original) 문서의 영상으로 재구성되어 복원이 완료된다.In this manner, when the bitmap image, the foreground image, and the background image are generated, the image is reconstructed by the document reconstruction 240 to complete the restoration.

상술한 바와 같은 압축된 문서의 복원은, JBG 파일을 복호화하여 비트맵 영상을 생성한다(제1과정).Reconstruction of the compressed document as described above generates a bitmap image by decoding the JBG file (first process).

포그라운드 영상의 부호화된 비트스트림을 복호화하여 웨이블릿 계수를 생성하고, 역 그레이코드 변환을 거친 후, 역 웨이블릿 변환을 수행하고, YUV 컴포넌트에 대하여 1:4:4로 업샘플링을 수행하고, YUV 컬러를 RGB 컬러로 색차 변환을 수행하여 포그라운드 영상을 생성한다(제2과정).Decode the encoded bitstream of the foreground image to generate wavelet coefficients, perform inverse graycode transformation, perform inverse wavelet transformation, upsample to 1: 4: 4 for YUV components, and apply YUV color To generate a foreground image by performing color difference conversion to RGB colors (second process).

백그라운드 영상의 부호화된 비트스트림을 복호화하여 웨이블릿 계수를 생성하고, 역 그레이코드 변환을 거친 후, 역 웨이블릿 변환을 수행하고, YUV 컴포넌트에 대하여 1:4:4로 업샘플링을 수행하고, YUV 컬러를 RGB 컬러로 색차 변환을 수행하여 백그라운드 영상을 생성한다(제3과정).Decode the encoded bitstream of the background image to generate wavelet coefficients, perform inverse graycode transformation, perform inverse wavelet transformation, perform upsampling at 1: 4: 4 on the YUV component, and apply YUV color. A background image is generated by performing color difference conversion to RGB colors (step 3).

상기 비트맵 영상과, 포그라운드 영상과 백그라운드 영상을 원래의 문서로 재구성하여 복원한다(제4과정).The bitmap image, the foreground image, and the background image are reconstructed and restored to the original document (step 4).

이와 같은 본 발명에 따른 웨이블릿 변환과 비트평면 부호화를 이용한 문서 압축 Codec의 성능을 실험하기 위해서 사용된 원래의 실험영상은 임의의 크기를 가진 영상으로 한다.The original experimental image used to test the performance of the document compression codec using wavelet transform and bit plane coding according to the present invention is an image having an arbitrary size.

도 12a(Lena 영상(400x255))는 이미지만 담고 있으며, 어떠한 문자 정보도 없는 영상이다.12A (Lena image 400x255) is an image containing only an image and no text information.

도 12b(Hobby 영상(791x565))는 이미지와 문자가 분리된 형태의 영상이다.FIG. 12B (Hobby image 791x565) is an image in which an image and a text are separated.

도 12c(ATT 영상(512x512))는 이미지와 문자가 혼용된 형태의 영상이다.FIG. 12C (ATT image 512x512) is an image in which image and text are mixed.

상기한 원래의 실험영상들은 RGB형태로 저장된 컬러 영상들이다.The original experimental images are color images stored in RGB format.

상기 각 영상에 대해서 웨이블릿 변환을 수행하고, 웨이블릿 계수값에 대해서 비트평면 부호화를 수행한 다음 압축된 영상에 대해서 복원을 수행하고 이에 따른 PSNR(Peak Signal-to-Noise Ratio)을 구하기 위한 식은 수학식 16과 같다.The equation for performing wavelet transform on each image, performing bit plane coding on wavelet coefficient values, restoring the compressed image, and obtaining a peak signal-to-noise ratio (PSNR) according to the equation Same as 16

여기에서, 255는 픽셀에서의 최대값이고, MSE(Mean Squared Error)는 모든 픽셀에 대한 원래의 실험영상과 복원영상과의 오차의 합 제곱으로 수학식 17에 의해 구해진다.Here, 255 is a maximum value in pixels, and MSE (Mean Squared Error) is calculated by Equation 17 as the sum square of the error between the original experimental image and the reconstructed image for all pixels.

여기서 W는 이미지 폭이고 H는 이미지의 높이이다.Where W is the image width and H is the height of the image.

도 13a와 도 13b는 백그라운드와 포그라운드 영상에 대한 압축비율을 나타낸고 도 14a와 14b는 복원된 영상에 대한 PSNR 수치를 나타낸다.13A and 13B show compression ratios for background and foreground images, and FIGS. 14A and 14B show PSNR values for reconstructed images.

여기서 백그라운드 영상에 대해서는 평균적으로 100:9 정도의 압축률을 보이고 있고, 포그라운드 영상에 대해서는 평균적으로 100:7정도의 압축률을 보이고 있음을 알 수 있다.Here, it can be seen that the average compression ratio of the background image is about 100: 9 and that of the foreground image is about 100: 7.

백그라운드 영상에 대해서는 (5/3)과 (5/11-C) 웨이블릿 리프팅이 가장 높은 압축률을 보인다.For background images, (5/3) and (5 / 11-C) wavelet lifting show the highest compression.

(9/7-F)는 압축률이 비교적 좋지 못하지만, PSNR은 가장 높은 값을 나타내고 있다.(9 / 7-F) has a relatively poor compression ratio, but the PSNR shows the highest value.

(5/3)과 (5/11-C) 웨이블릿 리프팅 역시 높은 압축률을 나타내면서도 비교적 높은 PSNR을 보이고 있다.(5/3) and (5 / 11-C) wavelet lifting also show relatively high PSNR with high compression ratio.

포그라운드 영상에서는 (5/3)과 (2/6) 웨이블릿 리프팅이 가장 높은 압축률을 나타낸다.In the foreground image, (5/3) and (2/6) wavelet lifting show the highest compression ratio.

(5/3) 웨이블릿 리프팅은 압축률과 동시에 높은 PSNR을 나타내고 있다.(5/3) Wavelet lifting shows high PSNR at the same time as compression rate.

반면에 (9/7-F)는 압축율과 PSNR 모두에서 가장 비효율적임을 볼 수 있다.On the other hand, (9 / 7-F) can be seen to be the most inefficient for both compression rate and PSNR.

도 15a, 도 15b, 도 15c는 실험영상 도 12a, 도 12b, 12c에 대한 압축된 파일을 복원한 복원영상을 나타낸다.15A, 15B, and 15C show reconstructed images of the compressed files of the experimental images FIGS. 12A, 12B, and 12C.

상기 도 12와 도 15를 비교해 보면, 실험영상과 복원영상이 시각적으로 거의 차이가 없음을 알 수 있다.Comparing FIG. 12 with FIG. 15, it can be seen that the experimental image and the reconstructed image have little visual difference.

이상에서 살펴본 바와 같이 본 발명에 의하면, 문자와 이미지를 분리하여 문자는 문자대로 그리고 영상은 영상대로 압축하고 복원할 수 있다.As described above, according to the present invention, the text and the image may be separated and compressed and restored as the text and the video as the image.

또한, 본 발명에 의하면, 12가지의 정수 변환(integer transform)을 수행할 수 있어 입력되는 영상에 적합하게 정수변환을 더욱 세밀하게 선택할 수 있으므로 영상을 압축하고 복원하였을 경우에 발생하는 손실을 상당히 많이 감소시킬 수 있다.In addition, according to the present invention, since 12 integer transforms can be performed, the integer transform can be selected more precisely according to the input image, so that the loss caused when the image is compressed and reconstructed is significantly increased. Can be reduced.

또한 웨이블릿 계수에 대한 그레이코드로의 변환을 통해 비트평면에서 중복성을 높임으로써 압축효과를 높이고, 각 서브밴드에 대해 다른 비율로 양자화를 적용함으로서 이미지의 시각적 질(quality)을 낮추지 않으면서 압축률을 높일 수 있다.In addition, by converting the wavelet coefficients to gray code, it improves the compression effect by increasing redundancy in the bit plane, and by applying quantization at different ratios for each subband, thereby increasing the compression rate without lowering the visual quality of the image. Can be.

Claims (13)

문자와 이미지가 포함된 문서를, 문자에 해당하는 포그라운드 영상과, 배경 및 그림의 이미지에 해당하는 백그라운드 영상과, 비트맵 영상으로 분리하여 생성하는 문서분할 모듈과;A document splitting module for generating a document including text and an image into a foreground image corresponding to a character, a background image corresponding to a background and an image, and a bitmap image; 상기 비트맵 영상을 입력으로 받아 부호화를 하여 JBG 파일을 생성하는 JBIG 부호기와;A JBIG encoder for generating a JBG file by receiving the bitmap image as an input and encoding the bitmap image; 상기 포그라운드 영상과 백그라운드 영상을 입력으로 받아 색차 변환과 다운샘플링을 수행하고, 리프팅 방식으로 웨이블릿 변환을 수행하여 웨이블릿 계수를 출력하는 FDWT부와;An FDWT unit which receives the foreground image and the background image as inputs, performs color difference conversion and downsampling, and performs wavelet transform by a lifting method to output wavelet coefficients; 상기 웨이블릿 계수를 입력으로 받아 그레이코드 변환과 양자화를 수행하고, 비트평면 방식에 의하여 부호화를 수행화하여 비트스트림을 생성하는 비트평면 부호기를;A bit plane encoder which receives the wavelet coefficients as an input, performs gray code transformation and quantization, and generates a bit stream by performing encoding by a bit plane method; 포함하는 문자와 이미지가 포함된 문서의 압축 시스템.Compression system for documents containing embedded text and images. 포그라운드 영상과 백그라운드 영상의 비트스트림을 입력으로 받아 웨이블릿 계수를 생성하고 역 그레이코드 변환을 수행하는 비트평면 복호기와;A bit plane decoder which receives the bitstreams of the foreground image and the background image as inputs, generates wavelet coefficients, and performs inverse gray code conversion; JBG 파일의 비트스트림을 입력으로 받아 비트맵 영상을 생성하는 JBIG 복호기와;A JBIG decoder which receives a bitstream of a JBG file as an input and generates a bitmap image; 상기 웨이블릿 계수를 입력으로 받아 역 웨이블릿 변환, 업샘플링, 색차 변환을 수행하여 문자에 해당하는 포그라운드 영상과, 이미지에 해당하는 백그라운드 영상을 생성하는 IDWT부와;An IDWT unit which receives the wavelet coefficient as an input and performs inverse wavelet transform, upsampling, and color difference conversion to generate a foreground image corresponding to a character and a background image corresponding to the image; 상기 비트맵 영상과, 포그라운드 영상과, 백그라운드 영상을 원래의 문서로 복원하는 문서 재구성부를;A document reconstructing unit for restoring the bitmap image, the foreground image, and the background image to an original document; 포함하는 문자와 이미지가 포함된 문서의 복원 시스템.Restoration system for documents containing embedded text and images. 문자와 이미지가 포함된 문서의 전체 영상을, 비트맵 영상과, 문자의 포그라운드 영상과, 이미지의 백그라운드 영상으로 분할하는 제1과정과;A first step of dividing the entire image of the document including the character and the image into a bitmap image, a foreground image of the character, and a background image of the image; 상기 비트맵 영상을 부호화하여 JBG 파일로 생성하는 제2과정과;Generating a JBG file by encoding the bitmap image; 상기 포그라운드 영상에 대해 리프팅 방식으로 웨이블릿 변환을 수행하여 웨이블릿 계수를 출력하고, 상기 웨이블릿 계수를 부호화하여 비트스트림을 생성하는 제3과정과;Performing a wavelet transform on the foreground image by a lifting method to output wavelet coefficients, and encoding the wavelet coefficients to generate a bitstream; 상기 백그라운드 영상에 대해 리프팅 방식으로 웨이블릿 변환을 수행하여 웨이블릿 계수를 출력하고, 상기 웨이블릿 계수를 부호화하여 비트스트림을 생성하는 제4과정을;Performing a wavelet transform on the background image by a lifting method to output wavelet coefficients, and encoding the wavelet coefficients to generate a bitstream; 포함하는 문자와 이미지가 포함된 문서의 압축 방법.How to compress documents that contain embedded text and images. 청구항 3에 있어서, 상기 제1과정에서 문서의 분할은,The method of claim 3, wherein the division of the document in the first process, 전체의 영상을 포그라운드 컬러와, 백그라운드 컬러로 클러스터링하며,Cluster the entire image into the foreground and background colors, 1. 포그라운드 컬러는 검은색으로 백그라운드 컬러는 흰색으로 초기화하는과정,1.The process of initializing the foreground color to black and the background color to white, 2. 영상의 모든 픽셀값과 포그라운드 컬러와 백그라운드 컬러와의 거리를 각각 비교하여 더 가까운 쪽에 포함시키는 과정,2. The process of comparing each pixel value of the image and the distance between the foreground color and the background color, and including them closer to each other; 3. 포그라운드에 포함되는 픽셀과 백그라운드에 포함되는 픽셀에 대한 각각의 평균을 구하여 포그라운드 컬러와 백그라운드 컬러로 갱신하여 주는 과정,3. The process of obtaining the average of each pixel included in the foreground and the pixel included in the background and updating them to the foreground color and the background color, 4. 각각의 컬러가 모두 모아질 때까지 2과정과 3과정을 반복하는 과정을,4. Repeat steps 2 and 3 until each color is collected, 거쳐 이루어짐을 특징으로 하는 문자와 이미지가 포함된 문서의 압축 방법.A method of compressing a document containing text and images, characterized in that it takes place through. 청구항 3 또는 청구항 4에 있어서, 상기 제1과정에서 분할된 백그라운드 영상과 포그라운드 영상에 대해서 RGB 컬러모델을 YUV 컬러모델로 변환하는 색차변환을 수행하고, Y와 U와 V 컴포넌트에 대해서 4:1:1로 다운샘플링을 수행함을 특징으로 하는 문자와 이미지가 포함된 문서의 압축방법.The method according to claim 3 or 4, wherein color difference conversion for converting an RGB color model into a YUV color model is performed on the background image and the foreground image divided in the first step, and 4: 1 for Y, U, and V components. A method of compressing a document containing text and images, characterized by performing downsampling at: 1. 청구항 3에 있어서, 상기 웨이블릿 계수값을 그레이코드로 변환하고 상기 그레이코드로 변환된 계수를 각 밴드별(LL,LH,HL,HH)로 다른 양자화를 수행한 후, 부호화를 행함을 특징으로 하는 문자와 이미지가 포함된 문서의 압축방법.The method according to claim 3, wherein the wavelet coefficient value is converted into a gray code, and the coefficients converted into the gray code are subjected to different quantization for each band (LL, LH, HL, HH), and then encoding is performed. How to compress documents containing text and images. 청구항 6에 있어서, 상기 양자화는 계수값을 쉬프트(shift)하는 방식으로 구현됨을 특징으로 하는 문자와 이미지가 포함된 문서의 압축방법.The method of claim 6, wherein the quantization is implemented by shifting coefficient values. 청구항 7에 있어서, 상기 밴드중에서 이미지의 평균값을 담고 있는 LL밴드의 쉬프트는 LH, HL, HH밴드보다 상대적으로 적게함을 특징으로 하는 문자와 이미지가 포함된 문서의 압축방법.The method of claim 7, wherein the shift of the LL band containing the average value of the image in the band is relatively less than the LH, HL, HH band. 청구항 3 또는 청구항 6에 있어서, 상기 부호화는 웨이블릿 계수를 비트평면 기반하에서 서브블록으로 분할하고 각 서브블록에 대해서 비트평면 부호화를 수행하는 것임을 특징으로 하는 문자와 이미지가 포함된 문서의 압축 방법.The method of claim 3 or 6, wherein the encoding divides wavelet coefficients into subblocks on a bit plane basis, and performs bit plane encoding on each subblock. 청구항 9에 있어서, 상기 서브블록에 대해서 서브블록에 존재하는 1의 유무에 따라서 고려되는 중요성(significance) 여부를 조사하여, 서브블록이 1의 값을 포함하고 있는 중요한(signficant) 서브블록인 경우는 부호화하여 비트스트림을 생성하고 서브블록이 0으로만 구성된 중요하지 않은(insignificant) 서브블록인 경우에는 부호화에서 제외하고 전체 비트평면에서 그 서브블록 위치에 대한 정보만 서브블록 맵에 저장함을 특징으로 하는 문자와 이미지가 포함된 문서의 압축 방법.10. The method of claim 9, wherein whether the subblock is a significant subblock containing a value of 1 by examining whether or not the significance is considered according to the presence or absence of 1 present in the subblock. If the bitstream is generated by encoding and the subblock is an insignificant subblock having only 0, only the information about the subblock position in the entire bit plane is stored in the subblock map except for encoding. How to compress documents that contain text and images. 청구항 10에 있어서, 상기 서브블록이 0으로만 구성된 중요하지 않은 서브블록인 경우에 어떠한 비트스트림도 출력하지 않음을 특징으로 하는 문자와 이미지가 포함된 문서의 압축 방법.11. The method of claim 10, wherein no bitstream is output when the subblock is a non-significant subblock consisting only of zeros. 청구항 3에 있어서, 상기 제3,4과정의 웨이블릿 리프팅 수행은,The method of claim 3, wherein the third and fourth wavelet lifting is performed. 실제 영상 데이터에 대해 스플릿트를 수행하여 짝수부분은 상위부분으로 홀수부분은 하위부분으로 분할한 후,Splitting the actual image data, divide the even part into the upper part and the odd part into the lower part. 상위부분은 로우패스 필터(lowpass filter)를 거치고, 하위부분은 하이패스 필터(highpass filter)를 거치는 과정을,The upper part goes through a lowpass filter, the lower part goes through a highpass filter, 순차수만큼 반복하여 수행함을 특징으로 하는 문자와 이미지가 포함된 문서의 압축 방법.A method of compressing a document containing characters and images, characterized in that the sequence is performed repeatedly. 부호화된 JBG 파일을 복호화하여 비트맵 영상을 생성하는 제1과정과;Generating a bitmap image by decoding the encoded JBG file; 포그라운드 영상의 부호화된 비트스트림을 복호화하여 웨이블릿 계수를 생성하고, 역 그레이코드 변환을 거친 후, 역 웨이블릿 변환을 수행하고, YUV 컴포넌트에 대하여 1:4:4로 업샘플링을 수행하고, YUV 컬러를 RGB 컬러로 색차 변환을 수행하여 포그라운드 영상을 생성하는 제2과정과;Decode the encoded bitstream of the foreground image to generate wavelet coefficients, perform inverse graycode transformation, perform inverse wavelet transformation, upsample to 1: 4: 4 for YUV components, and apply YUV color Performing a color difference conversion to RGB colors to generate a foreground image; 백그라운드 영상의 부호화된 비트스트림을 복호화하여 웨이블릿 계수를 생성하고, 역 그레이코드 변환을 거친 후, 역 웨이블릿 변환을 수행하고, YUV 컴포넌트에 대하여 1:4:4로 업샘플링을 수행하고, YUV 컬러를 RGB 컬러로 색차 변환을 수행하여 백그라운드 영상을 생성하는 제3과정과;Decode the encoded bitstream of the background image to generate wavelet coefficients, perform inverse graycode transformation, perform inverse wavelet transformation, perform upsampling at 1: 4: 4 on the YUV component, and apply YUV color. Generating a background image by performing color difference conversion to RGB colors; 상기 비트맵 영상과 포그라운드 영상과 백그라운드 영상을 원래의 문서로 재구성하여 복원하는 제4과정을;A fourth step of reconstructing and reconstructing the bitmap image, the foreground image, and the background image into an original document; 포함하는 문자와 이미지가 포함된 문서의 복원 방법.How to restore documents that contain embedded text and images.
KR10-2002-0004196A 2002-01-24 2002-01-24 Document segmentation compression, reconstruction system and method KR100412176B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2002-0004196A KR100412176B1 (en) 2002-01-24 2002-01-24 Document segmentation compression, reconstruction system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2002-0004196A KR100412176B1 (en) 2002-01-24 2002-01-24 Document segmentation compression, reconstruction system and method

Publications (2)

Publication Number Publication Date
KR20030063850A KR20030063850A (en) 2003-07-31
KR100412176B1 true KR100412176B1 (en) 2003-12-24

Family

ID=32219194

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2002-0004196A KR100412176B1 (en) 2002-01-24 2002-01-24 Document segmentation compression, reconstruction system and method

Country Status (1)

Country Link
KR (1) KR100412176B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150104288A (en) 2014-03-05 2015-09-15 에스케이플래닛 주식회사 Image identification apparatus, method thereof and computer readable medium having computer program recorded therefor

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100693296B1 (en) * 2005-06-07 2007-03-13 (주)디디오넷 Computer screen image codec apparatus and method
KR100708180B1 (en) * 2005-09-22 2007-04-17 삼성전자주식회사 Apparatus and method for compressing color or gray scale documents
CN102473314B (en) * 2009-09-02 2014-01-29 索尼公司 Vector embedded graphics coding
KR102013240B1 (en) * 2012-02-02 2019-08-22 삼성전자주식회사 Method and apparatus for image encoding based on region characteristics, method and apparatus for image decoding based on region characteristics

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01144778A (en) * 1987-11-30 1989-06-07 Canon Inc Image encoding method
JPH0289459A (en) * 1988-09-27 1990-03-29 Toshiba Corp Facsimile system
JPH04144485A (en) * 1990-10-05 1992-05-18 Fuji Xerox Co Ltd Image processor
KR940020246A (en) * 1993-02-04 1994-09-15 이헌조 Area Division Method of Document Recognition Device
KR970078385A (en) * 1996-05-10 1997-12-12 문정환 Facsimile data processing device
JPH11136520A (en) * 1997-10-31 1999-05-21 Ricoh Co Ltd Picture data processor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01144778A (en) * 1987-11-30 1989-06-07 Canon Inc Image encoding method
JPH0289459A (en) * 1988-09-27 1990-03-29 Toshiba Corp Facsimile system
JPH04144485A (en) * 1990-10-05 1992-05-18 Fuji Xerox Co Ltd Image processor
KR940020246A (en) * 1993-02-04 1994-09-15 이헌조 Area Division Method of Document Recognition Device
KR970078385A (en) * 1996-05-10 1997-12-12 문정환 Facsimile data processing device
JPH11136520A (en) * 1997-10-31 1999-05-21 Ricoh Co Ltd Picture data processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150104288A (en) 2014-03-05 2015-09-15 에스케이플래닛 주식회사 Image identification apparatus, method thereof and computer readable medium having computer program recorded therefor

Also Published As

Publication number Publication date
KR20030063850A (en) 2003-07-31

Similar Documents

Publication Publication Date Title
Subramanya Image compression technique
KR100524566B1 (en) Image processing apparatus and method
KR100944282B1 (en) Dct compression using golomb-rice coding
JP3699425B2 (en) Image compression method and system with adaptive block size
KR100946600B1 (en) An apparatus and method for encoding digital image data in a lossless manner
JP4365957B2 (en) Image processing method and apparatus and storage medium
KR100880039B1 (en) Method and system for achieving coding gains in wavelet-based image codecs
US6917716B2 (en) Image processing apparatus and method and storage medium
Kaur et al. A review of image compression techniques
JPH114343A (en) Image compression method, image compressor and medium read by computer
JP2000032466A (en) Wavelet transformation encoding method for digital image, and digital image coder
US20060067582A1 (en) Progressive JPEG decoding system
US6337929B1 (en) Image processing apparatus and method and storing medium
Sindhu et al. Images and its compression techniques-A Review
Chawla et al. Image compression techniques: a review
JP2022536512A (en) Encoder and method for encoding a sequence of frames
KR100412176B1 (en) Document segmentation compression, reconstruction system and method
JP2002190956A (en) Image encoding equipment and image decoding equipment
Hussin et al. A comparative study on improvement of image compression method using hybrid DCT-DWT techniques with huffman encoding for wireless sensor network application
JP2001103315A (en) Image coding method and image coder
Li et al. Image Compression Standards
JPH11136519A (en) Picture processor
JP4743883B2 (en) Image coding apparatus and control method thereof
Kim et al. Binary subband decomposition and concatenated arithmetic coding
Sahu et al. Hybrid Compression of Medical Images Based on Huffman and LPC For Telemedicine Application

Legal Events

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

Payment date: 20121205

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20131127

Year of fee payment: 11

FPAY Annual fee payment

Payment date: 20141203

Year of fee payment: 12

LAPS Lapse due to unpaid annual fee