KR940005827B1 - Method for rotation of text image data - Google Patents

Method for rotation of text image data Download PDF

Info

Publication number
KR940005827B1
KR940005827B1 KR1019890003052A KR890003052A KR940005827B1 KR 940005827 B1 KR940005827 B1 KR 940005827B1 KR 1019890003052 A KR1019890003052 A KR 1019890003052A KR 890003052 A KR890003052 A KR 890003052A KR 940005827 B1 KR940005827 B1 KR 940005827B1
Authority
KR
South Korea
Prior art keywords
pixel
pixels
character image
contour
outline
Prior art date
Application number
KR1019890003052A
Other languages
Korean (ko)
Other versions
KR900000785A (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 가부시기가이샤 샤켄
Publication of KR900000785A publication Critical patent/KR900000785A/en
Application granted granted Critical
Publication of KR940005827B1 publication Critical patent/KR940005827B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Preparing Plates And Mask In Photomechanical Process (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

내용 없음.No content.

Description

문자화상 데이타의 상회전 처리방법How to rotate text image data

제1도는 본 발명에 의한 문자화상의 90°회전처리의 흐름을 설명하는 순서도.1 is a flowchart for explaining the flow of a 90 ° rotation process of a character image according to the present invention.

제2도는 본 발명을 실시하는데 적합한 장치의 도면.2 is a diagram of a device suitable for practicing the present invention.

제3도는 문자화상의 도면.3 is a drawing of a text image.

제4도는 제3도의 문자화상을 그대로 회전시킨 도면.4 is a view in which the text image of FIG. 3 is rotated as it is.

제5도는 종래예를 설명하는 도면.5 is a diagram for explaining a conventional example.

제6도, 제7도 및 제8도는 종래 기술의 과제점을 설명하는 도면.6, 7 and 8 illustrate the problems of the prior art.

제9도는 제3도의 문자화상을 본 발명의 방법에 의해 90°회전시킨 도면.9 is a view in which the character image of FIG. 3 is rotated 90 degrees by the method of the present invention.

제10도는 본 발명의 방법에 의해 제3도의 문자화상을 -90°회전한 예를 나타낸 도면.10 is a view showing an example in which the text image of FIG. 3 is rotated by -90 ° by the method of the present invention.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

21 : 입력장치 22 : I/O 포트21: input device 22: I / O port

23 : 제어회로 24 : 문자화상 기억장치23: control circuit 24: character image storage device

25 : 해독기 회로 26 : 상회전 처리회로25: decoder circuit 26: phase rotation processing circuit

27 : 출력장치27: output device

본 발명은 문자화상을 그 윤곽으로 기억하여 고품질의 문자화상을 발생하도록 한 문자화상 처리장치 등에 있어서, 문자화상을 고속으로 90° 또는 -90° 회전하여 출력하도록 한 문자화상 데이타의 상회전 처리방법에 관한 것이다.The present invention relates to an image rotation processing method of character image data in which a character image is rotated by 90 ° or -90 ° at high speed and output in a character image processing apparatus or the like which stores a character image as its outline and generates a high quality character image. It is about.

고품질의 문자화상을 기억하는 방법으로서 문자화상의 윤곽을 추출하여, 예를들어 N차 곡선의 집합으로서 기억하는 방법이 제안되어 있다. 본 발명에서 문자화상은 2치화상을 나타내며, 그것은 흑색화소와 백색화소의 조합으로 표현되는 화상이다.As a method of storing a high quality character image, a method of extracting the outline of a character image and storing it as a set of N-th order curves, for example, has been proposed. In the present invention, a text image represents a binary image, which is an image represented by a combination of black pixels and white pixels.

이와 같은 문자화상의 윤곽을 추출하고, 추출한 윤곽을 N차 곡선의 집합으로서 기억하고, 그 윤곽 정보에서 윤곽의 화소를 복원하는 방법으로서, 예를들어 특개소 58-134745호 공보-특개소 58-134748호 공보 등이 있다.As a method of extracting the outline of such a character image, storing the extracted outline as a set of N-th order curves, and restoring pixels of the outline from the outline information, for example, Japanese Patent Application Laid-Open No. 58-134745; 134748 publication.

이들에 개시되어 있는 방법에서는, 윤곽으로 기억한 문자화상을 출력할 경우 먼저 N차 곡선의 집합에서 윤곽의 화소를 구한다. 그리고 이 윤곽화소의 좌표를 감재상에서 라스터 주사하는 광비임의 온(ON), 오프(OFF) 신호로 하면, 그대로 윤곽화소가 나타내는 문자화상을 출력할 수 있다. 물론, 윤곽화소의 좌표를 일단 비트맵 기억장치 등에 전개하고, 기억장치 임의의 번지에서 독출함으로써, 라스터주사 이외의 출력방법도 가능하다.In the methods disclosed in these methods, when outputting a text image stored as an outline, the pixels of the outline are first obtained from the set of N-th order curves. When the coordinates of the outline pixel are set to the ON and OFF signals of the light beam raster-scanned from the image sensor, the character image indicated by the outline pixel can be output as it is. Of course, by outputting the coordinates of the outline pixels to a bitmap storage device or the like and reading them at arbitrary addresses of the storage device, an output method other than raster scanning is also possible.

또 고품질의 문자화상 처리장치에 있어서는 문자화상을 90°(또는 -90°, 이하 같음) 회전하여 출력하는 것은 특히 중요하다. 그것은 가로쓰기와 세로쓰기의 양쪽에 하나의 문자화상의 정보로 대응할 수 있기 때문이다. 어떤 방법에 의해 문자화상을 고속으로 90°회전할 수 있는 것이라하면, 그것은 윤곽 내부의 화소도 포함하여 회전시키는것 보다 윤곽 화소만을 회전시킨쪽이 훨씬 고속으로 처리할 수 있음을 명백하다.In the high quality text image processing apparatus, it is particularly important to rotate the text image by 90 degrees (or -90 degrees, or less). This is because the information of one character image can correspond to both horizontal writing and vertical writing. If it is possible to rotate a text image by 90 ° at a high speed by some method, it is clear that the rotation of only the contour pixel can be processed much faster than the rotation including the pixel inside the contour.

그런데, 문자화상의 윤곽화소를 그대로 90°회전시킨 것만으로는, 90°회전시킨 문자화상을 얻을 수 없다. 그 이유를 제3도와 제4도에 의해 설명한다.By the way, by simply rotating the outline pixel of the text image by 90 degrees, the text image rotated by 90 degrees cannot be obtained. The reason is explained by FIG. 3 and FIG.

제3도는 XY 좌표상에 놓인 문자화상 A의 예이다. 다음에서 설명하는 XY 좌표에 있어서, Y방향은 출력일때의 주 주사방향에 해당하며, X방향은 부 주사방향에 해당한다. 예를들면 레이저 프린터 등에 의해, XY 좌표상에 놓인 화소에 의거하여 문자화상을 출력할때는 Y방향(주 주사방향)에 평행한 라인(이하 라인이라고 함)상에 온 화소(라스터주사하는 광비임을 온으로 하는 위치)와 오프 화소(라스터주사하는 광비임을 오프로 하는 위치)의 짝을 형성하고, 온 화소의 위치에서 광비임을 온으로 하고, 오프 화소의 위치에서 오프로 함으로써 문자화상을 발생시킬 수 있다.3 is an example of a text image A placed on XY coordinates. In the XY coordinates described below, the Y direction corresponds to the main scanning direction at the time of output, and the X direction corresponds to the sub scanning direction. For example, when outputting a character image based on a pixel placed on XY coordinates by a laser printer or the like, a pixel (raster-scanned light ratio) on a line parallel to the Y-direction (hereinafter referred to as a line) is referred to. A character image can be generated by forming a pair of off-positions) and off-pixels (positions of raster-scanning light beams), turning on the light beams at the on-pixel position, and turning them off at the off-pixel positions. Can be.

제3도에서는 지표 G1~G14로 도시된 화소에 의해 문자화상 A의 윤곽이 구성되어 있다. 예를들면 첫번째의 라인(X=1)의 G1에서 광비임은 온으로 되고, G14에서 오프로 된다. 이하 마찬가지로 X=7의 라인까지 주사하면 이 화상 A를 재현할 수 있다.In FIG. 3, the outline of the character image A is constituted by the pixels shown by the indicators G1 to G14. For example, the light beam is turned on at G1 of the first line (X = 1) and turned off at G14. Similarly, scanning to the line of X = 7 can reproduce this image A similarly.

제4도는 제3도의 G1~G14의 윤곽화소를 단순히 그대로 시계방향으로 90°회전시킨 예이다. 그런데 이 제4도에서는 제3도와 같이 온 화소와 오프 화소의 짝을 성립시킬 수 없다. 예를들어 라인(X=1)~(X=6)에는 윤곽화소가 각 라인에 홀수개 밖에 없다. 만약 이대로의 상태로 라인(X=3)을 주사하려고 하면, 광비임은 먼저 화소 G6에서 온되고, 이어서 곧 화소 G5의 위치에서 일단 오프되며, 다시 화소 G4의 위치부터 온으로 되고, 그대로 계속해서 온이다. 이와 같이 동일 라인상에 윤곽화소가 홀수개 밖에 없으면 정확하게 문자화상이 출력되지 않는다.4 is an example in which the contour pixels of G1 to G14 in FIG. 3 are simply rotated 90 ° clockwise. However, in FIG. 4, as shown in FIG. 3, the pair of on pixels and off pixels cannot be established. For example, lines (X = 1) to (X = 6) have only an odd number of contour pixels in each line. If you try to scan the line (X = 3) in this state, the light beam is first turned on at pixel G6 and then off at the position of pixel G5 once, again from the position of pixel G4, and then continues as it is. It's on. In this way, if there are only odd number of outline pixels on the same line, the text image is not output correctly.

이와 같은 문제를 해결하는 방법으로서, 예를들어 회전한 화소의 일부를 소거하거나, 보간하는 것을 생각할 수 있다. 그러나, 이와 같은 방법은 처리속도의 점에서 문제가 남는다.As a method for solving such a problem, for example, it is possible to erase or interpolate a part of the rotated pixel. However, such a method remains problematic in terms of processing speed.

그래서, 특개소 60-75968호 공보와 같은 문자화상의 상회전 처리방법이 고려되고 있다. 제5도는 상기 선행예를 설명하는 도면이다. G21~G42는 문자화상의 윤곽을 나타내는 화소이다. G21~G31의 화소에서 하나의 곡선을 나타내는 하나의 블록을 형성하고, G32~G42의 화소로 다른 하나의 블록을 형성한다. 그리고 문자화상이 2치화상이면 윤곽화소는 흑화소 또는 백화소의 개시 또는 종료를 나타내는 점으로 된다. 따라서 제5도의 경우는 화소 G21~G31이 화상의 온 화소(흑화소 개시)의 블록이며, G32~G42는 오프 화소(백화소 개시)의 블록으로 된다. 예를들면 G21과 G32, G22와 G33이 각기 온 화소와 오프 화소의 짝으로 되어 있다. 이들 윤곽화소의 위치(Xn, Yn)에서 90°회전하는 화소를 구한다.Therefore, the method of processing the upward rotation of a character image such as Unexamined-Japanese-Patent No. 60-75968 is considered. 5 is a diagram for explaining the preceding example. G21 to G42 are pixels representing the outline of a character image. One block showing one curve is formed from the pixels of G21 to G31, and the other block is formed of the pixels of G32 to G42. If the character image is a binary image, the outline pixel is a point indicating the start or end of the black pixel or the white pixel. Therefore, in the case of Fig. 5, the pixels G21 to G31 are blocks of on pixels (black pixel start) of the image, and G32 to G42 are blocks of off pixels (white pixel start). For example, G21 and G32, G22 and G33 are pairs of on and off pixels, respectively. The pixel which rotates 90 degrees at the position Xn, Yn of these outline pixels is calculated | required.

X=Xn의 라인상에 있는 화소중, Yn, Yn+1의 값이 작은쪽의 화소에서 큰 화소의 하나 앞까지의 ( | Yn-Yn+1| -1)개 구간내에 있는 화소를 회전하는 윤곽화소로 한다. 회전처리는 복원되는 화소의 순서, 즉 G21의 화소에서 순번으로 G22, G23, G24…로 행해진다. G21~G31의 블록의 회전처리가 종료되면 G32~G42의 블록의 회전처리를 한다. 이와 같이해서 구한 윤곽화소를 90°회전하면 온, 오프 화소의 짝은 반드시 성립한다. 그런데 상기 제5도의 설명에서는 블록별로 회전 처리되기 때문에 화소 G21과 G32, G31과 G42의 사이는 블록외의 취급으로 되기 때문에, 별개로 회전처리를 하지 않으면 안된다. 구체적으로는 회전후의 G31과 G42에 온, G32와 G21에 오프를 나타내는 속성을 부가하여, 그 속성에 따라 윤곽화소가 나타내는 문자화상을 출력하도록 한다.Rotate pixels within (| Yn-Y n + 1 | -1) intervals from the smaller pixel to one of the larger pixel among the pixels on the line of X = Xn. It is said to be outline pixel. The rotation process is performed in order of the pixels to be restored, that is, in the order of pixels in G21, G22, G23, G24,. Is done. When the rotation processing of the blocks of G21 to G31 is completed, the rotation processing of the blocks of G32 to G42 is performed. When the outline pixel thus obtained is rotated by 90 degrees, the pair of on and off pixels is necessarily established. However, in the description of FIG. 5, since the rotation processing is performed block by block, the pixels G21 and G32, and G31 and G42 are handled outside the block, so the rotation processing must be performed separately. Specifically, an attribute indicating on and off in G31 and G42 after rotation is added to output a character image indicated by the outline pixel according to the attribute.

이상과 같은 방법을 사용함으로써 문자화상의 상회전처리를 진행시킬 수 있다. 그러나 여기서 새로운 문제가 제기되게끔 되었다. 그 하나는 예를들어 제5도와 같은 문자화상을 사이징(sizing)하면, 온측 또는 오프측의 블록의 일부(화소)가 생략되어, 블록단점(G31 등)의 온, 오프 속성이 대응을 취할 수 없게되는 경우가 생기는 것이다. 이것은 블록마다 회전처리를 한다고 하는 사고방식임에도 불구하고, 사이징(특히 축소)을 위해 블록의 일부가 생략되어 해독되는 것에 기인한다.By using the above method, the image rotation processing of the text image can be advanced. But a new problem came up here. For example, when sizing a character image as shown in FIG. 5, a part (pixel) of a block on or off side is omitted, and the on / off attribute of a block end point (G31, etc.) can take a correspondence. There will be cases when there is no. This is due to the fact that part of the block is omitted and deciphered for sizing (particularly shrinking), despite the idea that the block is rotated per block.

또 하나의 문제는 곡선 등으로 표시된 문자화상의 윤곽정보에서 윤곽화소를 구할때의 연산오차에 의해, 2개의 짝으로 되어야 할 블록(화소)이 하나의 라인상으로 홀수개로 되어 버리거나 엇갈려서 온 화소와 오프 화소의 짝이 성립되지 않게된다고 하는 문제이다. 그 이유를 제6도, 제7도 및 제8도에서 설명한다.Another problem is that due to a computational error in obtaining contour pixels from the contour information of a character image indicated by a curve or the like, two blocks (pixels) to be paired become odd on a line or are alternately turned on and off. This is a problem that pairs of pixels do not hold. The reason is explained in FIG. 6, FIG. 7, and FIG.

제6도는 문자화상[木]의 좌측 선단부 B에 착안한 것이다. 제7도는 제6도의 부분 B를 확대한 것이다. 제7도에 있어서 G51~G56이 온 화소, G57~G62가 오프 화소이며, 예를들어 라인(X=6)상의 화소 G56, G62 처럼 매우 가까운 위치에 있는 화소에서는 복원할때의 연산 정밀도의 한계를 원인으로 하는 엇갈림이 생기는 경우가 있다. 즉, 곡선 등으로 표시된 윤곽정보를 복원할 때, 연산 정밀도 이하의 수치를 둥글게 하는 것등에 의해 연산오차가 생겨 G56의 위치에 G62의 화소가, G62의 위치에 G56이 발생할 경우가 있다.6 focuses on the left end portion B of the character image. 7 is an enlarged view of part B of FIG. In FIG. 7, the limit of the calculation accuracy at the time of restoration is the pixel which G51-G56 is an on pixel and G57-G62 is an off pixel, and is located in the very near position like pixel G56, G62 on a line (X = 6), for example. There may be a gap caused by the problem. In other words, when restoring outline information indicated by a curve or the like, a calculation error occurs by rounding a numerical value equal to or less than arithmetic precision, so that a pixel of G62 may occur at the position of G56, and G56 may occur at the position of G62.

제8(a)도은 제7도의 G56과 G62가 엇갈린 화소에 의거하여 90°회전한 예이다. 이 예는 설명을 알기쉽게 하기 이해 제7도의 문자화상을 단순히 회전시킨 것으로만 해 놓았고, 각 화소의 지표 G도 같게해 놓았다.FIG. 8 (a) shows an example in which G56 and G62 in FIG. 7 are rotated by 90 degrees based on the staggered pixels. In this example, the character image of FIG. 7 is simply rotated for easy understanding, and the index G of each pixel is also the same.

제8(b)도는 이것을 바르게 보정한 것으로서 지표 G를 H로 바꾸어 놓았다. 제5도에서 기술한 바와 같이 각 화소에서 X=Xn의 라인상에 있으며, Yn, Yn+1의 작은쪽의 화소에서 큰 화소의 하나 앞까지의 ( | Yn-Yn+1| -1)개의 구간내에 있는 화소를 좌표 변환하고, 다시 제7도의 G51과 G57의 사이와, H56과 G62의 사이를 보간함으로써 변환한 것이다. 그런데 제8도(b)에서 H62, H1으로 나타낸 화소는 제7도를 90°회전시킨 결과, 온화소로서의 속성이 부가되는 화소이며, 그때문에 제8도(b)의 라인(X=1)에서는 H62와 H1의 양쪽이 온으로 되어버려, 온, 오프 화소의 짝이 성립되지 않게된다.In FIG. 8 (b), the index G was changed to H as a correct correction of this. As described in FIG. 5, each pixel is on a line of X = X n , and Y n , Y n + 1 from the smaller pixel to one of the larger pixels (| Y n -Y n + 1 Coordinate transformation is performed on the pixels within the interval of -1), and converted by interpolation between G51 and G57 in FIG. 7 and between H56 and G62. By the way, the pixel shown by H62 and H1 in FIG. 8 (b) is a pixel to which the attribute as a gentle element is added as a result of rotating FIG. 7 by 90 degrees, and therefore, the line (X = 1) of FIG. 8 (b). In this case, both H62 and H1 are turned on, so that pairs of on and off pixels are not established.

이와 같이 제5도의 방법으로는 블록(곡선)간의 좁은 부분에서 생긴 엇갓림 등의 화소를 정확하게 회전처리할 수 없다.In this manner, in the method of FIG. 5, pixels such as staggers generated in narrow portions between blocks (curves) cannot be accurately rotated.

종래기술의 과제였던 정확한 회전처리를 실현하기 위해, 본 발명은 윤곽화소의 90°의 회전을 한번의 처리로 할 수 있게끔 했다. 그리고 그 특징은 Y방향을 주 주사방향, X방향을 부 주사방향으로 하는 XY 좌표상에 문자화상의 윤곽을 나타내는 윤곽화소 Pn(n=1,2,3…)을 나타내며, 그 화소를 상 회전하는 문자화상 데이타의 상회전 처리방법에 있어서, 인접하는 상기 윤곽 화소 Pn, Pn+1의 주 주사방향 성분 Yn, Yn+1의 차가 있을때, 상기 윤곽화소 Pn, Pn+1의 부 주사방향 성분 Xn, Xn+1의 차 △Xn을 구하고, 상기 윤곽화소 Pn에 대응하는 △Xn의 값이 1일 경우와, -1일 경우와, 0의 경우로 분류하여 회전하는 화소를 구하고, 구해진 화소를 좌표 변환하여, 상회전한 문자화상의 윤곽화소를 발생시키는 것이다.In order to realize the accurate rotation process which has been the subject of the prior art, the present invention makes it possible to perform 90 ° rotation of the contour pixel in one process. The characteristic shows a contour pixel P n (n = 1, 2, 3 ...) which shows the outline of the character image on the XY coordinates in which the Y direction is the main scanning direction and the X direction is the sub scanning direction. In the image rotation processing method for rotating character image data, when there is a difference between the main scanning direction components Y n and Y n + 1 of the adjacent contour pixels P n and P n + 1 , the contour pixels P n and P n + If the sub-scanning directional component of 1 to obtain a difference △ X of n X n, X n + 1, the value of △ X n corresponding to the contour pixel P n 1 day in the case, and -1, in the case of 0 The pixels to be classified and rotated are obtained, and the obtained pixels are coordinate-transformed to generate the outline pixels of the rotated text image.

제1도는 본 발명의 방법에 의해 제3도에 나타낸 바와 같은, XY 좌표상에 놓여 Y방향으로 주 주사, X 방향으로 부 주사함으로써 출력하는 문자화상을 90°회전한 윤곽화소를 구하는 처리를 설명하는 순서도이다.FIG. 1 illustrates a process for obtaining an outline pixel in which a character image outputted by main scanning in the Y-direction and sub-scanning in the X-direction is rotated by 90 ° as shown in FIG. 3 by the method of the present invention. It is a flow chart.

S1 : 초기설정을 한다. 구체적으로는 윤곽화소 Pn의 n을 1호 한다. 본 예에서는 n은 윤곽을 나타내는 N차 곡선의 집합으로 이루어진 윤곽정보에서 각각의 화소가 복원되는 순번을 나타내는 것으로 한다. 예를들면 P2는 P1다음에 복원되어 출력되는 화소이다. 또 처리의 종료를 판단하기 위한 플랙 FS를 0으로 한다.S1: Initial setting. Specifically, n of the contour pixel P n is designated as 1. In this example, n denotes the order in which each pixel is reconstructed from the outline information consisting of a set of N-th order curves representing the outline. For example, P 2 is a pixel restored after P 1 and output. In addition, the flag FS for determining the end of the process is set to zero.

S2 : 문자화상의 윤곽을 나타내는 화소 Pn+1(Xn+1, Yn+1)의 좌표를 입력한다. 구체적으로는 문자화상의 윤곽정보는 예를들어 제2도의 문자화상 기억장치(24)에 기억되어 있으며, 그 윤곽정보를 해독기 회로(25)에서 윤곽화소로 복원함으로써, 윤곽화소의 좌표를 처리가능한 디지탈 신호로서 표현할 수 있다.S2: Input the coordinates of the pixel P n + 1 (X n + 1 , Y n + 1 ) indicating the outline of the character image. Specifically, the outline information of the character image is stored in the character image storage device 24 of FIG. 2, for example, and the coordinates of the outline pixel can be processed by restoring the outline information to the outline pixel in the decoder circuit 25. FIG. It can be expressed as a digital signal.

S3 : Xn+1-Xn을 구하고, 그것을 △X라고 한다. 본 예의 경우, 화소의 X성분은 하나씩 밖에 증감하지 않는 것으로 되어 있으나 임의의 수치 N씩 증감하는 경우도 대략 똑같이 처리할 수 있는 것은 명백하다. 즉 본 예에서는 △X는 1, 0, -1의 어느 한 값을 취한다.S3: Xn + 1 - Xn is calculated | required, and it is called (DELTA) X. In the case of the present example, the X components of the pixel are increased or decreased only one by one, but it is clear that the case of increasing or decreasing the values by an arbitrary value N can be processed substantially the same. That is, in this example, DELTA X takes any one of 1, 0, -1.

S4 : Yn과 Yn+1을 비교하고, 동일하면 S11에 나아가 플랙 FS를 1로 하고, 같지 않으면 S5로 나아간다. 다음의 화소 Pn+1과 Y방향에 있어서의 증감이 없는 화소 Pn은 회전 처리되지 않는다.S4: Compare Y n and Y n + 1 , and if it is the same, go to S11 and set the flag FS to 1, otherwise go to S5. The next pixel P n + 1 and the pixel P n without increase or decrease in the Y direction are not rotated.

S5 : YS, YT를 다음과 같이 해서 구한다.S5: Y S , Y T are obtained as follows.

YS=MIN[Yn, Yn+1](Yn과 Yn+1의 작은 쪽을 YS로 한다) Y S = MIN [Y n, Y n + 1] ( to a smaller one of the Y n and Y n + 1 to Y S)

YT=MAX[Yn, Yn+1](Yn과 Yn+1의 큰 쪽을 YT로 한다)Y T = MAX [Y n , Y n + 1 ] (large Y n and Y n + 1 are defined as Y T )

S6 : △X가 0인지 아닌지를 판단하여, 0이면 S7로 나아가고, 0이 아니면 S8로 나아간다.S6: It is determined whether DELTA X is 0. If 0, the process advances to S7, and if not, the process proceeds to S8.

S7 : Pn이 온 화소일 경우, S9으로 나아가고, 오프 화소일 경우는 S10으로 나아간다. 해독하는 순서가 흑화소를 좌측으로 보고 갈 경우, △X가 1일때 Pn은 온 화소이고, △X가 -1일때 Pn은 오프 화소이다.S7: When P n is an on pixel, the process advances to S9, and when it is an off pixel, the process proceeds to S10. When the decoding order goes from the left to the black pixel, P n is an on pixel when ΔX is 1, and P n is an off pixel when ΔX is −1.

S8 : △X가 1인지 -1인지를 판단하여, 1이면 S9으로 나아가고, -1이면 S10으로 나아간다.S8: It is determined whether DELTA X is 1 or -1, and if it is 1, it advances to S9, and if -1, it advances to S10.

S9 : 윤곽화소 Pn, Pn+1의 어느 좌표상에서, X=Xn의 라인상에 있으며, YS

Figure kpo00001
X
Figure kpo00002
YT-1을 만족시키는 화소를 90°회전하여 화소 Qi(Xi, Yi)로 한다.S9: On any coordinates of contour pixels P n , P n + 1 , they are on a line of X = X n , and Y S
Figure kpo00001
X
Figure kpo00002
A pixel satisfying Y T -1 is rotated by 90 ° to form pixel Q i (X i , Y i ).

S10 : 윤곽화소 Pn, Pn+1의 어느 좌표상에서, X=Xn-1의 라인상에 있고, YS

Figure kpo00003
Y
Figure kpo00004
YT-1을 만족시키는 화소를 90°회전하여 화소 Qi(Xi, Yi)로 한다.S10: On any coordinates of the contour pixels P n , P n + 1 , Y S is on a line of X n −1 and Y S
Figure kpo00003
Y
Figure kpo00004
A pixel satisfying Y T -1 is rotated by 90 ° to form pixel Q i (X i , Y i ).

S11 : 처리를 종료할지의 여부를 판단한다. 플랙 FS가 1일때 처리를 종료하고, 0일때 S12로 나아간다.S11: It is determined whether or not to end the processing. If flag FS is 1, the process ends. If 0, it goes to S12.

S12 : n에 1을 더한다.S12: Add 1 to n.

S13 : n+1이 있으면 A로 되돌아간다.S13: Return to A if n + 1 exists.

S14 : n+1번째의 것을 1로 한다. 이것은 처리의 개시점과 종료점의 사이를 빠짐없이 처리하기 위해서이다.S14: The n + 1st one is set to 1. This is to completely process between the start point and the end point of the process.

S15 : 플랙 FS를 1로 한다.S15: The flag FS is set to one.

제2도는 본 발명을 실시하는데 적합한 장치의 일실시예이다. 부호 21은 문자화상 정보나 각종 지령을 입력하는 입력장치이며 예를들어 콘솔의 키보드나 플로피 디스크 드라이브 등이다. 22는 인터페이스인 I/O 포트이며, 23은 전체의 제어나 데이타의 전송을 하는 제어회로이다.2 is an embodiment of a device suitable for practicing the present invention. Reference numeral 21 is an input device for inputting character image information and various commands, for example, a keyboard of a console or a floppy disk drive. 22 is an I / O port that is an interface, and 23 is a control circuit for overall control and data transfer.

24는 문자화상의 패턴을 그 윤곽정보에 의해 기억하고 있는 문자화상 기억장치, 25는 해독기 회로이고 문자화상 기억장치(24)에 기억되고 있는 문자화상의 윤곽정보를 윤곽 화소로서 복원한다. 26은 상회전 처리회로이며, 제어회로의 지령에 의해 제1도에 도시한 바와 같은 상회전 처리를 하며, 복원된 윤곽화소를 상회전한 화소로 변환한다. 27은 복원되어, 상회전 처리된 윤곽화소 등의 데이타에 따라 문자화상을 출력하는 출력장치이며, 예를들어 레이저 프린터나 콘솔의 CRT 등이다.24 denotes a character image storage device which stores a pattern of a character image by its outline information, and 25 denotes a decoder pixel and restores outline information of the character image stored in the character image storage device 24 as outline pixels. Reference numeral 26 denotes a phase rotation processing circuit, which performs the phase rotation processing as shown in FIG. 1 by the command of the control circuit, and converts the reconstructed outline pixel to the pixel rotated upward. Numeral 27 denotes an output device for restoring and outputting a text image in accordance with data such as a contour pixel that has been rotated up, for example, a CRT of a laser printer or a console.

90°회전한 문자화상을 출력하기 위한 지령이 입력장치(21)에서 입력되면, I/O 포트(22)를 통해 제어회로(23)에 전송된다. 제어회로는 지령에 따라 문자화상 기억장치(24)에서 윤곽정보를 독출하여 해독기회로(25)에 전송한다. 해독기회로(25)는 전송되어 온 윤곽정보를 윤곽화소로 복원한다. 해독기 회로가 출력하는 윤곽화소의 데이타는, 순차 상회전 처리회로(26)에 전송된다. 상회전 처리회로(26)는 전송되어 온 윤곽화소 데이타를 상회전 처리한 윤곽화소 데이타로서 출력한다.When a command for outputting a text image rotated by 90 ° is input from the input device 21, it is transmitted to the control circuit 23 through the I / O port 22. The control circuit reads out the contour information from the text image storage device 24 and sends it to the decoder circuit 25 according to the instruction. The decoder circuit 25 restores the contour information that has been transmitted to the contour pixel. The data of the contour pixels output by the reader circuit are transmitted to the phase rotation processing circuit 26 sequentially. The phase rotation processing circuit 26 outputs the transferred contour pixel data as the contour pixel data obtained by the phase rotation processing.

그 90°회전한 화상의 윤곽 화소데이타는 I/O 포트를 통해 출력장치(27)에 전송되며, 출력장치(27)는 전송되어 온 윤곽 화소데이타에 의거하여 문자화상을 출력한다.The outline pixel data of the image rotated by 90 ° is transmitted to the output device 27 through the I / O port, and the output device 27 outputs a text image based on the transmitted outline pixel data.

제9도는 본 발명의 방법에 의해 제3도의 문자화상 A를 시계방향으로 90°회전한 문자화상의 예이다.9 is an example of a character image in which the character image A of FIG. 3 is rotated 90 degrees clockwise by the method of the present invention.

먼저, 제3도의 화소 G1을 P1(X1, Y4), 화소 G2를 P2(X2, Y2)로 한다. 다음에 제1도의 S5에 도시된바와 같이 YS와 YT를 구한다.First, as a third-degree pixels P 1 G1 (X1, Y4), the pixel G2 P 2 (X2, Y2) . Next, Y S and Y T are obtained as shown in S5 of FIG.

YS=MIN[Y1, Y2]=2Y S = MIN [Y 1 , Y 2 ] = 2

YT=MAX[Y1, Y2]=4Y T = MAX [Y 1 , Y 2 ] = 4

로 된다.It becomes

△X1=1이므로, 제1도의 S9에 도시된 법칙에 따라 화소 Qi를 구한다. 직선의 식 X=Xn=1의 라인상에 있으며, Y방향의 값이 2이상 3이하의 구간에 포함되는 화소(X1, Y2), (X1, Y3)를 90° 회전한 점, (X2, Y7), (X3, Y7)이 90°회전한 화소 Q1, Q2이다. 이 2점이 제9도의 화소 H33과 H32이다.Since ΔX 1 = 1, the pixel Q i is obtained according to the law shown in S9 of FIG. On the line of the equation X = X n = 1 of the straight line, the point in which the value of the Y direction is rotated by 90 ° of pixels (X1, Y2) and (X1, Y3) included in a section of 2 or more and 3 or less, (X2 , Y7) and (X3, Y7) are pixels Q 1 and Q 2 rotated by 90 degrees. These two points are pixels H33 and H32 in FIG.

다음에 상기 화소 G2와 제3도의 화소 G3에 대해 검토하면, 화소 G3를 P3(X3, Y1)로 하면,Next, when the pixel G2 and the pixel G3 of FIG. 3 are examined, assuming that the pixel G3 is P 3 (X3, Y1),

YS=1Y S = 1

YT=2Y T = 2

로 된다. △X1=1이므로, 제1도의 S9에 도시된 법칙에 따라 화소 Q1를 구한다. X=1의 라인상에 있고, Y방향의 값이 1의 화소(X2, Y1)를 90°회전한 점(X1, Y6)이 화소 Q3로 된다. 제 9도에서는 이 Q3을 화소 H34로서 도시하고 있다. 이하 똑같이 해서 제3도의 화소의 회전처리를 진행해 간다.It becomes Since ΔX 1 = 1, the pixel Q 1 is obtained according to the law shown in S9 of FIG. And on the line X = 1, the value of the Y-direction are one pixel (X2, Y1) the 90 ° rotation point (X1, Y6) is the pixel Q 3. In FIG. 9, this Q 3 is shown as the pixel H34. In the same manner below, the rotation processing of the pixels in FIG. 3 is performed.

다음에 제1도의 S8에서 설명한 △X=-1일때에 대해 설명한다. 이 경우는 제1도의 S10에 도시한 법칙에 따라 화소 Q1를 구해간다. 예를들면 제3도의 화소 G8를 P8(X7, Y7), 화소 G9를 P10(X6, Y8)라고 한다. △X=1의 경우와 마찬가지로 YS와 YT를 구하면,Next, a description will be given when ΔX = −1 described in S8 of FIG. In this case, the pixel Q 1 is obtained according to the law shown in S10 of FIG. For example, the pixel G8 of FIG. 3 is referred to as P 8 (X7, Y7), and the pixel G9 is referred to as P 10 (X6, Y8). As in the case of ΔX = 1, when Y S and Y T are obtained,

YS=7Y S = 7

YT=8Y T = 8

로 된다.It becomes

X=Xn-1의 라인상에 있으며, Y방향의 값이 7의 화소(X6, Y7)를 90°회전한 점(X7, Y2)이 Q7으로 된다. 제9도에서 화소 H27이다. 이하 똑같이해서 정리해 가면 된다.On the line of X = X n −1, the points X7 and Y2 at which the values in the Y-direction rotated 90 degrees of pixels X6 and Y7 by 90 degrees become Q7. In FIG. 9, the pixel is H27. You can do the same below.

다음에 제1도의 S6에서 설명한 △X=0의 경우에 대해 설명한다. 이 경우는 제1도 S7과 같이 윤곽화소 Pn이 온 화소이냐 오프 화소이냐에 따라 S9와 S10의 법칙에 따라 Q1가 구해진다. 예를들어 제3도의 화소 G7과 G8에서는 △X=0이며, G7이 온 화소, G8가 오프 화소이다. 따라서 G7은 제1도의 S9에 의해 화소 Q1를 구하여 제9도의 화소 H25를 얻는다. 역시 화소 G8는 제1도의 S10에 의해 화소 Q1를 구하고, 제9도의 H26을 얻는다.Next, the case of ΔX = 0 explained in S6 of FIG. 1 will be described. In this case, Q 1 is obtained according to the laws of S9 and S10 depending on whether the outline pixel P n is an on pixel or an off pixel, as shown in FIG. For example, in the pixel G7 and G8 of FIG. 3, (DELTA) X = 0, G7 is an on pixel and G8 is an off pixel. Therefore, G7 obtains pixel Q 1 from S9 in FIG. 1 to obtain pixel H25 in FIG. The pixel G8 obtains the pixel Q 1 by S10 in FIG. 1 , and obtains H26 in FIG.

이상과 같이해서 제9도와 같은 윤곽화소로 변환하지만, 제7도와 제8도에서 설명한 바와 같은 화소의 어긋남이 생겼다고 하더라도 회전후의 화소가 온 화소인지 오프 화소인지는 이 화소의 위치로 결정되므로, 즉 온 화소나 오프 화소를 속성으로서 갖지 않으므로 정확하게 90도 회전한 문자화상을 재현시킬 수 있다.As described above, the image is converted to the outline pixel as shown in FIG. 9, but even if the pixel shift as described in FIG. 7 and FIG. 8 occurs, whether the pixel after rotation is an on pixel or an off pixel is determined as the position of the pixel. Since there is no on pixel or off pixel as an attribute, it is possible to reproduce a character image rotated exactly 90 degrees.

그리고, 본 예에서는 회전각도가 90도의 경우에 대해 설명했지만, -90도의 회전처리도 제1도의 S9, S10에 있어서의 변환처리를 다음과 같이 수정하는 것으로 용이하게 실현할 수 있다.In this example, the case where the rotation angle is 90 degrees has been explained. However, the rotation processing of -90 degrees can be easily realized by modifying the conversion processing in S9 and S10 of FIG. 1 as follows.

S9는 윤곽화소 Pn, Pn+1의 어떤 좌표상에서, X=Xn+1의 라인상에 있고, YS

Figure kpo00005
X
Figure kpo00006
YT-1을 만족하는 점을 -90도 회전하여 화소 Qi(Xi, Yi)로 한다.S9 is on a line of X = X n +1 on some coordinates of contour pixels P n , P n + 1 , and Y S
Figure kpo00005
X
Figure kpo00006
The point satisfying Y T -1 is rotated by -90 degrees to be the pixel Q i (X i , Y i ).

S10은 윤곽화소 Pn, Pn+1의 어느 좌표상에서, X=Xn의 라인상에 있으며, YS

Figure kpo00007
Y
Figure kpo00008
YT를 만족하는 좌표의 화소를 -90도 회전하여 화소 Qi(Xi, Yi)로 한다.S10 is on a line of X = X n at any coordinate of the contour pixels P n , P n + 1 , and Y S
Figure kpo00007
Y
Figure kpo00008
The pixel with coordinates satisfying Y T is rotated by -90 degrees to be the pixel Q i (X i , Y i ).

이와 같이 제1도에 도시된 처리를 조금 변경하는 것만으로-90도의 회전에도 대응할 수 있다.In this way, it is possible to cope with a rotation of -90 degrees by only slightly changing the process shown in FIG.

제10도는 제3도에 도시한 문자화상 A를 -90도 회전시킨 예이다. 먼저 제3도의 화소 G1를 P1(X1, Y4), 화소 G2를 P2(X2, Y2)로 한다. 이때 △X1은 1이다. 다음에 제1도의 S5에 도시된 바와 같이 YS와 YT를 구한다.FIG. 10 shows an example in which the character image A shown in FIG. 3 is rotated by -90 degrees. First, the pixel G1 of FIG. 3 is P 1 (X1, Y4) and the pixel G2 is P 2 (X 2 , Y 2 ). ΔX 1 is 1 at this time. Next, Y S and Y T are obtained as shown in S5 of FIG.

YS=MIN[Y1, Y2]=2Y S = MIN [Y 1 , Y 2 ] = 2

YT=MAX[Y1, Y2]=4Y T = MAX [Y 1 , Y 2 ] = 4

로 된다.It becomes

△X1=1이므로, 상술한 제1도를 수정한 처리에 따라 X=Xn+1=2의 라인상에 있으며, Y방향의 값이 2이상이고 3이하의 구간에 포함되는 화소(X2, Y2), (X2, Y3)를 -90° 회전한 점, (X6, Y2), (X5, Y2)가 90°회전한 화소 Q1, Q2이며, 이 2점이 제10도의 화소 H76과 H75이다. 이하 마찬가지로 하여 회전하는 화소를 구하고 모든 화소를 -90°회전시킨 윤곽 화소로 변환한다.Since ΔX 1 = 1, the pixel (X) is on a line of X = X n + 1 = 2 according to the modification of FIG. 2 , Y 2 ) and (X 2 , Y 3 ) are rotated by -90 °, and (X6, Y2) and (X5, Y2) are rotated by 90 °, and pixels Q 1 and Q 2 are rotated by 90 °. Pixels H76 and H75 in the figure. In the same manner, a rotating pixel is obtained and all pixels are converted to outline pixels rotated by -90 °.

