JP2012134847A - Image compression apparatus, image compression method and program - Google Patents

Image compression apparatus, image compression method and program Download PDF

Info

Publication number
JP2012134847A
JP2012134847A JP2010286311A JP2010286311A JP2012134847A JP 2012134847 A JP2012134847 A JP 2012134847A JP 2010286311 A JP2010286311 A JP 2010286311A JP 2010286311 A JP2010286311 A JP 2010286311A JP 2012134847 A JP2012134847 A JP 2012134847A
Authority
JP
Japan
Prior art keywords
image
information
compression
code
data amount
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.)
Pending
Application number
JP2010286311A
Other languages
Japanese (ja)
Inventor
Masamichi Aoki
真路 青木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2010286311A priority Critical patent/JP2012134847A/en
Publication of JP2012134847A publication Critical patent/JP2012134847A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To improve color change of a character on a preview screen.SOLUTION: An image compression apparatus which divides an image composed of multiple different colors into rectangle-shaped image areas to be compressed comprises: first image area specifying means for specifying a rectangle-shaped image area having first color information; and second image area specifying means for specifying a rectangle-shaped image area having second color information which is adjacent to the rectangle-shaped image area having the first color information. In the apparatus, a first compression code and a second compression code are generated, a data amount of the second compression code is subtracted from a total compression code which is a sum of data amounts of the first compaction code and the second compaction code, vector information which is information identifying the second color information is generated based on the second color information, and the vector information is stored in a part of the data amount of the subtracted second compression code, and a compression image is generated.

Description

本発明は、画像圧縮装置、画像圧縮方法、及び画像圧縮プログラムに関する。   The present invention relates to an image compression apparatus, an image compression method, and an image compression program.

見た目上は1つの画像を、複数の画像を合成することで生成する技術がある。例えば、文字の形状を表す文字画像、絵柄を表す背景画像、文字の色を表す前景画像、黒文字の位置を示す黒文字画像により1つの合成画像を形成する技術がある。すなわち、合成された画像上の一画素の情報は、1つ以上の画像情報を持つこととなり、画素位置によって、どの画像が情報を持つか否かが異なる。文字画像、背景画像、前景画像、黒文字画像は1つのスキャナ画像から生成されるが、各画像に分解することで高圧縮なファイルを生成することができる。   There is a technique for visually generating one image by combining a plurality of images. For example, there is a technique for forming one composite image from a character image representing a character shape, a background image representing a pattern, a foreground image representing a character color, and a black character image representing the position of a black character. That is, information of one pixel on the synthesized image has one or more pieces of image information, and which image has information differs depending on the pixel position. A character image, a background image, a foreground image, and a black character image are generated from one scanner image, but a high-compression file can be generated by decomposing each image.

上記合成画像を形成する画像の中で、前景画像は、ブロック単位のJPEG(Joint Photographic Experts Group)圧縮を行うことが行われている。解像度を落として異なる色が多く含まれるブロックを圧縮すると、それを復元した際に、元の色が失われることがしばしばある。このような文字の色変わりを修正するために、生成した画像を、一度画像処理装置に備え付けられたモニタ(タッチパネル)でプレビュー表示し、ユーザがモニタ上で修正を指示することができる技術がある。   Among the images forming the composite image, the foreground image is subjected to block-unit JPEG (Joint Photographic Experts Group) compression. If a block containing many different colors is compressed at a reduced resolution, the original color is often lost when the block is restored. In order to correct such a color change of a character, there is a technique in which a generated image is once displayed on a monitor (touch panel) provided in the image processing apparatus and a user can instruct correction on the monitor.

特許文献1には、スキャナ画像から各構成画像を生成する場合に生じる色の混在や間違いを修正する手段として、ユーザが意図する通りに文字領域の色を設定する目的で、文字領域を抽出して文字領域に対応する画像を生成し、生成した画像を1つの構成要素とする合成画像をプレビュー表示させ、文字領域の色を指定色に変換するための手段を持ち、文字領域を、指定色に変換する技術が開示されている。   In Patent Document 1, a character area is extracted for the purpose of setting the color of a character area as intended by a user as a means of correcting a color mixture or error that occurs when each component image is generated from a scanner image. The image corresponding to the character area is generated, a composite image having the generated image as one component is displayed as a preview, and the character area has a means for converting the color of the character area into the specified color. A technique for converting to the above is disclosed.

しかしながら、今までの技術は、文字領域の形状を表す複数の画像と、文字領域それぞれに対して、文字の色を1色で表現するファイル構成に関するものであり、文字の色を画像(前景画像)で表現する場合にそのまま適応できないという問題があった。したがって、文字の判読性を改善することができないという問題は依然として解消されていない。   However, the technology so far relates to a plurality of images representing the shape of the character area and a file structure for expressing the character color in one color for each character area. ) Has a problem that it cannot be applied as it is. Therefore, the problem that the legibility of characters cannot be improved has not been solved.

そこで本発明は、上記問題点に鑑みてなされたもので、文字の色を画像で表現するファイル作成方法において、文字の色変わりをプレビュー画面上で改善することができる画像圧縮装置、画像圧縮方法、及びプログラムを提供することを目的とする。   Therefore, the present invention has been made in view of the above problems, and in a file creation method for expressing a character color as an image, an image compression device, an image compression method, and an image compression device capable of improving a character color change on a preview screen. And to provide a program.

上記課題を解決するため、請求項1に記載の本発明における画像圧縮装置は、異なる複数の色彩から構成される画像を矩形型の画像領域に区分して圧縮する圧縮手段を有する画像圧縮装置であって、複数の文字画像の中から第1の色彩情報を有する矩形型の画像領域を特定する第1の画像領域特定手段と、前記第1の画像領域特定手段により特定された前記第1の色彩情報を有する矩形型の画像領域に隣接する前記複数の文字画像の中から第2の色彩情報を有する矩形型の画像領域を特定する第2の画像領域特定手段と、を有し、前記圧縮手段は、第1の圧縮コードを生成する第1の圧縮コード生成手段と、第2の圧縮コードを生成する第2の圧縮コード生成手段と、前記第1の圧縮コードのデータ量と前記第2の圧縮コードのデータ量との和である総圧縮コードのデータ量から、前記第2の圧縮コードのデータ量に相当するデータ量を減ずるデータ量削減手段と、前記第2の色彩情報に基づいて、前記第2の色彩情報を識別する情報であるベクトル情報を生成するベクトル情報生成手段と、前記減ぜられた前記第2の圧縮コードのデータ量に相当するデータ量の部分に、前記ベクトル情報生成手段により生成された前記ベクトル情報を格納するベクトル情報格納手段と、前記第1の圧縮コードのデータの中に前記ベクトル情報を格納した圧縮画像情報を生成する圧縮画像情報生成手段と、を備えたことを特徴とする。   In order to solve the above-mentioned problem, the image compression apparatus according to the present invention described in claim 1 is an image compression apparatus having compression means for compressing an image composed of a plurality of different colors by dividing the image into rectangular image areas. A first image area specifying unit that specifies a rectangular image area having first color information from a plurality of character images; and the first image area specifying unit that is specified by the first image area specifying unit. Second image area specifying means for specifying a rectangular image area having second color information from among the plurality of character images adjacent to the rectangular image area having color information, and the compression The means includes a first compressed code generating means for generating a first compressed code, a second compressed code generating means for generating a second compressed code, a data amount of the first compressed code, and the second With the amount of compression code data The second color information is identified based on the second color information and a data amount reducing means for subtracting the data amount corresponding to the data amount of the second compressed code from the total compressed code data amount Vector information generating means for generating vector information that is information to be performed, and the vector information generated by the vector information generating means in a portion of the data amount corresponding to the reduced data amount of the second compressed code And a compressed image information generating means for generating compressed image information in which the vector information is stored in the data of the first compressed code.

また、本発明における画像圧縮装置は、請求項1に記載の画像圧縮装置において、前記圧縮画像情報をプレビュー表示する表示手段を設け、前記第2の画像領域特定手段は、前記表示手段にプレビュー表示される画像に対する領域指定を行うことにより、前記第2の色彩情報を有する矩形型の画像領域が特定されることを特徴とする。   The image compression apparatus according to the present invention is the image compression apparatus according to claim 1, further comprising display means for displaying the compressed image information as a preview, and the second image area specifying means displays a preview on the display means. A rectangular image area having the second color information is specified by specifying an area for the image to be displayed.

さらに、本発明における画像圧縮装置は、請求項1又は2に記載の画像圧縮装置において、前記第2の色彩情報を有する矩形型の画像領域は、前記第1の色彩情報を有する矩形型の画像領域に隣接する上下左右の領域の中から特定されることを特徴とする。   Furthermore, the image compression apparatus according to the present invention is the image compression apparatus according to claim 1 or 2, wherein the rectangular image area having the second color information is a rectangular image having the first color information. It is characterized by being specified from the upper, lower, left and right areas adjacent to the area.

また、本発明における画像圧縮装置は、請求項2又は3に記載の画像圧縮装置において、各々が異なる複数の色彩情報を有する複数の矩形型の画像領域と、これら複数の画像領域の前記複数の色彩情報を識別する情報である複数のベクトル情報とを画像領域情報群として予め用意しておき、前記領域指定がなされたときに、前記画像領域情報群の中から、前記第2の色彩情報を有する矩形型の画像領域が特定されることを特徴とする。   The image compression device according to the present invention is the image compression device according to claim 2 or 3, wherein a plurality of rectangular image regions each having a plurality of different color information, and the plurality of the plurality of image regions. A plurality of vector information that is information for identifying color information is prepared in advance as an image area information group, and when the area is designated, the second color information is selected from the image area information group. A rectangular image area is specified.

そして、請求項5に記載の本発明における画像圧縮方法は、異なる複数の色彩から構成される画像を矩形型の画像領域に区分して圧縮する圧縮手段を有する画像圧縮装置における画像圧縮方法であって、第1の画像領域特定手段により、複数の文字画像の中から第1の色彩情報を有する矩形型の画像領域を特定する工程と、第2の画像領域特定手段により、前記第1の画像領域特定手段により特定された前記第1の色彩情報を有する矩形型の画像領域に隣接する前記複数の文字画像の中から第2の色彩情報を有する矩形型の画像領域を特定する工程と、を有し、前記圧縮手段は、第1の圧縮コード生成手段により、第1の圧縮コードを生成する工程と、第2の圧縮コード生成手段により、第2の圧縮コードを生成する工程と、データ量削減手段により、前記第1の圧縮コードのデータ量と前記第2の圧縮コードのデータ量との和である総圧縮コードのデータ量から、前記第2の圧縮コードのデータ量に相当するデータ量を削減する工程と、ベクトル情報生成手段により、前記第2の色彩情報に基づいて、前記第2の色彩情報を識別する情報であるベクトル情報を生成する工程と、ベクトル情報格納手段により、前記減ぜられた前記第2の圧縮コードのデータ量に相当するデータ量の部分に、前記ベクトル情報生成手段により生成された前記ベクトル情報を格納する工程と、圧縮画像情報生成手段により、前記第1の圧縮コードのデータの中に前記ベクトル情報を格納した圧縮画像情報を生成する工程と、を備えたことを特徴とする。   The image compression method according to the fifth aspect of the present invention is an image compression method in an image compression apparatus having compression means for dividing and compressing an image composed of a plurality of different colors into rectangular image regions. A step of specifying a rectangular image region having first color information from a plurality of character images by a first image region specifying unit; and a step of specifying the first image by a second image region specifying unit. Identifying a rectangular image area having second color information from among the plurality of character images adjacent to the rectangular image area having the first color information specified by the area specifying means; The compression means includes a step of generating a first compression code by the first compression code generation means, a step of generating a second compression code by the second compression code generation means, and a data amount Reduction hand Accordingly, the data amount corresponding to the data amount of the second compression code is reduced from the data amount of the total compression code which is the sum of the data amount of the first compression code and the data amount of the second compression code. Reduced by the vector information generating means, the vector information generating means generating vector information as information for identifying the second color information based on the second color information, and the vector information storing means. Storing the vector information generated by the vector information generating means in a portion of the data amount corresponding to the data amount of the second compressed code, and the compressed image information generating means by the first compressed code. Generating compressed image information in which the vector information is stored in the data.

