KR20050081532A - Image binary-coding method based on local characteristics - Google Patents

Image binary-coding method based on local characteristics Download PDF

Info

Publication number
KR20050081532A
KR20050081532A KR1020040009832A KR20040009832A KR20050081532A KR 20050081532 A KR20050081532 A KR 20050081532A KR 1020040009832 A KR1020040009832 A KR 1020040009832A KR 20040009832 A KR20040009832 A KR 20040009832A KR 20050081532 A KR20050081532 A KR 20050081532A
Authority
KR
South Korea
Prior art keywords
pixel
value
local
mask
threshold
Prior art date
Application number
KR1020040009832A
Other languages
Korean (ko)
Inventor
정영훈
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR1020040009832A priority Critical patent/KR20050081532A/en
Publication of KR20050081532A publication Critical patent/KR20050081532A/en

Links

Classifications

    • G06T5/94
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • 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/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]

Abstract

본 발명은 입력 영상 내에 포함되어 있는 각각의 국부적인 영역의 특성을 고려한 영상 이진화 방법에 관한 것으로서, 본 발명에 따른 이진화 방법은 입력 영상 중 현재 처리하고자 하는 화소 주변 영역의 특성을 고려하여 적응적 국부 임계값을 계산하고, 계산된 국부 임계값과 현재 처리하고자 하는 화소의 값을 비교하여 현재 처리하고자 하는 화소에 대응되는 이진 화소 값을 출력하도록 함으로써, 입력 영상에 고주파와 저주파 성분이 혼재되어 있는 경우에도, 이진화를 적응적으로 수행하여, 경계 부분의 고주파 성분을 유지하면서도 배경 영역의 저주파 성분도 충실히 나타나도록 하는 것이 가능하다.The present invention relates to an image binarization method considering characteristics of each local region included in an input image, and the binarization method according to the present invention adaptively localizes in consideration of characteristics of a pixel peripheral region to be currently processed in an input image. When a threshold value is calculated and a binary pixel value corresponding to a pixel to be processed is output by comparing the calculated local threshold value with a value of a pixel to be processed at present, when a high frequency and a low frequency component are mixed in the input image. In addition, it is possible to adaptively perform the binarization so that the low frequency component of the background region is faithfully displayed while maintaining the high frequency component of the boundary portion.

Description

국부 특성을 고려한 영상 이진화 방법{Image binary-coding method based on local characteristics}Image binary-coding method based on local characteristics

본 발명은 연속 계조 영상(continuous-tone image)을 이진 값으로 출력하는 이진화 방법에 관한 것으로, 특히 입력 영상의 국부 영역 특성을 고려한 이진화 방법에 관한 것이다. The present invention relates to a binarization method for outputting a continuous-tone image as a binary value, and more particularly, to a binarization method in consideration of local region characteristics of an input image.

연속 계조 영상은 2차원 공간상에 각 화소 값을 가지고 있는 영상이다. 이진화 출력장치는 출력 값을 이진 값으로 제한한 장치이다. 예를 들어 팩시밀리, 프린터, 디지털 복사기 및 LCD 판넬 등에 이진화 방법(halftone algorithm)에 기초한 이진화 출력 장치가 사용될 수 있다. The continuous grayscale image is an image having each pixel value in a two-dimensional space. Binarization output devices are devices that limit output values to binary values. For example, a binarization output device based on a halftone algorithm may be used for facsimile machines, printers, digital copiers and LCD panels.

이진화 출력 장치는 연속 계조 영상이 입력되면, 연속 계조 값을 두 레벨, 즉 0 또는 1로 단순화시켜 출력한다. 이를 위하여 기존의 이진화 장치는 현재 처리되는 화소의 위치에 따른 임계값으로 입력되는 화소를 마스킹 하는 방식을 사용한다. When the gradation image is input, the binarization output device simplifies and outputs the gradation value to two levels, that is, 0 or 1. To this end, the conventional binarization apparatus uses a method of masking an input pixel with a threshold value according to the position of a pixel currently being processed.

도 1은 종래의 이진화 장치를 도시하는 블록도이다.1 is a block diagram showing a conventional binarization apparatus.

도 1을 참조하면 종래의 이진화 장치는 카운터(100), 메모리 어드레스 발생기(110), 메모리(120) 및 비교기(130)를 포함한다.Referring to FIG. 1, a conventional binarization apparatus includes a counter 100, a memory address generator 110, a memory 120, and a comparator 130.

카운터(100)는 현재 입력되는 화소 I(x, y)에 대한 2차원 영상에서의 위치 정보를 출력한다. 카운터(100)는 연속 계조 영상이 2차원 영상의 왼쪽 상단에서 오른쪽 하단으로 이동하면서 한 화소씩 입력된다는 점을 고려하여 상기 위치 정보를 출력한다. 따라서, 카운터부(100)는 x축 위치 카운터(101)와 y축 위치 카운터(102)를 포함한다. x축 위치 카운터(101)는 현재 입력되는 화소 I(x, y)의 2차원 영상에서의 x축 위치에 해당되는 값을 출력한다. y축 위치 카운터(102)는 현재 입력되는 화소 I(x, y)의 2차원 영상에서의 y축 위치에 해당되는 값을 출력한다. The counter 100 outputs position information in the 2D image of the pixel I (x, y) currently input. The counter 100 outputs the position information in consideration of the fact that the continuous grayscale image is input by one pixel while moving from the upper left to the lower right of the 2D image. Thus, the counter unit 100 includes an x-axis position counter 101 and a y-axis position counter 102. The x-axis position counter 101 outputs a value corresponding to the x-axis position in the two-dimensional image of the pixel I (x, y) currently input. The y-axis position counter 102 outputs a value corresponding to the y-axis position in the two-dimensional image of the pixel I (x, y) currently input.

메모리 어드레스 발생기(110)는 카운터(100)로부터 출력되는 x축 위치 정보와 y축 위치 정보에 대응되는 1차원 메모리 어드레스와 제어신호를 발생한다. 제어신호는 메모리(120)에 대한 읽기 모드를 제어하는 신호이다. The memory address generator 110 generates one-dimensional memory addresses and control signals corresponding to the x-axis position information and the y-axis position information output from the counter 100. The control signal is a signal for controlling the read mode for the memory 120.

메모리(120)는 2차원 영상의 각 화소에 대응되는 마스크 임계값을 저장하고 있다. 메모리 어드레스 발생기(110)로부터 메모리 어드레스 및 제어신호가 전송되면, 메모리(120)는 현재 입력되는 화소 I(x, y)에 대한 소정의 마스크 임계값 M(x, y)을 출력한다. The memory 120 stores a mask threshold value corresponding to each pixel of the 2D image. When the memory address and the control signal are transmitted from the memory address generator 110, the memory 120 outputs a predetermined mask threshold value M (x, y) for the pixel I (x, y) currently input.

비교기(130)는 입력되는 화소 I(x, y)와 마스크 임계값 M(x, y)간의 대소를 비교하여 상기 입력되는 화소 I(x, y)에 대한 이진화소 값(binary pixel value) B(x, y)를 출력한다. 예를 들어 입력되는 화소 I(x, y)가 상기 마스크 임계값 M(x, y)보다 크면, 비교기(130)는 "1"을 이진화소 값으로 출력한다. 한편, 입력되는 화소 I(x, y)가 상기 마스크 임계값 M(x, y)보다 크지 않으면, 비교기(130)는 "0"을 이진화소 값으로 출력한다. The comparator 130 compares the magnitude between the input pixel I (x, y) and the mask threshold value M (x, y) to compare the binary pixel value B for the input pixel I (x, y). Output (x, y) For example, when the input pixel I (x, y) is larger than the mask threshold value M (x, y), the comparator 130 outputs "1" as a binary pixel value. On the other hand, if the input pixel I (x, y) is not greater than the mask threshold value M (x, y), the comparator 130 outputs "0" as a binary pixel value.

따라서 상기 이진화 장치에서 출력되는 이진 영상의 화질은 메모리(120)에 저장되어 있는 마스크 임계값의 해상도, 마스크 임계값의 분포 및 마스크의 크기에 따라 결정된다. 다시 말하면 메모리(120)에 저장된 상기 마스크 임계값의 성분이 규칙적으로 배열되어 있다면, 이진화 장치에서 출력되는 영상에도 규칙적인 패턴이 형성될 것이다. Therefore, the image quality of the binary image output from the binarization apparatus is determined according to the resolution of the mask threshold value, the distribution of the mask threshold value, and the size of the mask stored in the memory 120. In other words, if the components of the mask threshold stored in the memory 120 are regularly arranged, a regular pattern will be formed in the image output from the binarization apparatus.

