KR101451134B1 - Method for anti aliasing of font - Google Patents

Method for anti aliasing of font Download PDF

Info

Publication number
KR101451134B1
KR101451134B1 KR1020100013512A KR20100013512A KR101451134B1 KR 101451134 B1 KR101451134 B1 KR 101451134B1 KR 1020100013512 A KR1020100013512 A KR 1020100013512A KR 20100013512 A KR20100013512 A KR 20100013512A KR 101451134 B1 KR101451134 B1 KR 101451134B1
Authority
KR
South Korea
Prior art keywords
array
pixel
font
value
intermediate value
Prior art date
Application number
KR1020100013512A
Other languages
Korean (ko)
Other versions
KR20110093457A (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 KR1020100013512A priority Critical patent/KR101451134B1/en
Publication of KR20110093457A publication Critical patent/KR20110093457A/en
Application granted granted Critical
Publication of KR101451134B1 publication Critical patent/KR101451134B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/12Indexing scheme for image data processing or generation, in general involving antialiasing

Abstract

본 발명은 안티 알리아싱을 통하여 폰트를 보다 부드럽고 명확하게 처리하여 폰트 디스플레이 시에 가독성을 높일 수 있는 폰트 안티 알리아싱 방법에 관한 것이다. 폰트 안티 알리아싱 방법은 (a) 프레임 버퍼에 폰트를 위한 첫 번째 배열 및 두 번째 배열을 할당하는 단계; (b) 임의의 폰트를 상기 첫 번째 배열에 복사하는 단계; (c)상기 첫 번째 배열의 픽셀값을 스캐닝하여 두 번째 배열의 픽셀값을 세팅하는 단계; 및 (d) 상기 스캐닝 및 세팅을 통해 첫 번째 배열에서 0이 아닌 픽셀의 중간값을 산출하는 단계를 포함한다.The present invention relates to a font anti-aliasing method capable of enhancing readability in font display by processing fonts more smoothly and clearly through anti-aliasing. A method for antialiasing a font comprises the steps of: (a) assigning a first array and a second array for a font to a frame buffer; (b) copying an arbitrary font into the first array; (c) scanning a pixel value of the first array to set a pixel value of the second array; And (d) calculating an intermediate value of non-zero pixels in the first array through the scanning and setting.

Description

폰트 안티 알리아싱 방법{Method for anti aliasing of font}Method for anti aliasing of font "

본 발명은 영상 처리 방법으로써 보다 상세하게는 폰트 안티 알리아싱 방법에 관한 것이다.The present invention relates to an image processing method, and more particularly, to a font anti-aliasing method.

거의 모든 전자제품에는 그 제품의 기능과 특성을 사용자에게 알리거나 이용하게 하기 위해 UI or GUI(그림과 폰트)를 화면에 그린다. Windows XP 운영체제에서처럼 벡터 방식으로 폰트를 그린다면 이는 각 폰트의 위치 정보나 기타 폰트의 정보를 가지고 해당 폰트를 그릴 때 계산하여 그리게 된다. 하지만 대부분의 시스템에서 폰트는 비트맵(bitmap) 이미지나 특정 포맷의 이미지로 구성되는 경우가 많다.Almost every electronic product draws a UI or GUI (picture and font) on the screen to let the user know or use the functions and characteristics of the product. If you draw a vector in vector format as in Windows XP operating system, it will be calculated and drawn when you draw the corresponding font with information about the position of each font or other font information. In most systems, however, fonts often consist of bitmap images or images in a particular format.

이러한 GUI는 그래픽 칩셋(정확히는 그래픽 프레임 버퍼)의 여러 레이어(layer) 중에 하나에 그려지게 된다. 다른 레이어에는 비디오 영상이 들어갈 수 있고 GUI 레이어와 비디오 레이어가 오버레이 되어 디스플레이 되기도 하고 단 하나의 레이어에 GUI와 비디오 영상이 오버레이 되어 한꺼번에 디스플레이 되기도 한다. 이 디스플레이는 모니터(LCD나 CRT)와 연결되어 프레임 버퍼에 있는 특정 온 스크린(on screen) 영역이 모니터와 매핑되어 보이는 것을 말하는데 각각의 그래픽 칩셋은 지원하는 해상도가 틀려서 모니터에 디스플레이 되는 크기는 제품마다 다르게 된다.These GUIs are drawn on one of the many layers of the graphics chipset (and more precisely the graphics frame buffer). Other layers may contain video images, GUI layers and video layers may be overlaid, and GUI and video images may be overlaid on a single layer and displayed at once. This display refers to the specific on screen area in the frame buffer that is connected to the monitor (LCD or CRT) and is mapped to the monitor. The resolution supported by each graphics chipset is different, Different.

즉, 해상도라 불리는 이 크기는 그래픽 칩셋에서 VGA급 사이즈(640 X 480)를 지원한다면 사람의 눈에는 모니터의 화면에 640 X 480개의 픽셀이 보이게 되는 것이고, 1080i 사이즈(full HD)를 지원한다면 모니터의 화면에 1920 X 1080개의 픽셀이 보이게 된다. In other words, this size, called resolution, means that if the graphics chipset supports VGA size (640 X 480), 640 X 480 pixels will be visible on the monitor screen of the human eye and 1080i full HD 1920 x 1080 pixels are displayed on the screen of the display unit.

위 해상도 차이에서 똑 같은 글자 '가'를 그린다고 가정하면 VGA급에서는 계단 현상이 더 뚜렷하게 보일 것이다. 그 이유는 고정된 모니터 사이즈에 하나의 픽셀이 1080i 사이즈보다 VGA 사이즈가 크게 보이게 되므로 계단 모양 또한 크게 보이는 것이다. 해상도가 낮은 시스템에서와 해상도 높은 시스템에서 하나의 글자를 볼 때 사람의 눈에는 해상도가 높아지면 높아질수록 하나의 픽셀은 작아지고 주변 픽셀과의 상관관계도 적어진다. 반대로 해상도가 낮아진다면 하나의 픽셀은 커지고 주변 픽셀과의 상관관계도 높아지게 된다. Assuming that the same letter 'a' is drawn in the above resolution difference, the staircase phenomenon will become more apparent in the VGA class. The reason for this is that the size of the VGA is bigger than that of the 1080i one pixel in a fixed monitor size. When a character is viewed on a system with a low resolution and on a system with a high resolution, the higher the resolution of the human eye, the smaller the pixel and the less the correlation with the surrounding pixels. Conversely, if the resolution is lowered, one pixel becomes larger and the correlation with surrounding pixels becomes higher.

위와 같이 어떤 특정 레이어에 폰트를 그릴 때 안티 알리아싱 적용을 실시간으로 처리하여 그려주는 방법도 있고 또는 모든 폰트의 이미지를 플래시에 이미 담아 놓고 필요할 때마다 호출하여 그려주는 방법이 있다. 비 휘발성 메모리(플래시 등)가 충분한 시스템의 경우는 이미지를 실시간으로 처리하여 그리는 것보다는 미리 폰트의 이미지를 플래시 등에 담아 간단히 호출하여 그려주는 것이 더욱더 속도개선에 빠를 것이다. There is a way to process anti-aliasing application in real time when drawing a font on a specific layer as above, or there is a method of drawing an image of all fonts in flash and calling it whenever necessary. In case of a system with sufficient nonvolatile memory (flash, etc.), it will be faster to improve the speed by simply calling the image of the font in a flash and drawing it beforehand rather than processing the image in real time.

종래에는 폰트를 그리는데 있어 단순히 폰트의 외각에 보색이 되는 까만색이나 하얀색을 덮어씌우는 수준으로 구현된 것도 있고 시스템의 성능에 상관없이 알파값 등의 표현으로 주변 픽셀들의 값을 조정하려고 하였다. 하지만 다양한 성능의 시스템이 존재 하기에 한 픽셀에 여러 가지의 값을 표현 할 수 없을 수도 있고 한 픽셀을 나타내는데 있어 포맷(YUV, RGB등) 또한 다양하다. Conventionally, in order to draw a font, it is simply implemented to cover a black or white color which becomes a complementary color to the outer circumference of a font, and an attempt has been made to adjust the values of surrounding pixels by expressing an alpha value or the like regardless of the performance of the system. However, since there are various performance systems, it is not possible to represent various values in one pixel, and formats (YUV, RGB, etc.) for displaying one pixel also vary.

종래에는 레벨로 표현하여 안티 알리아싱의 값들을 처리하였으나 폰트의 특성을 무시하여 가독성을 높이려는 노력이 부족했다. 즉, 완벽하게 안티 알리아싱을 구현하여 글자를 보다 부드럽게 하려고 배경색과의 그레이 스케일을 보다 다변화 하여 표현할 수 밖에 없는데 이는 오히려 가독성을 해치는 효과를 가져오기도 한다. Conventionally, anti-aliasing values have been processed by expressing the level, but there has been a lack of efforts to improve readability by ignoring the characteristics of fonts. In other words, to implement smoother antialiasing to make text smoother, we have to express the gray scale of the background with more diversification, which may lead to deterioration of readability.

또한 폰트 들의 특성이 각각 존재하게 되는데 이 특성들을 신경 쓰지 않고 오직 하나의 글자에 대해서만 안티 알리아싱을 구성하려고 하였다. 가령 폰트는 가변폰트, 고정폰트 등이 있고 배경색과의 상관관계에 대한 고려 등이 부족하였다.In addition, the characteristics of the fonts exist, respectively. However, they did not care about these characteristics and tried to construct anti-aliasing for only one character. For example, fonts have variable fonts, fixed fonts, and lack of consideration of correlation with the background color.

본 발명이 해결하고자 하는 기술적인 과제는 안티 알리아싱을 통하여 폰트를 보다 부드럽고 명확하게 처리하여 폰트 디스플레이 시에 가독성을 높일 수 있는 폰트 알리아싱 방법을 제공하는데 있다.SUMMARY OF THE INVENTION It is an object of the present invention to provide a font aliasing method capable of enhancing readability in font display by processing fonts more smoothly and clearly through antialiasing.

본 발명이 이루고자 하는 기술적인 과제를 해결하기 위한 폰트 알리아싱 방법은 (a) 프레임 버퍼에 폰트를 위한 첫 번째 배열 및 두 번째 배열을 할당하는 단계; (b) 임의의 폰트를 상기 첫 번째 배열에 복사하는 단계; (c)상기 첫 번째 배열의 픽셀값을 스캐닝하여 두 번째 배열의 픽셀값을 세팅하는 단계; 및 (d) 상기 스캐닝 및 세팅을 통해 첫 번째 배열에서 0이 아닌 픽셀의 중간값을 산출하는 단계를 포함하는 것이 바람직하다.According to an aspect of the present invention, there is provided a font aliasing method including: (a) assigning a first array and a second array for a font to a frame buffer; (b) copying an arbitrary font into the first array; (c) scanning a pixel value of the first array to set a pixel value of the second array; And (d) calculating an intermediate value of non-zero pixels in the first array through the scanning and setting.

본 발명에 있어서, (e) 상기 중간값이 산출된 첫 번째 배열 영역에 상기 폰트의 기본값을 결합하는 단계를 더 포함할 수 있다.In the present invention, (e) combining the default value of the font with the first arrangement area in which the intermediate value is calculated may be further included.

본 발명에 있어서, 상기 (c) 및 (d) 단계는 사용자가 설정한 횟수만큼 반복될 수 있다.In the present invention, steps (c) and (d) may be repeated a number of times set by the user.

본 발명에 있어서, 상기 (d)단계는 (d-1) 상기 두 번째 배열에서 그 값이 0인 픽셀과 동일한 위치를 갖는 첫 번째 배열의 픽셀을 검색하는 단계; (d-2) 상기 검색된 첫 번째 배열의 픽셀을 기준 픽셀로 하여 주변 픽셀 영역을 설정하는 단계; (d-3) 상기 주변 픽셀 영역과 동일한 위치를 갖는 두 번째 배열에서 그 값이 0인 픽셀을 검색하는 단계; 및 (d-4) 상기 검색된 픽셀과 기준 픽셀을 더한 후 임의의 변수로 나누어 중간값을 계산하여 상기 검색된 픽셀에 기록하는 단계를 포함할 수 있다.According to an embodiment of the present invention, the step (d) includes the steps of: (d-1) searching pixels of a first array having the same position as a pixel having a value of 0 in the second array; (d-2) setting a peripheral pixel area with the searched first array pixel as a reference pixel; (d-3) searching for a pixel whose value is 0 in a second array having the same position as the peripheral pixel area; And (d-4) adding the searched pixel and the reference pixel, dividing the searched pixel by an arbitrary variable, calculating an intermediate value, and writing the intermediate value to the searched pixel.

본 발명에 있어서, 연속적이지 않은 폰트의 구성일 경우, 상기 변수 보다 더 낮은 변수를 이용하여 중간값을 계산할 수 있다.In the present invention, in the case of a configuration of a non-continuous font, the intermediate value can be calculated using a variable lower than the above-mentioned variable.

상술한 바와 같이 본 발명에 따르면, 통하여 폰트를 보다 부드럽고 명확하게 처리하여 폰트 디스플레이 시에 가독성을 높일 수 있다.As described above, according to the present invention, fonts can be processed more smoothly and clearly, thereby improving readability in font display.

도 1은 폰트 알리아싱 방법을 수행하는 장치의 구성을 보이는 블록도 이다.
도 2는 본 발명에 따른 폰트 알리아싱 방법의 동작을 보이는 흐름도 이다.
도 3은 도 2 중 중간값 계산 방법의 상세 흐름도 이다.
도 4는 도 2 중 프레임 버퍼에 할당된 폰트 영역을 보이는 도면이다.
도 5는 도 2 중 임의의 문자에 설정된 픽셀값을 보이는 도면이다.
도 6 및 도 7은 도 2 중 중간값 계산을 설명하는 도면이다.
1 is a block diagram showing a configuration of an apparatus for performing a font aliasing method.
FIG. 2 is a flowchart illustrating an operation of the font aliasing method according to the present invention.
3 is a detailed flowchart of the intermediate value calculation method in FIG.
FIG. 4 is a view showing a font area allocated to a frame buffer in FIG. 2. FIG.
FIG. 5 is a diagram showing pixel values set for a certain character in FIG.
Figs. 6 and 7 are diagrams for explaining the intermediate value calculation in Fig. 2. Fig.

이하 첨부된 도면을 참조하여 본 발명의 실시 예들을 설명한다. 하기의 설명에서는 본 발명에 따른 동작을 이해하는데 필요한 부분만이 설명되며 그 이외 부분의 설명은 본 발명의 요지를 흩트리지 않도록 생략될 수 있다.Embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, only parts necessary for understanding the operation according to the present invention will be described, and descriptions of other parts may be omitted so as not to disturb the gist of the present invention.

또한, 이하에서 설명되는 본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니 되며, 본 발명을 가잔 적절하게 표현할 수 있도록 본 발명의 기술적 사상에 부합하는 의미와 개면으로 해석되어야 한다.In addition, terms and words used in the present specification and claims should not be construed to be limited to ordinary or dictionary meanings, and the present invention should not be construed as a meaning corresponding to the technical idea of the present invention And should be interpreted as open.

도 1은 폰트 알리아싱 방법을 수행하는 장치의 구성을 보이는 블록도로서, 이미지 프로세서 엔진(110), UI(user interface) 프로세서 엔진(120), 오버레이 엔진(130), 프레임 버퍼(140), 디스플레이부(150) 및 CPU(160)를 포함한다.1 is a block diagram illustrating a configuration of an apparatus for performing a font aliasing method. The image processor engine 110, a user interface (UI) processor engine 120, an overlay engine 130, a frame buffer 140, (150) and a CPU (160).

이미지 프로세서 엔진(110)은 외부로부터 입력되는 영상을 가공 처리한다.The image processor engine 110 processes an image input from the outside.

UI 프로세서 엔진(120)은 프레임 버퍼(140)로부터 그래픽 및 폰트를 수신하여 가공 처리한다. 폰트 디스플레이 시에 가독성을 높이기 위한 안티 알리아싱 알고리즘은 UI 프로세서 엔진(120)에서 수행될 수 있으며, 이하 상세한 내용은 도 2 내지 도 7을 참조하여 하기에 설명하기로 한다.The UI processor engine 120 receives graphics and fonts from the frame buffer 140 and processes them. An anti-aliasing algorithm for increasing readability at the time of font display can be performed in the UI processor engine 120, and the details thereof will be described below with reference to FIG. 2 to FIG.

오버레이 엔진(130)은 이미지 프로세서 엔진(110) 및 UI 프로세서 엔진(120)에서 출력되는 정보를 레이어 단계별로 가공 처리한다.The overlay engine 130 processes information output from the image processor engine 110 and the UI processor engine 120 in accordance with a layer step.

프레임 버퍼(140)는 영상, 그래픽 및 폰트를 저장했다가, CPU(160)의 출력 명령에 의해 해당 정보를 디스플레이부(150)로 출력한다.The frame buffer 140 stores images, graphics, and fonts, and outputs the information to the display unit 150 according to an output command of the CPU 160.

도 2는 본 발명에 따른 폰트 알리아싱 방법의 동작을 보이는 흐름도 이다. 폰트 안티 알리아싱 방법은 도 1에 도시된 바와 같이 주변 기기들의 도움을 받아 UI 프로세서 엔진(120)에서 수행될 수 있다.FIG. 2 is a flowchart illustrating an operation of the font aliasing method according to the present invention. The font anti-aliasing method may be performed in the UI processor engine 120 with the help of peripheral devices as shown in FIG.

UI 프로세서 엔진(120)은 프레임 버퍼(140)에 폰트를 위한 공간을 할당한다(S210). UI 프로세서 엔진(120)은 프레임 버퍼(140)에 예를 들어, font_value_array[28*24][1]과 같은 폰트를 위한 공간을 할당한다. 여기서 [28*24]은 첫 번째 배열로써 전체 픽셀 수를 나타내는데, 안티 알리아싱 처리가 안된 기본 폰트값과 폰트의 내/외부에 배경색 값이 들어 있다. 그리고 [1]은 두 번째 배열로써 중간값 계산을 위한 레벨을 나타낸다. 첫 번째 배열 및 두 번째 배열 내의 모든 픽셀 값들은 스캐닝과 중간값 구하기 과정을 통해서 안티 알리아싱 처리가 된다.The UI processor engine 120 allocates a space for a font to the frame buffer 140 (S210). The UI processor engine 120 allocates space for a font such as font_value_array [28 * 24] [1] to the frame buffer 140, for example. Here, [28 * 24] represents the total number of pixels as the first array, which contains the default font values that are not anti-aliased and the background color values inside / outside the font. And [1] represents the level for intermediate value calculation as the second array. All pixel values in the first array and the second array are anti-aliased through scanning and intermediate values.

프레임 버퍼(140)에 폰트를 위한 공간 할당이 완료되면, UI 프로세서 엔진(120)는 폰트를 프레임 버퍼(140)에 복사한다(S220). 도 4a는 폰트 '가'를 프레임 버퍼(140)의 첫 번째 배열에 할당한 예가 도시되어 있으며, 이때 도 4b에 도시된 바와 같이 프레임 버퍼(140)의 두 번째 배열에는 아직 가비지(garbage) 값이 설정되어 있다.When the space allocation for the font is completed in the frame buffer 140, the UI processor engine 120 copies the font to the frame buffer 140 (S220). 4A shows an example of assigning a font 'a' to the first array of the frame buffer 140. At this time, as shown in FIG. 4B, a garbage value is still allocated to the second array of the frame buffer 140 Is set.

폰트가 프레임 버퍼(140)로 복사가 완료되면, UI 프로세서 엔진(120)는 프레임 버퍼(140)를 스캐닝 한다(S230).When the font is copied to the frame buffer 140, the UI processor engine 120 scans the frame buffer 140 (S230).

안티 알리아싱 알고리즘의 이해도를 높이기 위하여 한 픽셀의 색상값을 0-16 단계로 제한하기로 한다. 대부분의 시스템에서는 보통 폰트를 화이트 & 블랙으로 표현하고, 폰트에 색상 처리를 할 경우에는 기본 폰트 부분에만 색상 처리를 하기 때문에 True color까지 표현할 이유가 없는 게 사실이다. 본 실시 예에서는 한 픽셀이 표현할 수 있는 색상값을 흰색부터 검정색의 16 단계로 나타내어 기술한다. 이 색상값을 32 또는 64로 하여도 마찬가지로 안티 알리아싱을 적용시킬 수 있다. 그리고 만약 한 픽셀을 구성하는 색상값이 32 비트(true color)라고 한다면, RGB 값을 YUV 값으로 바꾸어 Y 값에 대해서도 안티 알리아싱을 적용할 수 있도록 한다.To improve the understanding of the anti-aliasing algorithm, the color value of one pixel is limited to 0-16 levels. In most systems, fonts are usually expressed in white & black, and in the case of color processing in fonts, there is no reason to represent true color because only the basic font portion is subjected to color processing. In this embodiment, the color values that one pixel can express are represented by 16 levels of white to black. Anti-aliasing can be similarly applied even if the color value is set to 32 or 64. If the color value of a pixel is 32 bits (true color), the RGB value is replaced with the YUV value so that anti-aliasing can be applied to the Y value.

도 5a는 프레임 버퍼(140)의 첫 번째 배열의 픽셀 색상값을 0-16 단계로 표현한 예가 도시되어 있다. UI 프로세서 엔진(120)은 스캐닝을 통하여 프레임 버퍼(140)의 첫 번째 배열에서 픽셀값이 배경색이 아닌 픽셀(16의 값)을 찾아 그 와 동일한 위치를 갖는 두 번째 배열의 픽셀에 1을 설정하고, 나머지 픽셀에는 0을 설정한다. 도 5b에는 UI 프로세서 엔진(120)이 스캐닝을 통하여 두 번째 픽셀에 값을 할당한 예가 도시되어 있다.FIG. 5A shows an example in which the pixel color value of the first array of the frame buffer 140 is expressed in 0-16 steps. The UI processor engine 120 finds a pixel (value of 16) whose pixel value is not the background color in the first array of the frame buffer 140 through scanning and sets 1 to the pixel of the second array having the same position , And 0 for the remaining pixels. 5B shows an example in which the UI processor engine 120 assigns a value to a second pixel through scanning.

프레임 버퍼(140)의 스캐닝이 완료되면, UI 프로세서 엔진(120)은 중간값을 산출한다(S240). 중간값을 산출하는 과정이 도 3에 개시되어 있다. 이하 중간값 산출과정을 도 3을 참조하여 설명하기로 한다.When the scanning of the frame buffer 140 is completed, the UI processor engine 120 calculates an intermediate value (S240). The process of calculating the median value is shown in Fig. Hereinafter, the intermediate value calculation process will be described with reference to FIG.

중간값 산출을 위해, UI 프로세서 엔진(120)은 프레임 버퍼(140)의 두 번째 배열에서 그 값이 1인 픽셀과 동일한 위치를 갖는 첫 번째 배열의 픽셀을 검색한다(S241).For intermediate value calculation, the UI processor engine 120 retrieves the pixels of the first array having the same position as the pixel whose value is 1 in the second array of the frame buffer 140 (S241).

이어서, UI 프로세서 엔진(120)은 첫 번째 배열에서 검색된 픽셀을 기준 픽셀로 하는 주변 8개의 픽셀 영역을 설정한다(S242).Next, the UI processor engine 120 sets eight surrounding pixel areas having the reference pixels as the pixels retrieved from the first array (S242).

UI 프로세서 엔진(120)은 첫 번째 배열의 주변 8개의 픽셀 영역과 동일한 위치를 갖는 두 번째 배열에서 그 값이 0인 픽셀(중간값 연산 대상)을 검색한다(S243).The UI processor engine 120 searches for a pixel (intermediate value calculation object) whose value is 0 in a second array having the same position as the surrounding eight pixel regions of the first array (S243).

UI 프로세서 엔진(120)은 검색된 중간값 연산 대상과 기준 픽셀을 각각 더한 후 변수로 나눈 중간값을 계산한다(S244).The UI processor engine 120 calculates an intermediate value obtained by adding the searched intermediate value calculation object and the reference pixel to each other and dividing by the variable (S244).

이후 UI 프로세서 엔진(120)은 계산된 중간값을 첫 번째 배열의 해당 픽셀에 기록한다(S245).Thereafter, the UI processor engine 120 records the calculated intermediate value in the corresponding pixel of the first array (S245).

도 6a 내지 도 6f 및 도 7a 내지 도 7f에는 중간값 계산을 설명하는 도면이 개시되어 있다. 도 6a 및 도 7a와 같은 임의의 첫 번째 배열에서, UI 프로세서 엔진(120)는 도 6b 및 도 7b와 같이 제1 기준 픽셀을 중심으로 하여 8개의 주변 픽셀 영역을 설정한다. 그리고 나서, UI 프로세서 엔진(120)은 중간값 연산대상 0과 기준 픽셀 16을 더하여 임의의 변수(예를 들어 2)로 나눈 값(8)을 해당 중간값 연산 대상에 UI 프로세서 엔진(120)은 검색된 중간값 연산 대상에 기록한다. 이와 같은 중간값 계산 과정을 통하여 도 6b 및 도 7b에 도시된 바와 같이 0이었던 주변 픽셀값이 8로 다시 설정된다.Figs. 6A to 6F and Figs. 7A to 7F show diagrams for explaining intermediate value calculation. In any first arrangement, such as FIGS. 6A and 7A, the UI processor engine 120 sets eight peripheral pixel regions around a first reference pixel as shown in FIGS. 6B and 7B. Then, the UI processor engine 120 adds the intermediate value calculation object 0 and the reference pixel 16 and divides a value 8 obtained by dividing the intermediate value to the intermediate value operation object by an arbitrary variable (for example, 2) And records it in the searched intermediate value calculation object. Through this intermediate value calculation process, the neighboring pixel value, which was 0 as shown in FIGS. 6B and 7B, is set to 8 again.

이어서, UI 프로세서 엔진(120)는 도 6c 및 도 7c와 같이 제2 기준 픽셀을 중심으로 하여 8개의 주변 픽셀 영역을 설정한다. 그리고 나서, UI 프로세서 엔진(120)은 중간값 연산대상 0 및 8과 기준 픽셀 16을 각각 더하여 임의의 변수(예를 들어 2)로 나눈 값(8, 12)을 해당 중간값 연산 대상에 UI 프로세서 엔진(120)은 검색된 중간값 연산 대상에 기록한다. 이와 같은 중간값 계산 과정을 통하여 도 6c 및 도 7c에 도시된 바와 같이 0이었던 주변 픽셀값이 8로 다시 설정되고, 8이었던 주변 픽셀값이 12로 다시 설정된다.Next, the UI processor engine 120 sets eight peripheral pixel regions around the second reference pixel as shown in FIGS. 6C and 7C. Then, the UI processor engine 120 adds values (8, 12) obtained by dividing the intermediate value calculation objects 0 and 8 and the reference pixel 16 by arbitrary variables (for example, 2) The engine 120 records in the retrieved intermediate value calculation object. Through this intermediate value calculation process, the neighboring pixel value, which was 0 as shown in FIGS. 6C and 7C, is reset to 8, and the neighboring pixel value which was 8 is set to 12 again.

계속해서, UI 프로세서 엔진(120)는 도 6d 및 도 7d와 같이 제3 기준 픽셀을 중심으로 하여 8개의 주변 픽셀 영역을 설정한다. 그리고 나서, UI 프로세서 엔진(120)은 중간값 연산대상 0, 8 및 12와 기준 픽셀 16을 각각 더하여 임의의 변수(예를 들어 2)로 나눈 값(8, 12, 14)을 해당 중간값 연산 대상에 UI 프로세서 엔진(120)은 검색된 중간값 연산 대상에 기록한다. 이와 같은 중간값 계산 과정을 통하여 도 6d 및 도 7d에 도시된 바와 같이 0이었던 주변 픽셀값이 8로 다시 설정되고, 8이었던 주변 픽셀값이 12로 다시 설정되고, 12였던 주변 픽셀 값이 14로 다시 설정된다.Subsequently, the UI processor engine 120 sets eight peripheral pixel areas around the third reference pixel as shown in FIGS. 6D and 7D. Then, the UI processor engine 120 adds the intermediate value calculation objects 0, 8 and 12 and the reference pixel 16 to the values (8, 12, 14) divided by an arbitrary variable (for example, 2) The UI processor engine 120 writes to the target the intermediate value calculation target searched. 6D and 7D, the neighboring pixel value was reset to 8, the neighboring pixel value was set to 12 again, and the neighboring pixel value was 12, which was 12, Reset.

이와 같은 방법으로 도 6e 내지 도 6f 및 도 7e 내지 도 7f도 중간값 계산을 수행한다.6E to 6F and 7E to 7F also perform the intermediate value calculation in this way.

여기서, 변수는 중간값 레벨의 심화를 나타내게 되는데, 즉, 2부터 정수의 값으로 리니어(linear)하게 설정하여 중간값 레벨의 수를 줄일 수 있다. 레벨의 수가 높으면 폰트 경계선이 매끄럽고 부드럽게 처리할 수 있으나, 가독성이 떨어진다. 레벨의 수가 낮으면 폰트 경계선이 거칠지만, 가독성을 높일 수 있다. 도 6 및 도 7은 이해를 돕기 위해서 우측 상단 16부터 시작하였으나, 사실은 폰트의 첫 번째 픽셀부터 검색하여 경계선이 나오는 처음 픽셀부터 해야 한다.Here, the variable represents a deepening of the intermediate value level. That is, the number of intermediate value levels can be reduced by linearly setting from 2 to an integer value. A high number of levels can smoothly and smoothly process font boundaries, but it is less readable. If the number of levels is low, font boundaries are rough, but readability can be increased. 6 and 7 start from the upper right corner 16 for the sake of clarity, but in fact, the first pixel of the font must be searched from the first pixel of the boundary line.

이와 같이 중간값 계산이 완료되면, UI 프로세서 엔진(120)는 프레임 버퍼(140)의 스캐닝 및 중간값 계산 횟수가 사용자가 지정한 횟수인지 판단하여(S250), 사용자가 지정한 회수에 못 미치는 경우 S230으로 이동하여 프레임 버퍼(140)의 스캐닝 및 중간값 계산을 수행한다. 이러한 반복적인 스캐닝 및 중간 값 계산 시에 폰트의 특성(폰트 하나의 간격-연결이 끊어지는 모음과 자음 또는 이와 유사한 성격의 폰트에서의 간격)에 따라 사용자가 따로 정할 수 있도록 횟수를 지정할 수 있다. 이렇게 정해진 횟수에 따라 프레임 버퍼(140)의 스캐닝 및 중간값 계산을 반복하여 안티 알리아싱 처리를 한다.When the intermediate value calculation is completed, the UI processor engine 120 determines whether the number of scanning and intermediate value calculation times of the frame buffer 140 is the number designated by the user (S250). If the number is less than the number designated by the user, And performs scanning of the frame buffer 140 and intermediate value calculation. In this repetitive scanning and median calculation, the number of times can be specified by the user in accordance with the characteristics of the font (the spacing of one font - spacing of disconnected vowels and consonants or similar-like fonts). The scanning and intermediate value calculation of the frame buffer 140 are repeated according to the determined number of times to perform anti-aliasing processing.

프레임 버퍼(140)의 스캐닝 및 중간값 계산 횟수가 사용자가 지정한 횟수만큼 수행된 경우, UI 프로세서 엔진(120)은 프레임 버퍼(140)에서 알리아싱 처리된 폰트를 디스플레이부(150)로 출력한다(S260). 안티 알리아싱 처리가 완료되면, UI 프로세서 엔진(120)은 안티 알리아싱이 처리된 배열 값과 기본 폰트 배열의 값을 비교하여, 기본 폰트에서 배경색이 아닌 부분(원래 배경색이었던 부분을 제외한 픽셀들)은 안티 알리아싱이 처리된 배열로 교체하도록 한다. 물론, 상기 부분은 처음 폰트 배열을 잡을 때 좀 더 배열의 수를 늘리거나 기본 폰트의 값은 조정이 되지 않도록 하는 등 구현 방법에 차이는 여러 가지가 있다.The UI processor engine 120 outputs the font that has been aliased in the frame buffer 140 to the display unit 150 (S260: YES) ). When the anti-aliasing processing is completed, the UI processor engine 120 compares the anti-aliasing processed array value with the values of the basic font array, and determines whether the non-background color (pixels other than the original background color) Replace the array with the processed aliasing. Of course, there are a number of differences in the implementation method, such as increasing the number of arrays or not adjusting the value of the default font when capturing the font array for the first time.