また、請求項6に記載の本発明におけるプログラムは、異なる複数の色彩から構成される画像を矩形型の画像領域に区分して圧縮する圧縮手段を有する画像圧縮装置のコンピュータに実行させるプログラムであって、第1の画像領域特定手段により、複数の文字画像の中から第1の色彩情報を有する矩形型の画像領域を特定する処理と、第2の画像領域特定手段により、前記第1の画像領域特定手段により特定された前記第1の色彩情報を有する矩形型の画像領域に隣接する前記複数の文字画像の中から第2の色彩情報を有する矩形型の画像領域を特定する処理と、を有し、前記圧縮手段は、第1の圧縮コード生成手段により、第1の圧縮コードを生成する処理と、第2の圧縮コード生成手段により、第2の圧縮コードを生成する処理と、データ量削減手段により、前記第1の圧縮コードのデータ量と前記第2の圧縮コードのデータ量との和である総圧縮コードのデータ量から、前記第2の圧縮コードのデータ量に相当するデータ量を削減する処理と、ベクトル情報生成手段により、前記第2の色彩情報に基づいて、前記第2の色彩情報を識別する情報であるベクトル情報を生成する処理と、ベクトル情報格納手段により、前記減ぜられた前記第2の圧縮コードのデータ量に相当するデータ量の部分に、前記ベクトル情報生成手段により生成された前記ベクトル情報を格納する処理と、圧縮画像情報生成手段により、前記第1の圧縮コードのデータの中に前記ベクトル情報を格納した圧縮画像情報を生成する処理と、を備えたことを特徴とする。   According to a sixth aspect of the present invention, there is provided a program executed by a computer of an image compression apparatus having a compression unit that compresses an image composed of a plurality of different colors by dividing the image into rectangular image areas. Then, the first image area specifying means specifies the rectangular image area having the first color information from the plurality of character images, and the second image area specifying means determines the first image. Identifying a rectangular image area having second color information from among the plurality of character images adjacent to the rectangular image area having the first color information specified by the area specifying means; The compression means includes: a process for generating a first compression code by the first compression code generation means; a process for generating a second compression code by the second compression code generation means; The data amount of the first compressed code is equivalent to the data amount of the second compressed code from the data amount of the total compressed code, which is the sum of the data amount of the first compressed code and the data amount of the second compressed code. A process for reducing the amount of data, a process for generating vector information, which is information for identifying the second color information, based on the second color information by the vector information generating means, and a vector information storing means, A process of storing the vector information generated by the vector information generating means in a portion of the data amount corresponding to the reduced data amount of the second compressed code, and a compressed image information generating means And processing for generating compressed image information in which the vector information is stored in the data of one compressed code.

本発明によれば、プレビュー画面において、文字の色変わりを指定された領域に対応する前景画像上のブロックを、そのブロック内に含まれる色を減少させて圧縮を行うことにより、そのブロックの圧縮コード量を低減させて、当該減少させた色を、当該減少させた色と近い当該ブロックに隣接する色のベクトル情報として、当該低減させた圧縮コードの部分に格納すると同時に、減少させた色に対応する画素を識別する情報を格納するようにしたので、文字の色を画像(前景画像)で表現する技術において、プレビュー画面上で、文字の色変わりを改善することができる画像圧縮装置、画像圧縮方法、及びプログラムを得ることができる。   According to the present invention, by compressing a block on a foreground image corresponding to an area for which a character color change is designated on the preview screen while reducing the color included in the block, the compression code of the block is compressed. Reduce the amount and store the reduced color as vector information of the color adjacent to the block that is close to the reduced color in the portion of the reduced compressed code, and simultaneously handle the reduced color Since information for identifying pixels to be stored is stored, an image compression apparatus and an image compression method capable of improving a color change of a character on a preview screen in a technique for expressing a character color as an image (foreground image) And a program can be obtained.

本発明の実施形態における画像処理装置の概略構成を示すブロック図である。1 is a block diagram illustrating a schematic configuration of an image processing apparatus according to an embodiment of the present invention. 本発明の実施形態における高圧縮PDFのフォーマット処理について説明する図である。It is a figure explaining the format process of the high compression PDF in embodiment of this invention. 本発明の実施形態における色変わりについて説明する図である。It is a figure explaining the color change in embodiment of this invention. 本発明の実施形態における色変わりに付いて説明する図である。It is a figure explaining about the color change in embodiment of this invention. 本発明の実施形態におけるデータの流れを示すブロック図である。It is a block diagram which shows the flow of the data in embodiment of this invention. 本発明の実施形態における原画像の分離処理の概念図である。It is a conceptual diagram of the separation process of the original image in the embodiment of the present invention. 本発明の実施形態におけるコントローラの動作の流れを示すフロー図である。It is a flowchart which shows the flow of operation | movement of the controller in embodiment of this invention. 本発明に実施形態における指定範囲内の文字画素を含む前景画像のブロックに対応する処理対象画像情報を取得するイメージを示す図である。It is a figure which shows the image which acquires the process target image information corresponding to the block of the foreground image containing the character pixel in the designated range in this invention. 本発明の実施形態における修正文字画素候補の中から、修正するブロックを決定するフローを示すフロー図である。It is a flowchart which shows the flow which determines the block to correct from the correction character pixel candidates in embodiment of this invention. 本発明の実施形態における処理対象のブロックが、さらに先のブロックで置き換えが可能であることを示す模式図である。It is a schematic diagram which shows that the block of the process target in embodiment of this invention can be substituted by the further previous block. 本発明の実施形態におけるHDDに蓄積されている画素の状態を示す模式図である。It is a schematic diagram which shows the state of the pixel accumulate | stored in HDD in embodiment of this invention. 本発明の実施形態における圧縮コードを削除した部分に修正画素情報を入れることを説明する図である。It is a figure explaining putting correction pixel information into the part which deleted the compression code in the embodiment of the present invention. 本発明の実施形態におけるJPEG圧縮の基本方式の処理手順を示す図である。It is a figure which shows the process sequence of the basic system of JPEG compression in embodiment of this invention. 本発明の実施形態におけるJPEG画像のジグザグスキャンのテーブルを示す図である。It is a figure which shows the table of the zigzag scan of the JPEG image in embodiment of this invention. 本発明の実施形態におけるJPEG圧縮におけるAC成分のハフマン符号表の一例を示す図である。It is a figure which shows an example of the Huffman code table of AC component in JPEG compression in embodiment of this invention. 本発明の実施形態におけるエントロピー符号化において、エントロピーが減ると、置き換え後のビットサイズが減ることを説明する図である。In entropy coding in an embodiment of the present invention, if entropy decreases, the bit size after replacement decreases. 本発明の実施形態におけるエントロピー符号化において、減少したビット数の分だけ無効領域が増加することを説明する図である。It is a figure explaining an invalid area | region increasing by the part of the reduced bit number in the entropy encoding in embodiment of this invention. 本発明の他の実施形態における置き換える色を持つブロックへのベクトルを示す図である。It is a figure which shows the vector to the block with the color to replace in other embodiment of this invention.

次に、本発明を実施するための形態について図面を参照して詳細に説明する。なお、各図中、同一又は相当する部分には同一の符号を付しており、その重複説明は適宜に簡略化乃至省略する。   Next, embodiments for carrying out the present invention will be described in detail with reference to the drawings. In addition, in each figure, the same code | symbol is attached | subjected to the part which is the same or it corresponds, The duplication description is simplified thru | or abbreviate | omitted suitably.

本発明は、複数の画像を合成して表示する画像フォーマットに関し、文字の色を画像(前景画像)で表現する技術において、プレビュー画面上に表示された文字の色変わりに関して、指定された領域に対応する前景画像上のブロックを、そのブロック内に含まれる色のデータ量を減少させて圧縮を行うことにより、そのブロックの圧縮コード量を低減させると共に、データ量を減少させた色を、当該減少させた色と近い当該ブロックに隣接する色のベクトル情報として、上記低減させた圧縮コードの部分に格納すると同時に、減少させた色に対応する画素を識別する情報を格納することが特徴となっている。   The present invention relates to an image format in which a plurality of images are combined and displayed, and in a technique for expressing a character color as an image (foreground image), it corresponds to a designated area with respect to a color change of a character displayed on a preview screen. By compressing the block on the foreground image by reducing the data amount of the color included in the block, the compression code amount of the block is reduced, and the color whose data amount has been reduced is reduced. The vector information of the color adjacent to the block close to the reduced color is stored in the reduced compressed code portion, and at the same time, the information for identifying the pixel corresponding to the reduced color is stored. Yes.

まず、図1を用いて、本発明における画像圧縮装置が搭載される画像処理装置について説明する。図1は、本発明の実施形態におけるデジタル式の画像処理装置の概略構成を示したブロック図である。カラー画像処理装置1が複写機として動作する場合、スキャナ2は原稿3から画像データを読み取り、当該画像データ(アナログ信号)をデジタルデータに変換して出力する。   First, an image processing apparatus in which the image compression apparatus according to the present invention is mounted will be described with reference to FIG. FIG. 1 is a block diagram showing a schematic configuration of a digital image processing apparatus according to an embodiment of the present invention. When the color image processing apparatus 1 operates as a copying machine, the scanner 2 reads image data from the document 3, converts the image data (analog signal) into digital data, and outputs the digital data.

スキャナ補正部4は、後述するように、スキャナ2から出力された画像データ(デジタルデータ)に対して、画像領域を文字、線画や写真等に分類したり、原稿画像のRGB(Red Green Blue)データに対してフィルタ処理等の画像処理を施す。   As will be described later, the scanner correction unit 4 classifies the image area into characters, line drawings, photographs, etc. with respect to the image data (digital data) output from the scanner 2, or RGB (Red Green Blue) of the document image. Image processing such as filter processing is performed on the data.

圧縮処理部5は、スキャナ補正後のRGB各8Bit画像データとエッジ文字領域信号(1Bit)、色領域信号(1Bit)を圧縮処理して、汎用バス6にデータを送出する。圧縮後の画像データは、汎用バス6を通って、コントローラ7に送られる。コントローラ7は図示しない半導体メモリを持ち、送られたデータを蓄積するようになっている。蓄積データには、書誌情報として画像サイズや読み取った原稿の種類も記録する。   The compression processing unit 5 compresses the RGB corrected 8-bit image data, the edge character area signal (1 bit), and the color area signal (1 bit), and sends the data to the general-purpose bus 6. The compressed image data is sent to the controller 7 through the general-purpose bus 6. The controller 7 has a semiconductor memory (not shown) and accumulates sent data. In the accumulated data, the image size and the type of the read original are recorded as bibliographic information.