도 2는 흑백 영상 또는 컬러 영상의 1 채널에 대한 마스킹 방식을 도시하는 도면이다.2 is a diagram illustrating a masking scheme for one channel of a black and white image or a color image.

연속 계조 영상은 2차원 공간 상에 각 화소값을 가지고 있는 영상이다. 출력 기기의 출력값이 이진 영상으로 제한되어 있는 경우, 이진 영상을 출력하기 위해서는 연속 계조 값을 두 레벨, 즉 0 또는 1로 단순화 시켜야 한다. 따라서, 이진화 알고리즘이 필요하게 되었으며, 마스크 방식에서는 단순 이진화(simple threshold)처럼 고정되어 있는 임계값(fixed threshold)을 사용하는 방식이 아니라 현재 처리되는 화소의 위치에 따라서 임계값이 변화되는 방식을 취하고 있다. 그리고, 각 화소에 대응하는 임계값들은 임계 배열로부터 얻어진다.The continuous grayscale image is an image having respective pixel values in a two-dimensional space. When the output value of the output device is limited to binary image, the continuous gray value should be simplified to two levels, that is, 0 or 1, in order to output the binary image. Therefore, the binarization algorithm is needed, and in the mask method, the threshold value is changed according to the position of the pixel currently being processed, rather than using a fixed threshold like a simple binarization. have. And the threshold values corresponding to each pixel are obtained from the threshold array.

최종적으로 출력되는 이진 영상의 화질은 마스크를 구성하고 있는 임계값의 해상도, 임계값의 분포, 그리고 마스크의 전체 크기에 따라서 결정이 된다. The image quality of the finally output binary image is determined according to the resolution of the threshold constituting the mask, the distribution of the threshold, and the total size of the mask.

즉, 임계값의 성분이 규칙적으로 배열이 되어 있는 경우에는, 출력 영상 또한 이러한 임계값에 영향을 받아서 규칙적인 패턴이 형성될 것이다. 한편, 임계값의 배열 순서가 규칙성을 가지고 있지 않고, 고주파 성분이 포함되어 있는 동시에 마스크의 크기가 기존의 마스크보다 큰 스토케스틱 마스크(stochastic mask)를 사용할 수도 있다. 스토케스틱 마스크는 블루 노이즈, 즉 고주파 성분을 포함하며, 마스크의 큰 크기로 인해 많은 임계값을 표현할 수 있으므로 계조 표현력이 향상되는 장점을 가지고 있다. That is, when the components of the threshold value are arranged regularly, the output image will also be influenced by the threshold value to form a regular pattern. On the other hand, the order of the thresholds does not have regularity, and a stochastic mask may be used in which a high frequency component is included and the size of the mask is larger than that of the conventional mask. The stochastic mask includes blue noise, that is, a high frequency component, and because of the large size of the mask, many thresholds can be expressed, which has the advantage of improving gray scale expression.

도 3은 스토케스틱 마스크를 사용한 출력 영상을 도시하는 도면이다.3 is a diagram illustrating an output image using a stokestick mask.

도 4는 기존에 널리 사용되는 8×8 화소 크기의 베이어 디더(Bayer Dither)의 마스크를 도시하는 도면이다.FIG. 4 is a diagram illustrating a mask of a Bayer Dither having an 8 × 8 pixel size that is widely used.

마스크는 가로, 세로 64 픽셀 이상의 크기를 가져야만 반복적인 마스크의 사용으로 인한 규칙적인 패턴의 영향을 감소시키는 것이 가능하다. 즉, 마스크의 크기가 클수록 상기 패턴이 감소된 이진화 영상을 출력할 수 있다. 하지만, 마스크의 크기가 클수록 마스크 임계값을 저장할 메모리 용량이 증가된다. 또한, 마스크가 마스크의 임계값 배치가 확산된 형식의 블루 노이즈(blue noise)를 포함함으로써, 입력되는 영상신호의 고주파 성분이 마스크 임계값에 의해 감소된다. 따라서 도 4에 도시된 바와 같이 영상이 가지고 있는 시각적으로 중요한 성분인 경계성분의 화질이 저하된다. 블루 노이즈는 비슷한 값을 가지는 임계값들끼리 멀리 떨어져 있는 형식으로 표현됨에 따라 발생되는 노이즈인데, 이와 같이 임계값들이 확산된(dispersed) 방식의 마스크는 전체적인 화질 표현은 우수하지만 확산된 임계값으로 인해 경계영역과 같은 부분은 잘 표현해 주지 못하는 단점이 있다. It is possible to reduce the influence of regular patterns due to the use of repetitive masks only when the mask has a size larger than 64 pixels in length and width. That is, as the size of the mask increases, the binarized image having the reduced pattern may be output. However, the larger the mask size, the larger the memory capacity to store the mask threshold. In addition, since the mask includes blue noise in a form in which the threshold arrangement of the mask is diffused, the high frequency component of the input video signal is reduced by the mask threshold. Therefore, as illustrated in FIG. 4, the image quality of the boundary component, which is a visually important component of the image, is degraded. Blue noise is a noise generated when the thresholds having similar values are expressed in a distant form. Thus, a mask in which the thresholds are dispersed has a good overall image quality, but due to the diffuse threshold The same part as the boundary area has a disadvantage that cannot be expressed well.

이와 같이, 종래의 마스킹 방식을 사용하는 경우, 패턴 영향을 감소시키기 위해 소정 크기 이상의 마스크를 사용하는 경우에도, 블루 노이즈로 인해 영상이 가지고 있는 시각적으로 중요한 부분인 경계 성분을 감소시켜, 글자 부분이나 미세한 부분의 경계 영역의 톤이 훼손되는 문제점이 있었다. As such, when using a conventional masking method, even when using a mask of a predetermined size or more to reduce the effect of the pattern, blue noise reduces the boundary component, which is a visually important part of the image, to reduce the effect of the text. There is a problem that the tone of the boundary region of the minute portion is damaged.

본 발명은 상술한 문제를 해결하기 위한 것으로, 입력 영상의 국부 영역 특성을 고려하여 이진화 처리를 수행하여, 입력 영상의 경계 부분 및 배경 영역이 효과적으로 표현될 수 있는 이진화 처리 방법 및 그 장치를 제공하는데 그 목적이 있다. SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problem, and provides a binarization processing method and apparatus capable of effectively representing a boundary portion and a background region of an input image by performing a binarization process in consideration of local region characteristics of an input image. The purpose is.

상기 목적들을 달성하기 위하여 본 발명에 따른 입력 영상을 이진화 영상으로 출력하는 이진화 방법은 입력 영상 중 현재 처리하고자 하는 화소 주변 영역의 특성을 고려한 국부 임계값을 계산하는 단계와; 검출된 국부 임계값과 상기 현재 처리하고자 하는 화소의 값을 비교하여 현재 처리하고자 하는 화소에 대응되는 이진 화소 값을 출력하는 단계를 포함한다.In order to achieve the above objects, a binarization method for outputting an input image as a binarized image includes: calculating a local threshold value in consideration of characteristics of a pixel peripheral region to be processed currently; And comparing the detected local threshold value with the value of the pixel to be currently processed to output a binary pixel value corresponding to the pixel to be currently processed.

또한, 상기 목적을 달성하기 위한 본 발명에 따른 이진화 방법에서, 국부 임계값 계산 단계는, 현재 처리하고자 하는 화소의 주변 화소값들의 화소 평균값을 나타내는 국부 평균값을 계산하는 단계와; 현재 처리하고자 하는 화소의 주변 화소값들에 기초하여 주변 화소의 평탄도를 계산하는 단계와; 계산된 국부 평균값 및 평탄도에 기초하여 계산된 국부 평균값을 변형하는 단계와; 변형된 국부 평균값을 이용하여 국부 임계값을 계산하는 단계를 포함하는 것이 바람직하다.In addition, in the binarization method according to the present invention for achieving the above object, the step of calculating a local threshold value comprises the steps of: calculating a local mean value representing a pixel average value of peripheral pixel values of a pixel to be currently processed; Calculating the flatness of the peripheral pixel based on the peripheral pixel values of the pixel to be currently processed; Modifying the calculated local mean value based on the calculated local mean value and flatness; Preferably, the method comprises calculating a local threshold using the modified local mean value.