연속적이지 않은 폰트 구성일 경우에는 안티 알리아싱 처리된 값으로 인해 가독성이 떨어질 수 있다. 이러한 경우 중간값 계산 시에 변수를 다른 값으로 설정하여 변경할 수 있다. 예를 들어 폰트 '가'에서 'ㄱ'과 'ㅏ' 사이 거리가 2 픽셀인 경우, 폰트를 해독하는데 있어서, 'ㄱ'과 'ㅏ'의 중간 색이 폰트의 기본 색상과 비슷하여 가독성이 떨어지게 된다. 따라서 이때 'ㄱ'과 'ㅏ' 사이에 적용하는 변수의 값을 기본 안티 알리아싱 값보다 낮추도록 하여 배경색에 보다 근접하게 하고 폰트 기본 색을 부각시켜 가독성을 높일 수 있다.In the case of non-contiguous font configurations, readability may be reduced due to antialiased values. In this case, you can change it by setting the variable to a different value when calculating the median value. For example, when the distance between 'a' and 'a' in the font 'a' is 2 pixels, the middle color between 'a' and 'a' is similar to the basic color of the font, do. Therefore, by reducing the value of the variable applied between 'a' and 'a' to be lower than the basic anti-aliasing value, it is possible to make the font color closer to the background color and enhance the readability by highlighting the basic color of the font.