なお、ここでは画像データに対して圧縮処理を行うとしたが、汎用バス6の帯域が十分に広く、蓄積するHDD(Hard Disk Drive)の容量が大きければ、非圧縮の状態で画像データを扱っても良い。   Although the compression processing is performed on the image data here, if the bandwidth of the general-purpose bus 6 is sufficiently wide and the capacity of the HDD (Hard Disk Drive) to be stored is large, the image data is handled in an uncompressed state. May be.

次に、コントローラ7は、HDDの画像データを、汎用バス6を介して伸張処理部8に送出する。伸張処理部8は、圧縮処理されていた画像データを元のRGB各8Bitデータとエッジ文字領域信号(1Bit)、色領域信号(1Bit)に伸張し、プリンタ補正部9に送出する。   Next, the controller 7 sends the image data of the HDD to the decompression processing unit 8 via the general-purpose bus 6. The decompression processing unit 8 decompresses the compressed image data into the original RGB 8-bit data, edge character region signal (1 bit), and color region signal (1 bit), and sends them to the printer correction unit 9.

プリンタ補正部9では、RGB画像データを色補正処理部にてYMCBk(Yellow Magenta Cyan Black)データに変換して、エッジ文字領域信号であり色領域信号でない部分は、黒文字としてBkの単色データに置き換える。さらに、γ補正処理、中間調処理等が行われ、プロッタ10の明暗特性の補正処理や階調数変換処理を行う。   In the printer correction unit 9, the RGB image data is converted into YMCBk (Yellow Magenta Cyan Black) data by the color correction processing unit, and the portion which is an edge character region signal and not a color region signal is replaced with Bk single color data as a black character. . Further, γ correction processing, halftone processing, and the like are performed, and the light / dark characteristic correction processing and tone number conversion processing of the plotter 10 are performed.

ここでの階調数変換処理では、誤差拡散やディザ処理を用いて各色8Bitから2Bitへと画像データの変換を行う。プロッタ10は、レーザビーム書き込みプロセスを用いた転写紙印字ユニットで、2Bitの画像データを感光体に潜像として描画し、トナーによる作像/転写処理後、転写紙にコピー画像11を形成する。   In the gradation number conversion process here, image data is converted from 8 bits to 2 bits for each color using error diffusion and dither processing. The plotter 10 is a transfer paper printing unit using a laser beam writing process, draws 2-bit image data as a latent image on a photoconductor, and forms a copy image 11 on the transfer paper after image formation / transfer processing with toner.

ネットワーク12を介して外部PC端末13に画像データを配信する配信スキャナとして動作する場合は、コントローラ7がHDDに蓄積された画像データに対して、色変換処理、階調処理、フォーマット処理等を行う。   When operating as a distribution scanner that distributes image data to the external PC terminal 13 via the network 12, the controller 7 performs color conversion processing, gradation processing, format processing, and the like on the image data stored in the HDD. .

階調処理では配信スキャナ動作時のモードに従った階調変換処理を行う。フォーマット処理では、JPEGやTIFF(Tagged Image File Format)やPDF(Portable Document Format)形式への汎用画像フォーマット変換等を行う。設定によっては、高圧縮PDF画像の画像データを生成して、それらの画像に対してPDFヘッダを付加することとなる。その後、画像データはNIC(Network Interface Controller)15を介して外部PC端末13に配信される。   In the gradation processing, gradation conversion processing is performed according to the mode during the distribution scanner operation. In the format processing, general-purpose image format conversion to JPEG, TIFF (Tagged Image File Format) or PDF (Portable Document Format) format is performed. Depending on the setting, image data of a highly compressed PDF image is generated, and a PDF header is added to those images. Thereafter, the image data is distributed to the external PC terminal 13 via a NIC (Network Interface Controller) 15.

配信される画像データは、操作部16に備え付けられたプレビュー画像表示部によってプレビュー確認が可能となっている。プレビュー表示設定がなされている場合には、フォーマット処理で成形された画像データを基に、プレビュー表示用の画像をコントローラ7の内部で生成する。   The delivered image data can be preview-checked by a preview image display unit provided in the operation unit 16. If preview display is set, an image for preview display is generated inside the controller 7 based on the image data formed by the formatting process.

プレビュー画面は一般的に小さいので、プレビュー表示用に縮小処理を行う。プレビュー表示用に生成された画像データは操作部16に転送される。操作部16では転送された画像データを表示する。縮小処理は必須ではない。縮小することで画像データの損失が発生するため、画質重視の場合には縮小処理は行わない。   Since the preview screen is generally small, reduction processing is performed for preview display. The image data generated for preview display is transferred to the operation unit 16. The operation unit 16 displays the transferred image data. Reduction processing is not essential. Since image data loss occurs due to the reduction, the reduction process is not performed when the image quality is important.

プレビュー画像を確認することにより、このままの画像で良いと判断した場合には、所定のボタンを押下することで、外部PC端末13に配信されることとなる。プレビュー画像を確認した結果、原稿が間違っていた等の理由で読み取りから再度やり直したい場合には、所定のボタンを押すことで、再度読み取りから開始されることとなる。   If it is determined by checking the preview image that the image remains as it is, the image is delivered to the external PC terminal 13 by pressing a predetermined button. As a result of checking the preview image, when it is desired to start again from reading because the document is wrong, the reading is started again by pressing a predetermined button.

プレビュー画像上の一部分を修正したいと判断した場合には、修正箇所を画面上で指定することにより、修正が可能である。操作部16に備え付けられたプレビュー画像表示部は、タッチパネル形式となっており、タッチパネルにかけられた圧力の位置情報を画像処理装置が認識することが可能になっている。そのため、ユーザが修正を指定した箇所を画像処理装置が認識するようになっている。この修正に関わる処理については、本発明の核となる部分であるので、後述する。   When it is determined that a part of the preview image is to be corrected, the correction can be made by designating the correction part on the screen. The preview image display unit provided in the operation unit 16 has a touch panel format, and the image processing apparatus can recognize the position information of the pressure applied to the touch panel. For this reason, the image processing apparatus recognizes a location designated by the user for correction. Since the processing related to this correction is a core part of the present invention, it will be described later.

また、画像処理装置が、ネットワーク12を介して外部PC端末13からプリントアウトするプリンタとして動作する場合、NIC15を介して受信するデータから、画像及びプリント指示を行うコマンドを解析し、画像データとして、印刷可能な状態にビットマップ展開し、展開されたデータを圧縮してデータを蓄積する。蓄積されたデータは随時大容量の記憶装置であるHDD14に書き込まれる。画像データを蓄積する時に、後述する書誌情報もHDD14に書き込む。   Further, when the image processing apparatus operates as a printer that prints out from the external PC terminal 13 via the network 12, an image and a command for performing a print instruction are analyzed from data received via the NIC 15, and as image data, The bitmap is expanded into a printable state, the expanded data is compressed, and the data is accumulated. The accumulated data is written to the HDD 14 which is a large capacity storage device as needed. When the image data is stored, bibliographic information, which will be described later, is also written in the HDD 14.

次にコントローラ7は、HDD14の画像データを、汎用バス6を介して伸張処理部8に送出する。伸張処理部8は圧縮処理されていた画像データを元の8Bitデータに伸張し、プリンタ補正部9に送出する。プリンタ補正部9では、RGB入力ならば、色補正処理部にてYMCBkデータに変換をする。   Next, the controller 7 sends the image data of the HDD 14 to the decompression processing unit 8 via the general-purpose bus 6. The decompression processing unit 8 decompresses the compressed image data to the original 8-bit data and sends it to the printer correction unit 9. In the printer correction unit 9, if the input is RGB, the color correction processing unit converts it into YMCBk data.

次にYMCBkそれぞれ独立にγ補正処理、中間調処理等が行われ、プロッタ10の明暗特性の補正処理や階調数変換処理を行う。ここでの階調数変換処理では、誤差拡散やディザ処理を用いて8Bitから2Bitへと画像データの変換を行う。プロッタ10はレーザビーム書き込みプロセスを用いた転写紙印字ユニットで、2Bitの画像データを感光体に潜像として描画し、トナーによる作像/転写処理後、転写紙にコピー画像を形成する。   Next, γ correction processing, halftone processing, and the like are performed independently for each YMCBk, and lightness and darkness correction processing and gradation number conversion processing of the plotter 10 are performed. In the tone number conversion process here, the image data is converted from 8 bits to 2 bits using error diffusion or dither processing. The plotter 10 is a transfer paper printing unit using a laser beam writing process. The plotter 10 draws 2-bit image data as a latent image on a photoconductor, and forms a copy image on the transfer paper after image formation / transfer processing with toner.

デジタル画像処理装置においては、一般に原稿をスキャナにより読み取り、画像データをデジタルデータに変換するとともに、原稿の画像領域(像域)を、異なる特徴を有する領域に分類(像域分離)する。注目画素が、分類された画像領域(像域)の何れの領域に属するものか判定された結果にしたがい、画像データに対して種々の画像処理を施す。これにより、出力画像の画像品質を大きく向上することができる。操作部16からは、ユーザの動作に関わるモードの設定やスタートの指示を行う。設定を行い、スタートの指示をすることで、上記説明した動作が開始される。   In a digital image processing apparatus, generally, an original is read by a scanner, image data is converted into digital data, and an image area (image area) of the original is classified into areas having different characteristics (image area separation). Various image processing is performed on the image data according to the result of determining which region of the classified image region (image region) the target pixel belongs to. Thereby, the image quality of the output image can be greatly improved. The operation unit 16 sets a mode related to the user's operation and gives a start instruction. By performing the setting and instructing the start, the operation described above is started.

次に、本発明の実施形態における高圧縮PDF画像圧縮装置について説明する。図2は、本発明の実施形態における高圧縮PDFのフォーマット処理について説明する図である。高圧縮PDFは、文字画像、前景画像、背景画像、黒文字画像から構成されている。   Next, a high-compression PDF image compression apparatus according to an embodiment of the present invention will be described. FIG. 2 is a diagram for explaining the format processing of the high-compression PDF in the embodiment of the present invention. The high-compression PDF is composed of a character image, a foreground image, a background image, and a black character image.

文字画像は、文字/非文字の2値で構成され、文字の形状、位置を示す。前景画像は、文字画像で文字となっている画素の色情報を持つ。背景画像は、文字画像で非文字となった箇所についての情報を持つ。黒文字画像は、処理対象画像の黒い文字の形状、位置を示す。   The character image is composed of binary values of characters / non-characters and indicates the shape and position of the characters. The foreground image has color information of pixels that are characters in the character image. The background image has information about a portion that is a non-character in the character image. The black character image indicates the shape and position of the black character of the processing target image.

背景画像及び前景画像において無効領域と記した箇所は、情報を持つ必要のない領域を示す。例えば、文字画像で文字とされている画素の色は前景画像が持っているので、背景画像において対応する領域は無効領域となる。高圧縮PDFを生成する際のフォーマット処理では、上記4つの画像を生成した上で、それぞれを個別圧縮する。   A portion described as an invalid area in the background image and the foreground image indicates an area that does not need to have information. For example, since the foreground image has the color of a pixel that is a character in a character image, the corresponding region in the background image is an invalid region. In the format process when generating a high-compression PDF, the above four images are generated, and each is individually compressed.