본 발명은 이상 설명한 바와 같이 문자화상을 그 윤곽으로 기억하여 고품질의 문자화상을 발생하게 한 문자화상 처리장치에 있어서, 고속으로 더구나 정확하게 90°회전한 문자화상을 재현시킬 수 있다.As described above, in the text image processing apparatus which has generated a text image of high quality by storing the text image as its outline, it is possible to reproduce the text image rotated by 90 ° more accurately at high speed.

Claims (2)

Y방향을 주 주사방향, X방향을 부 주사방향으로 하는 XY 좌표상에 문자화상의 윤곽을 나타내는 윤곽 화소 Pn(n=1,2,3…)을 나타내며, 그 화소를 상회전하는 문자화상 데이타의 상회전 처리방법에 있어서, 인접하는 상기 윤곽 화소 Pn, Pn+1의 주 주사방향 성분 Yn, Yn+1의 차가 있을때, 상기 윤곽화소 Pn, Pn+1의 부 주사방향 성분 Xn, Xn+1의 차 △Xn을 구하고, 상기 윤곽화소 Pn에 대응하는 Xn의 값이 +1일 경우와, -1일 경우와, 0일 경우로 분류하여 회전하는 화소를 구하며, 구한 화소를 좌표 변환하여, 상회전한 문자화상의 윤곽화소를 발생시키는 것을 특징으로 하는 문자화상 데이타의 상회전 처리방법.Character image data representing contour pixels P n (n = 1, 2, 3, ...) representing the outline of the character image on the XY coordinates in which the Y direction is the main scanning direction and the X direction is the sub scanning direction. phase in the rotation processing method, adjacent the edge the pixel P n, P n + main scanning direction component Y n, the sub-scan direction when the difference between the Y n + 1, said contour pixel P n, P n + 1 of the first to A pixel which is obtained by obtaining the difference ΔX n of the components X n and X n + 1 , and classifying and rotating as the case where the value of X n corresponding to the outline pixel P n is +1, -1, and 0 And a coordinate pixel of the obtained pixel to generate an outline pixel of the rotated character image. 제1항에 있어서, 90°회전하는 화소를 구함에 있어서, △Xn이 +1일 경우, 윤곽화소 Pn, Pn+1중, X=Xn의 라인(주 주사방향과 평행)상에 있으며, 윤곽화소 Pn, Pn+1의 주 주사방향 성분 Yn, Yn+1의 작은 쪽의 화소에서 큰 화소의 하나 앞까지의 | Yn- Yn+1| -1개의 구간내에 있는 화소를 회전하는 화소로 하고, △Xn이 -1일 경우, X=Xn-1의 라인(주 주사방향과 평행)상에 있으며, 인접하는 윤곽화소 Pn, Pn+1의 주 주사방향 성분 Yn, Yn+1의 작은 쪽의 화소에서 큰쪽의 화소의 하나 앞까지의 | Yn- Yn+1| -1개의 구간내에 있는 화소를 회전하는 화소로 하고, △Xn이 0일 경우, 윤곽화소 Pn이 라스터 주사하는 광비임 등을 온하는 위치를 나타내는 화소이면 △Xn이 +1의 경우와 같이해서 회전하는 화소를 구하며, 윤곽화소 Pn이 라스터 주사하는 광비임 등을 오프하는 위치를 나타내는 화소이면 △Xn이 -1일 경우와 같이해서 회전하는 화소를 구하며, 이와 같이해서 구한 화소를 좌표 변환하여, 90°회전한 문자화상의 윤곽화소를 발생시키는 것을 특징으로 한 문자화상 데이타의 상회전 처리 방법.The method of claim 1, wherein when ΔX n is +1, when the pixel rotates by 90 °, the line (parallel to the main scanning direction) of X = X n is formed among the contour pixels P n and P n + 1 . In the main scanning direction components Y n and Y n + 1 of the contour pixels P n and P n + 1 from one pixel to the one in front of the large pixel | Y n -Y n + 1 | If ΔX n is -1, and the pixel in -1 section is a rotating pixel, adjacent contour pixels P n and P are on the line of X = X n -1 (parallel to the main scanning direction). n + 1 main scanning direction component Y n , Y n + 1 from the smaller pixel to one of the larger pixels | Y n -Y n + 1 | If the pixel to rotate the pixels within the interval of -1 and, △ X n is 0, if the contour pixels P n pixel indicating the position on the light beam, such as a raster scan △ X n + 1 in this case and asking for the pixel rotating manner, the contour pixel P n, seeking a pixel by rotating, such as when one pixel is △ X n -1 indicating a position off the light beam, such as a raster scan, obtained In this way A method of image rotation of character image data, characterized by generating a contour pixel of a character image rotated by 90 ° by coordinate conversion of pixels.
KR1019890003052A 1988-06-21 1989-03-13 Method for rotation of text image data KR940005827B1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP15252888A JPH077261B2 (en) 1988-06-21 1988-06-21 Image rotation processing method for character image data
JP88-152528 1988-06-21
JP63-152528 1988-06-21