안티 알리아싱 처리가 완료된 이후에 시스템에서 이 폰트들을 프레임 버퍼(140)에 사용할 때 폰트끼리 일정한 레벨을 유지하지 못할 때 이에 해당하는 폰트들에 대해서만 CPU(160)가 안티 알리아싱 처리를 재 적용하여 가독성을 높일 수 있다.When the system can not maintain a certain level of fonts when using the fonts in the frame buffer 140 after the anti-aliasing process is completed, the CPU 160 reuses the anti-aliasing process only for the corresponding fonts, .

이제까지 본 발명에 대하여 그 바람직한 실시 예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시 예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.The present invention has been described with reference to the preferred embodiments. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

Claims (5)

(a) 프레임 버퍼에 폰트를 위한 첫 번째 배열 및 두 번째 배열을 할당하는 단계;
(b) 임의의 폰트를 상기 첫 번째 배열에 복사하는 단계;
(c)상기 첫 번째 배열의 픽셀값을 스캐닝하여 두 번째 배열의 픽셀값을 세팅하는 단계; 및
(d) 상기 스캐닝 및 세팅을 통해 두 번째 배열에서 0이 아닌 픽셀에 대응하는 첫 번째 배열 픽셀의 중간값을 산출하는 단계를 포함하는 안티 알리아싱 방법.
(a) assigning a first array and a second array for a font to a frame buffer;
(b) copying an arbitrary font into the first array;
(c) scanning a pixel value of the first array to set a pixel value of the second array; And
(d) calculating an intermediate value of a first array pixel corresponding to a non-zero pixel in a second array through the scanning and setting.
제 1항에 있어서,
(e) 상기 중간값이 산출된 첫 번째 배열 영역에 상기 폰트의 기본값을 결합하는 단계를 더 포함하는 것을 특징으로 하는 안티 알리아싱 방법.
The method according to claim 1,
(e) combining the default value of the font with the first array area where the intermediate value is calculated.
청구항 3은(는) 설정등록료 납부시 포기되었습니다.Claim 3 has been abandoned due to the setting registration fee. 제 1항에 있어서,
상기 (c) 및 (d) 단계는 사용자가 설정한 횟수만큼 반복되는 것을 특징으로 하는 안티 알리아싱 방법.
The method according to claim 1,
Wherein the steps (c) and (d) are repeated a number of times set by the user.
제 1항에 있어서, 상기 (d)단계는
(d-1) 상기 두 번째 배열에서 그 값이 0이 아닌 픽셀과 동일한 위치를 갖는 첫 번째 배열의 픽셀을 검색하는 단계;
(d-2) 상기 검색된 첫 번째 배열의 픽셀을 기준 픽셀로 하여 주변 픽셀 영역을 설정하는 단계;
(d-3) 상기 주변 픽셀 영역과 동일한 위치를 갖는 두 번째 배열에서 그 값이 0인 픽셀을 검색하는 단계; 및
(d-4) 상기 검색된 픽셀과 기준 픽셀을 더한 후 임의의 변수로 나누어 중간값을 계산하여 상기 검색된 픽셀에 기록하는 단계를 포함하는 안티 알리아싱 방법.
2. The method of claim 1, wherein step (d)
(d-1) searching for a pixel in the first array having the same position as the non-zero pixel in the second array;
(d-2) setting a peripheral pixel area with the searched first array pixel as a reference pixel;
(d-3) searching for a pixel whose value is 0 in a second array having the same position as the peripheral pixel area; And
(d-4) adding the searched pixel and the reference pixel, dividing the searched pixel by an arbitrary variable, calculating an intermediate value, and writing the intermediate value to the searched pixel.
청구항 5은(는) 설정등록료 납부시 포기되었습니다.Claim 5 has been abandoned due to the setting registration fee. 제 4항에 있어서, 연속적이지 않은 폰트의 구성일 경우, 상기 변수 보다 더 낮은 변수를 이용하여 중간값을 계산하는 것을 특징으로 하는 안티 알리아싱 방법.The anti-aliasing method according to claim 4, wherein in the case of non-contiguous font configuration, an intermediate value is calculated using a variable lower than the variable.
KR1020100013512A 2010-02-12 2010-02-12 Method for anti aliasing of font KR101451134B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100013512A KR101451134B1 (en) 2010-02-12 2010-02-12 Method for anti aliasing of font

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100013512A KR101451134B1 (en) 2010-02-12 2010-02-12 Method for anti aliasing of font