次に、前景画像の色変わりについて図3を用いて説明する。図3は、本発明の実施形態における色変わりについて説明する図である。図2では明示していないが、前景画像は、解像度を落としてからブロック圧縮を行う。解像度を落とすときに、ブロック内に異なる色の文字が含まれていた場合、情報が失われることとなる。その結果、ユーザには文字の色変わりとして知覚される場合がある。   Next, the color change of the foreground image will be described with reference to FIG. FIG. 3 is a diagram for explaining the color change in the embodiment of the present invention. Although not explicitly shown in FIG. 2, the foreground image is subjected to block compression after the resolution is lowered. When the resolution is lowered, if a character of a different color is included in the block, information is lost. As a result, the user may perceive the color change of the character.

具体的には、図3において、解像度を落とす前の画像として、赤い文字列だけの画像部分Aと、赤い文字列と青い文字列との境界面における画像部分Bとからなる画像について解像度を落としてからブロック圧縮を行うと、赤い文字列だけの画像部分Aを縮小処理しても、赤い文字列だけの画像が再現されるが、赤い文字列と青い文字列との境界面における画像部分Bを縮小処理すると、赤と青が混ざってしまい、ユーザにとっては色変わりとして認識される場合がある。   Specifically, in FIG. 3, as an image before the resolution is reduced, the resolution is reduced for an image composed of an image part A with only a red character string and an image part B on the boundary surface between the red character string and the blue character string. If the block compression is performed after that, even if the image portion A with only the red character string is reduced, the image with only the red character string is reproduced, but the image portion B at the boundary surface between the red character string and the blue character string is reproduced. If the reduction processing is performed, red and blue are mixed, and may be recognized as a color change by the user.

同様に、図4を用いて前景画像の色変わりに付いて説明する。図4は、本発明の実施形態における色変わりに付いて説明する図である。図4において、処理対象画像が、赤と青からなる文字画像であった場合、その文字画像の文字となっている画素の色情報を持つ前景画像は、斜線で表した部分となり、この画像の解像度を落としてからブロック圧縮を行った後に展開すると、赤色の情報と青色の情報との境界面では、赤と青が混合し、文字画像と合成して表示すると、ユーザにとっては色変わりとして知覚されてしまう。   Similarly, the color change of the foreground image will be described with reference to FIG. FIG. 4 is a diagram illustrating the color change in the embodiment of the present invention. In FIG. 4, when the processing target image is a character image composed of red and blue, the foreground image having the color information of the pixel that is the character of the character image is a portion represented by diagonal lines. When decompressed after reducing the resolution and then performing block compression, red and blue are mixed at the boundary between red information and blue information, and when combined with a character image and displayed, it is perceived as a color change by the user. End up.

次に、図5を用いて、本発明の実施の形態におけるコントローラ7(図1)とHDD14(図1)間のデータの流れについて説明する。図5は、本発明の実施形態におけるデータの流れを示すブロック図である。図5において、出力画像生成部51と、出力画像組立部52は、上述したフォーマット処理の中にあるものである。   Next, a data flow between the controller 7 (FIG. 1) and the HDD 14 (FIG. 1) in the embodiment of the present invention will be described with reference to FIG. FIG. 5 is a block diagram showing a data flow in the embodiment of the present invention. In FIG. 5, an output image generating unit 51 and an output image assembling unit 52 are in the format process described above.

出力画像生成部51では、処理対象画像から背景画像、文字画像、前景画像、黒文字画像を生成する。如何なるアルゴリズムを使用するかは不問であるが、ここでは、図6に示すアルゴリズムに基づく分離処理を用いるものとする。図6は、本発明の実施形態における原画像の分離処理の概念図である。   The output image generation unit 51 generates a background image, a character image, a foreground image, and a black character image from the processing target image. It does not matter what algorithm is used, but here, separation processing based on the algorithm shown in FIG. 6 is used. FIG. 6 is a conceptual diagram of original image separation processing in the embodiment of the present invention.

図6において、まず、ステップ(以下、「S」という。)10において、取得された原画像の各画素を、例えば明度(画像がRGBで表現されている場合は、G成分で代用してもよい)に係る閾値で分け、該閾値より明るい画素を背景(第三属性)に分類し、該閾値より暗い画素を前景(第一属性)に分類する。   In FIG. 6, first, in step (hereinafter referred to as “S”) 10, each pixel of the acquired original image may be substituted with, for example, brightness (in the case where the image is expressed in RGB, the G component). The pixels brighter than the threshold are classified into the background (third attribute), and pixels darker than the threshold are classified into the foreground (first attribute).

S11では、前景(第一属性)に分類された画素のうち、黒に非常に近い画素値の画素(例えば、R、G、B各色が全てある一定の閾値以下の画素)を選び、該画素を黒文字(第二属性)に分類し直す。   In S11, a pixel having a pixel value very close to black (for example, all pixels of R, G, B are all below a certain threshold) is selected from the pixels classified as the foreground (first attribute), and the pixel Are reclassified as black characters (second attribute).

各属性に基づいて、つまり、第一属性に基づいて生成された第一画像が、例えば図6のAであり、第二属性に基づいて生成された第二画像が、例えば 図6のCであり、第三属性に基づいて生成された第三画像が、例えば図6のBである。   A first image generated based on each attribute, that is, based on the first attribute is, for example, A in FIG. 6, and a second image generated based on the second attribute is, for example, in C in FIG. 6. A third image generated based on the third attribute is, for example, B in FIG.

S12では、生成された第一画像の所属画素(第一画像のうち、画素値が設定されている画素)の位置を参照し、該所属画素と同一位置の画素の画素値をON(例えば、1)に設定し、該画素以外の画素の画素値をOFF(例えば、0)に設定した選択データを生成する。生成された選択データが、例えば図6のDである。   In S12, the position of the pixel belonging to the generated first image (the pixel in which the pixel value is set in the first image) is referred to, and the pixel value of the pixel at the same position as the belonging pixel is turned ON (for example, 1) is generated, and selection data in which pixel values of pixels other than the pixel are set to OFF (for example, 0) is generated. The generated selection data is, for example, D in FIG.

S13では、第一画像の非可視領域の画素値が設定され、第三画像の非可視領域の画素値が設定される。非可視領域の画素値を設定された第一画像が、例えば図6のEであり、例えば、図6のFである。   In S13, the pixel value of the invisible area of the first image is set, and the pixel value of the invisible area of the third image is set. The first image in which the pixel value of the non-visible region is set is, for example, E in FIG. 6 and, for example, F in FIG.

図6に示されるように、原画像に含まれる特定の色又は明度に係る領域(例えば、黒文字)を、独立した画像(レイヤー)として原画像より分離することにより、該特定の色又は明度に係る単独の色又は明度(黒又は明度ゼロ)で再現(出力)することができる。   As shown in FIG. 6, by separating an area (for example, black characters) relating to a specific color or lightness included in the original image from the original image as an independent image (layer), the specific color or lightness is obtained. Such single color or lightness (black or zero lightness) can be reproduced (output).

図5に戻り、本発明においては、図6に示した選択データDが文字画像であるものとする。図6のアルゴリズムを用いて生成された4つの画像C,D,E,Fは、一度HDD14(図1)に格納される。   Returning to FIG. 5, in the present invention, the selection data D shown in FIG. 6 is assumed to be a character image. The four images C, D, E, and F generated using the algorithm of FIG. 6 are once stored in the HDD 14 (FIG. 1).

次に、プレビュー画像生成部53で、プレビュー用の画像を生成する。HDD14(図1)に蓄積された4つの画像を展開して、必要に応じてそれぞれの画像に対して縮小処理や拡大処理を行い、合成することでプレビュー用の画像を生成する。縮小処理や拡大処理の方法は問わないが、生成元の4つの画像上の各画素と、生成されたプレビュー用画像の各画素との対応関係は、保持しておくようにする。   Next, the preview image generation unit 53 generates an image for preview. The four images stored in the HDD 14 (FIG. 1) are developed, reduction processing and enlargement processing are performed on each image as necessary, and a preview image is generated by combining them. There is no limitation on the reduction process or the enlargement process, but the correspondence between each pixel on the four generation images and each pixel on the generated preview image is retained.

出力画像修正部54では、ユーザによって指定された修正領域から、修正画素を決定し、修正画素の表示上の色を修正するよう出力画像を編集する処理を行う。修正画素に対応する文字画像の画像データと、修正画素に対応する前景画像上の画素を含むブロックの画像データ及びブロック近隣の前景画像データ、及び蓄積されている処理対象画像データとから、修正を加えた前景画像、修正画素を識別するための黒文字画像を生成する。出力画像修正部54の処理については、本発明の核となる部分であるので、後述する。   The output image correction unit 54 determines a correction pixel from the correction area designated by the user, and performs a process of editing the output image so as to correct the display color of the correction pixel. Correction is performed from the image data of the character image corresponding to the correction pixel, the image data of the block including the pixel on the foreground image corresponding to the correction pixel, the foreground image data near the block, and the accumulated processing target image data. A black character image for identifying the added foreground image and the corrected pixel is generated. The processing of the output image correction unit 54 is a core part of the present invention, and will be described later.

出力画像組立部52は、出力画像修正部54で出力した前景画像と、蓄積済みの文字画像、黒文字画像、背景画像を1つのPDFファイルに纏める。なお、ユーザが修正を指示しない場合には、出力画像修正部54は通らずに、出力画像生成部53で出力された画像が出力画像組立部52に流れ、PDFファイルが生成されることとなる。   The output image assembling unit 52 combines the foreground image output from the output image correcting unit 54 and the accumulated character image, black character image, and background image into one PDF file. If the user does not instruct correction, the image output by the output image generation unit 53 flows to the output image assembly unit 52 without passing through the output image correction unit 54, and a PDF file is generated. .

次に、図7を用いて、プレビュー画像を表示した直後に、コントローラ7(図1)で動作する処理について説明する。図7は、本発明の実施形態におけるコントローラの動作の流れを示すフロー図である。上述したように、プレビュー画像の所定操作で、ユーザは、プレビュー画像の処理の再開、処理のやり直し、一部分の修正について選択することが可能である。ここでは、一部分の修正を選択した場合のフローを記している。   Next, processing that is performed by the controller 7 (FIG. 1) immediately after displaying the preview image will be described with reference to FIG. FIG. 7 is a flowchart showing a flow of operation of the controller in the embodiment of the present invention. As described above, by a predetermined operation of the preview image, the user can select the resumption of the processing of the preview image, the redoing of the processing, and the partial correction. Here, a flow in the case where partial correction is selected is shown.

まず、S71において、ユーザの不満箇所を特定する。すなわち、プレビュー画面上で、どこを修正したいかの指定を受け付ける。ユーザは、タッチパネルをペンでなぞる等の所定の方法で、修正箇所の範囲指定をする。画像処理装置は、その指定範囲から、画像上のどこが修正範囲かを把握する。   First, in S71, a dissatisfied part of the user is specified. That is, on the preview screen, designation of where to modify is accepted. The user designates the range of the correction portion by a predetermined method such as tracing the touch panel with a pen. From the specified range, the image processing apparatus grasps where the correction range is on the image.

