JP4936524B2 - Image processing system and image processing method - Google Patents
Image processing system and image processing method Download PDFInfo
- Publication number
- JP4936524B2 JP4936524B2 JP2006355179A JP2006355179A JP4936524B2 JP 4936524 B2 JP4936524 B2 JP 4936524B2 JP 2006355179 A JP2006355179 A JP 2006355179A JP 2006355179 A JP2006355179 A JP 2006355179A JP 4936524 B2 JP4936524 B2 JP 4936524B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- data
- character
- pixel
- color
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
- 238000003672 processing method Methods 0.000 title description 4
- 238000000034 method Methods 0.000 claims description 56
- 230000002093 peripheral effect Effects 0.000 claims description 37
- 230000006835 compression Effects 0.000 claims description 18
- 238000007906 compression Methods 0.000 claims description 18
- 238000006243 chemical reaction Methods 0.000 claims description 16
- 230000002427 irreversible effect Effects 0.000 claims description 6
- 230000006837 decompression Effects 0.000 claims description 2
- 239000000284 extract Substances 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 25
- 230000015654 memory Effects 0.000 description 20
- 241000255925 Diptera Species 0.000 description 16
- 230000006870 function Effects 0.000 description 15
- 238000009877 rendering Methods 0.000 description 10
- 238000007405 data analysis Methods 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 6
- 239000003086 colorant Substances 0.000 description 5
- 230000002457 bidirectional effect Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 230000002349 favourable effect Effects 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Landscapes
- Color, Gradation (AREA)
- Image Processing (AREA)
- Facsimiles In General (AREA)
- Editing Of Facsimile Originals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Description
本発明は処理対象の画像の圧縮および伸張を行う画像処理システムおよび画像処理方法に関する。
The present invention relates to an image processing system and an image processing method for compressing and expanding an image to be processed .
近年、プリンタの高解像度化や多色化に伴い、ホストコンピュータからプリンタに送信するデータ量が増加している。特に、インクジェットプリンタ等のラスタプリンタにおいて、全データをラスタデータとして送信するので、データ量の増加が大きく、印字速度を低下させることも稀ではない。 In recent years, the amount of data transmitted from a host computer to a printer is increasing as the resolution and color of the printer increase. In particular, since all data is transmitted as raster data in a raster printer such as an ink jet printer, the amount of data is greatly increased, and it is not uncommon for the printing speed to decrease.
転送速度を向上させるために、ホストコンピュータとプリンタとを接続する高速インタフェースが採用されているが、低速なインタフェースや無線接続等を考慮した場合、印字速度の低下が懸念されている。 In order to improve the transfer speed, a high-speed interface for connecting the host computer and the printer is adopted. However, when considering a low-speed interface, wireless connection, or the like, there is a concern about a decrease in printing speed.
この懸念を解決するために、ラスタデータをプリンタに送信するのではなく、JPEG方式による圧縮画像を、ホストコンピュータで生成し、プリンタ側で伸長処理し、印刷する技術が知られている。この技術によれば、圧縮によってデータ量を削減するので、転送に要する時間が削減される。 In order to solve this concern, a technique is known in which, instead of transmitting raster data to a printer, a compressed image by the JPEG method is generated by a host computer, decompressed by the printer, and printed. According to this technique, since the amount of data is reduced by compression, the time required for transfer is reduced.
しかし、JPEG方式を用いることによって、データを圧縮できる一方で、文字領域の境界部分にモスキートノイズが発生するという問題があり、また文字色が鈍るという問題がある。なお、上記「文字色の鈍り」は、文字のエッジ部、特に文字領域内で発生する画像劣化である。 However, by using the JPEG method, data can be compressed, but there is a problem that mosquito noise occurs at the boundary of the character area, and there is a problem that the character color is dull. The “character color dullness” is image degradation that occurs in the edge portion of the character, particularly in the character region.
そこで、プリンタドライバが、文書データから、文字領域の始点、終点、色情報を含むエッジ情報を生成し、文字以外の領域の色と同じ色で、文字領域を塗り潰した画像を生成し、JPEG圧縮する方法が知られている(たとえば、特許文献1参照)。そして、データ再現時には、伸長したデータ上に、エッジ情報から文字データ部を生成する。 Therefore, the printer driver generates edge information including the start point, end point, and color information of the character region from the document data, generates an image in which the character region is filled with the same color as the region other than the character, and JPEG compression There is a known method (see, for example, Patent Document 1). At the time of data reproduction, a character data portion is generated from the edge information on the decompressed data.
JPEG化された画像には、同一色しか存在しないので、モスキートノイズが文字の周辺に発生しない。また、エッジ情報に含まれている色情報によって、文字領域全てを同一色で塗りつぶすことができるので、文字部分を含めて、JPEG圧縮した場合に発生する境界付近の色の鈍りが発生しないという利点もある。
しかし、上記従来例では、文字が一層で配置されている場合、モスキートノイズや色の鈍りを抑えることができるものの、異なった色の文字と文字とが、多層化して配置されている場合には、モスキートノイズや色の鈍りを抑えることができないという問題がある。 However, in the above conventional example, when characters are arranged in one layer, mosquito noise and color dullness can be suppressed, but when characters and characters of different colors are arranged in multiple layers. There is a problem that mosquito noise and color dullness cannot be suppressed.
つまり、上記従来例では、文字部分にあたるバックグラウンドに、採用する色を決定できないので、モスキートノイズの発生を抑えることが不十分であり、これによって、文書データの復元時に良好な結果を得ることができないという問題がある。 In other words, in the above conventional example, since the color to be adopted cannot be determined in the background corresponding to the character portion, it is not sufficient to suppress the occurrence of mosquito noise, and thereby a good result can be obtained when restoring the document data. There is a problem that you can not.
本発明は、文字を含む画像において、JPEG等の非可逆圧縮方式で圧縮された画像を伸張した時に文字の周辺に発生するモスキートノイズを軽減することができる画像処理システムおよび画像処理方法を提供することを目的とするものである。
The present invention provides an image processing system and an image processing method capable of reducing mosquito noise generated around a character when an image compressed by an irreversible compression method such as JPEG is expanded in an image including the character. It is intended to do.
また、本発明は、境界部分に発生する文字色の鈍りを抑えることができ、良好な復元画像を生成することができる画像処理システムおよび画像処理方法を提供することを目的とする。
It is another object of the present invention to provide an image processing system and an image processing method capable of suppressing the dullness of the character color that occurs at the boundary portion and generating a good restored image.
本発明の画像処理システムは、処理対象の画像を供給する画像供給装置と、前記画像供給装置により供給された画像の処理を行う画像処理装置とを有する画像処理システムであって、前記画像供給装置は、文字データを文字画像に変換する変換手段と、前記変換手段により変換された文字画像を非可逆圧縮方式により圧縮し、圧縮画像を生成する圧縮手段と、前記変換手段により変換された文字画像のアウトラインを示すマスクデータを生成する生成手段と、前記圧縮手段により生成された圧縮画像と前記生成手段により生成されたマスクデータとを供給する供給手段とを有し、前記画像処理装置は、前記画像供給装置から供給された圧縮画像とマスクデータとを取得する取得手段と、前記取得手段により取得された圧縮画像を伸張する伸張手段と、前記伸張手段により伸張された圧縮画像に対応する文字画像の内部領域及び周辺領域の色を、前記取得手段により取得されたマスクデータに基づき決定する決定手段とを有し、前記決定手段は、前記マスクデータに基づき、処理対象の画素とその周囲の画素が、同一文字画像の内部領域に存在するかまたは周辺領域に存在するか判定し、当該処理対象の画素とその周囲の画素のうち同一文字画像の同じ領域に存在する画素に従って前記処理対象の画素の色を決定することを特徴とする。An image processing system according to the present invention is an image processing system including an image supply device that supplies an image to be processed, and an image processing device that processes an image supplied by the image supply device. Conversion means for converting character data into a character image, compression means for compressing the character image converted by the conversion means by an irreversible compression method and generating a compressed image, and the character image converted by the conversion means Generating means for generating mask data indicating the outline of the image, and supply means for supplying the compressed image generated by the compressing means and the mask data generated by the generating means. An acquisition unit that acquires a compressed image and mask data supplied from an image supply device, and a decompression that expands the compressed image acquired by the acquisition unit And determining means for determining the color of the inner area and the peripheral area of the character image corresponding to the compressed image expanded by the expanding means based on the mask data acquired by the acquiring means, Is based on the mask data, determines whether the pixel to be processed and its surrounding pixels are in the internal region or the peripheral region of the same character image, and determines whether the pixel to be processed and its surrounding pixels are Among them, the color of the pixel to be processed is determined according to the pixels existing in the same area of the same character image.
本発明によれば、文字が多層に配置されている文書データにおいて、JPEG圧縮時に文字の周辺に発生するモスキートノイズを軽減することができるという効果を奏する。
According to the present invention, it is possible to reduce mosquito noise generated around characters in JPEG compression in document data in which characters are arranged in multiple layers.
発明を実施するための最良の形態は、次の実施例である。 The best mode for carrying out the invention is the following embodiment.
図1は、本発明の実施例1であるプリンタ装置100の概観斜視図である。
FIG. 1 is a schematic perspective view of a
プリンタ装置100は、画像処理装置の例であり、ホストコンピュータ(PC)からデータを受信して印刷する通常のPCプリンタとしての機能を有する。
The
また、プリンタ装置100は、メモリカード等の記憶媒体に記憶されている画像データを直接読み取って印刷する機能、又はデジタルカメラやPDA等からの画像データを受信して印刷する機能を備えている。なお、プリンタ装置100は、読取部を使用して、スキャナとしての機能を発揮し、また、コピー機としての機能を発揮する装置であってもよい。
The
プリンタ装置100は、表示部1と、操作部2と、カードインタフェース3と、読取部4と、記録部5とを有する。
The
図2は、プリンタ装置100の構成を示す図である。
FIG. 2 is a diagram illustrating a configuration of the
プリンタ装置100は、図1に示す部材以外に、CPU20と、ROM21と、RAM22と、不揮発性RAM23と、画像処理部24と、駆動部25と、センサ部26とを有する。
In addition to the members shown in FIG. 1, the
CPU20は、ROM21からプログラムコードをRAM22にロードして動作する。また、動作時には、不揮発性RAM23からも、以前に保存された設定情報に基づいて動作することもある。
The
プリンタ装置100は、操作部2からユーザの入力を受け、たとえばカードインタフェース3から画像データの供給を受け、画像処理部24が画像処理を施した後に、記録部5が印字する。
The
また、読取部4が画像をスキャンし、画像処理部24が画像処理を施した後に、記録部5が印字することによって、コピー機能を実現する。駆動部25は、本体を駆動し、また、表示部1は、ユーザインタフェースの表示に使用される。
Further, after the reading unit 4 scans an image and the
次に、プリンタシステムPS1の構成について説明する。 Next, the configuration of the printer system PS1 will be described.
図3は、プリンタ装置100を含むプリンタシステムPS1を示すブロック図である。
FIG. 3 is a block diagram showing a printer system PS1 including the
プリンタシステムPS1は、プリンタ装置100と、プリンタ制御装置40と、表示装置31と、入力装置32とを有する。
The printer system PS1 includes a
表示装置31は、プリンタ制御装置40が生成した画像を表示する装置である。入力装置32は、プリンタ制御装置40に画像を入力する装置である。
The
プリンタ制御装置40は、その内部に保存領域43が設けられ、表示装置31と入力装置32とに接続されている。また、プリンタ制御装置40は、双方向インタフェースによって、プリンタ装置100と接続されている。プリンタシステムPS1において、プリンタ制御装置40内では、印刷用データが生成され、プリンタ装置100が印字する。以上が、プリンタシステムPS1の概要である。
The
次に、プリンタシステムPS1の主要な処理について説明する。 Next, main processes of the printer system PS1 will be described.
図4は、プリンタシステムPS1で印刷するデータの例を示す図である。 FIG. 4 is a diagram illustrating an example of data to be printed by the printer system PS1.
このデータには、画像、文字、グラフィックスのデータが含まれている。 This data includes image, character, and graphics data.
次に、プリンタシステムPS1の構成について説明する。 Next, the configuration of the printer system PS1 will be described.
図5は、プリンタシステムPS1の構成を示す図である。 FIG. 5 is a diagram illustrating the configuration of the printer system PS1.
プリンタシステムPS1は、プリンタ制御装置40とプリンタ装置100とを有する。プリンタ制御装置40内には、プリンタドライバ41が配置されている。プリンタドライバ41は、印刷データ入手部411と、全画像データ生成部412と、文字画像データ生成部413と、圧縮データ生成部414と、マスクデータ生成部415と、データ出力部416とを有する。また、プリンタ制御装置40は、データ送信部42と保存領域43とを有する。
The printer system PS1 includes a
プリンタ装置100は、データ受信部51と、圧縮データデコード部52と、マスクデータ解析部53と、塗り潰し色/周辺色決定部54と、印字データ生成部55と、データ印字部56とを有する。
The
プリンタ装置100とプリンタ制御装置40とは、双方向インタフェースで接続されている。プリンタ制御装置40内のプリンタドライバ41が、図4に示すデータを、プリンタに送信するデータに変換する。
The
プリンタドライバ41では、まず、印刷データ入手部411が、印刷データを入手する。この入手されたデータを、全画像データ生成部412が、多値のRGBデータとして、メモリ上にレンダリングする。また、印刷データのうちで、文字データについては、文字画像データ生成部413が、文字のみのRGBデータとして、別メモリ上にレンダリングする。
In the printer driver 41, first, the print
図6は、入力印刷データと、2つのメモリ上のレンダリング結果とを示す図である。 FIG. 6 is a diagram illustrating input print data and rendering results on two memories.
図6(A)は、任意の入力画像を示す図であり、図6(B)は、入力画像をメモリ上にデジタルデータとしてレンダリングした全画像レンダリング結果を示す図であり、図6(C)は、文字部のみのレンダリング結果を示す図である。 FIG. 6A is a diagram showing an arbitrary input image, and FIG. 6B is a diagram showing the entire image rendering result obtained by rendering the input image as digital data on the memory, and FIG. FIG. 10 is a diagram illustrating a rendering result of only a character part.
印刷データ上には、文字、画像、グラフィックス等のオブジェクトが存在し、それぞれに対して重なりが存在する。このために、図6(C)に示すように、文字部分のレンダリング結果は、上から見える文字のみであるとする。図6(C)において、画像によって文字列の一部が切れたような結果になっている。 On the print data, there are objects such as characters, images, and graphics, and there is an overlap for each. For this reason, as shown in FIG. 6C, it is assumed that the rendering result of the character portion is only the characters visible from above. In FIG. 6C, the result is that a part of the character string is cut off by the image.
次に、全画像データ生成部412がレンダリングした全画像を、圧縮データ生成部414が、圧縮処理し、この圧縮データは、保存領域43に保存される。圧縮する場合、JPEG等の非可逆の圧縮方法を利用する。これによって、転送するデータ量を削減する。一方、文字画像データ生成部413で生成された文字部画像(C)は、マスクデータ生成部415に渡され、後述する動作によって、マスクデータが生成され、同じく保存領域43に保存される。
Next, the compressed
さらに、生成された圧縮データとマスクデータとは、保存領域43から読み出され、データ出力部416が、データ送信部42を介して、プリンタ装置100に送信する。以上が、プリンタ制御装置40における処理である。
Further, the generated compressed data and mask data are read from the
次に、プリンタ装置100の処理について説明する。
Next, processing of the
プリンタ制御装置40から送信されたデータは、データ受信部51が受信する。受信したデータのうちで、圧縮データを、圧縮データデコード部52がデコード処理する。
Data transmitted from the
図7は、デコードされた結果を示す図である。 FIG. 7 is a diagram showing the decoded result.
図7(A)の結果は、非可逆に圧縮されたデータを伸長したものであるので、文字周りには、JPEG圧縮におけるモスキートノイズや文字内部に色の鈍りが発生している。なお、図7(A)に示す文字周りのモスキートノイズや文字内部の色の鈍りを、図22に示してある。 Since the result of FIG. 7A is obtained by decompressing irreversibly compressed data, mosquito noise in JPEG compression and color dullness are generated around the character. Note that the mosquito noise around the character shown in FIG. 7A and the dullness of the color inside the character are shown in FIG.
次に、マスクデータ解析部53が、受信したマスクデータを解析処理する。上記「マスクデータ」は、図7(B)に示すように、文字部分のみのデータである。
Next, the mask
次に、圧縮データデコード部52が伸長したデータと、マスクデータ解析部53による解析結果とに基づいて、塗り潰し色/周辺色決定部54が、伸長されたデータの文字部分と周辺とに適用する色を決定する。本処理の詳細は後述する。
Next, based on the data expanded by the compressed
決定された塗り潰し色と、周辺色とによって、印字データ生成部55がデコードしたデータに対して、上書き処理を施し、データ印字部56が印字する。図7(C)は、印刷結果を示す図である。以上が、プリンタ装置100の処理である。
Based on the determined fill color and peripheral color, the data decoded by the print
次に、プリンタ装置100の処理動作について説明する。
Next, the processing operation of the
図8は、プリンタ装置100の処理動作を示すフローチャートである。
FIG. 8 is a flowchart showing the processing operation of the
S0で、プリンタ制御装置40内の処理が開始され、S1で、全圧縮データが生成され、S2で、マスクデータが生成され、S3で、両データがプリンタ装置に送信される。S4で、プリンタ装置が圧縮データとマスクデータとを受信し、S5で、圧縮データをデコードする。S6で、マスクデータを解析し、S7で、文字内と文字周りとについて、塗り潰し色と周辺色とを決定する。最後に、S8で、印刷処理を行い、S9で、終了する。以上が、本システムの概略動作である。
In S0, processing in the
次に、図5に示す全画像データ生成部412〜マスクデータ生成部415の処理動作について、詳細に説明する。
Next, the processing operation of all image
図9は、全画像データ生成部412〜マスクデータ生成部415の処理動作を示すフローチャートである。
FIG. 9 is a flowchart showing processing operations of the all-image
S10で、プリンタドライバの処理が開始され、S11で、全てのオブジェクトの描画が終了したかどうかを判断する。上記「オブジェクト」は、文字、画像、グラフィックス等である。全オブジェクトの描画が終了していなければ、S12で、対象オブジェクトを入手する。S13で、対象オブジェクトを、全画像用メモリにレンダリングする。この処理によって、印刷対象の全てのデータが、全画像用メモリにレンダリングされる。 In step S10, the printer driver process is started. In step S11, it is determined whether drawing of all objects has been completed. The “object” is a character, an image, graphics, or the like. If all the objects have not been drawn, the target object is obtained in S12. In S13, the target object is rendered in the memory for all images. By this processing, all data to be printed is rendered in all image memories.
S14で、対象オブジェクトが文字であるかどうかを判断する。対象オブジェクトが文字であれば、S15で、全画像用メモリと同様に、文字を文字画像用メモリにレンダリングする。この処理によって、文字画像用メモリ上に、文字データがレンダリングされる。 In S14, it is determined whether the target object is a character. If the target object is a character, in S15, the character is rendered in the character image memory in the same manner as the all image memory. By this processing, the character data is rendered on the character image memory.
一方、対象オブジェクトが文字でなければ、S16で、対象オブジェクトを文字画像用メモリ上に、白領域としてレンダリングする。以上の処理によって、文字画像用メモリ上には、文字データのみがレンダリングされる。また、他のオブジェクトが描画順に従って文字部を上書きすれば、文字の一部が削られる可能性もある。 On the other hand, if the target object is not a character, in S16, the target object is rendered as a white area on the character image memory. With the above processing, only character data is rendered on the character image memory. Further, if another object overwrites the character part in accordance with the drawing order, a part of the character may be deleted.
上記処理を施し、S11に戻る。S11で、全てのオブジェクトの生成が終了したと判断されると、S17で、全画像用メモリの内容をJPEGデータに変換する。次に、S18で、後述するマスクデータ処理によって、マスクデータを生成する。以上の処理を施し、圧縮された印刷画像データとマスクデータとが作成され、処理を終了する。 The above process is performed, and the process returns to S11. If it is determined in S11 that the generation of all objects has been completed, the contents of all the image memories are converted into JPEG data in S17. Next, in S18, mask data is generated by mask data processing to be described later. By performing the above processing, compressed print image data and mask data are created, and the processing ends.
次に、S18におけるマスクデータ作成について説明する。 Next, mask data creation in S18 will be described.
図10は、S18におけるマスクデータ作成の動作を示すフローチャートである。 FIG. 10 is a flowchart showing the mask data creation operation in S18.
S20で、処理が開始され、S21で、文字画像用メモリとは異なる文字画像用バッファ2に、縦横2倍に拡大したデータを生成する。拡大する場合、公知の単純拡大技術を利用し、縦横に画素をコピーする。
In S20, the process is started, and in S21, data enlarged twice vertically and horizontally is generated in the
図11は、単純拡大の処理を示す図である。 FIG. 11 is a diagram illustrating a simple enlargement process.
任意の入力画像(A)の注目画素Xを、縦横に2倍に拡大した結果が、図11(B)に示す左上部分である。 The result of enlarging the target pixel X of an arbitrary input image (A) twice vertically and horizontally is the upper left portion shown in FIG.
図12は、文字部の元画像と、これを2倍に拡大した結果と、この結果からアウトラインを抽出した結果と、これを2値化した結果とを示す図である。 FIG. 12 is a diagram showing the original image of the character part, the result of enlarging it twice, the result of extracting the outline from this result, and the result of binarizing it.
図12(A)が、文字部の元画像であり、図12(B)が、2倍に拡大した結果である。 FIG. 12A shows the original image of the character part, and FIG. 12B shows the result of double enlargement.
次に、S22以下の処理において、文字画像のアウトラインデータを抽出する。まず、S22で、文字画像用バッファ2の全ラスタの処理が終了しているかどうかを判断する。処理が終了していなければ、S23で、参照画素を対象ラスタの左端にセットする。
Next, outline data of the character image is extracted in the processing from S22. First, in S22, it is determined whether or not the processing of all rasters in the
S24で、対象ラスタの全画素の処理が終了したかどうかを判断する。終了していなければ、S25で、参照画素が白データであるかどうかを判断する。白画素でなければ、S26で、内部のフラグがONかどうかを判断し、フラグがONであれば、S27で、参照画素が右端の画素であるかどうかを判断する。右端画素でなければ、S28で、対象画素の次の画素が白画素であるかどうかを判断し、白画素でなければ、S29で、対象画素を白画素で上書きし、S24に戻る。以上の処理で、1ラスタにおける文字領域内部の画素が白画素に変更される。 In S24, it is determined whether or not the processing of all pixels of the target raster has been completed. If not completed, it is determined in S25 whether the reference pixel is white data. If it is not a white pixel, it is determined in S26 whether the internal flag is ON. If the flag is ON, it is determined in S27 whether the reference pixel is the rightmost pixel. If it is not the right end pixel, it is determined in S28 whether or not the next pixel of the target pixel is a white pixel. If it is not a white pixel, the target pixel is overwritten with the white pixel in S29, and the process returns to S24. With the above processing, the pixels inside the character area in one raster are changed to white pixels.
一方、S27で、右端の画素であると判断されると、又は、S28で、次の画素が白画素であるとして判断されると、S30で、内部フラグをOFFに変更する。この場合、画素の上書きを行わない。以上の処理を施して、S24に戻るが、本処理は、1ラスタ上の文字以外の部分、又は右端画素での処理である。 On the other hand, if it is determined in S27 that the pixel is the rightmost pixel, or if it is determined in S28 that the next pixel is a white pixel, the internal flag is changed to OFF in S30. In this case, pixel overwriting is not performed. The above processing is performed and the process returns to S24. This processing is processing at a portion other than the character on one raster or the right end pixel.
また、S26で、フラグがOFFであれば、S31で、フラグをONにする。この処理は、1ラスタ上の文字の開始点を認識した場合であり、文字の開始点画素に上書きをしない。以上の処理で、1ラスタ上の文字部分について、左右端の画素のみを残し、内部画素を白で上書きし、アウトライン部分のみのデータを抽出したことになる。 If the flag is OFF in S26, the flag is turned ON in S31. This process is a case where the start point of the character on one raster is recognized, and the character start point pixel is not overwritten. With the above processing, only the left and right end pixels of the character portion on one raster are left, the internal pixels are overwritten with white, and only the outline portion is extracted.
また、S25で、参照画素が白画素であれば、文字領域の外であるので、処理を行わずに、S24に戻る。以上の処理を、全ラスタに対して繰り返す。 In S25, if the reference pixel is a white pixel, it is out of the character area, so the process returns to S24 without performing any processing. The above processing is repeated for all rasters.
図12(B)に示すアウトラインを抽出した結果が、図12(C)に示す図である。 The result of extracting the outline shown in FIG. 12B is the diagram shown in FIG.
次に、S32で、文字画像用バッファ2の内容を2値化する。本処理には、公知の2値化技術を用いるが、対象画素が白であるかどうかによって、各ビットを0又は1にセットする。
Next, in S32, the contents of the
図13は、2値化処理を示す図である。 FIG. 13 is a diagram illustrating binarization processing.
図13において、各画素のRGB値が白であるかどうかによって、対応するビットを1又は0に指定する。図13では、2画素分のデータを例としてあげているが、図13に示す画素1が「1」であり、図13に示す画素2が「0」である。従来は、1画素を、24ビットのRGBデータで表現しているが、本2値化処理では、1画素を、1ビットで表現することができる。図12(D)は、以上の処理を施した結果を示す図である。
In FIG. 13, the corresponding bit is designated as 1 or 0 depending on whether the RGB value of each pixel is white. In FIG. 13, data for two pixels is given as an example, but
次に、アウトライン部の抽出結果について説明する。 Next, the extraction result of the outline part will be described.
図14は、アウトラインを抽出した文字画像と、矢印部分を拡大した図である。 FIG. 14 is an enlarged view of a character image obtained by extracting an outline and an arrow portion.
図14(A)は、アウトラインを抽出した文字画像を示す図であり、図14(B)は、矢印部分の拡大図である。 FIG. 14A is a diagram showing a character image obtained by extracting an outline, and FIG. 14B is an enlarged view of an arrow portion.
図14(B)において、黒画素は、文字領域の左右端の画素であり、グレーの画素は、上記処理によって、白画素に置き換えられた画素である。また、白画素は、文字領域外の画素である。 In FIG. 14B, black pixels are pixels at the left and right ends of the character area, and gray pixels are pixels that have been replaced with white pixels by the above processing. White pixels are pixels outside the character area.
上記処理によって、多値の文字データから、2値のアウトラインデータを抽出する処理が終了し、この処理が終了したデータが、「マスクデータ」である。つまり、「マスクデータ」は、多値の文字データから、2値で示すアウトラインデータを抽出したデータである。 With the above process, the process of extracting the binary outline data from the multi-value character data is completed, and the data for which this process is completed is “mask data”. That is, “mask data” is data obtained by extracting outline data represented by binary values from multi-value character data.
次に、圧縮データコード部52〜印字データ生成部55の処理動作について説明する。
Next, processing operations of the compressed
図15は、圧縮データコード部52〜印字データ生成部55の処理動作を示すフローチャートである。
FIG. 15 is a flowchart showing processing operations of the compressed
S40で、プリンタ内の処理が開始される。S41で、受信したJPEG画像データをメモリ上に伸長する。伸長されたデータは、上記のように、文字部分の境界付近でモスキートノイズや色の鈍りが発生している可能性がある。 In S40, processing in the printer is started. In S41, the received JPEG image data is expanded on the memory. As described above, the expanded data may have mosquito noise or color dullness near the boundary of the character portion.
S42で、受信したマスクデータをメモリ上にレンダリングする。S43で、まず、マスクデータの全ラスタの処理が終了したかどうかを判断し、終了していなければ、S44で、マスクデータの対象画素が文字の一部(文字画像内)であるかどうかを判断する。文字の一部であれば、S45で、後述する手段によって、塗り潰し色を取得する。 In S42, the received mask data is rendered on the memory. In S43, it is first determined whether or not the processing of all rasters of the mask data has been completed. If not, it is determined in S44 whether or not the target pixel of the mask data is a part of a character (within a character image). to decide. If it is a part of a character, a fill color is acquired by means described later in S45.
S46で、参照しているマスクデータ画素に相対するJPEG画像の対象画素を塗り潰し色として、バッファ2に出力し、S43に戻る。S44で、文字画像の外であると判断されれば、S47で、対象画素が文字の周辺画素であるかどうかを判断する。本判断処理についても後に詳述する。
In S46, the target pixel of the JPEG image relative to the referenced mask data pixel is output as a fill color to the
S47で、周辺画素であると判断されると、S48で、後述する手段で周辺色を取得する。S49で、参照しているマスクデータ画素に相対するJPEG画像の対象画素を周辺色とし、バッファ2に出力し、S43に戻る。
If it is determined in S47 that the pixel is a peripheral pixel, a peripheral color is acquired by means described later in S48. In S49, the target pixel of the JPEG image relative to the mask data pixel being referred to is set as the peripheral color, and is output to the
また、S47で、文字の周辺画素ではないと判断されると、S50で、マスクデータ画素に相対するJPEG画像の対象画素を、バッファ2にコピーし、S43に戻り、全ラスタの処理が終了するまで、S43〜S50の処理を繰り返す。全ラスタの処理が終了した場合、S51で、バッファ2の内容を印字し、処理を終了する。以上が、プリンタ内における主な動作である。
If it is determined in S47 that the pixel is not a peripheral pixel of the character, the target pixel of the JPEG image relative to the mask data pixel is copied to the
次に、塗り潰し色の決定方法について説明する。 Next, a method for determining the fill color will be described.
図16は、文字Aの上位部分のアウトラインマスクデータであり、1マスは、対応するJPEG画像の1MCUを示す図である。 FIG. 16 shows outline mask data of the upper part of the character A, and one square shows one MCU of the corresponding JPEG image.
上記「1MCU」は、たとえば、8x8画素で構成されている。マスクデータは、上記のように、オリジナルサイズに対して、2倍(1画素を4画素)に拡大されているが、オリジナルJPEG画像との対比を明確にするために、図16では、4画素を1画素として表現している。また、図16に示す(1)と(2)とは、ともに文字領域内に位置するMCUを表しているが、注目画素が、このMCU内の任意の1画素である意味としても使用する。 The “1 MCU” is composed of, for example, 8 × 8 pixels. As described above, the mask data is enlarged twice as much as the original size (1 pixel is 4 pixels). In order to clarify the comparison with the original JPEG image, the mask data is 4 pixels in FIG. Is expressed as one pixel. Moreover, although (1) and (2) shown in FIG. 16 both represent MCUs located in the character area, they are also used to mean that the target pixel is an arbitrary pixel in this MCU.
図17は、実施例1において塗り潰し色を決定する処理を示すフローチャートである。 FIG. 17 is a flowchart illustrating processing for determining a fill color in the first embodiment.
まず、図17において、S61で、注目画素が入っているMCU(以後、「対象MCU」という)を決定する。図16に示す(1)と(2)とが、注目画素の入っているMCUであるが、MCUの決定は、注目画素に対応するJPEG画像上の画素を見つけ出すことであり、容易に決定することができる。 First, in FIG. 17, in S61, the MCU containing the target pixel (hereinafter referred to as “target MCU”) is determined. Although (1) and (2) shown in FIG. 16 are MCUs containing the target pixel, the determination of the MCU is to find a pixel on the JPEG image corresponding to the target pixel and is easily determined. be able to.
次に、S62で、対象MCUが接する周囲のMCU(以後、「周囲MCU」という)を決定する。図16に示す(1)、(2)のそれぞれに隣接する黒又はグレーのMCUが対象MCUである。 Next, in S62, surrounding MCUs with which the target MCU is in contact (hereinafter referred to as “surrounding MCUs”) are determined. A black or gray MCU adjacent to each of (1) and (2) shown in FIG. 16 is the target MCU.
次に、S63で、対象MCUと周囲MCUとに含まれている全ての画素が、文字領域内に存在するかどうかを判断する。全てが存在する場合(図16に示す(1)の場合)は、S64で、注目画素に、塗り潰し色を付与するように決定する。また、S63で、一部のMCUが、文字領域外にある画素を含んでいると判断されると(図16に示す(2)の場合)、S65で、文字領域外の画素を含んだMCU(図16では、グレーのMCU)を除いた周囲MCU内の全画素の平均値を求める。 Next, in S63, it is determined whether all the pixels included in the target MCU and the surrounding MCU are present in the character area. If all are present (in the case of (1) shown in FIG. 16), it is determined in S64 that a fill color is given to the target pixel. If it is determined in S63 that some of the MCUs include pixels outside the character area (in the case of (2) shown in FIG. 16), MCUs including pixels outside the character area are detected in S65. The average value of all pixels in the surrounding MCU excluding (in FIG. 16, gray MCU) is obtained.
S66で、その平均値を塗り潰し色として決定する。図16に示す(2)の周囲の黒いMCUに、図16に示す(2)そのものを加えたものである。以上が、塗り潰し色の決定方法であるが、上記処理によって、色の鈍りがMCU内に閉じられるというMCUの特性を利用し、塗り潰し色決定の精度が向上される。JPEGの圧縮方式では、MCUブロックごとに符号化を行うので、符号化時に他のMCUに含まれる画素の影響が及ばない。 In S66, the average value is determined as a fill color. 16 is a black MCU around (2) shown in FIG. 16 plus (2) itself shown in FIG. The above is the method for determining the fill color. By the above process, the accuracy of the fill color determination is improved by utilizing the characteristic of the MCU that the dullness of the color is closed in the MCU. In the JPEG compression method, encoding is performed for each MCU block, so that the influence of pixels included in other MCUs does not affect at the time of encoding.
次に、実施例1において、周辺色を決定する方法について説明する。 Next, a method for determining the peripheral color in the first embodiment will be described.
図18は、文字Aの上位部分のアウトラインマスクデータを示す図である。 FIG. 18 is a diagram showing outline mask data of the upper part of the character A.
図18において、1マスは、対応するJPEG画像の1MCUであり、1MCUは、たとえば、8x8画素で構成されている。マスクデータは、上記のように、オリジナルサイズに対して、2倍(1画素を4画素)に拡大されているが、オリジナルJPEG画像との対比を明確にするために、図18では、4画素を1画素として表現している。 In FIG. 18, one square is one MCU of a corresponding JPEG image, and one MCU is composed of, for example, 8 × 8 pixels. As described above, the mask data is enlarged twice as much as the original size (1 pixel is 4 pixels), but in order to clarify the comparison with the original JPEG image, the mask data is 4 pixels in FIG. Is expressed as one pixel.
また、図18に示す(1)と(2)とは、ともに、文字領域内に位置するMCUを表しているが、注目画素が、このMCU内の任意の1画素である意味としても使用する。 Further, both (1) and (2) shown in FIG. 18 represent MCUs located in the character area, but they are also used to mean that the target pixel is any one pixel in this MCU. .
図19は、実施例1において、周辺色を決定する処理を示すフローチャートである。 FIG. 19 is a flowchart illustrating processing for determining a peripheral color in the first embodiment.
まず、S71で、注目画素が入っているMCU(以後、「対象MCU」という)を決定する。図18における(1)と(2)とが、注目画素の入っているMCUであるが、MCUを決定する場合、注目画素に対応するJPEG画像上の画素を見つけ出すことによって、MCUを容易に決定することができる。 First, in S71, the MCU containing the pixel of interest (hereinafter referred to as “target MCU”) is determined. In FIG. 18, (1) and (2) are MCUs containing the target pixel. When determining the MCU, the MCU is easily determined by finding the pixel on the JPEG image corresponding to the target pixel. can do.
次に、S72で、対象MCUが接する周囲のMCU(以後、「周囲MCU」という)を決定する。図18における(1)と(2)とに隣接する黒又はグレーのMCUが、周囲MCUである。 Next, in S72, peripheral MCUs with which the target MCU is in contact (hereinafter referred to as “surrounding MCUs”) are determined. The black or gray MCU adjacent to (1) and (2) in FIG. 18 is the surrounding MCU.
次に、S73で、周囲MCUの中で、MCUに含まれている全ての画素が、文字領域外に存在するMCUであるかどうかを判断する。図18では、黒いMCUがその対象である。対象となる周囲MCU(黒いMCU)が存在すれば、S74で、それらの周囲MCU(黒いMCU)内に存在する文字領域外の画素の平均値を求める(全ての黒いMCUの全画素の平均値を求める)。上記「画素の平均値」は、各画素のYCbCr値の平均を求めた値であり、Y=(Y1+Y2+・・・・+Yn)/nによって求めることができる。またCb、Cr値についても同様である。 Next, in S73, it is determined whether or not all the pixels included in the MCU among the surrounding MCUs are MCUs that exist outside the character area. In FIG. 18, the black MCU is the target. If there is a target peripheral MCU (black MCU), in S74, an average value of pixels outside the character area existing in those peripheral MCUs (black MCU) is obtained (average value of all pixels of all black MCUs). Seeking). The above “average pixel value” is a value obtained by calculating the average of the YCbCr values of the respective pixels, and can be determined by Y = (Y1 + Y2 +... + Yn) / n. The same applies to the Cb and Cr values.
S75で、MCU(1)又はMCU(2)の各画素と平均値との差を求める。S76で、上記差が予め定めた閾値を超える画素が、1画素でも存在するどうかを判断し、存在すれば、S77で、注目画素の色をその画素に対する周辺色とする。つまり、注目画素を周辺色に置き換えたとしても同じ色に置き換えられるようにする。言い換えれば、注目画素の色が変わらないようにする。 In S75, the difference between each pixel of MCU (1) or MCU (2) and the average value is obtained. In S76, it is determined whether or not there is at least one pixel whose difference exceeds a predetermined threshold value. If there is one, in S77, the color of the pixel of interest is set as the peripheral color for that pixel. That is, even if the pixel of interest is replaced with a peripheral color, the pixel is replaced with the same color. In other words, the color of the target pixel is not changed.
一方、全ての画素の差が、閾値以内であれば、S78で、文字領域を含まない周囲MCUの全画素について、同じ色であるかどうか(各画素の色の違いが所定範囲内であるかどうか)を判断する。同じ色であれば、S79で、対象色(黒いMCUの全画素の平均値の色)を周辺色として決定する。これは、文字領域を含まない周囲MCU内では色の変化が平坦であるため、MCU(1)又はMCU(2)の全画素を前述の平均値の色に置き換えることにより、文字周辺の色の鈍りを消すためである。また、同じ色でなければ、S80で、対象画素を周辺色とする。これは周囲MCU内に極端に色が異なる部分があれば、周囲MCU(黒いMCU)内にある画素の色の平均値は、周囲MCUの色とは異なるものになるため、注目画素がその異なる色に置き換えられることを防止するためである。また、S73で、周囲MCUの中で、MCUに含まれている全ての画素が、文字領域外に存在するMCUではないと判断されれば、上記と同様に、S80に進み処理を終了する。 On the other hand, if the difference between all the pixels is within the threshold value, in S78, whether or not all the pixels in the surrounding MCU not including the character area are the same color (whether the color difference of each pixel is within a predetermined range). Please). If they are the same color, the target color (the average color value of all the pixels of the black MCU) is determined as a peripheral color in S79. This is because the color change is flat in the surrounding MCU that does not include the character area, and therefore, by replacing all the pixels of the MCU (1) or MCU (2) with the color of the above average value, This is to eliminate dullness. If they are not the same color, the target pixel is set as a peripheral color in S80. This is because if the surrounding MCU has extremely different colors, the average value of the colors of the pixels in the surrounding MCU (black MCU) will be different from the colors of the surrounding MCU. This is to prevent the color from being replaced. If it is determined in S73 that all the pixels included in the MCU among the surrounding MCUs are not MCUs existing outside the character area, the process proceeds to S80 and the process is terminated as described above.
以上が、周辺色の決定方法であるが、本フローチャートは、モスキートノイズがMCU内に閉じられるというMCUの特性を利用するものであり、周辺色決定の精度を向上させることができる。 The above is the determination method of the peripheral color. This flowchart uses the characteristic of the MCU that the mosquito noise is closed in the MCU, and the accuracy of determining the peripheral color can be improved.
次に、図15に示すS47でマスクデータ上の対象画素が文字の周辺かどうかを判断する手段について説明する。 Next, a means for determining whether or not the target pixel on the mask data is in the vicinity of the character in S47 shown in FIG.
図20は、JPEGを伸長した画像と、マスクデータと、それぞれのデータの1ラスタデータとを示す図である。 FIG. 20 is a diagram illustrating an image obtained by decompressing JPEG, mask data, and one raster data of each data.
図20の(A)は、JPEGを伸長した画像であり、図20の(B)は、マスクデータである。図20の(C)、(D)は、各データの1ラスタデータを示す図である。 20A shows an image obtained by decompressing JPEG, and FIG. 20B shows mask data. 20C and 20D are diagrams showing one raster data of each data.
モスキートノイズは、文字の境界の外側に発生する可能性がある。図20の(B)に示すXとYとは、文字の境界の外側の画素であるが、同一MCU内であれば、さらに外側の画素(グレー画素の部分)に発生する可能性もある。このために、この判断手段は、対象画素が、同一MCU内に文字の境界画素が存在するかどうかを判断することによって、実現可能である。 Mosquito noise can occur outside character boundaries. X and Y shown in (B) of FIG. 20 are pixels outside the boundary of the character. However, if they are within the same MCU, they may occur in a further outer pixel (gray pixel portion). For this reason, this determination means can be realized by determining whether or not the target pixel has a character boundary pixel in the same MCU.
以上が、実施例1の詳細な説明である。 The above is the detailed description of the first embodiment.
実施例1によれば、プリンタに送信するデータが、圧縮画像と2値のマスクデータとであるので、ラスタデータと比較すると、送信データ量を削減することができ、印刷速度を向上させることができる。 According to the first embodiment, since the data to be transmitted to the printer is the compressed image and the binary mask data, the amount of transmission data can be reduced and the printing speed can be improved as compared with the raster data. it can.
また、実施例1によれば、マスクデータを利用して文字の周辺を、周辺色で塗りつぶすことができるので、圧縮画像内の文字の周辺に発生しているモスキートノイズを低減することができ、良好な印刷結果を得ることができる。 Further, according to the first embodiment, the periphery of the character can be filled with the peripheral color using the mask data, so that the mosquito noise generated around the character in the compressed image can be reduced, Good printing results can be obtained.
さらに、上記実施例によれば、マスクデータを利用して、文字領域に、塗りつぶし色で塗りつぶすことができるので、文字部の境界に発生している文字色の鈍りを低減することができ、良好な印刷結果を得ることができる。
Furthermore, according to the above embodiment, the mask data can be used to fill the character area with the fill color, so that it is possible to reduce the dullness of the character color occurring at the boundary of the character portion, which is favorable. Printing results can be obtained.
本発明の実施例2は、プリンタに搭載しているカード入力機器から、文書画像を入力する場合の実施例である。 The second embodiment of the present invention is an embodiment in the case of inputting a document image from a card input device mounted on a printer.
実施例2に係るプリンタハードウェア構成は、上記実施例1と同様であるので、その説明を省略する。また、実施例2に係るプリンタ内の構成についても、上記実施例1と同様であるので、図2及び図4を引用し、その説明を省略する。 Since the printer hardware configuration according to the second embodiment is the same as that of the first embodiment, the description thereof is omitted. Further, the configuration in the printer according to the second embodiment is also the same as that of the first embodiment, so that FIG. 2 and FIG. 4 are cited and the description thereof is omitted.
実施例2であるプリンタシステムPS2で印刷するデータの例は、図4に示すデータの例と同じである。本データには、画像、文字、グラフィックスのデータが含まれている。
An example of data to be printed by the printer system PS2 that is
次に、プリンタシステムPS2の構成について、説明する。 Next, the configuration of the printer system PS2 will be described.
図21は、本発明の実施例2であるプリンタシステムPS2を示すブロック図である。
FIG. 21 is a block diagram illustrating a printer system PS2 that is
プリンタシステムPS2は、プリンタ制御装置60と、プリンタ装置200と、保存領域80とを有する。
The printer system PS2 includes a printer control device 60, a
プリンタ制御装置60は、プリンタドライバ61と、データ送信部62とを有する。
The printer control device 60 includes a
プリンタドライバ61は、印刷データ入手部611と、全画像データ生成部612と、文字画像データ生成部613と、圧縮データ生成部614と、マスクデータ生成部615と、データ出力部616とを有する。
The
次に、プリンタ装置200について説明する。
Next, the
プリンタ装置200は、データ受信部71と、圧縮データデコード部72と、マスクデータ解析部73と、塗り潰し色/周辺色決定部74と、印字データ生成部75と、データ印字部76とを有する。
The
プリンタ装置200とプリンタ制御装置60とは、双方向インタフェースで接続されている。また、メモリカード等の外部保存領域80が設けられている。
The
図4に示すデータは、プリンタ制御装置60内のプリンタドライバ61が、プリンタに送信するデータに変換される。プリンタドライバ61では、まず、印刷データ入手部611が印刷データを入手する。この入手されたデータを、全画像データ生成部612が、多値のRGBデータとしてメモリ上にレンダリングする。
The data shown in FIG. 4 is converted into data that the
また、印刷データのうちで文字データについて、文字画像データ生成部613が、文字のみのRGBデータとして、別メモリ上にレンダリングする。この状態の入力印刷データと、上記2つのメモリ上のレンダリング結果とを示す図が、図6である。図6の(A)は、任意の入力画像であり、図6の(B)が、全画像レンダリング結果であり、図6の(C)が、文字部のみのレンダリング結果である。印刷データ上には、文字、画像、グラフィックス等のオブジェクトが存在するが、それぞれに対して重なりが存在する。
Further, the character image
このために、図6の(C)に示すように、文字部分のレンダリング結果は、最上位レイアに存在する文字のみとする。図6(C)において、画像によって文字列の一部が切れた結果となっている。 For this reason, as shown in FIG. 6C, the rendering result of the character part is only the character existing in the highest layer. In FIG. 6C, a part of the character string is cut off by the image.
次に、全画像データ生成部612がレンダリングした全画像を、圧縮データ生成部614が圧縮処理し、この圧縮データは、外部保存領域80に保存される。圧縮する場合、JPEG等の非可逆の圧縮方法を利用する。
Next, the compressed
これによって、転送するデータ量を削減することができる。一方、文字画像データ生成部613が生成した文字部画像(C)は、マスクデータ生成部615に渡され、後述する処理によって、マスクデータを生成し、同じく外部保存領域80に保存される。以上が、プリンタ制御装置60における処理である。
As a result, the amount of data to be transferred can be reduced. On the other hand, the character part image (C) generated by the character image
次に、プリンタ装置200の処理について説明する。
Next, processing of the
プリンタ制御装置60において、外部保存領域80は、プリンタ内のカードスロットに装着される。プリンタ装置200のユーザインタフェースからの指令によって、外部保存領域80から、圧縮データとマスクデータとが読み出される。読み出されたデータは、データ受信部71が受信する。
In the printer control device 60, the
受信したデータのうちで、圧縮データは、圧縮データデコード部72がデコード処理する。デコードされた結果が、図7の(A)である。図7の(A)の結果は、非可逆に圧縮されたデータを解凍したものであるので、文字周りには、JPEG圧縮におけるモスキートノイズや文字内部に色の鈍りが発生している。
Among the received data, the compressed
次に、マスクデータ解析部73が、受信したマスクデータを解析処理する。マスクデータは、図7の(B)における文字部分のみのデータである。次に、塗り潰し色/周辺色決定部74が、圧縮データデコード部72がデコードしたデータと、マスクデータ解析部73が行った解析結果をデコードしたデータとの文字部分と周辺とに適用する色を決定する。本処理の詳細は、後述する。
Next, the mask
決定された塗り潰し色と周辺色とによって、印字データ生成部75が、デコードされたデータに上書き処理し、データ印字部76が印字する。図7の(C)が、印刷結果である。以上が、プリンタ装置200の処理である。
The print
以上が、実施例2におけるプリンタシステムPS2の動作である。 The above is the operation of the printer system PS2 in the second embodiment.
また、実施例2に関わる他の処理は、実施例1における処理と同様であるので、その説明を省略する。 In addition, since other processes related to the second embodiment are the same as the processes in the first embodiment, the description thereof is omitted.
実施例2によれば、外部保存領域80に保存するデータが、圧縮画像と2値のマスクデータとであるので、ラスタデータと比較して、送信データ量を削減することができ、印刷速度を向上させることができる。
According to the second embodiment, since the data stored in the
また、実施例2によれば、マスクデータを利用して文字の周辺を、周辺色で塗りつぶすことができるので、圧縮画像内の文字の周辺に発生しているモスキートノイズを低減することができ、良好な印刷結果を得ることができる。 Further, according to the second embodiment, since the periphery of the character can be painted with the peripheral color using the mask data, mosquito noise generated around the character in the compressed image can be reduced, Good printing results can be obtained.
さらに、実施例2によれば、マスクデータを利用して文字領域に、塗りつぶし色で塗りつぶすことができるので、文字部の境界に発生している文字色の鈍りを低減することができ、良好な印刷結果を得ることができる。
Furthermore, according to the second embodiment, it is possible to fill the character area with the fill color using the mask data, so that it is possible to reduce the dullness of the character color generated at the boundary of the character portion, which is favorable. Printing results can be obtained.
本発明の実施例3は、実施例1の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体である。 A third embodiment of the present invention is a storage medium that records a program code of software that realizes the functions of the first embodiment.
プリンタ装置100のコンピュータ(又はCPUやMPU)が、記憶媒体に格納されているプログラムコードを読み出し実行する実施例である。
In this embodiment, the computer (or CPU or MPU) of the
この場合、記憶媒体から読み出されたプログラムコード自体が、実施例1の機能を実現し、このプログラムコードを記憶した記憶媒体は、本発明を構成する。 In this case, the program code itself read from the storage medium realizes the function of the first embodiment, and the storage medium storing the program code constitutes the present invention.
このようなプログラムコードを供給するための記憶媒体は、たとえば、フロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROMである。 The storage medium for supplying such program code is, for example, a floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, nonvolatile memory card, ROM. is there.
また、コンピュータが読み出したプログラムコードを実行することによって、上記実施例の機能が実現される。加えて、そのプログラムコードの指示に基づいて、コンピュータ上で稼動しているOS(オペレーティングシステム)等が、実際の処理の一部又は全部を実行し、この処理によって、上記実施例の機能が実現される場合も含まれる。 Further, the functions of the above-described embodiments are realized by executing the program code read by the computer. In addition, the OS (operating system) running on the computer executes part or all of the actual processing based on the instruction of the program code, and the functions of the above embodiments are realized by this processing. This is also included.
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続されている機能拡張ユニットに設けられているメモリに書き込まれた場合においても、実現される。そのプログラムコードの指示に基づいて、その機能拡張ボードや機能拡張ユニットに備わるCPU等が、実際の処理の一部又は全部を実行し、その処理によって、上記実施例の機能が実現される場合も含む。 Furthermore, the present invention is realized even when the program code read from the storage medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. The CPU of the function expansion board or function expansion unit executes part or all of the actual processing based on the instruction of the program code, and the functions of the above embodiments may be realized by the processing. Including.
すなわち、読取部4は、文書データ内の各オブジェクトを、イメージ画像に変換する第1の変換手段の例であり、文字オブジェクトのみを、イメージ画像に変換する第2の変換手段の例である。 That is, the reading unit 4 is an example of a first conversion unit that converts each object in the document data into an image image, and is an example of a second conversion unit that converts only a character object into an image image.
画像処理部24は、上記第1の変換手段が変換したイメージ画像を圧縮して圧縮画像を生成する圧縮画像生成手段の例であり、上記第2の変換手段が変換したイメージ画像を変倍する画像変倍手段の例である。また、画像処理部24は、上記画像変倍手段が変倍した画像から、アウトライン画像を抽出するアウトライン画像抽出手段の例であり、上記抽出されたアウトライン画像に基づいて、マスク画像を生成するマスク画像生成手段の例である。さらに、画像処理部24は、上記圧縮画像を伸長する画像伸長手段の例であり、上記伸長された画像と上記マスク画像とに基づいて、文字の塗りつぶし色と文字の周辺色とを決定する色決定手段の例である。そして、画像処理部24は、上記伸長された画像と、上記マスク画像と、上記塗りつぶし色と、上記周辺色とに基づいて、画像を生成する画像生成手段の例である。
The
また、入力装置32は、上記画像処理装置に画像を入力する入力装置の例である。表示装置31は、上記画像処理装置が生成した画像を表示する表示装置の例である。
The
なお、上記実施例を方法の発明として把握することができる。つまり、上記実施例は、文書データ内の各オブジェクトを、イメージ画像に変換する第1の変換工程と、上記第1の変換工程で変換したイメージ画像を圧縮して圧縮画像を生成する圧縮画像生成工程とを実現する例である。また、上記実施例は、文字オブジェクトのみを、イメージ画像に変換する第2の変換工程と、上記第2の変換工程で変換したイメージ画像を変倍する画像変倍工程とを実現する例である。さらに、上記実施例は、上記画像変倍工程で変倍した画像から、アウトライン画像を抽出するアウトライン画像抽出工程と、上記抽出されたアウトライン画像に基づいて、マスク画像を生成するマスク画像生成工程とを実現する例である。そして、上記実施例は、上記圧縮画像を伸長する画像伸長工程と、上記伸長された画像と上記マスク画像とに基づいて、文字の塗りつぶし色と文字の周辺色とを決定する色決定工程とを実現する例である。また、上記実施例は、上記伸長された画像と、上記マスク画像と、上記塗りつぶし色と、上記周辺色とに基づいて、画像を生成する画像生成工程を実現する例である。
In addition, the said Example can be grasped | ascertained as a method invention. That is, in the above-described embodiment, the first conversion process for converting each object in the document data into an image and the compressed image generation for generating the compressed image by compressing the image image converted in the first conversion process. It is an example which implement | achieves a process. Moreover, the said Example is an example which implement | achieves the 2nd conversion process which converts only a character object into an image image, and the image scaling process which scales the image image converted by the said 2nd conversion process. . Further, the embodiment includes an outline image extraction step for extracting an outline image from the image scaled in the image scaling step, and a mask image generation step for generating a mask image based on the extracted outline image; It is an example which implement | achieves. The embodiment includes an image expansion step of expanding the compressed image, and a color determination step of determining a character fill color and a character peripheral color based on the expanded image and the mask image. This is an example of realization. The above embodiment is an example of realizing an image generation process for generating an image based on the expanded image, the mask image, the fill color, and the peripheral color.
100…プリンタ装置、
1…表示部、
2…操作部、
4…読取部、
5…記録部、
20…CPU、
31…表示装置、
32…入力装置、
PS1…プリンタシステム、
40…プリンタ制御装置、
41…プリンタドライバ、
411…印刷データ入手部、
412…全画像データ生成部、
413…文字画像データ生成部、
414…圧縮データ生成部、
415…マスクデータ生成部、
416…データ出力部、
42…データ送信部、
51…データ受信部、
52…圧縮データデコード部、
53…マスクデータ解析部、
54…塗りつぶし色/周辺色決定部、
55…印字データ生成部、
56…データ印字部、
PS2…プリンタシステム、
60…プリンタ制御装置、
61…プリンタドライバ、
200…プリンタ装置。
100: Printer device,
1 ... display part,
2 ... operation part,
4 ... reading unit,
5 ... Recording part,
20 ... CPU,
31 ... display device,
32 ... Input device,
PS1 ... Printer system,
40. Printer control device,
41 ... printer driver,
411 ... print data acquisition unit,
412 ... all image data generation unit,
413 ... a character image data generation unit,
414 ... a compressed data generation unit,
415 ... Mask data generation unit,
416 ... Data output unit,
42 ... data transmission unit,
51: Data receiving unit,
52 ... Compressed data decoding unit,
53. Mask data analysis unit,
54: Fill color / peripheral color determination section,
55. Print data generation unit,
56: Data printing section,
PS2 ... Printer system,
60 ... Printer control device,
61 ... Printer driver,
200: Printer device.
Claims (3)
前記画像供給装置は、
文字データを文字画像に変換する変換手段と、
前記変換手段により変換された文字画像を非可逆圧縮方式により圧縮し、圧縮画像を生成する圧縮手段と、
前記変換手段により変換された文字画像のアウトラインを示すマスクデータを生成する生成手段と、
前記圧縮手段により生成された圧縮画像と前記生成手段により生成されたマスクデータとを供給する供給手段とを有し、
前記画像処理装置は、
前記画像供給装置から供給された圧縮画像とマスクデータとを取得する取得手段と、
前記取得手段により取得された圧縮画像を伸張する伸張手段と、
前記伸張手段により伸張された圧縮画像に対応する文字画像の内部領域及び周辺領域の色を、前記取得手段により取得されたマスクデータに基づき決定する決定手段とを有し、
前記決定手段は、前記マスクデータに基づき、処理対象の画素とその周囲の画素が、同一文字画像の内部領域に存在するかまたは周辺領域に存在するか判定し、当該処理対象の画素とその周囲の画素のうち同一文字画像の同じ領域に存在する画素に従って前記処理対象の画素の色を決定することを特徴とする画像処理システム。 An image processing system having an image supply device for supplying an image to be processed and an image processing device for processing an image supplied by the image supply device,
The image supply device includes:
A conversion means for converting character data into a character image;
A compression unit that compresses the character image converted by the conversion unit using an irreversible compression method and generates a compressed image;
Generating means for generating mask data indicating an outline of the character image converted by the converting means;
Supply means for supplying a compressed image generated by the compression means and mask data generated by the generation means;
The image processing apparatus includes:
Acquisition means for acquiring a compressed image and mask data supplied from the image supply device;
Decompression means for decompressing the compressed image acquired by the acquisition means;
Determining means for determining the color of the internal area and the peripheral area of the character image corresponding to the compressed image expanded by the expansion means based on the mask data acquired by the acquisition means;
The determination unit determines whether the pixel to be processed and its surrounding pixels are present in the internal region or the peripheral region of the same character image based on the mask data, and the pixel to be processed and its surroundings And determining the color of the pixel to be processed in accordance with pixels existing in the same region of the same character image.
前記変換工程において変換された文字画像を非可逆圧縮方式により圧縮し、圧縮画像を生成する圧縮工程と、
前記変換工程において変換された文字画像のアウトラインを示すマスクデータを生成する生成工程と、
前記圧縮工程において圧縮された圧縮画像を伸張する伸張工程と、
前記伸張工程において伸張された圧縮画像に対応する文字画像の内部領域及び周辺領域の色を、前記生成工程において生成されたマスクデータに基づき決定する決定工程とを有し、
前記決定工程は、前記マスクデータに基づき、処理対象の画素とその周囲の画素が、同一文字画像の内部領域に存在するかまたは周辺領域に存在するか判定し、当該処理対象の画素とその周囲の画素のうち同一文字画像の同じ領域に存在する画素に従って前記処理対象の画素の色を決定することを特徴とする画像処理方法。
A conversion process for converting character data into a character image;
A compression step of compressing the character image converted in the conversion step by an irreversible compression method to generate a compressed image;
A generation step of generating mask data indicating an outline of the character image converted in the conversion step;
An expansion step of expanding the compressed image compressed in the compression step;
A determination step of determining the color of the inner region and the peripheral region of the character image corresponding to the compressed image expanded in the expansion step based on the mask data generated in the generation step;
The determining step determines, based on the mask data, whether a pixel to be processed and its surrounding pixels are present in an internal region or a peripheral region of the same character image, and the pixel to be processed and its surroundings And determining a color of the pixel to be processed according to pixels existing in the same region of the same character image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006355179A JP4936524B2 (en) | 2006-12-28 | 2006-12-28 | Image processing system and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006355179A JP4936524B2 (en) | 2006-12-28 | 2006-12-28 | Image processing system and image processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008165538A JP2008165538A (en) | 2008-07-17 |
JP4936524B2 true JP4936524B2 (en) | 2012-05-23 |
Family
ID=39694942
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006355179A Expired - Fee Related JP4936524B2 (en) | 2006-12-28 | 2006-12-28 | Image processing system and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4936524B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5407582B2 (en) * | 2009-06-22 | 2014-02-05 | 富士ゼロックス株式会社 | Image processing apparatus and image processing program |
JP5494541B2 (en) * | 2011-03-25 | 2014-05-14 | ブラザー工業株式会社 | Image editing apparatus and image editing program |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4006113B2 (en) * | 1998-10-16 | 2007-11-14 | キヤノン株式会社 | Graphic processing method and apparatus |
JP4345609B2 (en) * | 2004-08-12 | 2009-10-14 | 富士ゼロックス株式会社 | Image processing apparatus and program |
JP4364809B2 (en) * | 2005-01-13 | 2009-11-18 | 株式会社リコー | Image processing apparatus, image processing method, program, and recording medium |
JP4315928B2 (en) * | 2005-04-11 | 2009-08-19 | 株式会社リコー | Image processing apparatus and image processing method |
JP4618676B2 (en) * | 2005-04-28 | 2011-01-26 | 株式会社リコー | Structured document code transfer method, image processing system, server device, program, and information recording medium |
-
2006
- 2006-12-28 JP JP2006355179A patent/JP4936524B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2008165538A (en) | 2008-07-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5132517B2 (en) | Image processing apparatus and image processing method | |
JP2006050551A (en) | Image processing apparatus, image processing method, program and storage medium | |
US9176935B2 (en) | Image forming apparatus capable of displaying print preview on screen | |
JPH10243210A (en) | Image processor and image-processing method | |
JP2010056690A (en) | Image processor and image processing method | |
JP5893379B2 (en) | Image compression apparatus, image compression method, and computer program | |
JP2017156852A (en) | Image processing device and computer program | |
JP2004334852A (en) | Image processing by pixel types | |
JP4936524B2 (en) | Image processing system and image processing method | |
JP5195882B2 (en) | Electronic document generation system, electronic document generation method and program | |
JP2008042345A (en) | Image processing method and image processor | |
JP2007019673A (en) | Image processing apparatus, image compression method, image compression program, and data structure of compressed image | |
JP4792835B2 (en) | Image processing device | |
US8649051B2 (en) | Image composition device, image forming apparatus and computer readable medium storing program | |
JP2003158632A (en) | Image processing method, and image processing apparatus and image processing system to execute the method | |
US7091985B1 (en) | System and method for compressing color data using expandable color palette | |
US9041962B2 (en) | Imaging forming apparatus, image forming system, and program that enables data to be edited and processed | |
JP4514168B2 (en) | Image processing system and image processing method | |
US20200175308A1 (en) | Image processing apparatus, image processing method, and non-transitory computer-readable storage medium | |
JP4324058B2 (en) | Image processing apparatus and method | |
JP5517028B2 (en) | Image processing device | |
JP2019111677A (en) | Image processing device, image processing device control method, image forming device and program | |
JP2001169120A (en) | Method, device, and system for image processing | |
JPH09167222A (en) | Image processor | |
JP3829895B2 (en) | Image processing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20091224 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110607 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110610 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110804 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20111028 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20111220 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20120217 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120220 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150302 Year of fee payment: 3 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 4936524 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150302 Year of fee payment: 3 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: R3D03 |
|
LAPS | Cancellation because of no payment of annual fees |