Publications (2)

Publication Number Publication Date
KR20110093457A KR20110093457A (en) 2011-08-18
KR101451134B1 true KR101451134B1 (en) 2014-10-15

Family

ID=44930150

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100013512A KR101451134B1 (en) 2010-02-12 2010-02-12 Method for anti aliasing of font

Country Status (1)

Country Link
KR (1) KR101451134B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102251444B1 (en) 2014-10-21 2021-05-13 삼성전자주식회사 Graphic processing unit, graphic processing system comprising the same, antialiasing method using the same

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5105469A (en) * 1990-02-05 1992-04-14 Crosfield Electronics Limited Control data array generation apparatus and method
JP2001251500A (en) 2000-02-25 2001-09-14 Internatl Business Mach Corp <Ibm> Image transforming method, image processing apparatus and image display device
KR20070110715A (en) * 2006-05-15 2007-11-20 주식회사 대우일렉트로닉스 Text anti-aliasing method by using image font in combo device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5105469A (en) * 1990-02-05 1992-04-14 Crosfield Electronics Limited Control data array generation apparatus and method
JP2969010B2 (en) 1990-02-05 1999-11-02 フジフィルム・エレクトロニック・イメージング・リミテッド Method and apparatus for generating improved control data sequence
JP2001251500A (en) 2000-02-25 2001-09-14 Internatl Business Mach Corp <Ibm> Image transforming method, image processing apparatus and image display device
KR20070110715A (en) * 2006-05-15 2007-11-20 주식회사 대우일렉트로닉스 Text anti-aliasing method by using image font in combo device

Also Published As

Publication number Publication date
KR20110093457A (en) 2011-08-18

Similar Documents

Publication Publication Date Title
US7613363B2 (en) Image superresolution through edge extraction and contrast enhancement
JP6157138B2 (en) Image processing device
US8855438B2 (en) Image processing apparatus, image processing method of image processing apparatus, and program
US8699815B2 (en) Methods and apparatus for improved display of foreground elements
CN104966092B (en) A kind of image processing method and device
EP2141655A2 (en) Color enhancement for graphic images
US10762401B2 (en) Image processing apparatus controlling the order of storing decompressed data, and method thereof
WO2018072270A1 (en) Method and device for enhancing image display
US10930040B2 (en) Graphic object modifications
KR20160001674A (en) Adaptive desampling in a graphics system with composited level of detail map
JP2012022654A (en) Image processing apparatus, image processing method and program
US8654147B2 (en) Apparatus for generating raster images, raster image generating method, and storage medium
JP2004334852A (en) Image processing by pixel types
CN112070708B (en) Image processing method, image processing apparatus, electronic device, and storage medium
KR101451134B1 (en) Method for anti aliasing of font
US20140320527A1 (en) Hardware glyph cache
JP5490360B2 (en) Method and recording medium for generating bolded anti-aliasing bitmap
JP2007079586A (en) Image processor
US9911399B2 (en) Method of image processing, image processor performing the method and display device having the image processor
US11217205B2 (en) Method and apparatus for rendering contents for vision accessibility
US20100182331A1 (en) Method and apparatus for drawing image
JP6242196B2 (en) Image processing apparatus, image processing apparatus control method, and program
JP5672168B2 (en) Image processing apparatus, image processing method, and program
JP2017135433A (en) Image processing apparatus and program
KR20160069452A (en) Image processing device, image processing method and program

Legal Events

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

Payment date: 20170927

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20181001

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20191001

Year of fee payment: 6