또한, 상기 목적을 달성하기 위한 본 발명에 따른 이진화 방법에서, 국부 임계값 계산 단계는, 현재 처리하고자 하는 화소의 주변 화소값들에 기초하여 주변 화소의 에지 강도를 계산하는 단계와; 현재 처리하고자 하는 화소에 대응하는 마스크 임계값을 생성하는 단계와; 계산된 에지 강도에 기초하여 생성된 마스크 임계값을 변형하는 단계를 더 포함하며, 국부 임계값 계산 단계는 변형된 마스크 임계값을 이용하는 것이 바람직하다.In addition, in the binarization method according to the present invention for achieving the above object, the step of calculating a local threshold value comprises the steps of: calculating the edge intensity of the peripheral pixel based on the peripheral pixel values of the pixel to be currently processed; Generating a mask threshold value corresponding to the pixel currently to be processed; And modifying the generated mask threshold based on the calculated edge intensity, wherein the local threshold calculating step preferably uses the modified mask threshold.

또한, 상기 목적을 달성하기 위한 본 발명에 따른 이진화 방법에서, 국부 임계값 계산 단계는, 현재 처리하고자 하는 화소의 주변 화소값들에 기초하여 주변 화소의 에지 강도를 계산하는 단계와; 현재 처리하고자 하는 화소에 대응하는 마스크 임계값을 생성하는 단계와; 계산된 에지 강도 및 상기 계산된 평탄도에 기초하여 상기 생성된 마스크 임계값을 변형하는 단계를 더 포함하며, 국부 임계값 계산 단계는 변형된 마스크 임계값을 이용하는 것이 바람직하다.In addition, in the binarization method according to the present invention for achieving the above object, the step of calculating a local threshold value comprises the steps of: calculating the edge intensity of the peripheral pixel based on the peripheral pixel values of the pixel to be currently processed; Generating a mask threshold value corresponding to the pixel currently to be processed; Modifying the generated mask threshold based on the calculated edge intensity and the calculated flatness, wherein the local threshold calculation step preferably uses a modified mask threshold.

또한, 상기 목적을 달성하기 위한 본 발명에 따른 이진화 방법에서, 국부 임계값 계산 단계는, 국부 평균값 및 평탄도에 기초하여 국부 평균값에 대한 가중치를 계산하는 단계와, 평탄도 및 에지 강도 중 적어도 하나를 이용하여 마스크 임계값에 대한 가중치를 계산하는 단계를 더 포함하며, 국부 임계값은 하기 식을 이용하여 계산되며,In addition, in the binarization method according to the present invention for achieving the above object, the step of calculating the local threshold, calculating a weighting for the local mean value based on the local mean value and flatness, and at least one of flatness and edge strength Computing a weight for the mask threshold using a, the local threshold is calculated using the following equation,

여기에서, ThLoc(x, y)는 적응적 국부 임계값, AvgLoc(x, y)는 상기 국부 평균값, FLoc는 상기 국부 평균값에 대한 가중치, M(x, y)는 상기 마스크 임계값, FMask 는 상기 마스크 임계값에 대한 가중치, Offset은 상기 입력 영상의 오프셋, Foffset은 상기 오프셋의 감마 보정을 위한 가중치인 것이 바람직하다.Here, Th Loc (x, y) is an adaptive local threshold value, Avg Loc (x, y) is a local mean value, F Loc is a weight for the local mean value, and M (x, y) is a mask threshold value , F Mask is a weight for the mask threshold value, Offset is an offset of the input image, F offset is a weight for gamma correction of the offset.

이하, 첨부된 도면을 참조하여 본 발명에 따른 실시 예를 상세히 설명하기로 한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 5는 본 발명의 바람직한 실시 예에 따른 이진화 장치의 블록도이다. 도 5를 참조하면, 본 발명에 따른 장치는 국부 윈도윙(local windowing)부(510), 국부 평균값 계산부(520), 평탄도(flatness) 계산부(530), 에지 강도(edge strength) 계산부(540), 마스크 임계값 발생부(550), 오프셋 발생부(560), 감마 오차 보정부(570), 제1 가중치 계산부(580), 제2 가중치 계산부(590), 제1 승산부(600), 제2 승산부(610), 제1 가산부(620), 제2 가산부(630), 및 비교부(640)를 포함한다. 5 is a block diagram of a binarization apparatus according to a preferred embodiment of the present invention. Referring to FIG. 5, the apparatus according to the present invention includes a local windowing unit 510, a local average value calculator 520, a flatness calculator 530, and edge strength calculations. The unit 540, the mask threshold generator 550, the offset generator 560, the gamma error corrector 570, the first weight calculator 580, the second weight calculator 590, and the first multiplication The unit 600 includes a second multiplier 610, a first adder 620, a second adder 630, and a comparator 640.

국부 윈도윙부(510)는 2차원 공간의 영상에서 현재 처리되는 화소 I(x, y)와 상기 현재 화소 I(x, y)의 주변에 위치한 화소 값을 제공한다. 상기 현재 화소 I(x, y)의 주변에 위치한 화소는 도 6(a)에 도시된 바와 같이 현재 화소 I(x, y)를 기준으로 좌측 상단(UL, Upper Left)에 위치한 화소, 상단(U, Upper)에 위치한 화소, 오른쪽 상단(UR, Upper Right)에 위치한 화소, 좌측(L, Left)에 위치한 화소, 좌좌측 상단(ULL, Upper Left Left)에 위치한 화소, 좌측 상상단(UUL, Upper Upper Left), 상상단(UU, Upper Upper)에 위치한 화소, 우측 상상단(UUR, Upper Upper Right), 우우측 상단(URR, Upper Right Right), 및 좌좌측(LL, Left Left)에 위치한 화소를 포함한다. The local windowing unit 510 provides pixel I (x, y) currently processed in an image of a two-dimensional space and pixel values located around the current pixel I (x, y). As shown in FIG. 6 (a), a pixel located near the current pixel I (x, y) is located at an upper left (UL, upper left) position based on the current pixel I (x, y). Pixel located at U, Upper, Pixel located at UR, Upper Right, Pixel located at L, Left, Pixel located at Upper Left Left, UUL, Upper Upper Left, pixels located at Upper Upper, Upper Upper Right, Upper Right Right, and Left Left It includes a pixel.

현재 화소 I(x, y)의 오른쪽 화소는 인과 시스템(causal system)에 의해 저장할 수 없기 때문에 상기 주변에 위치한 화소에 포함되지 않는다. 상기 주변에 위치한 화소중 현재 화소 I(x, y)의 상단 라인의 값은 이전 라인에 대한 처리 시 라인 메모리(미 도시됨)에 저장된 값이다. 따라서 미 도시된 라인 메모리로부터 제공된다. The pixel to the right of the current pixel I (x, y) cannot be stored by the causal system and thus is not included in the surrounding pixels. The value of the upper line of the current pixel I (x, y) among the pixels located in the periphery is a value stored in the line memory (not shown) when processing the previous line. Thus, it is provided from the line memory not shown.

국부 윈도윙부(510)는 시프트 레지스터로 구성되어 한 화소에 대한 이진화 처리가 완료될 때마다 화소 값을 왼쪽으로 이동시킨다. 즉, UR은 U로, U는 UL로, UL은 ULL로 이동하며, ULL값은 제거한다. I값은 L값으로 이동한다. UR 값은 미 도시된 라인 메모리로부터 제공된다. I값은 현재 입력되는 화소 값이다. The local windowing section 510 is composed of a shift register to shift the pixel value to the left whenever the binarization process for one pixel is completed. That is, UR moves to U, U moves to UL, UL moves to ULL, and the ULL value is removed. I value moves to L value. The UR value is provided from the not shown line memory. I value is a pixel value currently input.

국부적인 윈도윙부(510)에 윈도우 된 현재 화소의 값(I)과 주변 화소의 값들(UL, U, UR, L, LL, ULL, UUL, UU, UUR, URR)은 국부 평균 계산부(520), 평탄도 계산부(530), 에지 강도 계산부(540), 및 비교부(640)로 각각 전송한다. The value I of the current pixel and the surrounding pixels UL, U, UR, L, LL, ULL, UUL, UU, UUR, and URR that are windowed to the local windowing unit 510 are local mean calculator 520. ), The flatness calculator 530, the edge strength calculator 540, and the comparator 640, respectively.

도 6은 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 국부 윈도잉부(510)의 일 실시예를 도시하는 도면이다. FIG. 6 is a diagram illustrating an embodiment of the local windowing unit 510 used in the binarization apparatus according to the embodiment of the present invention shown in FIG. 5.