次に、S72において、当該指定範囲内に文字画素が含まれているか否かを判断する。すなわち、修正範囲内に文字画素が含まれているか否かを調べる。文字画素とは、文字画像で文字とされている画素を意味する。本発明は、文字画素の色を修正することを目的としているので、修正範囲内に文字画素が含まれていない場合には、修正はできないので、その旨の表示を行う(S72:N)。   Next, in S72, it is determined whether or not a character pixel is included in the designated range. That is, it is checked whether or not a character pixel is included in the correction range. A character pixel means a pixel that is a character in a character image. The present invention is intended to correct the color of the character pixel. Therefore, if the character pixel is not included in the correction range, the correction cannot be made, and a display to that effect is displayed (S72: N).

プレビュー用の画像と文字画像の対応関係は、上述したようにプレビュー用画像生成時に保存してあるので、HDD14(図1)から指定修正範囲に対応する文字画像を読み込むことで指定修正範囲内に文字画素が含まれているか否かを調べることができる。   Since the correspondence between the preview image and the character image is stored when the preview image is generated as described above, the character image corresponding to the specified correction range is read from the HDD 14 (FIG. 1) to be within the specified correction range. It can be checked whether or not a character pixel is included.

文字画素が含まれていた場合は(S72:Y)、対応する前景画像のブロックもHDD14(図1)から読み込む。前景画像のブロックは、JPEGであれば8×8が単位である。プレビュー用の画像と前景画像の対応関係は、上述したように、プレビュー用画像生成時に保存してあるため、これらの情報から情報の取得が可能である。   If a character pixel is included (S72: Y), the corresponding foreground image block is also read from the HDD 14 (FIG. 1). Foreground image blocks are 8 × 8 units in the case of JPEG. Since the correspondence between the preview image and the foreground image is stored when the preview image is generated as described above, information can be acquired from these pieces of information.

次に、S73において、処理対象となる画像情報を取得する。すなわち、指定した範囲内の文字画素を含む前景画像のブロックに対応する処理対象画像の情報を取得する。この処理対象となる画像情報を取得するイメージを図8に示す。図8は、本発明に実施形態における指定範囲内の文字画素を含む前景画像のブロックに対応する処理対象画像情報を取得するイメージを示す図である。   Next, in S73, image information to be processed is acquired. That is, information on the processing target image corresponding to the block of the foreground image including the character pixels within the designated range is acquired. An image for acquiring the image information to be processed is shown in FIG. FIG. 8 is a diagram illustrating an image for acquiring processing target image information corresponding to a block of a foreground image including character pixels within a designated range in the embodiment of the present invention.

図8において、プレビュー画面上において、修正を希望する画像範囲を指定すると、当該指定範囲を含む前景画像のブロックは、対応する処理対象画像の領域である4つの矩形型のブロック1から4に対応し、これらのブロックには、「あいう」という文字画素が含まれている。   In FIG. 8, when an image range desired to be corrected is designated on the preview screen, the foreground image block including the designated range corresponds to the four rectangular blocks 1 to 4 which are areas of the corresponding processing target image. However, these blocks include a character pixel of “that”.

図7に戻り、S74において、修正対象となる文字画素が決定される。指定範囲内の文字画素に対応する画素について、処理対象画像と前景画像との差分を計算する。この差分が大きい画素を、指定範囲内の修正画素候補とする。   Returning to FIG. 7, in S74, the character pixel to be corrected is determined. The difference between the processing target image and the foreground image is calculated for the pixels corresponding to the character pixels within the specified range. A pixel having a large difference is set as a correction pixel candidate within the specified range.

修正範囲内の文字であっても、必ずしもその中のすべての画素を修正したいという意図があるわけではない。範囲の指定はユーザが入力するため、修正の必要のない文字も含まれている可能性もある。また、文字列に含まれる文字の輪郭の色を指定したい場合には、その文字列を囲むように領域指定するのがユーザにとって自然であるためである。こうした場合、修正の必要のない文字の中部も修正範囲に含まれてしまう。そのため、指定された領域を基に、修正文字画素を決定する必要がある。実際、文字の色変わりが気になるのは、異なる色の文字と同一ブロックに存在する文字が多いため、文字の輪郭部分が多い。   Even a character within the correction range does not necessarily have the intention of correcting all the pixels in the character. Since the specification of the range is input by the user, there is a possibility that characters that do not need to be corrected are included. In addition, when it is desired to specify the color of the outline of a character included in the character string, it is natural for the user to specify an area so as to surround the character string. In such a case, the middle part of the character that does not need to be corrected is also included in the correction range. Therefore, it is necessary to determine the corrected character pixel based on the designated area. Actually, the reason why the color change of characters is worrisome is that there are many characters existing in the same block as the characters of different colors, so there are many outline portions of the characters.

また、この場合、修正画素ではなく、修正画素候補にしておくのは次の理由による。すなわち、
本発明の性質上、ブロック内の修正文字画素の数、ブロック内の画素位置に、いくつかの制約がある。そのため、処理対象画像と前景画像との差分が大きいすべての画素を修正できるわけではない。そのため、以後述べるフローにおいて最終的に修正する文字画素を決定する。
In this case, the correction pixel candidate is used instead of the correction pixel for the following reason. That is,
Due to the nature of the present invention, there are some restrictions on the number of corrected character pixels in a block and the pixel position in the block. For this reason, not all pixels having a large difference between the processing target image and the foreground image can be corrected. Therefore, the character pixel to be finally corrected is determined in the flow described below.

ここで、本発明における修正に関する制約について説明する。本発明においては、修正画素の色は、近隣のブロックの或る1色となる。後述するが、修正画素の色を、同一ブロック内の修正画素以外の色に置き換えてブロックを圧縮し、圧縮したブロックの高周波成分の領域に、元の修正画素の色を符号化する。ブロック内には、修正画素ではない画素も含まれているため、ブロック内で、どれが修正画素かを知る必要がある。文字画像で文字となっている画素に関しては、黒文字画像で非文字にしているため、修正画素の黒文字画像の画素を黒文字にすることで、識別が可能である。すなわち、出力画像を組み立てる時に、文字画像が文字かつ黒文字画像が非黒文字の場合には、修正画素ではなく、文字画像が文字かつ黒文字画像が黒文字の場合には修正画素であるとすることにより識別が可能になる。   Here, restrictions on correction in the present invention will be described. In the present invention, the color of the correction pixel is a certain color of a neighboring block. As will be described later, the color of the correction pixel is replaced with a color other than the correction pixel in the same block, the block is compressed, and the color of the original correction pixel is encoded in the region of the high frequency component of the compressed block. Since the block includes pixels that are not correction pixels, it is necessary to know which one is the correction pixel in the block. The pixels that are characters in the character image are non-characters in the black character image, and therefore can be identified by changing the pixels of the black character image of the correction pixel to black characters. That is, when assembling the output image, the character image is a character and the black character image is a non-black character. Is possible.

黒文字画像は2値のデータであるので、基本的には修正画素であるかないかの2値のみ情報を持つことができる。圧縮したブロックの高周波成分の中には、修正画素を置き換える色を持つブロックへのベクトル情報を持つ必要がある。同一ブロック内に、異なる色に置き換える修正画素を持つためには、複数のブロックへのベクトル情報と、修正画素のブロック上の位置までも持つ必要が生じ、ファイルサイズの観点からは現実的ではない。そのため、基本的には1つのブロックに対して、1つの色に置き換える修正画素を決定することとなる。   Since the black character image is binary data, it can basically have only binary information as to whether it is a correction pixel. The high-frequency component of the compressed block needs to have vector information for a block having a color that replaces the corrected pixel. In order to have corrected pixels to be replaced with different colors in the same block, it is necessary to have vector information for multiple blocks and the position of the corrected pixels on the block, which is not realistic from the viewpoint of file size. . Therefore, basically, a correction pixel to be replaced with one color is determined for one block.

また、置き換える色を含むブロックも、ブロック自体は、縦横数十画素に対応する小さい矩形型のものであるため、そのブロック内に大きく異なる色の文字が含まれていることは想定していない。   In addition, since the block including the replacement color is a small rectangular shape corresponding to several tens of pixels in the vertical and horizontal directions, it is not assumed that characters of greatly different colors are included in the block.

図7に戻り、S75においては、類似色ブロックを検索する。すなわち、修正文字画素候補から、修正文字画素を決定するステップである。修正文字画素候補を以下に述べる方法でクラスタに分類し、修正すると決定したクラスタの修正文字画素の色を置き換えるブロックとして決定する。この修正文字画素候補の中から、修正するブロックを決定するフローについて図9を用いて説明する。   Returning to FIG. 7, in S75, a similar color block is searched. That is, this is a step of determining a corrected character pixel from the corrected character pixel candidate. The corrected character pixel candidates are classified into clusters by the method described below, and determined as a block that replaces the color of the corrected character pixel of the cluster determined to be corrected. A flow for determining a block to be corrected from the corrected character pixel candidates will be described with reference to FIG.

図9は、本発明の実施形態における修正文字画素候補の中から、修正するブロックを決定するフローを示すフロー図である。上述したように、1つのブロックに含まれる画素を置き換える色は、基本的には1色である。そのため、修正画素候補をクラスタリングして、1つ以上のクラスタに分け、最も修正すべきクラスタ内の修正画素候補を修正画素とする。   FIG. 9 is a flowchart showing a flow for determining a block to be corrected from the corrected character pixel candidates in the embodiment of the present invention. As described above, the color that replaces the pixels included in one block is basically one color. Therefore, the corrected pixel candidates are clustered and divided into one or more clusters, and the corrected pixel candidate in the cluster to be corrected most is set as a corrected pixel.

図9において、S91では、修正画素候補をクラスタリングする。クラスタリング方法に関しては問わないのでここでは詳述しない。似たような色のグループを同一クラスタにすればよい。   In FIG. 9, in S91, the corrected pixel candidates are clustered. The clustering method does not matter and will not be described in detail here. Similar color groups can be grouped together.

S92では、クラスタの代表値を算出する。クラスタの修正画素候補の代表値として、修正画素に対応する前景画像データの平均値を算出する。   In S92, a cluster representative value is calculated. The average value of the foreground image data corresponding to the corrected pixel is calculated as the representative value of the corrected pixel candidate of the cluster.

S93では、近隣ブロックの代表値を算出する。各クラスタに対して、近隣するブロックに近い色があるか否かを探す。近隣するブロックの文字画素に対応する前景画像データの平均値を算出する。   In S93, the representative value of the neighboring block is calculated. For each cluster, look for whether there is a color close to neighboring blocks. An average value of foreground image data corresponding to character pixels of neighboring blocks is calculated.

S94では、近隣ブロックを選定する。S92,S93で算出した値を比較して、最も差が小さい近隣ブロックを選ぶ。ただし、所定の閾値よりも差が大きい場合には、近隣に似た色を持つブロックがないとして、出力しないこととする。ここでは、1ブロック以内のブロックを近隣ブロックとして扱うが、必ずしもこれに限られるものではない。しかしながら、遠く離れたブロックまで見に行くようにすると、後に格納することとなるベクトルの情報量が増えるため、好ましくない。   In S94, a neighboring block is selected. The values calculated in S92 and S93 are compared, and the neighboring block with the smallest difference is selected. However, when the difference is larger than the predetermined threshold, it is assumed that there is no block having a color similar to the neighborhood and is not output. Here, blocks within one block are treated as neighboring blocks, but the present invention is not necessarily limited to this. However, it is not preferable to go to blocks far away because the amount of vector information to be stored later increases.