Publications (2)

Publication Number Publication Date
KR900000785A KR900000785A (en) 1990-01-31
KR940005827B1 true KR940005827B1 (en) 1994-06-23

Family

ID=15542408

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019890003052A KR940005827B1 (en) 1988-06-21 1989-03-13 Method for rotation of text image data

Country Status (2)

Country Link
JP (1) JPH077261B2 (en)
KR (1) KR940005827B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2007119687A1 (en) 2006-04-13 2009-08-27 株式会社カネカ Rubber stopper composition and medical rubber stopper

Also Published As

Publication number Publication date
JPH024296A (en) 1990-01-09
JPH077261B2 (en) 1995-01-30
KR900000785A (en) 1990-01-31

Similar Documents

Publication Publication Date Title
US4817172A (en) Image processing system
US4937761A (en) Method and apparatus for enhanced speed graphic image processing
EP0336776A2 (en) Image magnification
EP0549351A2 (en) Image processing method and apparatus
KR950020276A (en) Subpixel mask generation method and device
JP3057935B2 (en) Character output device
KR940005827B1 (en) Method for rotation of text image data
JPH0555915B2 (en)
US5838298A (en) Image processing apparatus and method for smoothing stairway-like portions of a contour line of an image
WO2021033242A1 (en) Image recognition device, image recognition method, and image recognition program
EP1083736A1 (en) Image processing device and processing method
JPH0256874B2 (en)
JP2915700B2 (en) Image processing method and apparatus
JP2885996B2 (en) Image processing method and apparatus
JP3327961B2 (en) Image processing device
JP4311292B2 (en) Image processing apparatus, image processing method, and program thereof
JPH09135331A (en) Image processor
JPH0668271A (en) Image processor
JP2922014B2 (en) Original image pattern data playback device
JP3122664B2 (en) Drawing equipment
JPH0535872A (en) Contour tracing system for binary image
JPH10271338A (en) Device and method for processing image
JP4666480B2 (en) Line drawing device
JP3469658B2 (en) Image reduction method
JPH05300378A (en) Dot threshold level generating method

Legal Events

Date Code Title Description
A201 Request for examination
G160 Decision to publish patent application
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee