JP2011142391A - Image processing apparatus, image formation apparatus, image processing method, and program - Google Patents

Image processing apparatus, image formation apparatus, image processing method, and program Download PDF

Info

Publication number
JP2011142391A
JP2011142391A JP2010000633A JP2010000633A JP2011142391A JP 2011142391 A JP2011142391 A JP 2011142391A JP 2010000633 A JP2010000633 A JP 2010000633A JP 2010000633 A JP2010000633 A JP 2010000633A JP 2011142391 A JP2011142391 A JP 2011142391A
Authority
JP
Japan
Prior art keywords
image
code
data capacity
pixel
data
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.)
Granted
Application number
JP2010000633A
Other languages
Japanese (ja)
Other versions
JP5515746B2 (en
Inventor
Tamon Sadasue
多聞 貞末
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 JP2010000633A priority Critical patent/JP5515746B2/en
Publication of JP2011142391A publication Critical patent/JP2011142391A/en
Application granted granted Critical
Publication of JP5515746B2 publication Critical patent/JP5515746B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing technique capable of controlling data capacity of the whole of image data in accordance with a predetermined format generated by using a foreground code and a background code while keeping suitable image quality. <P>SOLUTION: A picture/character separating section 51 extracts a feature of an input image, and generates a selection image representing into which of a pixel representing a character or line, or a pixel representing a non-character the input image is classified on a pixel basis. A background/foreground generation section 52 generates a background and a foreground using the input image and the selection image. A compression section 53 encodes the selection image as a mask. A code capacity determination section 54 determines respective data capacity values of codes of the background and those of the foreground using the selection image so that the data capacity of a multilayer image becomes a target data capacity. A picture compression section 55 respectively encodes the background and the foreground to become the respectively determined data capacity values. A multilayer structuring section 56 generates a multilayer image by wrapping the codes of the mask, those of the background and those of the foreground. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、画像処理装置、画像形成装置、画像処理方法及びプログラムに関する。   The present invention relates to an image processing apparatus, an image forming apparatus, an image processing method, and a program.

従来より、例えば特許文献1に示されるように、入力された画像を、その画像の各領域から得られる特徴を元に分離した後フォーマット変換し、文字や線を表す画像、写真や絵柄などの自然画を表す画像及びそのどちらを選択するかを画素毎に表す画像を持つマルチレイヤ構造の画像データに変換する技術がある。この技術によれば、文字のエッジを保ち、自然画の領域が滑らかな画質を保ちながら、画像データのデータ容量を小さくできる。このような技術で生成された画像データのデータ容量を制御したいという要求がある。   Conventionally, as shown in Patent Document 1, for example, an input image is separated based on features obtained from each area of the image, and then converted into a format, such as an image representing a character or a line, a photograph or a picture. There is a technique for converting an image representing a natural image and image data having a multi-layer structure having an image representing for each pixel which image is selected. According to this technique, it is possible to reduce the data capacity of image data while maintaining the edge of characters and maintaining a smooth image quality of a natural image area. There is a demand to control the data capacity of image data generated by such a technique.

例えば、メール送受信システムでは、大容量のデータを送受信しようとしてシステムの速度がダウンしたり、システムのディスク容量を使い切ってしまうことで他のアカウントが使用できなかったりするなどの影響を受けることを防止する目的で、送信や受信のデータのデータ容量の上限を設定することが多い。データ容量の上限を超えてデータを送信しようとした場合は、通常、送信側でその処理が失敗する。また、受信側で受信可能なデータ容量の上限を超えたデータ容量のデータを送信した場合、送信側では処理が成功するが、受信側で処理が失敗するため結果的にデータを受信側に届けることが出来なくなる。   For example, in the mail transmission / reception system, the system speed is reduced when trying to send / receive large amounts of data, and it is prevented that other accounts cannot be used due to using up the disk capacity of the system. For this purpose, the upper limit of the data capacity of the data to be transmitted or received is often set. When trying to transmit data exceeding the upper limit of the data capacity, the processing usually fails on the transmission side. Also, when data with a data capacity exceeding the upper limit of the data capacity that can be received on the receiving side is transmitted, the processing is successful on the transmitting side, but the processing fails on the receiving side, so that the data is eventually delivered to the receiving side. Can not do.

このような背景において、マルチレイヤ構造を利用した圧縮によって生成される画像データのデータ容量を、所定もしくは指定されたデータ容量に制御することは、メール送受信のみならず、画像データの利用において望ましいことである。例えば、特許文献2には、JPEG2000の方式により画像を符号化して圧縮する際に、指定した圧縮率で符号を生成するように制御するレートコントロール技術が開示されている。JPEG2000は、解像度、画質のスケーラビリティを持ち、生成される符号のデータ容量を目的のデータ容量に収めることが出来る。この技術を使えば、マルチレイヤ構造の画像データのうち、文字の画像を表す前景、絵柄や写真などの自然画像の画像を表す背景を符号化する際に、前景の符号及び背景の符号をそれぞれ目的のデータ容量に制御することができる。   In such a background, it is desirable not only to send and receive e-mails but also to use image data to control the data capacity of image data generated by compression using a multilayer structure to a predetermined or specified data capacity. It is. For example, Patent Document 2 discloses a rate control technique for performing control so that a code is generated at a specified compression rate when an image is encoded and compressed by the JPEG2000 method. JPEG2000 has scalability of resolution and image quality, and the data capacity of the generated code can be kept within the target data capacity. With this technology, when encoding the foreground representing the character image and the background representing the image of a natural image such as a picture or photo in the multi-layer structure image data, the foreground code and the background code are respectively encoded. The target data capacity can be controlled.

しかし、特許文献2の技術では、前景の符号及び背景の符号をそれぞれ目的のデータ容量に制御できても、好適な画質を維持しつつ、マルチレイヤ構造の画像データの全体のデータ容量を目的のデータ容量に制御することは困難であった。 However, in the technique of Patent Document 2, although the foreground code and the background code can be controlled to the target data capacity, respectively, the overall data capacity of the multi-layered image data is maintained while maintaining a suitable image quality. It was difficult to control the data capacity.

本発明は、上記に鑑みてなされたものであって、好適な画質を維持しつつ、前景の符号及び背景の符号を用いて生成される所定のフォーマットに従った画像データの全体のデータ容量を制御可能な画像処理装置、画像形成装置、画像処理方法及びプログラムを提供することを目的とする。   The present invention has been made in view of the above, and reduces the overall data capacity of image data in accordance with a predetermined format generated using the foreground code and background code while maintaining a suitable image quality. An object is to provide a controllable image processing apparatus, an image forming apparatus, an image processing method, and a program.

上述した課題を解決し、目的を達成するために、本発明は、画像処理装置であって、画像の入力を受け付ける画像入力受付手段と、前記画像の特徴に基づいて、文字又は線を表す第1画素、あるいは、文字及び線以外を表す第2画素のいずれに分類されるかを画素毎に表す選択画像、前記第1画素を含む第1画像及び前記第2画素を含む第2画像を生成する第1生成手段と、前記選択画像を符号化して、前記選択画像の符号を生成する第1符号化手段と、前記第1画像及び第2画像を各々符号化して、前記第1画像の符号及び第2画像の符号を各々生成する第2符号化手段と、前記第1画像の符号、第2画像の符号及び前記選択画像の符号を用いて、所定のフォーマットに従った画像データを生成する第2生成手段とを備える画像処理装置において、前記画像データのデータ容量が所定のデータ容量以下となるように、前記第1画像の符号のデータ容量及び前記第2画像の符号のデータ容量のうち少なくとも一方を決定する決定手段を更に備え、前記第2符号化手段は、前記第1画像の符号及び第2画像の符号のうち少なくとも一方に対して各々決定された前記データ容量になるように、前記第1画像及び前記第2画像を各々符号化して、前記第1画像の符号及び前記第2画像の符号を各々生成することを特徴とする。   In order to solve the above-described problem and achieve the object, the present invention provides an image processing apparatus, an image input receiving unit that receives an input of an image, and a character or line that represents characters or lines based on the characteristics of the image. Generates a selected image that represents for each pixel whether it is classified as one pixel or a second pixel other than a character and a line, a first image that includes the first pixel, and a second image that includes the second pixel First generating means for encoding, the first encoding means for encoding the selected image to generate a code for the selected image, and encoding each of the first image and the second image for encoding the first image. And second encoding means for generating a code for the second image, and a code for the first image, a code for the second image, and a code for the selected image, to generate image data according to a predetermined format. An image processing apparatus comprising: a second generation unit; And determining means for determining at least one of the code data capacity of the first image and the code data capacity of the second image so that the data capacity of the image data is equal to or less than a predetermined data capacity. The second encoding means converts the first image and the second image so as to have the data capacity determined for at least one of the code of the first image and the code of the second image, respectively. Each of the codes is encoded to generate a code for the first image and a code for the second image.

また、本発明は、画像処理装置であって、画像の入力を受け付ける画像入力受付手段と、前記画像の特徴に基づいて、文字又は線を表す第1画素、あるいは、文字及び線以外を表す第2画素のいずれに分類されるかを画素毎に表す選択画像、前記第1画素を含む第1画像及び前記第2画素を含む第2画像を生成する第1生成手段と、前記選択画像を符号化して、前記選択画像の符号を生成する第1符号化手段と、前記第1画像及び第2画像を各々符号化して、前記第1画像の符号及び第2画像の符号を各々生成する第2符号化手段と、前記第1画像の符号、第2画像の符号及び前記選択画像の符号を用いて、所定のフォーマットに従った画像データを生成する第2生成手段とを備える画像処理装置において、前記画像データのデータ容量が所定のデータ容量以下となるように、前記第1画像の圧縮率及び前記第第2画像の圧縮率のうち少なくとも一方を決定する決定手段を更に備え、前記第2符号化手段は、前記第1画像及び第2画像のうち少なくとも一方に対して各々決定された前記圧縮率になるように、前記第1画像及び第2画像を各々符号化して、前記第1画像の符号及び第2画像の符号を各々生成することを特徴とする。   In addition, the present invention is an image processing apparatus, which is an image input receiving unit that receives an input of an image, and a first pixel that represents a character or a line, or a first pixel that represents something other than a character and a line, based on the characteristics of the image. A first generation unit that generates a selection image that indicates which of the two pixels is classified for each pixel, a first image that includes the first pixel, and a second image that includes the second pixel; And a first encoding means for generating a code for the selected image, and a second encoding means for encoding the first image and the second image, respectively, and generating a code for the first image and a code for the second image, respectively. An image processing apparatus comprising: an encoding unit; and a second generation unit that generates image data according to a predetermined format using the code of the first image, the code of the second image, and the code of the selected image. The data capacity of the image data is And determining means for determining at least one of the compression rate of the first image and the compression rate of the second image so that the data capacity is less than or equal to the data capacity of the first image, And encoding each of the first image and the second image so as to achieve the compression ratio determined for at least one of the second image and the second image, respectively. Each is generated.

また、本発明は、画像形成装置であって、上記の画像処理装置と、前記画像データを用いて、記録媒体に画像を形成する画像形成手段とを備えることを特徴とする。   According to another aspect of the present invention, there is provided an image forming apparatus including the above-described image processing apparatus and an image forming unit that forms an image on a recording medium using the image data.

また、本発明は、画像入力受付手段と、第1生成手段と、第1符号化手段と、第2符号化手段と、第2生成手段と、決定手段とを備える画像処理装置で実行される画像処理方法であって、前記画像入力受付手段が、画像の入力を受け付ける画像入力受付ステップと、前記第1生成手段が、前記画像の特徴に基づいて、文字又は線を表す第1画素、あるいは、文字及び線以外を表す第2画素のいずれに分類されるかを画素毎に表す選択画像、前記第1画素を含む第1画像及び前記第2画素を含む第2画像を生成する第1生成ステップと、前記第1符号化手段が、前記選択画像を符号化して、前記選択画像の符号を生成する第1符号化ステップと、前記第2符号化手段が、前記第1画像及び第2画像を各々符号化して、前記第1画像の符号及び第2画像の符号を各々生成する第2符号化ステップと、前記第2生成手段が、前記第1画像の符号、第2画像の符号及び前記選択画像の符号を用いて、所定のフォーマットに従った画像データを生成する第2生成ステップと、前記決定手段が、前記画像データのデータ容量が所定のデータ容量以下となるように、前記第1画像の符号のデータ容量及び前記第2画像の符号のデータ容量のうち少なくとも一方を決定する決定ステップとを含み、前記第2符号化ステップでは、前記第1画像の符号及び第2画像の符号のうち少なくとも一方に対して各々決定された前記データ容量になるように、前記第1画像及び前記第2画像を各々符号化して、前記第1画像の符号及び前記第2画像の符号を各々生成することを特徴とする。   In addition, the present invention is executed by an image processing apparatus including an image input reception unit, a first generation unit, a first encoding unit, a second encoding unit, a second generation unit, and a determination unit. An image processing method, wherein the image input receiving unit receives an image input, and the first generation unit is a first pixel representing a character or a line based on the characteristics of the image, or A first image that generates a selection image that represents, for each pixel, a second pixel that represents a pixel other than a character and a line, a first image that includes the first pixel, and a second image that includes the second pixel. A first encoding step in which the first encoding unit encodes the selected image to generate a code of the selected image; and the second encoding unit includes the first image and the second image. Are encoded, and the code of the first image and the first A second encoding step for generating an image code, and an image in accordance with a predetermined format, wherein the second generation means uses the code of the first image, the code of the second image, and the code of the selected image. A second generation step of generating data; and the determination means, so that the data capacity of the image data is equal to or less than a predetermined data capacity, and the data capacity of the code of the first image and the data of the code of the second image A determination step of determining at least one of the capacities, and the second encoding step has the data capacities determined for at least one of the code of the first image and the code of the second image, respectively. As described above, the first image and the second image are encoded to generate a code for the first image and a code for the second image, respectively.

また、本発明は、画像入力受付手段と、第1生成手段と、第1符号化手段と、第2符号化手段と、第2生成手段と、決定手段とを備える画像処理装置で実行される画像処理方法であって、前記画像入力受付手段が、画像の入力を受け付ける画像入力受付ステップと、前記第1生成手段が、前記画像の特徴に基づいて、文字又は線を表す第1画素、あるいは、文字及び線以外を表す第2画素のいずれに分類されるかを画素毎に表す選択画像、前記第1画素を含む第1画像及び前記第2画素を含む第2画像を生成する第1生成ステップと、前記第1符号化手段が、前記選択画像を符号化して、前記選択画像の符号を生成する第1符号化ステップと、前記第2符号化手段が、前記第1画像及び第2画像を各々符号化して、前記第1画像の符号及び第2画像の符号を各々生成する第2符号化ステップと、前記第2生成手段が、前記第1画像の符号、第2画像の符号及び前記選択画像の符号を用いて、所定のフォーマットに従った画像データを生成する第2生成ステップと、前記決定手段が、前記画像データのデータ容量が所定のデータ容量以下となるように、前記第1画像の圧縮率及び前記第第2画像の圧縮率のうち少なくとも一方を決定する決定ステップとを含み、前記第2符号化ステップでは、前記第1画像及び第2画像のうち少なくとも一方に対して各々決定された前記圧縮率になるように、前記第1画像及び第2画像を各々符号化して、前記第1画像の符号及び第2画像の符号を各々生成することを特徴とする。   In addition, the present invention is executed by an image processing apparatus including an image input reception unit, a first generation unit, a first encoding unit, a second encoding unit, a second generation unit, and a determination unit. An image processing method, wherein the image input receiving unit receives an image input, and the first generation unit is a first pixel representing a character or a line based on the characteristics of the image, or A first image that generates a selection image that represents, for each pixel, a second pixel that represents a pixel other than a character and a line, a first image that includes the first pixel, and a second image that includes the second pixel. A first encoding step in which the first encoding unit encodes the selected image to generate a code of the selected image; and the second encoding unit includes the first image and the second image. Are encoded, and the code of the first image and the first A second encoding step for generating an image code, and an image in accordance with a predetermined format, wherein the second generation means uses the code of the first image, the code of the second image, and the code of the selected image. A second generation step of generating data, and the determining means includes a compression ratio of the first image and a compression ratio of the second image so that a data volume of the image data is equal to or less than a predetermined data volume. A determination step for determining at least one of the first image and the second encoding step so that the compression rate determined for at least one of the first image and the second image is the same. The second image and the second image are encoded to generate a code for the first image and a code for the second image, respectively.

また、本発明は、上記の方法をコンピュータに実行させるためのプログラムである。   Moreover, this invention is a program for making a computer perform said method.

本発明によれば、好適な画質を維持しつつ、前景の符号及び背景の符号を用いて生成される所定のフォーマットに従った画像データの全体のデータ容量を制御可能になる。   According to the present invention, it is possible to control the entire data capacity of image data according to a predetermined format generated using a foreground code and a background code while maintaining a suitable image quality.

図1は、マルチレイヤ構造としてミクストラスターコンテント(MRC)のフォーマットの画像データを例示する図である。FIG. 1 is a diagram illustrating image data in a format of mixed star content (MRC) as a multi-layer structure. 図2は、第1の実施の形態にかかる画像処理装置50の機能的構成を例示する図である。FIG. 2 is a diagram illustrating a functional configuration of the image processing apparatus 50 according to the first embodiment. 図3は、マスク、前景及び背景を例示する図である。FIG. 3 is a diagram illustrating a mask, a foreground, and a background. 図4は、入力画像から生成されたマスク、前景及び背景の符号化を概念的に示す図である。FIG. 4 is a diagram conceptually illustrating encoding of a mask, foreground, and background generated from an input image. 図5は、符号容量決定部54が決定するデータ容量を概念的に例示する図である。FIG. 5 is a diagram conceptually illustrating the data capacity determined by the code capacity determination unit 54. 図6は、画像処理装置50の行うマルチレイヤ画像生成処理の手順を示すフローチャートである。FIG. 6 is a flowchart showing the procedure of the multilayer image generation process performed by the image processing apparatus 50. 図7は、第2の実施の形態にかかる画像処理装置50の機能的構成を例示する図である。FIG. 7 is a diagram illustrating a functional configuration of the image processing apparatus 50 according to the second embodiment. 図8は、前景の解像度を1/2にする場合の選択画像と補正選択画像とを例示する図である。FIG. 8 is a diagram illustrating a selected image and a corrected selected image when the foreground resolution is halved. 図9は、本実施の形態にかかる画像処理装置50の行うマルチレイヤ画像生成処理の手順を示すフローチャートである。FIG. 9 is a flowchart showing a procedure of multi-layer image generation processing performed by the image processing apparatus 50 according to the present embodiment. 図10は、第3の実施の形態にかかる画像処理装置50の機能的構成を例示する図である。FIG. 10 is a diagram illustrating a functional configuration of the image processing apparatus 50 according to the third embodiment. 図11は、原稿種類対応テーブル58のデータ構成を例示する図である。FIG. 11 is a diagram illustrating a data configuration of the document type correspondence table 58. 図12は、背景の穴埋めを説明するための図である。FIG. 12 is a diagram for explaining background hole filling.

以下に添付図面を参照して、この発明にかかる画像処理装置、画像形成装置、画像処理方法及びプログラムの最良な実施の形態を詳細に説明する。   Exemplary embodiments of an image processing apparatus, an image forming apparatus, an image processing method, and a program according to the present invention are explained in detail below with reference to the accompanying drawings.

[第1の実施の形態]
ここで、本実施の形態にかかる画像処理装置のハードウェア構成について説明する。本実施の形態の画像処理装置は、装置全体を制御するCPU(Central Processing Unit)等の制御部と、各種データや各種プログラムを記憶するROM(Read Only Memory)やRAM(Random Access Memory)等の主記憶部と、各種データや各種プログラムを記憶するHDD(Hard Disk Drive)やCD(Compact Disk)ドライブ装置等の補助記憶部と、これらを接続するバスとを備えており、通常のコンピュータを利用したハードウェア構成となっている。また、画像処理装置には、情報を表示する表示部と、ユーザの指示入力を受け付けるキーボードやマウス等の操作入力部と、外部装置の通信を制御する通信I/F(interface)とが有線又は無線により各々接続される。その他、画像を読み取るスキャナが画像処理装置に接続される。このようなハードウェア構成において、画像処理装置は、スキャナにより読み取った画像を入力として、マルチレイヤ構造の画像データを生成する。
[First embodiment]
Here, the hardware configuration of the image processing apparatus according to the present embodiment will be described. The image processing apparatus according to the present embodiment includes a control unit such as a CPU (Central Processing Unit) that controls the entire apparatus, a ROM (Read Only Memory) that stores various data and various programs, a RAM (Random Access Memory), and the like. Equipped with a main storage, auxiliary storage such as HDD (Hard Disk Drive) and CD (Compact Disk) drives that store various data and programs, and a bus connecting them, using a normal computer Hardware configuration. In addition, the image processing apparatus includes a display unit that displays information, an operation input unit such as a keyboard and a mouse that accepts user instruction inputs, and a communication I / F (interface) that controls communication with an external device. Each is connected by radio. In addition, a scanner for reading an image is connected to the image processing apparatus. In such a hardware configuration, the image processing apparatus generates image data having a multilayer structure with an image read by the scanner as an input.

ここで、マルチレイヤ構造の画像データについて説明する。図1は、マルチレイヤ構造としてミクストラスターコンテント(MRC)のフォーマットの画像データを例示する図である。MRCでは、対象の画像を、背景と前景とマスクとの各レイヤに分離する。前景とは、文字又は線を表す画像であり、背景とは、文字又は線以外の絵柄や写真などの自然画を表す画像である。マスクとは、マルチレイヤ構造の画像データであるマルチレイヤ画像の生成時に、背景又は前景どちらの画素を重ね合わせに選択するかを画素毎に表すデータである。マスクは、背景又は前景どちらを選択するかを2値で表すものが一般的である。例えば、背景を選択する画素を「0」、前景を選択する画素を「1」というようにマスクは生成される。マスクは、画像中の文字などのディテールを形成するので、入力される画像と同じ解像度で生成されるのが好ましい。尚、MRCでは、図1の例に限らず、例えば、背景と、その上に重ね合わされる、透過画素を含んだ複数の前景とに分離する構成もあるが、ここでは、簡単のため、図 1の例を用いて説明する。   Here, the image data having a multi-layer structure will be described. FIG. 1 is a diagram illustrating image data in a format of mixed star content (MRC) as a multi-layer structure. In MRC, a target image is separated into layers of a background, a foreground, and a mask. The foreground is an image representing a character or line, and the background is an image representing a natural image such as a pattern or a photograph other than the character or line. The mask is data that represents, for each pixel, whether a background or foreground pixel is selected for superposition when generating a multilayer image that is image data having a multilayer structure. The mask generally represents a binary value indicating whether the background or the foreground is selected. For example, the mask is generated such that the pixel for selecting the background is “0” and the pixel for selecting the foreground is “1”. Since the mask forms details such as characters in the image, it is preferably generated with the same resolution as the input image. Note that the MRC is not limited to the example of FIG. 1, and for example, there is a configuration in which the background is separated into a plurality of foregrounds including transmissive pixels superimposed on the background. This will be described using an example of 1.

次に、以上のようなハードウェア構成において、画像処理装置において実現される各種機能について説明する。図2は、画像処理装置50の機能的構成を例示する図である。画像処理装置50は、画像入力受付部(不図示)と、絵柄・文字分離部51と、背景・前景生成部52と、圧縮部53と、符号容量決定部54と、絵柄圧縮部55と、マルチレイヤ構造化部56とを有する。これらの各部は、CPUのプログラム実行時にRAMなどの主記憶部上に生成されるものである。   Next, various functions implemented in the image processing apparatus in the hardware configuration as described above will be described. FIG. 2 is a diagram illustrating a functional configuration of the image processing apparatus 50. The image processing apparatus 50 includes an image input receiving unit (not shown), a design / character separation unit 51, a background / foreground generation unit 52, a compression unit 53, a code capacity determination unit 54, a design compression unit 55, And a multi-layer structuring unit 56. These units are generated on a main storage unit such as a RAM when the CPU program is executed.

画像入力受付部は、画像処理装置50に接続されるスキャナが読み取った画像の入力を受け付ける。絵柄・文字分離部51は、画像入力受付部が入力を受け付けた画像(入力画像という)を用いて、画像のエッジ強度や明度などの特徴を抽出する。通常、画像中で文字又は線が現れる文字領域と文字以外の絵柄や写真などの自然画が現れる自然画領域では、エッジや、画素であるサンプルの周波数が異なるので、文字領域と自然画領域とを分離するために必要な特徴を絵柄・文字分離部51は抽出する。そして、絵柄・文字分離部51は、抽出した特徴を用いて、文字又は線を表わす画素又はそれ以外(非文字という)を表わす画素に分類し、いずれに分類するかを画素毎に表す選択画像を生成する。選択画像では、文字又は線を表わす画素の画素値が「1」で表され、非文字を表わす画素が「1」で表される。この選択画像は、マルチレイヤ画像の生成時に符号化されて、背景又は前景どちらの画素を重ね合わせに選択するかを画素毎に表すマスクとしても用いられる。   The image input receiving unit receives an input of an image read by a scanner connected to the image processing device 50. The pattern / character separation unit 51 extracts features such as edge strength and brightness of an image using an image (referred to as an input image) received by the image input receiving unit. Normally, a character area where characters or lines appear in an image and a natural image area where a natural image such as a pattern or photo other than characters appears, the frequency of the edge or pixel sample is different. The pattern / character separating unit 51 extracts features necessary for separating the characters. Then, the pattern / character separating unit 51 uses the extracted features to classify the pixel into a pixel representing a character or a line or a pixel representing the other (referred to as a non-character), and a selected image representing each pixel to be classified. Is generated. In the selected image, the pixel value of the pixel representing the character or line is represented by “1”, and the pixel representing the non-character is represented by “1”. This selected image is encoded when the multi-layer image is generated, and is also used as a mask for each pixel indicating which of the background or foreground pixels is selected for superposition.

背景・前景生成部52は、画像入力受付部が入力を受け付けた入力画像と、絵柄・文字分離部51が生成した選択画像とを用いて、背景及び前景を生成する。具体的には、背景・前景生成部52は、画像入力受付部が入力を受け付けた入力画像を構成する各画素について、選択画像を参照して、背景又は前景のいずれに分類するかを決定する。このとき、背景・前景生成部52は、文字又は線を表す画素に分類されることが選択画像によって表される画素を前景に分類すると決定し、非文字を表わす画素に分類されることが選択画像によって表される画素を背景に分類すると決定する。即ち、入力画像のうち、文字又は線を表わす画素は、前景に属し、非文字を表わす画素は背景に属するものとなる。そして、背景・前景生成部52は、前景に分類すると決定した画素を含む画像を前景として、背景に分類すると決定した画素を含む画像を背景として、背景及び前景を生成する。   The background / foreground generation unit 52 generates a background and foreground using the input image received by the image input reception unit and the selected image generated by the design / character separation unit 51. Specifically, the background / foreground generation unit 52 determines whether each pixel constituting the input image received by the image input reception unit is classified as the background or the foreground with reference to the selected image. . At this time, the background / foreground generation unit 52 determines that the pixel represented by the selected image is classified as a pixel representing a character or a line and classifies it as a pixel representing a non-character. It is determined that the pixel represented by the image is classified as a background. That is, in the input image, pixels representing characters or lines belong to the foreground, and pixels representing non-characters belong to the background. Then, the background / foreground generation unit 52 generates the background and the foreground using the image including the pixels determined to be classified as the foreground as the foreground and the image including the pixels determined to be classified as the background as the background.

図3は、マスク、前景及び背景を例示する図である。同図では、前景は、文字を表し、背景は、文字を除いた自然画を表していることが示されている。また、マスクは、マルチレイヤ画像の生成時に前景を選択する画素が黒色で表され、背景を選択する画素が白色で表されている。   FIG. 3 is a diagram illustrating a mask, a foreground, and a background. In the figure, it is shown that the foreground represents a character and the background represents a natural image excluding the character. In addition, in the mask, pixels for selecting the foreground at the time of generating the multilayer image are represented in black, and pixels for selecting the background are represented in white.

圧縮部53は、絵柄・文字分離部51が生成した選択画像をマスクとして符号化して圧縮することにより、マスクの符号を生成する。マスクが上述したように2値で表されるものであれば、圧縮方式として、例えば、MMR, JBIG, JIBG2などの二値画像符号化方式を用いれば良い。図4は、入力画像から生成されたマスク、前景及び背景の符号化を概念的に示す図である。同図では、マスクは、MMRの方式により符号化され、前景及び背景は、後述するように、JPEG2000の方式により符号化されることが示されている。   The compression unit 53 generates a mask code by encoding and compressing the selected image generated by the design / character separation unit 51 as a mask. If the mask is expressed in binary as described above, a binary image encoding method such as MMR, JBIG, JIBG2 may be used as the compression method. FIG. 4 is a diagram conceptually illustrating encoding of a mask, foreground, and background generated from an input image. In the figure, the mask is encoded by the MMR method, and the foreground and background are encoded by the JPEG2000 method, as will be described later.

符号容量決定部54は、絵柄・文字分離部51が生成した選択画像を用いて、所定のフォーマットに従った画像データが目標データ容量となるように、背景の符号のデータ容量及び前景の符号のデータ容量を決定する。所定のフォーマットに従った画像データのデータ容量には、所定のフォーマットの記述に必要なデータ容量、マスクの符号のデータ容量、背景の符号のデータ容量及び前景の符号のデータ容量が含まれる。目標データ容量の値は、例えば、操作入力部を介してユーザによって指定された画質の設定に基づいて、設定される。具体的には、例えば、高画質が設定された場合には、第1目標データ容量を設定し、低画質が設定された場合には、第1目標データ容量より小さい値の第2目標データ容量を設定される。このような画質と目標データ容量との対応関係をテーブルとして補助記憶部に予め記憶させる。符号容量決定部54は、当該テーブルを参照して、画質に対応した目標データ容量を設定する。そして、符号容量決定部54は、設定した目標データ容量から、マスクの符号のデータ容量及び所定のフォーマットにおける記述に必要なデータ容量を引いて、背景の符号のデータ容量及び前景の符号のデータ容量の合計を算出し、当該合計に対して、選択画像の有する全画素に対して文字を表わす画素に分類されることが選択画像によって表される画素の割合を掛けることにより、前景の符号のデータ容量を算出し、当該前景の符号のデータ容量を目標データ容量から引いた値を背景の符号のデータ容量とする。所定のフォーマットとは、例えば、PDF(Portable Document Format)である。図5は、符号容量決定部54が決定するデータ容量を概念的に例示する図である。同図に示されるように、目標データ容量からマスクのデータ容量とPDFにおけるフォーマットにおける記述のデータ容量を除いたデータ容量が、前景の符号のデータ容量及び背景の符号のデータ容量の合計として割り当てられる。この合計に対して、前景を選択することがマスクにおいて表される画素の割合及び背景を選択することがマスクにおいて表される画素の割合に応じて、前景の符号のデータ容量及び背景の符号のデータ容量が各々割り当てられる。   The code capacity determination unit 54 uses the selected image generated by the design / character separation unit 51 so that the image data according to a predetermined format becomes the target data capacity and the data capacity of the background code and the code of the foreground code. Determine the data capacity. The data capacity of the image data according to the predetermined format includes a data capacity necessary for describing the predetermined format, a data capacity of the mask code, a data capacity of the background code, and a data capacity of the foreground code. The value of the target data capacity is set based on, for example, the image quality setting designated by the user via the operation input unit. Specifically, for example, when high image quality is set, the first target data capacity is set, and when low image quality is set, the second target data capacity is smaller than the first target data capacity. Is set. The correspondence relationship between the image quality and the target data capacity is stored in advance in the auxiliary storage unit as a table. The code capacity determination unit 54 refers to the table and sets a target data capacity corresponding to the image quality. Then, the code capacity determination unit 54 subtracts the data capacity of the mask code and the data capacity necessary for description in a predetermined format from the set target data capacity, and the data capacity of the background code and the data capacity of the foreground code The foreground code data is calculated by multiplying the sum by the ratio of pixels represented by the selected image to be classified as pixels representing characters with respect to all pixels of the selected image. The capacity is calculated, and a value obtained by subtracting the data capacity of the foreground code from the target data capacity is set as the data capacity of the background code. The predetermined format is, for example, PDF (Portable Document Format). FIG. 5 is a diagram conceptually illustrating the data capacity determined by the code capacity determination unit 54. As shown in the figure, the data capacity obtained by removing the mask data capacity and the data capacity of the description in the PDF format from the target data capacity is assigned as the sum of the data capacity of the foreground code and the data capacity of the background code. . For this sum, selecting the foreground depends on the proportion of pixels represented in the mask and selecting the background depends on the proportion of pixels represented in the mask, and the foreground code data volume and background code Each data capacity is allocated.

絵柄圧縮部55は、背景・前景生成部52が生成した背景及び前景を、符号容量決定部54が各々に対して決定したデータ容量となるように各々符号化して圧縮することにより、背景の符号及び前景の符号を生成する。圧縮方式としては、例えば、JPEG2000の多値画像符号化方式を用いれば良い。符号のデータ容量の制御には、JPEG2000のレート制御の技術を用いれば良い。マルチレイヤ構造化部56は、圧縮部53が生成したマスクの符号と、絵柄圧縮部55が生成した背景の符号及び前景の符号とをラッピング(合成)して、所定のフォーマットに従った画像データであるマルチレイヤ画像を生成する。例えばPDF(Portable Document Format)では、マルチレイヤ画像は、レイヤの重ね合わせのための下地となる背景の符号及びマスクの符号の順に重ね合わされ、前景を選択することがマスクによって表される画素については、前景の符号の画素が更に重ね合わされ、PDFの記述として、背景、マスク及び前景の各画素数及びこれらの各フィルタ形式を示したファイルとなる。   The pattern compressing unit 55 encodes and compresses the background and foreground generated by the background / foreground generating unit 52 so as to have the data capacity determined by the code capacity determining unit 54, respectively. And a foreground code. As a compression method, for example, a JPEG 2000 multi-value image encoding method may be used. JPEG2000 rate control technology may be used to control the code data capacity. The multi-layer structuring unit 56 wraps (synthesizes) the mask code generated by the compression unit 53 and the background code and foreground code generated by the picture compression unit 55 to generate image data according to a predetermined format. A multi-layer image is generated. For example, in PDF (Portable Document Format), multi-layer images are overlaid in the order of the background code and mask code as the background for layer superposition, and foreground selection is represented by the mask. The pixels of the foreground code are further superimposed, and the PDF description is a file showing the number of background, mask, and foreground pixels, and their respective filter formats.

次に、本実施の形態にかかる画像処理装置50の行うマルチレイヤ画像生成処理の手順について図6を用いて説明する。ここでは、スキャナにより画像(入力画像)が入力され、操作入力部を介して当該画像の画質が指定されているものとする。画像処理装置50は、入力を受け付けた入力画像の特徴を抽出し、当該特徴を用いて、文字を表わす画素又は非文字を表わす画素に分類し、そのいずれに分類するかを画素毎に2値で表わす選択画像を生成する(ステップS1)。画像処理装置50は、選択画像をマスクとして符号化してマスクの符号を生成する(ステップS2)。また、画像処理装置50は、入力画像と、選択画像とを用いて、背景及び前景を生成する(ステップS3)。次いで、画像処理装置50は、ユーザにより指定された画質に対応する目標データ容量を設定し、当該目標データ容量から、所定のフォーマット形式の記述に必要なデータ容量及びマスクの符号のデータ容量を引いて、背景の符号のデータ容量及び前景の符号のデータ容量の合計を算出する(ステップS4)。そして、画像処理装置50は、文字を表わす画素に分類されることが選択画像によって表される画素の数(画素数)の合計をカウントし、当該画素が選択画像の有する全画素に占める割合を算出し、当該割合を、背景の符号のデータ容量及び前景の符号のデータ容量の合計に掛けて得られた値を、前景の符号のデータ容量として決定する。そして、画像処理装置50は、当該前景の符号のデータ容量を、背景の符号のデータ容量及び前景の符号のデータ容量の合計から引いた値を、背景の符号のデータ容量として決定する(ステップS5)。そして、画像処理装置50は、前景及び背景について各々決定したデータ容量となるように符号化して圧縮することにより、前景の符号及び背景の符号を生成する(ステップS6)。その後、画像処理装置50は、マスクの符号、背景の符号及び前景の符号にPDFの記述を追加してラッピングすることで、マルチレイヤ画像を生成する(ステップS7)。   Next, the procedure of the multilayer image generation process performed by the image processing apparatus 50 according to the present embodiment will be described with reference to FIG. Here, it is assumed that an image (input image) is input by the scanner and the image quality of the image is designated via the operation input unit. The image processing apparatus 50 extracts features of an input image that has received an input, classifies the features into pixels representing characters or pixels representing non-characters, and binarizes each of the pixels to be classified. Is generated (step S1). The image processing device 50 encodes the selected image as a mask to generate a mask code (step S2). Further, the image processing apparatus 50 generates a background and a foreground using the input image and the selected image (step S3). Next, the image processing apparatus 50 sets a target data capacity corresponding to the image quality specified by the user, and subtracts the data capacity necessary for the description of the predetermined format and the data capacity of the mask code from the target data capacity. Then, the sum of the data capacity of the background code and the data capacity of the foreground code is calculated (step S4). Then, the image processing device 50 counts the total number of pixels (number of pixels) represented by the selected image to be classified as a pixel representing a character, and determines the ratio of the pixel to the total pixels of the selected image. The value obtained by multiplying the ratio by the sum of the data capacity of the background code and the data capacity of the foreground code is determined as the data capacity of the foreground code. The image processing apparatus 50 determines a value obtained by subtracting the data capacity of the foreground code from the sum of the data capacity of the background code and the data capacity of the foreground code as the data capacity of the background code (step S5). ). Then, the image processing apparatus 50 generates the foreground code and the background code by encoding and compressing the data so as to have the determined data capacities for the foreground and the background (step S6). Thereafter, the image processing apparatus 50 adds a description of the PDF to the mask code, the background code, and the foreground code and wraps them to generate a multilayer image (step S7).

以上のように、マルチレイヤ構造の画像データとして生成されるマルチレイヤ画像の総容量を目標データ容量内に収めるために、文字や線を表す画素又は非文字を表わす画素のいずれに分類するかを画素毎に表す選択画像に基づいて前景の符号及び背景の符号に対して各々割り当てるデータ容量を決定する。これにより、入力画像中に存在する文字の面積が大きい場合には、文字の面積が小さい場合よりも多くのデータ容量を前景に割り当てることができ、前景の符号のデータ容量及び背景の符号のデータ容量として好適なデータ容量を算出することができる。この結果、マスクに関わらず一定に前景の符号のデータ容量及び背景の符号のデータ容量を割り当てた場合よりも良好な画質のマルチレイヤ画像を生成することができる。   As described above, in order to keep the total capacity of the multilayer image generated as the image data of the multilayer structure within the target data capacity, it is classified as either a pixel representing a character or a line or a pixel representing a non-character. A data capacity to be allocated to each of the foreground code and the background code is determined based on the selected image represented for each pixel. As a result, when the area of characters existing in the input image is large, more data capacity can be allocated to the foreground than when the area of characters is small, and the data capacity of the foreground code and the background code data A data capacity suitable for the capacity can be calculated. As a result, it is possible to generate a multi-layer image with better image quality than when the foreground code data capacity and the background code data capacity are allotted regardless of the mask.

[第2の実施の形態]
次に、画像処理装置、画像形成装置、画像処理方法及びプログラムの第2の実施の形態について説明する。なお、上述の第1の実施の形態と共通する部分については、同一の符号を使用して説明したり、説明を省略したりする。
[Second Embodiment]
Next, a second embodiment of the image processing apparatus, the image forming apparatus, the image processing method, and the program will be described. In addition, about the part which is common in the above-mentioned 1st Embodiment, it demonstrates using the same code | symbol or abbreviate | omits description.

本実施の形態においては、前景及び背景のうち少なくとも一方の解像度を変換する場合について説明する。図7は、本実施の形態にかかる画像処理装置50の機能的構成を例示する図である。本実施の形態にかかる画像処理装置50は、画像入力受付部と、絵柄・文字分離部51と、背景・前景生成部52と、圧縮部53と、符号容量決定部54と、絵柄圧縮部55と、マルチレイヤ構造化部56とに加え、解像度変換部57を有する。解像度変換部57は、背景・前景生成部52が生成した前景及び背景のうち少なくとも一方の解像度を指定された解像度に変換する。解像度は、例えば、操作入力部を介してユーザにより指定される。解像度の指定は、解像度自体の値により行っても良いし、変換前に対する変換後の解像度の割合(1/2や50%などの変換率)により行っても良い。但し、本実施の形態においては、低解像度化、即ち、100%より小さい割合で解像度を変換する場合を取り扱う。   In the present embodiment, a case will be described in which at least one of the foreground and background is converted. FIG. 7 is a diagram illustrating a functional configuration of the image processing apparatus 50 according to the present embodiment. The image processing apparatus 50 according to the present embodiment includes an image input receiving unit, a design / character separation unit 51, a background / foreground generation unit 52, a compression unit 53, a code capacity determination unit 54, and a design compression unit 55. In addition to the multi-layer structuring unit 56, a resolution converting unit 57 is provided. The resolution conversion unit 57 converts at least one of the foreground and background generated by the background / foreground generation unit 52 into a designated resolution. The resolution is specified by the user via the operation input unit, for example. The designation of the resolution may be performed by the value of the resolution itself or by the ratio of the resolution after conversion to the conversion before conversion (conversion rate such as 1/2 or 50%). However, in the present embodiment, the case where the resolution is reduced, that is, the resolution is converted at a rate smaller than 100%, is handled.

符号容量決定部54は、絵柄・文字分離部51が生成した選択画像を用いて、所定のフォーマットの記述に必要なデータ容量、マスクの符号のデータ容量、背景の符号のデータ量及び前景の符号のデータ容量の合計が目標データ容量となるように、背景の符号のデータ容量及び前景の符号のデータ容量を決定するが、背景及び前景のうち少なくとも一方の解像度が変換される場合、解像度が変換される方について、解像度に応じた補正選択画像を生成して、当該補正選択画像を用いて、背景の符号のデータ容量及び前景の符号のデータ容量を決定する。具体的には、例えば、前景の解像度を1/2にする場合について図8を説明する。この場合、選択画像における画素と、解像度の変換後の前景の画素との比は、1:(1/2×1/2)となるため、選択画像における4つの画素に対して、前景における1つの画素が対応することになる。このため、図8左に例示されるように、選択画像において、4つの画素を1組とした新たな画素とする。そして、符号容量決定部54は、この組に1つでも文字又は線を表す画素に分類される画素があれば、文字又は線を表す新たな画素に分類し、組に1つも文字又は線を表す画素に分類される画素がなければ、非文字を表す新たな画素に分類することを新たな画素毎に表す補正選択画像を生成する。つまり、前景を低解像度化することにより、マルチレイヤ画像の生成時に前景として選択されない画素が少なくなることになるため、前景として選択される画素の割合が、前景を低解像度化しない場合に比べて大きくなる。そこで、この割合に応じて、前景の符号のデータ容量の割合を大きくすべく、符号容量決定部54は、解像度の変換率に応じた補正選択画像を生成する。そして、符号容量決定部54は、補正選択画像の全画素のうち文字又は線を表す画素の占める割合を、背景の符号のデータ容量及び前景の符号のデータ容量の決定に用いる。即ち、符号容量決定部54は、設定した目標データ容量から、マスクの符号のデータ容量及び所定のフォーマットにおける記述に必要なデータ容量を引いて、背景の符号のデータ容量及び前景の符号のデータ容量の合計を算出し、当該合計に対して、補正選択画像の有する全画素のうち文字又は線を表す画素に分類される画素が占める割合を掛けることにより、前景の符号のデータ容量を算出し、当該前景の符号のデータ容量を目標データ容量から引いた符号のデータ容量を背景の符号のデータ容量とする。   The code capacity determination unit 54 uses the selected image generated by the picture / character separation unit 51 to use the data capacity necessary for describing a predetermined format, the data capacity of the mask code, the data quantity of the background code, and the foreground code. The data capacity of the background code and the data capacity of the foreground code are determined so that the total data capacity becomes the target data capacity. However, when the resolution of at least one of the background and the foreground is converted, the resolution is converted. A correction selection image corresponding to the resolution is generated for the person to be processed, and the data volume of the background code and the data volume of the foreground code are determined using the correction selection image. Specifically, for example, FIG. 8 will be described for a case where the foreground resolution is halved. In this case, since the ratio of the pixels in the selected image to the foreground pixels after resolution conversion is 1: (1/2 × 1/2), the four pixels in the selected image are 1 in the foreground. One pixel will correspond. For this reason, as illustrated on the left side of FIG. 8, in the selected image, a new pixel is formed with four pixels as one set. Then, if there is at least one pixel classified as a pixel representing a character or a line in this set, the code capacity determination unit 54 classifies the pixel as a new pixel representing a character or a line, and at least one character or line is included in the set. If there is no pixel classified as a pixel to be represented, a corrected selection image is generated that represents that each new pixel is classified as a new pixel representing a non-character. In other words, lowering the foreground reduces the number of pixels that are not selected as the foreground when generating a multi-layer image, so the proportion of pixels selected as the foreground is lower than when the foreground is not reduced in resolution. growing. Therefore, the code capacity determination unit 54 generates a correction selection image corresponding to the resolution conversion rate in order to increase the ratio of the data capacity of the foreground code according to this ratio. Then, the code capacity determination unit 54 uses the ratio of pixels representing characters or lines among all the pixels of the correction selection image to determine the data capacity of the background code and the data capacity of the foreground code. That is, the code capacity determination unit 54 subtracts the data capacity of the mask code and the data capacity necessary for description in a predetermined format from the set target data capacity, and the background code data capacity and the foreground code data capacity. And calculating the data capacity of the foreground code by multiplying the total by the ratio of pixels classified as pixels representing characters or lines out of all pixels of the corrected selected image, The data capacity of the code obtained by subtracting the data capacity of the foreground code from the target data capacity is set as the data capacity of the background code.

尚、背景の解像度を変換する場合は、符号容量決定部54は、前景の場合と同様にして、背景に対する補正選択画像を生成して、当該補正選択画像の全画素のうち非文字を表す画素の割合を、背景の符号のデータ容量及び前景の符号のデータ容量の決定に用いる。即ち、符号容量決定部54は、設定した目標データ容量から、マスクの符号のデータ容量及び所定のフォーマットにおける記述に必要なデータ容量を引いて、背景の符号のデータ容量及び前景の符号のデータ容量の合計を算出し、当該合計に対して、補正選択画像の有する全画素のうち非文字を表す画素に分類される画素の占める割合を掛けることにより、背景の符号のデータ容量を算出し、当該背景の符号のデータ容量を目標データ容量から引いた値を前景の符号のデータ容量とする。前景及び背景の両方の解像度を変換する場合には、符号容量決定部54は、前景に対する補正選択画像及び背景に対する補正選択画像を各々生成して、前景に対する補正選択画像の有する全画素のうち文字又は線を表す画素の占める割合(第1割合という)と、背景に対する補正選択画像の有する全画素のうち非文字を表す画素の占める割合(第2割合という)とを各々算出する。そして、符号容量決定部54は、第1割合の値の第2割合の値に対する割合(第3割合という)を前景の割合として、背景の符号のデータ容量及び前景の符号のデータ容量を決定する。即ち、符号容量決定部54は、設定した目標データ容量から、マスクの符号のデータ容量及び所定のフォーマットにおける記述に必要なデータ容量を引いて、背景の符号のデータ容量及び前景の符号のデータ容量の合計を算出し、当該合計に対して第3割合を掛けることにより、前景の符号のデータ容量を算出し、当該前景の符号のデータ容量を目標データ容量から引いた値を背景の符号のデータ容量とする。   When the background resolution is converted, the code capacity determination unit 54 generates a correction selection image for the background in the same manner as in the foreground, and the pixels representing non-characters among all the pixels of the correction selection image. Is used to determine the data capacity of the background code and the data capacity of the foreground code. That is, the code capacity determination unit 54 subtracts the data capacity of the mask code and the data capacity necessary for description in a predetermined format from the set target data capacity, and the background code data capacity and the foreground code data capacity. And calculating the data capacity of the background code by multiplying the total by the ratio of the pixels classified as pixels representing non-characters among all the pixels of the corrected selection image, A value obtained by subtracting the data capacity of the background code from the target data capacity is set as the data capacity of the foreground code. When converting both the foreground and background resolutions, the code capacity determination unit 54 generates a correction selection image for the foreground and a correction selection image for the background, respectively. Alternatively, the ratio of pixels representing a line (referred to as a first ratio) and the ratio of pixels representing non-characters (referred to as a second ratio) among all the pixels of the correction selection image with respect to the background are calculated. Then, the code capacity determination unit 54 determines the data capacity of the background code and the data capacity of the foreground code by using the ratio of the first ratio value to the second ratio value (referred to as the third ratio) as the foreground ratio. . That is, the code capacity determination unit 54 subtracts the data capacity of the mask code and the data capacity necessary for description in a predetermined format from the set target data capacity, and the background code data capacity and the foreground code data capacity. The foreground code data capacity is calculated by multiplying the total by the third ratio, and the value obtained by subtracting the foreground code data capacity from the target data capacity is the background code data. Capacity.

絵柄圧縮部55は、背景・前景生成部52が生成し且つ解像度変換部57が解像度を適宜変換した背景及び前景を、符号容量決定部54が各々に対して決定したデータ容量となるように各々符号化して圧縮する。   The picture compression unit 55 generates the background and foreground generated by the background / foreground generation unit 52 and appropriately converted by the resolution conversion unit 57 so that the code capacity determination unit 54 has the data capacity determined for each. Encode and compress.

次に、本実施の形態にかかる画像処理装置50の行うマルチレイヤ画像生成処理の手順について図9を用いて説明する。ここでは、スキャナにより画像が入力され、操作入力部を介して当該画像の画質が指定され且つ前景及び背景のうち少なくとも一方に対して変換する解像度が指定されているものとする。ステップS1〜S3は上述の第1の実施の形態と同様である。ステップS10では、画像処理装置50は、前景及び背景のうち少なくとも一方の解像度をユーザにより指定された解像度に変換する。そして、画像処理装置50は、解像度を変換する対象に対して補正選択画像を生成する。ステップS4は上述の第1の実施の形態と同様である。ステップS5では、画像処理装置50は、補正選択画像において前景の画素の数(画素数)の合計をカウントし、当該画素の補正選択画像の全画素に占める割合を算出し、当該割合を、背景の符号のデータ容量及び前景の符号のデータ容量の合計に掛けて得られた値を、前景の符号のデータ容量として決定する。そして、画像処理装置50は、当該前景の符号のデータ容量を、背景の符号のデータ容量及び前景の符号のデータ容量の合計から引いた値を、背景の符号のデータ容量として決定する。ステップS6〜S7は上述の第1の実施の形態と同様である。   Next, the procedure of the multilayer image generation process performed by the image processing apparatus 50 according to the present embodiment will be described with reference to FIG. Here, it is assumed that the image is input by the scanner, the image quality of the image is specified via the operation input unit, and the resolution for converting at least one of the foreground and the background is specified. Steps S1 to S3 are the same as those in the first embodiment. In step S10, the image processing apparatus 50 converts the resolution of at least one of the foreground and the background into a resolution designated by the user. Then, the image processing device 50 generates a correction selection image for the target whose resolution is to be converted. Step S4 is the same as that in the first embodiment. In step S5, the image processing apparatus 50 counts the total number of foreground pixels (the number of pixels) in the correction selection image, calculates the ratio of the pixel to all the pixels of the correction selection image, and calculates the ratio as the background. A value obtained by multiplying the sum of the data capacity of the foreground code and the data capacity of the foreground code is determined as the data capacity of the foreground code. Then, the image processing apparatus 50 determines the value obtained by subtracting the data capacity of the foreground code from the sum of the data capacity of the background code and the data capacity of the foreground code as the data capacity of the background code. Steps S6 to S7 are the same as those in the first embodiment.

以上のような構成によれば、前景や背景を低解像度化することにより圧縮率を向上しつつ、マルチレイヤ画像における画質がより良好となるように前景及び背景に対して各々符号量を割り当てることができる。   According to the above configuration, the code amount is allocated to the foreground and the background so that the image quality in the multilayer image is improved while improving the compression rate by reducing the resolution of the foreground and the background. Can do.

[第3の実施の形態]
次に、画像処理装置、画像形成装置、画像処理方法及びプログラムの第3の実施の形態について説明する。なお、上述の第1の実施の形態又は第2の実施の形態と共通する部分については、同一の符号を使用して説明したり、説明を省略したりする。
[Third embodiment]
Next, an image processing apparatus, an image forming apparatus, an image processing method, and a program according to a third embodiment will be described. In addition, about the part which is common in the above-mentioned 1st Embodiment or 2nd Embodiment, it demonstrates using the same code | symbol or abbreviate | omits description.

本実施の形態においては、操作入力部を介してユーザから指定された原稿種類に応じて、前景の符号のデータ容量及び背景の符号のデータ容量を決定する。図10は、本実施の形態にかかる画像処理装置50の機能的構成を例示する図である。同図に示されるように、画像処理装置50は、画像入力受付部と、絵柄・文字分離部51と、背景・前景生成部52と、圧縮部53と、符号容量決定部54と、絵柄圧縮部55と、マルチレイヤ構造化部56とに加え、原稿種類対応テーブル58を有する。原稿種類対応テーブル58は、例えば補助記憶部に記憶されるものである。本実施の形態においては、原稿種類に対して、背景の符号のデータ容量及び前景の符号のデータ容量の比が予め設定されており、この対応関係を原稿種類対応テーブル58が記憶する。図11は、原稿種類対応テーブル58のデータ構成を例示する図である。同図に示されるように、原稿種類対応テーブル58には、各原稿種類に対して予め設定された背景の符号のデータ容量及び前景の符号のデータ容量の比の合計が「1」となるように各比が各々記憶される。   In the present embodiment, the foreground code data capacity and the background code data capacity are determined according to the document type designated by the user via the operation input unit. FIG. 10 is a diagram illustrating a functional configuration of the image processing apparatus 50 according to the present embodiment. As shown in the figure, the image processing apparatus 50 includes an image input receiving unit, a design / character separation unit 51, a background / foreground generation unit 52, a compression unit 53, a code capacity determination unit 54, and a design compression. In addition to the section 55 and the multi-layer structuring section 56, a document type correspondence table 58 is provided. The document type correspondence table 58 is stored in, for example, an auxiliary storage unit. In this embodiment, the ratio of the data capacity of the background code and the data capacity of the foreground code is set in advance with respect to the document type, and this correspondence relationship is stored in the document type correspondence table 58. FIG. 11 is a diagram illustrating a data configuration of the document type correspondence table 58. As shown in the drawing, in the document type correspondence table 58, the total ratio of the data capacity of the background code and the data capacity of the foreground code set in advance for each document type is “1”. Each ratio is stored in

符号容量決定部54は、原稿種類対応テーブル58を参照して、操作入力部を介してユーザが指定した原稿種類に対応する背景の符号のデータ容量及び前景の符号のデータ容量の比を用いて、背景の符号のデータ容量及び前景の符号のデータ容量を決定する。具体的には、符号容量決定部54は、目標データ容量から、マスクの符号のデータ容量及び所定のフォーマットにおける記述に必要なデータ容量を引いて、背景の符号のデータ容量及び前景の符号のデータ容量の合計を算出し、当該合計に対して、原稿種類に対応する前景の符号のデータ容量の割合を掛けることにより、前景の符号のデータ容量を算出し、当該前景の符号のデータ容量を目標データ容量から引いた符号のデータ容量を背景の符号のデータ容量とする。例えば、図11の例では、原稿種類が「文字」である場合、符号容量決定部54は、目標データ容量から、マスクの符号のデータ容量及び所定のフォーマットにおける記述に必要なデータ容量を引いて、背景の符号のデータ容量及び前景の符号のデータ容量の合計を算出し、当該合計に対して「0.2」を掛けることにより、前景の符号のデータ容量を算出し、当該前景の符号のデータ容量を目標データ容量から引いた符号のデータ容量を背景の符号のデータ容量とする。   The code capacity determination unit 54 refers to the document type correspondence table 58 and uses the ratio of the data capacity of the background code and the data capacity of the foreground code corresponding to the document type specified by the user via the operation input unit. The data capacity of the background code and the data capacity of the foreground code are determined. Specifically, the code capacity determination unit 54 subtracts the data capacity of the mask code and the data capacity necessary for description in a predetermined format from the target data capacity, and the data capacity of the background code and the foreground code data. Calculate the total capacity, and multiply the total by the ratio of the foreground code data capacity corresponding to the document type to calculate the foreground code data capacity and target the foreground code data capacity to the target The data capacity of the code subtracted from the data capacity is set as the data capacity of the background code. For example, in the example of FIG. 11, when the document type is “character”, the code capacity determination unit 54 subtracts the data capacity of the mask code and the data capacity necessary for description in a predetermined format from the target data capacity. , Calculate the sum of the data capacity of the background code and the data capacity of the foreground code, and multiply the total by “0.2” to calculate the data capacity of the foreground code. The data capacity of the code obtained by subtracting the data capacity from the target data capacity is set as the data capacity of the background code.

次に、本実施の形態にかかる画像処理装置50の行うマルチレイヤ画像生成処理の手順について図6を用いて説明する。ステップS1〜S4は上述の第1の実施の形態と同様である。ステップS5では、画像処理装置50は、原稿種類対応テーブル58を参照して、操作入力部を介してユーザが指定した原稿種類に対応する背景の符号のデータ容量及び前景の符号のデータ容量の比を用いて、背景の符号のデータ容量及び前景の符号のデータ容量を決定する。ステップS6〜S7は上述の第1の実施の形態と同様である。   Next, the procedure of the multilayer image generation process performed by the image processing apparatus 50 according to the present embodiment will be described with reference to FIG. Steps S1 to S4 are the same as those in the first embodiment. In step S5, the image processing apparatus 50 refers to the document type correspondence table 58, and compares the data capacity of the background code and the data capacity of the foreground code corresponding to the document type designated by the user via the operation input unit. Are used to determine the data capacity of the background code and the data capacity of the foreground code. Steps S6 to S7 are the same as those in the first embodiment.

以上のような構成によれば、ユーザの所望の原稿種類に応じて、マルチレイヤ画像における画質がより良好となるように前景及び背景に対して各々符号量を割り当てることができる。   According to the configuration described above, according to the type of document desired by the user, it is possible to assign code amounts to the foreground and the background so that the image quality in the multilayer image becomes better.

[変形例]
なお、本発明は前記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、前記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。また、以下に例示するような種々の変形が可能である。
[Modification]
Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. Moreover, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined. Further, various modifications as exemplified below are possible.

上述した各実施の形態において、画像処理装置50で実行される各種プログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成しても良い。また当該各種プログラムを、インストール可能な形式又は実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録してコンピュータプログラムプロダクトとして提供するように構成しても良い。   In each of the embodiments described above, various programs executed by the image processing apparatus 50 may be stored on a computer connected to a network such as the Internet and provided by being downloaded via the network. . The various programs are recorded in a computer-readable recording medium such as a CD-ROM, a flexible disk (FD), a CD-R, and a DVD (Digital Versatile Disk) in a file in an installable or executable format. The computer program product may be provided.

上述した各実施の形態において、画像処理装置50は、生成したマルチレイヤ画像を用いて紙などの記録媒体に画像を形成して出力するプロッタなどのプリンタエンジンやファクシミリ装置などの画像出力部を更に備えても良い。   In each of the above-described embodiments, the image processing apparatus 50 further includes an image output unit such as a printer engine such as a plotter or a facsimile apparatus that forms and outputs an image on a recording medium such as paper using the generated multilayer image. You may prepare.

上述した各実施の形態において、符号化方式として、JPEG2000を用いるようにした。この方式では、符号のデータ容量の制御が可能であるため、符号容量決定部54が決定した前景の符号のデータ容量及び背景の符号のデータ容量となるように、絵柄圧縮部55は、前景及び背景の符号化を1回で行うことができた。しかし、これに限らず、符号方式として、JPEGを用いるようにしても良い。この場合、絵柄圧縮部55は、符号容量決定部54が決定した前景の符号のデータ容量及び背景の符号のデータ容量となるように、前景及び背景の符号化を複数回行うことになる。しかし、この方式を用いても、上述した各実施の形態で説明したように、前景及び背景に対して各々符号量を割り当てることにより、より良好な画質のマルチレイヤ画像を生成することができる。   In each embodiment described above, JPEG2000 is used as the encoding method. In this method, since the code data capacity can be controlled, the picture compressing unit 55 is configured so that the foreground code data capacity and the background code data capacity determined by the code capacity determining unit 54 are the foreground and The background encoding could be performed once. However, the present invention is not limited to this, and JPEG may be used as the encoding method. In this case, the picture compression unit 55 performs the foreground and background encoding a plurality of times so that the foreground code data capacity and the background code data capacity determined by the code capacity determination unit 54 are obtained. However, even if this method is used, a multilayer image with better image quality can be generated by assigning code amounts to the foreground and the background as described in the above embodiments.

上述した各実施の形態においては、目標データ容量は、ユーザが指定した画質に応じて設定されているものとしたが、これに限らず、ユーザが指定するようにしても良いし、ユーザの指定に関らず予め設定されているものであっても良い。   In each of the above-described embodiments, the target data capacity is set according to the image quality specified by the user. However, the present invention is not limited to this, and the user data may be specified by the user. Regardless, it may be set in advance.

尚、入力画像の容量によっては、符号容量決定部54が設定した目標データ容量に満たない場合もあるため、絵柄圧縮部55は、符号容量決定部54が決定した前景の符号のデータ容量以下及び背景の符号のデータ容量以下となるように、前景及び背景を各々符号化するようにすれば良い。   Note that, depending on the capacity of the input image, there is a case where the target data capacity set by the code capacity determining unit 54 may not be reached. Therefore, the pattern compressing unit 55 is less than the data capacity of the foreground code determined by the code capacity determining unit 54 and The foreground and the background may be encoded so as to be less than the data capacity of the background code.

また、上述した各実施の形態においては、符号容量決定部54が設定した目標データ容量から所定のフォーマットの記述に必要なデータ容量及びマスクの符号のデータ容量を引いた値を、背景の符号のデータ容量及び前景の符号のデータ容量の合計としたが、これに限らず、フォーマットの形式によっては、目標データ容量からマスクの符号のデータ容量を引いた値を、背景の符号のデータ容量及び前景の符号のデータ容量の合計とするようにしても良い。   Further, in each of the above-described embodiments, the value obtained by subtracting the data capacity necessary for the description of the predetermined format and the data capacity of the mask code from the target data capacity set by the code capacity determination unit 54 is used as the background code. The total of the data capacity and the data capacity of the foreground code is not limited to this, but depending on the format, the value obtained by subtracting the data capacity of the mask code from the target data capacity may be the data capacity of the background code and the foreground. The total data capacity of the codes may be set.

上述した各実施の形態においては、符号容量決定部54は、選択画像を用いて、背景の符号のデータ容量及び前景の符号のデータ容量を決定したが、これに限らず、背景を符号化する際の圧縮率及び前景を符号化する際の圧縮率を決定するようにしても良い。この場合、絵柄圧縮部55は、符号容量決定部54が決定した前景の圧縮率及び背景の圧縮率となるように、前景及び背景を各々符号化するようにすれば良い。   In each of the above-described embodiments, the code capacity determination unit 54 determines the data capacity of the background code and the data capacity of the foreground code using the selected image. The compression rate at the time and the compression rate at the time of encoding the foreground may be determined. In this case, the pattern compression unit 55 may encode the foreground and the background so that the foreground compression rate and the background compression rate determined by the code capacity determination unit 54 are obtained.

上述した第1の実施の形態においては、符号容量決定部54は、選択画像の有する全画素に対して非文字を表す画素に分類されることが選択画像によって表される画素の割合を掛けることにより、背景の符号のデータ容量を算出し、これを用いて前景の符号のデータ容量を求めるようにしても良い。   In the first embodiment described above, the code capacity determination unit 54 multiplies the ratio of the pixels represented by the selected image to be classified as pixels representing non-characters with respect to all the pixels of the selected image. Thus, the data capacity of the background code may be calculated and used to determine the data capacity of the foreground code.

上述した第1実施の形態においては、画像処理装置50は、前景を生成する際に、前景に含まれる画素のうち文字に分類された画素以外の画素の画素値を統一するようにしても良い。前景において、選択画像において文字に分類された画素は、文字の色を表す情報としての画素値を有しているが、選択画像において非文字に分類された画素は、マルチレイヤ画像を生成する際の重ね合わせには使用されない画素であるため、その画素値はどのような値であっても基本的に構わない。しかし、マルチレイヤ画像の生成においては、画像の局所的相関を利用しているために、例えば前景に含まれる画素のうち文字に分類された画素以外の画素の画素値として、ランダムな値をセットした場合と、白や黒などの色を表す画素値で統一した場合とでは、後者の場合の方が前景を符号化した際の圧縮効率が高くなる。   In the first embodiment described above, when generating the foreground, the image processing apparatus 50 may unify the pixel values of pixels other than the pixels classified as characters among the pixels included in the foreground. . In the foreground, the pixel classified as a character in the selected image has a pixel value as information representing the color of the character, but the pixel classified as a non-character in the selected image generates a multilayer image. Since these are pixels that are not used for superimposing, the pixel value may be basically any value. However, since multi-layer image generation uses local correlation of the image, for example, random values are set as pixel values of pixels other than those classified as characters among pixels included in the foreground. In the latter case, the compression efficiency when the foreground is encoded is higher in the latter case when the pixel values representing colors such as white and black are unified.

例えば、背景・前景生成部52は、前景に含まれる画素のうち文字又は線に分類された画素以外の画素の画素値を、白色を表す画素値に置換して、前景を生成したとする。前景は、入力画像と同じ解像度である場合、入力画像と同じ数の画素を有することになるが、実際に白色以外の色を持つ画素の数は文字又は線に分類された画素の数であり、このような前景の容量は入力画像の容量よりも小さくなっていると考えられる。よって、全体の画質に対する影響の少ない前景には背景ほどその符号にデータ容量を割り当てる必要がないため、この場合、符号容量決定部54は、前景の符号のデータ容量対背景の符号のデータ容量の比を、文字又は線に分類される画素数対全画素数の比として、前景の符号のデータ容量及び背景の符号のデータ容量を決定する。例えば、文字又は線を表す画素に分類されることが選択画像によって表される画素の選択画像の全画素に占める割合が1/5である場合、「文字又は線に分類される画素数:全画素数=1:5」なので、「前景の符号のデータ容量:背景の符号のデータ容量=1:5」として、前景の符号のデータ容量及び背景の符号のデータ容量を決定する。   For example, it is assumed that the background / foreground generation unit 52 generates a foreground by replacing pixel values of pixels included in the foreground other than pixels classified as characters or lines with pixel values representing white. If the foreground has the same resolution as the input image, it will have the same number of pixels as the input image, but the number of pixels that actually have a color other than white is the number of pixels classified as characters or lines. The foreground capacity is considered to be smaller than the input image capacity. Therefore, since it is not necessary to assign a data capacity to the code for the foreground that has less influence on the overall image quality, in this case, the code capacity determination unit 54 determines the data capacity of the foreground code versus the background code. The data capacity of the foreground code and the background code is determined by using the ratio as the ratio of the number of pixels classified as characters or lines to the total number of pixels. For example, when the ratio of the pixel represented by the selected image to the pixel representing the character or line in the selected image is 1/5, “the number of pixels classified as the character or line: all Since the number of pixels = 1: 5, the foreground code data capacity and the background code data capacity are determined as “foreground code data volume: background code data volume = 1: 5”.

以上のような構成によれば、前景の圧縮効率を高めつつ、マルチレイヤ画像における画質がより良好となるように前景及び背景に対して各々符号量を割り当てることができる。   According to the configuration as described above, it is possible to allocate a code amount to each of the foreground and the background so as to improve the image quality in the multilayer image while improving the foreground compression efficiency.

また、上述した第1実施の形態においては、画像処理装置50は、背景を生成する際に、前景に分類されたことが選択画像によって表される画素を、入力画像から除去して、近傍の画素で穴埋めするようにしても良い。図12は、背景の穴埋めを説明するための図である。具体的には、画像処理装置50は、前景に分類された画素の値(画素値)を、当該画素の近傍の画素であり背景に分類された画素の値と同一又は近似する値に置換して、背景を生成する。この結果、背景の圧縮効率を高めることができる。背景の穴埋めが行われる場合、符号容量決定部54は、前景の符号のデータ容量対背景の符号のデータ容量の比を、文字又は線に分類される画素数対非文字に分類される画素数の比として、前景の符号のデータ容量及び背景の符号のデータ容量を決定する。例えば、文字又は線を表す画素に分類されることが選択画像によって表される画素の選択画像の全画素に占める割合が1/5である場合、「文字又は線に分類される画素数:非文字に分類される画素数=1:4」なので、「前景の符号のデータ容量:背景の符号のデータ容量=1:4」として、前景の符号のデータ容量及び背景の符号のデータ容量を決定する。   Further, in the first embodiment described above, when generating the background, the image processing apparatus 50 removes the pixels represented by the selected image that are classified as the foreground from the input image, You may make it fill up with a pixel. FIG. 12 is a diagram for explaining background hole filling. Specifically, the image processing device 50 replaces the value of the pixel classified as the foreground (pixel value) with a value that is the same as or close to the value of a pixel that is a pixel near the pixel and classified as the background. To generate a background. As a result, the background compression efficiency can be increased. When background filling is performed, the code capacity determination unit 54 sets the ratio of the data capacity of the foreground code to the data capacity of the background code to the number of pixels classified as characters or lines to the number of pixels classified as non-characters. As the ratio, the data capacity of the foreground code and the data capacity of the background code are determined. For example, when the ratio of the pixels represented by the selected image to the pixels representing the character or line occupies 1/5 of all the pixels in the selected image, “the number of pixels classified as the character or line: non Since the number of pixels classified into characters = 1: 4, the foreground code data volume and the background code data volume are determined as “foreground code data volume: background code data volume = 1: 4”. To do.

以上のような構成によれば、背景の圧縮効率を高めつつ、マルチレイヤ画像における画質がより良好となるように前景及び背景に対して各々符号量を割り当てることができる。   According to the configuration as described above, it is possible to assign a code amount to each of the foreground and the background so that the image quality in the multilayer image becomes better while enhancing the compression efficiency of the background.

上述した第3の実施の形態においては、原稿種類がユーザにより指定されるようにしたが、これに限らず、画像処理装置50が入力画像の特徴を抽出して、当該特徴を用いて、原稿種類を判断するようにして、当該原稿種類に応じて、前景の符号のデータ容量及び背景の符号のデータ容量を決定するようにしても良い。   In the above-described third embodiment, the document type is specified by the user. However, the present invention is not limited to this, and the image processing apparatus 50 extracts features of the input image and uses the features to copy the document. By determining the type, the data capacity of the foreground code and the data capacity of the background code may be determined according to the document type.

上述した第3の実施の形態においては、前景や背景の解像度を変換しても良い。この場合、画像処理装置50は、第2の実施の形態と同様に、解像度変換部57を更に備える。そして、第2の実施の形態で説明したように、例えば、前景の解像度を1/2にする場合には、符号容量決定部54は、原稿種類に対応する前景の符号のデータ容量及び背景の符号のデータ容量の比において、前景の符号のデータ容量の比の値に「1/2×1/2」を掛けた値を前景の符号のデータ容量の比の値として、背景の符号のデータ容量の比の値とを用いて、前景の符号のデータ容量の割合を改めて算出して、当該割合を用いて、前景の符号のデータ容量及び背景の符号のデータ容量を決定する。背景の解像度を変換する場合も同様に、符号容量決定部54は、原稿種類に対応する背景の符号のデータ容量の比を改めて算出して、前景の符号のデータ容量及び背景の符号のデータ容量を決定する。前景及び背景の両方の解像度を変換する場合は、符号容量決定部54は、原稿種類に対応する前景の符号のデータ容量の比及び背景の符号のデータ容量の比を各々改めて算出して、前景の符号のデータ容量及び背景の符号のデータ容量を決定する。   In the third embodiment described above, the foreground and background resolutions may be converted. In this case, the image processing apparatus 50 further includes a resolution conversion unit 57 as in the second embodiment. As described in the second embodiment, for example, when the foreground resolution is halved, the code capacity determination unit 54 determines the data capacity of the foreground code corresponding to the document type and the background. In the ratio of the data capacity of the code, the value of the ratio of the data capacity of the foreground code multiplied by “½ × 1/2” is used as the value of the ratio of the data capacity of the foreground code. Using the ratio value of the capacity, the ratio of the data capacity of the foreground code is calculated again, and the data capacity of the foreground code and the background code is determined using the ratio. Similarly, when converting the background resolution, the code capacity determination unit 54 again calculates the ratio of the data capacity of the background code corresponding to the document type, and the data capacity of the foreground code and the background code. To decide. When converting both the foreground and background resolutions, the code capacity determination unit 54 recalculates the foreground code data capacity ratio and the background code data capacity ratio corresponding to the document type, respectively. And the data capacity of the background code are determined.

50 画像処理装置
51 絵柄・文字分離部
52 背景・前景生成部
53 圧縮部
54 符号容量決定部
55 絵柄圧縮部
56 マルチレイヤ構造化部
57 解像度変換部
58 原稿種類対応テーブル
DESCRIPTION OF SYMBOLS 50 Image processing apparatus 51 Picture / character separation part 52 Background / foreground generation part 53 Compression part 54 Code capacity determination part 55 Picture compression part 56 Multi-layer structuring part 57 Resolution conversion part 58 Original type correspondence table

特開2008−236169号公報JP 2008-236169A 特許第4064279号公報Japanese Patent No. 4064279

Claims (15)

画像の入力を受け付ける画像入力受付手段と、
前記画像の特徴に基づいて、文字又は線を表す第1画素、あるいは、文字及び線以外を表す第2画素のいずれに分類されるかを画素毎に表す選択画像、前記第1画素を含む第1画像及び前記第2画素を含む第2画像を生成する第1生成手段と、
前記選択画像を符号化して、前記選択画像の符号を生成する第1符号化手段と、
前記第1画像及び第2画像を各々符号化して、前記第1画像の符号及び第2画像の符号を各々生成する第2符号化手段と、
前記第1画像の符号、第2画像の符号及び前記選択画像の符号を用いて、所定のフォーマットに従った画像データを生成する第2生成手段とを備える画像処理装置において、
前記画像データのデータ容量が所定のデータ容量以下となるように、前記第1画像の符号のデータ容量及び前記第2画像の符号のデータ容量のうち少なくとも一方を決定する決定手段を更に備え、
前記第2符号化手段は、前記第1画像の符号及び第2画像の符号のうち少なくとも一方に対して各々決定された前記データ容量になるように、前記第1画像及び前記第2画像を各々符号化して、前記第1画像の符号及び前記第2画像の符号を各々生成する
ことを特徴とする画像処理装置。
Image input accepting means for accepting image input;
Based on the characteristics of the image, a first image representing a character or a line or a second pixel representing a character or a line other than the second pixel representing a character or a line. First generation means for generating a second image including one image and the second pixel;
A first encoding means for encoding the selected image and generating a code of the selected image;
A second encoding means for encoding the first image and the second image, respectively, and generating a code for the first image and a code for the second image;
An image processing apparatus comprising: a second generation unit configured to generate image data according to a predetermined format using the code of the first image, the code of the second image, and the code of the selected image.
A decision means for deciding at least one of a code data volume of the first image and a code data volume of the second image so that a data volume of the image data is equal to or less than a predetermined data volume;
The second encoding means respectively outputs the first image and the second image so as to have the data capacity determined for at least one of the code of the first image and the code of the second image. An image processing apparatus that performs encoding to generate a code for the first image and a code for the second image.
前記決定手段は、
前記画像データのデータ容量が所定のデータ容量以下となるように、前記第1画像の符号のデータ容量及び前記第第2画像の符号のデータ容量の合計を算出する算出手段と、
前記選択画像を用いて、前記合計に対して前記第1画像の符号のデータ容量及び前記第第2画像の符号のデータ容量のうち少なくとも一方を決定する符号容量決定手段とを有する
ことを特徴とする請求項1に記載の画像処理装置。
The determining means includes
Calculating means for calculating the sum of the data capacity of the code of the first image and the data capacity of the code of the second image so that the data capacity of the image data is equal to or less than a predetermined data capacity;
Code capacity determining means for determining at least one of the code data capacity of the first image and the code data capacity of the second image with respect to the total using the selected image. The image processing apparatus according to claim 1.
前記符号容量決定手段は、前記選択画像の有する画素のうち前記第1画素に分類されることが前記選択画像によって表される画素の占める割合に応じて、前記合計に対して前記第1画像の符号のデータ容量を決定する
ことを特徴とする請求項2に記載の画像処理装置。
The code capacity determination unit is configured to determine whether the first image is included in the first image according to a ratio of pixels represented by the selected image to be classified as the first pixel among the pixels included in the selected image. The image processing apparatus according to claim 2, wherein the data capacity of the code is determined.
前記第1画像の解像度を変換する変換手段と、
前記選択画像を用いて、解像度が変換された前記第1画像の有する画素に対応させて、前記第1画素あるいは前記第2画素のいずれに分類されるかを画素毎に表す第1補正選択画像を生成する補正生成手段とを更に備え、
前記符号容量決定手段は、前記第1補正選択画像の有する画素のうち前記第1画素に分類されることが前記第1補正選択画像によって表される画素が占める割合を用いて、解像度が変換された前記第1画像の符号のデータ容量を決定する
ことを特徴とする請求項2又は3に記載の画像処理装置。
Conversion means for converting the resolution of the first image;
A first corrected selection image that represents, for each pixel, whether the pixel is classified as the first pixel or the second pixel in correspondence with the pixel of the first image whose resolution is converted using the selection image. And a correction generation means for generating
The code capacity determination unit converts the resolution using a ratio of pixels represented by the first correction selection image to be classified as the first pixel among pixels of the first correction selection image. 4. The image processing apparatus according to claim 2, wherein a data capacity of a code of the first image is determined.
前記変換手段は、前記第2画像の解像度を更に変換し、
前記補正生成手段は、前記選択画像を用いて、解像度が変換された前記第1画像の有する画素に対応させて、前記第1画素あるいは前記第2画素のいずれに分類されるかを画素毎に表す第2補正選択画像を更に生成し、
前記符号容量決定手段は、前記第1補正選択画像の有する画素のうち前記第1画素に分類されることが前記第1補正選択画像によって表される画素が占める割合と、前記第2補正選択画像の有する画素のうち前記第2画素に分類されることが前記第2補正選択画像によって表される画素が占める割合とを用いて、解像度が変換された前記第1画像の符号のデータ容量及び解像度が変換された前記第2画像の符号のデータ容量を決定する
ことを特徴とする請求項4に記載の画像処理装置。
The converting means further converts the resolution of the second image;
The correction generation unit uses the selected image to determine whether the pixel is classified as the first pixel or the second pixel in correspondence with the pixel of the first image whose resolution is converted. Further generating a second corrected selected image representing,
The code capacity determination means includes a ratio of pixels represented by the first correction selection image to be classified as the first pixel among pixels of the first correction selection image, and the second correction selection image. The data capacity and resolution of the code of the first image whose resolution has been converted using the ratio of pixels represented by the second correction selection image to be classified as the second pixel among the pixels of The image processing apparatus according to claim 4, wherein a data capacity of a code of the second image obtained by converting is determined.
前記第1生成手段は、前記第1画像の有する画素のうち、前記第2画素に分類されることが前記選択画像によって示される画素の値である画素値を、全て同一の色を表す画素値に置換した前記第1画像を生成する
ことを特徴とする請求項2に記載の画像処理装置。
The first generation means is a pixel value that represents a pixel value that is the value of a pixel indicated by the selected image to be classified as the second pixel among the pixels of the first image. The image processing apparatus according to claim 2, wherein the first image replaced with is generated.
前記符号容量決定手段は、前記選択画像の有する画素のうち前記第1画素の数である第1画素数と、前記選択画像の有する全ての画素の数である第2画素数との比を用いて、前記第1画素数の比を前記第1画像の符号のデータ容量の比として割り当て、前記第2画素数の比を前記第2画像の符号のデータ容量の比として割り当て、各比を用いて、前記合計に対して前記第1画像の符号のデータ容量及び前記第第2画像の符号のデータ容量を決定する
ことを特徴とする請求項6に記載の画像処理装置。
The code capacity determination unit uses a ratio between a first pixel number that is the number of the first pixels among pixels of the selected image and a second pixel number that is the number of all pixels of the selected image. Then, the ratio of the number of first pixels is assigned as the ratio of the data capacity of the code of the first image, the ratio of the number of second pixels is assigned as the ratio of the data capacity of the code of the second image, and each ratio is used. The image processing apparatus according to claim 6, wherein a data capacity of the code of the first image and a data capacity of the code of the second image are determined with respect to the sum.
前記第1生成手段は、前記第2画像の有する画素のうち、前記第1画素に分類されることが前記選択画像によって表される画素の値である画素値を、近傍の画素と同一又は近似する値に置換した前記第2画像を生成し、
前記符号容量決定手段は、前記選択画像の有する画素のうち前記第1画素に分類されることが前記選択画像によって表される画素の占める割合に応じて、前記第1画像の符号のデータ容量を決定し、前記選択画像の有する画素のうち前記第2画素に分類されることが前記選択画像によって表される画素の占める割合に応じて、前記第2画像の符号のデータ容量を決定する
ことを特徴とする請求項2に記載の画像処理装置。
The first generation means has a pixel value that is a value of a pixel represented by the selected image to be classified as the first pixel among pixels of the second image, which is the same as or approximate to a neighboring pixel. Generating the second image replaced with the value to be
The code capacity determination means determines the data capacity of the code of the first image according to a ratio of pixels represented by the selected image to be classified as the first pixel among pixels of the selected image. Determining a data capacity of a code of the second image according to a ratio of pixels represented by the selected image to be classified as the second pixel among pixels of the selected image. The image processing apparatus according to claim 2.
前記決定手段は、前記画像データのデータ容量が所定のデータ容量以下となるように且つ前記第1画像の符号のデータ容量及び前記第第2画像の符号のデータ容量が所定の比となるように、前記第1画像の符号のデータ容量及び前記第2画像の符号のデータ容量を決定する
ことを特徴とする請求項1に画像処理装置。
The determining means is configured so that the data capacity of the image data is equal to or less than a predetermined data capacity, and the data capacity of the code of the first image and the data capacity of the code of the second image have a predetermined ratio. 2. The image processing apparatus according to claim 1, wherein a data capacity of the code of the first image and a data capacity of the code of the second image are determined.
前記決定手段は、前記画像データのデータ容量が所定のデータ容量以下となるように、前記画像の原稿種類に応じて、前記第1画像の符号のデータ容量及び前記第2画像の符号のデータ容量のうち少なくとも一方を決定する
ことを特徴とする請求項1に記載の画像処理装置。
The determining means determines the data capacity of the code of the first image and the data capacity of the code of the second image according to the document type of the image so that the data capacity of the image data is equal to or less than a predetermined data capacity. The image processing apparatus according to claim 1, wherein at least one of the two is determined.
画像の入力を受け付ける画像入力受付手段と、
前記画像の特徴に基づいて、文字又は線を表す第1画素、あるいは、文字及び線以外を表す第2画素のいずれに分類されるかを画素毎に表す選択画像、前記第1画素を含む第1画像及び前記第2画素を含む第2画像を生成する第1生成手段と、
前記選択画像を符号化して、前記選択画像の符号を生成する第1符号化手段と、
前記第1画像及び第2画像を各々符号化して、前記第1画像の符号及び第2画像の符号を各々生成する第2符号化手段と、
前記第1画像の符号、第2画像の符号及び前記選択画像の符号を用いて、所定のフォーマットに従った画像データを生成する第2生成手段とを備える画像処理装置において、
前記画像データのデータ容量が所定のデータ容量以下となるように、前記第1画像の圧縮率及び前記第第2画像の圧縮率のうち少なくとも一方を決定する決定手段を更に備え、
前記第2符号化手段は、前記第1画像及び第2画像のうち少なくとも一方に対して各々決定された前記圧縮率になるように、前記第1画像及び第2画像を各々符号化して、前記第1画像の符号及び第2画像の符号を各々生成する
ことを特徴とする画像処理装置。
Image input accepting means for accepting image input;
Based on the characteristics of the image, a first image representing a character or a line or a second pixel representing a character or a line other than the second pixel representing a character or a line. First generation means for generating a second image including one image and the second pixel;
A first encoding means for encoding the selected image and generating a code of the selected image;
A second encoding means for encoding the first image and the second image, respectively, and generating a code for the first image and a code for the second image;
An image processing apparatus comprising: a second generation unit configured to generate image data according to a predetermined format using the code of the first image, the code of the second image, and the code of the selected image.
A determining unit that determines at least one of the compression rate of the first image and the compression rate of the second image so that the data volume of the image data is equal to or less than a predetermined data volume;
The second encoding means encodes the first image and the second image so as to achieve the compression rate determined for at least one of the first image and the second image, respectively, An image processing apparatus for generating a code for a first image and a code for a second image, respectively.
請求項1乃至11のいずれか一項に記載の画像処理装置と、
前記画像データを用いて、記録媒体に画像を形成する画像形成手段とを備える
ことを特徴とする画像形成装置。
An image processing apparatus according to any one of claims 1 to 11,
An image forming apparatus comprising: an image forming unit that forms an image on a recording medium using the image data.
画像入力受付手段と、第1生成手段と、第1符号化手段と、第2符号化手段と、第2生成手段と、決定手段とを備える画像処理装置で実行される画像処理方法であって、
前記画像入力受付手段が、画像の入力を受け付ける画像入力受付ステップと、
前記第1生成手段が、前記画像の特徴に基づいて、文字又は線を表す第1画素、あるいは、文字及び線以外を表す第2画素のいずれに分類されるかを画素毎に表す選択画像、前記第1画素を含む第1画像及び前記第2画素を含む第2画像を生成する第1生成ステップと、
前記第1符号化手段が、前記選択画像を符号化して、前記選択画像の符号を生成する第1符号化ステップと、
前記第2符号化手段が、前記第1画像及び第2画像を各々符号化して、前記第1画像の符号及び第2画像の符号を各々生成する第2符号化ステップと、
前記第2生成手段が、前記第1画像の符号、第2画像の符号及び前記選択画像の符号を用いて、所定のフォーマットに従った画像データを生成する第2生成ステップと、
前記決定手段が、前記画像データのデータ容量が所定のデータ容量以下となるように、前記第1画像の符号のデータ容量及び前記第2画像の符号のデータ容量のうち少なくとも一方を決定する決定ステップとを含み、
前記第2符号化ステップでは、前記第1画像の符号及び第2画像の符号のうち少なくとも一方に対して各々決定された前記データ容量になるように、前記第1画像及び前記第2画像を各々符号化して、前記第1画像の符号及び前記第2画像の符号を各々生成する
ことを特徴とする画像処理方法。
An image processing method executed by an image processing apparatus including an image input receiving unit, a first generation unit, a first encoding unit, a second encoding unit, a second generation unit, and a determination unit. ,
The image input receiving means receives an image input; and an image input receiving step;
A selection image that represents, for each pixel, whether the first generation unit is classified as a first pixel representing a character or a line, or a second pixel representing other than a character and a line, based on the characteristics of the image; A first generation step of generating a first image including the first pixel and a second image including the second pixel;
A first encoding step in which the first encoding means encodes the selected image to generate a code of the selected image;
A second encoding step in which the second encoding means encodes the first image and the second image, respectively, and generates a code of the first image and a code of the second image;
A second generation step in which the second generation means generates image data according to a predetermined format using the code of the first image, the code of the second image, and the code of the selected image;
A determining step in which the determining means determines at least one of the code data capacity of the first image and the code data capacity of the second image so that the data capacity of the image data is equal to or less than a predetermined data capacity. Including
In the second encoding step, the first image and the second image are respectively set to have the data capacity determined for at least one of the code of the first image and the code of the second image. An image processing method, wherein encoding is performed to generate a code for the first image and a code for the second image.
画像入力受付手段と、第1生成手段と、第1符号化手段と、第2符号化手段と、第2生成手段と、決定手段とを備える画像処理装置で実行される画像処理方法であって、
前記画像入力受付手段が、画像の入力を受け付ける画像入力受付ステップと、
前記第1生成手段が、前記画像の特徴に基づいて、文字又は線を表す第1画素、あるいは、文字及び線以外を表す第2画素のいずれに分類されるかを画素毎に表す選択画像、前記第1画素を含む第1画像及び前記第2画素を含む第2画像を生成する第1生成ステップと、
前記第1符号化手段が、前記選択画像を符号化して、前記選択画像の符号を生成する第1符号化ステップと、
前記第2符号化手段が、前記第1画像及び第2画像を各々符号化して、前記第1画像の符号及び第2画像の符号を各々生成する第2符号化ステップと、
前記第2生成手段が、前記第1画像の符号、第2画像の符号及び前記選択画像の符号を用いて、所定のフォーマットに従った画像データを生成する第2生成ステップと、
前記決定手段が、前記画像データのデータ容量が所定のデータ容量以下となるように、前記第1画像の圧縮率及び前記第第2画像の圧縮率のうち少なくとも一方を決定する決定ステップとを含み、
前記第2符号化ステップでは、前記第1画像及び第2画像のうち少なくとも一方に対して各々決定された前記圧縮率になるように、前記第1画像及び第2画像を各々符号化して、前記第1画像の符号及び第2画像の符号を各々生成する
ことを特徴とする画像処理方法。
An image processing method executed by an image processing apparatus including an image input receiving unit, a first generation unit, a first encoding unit, a second encoding unit, a second generation unit, and a determination unit. ,
The image input receiving means receives an image input; and an image input receiving step;
A selection image that represents, for each pixel, whether the first generation unit is classified as a first pixel representing a character or a line, or a second pixel representing other than a character and a line, based on the characteristics of the image; A first generation step of generating a first image including the first pixel and a second image including the second pixel;
A first encoding step in which the first encoding means encodes the selected image to generate a code of the selected image;
A second encoding step in which the second encoding means encodes the first image and the second image, respectively, and generates a code of the first image and a code of the second image;
A second generation step in which the second generation means generates image data according to a predetermined format using the code of the first image, the code of the second image, and the code of the selected image;
And a determining step of determining at least one of the compression ratio of the first image and the compression ratio of the second image so that the data capacity of the image data is equal to or less than a predetermined data capacity. ,
In the second encoding step, the first image and the second image are respectively encoded so as to have the compression ratio determined for at least one of the first image and the second image. An image processing method comprising generating a code for a first image and a code for a second image, respectively.
請求項13又は14に記載の方法をコンピュータに実行させるためのプログラム。   A program for causing a computer to execute the method according to claim 13 or 14.
JP2010000633A 2010-01-05 2010-01-05 Image processing apparatus, image forming apparatus, image processing method, and program Active JP5515746B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010000633A JP5515746B2 (en) 2010-01-05 2010-01-05 Image processing apparatus, image forming apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010000633A JP5515746B2 (en) 2010-01-05 2010-01-05 Image processing apparatus, image forming apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2011142391A true JP2011142391A (en) 2011-07-21
JP5515746B2 JP5515746B2 (en) 2014-06-11

Family

ID=44457968

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010000633A Active JP5515746B2 (en) 2010-01-05 2010-01-05 Image processing apparatus, image forming apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP5515746B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108141584A (en) * 2015-10-07 2018-06-08 高通股份有限公司 Using background picture to predictive arbitrary access picture into the method and system of row decoding
CN108141583A (en) * 2015-10-07 2018-06-08 高通股份有限公司 Use the random-access method and system of background picture perform prediction
US10922580B2 (en) 2014-05-14 2021-02-16 At&T Intellectual Property I, L.P. Image quality estimation using a reference image portion

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002368986A (en) * 2002-04-02 2002-12-20 Fuji Xerox Co Ltd Picture processor, picture processing method, picture transmitting device and picture transmitting method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002368986A (en) * 2002-04-02 2002-12-20 Fuji Xerox Co Ltd Picture processor, picture processing method, picture transmitting device and picture transmitting method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10922580B2 (en) 2014-05-14 2021-02-16 At&T Intellectual Property I, L.P. Image quality estimation using a reference image portion
CN108141584A (en) * 2015-10-07 2018-06-08 高通股份有限公司 Using background picture to predictive arbitrary access picture into the method and system of row decoding
CN108141583A (en) * 2015-10-07 2018-06-08 高通股份有限公司 Use the random-access method and system of background picture perform prediction

Also Published As

Publication number Publication date
JP5515746B2 (en) 2014-06-11

Similar Documents

Publication Publication Date Title
US8335379B2 (en) System and method for cleanup of MRC images for improved compression and image quality
JP4732488B2 (en) Image processing apparatus, image forming apparatus, image reading apparatus, image processing method, image processing program, and computer-readable recording medium
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
JP6648580B2 (en) Document type recognition device, image forming device, document type recognition method and program
US8463032B2 (en) Image compressing apparatus, compressed image outputting apparatus, image compression method, and recording medium
JP5413080B2 (en) Image processing apparatus and image processing method
US8345999B2 (en) System and method for monochrome binary compression on legacy devices
US7620256B2 (en) Method and apparatus for processing images in a layered structure
JP5515746B2 (en) Image processing apparatus, image forming apparatus, image processing method, and program
JP3731629B2 (en) Image processing apparatus, image transmission apparatus, image processing method, and image transmission method
JP4045457B2 (en) Image processing system and image processing method
JP2010278933A (en) Image processing device, image forming device, image processing method, program and recording medium
JP2009212692A (en) Image processor and image forming apparatus
KR101454208B1 (en) Method and apparatus for encoding/decoding halftone image
JP3815214B2 (en) Image processing apparatus and storage medium storing screen processing program
JP3826983B2 (en) Image processing device
JP4140362B2 (en) Image processing device
JP2017216540A (en) Image processing apparatus, image forming apparatus, program, and recording medium
JP4926118B2 (en) Image compression apparatus, image processing apparatus, image forming apparatus, computer program, and recording medium
JP6045182B2 (en) Image processing apparatus, image forming apparatus including the same, computer program, and recording medium
JP2010232952A (en) Image processor, and image processing program
JP4860558B2 (en) Encoding apparatus and encoding method
JP2001078049A (en) Method and device for picture processing
JP3788496B2 (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121009

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130627

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130702

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130828

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: 20140304

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140317

R151 Written notification of patent or utility model registration

Ref document number: 5515746

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151