S95では、クラスタがあるか否かを判断する。たたし、S94の出力が1つもない場合には、修正可能な色が見当たらなかったことを意味するので(S95:N)、S98に進む。   In S95, it is determined whether or not there is a cluster. However, if there is no output in S94, it means that no correctable color was found (S95: N), and the process proceeds to S98.

S96では、クラスタの選定を行う。S94から出力があったクラスタのうち、修正画素候補の最も多いクラスタを選定する。このクラスタに含まれる修正文字画素候補を、修正文字画素とする。   In S96, a cluster is selected. Among the clusters output from S94, the cluster with the largest number of correction pixel candidates is selected. The corrected character pixel candidate included in this cluster is set as a corrected character pixel.

S97では、ベクトル算出を行う。修正画素が含まれるブロックからS96で選定したクラスタへのベクトルを算出する。   In S97, vector calculation is performed. A vector from the block including the corrected pixel to the cluster selected in S96 is calculated.

S98では、連続判断を行う。すなわち、S94で説明したように、近隣ブロックは1ブロックとしているため、2ブロック以上離れた箇所に置き換えたい色がある場合には、ベクトルとして指定ができない。ここでは、上又は左の近隣ブロックに、修正画素を持つブロックがある場合には、そのブロックが持つベクトルのさらに先のブロックで置き換えが可能であるか否かを判断する。図10にその模式図を示す。図10は、本発明の実施形態における処理対象のブロックが、さらに先のブロックで置き換えが可能であることを示す模式図である。さらに先のブロックで置き換えが可能であれば、上又は左の近隣ブロックも同様であることを示すために、上又は左の近隣ブロックも同じベクトルを持つと考えられる。   In S98, continuous determination is performed. That is, as described in S94, since the neighboring block is one block, if there is a color to be replaced at a location two or more blocks away, it cannot be designated as a vector. Here, if there is a block having a corrected pixel in the upper or left neighboring block, it is determined whether or not replacement with a block further ahead of the vector of the block is possible. The schematic diagram is shown in FIG. FIG. 10 is a schematic diagram showing that the block to be processed in the embodiment of the present invention can be replaced with a further block. If the previous block can be replaced, the upper or left neighboring block is also considered to have the same vector to indicate that the upper or left neighboring block is similar.

なお、ここで、上又は左としているのは、一般的に左上から右下に向けてラスタ処理をするため、左及び上のブロックはすでに修正画素が決まっているためである。右や下からラスタ処理をしている場合には上又は左に限られないことはいうまでもない。   Here, the reason for the top or left is that since the raster processing is generally performed from the upper left to the lower right, correction pixels are already determined in the left and upper blocks. Needless to say, when raster processing is performed from the right or bottom, the raster processing is not limited to top or left.

図9に戻り、S99では、ベクトル検出が可能であるか否かを判断する。すなわち、S98で置き換えが可能かどうかを調査した結果、上又は左(右又は下)のいずれかの方向で置き換えが可能であれば(S99:Y)、S96以降で圧縮コードを計算していくことになる。ベクトル検出ができない場合(S99:N)には、S90において、このブロックに対する処理は終了となる。すなわち、S90では、指定された領域には、修正可能な文字がないこと、すなわち、不可能表示を操作部に表示する。   Returning to FIG. 9, in S99, it is determined whether or not vector detection is possible. That is, as a result of investigating whether or not the replacement is possible in S98, if the replacement is possible in either the upper or left (right or lower) direction (S99: Y), the compression code is calculated in and after S96. It will be. If the vector cannot be detected (S99: N), the processing for this block ends in S90. That is, in S90, there is no correctable character in the designated area, that is, an impossible display is displayed on the operation unit.

図7に戻り、S76では、圧縮コードの修正を行う。つまり、修正画素が含まれるブロックの前景画像の圧縮コードを生成する。図11は、本発明の実施形態におけるHDDに蓄積されている画素の状態を示す模式図である。前景画像は、ブロック単位の圧縮を行うものであるので、ブロックごとに圧縮コードが生成されている。HDD(図1)14に蓄積されている前景画像では図11の上図に示すように、無効画素の部分には、ファイルサイズを小さくするために、それ以外の画素の平均値が入っている。   Returning to FIG. 7, in S76, the compressed code is corrected. That is, the compression code of the foreground image of the block including the correction pixel is generated. FIG. 11 is a schematic diagram illustrating a state of pixels accumulated in the HDD according to the embodiment of the present invention. Since the foreground image is subjected to block unit compression, a compression code is generated for each block. In the foreground image stored in the HDD (FIG. 1) 14, as shown in the upper diagram of FIG. 11, the invalid pixel portion contains the average value of the other pixels in order to reduce the file size. .

図7のS76では、無効画素と、修正画素の両方について、修正画素以外の文字画素(図11では、ア)の平均値に置き換えている。こうすることで、ブロック内が均一に近づき、図12に示すように、ブロックに対応する圧縮コード量が減る。減った部分に、修正画素を置き換える色情報を入れる。図12は、本発明の実施形態における圧縮コードを削除した部分に修正画素情報を入れることを説明する図である。この修正画素情報の入れ方については後述する。修正画素のブロック内の画素は、修正画素以外の文字画素の平均とする。   In S76 of FIG. 7, both the invalid pixel and the correction pixel are replaced with the average value of the character pixels other than the correction pixel (a in FIG. 11). By doing so, the inside of the block approaches uniformly, and the amount of compressed code corresponding to the block decreases as shown in FIG. Color information that replaces the correction pixel is put in the reduced portion. FIG. 12 is a diagram for explaining that the corrected pixel information is inserted into the portion where the compressed code is deleted in the embodiment of the present invention. The method of entering the corrected pixel information will be described later. The pixels in the correction pixel block are the average of the character pixels other than the correction pixels.

同時に、ブロック内の文字画素の修正画素と、それ以外の画素を区別するために、修正画素に対応する黒文字画像の画素を黒文字にする。これは、通常、文字画素で文字となっている画素は、黒文字画像で黒文字となっていないためである。もし文字画素で文字となっている画素は、黒文字画像で黒文字となっているのが通常であれば、逆に修正画素に対応する黒文字画像の画素を非黒文字にする必要がある。   At the same time, in order to distinguish the correction pixel of the character pixel in the block from the other pixels, the pixel of the black character image corresponding to the correction pixel is made a black character. This is because a pixel that is a character in a character pixel is not a black character in a black character image. If a pixel that is a character in a character pixel is usually a black character in a black character image, the pixel in the black character image corresponding to the correction pixel needs to be a non-black character.

次に、前景画像の修正画素を置き換える色情報の入れ方について説明する。前景画像はJPEG圧縮されているものとする。JPEGの場合、図13に示すように8×8のブロックがハフマン符号化される。図13は、本発明の実施形態におけるJPEG圧縮の基本方式の処理手順を示す図である。   Next, how to insert color information for replacing the corrected pixels of the foreground image will be described. It is assumed that the foreground image is JPEG compressed. In the case of JPEG, an 8 × 8 block is Huffman-encoded as shown in FIG. FIG. 13 is a diagram showing a processing procedure of the basic method of JPEG compression in the embodiment of the present invention.

JPEG圧縮は、図13に示すように、離散コサイン変換(DCT:Discrete Cosine Transform)の後に量子化をしたものをハフマン符号化して出力される。DC成分とAC成分は、別々にハフマン符号化することとなる。DC成分は、前のブロックとの差分値を符号化して、AC成分はジグザグスキャン(図14)で読み取った成分のコードをハフマン符号化する。   As shown in FIG. 13, JPEG compression is performed after Huffman coding of quantized data after discrete cosine transform (DCT). The DC component and the AC component are separately Huffman encoded. For the DC component, the difference value from the previous block is encoded, and for the AC component, the code of the component read by the zigzag scan (FIG. 14) is Huffman encoded.

ハフマン符号化ではハフマン符号表に応じてビット符号列が定まる。ビット符号の調整データを作成するためには、ハフマン符号表から適したビット符号列を選択する必要がある。   In Huffman coding, a bit code string is determined according to a Huffman code table. In order to create bit code adjustment data, it is necessary to select a suitable bit code string from the Huffman code table.

図14は、本発明の実施形態におけるJPEG画像のジグザグスキャンのテーブルを示す図である。AC成分は、図14に示すジグザグスキャンのテーブルで読んだ順番で、係数のビット数と、符号化するブロック以前の0のランレングスに基づいて、図15示したようなハフマン符号表に基づいて符号化される。図15は、本発明の実施形態におけるJPEG圧縮におけるAC成分のハフマン符号表の一例を示す図である。   FIG. 14 is a view showing a zigzag scan table of JPEG images in the embodiment of the present invention. The AC component is based on the Huffman code table as shown in FIG. 15 based on the number of bits of the coefficient and the run length of 0 before the block to be encoded in the order read in the zigzag scan table shown in FIG. Encoded. FIG. 15 is a diagram showing an example of a Huffman code table of AC components in JPEG compression according to the embodiment of the present invention.

例えば、最も高周波な成分(図14の右下)の値の係数値が5であり、0のランレングスが0であった場合、5は2進表現で“101”であるから、図15のrw=3,run=0の箇所に記載されている“100”が選択される。符号は表に基づいて選択された“100”に5を表現する“101”が付加されて、最終的にこの係数に対する符号は、“100101”となる。   For example, when the coefficient value of the value of the highest frequency component (lower right in FIG. 14) is 5 and the run length of 0 is 0, 5 is “101” in binary representation, so FIG. “100” described in the place of rw = 3, run = 0 is selected. As the code, “101” representing 5 is added to “100” selected based on the table, and finally the code for this coefficient becomes “100101”.

ところで、修正画素に対応する画素を、その他の文字画素の平均値に置き換えたことで、修正画素が含まれるブロックの圧縮コードでは、高周波成分の値が低くなっているはずである。一番高い高周波成分の値をいくつか増減させても、元の画像よりは再現性が高くなる。本発明では、この高周波成分の領域に、情報を埋め込むものである。   By the way, by replacing the pixel corresponding to the correction pixel with the average value of the other character pixels, the compressed code of the block including the correction pixel should have a low high-frequency component value. Even if the value of the highest high-frequency component is increased or decreased, the reproducibility is higher than that of the original image. In the present invention, information is embedded in the high-frequency component region.

高周波成分の領域に埋め込むコードから、上下左右の4値を識別する必要があるため、表1に示すようなルールで、一番高い高周波成分の値を変える。例えば、ブロックの修正文字画素を、それに接する上のブロックの代表値に置き換える場合、前景画像ブロックの一番高い高周波成分の係数が5であるときには、5にもっとも近い4の倍数は4であるため、係数は4にして圧縮を行う。4の場合は、4を表す2進表現は、“100”であるため、この係数に対する圧縮コードは“100100”になる。

Figure 2012134847
Since it is necessary to identify the four values of the top, bottom, left, and right from the code embedded in the high frequency component region, the highest high frequency component value is changed according to the rules shown in Table 1. For example, when the corrected character pixel of a block is replaced with the representative value of the upper block adjacent to the block, when the coefficient of the highest high-frequency component of the foreground image block is 5, the multiple of 4 closest to 5 is 4. The coefficient is 4 and compression is performed. In the case of 4, since the binary representation representing 4 is “100”, the compression code for this coefficient is “100100”.
Figure 2012134847

なお、このようにして再生成した圧縮コードは、元の圧縮コードと同じビット数を持つとは限らない。すなわち、編集箇所のビット符号を、書き換えたい色に対応するビット符号に置き換えると、ビットの符号量は変化する。ところが、書き換えたい色に対応するビット符号は、エントロピー符号化を用いて圧縮されたファイルであれば、例外を除いて書き換え前のコードよりもサイズが小さい。   Note that the compressed code regenerated in this way does not necessarily have the same number of bits as the original compressed code. In other words, when the bit code at the edit location is replaced with a bit code corresponding to the color to be rewritten, the bit code amount changes. However, if the bit code corresponding to the color to be rewritten is a file compressed using entropy coding, the size is smaller than the code before rewriting, except for exceptions.

なぜならば、書き換えたい文字の色は、変えたい色に対する固定の値であり、ブロック内の画素値がすべてその値になるからである。書き換え対象のデータの値は、基本的には原稿から読み取った値である場合が多い。読み取る原稿では同じ色の画素であっても、読み取り特性により多少値にばらつきがある。エントロピー符号化では、エントロピーが大きい方が符号量は多いため、置き換え後のビット符号のほうが小さい(図16)。   This is because the color of the character to be rewritten is a fixed value for the color to be changed, and all the pixel values in the block are the value. In many cases, the value of data to be rewritten is basically a value read from a document. In the original to be read, even for pixels of the same color, the values vary somewhat depending on the reading characteristics. In entropy coding, the larger the entropy, the larger the code amount, so the bit code after replacement is smaller (FIG. 16).

置き換えた結果、減少したビット数は、その領域に続く無効領域のビット符号を増やすことで吸収する。無効領域はどんな色に対応するデータでも画質に影響しないため、問題はない。その結果、置き換えたい領域とそれに続く無効領域のデータのみに影響が留まる。それ以降のデータのビットシフトは不要となる(図17)。なお、仮にビット符号が編集後に増えた場合は、無効領域のビット符号を減らすことで対応可能な場合は対応することもできる。   As a result of the replacement, the reduced number of bits is absorbed by increasing the bit code of the invalid area following the area. The invalid area has no problem because data corresponding to any color does not affect the image quality. As a result, only the area to be replaced and the subsequent invalid area data are affected. Subsequent data bit shifts are not required (FIG. 17). It should be noted that if the bit code increases after editing, it can be dealt with if the bit code in the invalid area can be reduced.

このようにハフマン符号表では、同じビット数のコードが存在しうる。予め各コードに意味を割り当てて、編集内容に応じたコードを出力することで、ファイルサイズは変えることなく情報を埋め込むことができる。同じビット数のコードがない場合は、それよりもビット数が多く、複数のコードが存在するビット数のコードを出力する。本来出力するべきビット数よりもビット数が増えてしまうが、ここも編集領域とみなして、その後の無効領域で吸収すれば良い。このようにしてビットシフトの移動ロスを防ぐことが可能である。   Thus, in the Huffman code table, codes having the same number of bits can exist. By assigning a meaning to each code in advance and outputting a code corresponding to the editing content, information can be embedded without changing the file size. If there is no code having the same number of bits, a code having a larger number of bits than that and having a plurality of codes is output. Although the number of bits is larger than the number of bits that should be output, it can be regarded as an editing area and absorbed in the subsequent invalid area. In this way, it is possible to prevent bit shift movement loss.

一般的には、前景画像に各ブロックにおいては、圧縮コードは減るため、前景画像のファイルサイズは増えることはない。黒文字画像に関しては、増えることになるが、2値のデータであるため、わずかな増加で済む。   In general, since the compression code is reduced in each block of the foreground image, the file size of the foreground image does not increase. The black character image will increase, but since it is binary data, a slight increase is sufficient.

上述した実施形態では、修正画素は単一の色で置き換えることしかできなかった。それでも問題ないケースが多いが、本発明による他の実施形態では、同一ブロック内に、異なる色で置き換えたい修正画素を持つための方法について説明する。   In the embodiment described above, the corrected pixel could only be replaced with a single color. In many cases, there is still no problem, but in another embodiment of the present invention, a method for having a corrected pixel to be replaced with a different color in the same block will be described.

上述した実施形態との相違点は、図9におけるS96と図7におけるS76である。すなわち、図9のS96において、修正画素は、その修正画素が含まれるブロックの、一番近いブロックに置き換えるべき色を持つ可能性が高い。そのため、予めいくつかの考えられるパターンを用意しておき、ブロック内のすべての修正画素候補がパターンに一致するか否かを確認する。   The difference from the above-described embodiment is S96 in FIG. 9 and S76 in FIG. That is, in S96 of FIG. 9, the correction pixel is highly likely to have a color to be replaced with the closest block of the block including the correction pixel. Therefore, several possible patterns are prepared in advance, and it is confirmed whether or not all the correction pixel candidates in the block match the pattern.

図18は、本発明の他の実施形態における置き換える色を持つブロックへのベクトルを示す図である。パターン1として、修正画素が最も近い上下左右のブロックに置き換える。パターン2として、修正画素が最も近い左右のブロックに置き換える。パターン3として、修正画素が最も近い上下のブロックに置き換える。なお、パターン1において、最も近いブロックが複数ある場合は、予めパターンとしてどちらにするかを決めておくものとする。そして、パターンに一致した場合は、どのパターンに一致したかを出力する。   FIG. 18 is a diagram showing vectors to blocks having replacement colors in another embodiment of the present invention. As pattern 1, the correction pixel is replaced with the upper, lower, left, and right blocks closest to each other. As pattern 2, the right and left blocks with the closest correction pixels are replaced. As pattern 3, replacement is performed with the upper and lower blocks closest to the correction pixel. In the case where there are a plurality of closest blocks in pattern 1, it is determined in advance which pattern is used. If it matches the pattern, it outputs which pattern it matches.

図7におけるS76について、本発明の実施形態との相違点のみを示す。圧縮コードには、パターンに関する情報も出力する必要があるため、表1に加えて、パターンの情報を追加する。

Figure 2012134847
Only the difference from the embodiment of the present invention is shown in S76 in FIG. Since it is necessary to output information on the pattern to the compressed code, the information on the pattern is added in addition to Table 1.
Figure 2012134847

以下に、本発明を用いて生成されたファイルのデコードについて記載する。
実施の形態について、

Figure 2012134847
Figure 2012134847
なお、ブロックの代表値は、図9におけるS93で用いた計算方法で算出する。 Hereinafter, decoding of a file generated using the present invention will be described.
About the embodiment
Figure 2012134847
Figure 2012134847
The representative value of the block is calculated by the calculation method used in S93 in FIG.

他の実施形態について、実施形態に対するデコードとの差分は、表4であるため、対応する表を以下に示す。

Figure 2012134847
Regarding other embodiments, since the difference from the decoding with respect to the embodiment is Table 4, the corresponding table is shown below.
Figure 2012134847

以上説明してきたように、従来技術と異なり、文字の色を画像(前景画像)で表現する技術において、プレビュー画面において、文字の色変わりを指定された領域に対応する前景画像上のブロックを、そのブロック内に含まれる色を減少させて圧縮を行うことにより、そのブロックの圧縮コード量を低減させて、当該減少させた色を、当該減少させた色と近い当該ブロックに隣接する色のベクトル情報として、当該低減させた圧縮コードの部分に格納すると同時に、減少させた色に対応する画素を識別する情報を格納するようにしたので、文字の色を画像(前景画像)で表現する技術において、プレビュー画面上で、文字の色変わりを改善することができる。   As described above, unlike the conventional technique, in the technique for expressing the color of a character as an image (foreground image), the block on the foreground image corresponding to the designated area of the character color change is displayed on the preview screen. By reducing the color contained in the block and performing compression, the amount of compressed code of the block is reduced, and the vector information of the color adjacent to the block close to the reduced color is the reduced color. As the information for identifying the pixel corresponding to the reduced color is stored at the same time as storing in the reduced compressed code portion, in the technology for expressing the color of the character as an image (foreground image), It is possible to improve the color change of characters on the preview screen.

以上、本発明の好適な実施の形態により本発明を説明した。ここでは特定の具体例を示して本発明を説明したが、特許請求の範囲に定義された本発明の広範囲な趣旨及び範囲から逸脱することなく、これら具体例に様々な修正及び変更が可能である。   The present invention has been described above by the preferred embodiments of the present invention. While the invention has been described with reference to specific embodiments thereof, various modifications and changes can be made to these embodiments without departing from the broader spirit and scope of the invention as defined in the claims. is there.

1 画像処理装置
10 プロッタ
11 コピー画像
12 ネットワーク
13 外部PC端末
14 HDD
15 NIC
16 操作部
2 スキャナ
3 原稿
4 スキャナ補正部
5 圧縮処理部
6 汎用バス
7 コントローラ
8 伸張処理部
9 プリンタ補正部
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 10 Plotter 11 Copy image 12 Network 13 External PC terminal 14 HDD
15 NIC
16 Operation unit 2 Scanner 3 Document 4 Scanner correction unit 5 Compression processing unit 6 General-purpose bus 7 Controller 8 Decompression processing unit 9 Printer correction unit

特開2008−236204号公報JP 2008-236204 A

Claims (6)