국부 평균 검출부(520)는 입력되는 현재 화소의 값(I)과 주변 화소의 값들(UL, U, UR, L, LL, ULL, UUL, UU, UUR, URR)을 이용하여 국부 평균값(AvgLoc(x, y))을 수학식 1과 같이 검출한다.The local average detector 520 uses the current value I of the current pixel and the values of the neighboring pixels UL, U, UR, L, LL, ULL, UUL, UU, UUR, and URR to calculate the local average value Avg Loc. (x, y)) is detected as in Equation 1.

수학식 1에서 aij는 방향성 필터 계수로서, 각 윈도우 화소의 가중치이다. 이 방향성 필터 계수 aij는 현재 화소와의 거리에 따라, 1, 2, 1.414, 2.236 등의 값을 가진다. I(x,y)는 필터내의 각 위치에서의 화소값이다.In Equation 1, a ij is a directional filter coefficient and is a weight of each window pixel. This directional filter coefficient a ij has a value of 1, 2, 1.414, 2.236, or the like depending on the distance from the current pixel. I (x, y) is the pixel value at each position in the filter.

수학식 1에서 I(x, y)는 윈도우 된 위치(UL, U, UR, L, LL, ULL, UUL, UU, UUR, URR)의 화소 값이다. x-iΔx는 x축 화소의 위치이고, y-jΔy는 y축 화소의 위치이다. In Equation 1, I (x, y) is a pixel value of a windowed position (UL, U, UR, L, LL, ULL, UUL, UU, UUR, URR). x-iΔx is the position of the x-axis pixel, and y-jΔy is the position of the y-axis pixel.

국부 평균 검출부(520)는 국부 윈도윙부(510)에서 전송되는 각 화소 값(UL, U, UR, L, LL, ULL, UUL, UU, UUR, URR)에 해당되는 가중치 aij를 곱한 값의 합을 가중치의 합으로 나누어 현재 국부적으로 윈도윙 된 영상의 국부 평균값 AvgLoc(x,y)를 계산한다. 계산된 국부 평균값은 제1 가중치 계산부(580) 및 제1 승산부(600)로 각각 전송된다.The local average detector 520 multiplies the pixel value (UL, U, UR, L, LL, ULL, UUL, UU, UUR, URR) by the weight a ij corresponding to each pixel value transmitted from the local windowing unit 510. The sum is divided by the sum of the weights to calculate the local mean value Avg Loc (x, y) of the currently windowed image. The calculated local average value is transmitted to the first weight calculator 580 and the first multiplier 600, respectively.

도 7은 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 국부 평균값 검출부(520)를 설명하기 위한 도면이다. 국부 윈도잉부(510)로부터 전송된 각 화소값들은 레지스터부(720)로 입력되고, 논리 연산부(740)는 레지스터부(720)로부터 입력받은 화소값들에 대해, 수학식 1에 따른 논리 연산을 수행하여 국부 평균값 AvgLoc(x,y)를 계산하여 출력한다.FIG. 7 is a diagram for describing a local mean value detector 520 used in a binarization apparatus according to an embodiment of the present invention illustrated in FIG. 5. Each pixel value transmitted from the local windowing unit 510 is input to the register unit 720, and the logic operation unit 740 performs a logical operation according to Equation 1 on the pixel values received from the register unit 720. Calculate and output the local mean value Avg Loc (x, y).

평탄도 계산부(530)는 국부 윈도윙부(510)에서 전송되는 각 주변 화소(UL, U, UR, L, LL, ULL, UUL, UU, UUR, URR)들의 화소 값들을 크기 순으로 재 정렬한 후, 각 인접 화소값들 간의 차이를 평균하여 평탄도 FlatLoc(x,y)를 계산한다. 하지만, 평탄도 계산을 위한 기존의 알고리즘을 이용하여 주변 화소의 평탄도를 계산하는 것도 가능하다. 계산된 평탄도 FlatLoc(x,y)는 제1 가중치 계산부(580) 및 제2 가중치 계산부(590)로 각각 전송된다. 제2 가중치 계산부(590)으로의 평탄도 FlatLoc(x,y) 입력은 선택부(532)에 의해 조절될 수 있다. 예를 들어, 입력 영상의 밝기와 출력 영상의 밝기를 유지하기 위해서는, 선택부(532)의 스위치는 오픈(open) 상태로 유지되고, 입력 영상과 출력 영상의 대비도를 증가 시키기 위해서는, 선택부(532)의 스위치는 클로즈(close) 상태로 유지된다.The flatness calculator 530 rearranges pixel values of the peripheral pixels UL, U, UR, L, LL, ULL, UUL, UU, UUR, and URR transmitted from the local windowing unit 510 in size order. Then, the flatness Loc (x, y) is calculated by averaging the difference between the adjacent pixel values. However, it is also possible to calculate the flatness of the surrounding pixels by using an existing algorithm for calculating the flatness. The calculated flatness flat loc (x, y) is transmitted to the first weight calculator 580 and the second weight calculator 590, respectively. The flatness flat loc (x, y) input to the second weight calculator 590 may be adjusted by the selector 532. For example, in order to maintain the brightness of the input image and the brightness of the output image, the switch of the selection unit 532 remains open, and in order to increase the contrast between the input image and the output image, the selection unit The switch of 532 is kept in a closed state.

도 7은 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 평탄도 계산부(530)를 설명하기 위한 도면이다. 국부 윈도잉부(510)로부터 전송된 각 화소값들은 레지스터부(720)로 입력되고, 논리 연산부(740)는 레지스터부(720)로부터 입력받은 화소값들을 크기 순으로 재 정렬 한후, 각 인접 화소값들 간의 차이를 평균하여 평탄도 FlatLoc(x,y)를 계산하여 출력한다.7 is a view for explaining the flatness calculator 530 used in the binarization apparatus according to an embodiment of the present invention shown in FIG. Each pixel value transmitted from the local windowing unit 510 is input to the register unit 720, and the logical operation unit 740 rearranges the pixel values received from the register unit 720 in the order of size, and then each adjacent pixel value. Calculate and output the flatness Flat Loc (x, y) by averaging the difference between them.

에지 강도 계산부(540)는 국부 윈도윙부(510)에서 전송되는 각 주변 화소(UL, U, UR, L, LL, ULL, UUL, UU, UUR, URR)들의 화소 값들 중 최대 값과 최소값을 구하고, 이들 최대값과 최소값 간의 차이값을 에지 강도 EdgeLoc(x,y)로 결정한다. 하지만, 기존의 평탄도 계산을 위한 알고리즘을 이용하여 주변 화소의 에지 강도를 계산하는 것도 가능하다. 계산된 에지 강도 EdgeLoc(x,y)는 제2 가중치 계산부(590)로 전송된다. 에지 강도 EdgeLoc(x,y)는 현재 화소가 경계 영역 내에 있을 확률과 관련이 있으며, 현재 화소가 그림이나 글자의 경계 영역에 위치할 때, 에지 강도 값은 증가하게 된다.The edge intensity calculator 540 calculates a maximum value and a minimum value among pixel values of the peripheral pixels UL, U, UR, L, LL, ULL, UUL, UU, UUR, and URR transmitted from the local windowing unit 510. The difference between these maximum and minimum values is determined by the edge strength Edge Loc (x, y). However, it is also possible to calculate edge intensities of surrounding pixels using an algorithm for calculating flatness. The calculated edge strength Edge Loc (x, y) is transmitted to the second weight calculator 590. Edge Intensity Edge Loc (x, y) is related to the probability that the current pixel is in the boundary area. When the current pixel is located in the boundary area of the picture or text, the edge intensity value is increased.

도 7은 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 에지 강도 계산부(530)를 설명하기 위한 도면이다. 국부 윈도잉부(510)로부터 전송된 각 화소값들은 레지스터부(720)로 입력되고, 논리 연산부(740)는 레지스터부(720)로부터 입력받은 주변 화소값들 중에서 최대값 및 최소값을 검출하고, 이들 최대값 및 최소값 간의 차이를 에지 강도 EdgeLoc(x,y)로 결정하여 출력한다.7 is a view for explaining the edge strength calculation unit 530 used in the binarization apparatus according to an embodiment of the present invention shown in FIG. Each pixel value transmitted from the local windowing unit 510 is input to the register unit 720, and the logic operation unit 740 detects a maximum value and a minimum value among the peripheral pixel values received from the register unit 720. The difference between the maximum value and the minimum value is determined by the edge strength Edge Loc (x, y) and output.

마스크 임계값 발생부(550)는 현재 처리하고자 하는 화소의 마스크 임계값 M(x, y)을 발생한다. 도 8은 도 5에 도시된 마스크 임계값 발생부(550)의 일 실시예를 도시하는 도면이다.The mask threshold generator 550 generates a mask threshold M (x, y) of the pixel to be currently processed. FIG. 8 is a diagram illustrating an embodiment of the mask threshold generator 550 shown in FIG. 5.