異なる複数の色彩から構成される画像を矩形型の画像領域に区分して圧縮する圧縮手段を有する画像圧縮装置であって、
複数の文字画像の中から第1の色彩情報を有する矩形型の画像領域を特定する第1の画像領域特定手段と、
前記第1の画像領域特定手段により特定された前記第1の色彩情報を有する矩形型の画像領域に隣接する前記複数の文字画像の中から第2の色彩情報を有する矩形型の画像領域を特定する第2の画像領域特定手段と、を有し、
前記圧縮手段は、
第1の圧縮コードを生成する第1の圧縮コード生成手段と、
第2の圧縮コードを生成する第2の圧縮コード生成手段と、
前記第1の圧縮コードのデータ量と前記第2の圧縮コードのデータ量との和である総圧縮コードのデータ量から、前記第2の圧縮コードのデータ量に相当するデータ量を減ずるデータ量削減手段と、
前記第2の色彩情報に基づいて、前記第2の色彩情報を識別する情報であるベクトル情報を生成するベクトル情報生成手段と、
前記減ぜられた前記第2の圧縮コードのデータ量に相当するデータ量の部分に、前記ベクトル情報生成手段により生成された前記ベクトル情報を格納するベクトル情報格納手段と、
前記第1の圧縮コードのデータの中に前記ベクトル情報を格納した圧縮画像情報を生成する圧縮画像情報生成手段と、
を備えたことを特徴とする画像圧縮装置。
An image compression apparatus having compression means for dividing and compressing an image composed of a plurality of different colors into rectangular image regions,
First image area specifying means for specifying a rectangular image area having first color information from among a plurality of character images;
A rectangular image area having second color information is specified from among the plurality of character images adjacent to the rectangular image area having the first color information specified by the first image area specifying means. Second image area specifying means for performing,
The compression means includes
First compressed code generation means for generating a first compressed code;
Second compressed code generation means for generating a second compressed code;
A data amount that subtracts a data amount corresponding to the data amount of the second compression code from a data amount of the total compression code that is the sum of the data amount of the first compression code and the data amount of the second compression code Reduction measures,
Vector information generating means for generating vector information which is information for identifying the second color information based on the second color information;
Vector information storage means for storing the vector information generated by the vector information generation means in a portion of the data amount corresponding to the reduced data amount of the second compression code;
Compressed image information generating means for generating compressed image information in which the vector information is stored in the data of the first compressed code;
An image compression apparatus comprising:
前記圧縮画像情報をプレビュー表示する表示手段を設け、前記第2の画像領域特定手段は、前記表示手段にプレビュー表示される画像に対する領域指定を行うことにより、前記第2の色彩情報を有する矩形型の画像領域が特定されることを特徴とする請求項1に記載の画像圧縮装置。   Display means for displaying the compressed image information as a preview is provided, and the second image area specifying means designates an area for an image preview-displayed on the display means, thereby having a rectangular shape having the second color information. The image compression apparatus according to claim 1, wherein an image area is specified. 前記第2の色彩情報を有する矩形型の画像領域は、前記第1の色彩情報を有する矩形型の画像領域に隣接する上下左右の領域の中から特定されることを特徴とする請求項1又は2に記載の画像圧縮装置。   The rectangular image area having the second color information is specified from upper, lower, left, and right areas adjacent to the rectangular image area having the first color information. 2. The image compression apparatus according to 2. 各々が異なる複数の色彩情報を有する複数の矩形型の画像領域と、これら複数の画像領域の前記複数の色彩情報を識別する情報である複数のベクトル情報とを画像領域情報群として予め用意しておき、前記領域指定がなされたときに、前記画像領域情報群の中から、前記第2の色彩情報を有する矩形型の画像領域が特定されることを特徴とする請求項2又は3に記載の画像圧縮装置。   A plurality of rectangular image areas each having a plurality of different color information, and a plurality of vector information, which is information for identifying the plurality of color information of the plurality of image areas, are prepared in advance as an image area information group. 4. The rectangular image area having the second color information is specified from the image area information group when the area is designated. Image compression device. 異なる複数の色彩から構成される画像を矩形型の画像領域に区分して圧縮する圧縮手段を有する画像圧縮装置における画像圧縮方法であって、
第1の画像領域特定手段により、複数の文字画像の中から第1の色彩情報を有する矩形型の画像領域を特定する工程と、
第2の画像領域特定手段により、前記第1の画像領域特定手段により特定された前記第1の色彩情報を有する矩形型の画像領域に隣接する前記複数の文字画像の中から第2の色彩情報を有する矩形型の画像領域を特定する工程と、を有し、
前記圧縮手段は、
第1の圧縮コード生成手段により、第1の圧縮コードを生成する工程と、
第2の圧縮コード生成手段により、第2の圧縮コードを生成する工程と、
データ量削減手段により、前記第1の圧縮コードのデータ量と前記第2の圧縮コードのデータ量との和である総圧縮コードのデータ量から、前記第2の圧縮コードのデータ量に相当するデータ量を削減する工程と、
ベクトル情報生成手段により、前記第2の色彩情報に基づいて、前記第2の色彩情報を識別する情報であるベクトル情報を生成する工程と、
ベクトル情報格納手段により、前記減ぜられた前記第2の圧縮コードのデータ量に相当するデータ量の部分に、前記ベクトル情報生成手段により生成された前記ベクトル情報を格納する工程と、
圧縮画像情報生成手段により、前記第1の圧縮コードのデータの中に前記ベクトル情報を格納した圧縮画像情報を生成する工程と、
を備えたことを特徴とする画像圧縮方法。
An image compression method in an image compression device having compression means for dividing and compressing an image composed of a plurality of different colors into rectangular image regions,
Identifying a rectangular image area having first color information from among a plurality of character images by a first image area specifying means;
Second color information from among the plurality of character images adjacent to the rectangular image area having the first color information specified by the first image area specifying means by the second image area specifying means. Identifying a rectangular image area having
The compression means includes
Generating a first compressed code by first compressed code generating means;
Generating a second compressed code by a second compressed code generating means;
The data amount reduction means corresponds to the data amount of the second compression code from the data amount of the total compression code, which is the sum of the data amount of the first compression code and the data amount of the second compression code. Reducing the amount of data,
A step of generating vector information, which is information for identifying the second color information, based on the second color information by a vector information generation unit;
Storing the vector information generated by the vector information generating unit in a portion of the data amount corresponding to the reduced data amount of the second compressed code by the vector information storing unit;
Generating compressed image information in which the vector information is stored in the data of the first compressed code by compressed image information generating means;
An image compression method comprising:
異なる複数の色彩から構成される画像を矩形型の画像領域に区分して圧縮する圧縮手段を有する画像圧縮装置のコンピュータに実行させるプログラムであって、
第1の画像領域特定手段により、複数の文字画像の中から第1の色彩情報を有する矩形型の画像領域を特定する処理と、
第2の画像領域特定手段により、前記第1の画像領域特定手段により特定された前記第1の色彩情報を有する矩形型の画像領域に隣接する前記複数の文字画像の中から第2の色彩情報を有する矩形型の画像領域を特定する処理と、を有し、
前記圧縮手段は、
第1の圧縮コード生成手段により、第1の圧縮コードを生成する処理と、
第2の圧縮コード生成手段により、第2の圧縮コードを生成する処理と、
データ量削減手段により、前記第1の圧縮コードのデータ量と前記第2の圧縮コードのデータ量との和である総圧縮コードのデータ量から、前記第2の圧縮コードのデータ量に相当するデータ量を削減する処理と、
ベクトル情報生成手段により、前記第2の色彩情報に基づいて、前記第2の色彩情報を識別する情報であるベクトル情報を生成する処理と、
ベクトル情報格納手段により、前記減ぜられた前記第2の圧縮コードのデータ量に相当するデータ量の部分に、前記ベクトル情報生成手段により生成された前記ベクトル情報を格納する処理と、
圧縮画像情報生成手段により、前記第1の圧縮コードのデータの中に前記ベクトル情報を格納した圧縮画像情報を生成する処理と、
を備えたことを特徴とするプログラム。
A program to be executed by a computer of an image compression apparatus having compression means for compressing an image composed of a plurality of different colors by dividing the image into rectangular image regions,
A process of specifying a rectangular image area having first color information from among a plurality of character images by a first image area specifying means;
Second color information from among the plurality of character images adjacent to the rectangular image area having the first color information specified by the first image area specifying means by the second image area specifying means. Identifying a rectangular image area having
The compression means includes
Processing for generating the first compressed code by the first compressed code generating means;
A process of generating a second compressed code by the second compressed code generating means;
The data amount reduction means corresponds to the data amount of the second compression code from the data amount of the total compression code, which is the sum of the data amount of the first compression code and the data amount of the second compression code. Processing to reduce the amount of data,
Processing for generating vector information, which is information for identifying the second color information, based on the second color information by the vector information generating means;
Processing for storing the vector information generated by the vector information generating means in a portion of the data amount corresponding to the reduced data amount of the second compressed code by the vector information storing means;
Processing for generating compressed image information in which the vector information is stored in the data of the first compressed code by compressed image information generating means;
A program characterized by comprising:
JP2010286311A 2010-12-22 2010-12-22 Image compression apparatus, image compression method and program Pending JP2012134847A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010286311A JP2012134847A (en) 2010-12-22 2010-12-22 Image compression apparatus, image compression method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010286311A JP2012134847A (en) 2010-12-22 2010-12-22 Image compression apparatus, image compression method and program

Publications (1)

Publication Number Publication Date
JP2012134847A true JP2012134847A (en) 2012-07-12

Family

ID=46649892

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010286311A Pending JP2012134847A (en) 2010-12-22 2010-12-22 Image compression apparatus, image compression method and program

Country Status (1)

Country Link
JP (1) JP2012134847A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014072556A (en) * 2012-09-27 2014-04-21 Oki Data Corp Image processing apparatus, program and method
US9123090B2 (en) 2012-10-04 2015-09-01 Seiko Epson Corporation Image data compression device, image data decompression device, display device, image processing system, image data compression method, and image data decompression method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04326665A (en) * 1991-04-26 1992-11-16 Canon Inc Picture encoder
JPH0888775A (en) * 1994-09-19 1996-04-02 Toppan Printing Co Ltd Image processing unit
JP2005101989A (en) * 2003-09-25 2005-04-14 Sharp Corp Image processor, image processing method, image forming apparatus, computer program, and recording medium
JP2008022529A (en) * 2006-06-12 2008-01-31 Canon Inc Image processing apparatus and image processing method
JP2008167060A (en) * 2006-12-27 2008-07-17 Canon Inc Image encoding device and control method thereof
JP2010118760A (en) * 2008-11-11 2010-05-27 Canon Inc Image processing apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04326665A (en) * 1991-04-26 1992-11-16 Canon Inc Picture encoder
JPH0888775A (en) * 1994-09-19 1996-04-02 Toppan Printing Co Ltd Image processing unit
JP2005101989A (en) * 2003-09-25 2005-04-14 Sharp Corp Image processor, image processing method, image forming apparatus, computer program, and recording medium
JP2008022529A (en) * 2006-06-12 2008-01-31 Canon Inc Image processing apparatus and image processing method
JP2008167060A (en) * 2006-12-27 2008-07-17 Canon Inc Image encoding device and control method thereof
JP2010118760A (en) * 2008-11-11 2010-05-27 Canon Inc Image processing apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014072556A (en) * 2012-09-27 2014-04-21 Oki Data Corp Image processing apparatus, program and method
US9123090B2 (en) 2012-10-04 2015-09-01 Seiko Epson Corporation Image data compression device, image data decompression device, display device, image processing system, image data compression method, and image data decompression method

Similar Documents

Publication Publication Date Title
JP4861711B2 (en) Image processing apparatus, image compression method, image compression program, and recording medium
JP4176114B2 (en) Image compression apparatus, image reading apparatus including the same, image processing apparatus including the image compression apparatus, image forming apparatus including the same, and image compression processing method
JP4732488B2 (en) Image processing apparatus, image forming apparatus, image reading apparatus, image processing method, image processing program, and computer-readable recording medium
JP5132517B2 (en) Image processing apparatus and image processing method
US8331671B2 (en) Image processing apparatus and image encoding method related to non-photo image regions
JP5132530B2 (en) Image coding apparatus, image processing apparatus, and control method thereof
US8503036B2 (en) System and method of improving image quality in digital image scanning and printing by reducing noise in output image data
US8244035B2 (en) Image processing apparatus and control method thereof
US8395813B2 (en) Subtractive color method, subtractive color processing apparatus, image forming apparatus, and computer-readable storage medium for computer program
US20090324068A1 (en) Image processing apparatus, image forming apparatus, image processing method, and computer program product
JP5049921B2 (en) Image processing apparatus and image processing method
JP2010146218A (en) Image processing apparatus, image processing method, computer program
JP2000184183A (en) Electronic pasting method of compressed picture data and method for processing digital picture
JP2012134847A (en) Image compression apparatus, image compression method and program
JP4476172B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium
JP2007088912A (en) Image processing apparatus and program
JP2009060474A (en) Image processing apparatus
JP2003219187A (en) Image processing method and image processor
JP2009038456A (en) Image processing apparatus, control method thereof, program thereof, and storage medium thereof
JP4759502B2 (en) Image processing method, image processing apparatus, image processing program, and computer-readable recording medium recording the image processing program
JP4584805B2 (en) Image processing apparatus, image processing method, and image processing program
JP5321364B2 (en) Image processing apparatus, image processing method, and program
JP7185451B2 (en) Image processing device, image processing method, and program
JP2007189275A (en) Image processor
JP2005341098A (en) Image processing unit, program, and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131111

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141205

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141216

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150407