도 8을 참조하면, 마스크 임계값 발생부(550)는 카운터(820), 메모리 어드레스 발생기(840) 및 메모리(860)로 구성된다. 카운터(820)에 구비되는 카운터들(822, 824)는 0∼63까지의 위치를 카운트할 수 있는 7비트 카운터로 구성된다. 따라서 마스크의 사이즈는 64×64 화소이다. 카운터들(822, 824)은 외부로부터 한 화소의 처리 완료, 또는 한 라인 처리 완료 신호가 입력되면, 카운트 값을 증가시킨다. 카운터에서 출력되는 위치 정보는 메모리 어드레스 발생기(memory address generator)(840)로 입력되며, 메모리 어드레스 발생기(840)는 카운터(820)로부터 입력되는 x축 위치 정보와 y축 위치 정보에 대응되는 1 차원 메모리 어드레스와 제어 신호를 발생한다. 제어 신호는 메모리(860)에 대한 읽기 모드를 제어하는 신호이다. 메모리(860)는 2차원 영상의 각 화소에 대응되는 마스크 임계값을 저장하고 있다. 메모리 어드레스 발생기(840)로부터 메모리 어드레스 및 제어 신호가 입력되면, 메모리(860)는 현재 입력되는 화소 I(x,y)에 대한 소정의 마스크 임계값 M(x,y)을 출력한다.Referring to FIG. 8, the mask threshold generator 550 includes a counter 820, a memory address generator 840, and a memory 860. The counters 822 and 824 provided in the counter 820 are constituted by a 7-bit counter capable of counting positions from 0 to 63. Therefore, the size of the mask is 64 x 64 pixels. The counters 822 and 824 increase the count value when a processing completion signal or a line processing completion signal of one pixel is input from the outside. The position information output from the counter is input to a memory address generator 840, and the memory address generator 840 has one dimension corresponding to the x-axis position information and the y-axis position information input from the counter 820. Generates memory addresses and control signals. The control signal is a signal that controls the read mode for the memory 860. The memory 860 stores a mask threshold value corresponding to each pixel of the 2D image. When a memory address and a control signal are input from the memory address generator 840, the memory 860 outputs a predetermined mask threshold value M (x, y) for the pixel I (x, y) currently input.

오프셋 발생부(560)는 해당되는 이진화 장치의 오프셋을 발생한다. 이를 위하여 하나의 레지스터로 구성된다. 상기 레지스터에 발생할 오프셋 값을 저장하고, 한 화소 처리 완료 신호가 입력될 때마다 저장하고 있는 오프셋 신호를 생성하여, 제1 가산부(620)로 출력한다. 통상적으로, 오프셋 값은 최대 입력 레벨의 중간 레벨, 예를 들어 입력 화소값이 8 비트 값, 즉 0 - 255 범위를 갖는 경우, 오프셋 값은 128로 정해진다.The offset generator 560 generates an offset of the corresponding binarization device. It consists of one register for this purpose. An offset value to be generated in the register is stored, and an offset signal stored in each pixel is generated and output to the first adder 620 whenever a pixel processing completion signal is input. Typically, the offset value is set at the intermediate level of the maximum input level, for example, if the input pixel value has an 8 bit value, i.e., a range of 0-255.

감마 오차 보정부(570)는 현재 처리하려는 화소의 밝기 I(x,y)를 입력 받아 입력 장치에 존재하는 입력 레벨과 인간 시각 차이를 보정하기 위한 값을 생성하여 제1 가산부(620)로 출력한다. 도 9는 도 5에 도시된 본 발명의 일 실시예에 따른 감마 오차 보정부(570)를 도시하는 도면이다. 도 9를 참조하면, 어드레스 발생부(920)는 현재 처리되는 화소 I(x,y)를 입력 받아, 입력 화소의 휘도(luminance)에 대응하는 감마 테이블의 어드레스를 생성하여, 이를 감마 테이블 저장부(940)로 입력하고, 감마 테이블 저장부(940)는 입력된 어드레스에 대응하는 감마 오차 보정 값을 논리 연산부(960)로 출력하고, 논리 연산부(960)는 감마 테이블 저장부(940)로부터의 감마 오차 값에 기초하여 감마 오차 보정 값 Foffset을 생성하여 제2 가산부로 출력한다.The gamma error correcting unit 570 receives the brightness I (x, y) of the pixel to be processed and generates a value for correcting an input level and a human visual difference existing in the input device, and generates a value for the first adder 620. Output FIG. 9 is a diagram illustrating a gamma error correcting unit 570 according to an embodiment of the present invention shown in FIG. 5. Referring to FIG. 9, the address generator 920 receives a pixel I (x, y) currently being processed, generates an address of a gamma table corresponding to luminance of an input pixel, and generates a gamma table storage unit. 940, the gamma table storage unit 940 outputs a gamma error correction value corresponding to the input address to the logic operation unit 960, and the logic operation unit 960 outputs the data from the gamma table storage unit 940. A gamma error correction value F offset is generated based on the gamma error value and output to the second adder.

제1 가중치 계산부(580)는 국부 평균값 계산부(520)에서 계산된 국부 평균값 AvgLoc(x,y) 값과, 평탄도 계산부(530)에서 계산된 평탄도 FlatLoc(x,y)를 이용하여, 수학식 2에 기초하여 가중치 FLoc를 계산한다.The first weight calculator 580 calculates the local mean value Avg Loc (x, y) calculated by the local mean calculator 520, and the flatness flat loc (x, y) calculated by the flatness calculator 530. Calculate the weight F Loc based on Equation 2.

여기에서, Function1 및 Function2는 FLoc 값을 구하기 위한 함수이며, 현재 화소 주변의 국부 평균값과 평탄도에 기초하여 국부 평균값에 적용되는 가중치 FLoc 를 결정한다. 본 실시예에서는 Function1은 국부 평균값 AvgLoc(x,y)과 F Loc 값이 비선형적으로 비례하도록 결정되며, Function2는 평탄도 FlatLoc(x,y)와 FLoc 값이 반비례하도록 결정된다.Here, Function 1 and Function 2 are functions for obtaining the F Loc value, and determine the weighted F Loc applied to the local average value based on the local average value and the flatness around the current pixel. In the present embodiment, Function 1 is determined such that the local mean values Avg Loc (x, y) and F Loc are nonlinearly proportional, and Function 2 is determined so that the flatness Flat Loc (x, y) and F Loc are inversely proportional. .

도 10은 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 제1 가중치 계산부(580)를 설명하기 위한 도면이다. 도 10을 참조하면, 국부 평균값 계산부(520)에서 계산된 국부 평균값 AvgLoc(x,y)과, 평탄도 계산부(530)에서 계산된 평탄도 FlatLoc(x,y)는 레지스터부(1020)로 입력되고, 논리 연산부(1060)는 레지스터부(720)로부터 입력받은 국부 평균값 AvgLoc(x,y) 및 평탄도 FlatLoc(x,y)와 파라미터 테이블(1040)에 저장된 파라미터에 기초하여 가중치 FLoc를 계산하여 출력한다.FIG. 10 is a diagram for describing a first weight calculator 580 used in the binarization apparatus of FIG. 5 according to an embodiment of the present invention. Referring to FIG. 10, the local mean value Avg Loc (x, y) calculated by the local mean value calculator 520 and the flatness Flat Loc (x, y) calculated by the flatness calculator 530 may be represented by a register unit ( 1020, and the logic operation unit 1060 is based on the local average values Avg Loc (x, y) and flatness Flat Loc (x, y) received from the register unit 720 and the parameters stored in the parameter table 1040. To calculate and output the weight F Loc .

제2 가중치 계산부(590)는 평탄도 계산부(530)에서 계산된 평탄도 FlatLoc(x,y) 값과, 에지 강도 계산부(540)에서 계산된 평탄도 EdgeLoc(x,y)를 이용하여, 수학식 3에 기초하여 마스크 가중치 FMask를 계산한다.The second weight calculator 590 calculates the flatness Flat Loc (x, y) value calculated by the flatness calculator 530 and the flatness Edge Loc (x, y) calculated by the edge strength calculator 540. Using the equation, the mask weight F Mask is calculated based on the equation (3).

여기에서, Function3 및 Function4는 FMask 값을 구하기 위한 함수이며, 현재 화소 주변의 에지 강도와 평탄도에 기초하여 마스크 임계값에 적용되는 가중치 FMask 를 결정한다. 본 실시예에서는 Function3은 에지 강도 EdgeLoc(x,y)과 F Mask 값이 비선형적으로 비례하도록 결정되며, Function4는 평탄도 FlatLoc(x,y)와 FMask 값이 반비례하도록 결정된다.Here, Functions 3 and 4 are functions for obtaining the F Mask value, and determine the weighted F Mask applied to the mask threshold based on the edge intensity and flatness around the current pixel. In the present embodiment, Function 3 is determined such that the edge intensity Edge Loc (x, y) and the F Mask value are nonlinearly proportional, and Function 4 is determined so that the flatness Flat Loc (x, y) and the F Mask value are inversely proportional. .

도 10은 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 제2 가중치 계산부(590)를 설명하기 위한 도면이다. 도 10을 참조하면, 평탄도 계산부(530)에서 계산된 평탄도 FlatLoc(x,y)과, 에지 강도 계산부(540)에서 계산된 에지 강도 EdgeLoc(x,y)는 레지스터부(1020)로 입력되고, 논리 연산부(1060)는 레지스터부(720)로부터 입력받은 평탄도 FlatLoc(x,y) 및 에지 강도 EdgeLoc(x,y)와 파라미터 테이블(1040)에 저장된 파라미터에 기초하여 마스크 가중치 FMask를 계산하여 출력한다.FIG. 10 is a diagram for describing a second weight calculator 590 used in the binarization apparatus of FIG. 5 according to an embodiment of the present invention. Referring to FIG. 10, the flatness flat loc (x, y) calculated by the flatness calculator 530 and the edge strength edge loc (x, y) calculated by the edge strength calculator 540 are the register units ( 1020, the logic operation unit 1060 is based on the flatness Flat Loc (x, y) and the edge strength Edge Loc (x, y) received from the register unit 720 and the parameters stored in the parameter table 1040. To calculate and output the mask weight F Mask .

도 11은 본 발명의 일 실시예에 따라 FLoc 및 FMask를 구하기 위한 함수들에 사용되는 파라미터 영역을 도시하는 도면이다. 도 11에서 국부 평균값 계산부(520), 평탄도 계산부(530), 및 에지 강도 계산부(540)에서 계산된 값들은 3 차원 영역내의 한 부분이된다. 예를 들어, 도 11에서 A는 배경의 경계가 약한 평탄 영역을 나타내며, B는 어두운 영역의 에지가 강한 영역을 나타내며, C는 어두운 배경 영역의 에지가 없으며, 약간 비평탄한 영역을 나타낸다.FIG. 11 is a diagram illustrating a parameter region used for functions for obtaining F Loc and F Mask according to an embodiment of the present invention. In FIG. 11, the values calculated by the local average calculator 520, the flatness calculator 530, and the edge strength calculator 540 become a part of the three-dimensional region. For example, in FIG. 11, A denotes a flat region having a weak border of the background, B denotes a region where the edge of the dark region is strong, and C denotes a slightly non-flat region without the edge of the dark background region.

제1 승산부(600)는 국부 평균값 계산부(520)에서 계산된 국부 평균값 AvgLoc(x,y)과 제1 가중치 계산부(580)에서 계산된 가중치 FLoc를 승산하여, 그 결과 즉 AvgLoc(x,y)*FLoc를 제2 가산부(630)로 출력한다.The first multiplier 600 multiplies the local average value Avg Loc (x, y) calculated by the local mean value calculator 520 and the weight F Loc calculated by the first weight calculator 580, and thus, Avg. Loc (x, y) * F Loc is output to the second adder 630.

제2 승산부(610)는 마스크 임계값 발생부(550)로부터 입력된 마스크 임계값M(x,y)에 제2 가중치 계산부(590)에서 계산된 가중치 FMask를 승산하여, 그 결과 즉 M(x,y)*FMask를 제2 가산부(630)로 출력한다.The second multiplier 610 multiplies the mask threshold value M (x, y) input from the mask threshold value generator 550 by the weight F Mask calculated by the second weight calculator 590, and as a result, The M (x, y) * F Mask is output to the second adder 630.

도 12은 본 발명의 일 실시예에 따른 이진화 장치를 도시하는 도 5의 제1 승산부(600) 및 제2 승산부(610)에 사용되는 승산 장치를 도시하는 도면이다.FIG. 12 is a diagram illustrating a multiplier used in the first multiplier 600 and the second multiplier 610 of FIG. 5, showing a binarization apparatus according to an embodiment of the present invention.

제1 가산부(620)는 오프셋 발생부(560)로부터 입력된 오프셋 값에 감마 오차 보정부(570)에서 계산된 감마 오차 보정값 FOffset를 가산하여, 그 결과 즉 Offset + Foffset를 제2 가산부(630)로 출력한다.The first adder 620 adds the gamma error correction value F Offset calculated by the gamma error correction unit 570 to the offset value input from the offset generator 560, and thus, as a result, Offset + F offset is added to the second value. Output to the adder 630.

도 13는 본 발명의 일 실시예에 따른 이진화 도시하는 도 5의 제1 가산부(620)에 사용되는 가산 장치를 도시하는 도면이다.FIG. 13 is a diagram showing an adder used in the first adder 620 of FIG. 5 showing the binarization according to an embodiment of the present invention.

제2 가산부(630)는 제1 승산부(600), 제2 승산부(610), 및 제1 가산부(620)로부터의 입력 값에 기초하여 아래 수학식 4에 따라 국부 적응 임계값 ThLOC(x,y)을 계산한다.The second adder 630 is based on the input value from the first multiplier 600, the second multiplier 610, and the first adder 620 according to the equation (4) below the local adaptation threshold Th Compute LOC (x, y).

여기에서, 첫 번째 항은 국부 적응 임계값 ThLoc(x,y)에 대한 국부 평균값의 영향력을 나타내며, 결과적으로 입력 영상에 대해 고역 통과 필터링을 수행한 결과를 나타낸다. 여기에서, FLoc를 1.0으로 고정하면, 현재 처리되는 화소와 평균 필터의 평균값의 대소에 따라서 흑 또는 백의 이진 결과가 결정이 되어지며, 많은 고주파 성분이 표현된다. 만약, FLoc가 0.7이 되는 경우, 수학식 4에 따라서, 국부 적응 임계값은 오프셋에서 국부 평균의 0.7 배의 크기를 가지므로 많은 고주파 성분들이 사라지게 된다. 따라서, FLoc의 크기에 따라서 고역 통과 필터의 크기가 조절될 수 있음을 알 수 있다.Here, the first term represents the influence of the local mean value on the local adaptation threshold Th Loc (x, y), and as a result, the result of performing high pass filtering on the input image. Here, if F Loc is fixed at 1.0, the binary result of black or white is determined according to the magnitude of the average value of the pixel currently processed and the average filter, and many high frequency components are represented. If F Loc becomes 0.7, according to Equation 4, since the local adaptation threshold has a magnitude of 0.7 times the local mean at the offset, many high frequency components disappear. Therefore, it can be seen that the size of the high pass filter can be adjusted according to the size of F Loc .

또한, 두 번째 항은 국부 적응 임계값 ThLoc(x,y)에 마스크 성분을 더하는 역할을 한다. FMask의 값은 오프셋(offset)을 기준으로 임계값에 대한 마스크 성분의 반영 비율이다. 만약, FMask의 값이 커지게 되면 국부 적응 임계치는 마스크 성분의 포함으로 인해 연속 계조에 대한 표현력이 증대되어 진다.The second term also serves to add a mask component to the local adaptation threshold Th Loc (x, y). The value of F Mask is a reflection ratio of a mask component with respect to a threshold value based on an offset. If the value of the F Mask is increased, the local adaptation threshold is increased in expressing the continuous gray level due to the inclusion of a mask component.

또한, 세 번째 항은 국부 적응 임계값 ThLoc(x,y)에 대한 전체적인 오프셋 값을 나타낸다.In addition, the third term represents the overall offset value for the local adaptation threshold Th Loc (x, y).

도 14는 본 발명의 일 실시예에 따른 이진화 장치를 도시하는 도 5의 제2 가산부(630)에 사용되는 가산 장치를 도시하는 도면이다.FIG. 14 is a diagram showing an adder used in the second adder 630 of FIG. 5 showing a binarization device according to one embodiment of the present invention.

비교부(640)는 입력되는 화소 I(x, y)와 국부 적응 임계값 ThLoc(x, y)간의 대소를 비교하여 상기 입력되는 화소 I(x, y)에 대한 이진화소 값(binary pixel value) B(x, y)를 출력한다. 예를 들어 입력되는 화소 I(x, y)가 국부 적응 임계값 ThLoc(x, y)보다 크면, 비교부(640)는 "1"을 이진화소 값으로 출력한다. 한편, 입력되는 화소 I(x, y)가 국부 적응 임계값 ThLoc(x, y) 보다 크지 않으면, 비교부(640)는 "0"을 이진화소 값으로 출력한다.The comparison unit 640 compares the magnitude between the input pixel I (x, y) and the local adaptation threshold Th Loc (x, y) and compares the binary pixel value with respect to the input pixel I (x, y). value) Outputs B (x, y). For example, if the input pixel I (x, y) is larger than the local adaptation threshold Th Loc (x, y), the comparator 640 outputs "1" as a binary pixel value. On the other hand, if the input pixel I (x, y) is not larger than the local adaptation threshold Th Loc (x, y), the comparator 640 outputs "0" as a binary pixel value.

비교 결과에 따라 비교부(640)에서 출력되는 값은 시스템의 설계에 따라 변경될 수 있다. 비교부(640)에서 출력되는 값은 현재 처리하고자 하는 화소 I(x, y)의 2진 화소 값 B(x, y)이다. According to the comparison result, the value output from the comparator 640 may be changed according to the design of the system. The value output from the comparator 640 is a binary pixel value B (x, y) of the pixel I (x, y) currently to be processed.

도 15는 본 발명의 일 실시예에 따른 이진화 장치를 도시하는 도 5의 비교부(640)에 사용되는 장치를 도시하는 도면이다.FIG. 15 is a diagram illustrating an apparatus used in the comparator 640 of FIG. 5 illustrating a binarization apparatus according to an embodiment of the present invention.

본 발명은 상술한 실시예에 한정되지 않으며, 본 발명의 사상내에서 당업자에 의한 변형이 가능함은 물론이다. The present invention is not limited to the above-described embodiment, and of course, modifications may be made by those skilled in the art within the spirit of the present invention.

본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 하드디스크, 플로피디스크, 플래쉬 메모리, 광데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드로서 저장되고 실행될 수 있다.The invention can also be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, hard disk, floppy disk, flash memory, optical data storage device, and also carrier waves (for example, transmission over the Internet). It also includes the implementation in the form of. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

상술한 본 발명에 의하면, 입력되는 연속 계조 영상을 이진화 영상으로 출력하기 위해 입력 영상의 국부 영역 특성, 즉 국부 평균값, 평탄도, 및 에지 강도를 계산하고, 이들 계산된 특성값을 이용하여 국부 적응 임계값을 계산하고, 계산된 국부 적응 임계값을 현재 처리하고자 하는 화소와 비교함으로써, 배경 영역을 적절히 표현하면서도 시각적으로 중요한 경계 성분을 강조하는 것이 가능하며,According to the present invention described above, in order to output the input continuous grayscale image as a binarized image, the local region characteristics, that is, the local mean value, the flatness, and the edge intensity of the input image are calculated, and the localized adaptation is performed using these calculated characteristic values. By calculating the thresholds and comparing the calculated local adaptation thresholds with the pixels currently being processed, it is possible to highlight visually important boundary components while properly representing the background area,

적응적 국부 임계값은 현재 처리되는 화소에 대응하는 마스크 값과 현재 화소 주위값의 분포에 의해서 결정이 되므로, 기존 방식에서 사용하는 마스크의 크기보다 적은 마스크를 사용하더라도, 마스크에 의한 규칙적인 패턴이 줄어들 수 있기 때문에, 하드웨어 구현시 마스크의 임계값을 저장하기 위한 메모리의 크기를 줄일 수 있다는 효과가 있다.Since the adaptive local threshold is determined by the distribution of the mask value corresponding to the pixel currently being processed and the current pixel surrounding value, even if a mask smaller than the size of the mask used in the conventional method is used, the regular pattern by the mask is not applied. Because it can be reduced, the hardware implementation has the effect of reducing the size of the memory for storing the threshold of the mask.

도 1은 기존의 영상 이진화 장치의 블록도 1 is a block diagram of a conventional image binarization apparatus

도 2는 기존의 마스킹 방식을 도시하는 도면2 shows a conventional masking scheme.

도 3은 스토케스틱 마스크를 사용한 출력 영상을 도시하는 도면FIG. 3 is a diagram showing an output image using a stokestick mask

도 4는 8ㅧ8 화소 크기의 베이어 디더 마스크를 도시하는 도면4 shows a Bayer dither mask of 8 by 8 pixel size;

도 5는 본 발명의 일 실시예에 따른 이진화 장치를 도시하는 블록도5 is a block diagram illustrating a binarization apparatus according to an embodiment of the present invention.

도 6(a)는 본 발명의 일 실시예를 설명하기 위한 현재 화소와 주변 영역을 도시하는 도면6 (a) is a diagram showing a current pixel and a peripheral region for explaining an embodiment of the present invention.

도 6(b)는 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 국부 윈도잉부(510)를 도시하는 블록도6 (b) is a block diagram showing a local windowing unit 510 used in the binarization apparatus according to the embodiment of the present invention shown in FIG.

도 7은 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 국부 평균값 검출부(510)를 도시하는 블록도FIG. 7 is a block diagram illustrating a local mean value detector 510 used in a binarization apparatus according to an embodiment of the present invention illustrated in FIG. 5.

도 8은 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 마스크 임계값 발생부(550)를 도시하는 블록도FIG. 8 is a block diagram illustrating a mask threshold generator 550 used in the binarization apparatus according to the embodiment of the present invention shown in FIG. 5.

도 9는 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 감마 오차 보정부(570)를 도시하는 블록도 FIG. 9 is a block diagram illustrating a gamma error correcting unit 570 used in the binarization apparatus of FIG. 5 according to an embodiment of the present invention.

도 10은 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 제1 가중치 계산부(580)를 도시하는 블록도FIG. 10 is a block diagram illustrating a first weight calculator 580 used in the binarization apparatus shown in FIG. 5.

도 11은 본 발명의 일 실시예에 따라 FLoc 및 FMASK를 구하기 위한 함수들에 사용되는 파라미터 영역을 도시하는 도면11 illustrates a parameter region used for functions for obtaining F Loc and F MASK according to an embodiment of the present invention.

도 12는 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 제1 승산부(600) 및 제2 승산부(610)를 도시하는 블록도12 is a block diagram illustrating a first multiplier 600 and a second multiplier 610 used in the binarization apparatus shown in FIG. 5.

도 13은 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 제1 가산부(620)를 도시하는 블록도FIG. 13 is a block diagram illustrating a first adder 620 used in the binarization apparatus according to the embodiment of the present invention shown in FIG. 5.

도 14는 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 제2 가산부(630)를 도시하는 블록도FIG. 14 is a block diagram illustrating a second adder 630 used in the binarization apparatus according to the embodiment of the present invention shown in FIG. 5.

도 15는 도 5에 도시된 본 발명의 일 실시예에 따른 이진화 장치에 사용되는 비교부(640)를 도시하는 블록도 FIG. 15 is a block diagram illustrating a comparator 640 used in a binarization apparatus according to an embodiment of the present invention illustrated in FIG. 5.

Claims (5)

입력 영상을 이진화 영상으로 출력하는 이진화 방법에 있어서,In the binarization method for outputting an input image as a binarized image, 상기 입력 영상 중 현재 처리하고자 하는 화소 주변 영역의 특성을 고려한 적응적 국부 임계값을 계산하는 단계와;Calculating an adaptive local threshold value in consideration of the characteristics of the pixel peripheral area to be processed in the input image; 상기 계산된 적응적 국부 임계값과 상기 현재 처리하고자 하는 화소의 값을 비교하여 상기 현재 처리하고자 하는 화소에 대응되는 이진 화소 값을 출력하는 단계를 포함하는 방법. And comparing the calculated adaptive local threshold with a value of the pixel to be currently processed to output a binary pixel value corresponding to the pixel to be currently processed. 제1항에 있어서, The method of claim 1, 상기 적응적 국부 임계값 계산 단계는, The adaptive local threshold calculation step is 상기 현재 처리하고자 하는 화소의 주변 화소값들의 화소 평균값을 나타내는 국부 평균값을 계산하는 단계와;Calculating a local mean value representing a pixel mean value of peripheral pixel values of the pixel to be currently processed; 상기 현재 처리하고자 하는 화소의 주변 화소값들에 기초하여 주변 화소의 평탄도를 계산하는 단계와;Calculating flatness of the peripheral pixel based on the peripheral pixel values of the pixel to be currently processed; 상기 계산된 국부 평균값 및 평탄도에 기초하여 상기 계산된 국부 평균값을 변형하는 단계와;Modifying the calculated local mean value based on the calculated local mean value and flatness; 상기 변형된 국부 평균값을 이용하여 적응적 국부 임계값을 계산하는 단계를 더 포함하는 것을 특징으로 하는 방법.Calculating an adaptive local threshold value using the modified local mean value. 제2항에 있어서, The method of claim 2, 상기 적응적 국부 임계값 계산 단계는, The adaptive local threshold calculation step is 상기 현재 처리하고자 하는 화소의 주변 화소값들에 기초하여 주변 화소의 에지 강도를 계산하는 단계와;Calculating edge intensities of peripheral pixels based on the peripheral pixel values of the pixel to be currently processed; 상기 현재 처리하고자 하는 화소에 대응하는 마스크 임계값을 생성하는 단계와;Generating a mask threshold value corresponding to the pixel to be currently processed; 상기 계산된 에지 강도에 기초하여 상기 생성된 마스크 임계값을 변형하는 단계를 더 포함하며,Modifying the generated mask threshold based on the calculated edge intensity, 상기 적응적 국부 임계값 계산 단계는 상기 변형된 마스크 임계값을 이용하는 것을 특징으로 하는 방법.And wherein said adaptive local threshold calculation step uses said modified mask threshold. 제2항에 있어서, The method of claim 2, 상기 적응적 국부 임계값 계산 단계는, The adaptive local threshold calculation step is 상기 현재 처리하고자 하는 화소의 주변 화소값들에 기초하여 주변 화소의 에지 강도를 계산하는 단계와;Calculating edge intensities of peripheral pixels based on the peripheral pixel values of the pixel to be currently processed; 상기 현재 처리하고자 하는 화소에 대응하는 마스크 임계값을 생성하는 단계와;Generating a mask threshold value corresponding to the pixel to be currently processed; 상기 계산된 에지 강도 및 상기 계산된 평탄도에 기초하여 상기 생성된 마스크 임계값을 변형하는 단계를 더 포함하며,Modifying the generated mask threshold based on the calculated edge intensity and the calculated flatness, 상기 적응적 국부 임계값 계산 단계는 상기 변형된 마스크 임계값을 이용하는 것을 특징으로 하는 방법.And wherein said adaptive local threshold calculation step uses said modified mask threshold. 제3항 또는 제4항에 있어서, The method according to claim 3 or 4, 상기 적응적 국부 임계값 계산 단계는 The adaptive local threshold calculation step 상기 국부 평균값 및 평탄도에 기초하여 국부 평균값에 대한 가중치를 계산하는 단계와,Calculating a weight for a local mean value based on the local mean value and flatness; 상기 평탄도 및 에지 강도 중 적어도 하나를 이용하여 마스크 임계값에 대한 가중치를 계산하는 단계를 더 포함하며,Calculating a weight for a mask threshold using at least one of the flatness and the edge strength; 상기 적응적 국부 임계값은 하기 식을 이용하여 계산되며,The adaptive local threshold is calculated using the equation 여기에서, AvgLoc(x, y)는 상기 국부 평균값, FLoc는 상기 국부 평균값에 대한 가중치, M(x, y)는 상기 마스크 임계값, FMask는 상기 마스크 임계값에 대한 가중치, 이고, Offset은 상기 입력 영상의 오프셋, FOffset은 상기 오프셋의 감마 보정을 위한 가중치인 것을 특징으로 하는 영상의 이진화 방법.Here, Avg Loc (x, y) is the local mean value, F Loc is the weight value for the local mean value, M (x, y) is the mask threshold value, F Mask is the weight value for the mask threshold value, Offset is an offset of the input image, F Offset is a weighting method for gamma correction of the offset, characterized in that the image.
KR1020040009832A 2004-02-14 2004-02-14 Image binary-coding method based on local characteristics KR20050081532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020040009832A KR20050081532A (en) 2004-02-14 2004-02-14 Image binary-coding method based on local characteristics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020040009832A KR20050081532A (en) 2004-02-14 2004-02-14 Image binary-coding method based on local characteristics

Publications (1)

Publication Number Publication Date
KR20050081532A true KR20050081532A (en) 2005-08-19

Family

ID=37268124

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020040009832A KR20050081532A (en) 2004-02-14 2004-02-14 Image binary-coding method based on local characteristics

Country Status (1)

Country Link
KR (1) KR20050081532A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007100518A1 (en) * 2006-02-27 2007-09-07 Microsoft Corporation Dynamic thresholds for conditional formats
KR100811775B1 (en) * 2006-08-28 2008-03-10 계명대학교 산학협력단 System and method of processing bio-image
KR101024818B1 (en) * 2009-07-28 2011-03-24 포항공과대학교 산학협력단 Image processing apparatus using error diffusion method
US8286072B2 (en) 2005-10-27 2012-10-09 Microsoft Corporation Variable formatting of cells
US8601383B2 (en) 2005-09-09 2013-12-03 Microsoft Corporation User interface for creating a spreadsheet data summary table
US9223772B2 (en) 2005-09-09 2015-12-29 Microsoft Technology Licensing, Llc Filtering user interface for a data summary table

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8601383B2 (en) 2005-09-09 2013-12-03 Microsoft Corporation User interface for creating a spreadsheet data summary table
US9223772B2 (en) 2005-09-09 2015-12-29 Microsoft Technology Licensing, Llc Filtering user interface for a data summary table
US9529789B2 (en) 2005-09-09 2016-12-27 Microsoft Technology Licensing, Llc User interface for creating a spreadsheet data summary table
US9959267B2 (en) 2005-09-09 2018-05-01 Microsoft Technology Licensing, Llc Filtering user interface for a data summary table
US10579723B2 (en) 2005-09-09 2020-03-03 Microsoft Technology Licensing, Llc User interface for creating a spreadsheet data summary table
US8286072B2 (en) 2005-10-27 2012-10-09 Microsoft Corporation Variable formatting of cells
US9424235B2 (en) 2005-10-27 2016-08-23 Microsoft Technology Licensing, Llc Variable formatting of values
US11295058B2 (en) 2005-10-27 2022-04-05 Microsoft Technology Licensing, Llc Variable formatting of values
WO2007100518A1 (en) * 2006-02-27 2007-09-07 Microsoft Corporation Dynamic thresholds for conditional formats
KR101312755B1 (en) * 2006-02-27 2013-09-27 마이크로소프트 코포레이션 Dynamic thresholds for conditional formats
KR100811775B1 (en) * 2006-08-28 2008-03-10 계명대학교 산학협력단 System and method of processing bio-image
KR101024818B1 (en) * 2009-07-28 2011-03-24 포항공과대학교 산학협력단 Image processing apparatus using error diffusion method

Similar Documents

Publication Publication Date Title
US6671068B1 (en) Adaptive error diffusion with improved edge and sharpness perception
JP4902837B2 (en) How to convert to monochrome image
JP4664390B2 (en) Rendered images using adaptive error diffusion
JP2871127B2 (en) Image processing apparatus and method
EP2339823B1 (en) Image processing apparatus and image processing method
JP4243854B2 (en) Image processing apparatus, image processing method, image processing program, and storage medium
JP2000050109A (en) Nonlinear image filter for removing noise
US7031543B2 (en) Grayscale image de-speckle algorithm
US8619330B2 (en) Image processing apparatus and image processing method
JPH11164146A (en) System and method for image data processing
JP2019220860A (en) Image processing device, control method of the same, and program
US7889394B2 (en) Image processing apparatus and method
KR100484141B1 (en) Image binary-coded apparatus and method thereof
JP6976824B2 (en) Image processing equipment, image processing methods, and programs
KR20050081532A (en) Image binary-coding method based on local characteristics
CA2347205C (en) Correlated secondary trc calibration method
KR100438720B1 (en) Method and apparatus for converting brightness level of image
US8422080B2 (en) Image processing apparatus and image processing method in which composite tone pixel data is provided based on tone pixel data generated by error diffusion processing and dither processing
JP2002064706A (en) Image processing unit and image processing method
JP2006245938A (en) Image processing apparatus
KR100248227B1 (en) Apparatus and method for local adaptive image binarization
KR20160103213A (en) High Speed Image Processing Method Using Retinex
JP3288748B2 (en) Image processing method
JP2024015724A (en) Image processing device and program
JP2024019939A (en) Program, image processing device, and image processing method

Legal Events

Date Code Title Description
WITN Application deemed withdrawn, e.g. because no request for examination was filed or no examination fee was paid