[go: up one dir, main page]

JP2014099742A - Color/monochromatic determination - Google Patents

Color/monochromatic determination Download PDF

Info

Publication number
JP2014099742A
JP2014099742A JP2012250182A JP2012250182A JP2014099742A JP 2014099742 A JP2014099742 A JP 2014099742A JP 2012250182 A JP2012250182 A JP 2012250182A JP 2012250182 A JP2012250182 A JP 2012250182A JP 2014099742 A JP2014099742 A JP 2014099742A
Authority
JP
Japan
Prior art keywords
image
data
color
compression
determined
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012250182A
Other languages
Japanese (ja)
Inventor
Masanori Ichikawa
雅教 市川
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2012250182A priority Critical patent/JP2014099742A/en
Priority to US14/078,708 priority patent/US9350883B2/en
Publication of JP2014099742A publication Critical patent/JP2014099742A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32128Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title attached to the image data, e.g. file header, transmitted message header, information on the same page or in the same computer file as the image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/00002Diagnosis, testing or measuring; Detecting, analysing or monitoring not otherwise provided for
    • H04N1/00026Methods therefor
    • H04N1/0005Methods therefor in service, i.e. during normal operation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N2201/00Indexing scheme relating to scanning, transmission or reproduction of documents or the like, and to details thereof
    • H04N2201/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N2201/3201Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N2201/3225Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title of data relating to an image, a page or a document
    • H04N2201/3226Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title of data relating to an image, a page or a document of identification information or the like, e.g. ID code, index, title, part of an image, reduced-size image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N2201/00Indexing scheme relating to scanning, transmission or reproduction of documents or the like, and to details thereof
    • H04N2201/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N2201/3201Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N2201/3225Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title of data relating to an image, a page or a document
    • H04N2201/3242Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title of data relating to an image, a page or a document of processing required or performed, e.g. for reproduction or before recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N2201/00Indexing scheme relating to scanning, transmission or reproduction of documents or the like, and to details thereof
    • H04N2201/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N2201/3201Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N2201/3225Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title of data relating to an image, a page or a document
    • H04N2201/325Modified version of the image, e.g. part of the image, image reduced in size or resolution, thumbnail or screennail
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N2201/00Indexing scheme relating to scanning, transmission or reproduction of documents or the like, and to details thereof
    • H04N2201/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N2201/3201Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N2201/3225Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title of data relating to an image, a page or a document
    • H04N2201/3256Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title of data relating to an image, a page or a document colour related metadata, e.g. colour, ICC profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Analysis (AREA)

Abstract

【課題】 サムネイル画像を用いたカラーモノクロ判定の精度向上。
【解決手段】 画像を圧縮する圧縮手段と、圧縮後の画像のデータサイズに基づいて、圧縮される前の前記画像がカラーであるかモノクロであるか判定する判定手段とを有することを特徴とする装置。
【選択図】 図9
PROBLEM TO BE SOLVED: To improve accuracy of color / monochrome determination using a thumbnail image.
SOLUTION: It comprises compression means for compressing an image, and determination means for determining whether the image before compression is color or monochrome based on the data size of the image after compression. Device to do.
[Selection] Figure 9

Description

本発明は、カラーモノクロ判定に関する。   The present invention relates to color / monochrome determination.

従来、例えば複合機などの画像形成装置においては、1ページの入力画像における各画素に対してカラーモノクロ判定を行い、カラーと判定された画素数が所定数を超える場合にそのページがカラーであると判定する技術が知られている。
ところが、前述の方法では1ページの中の全ての画素に対してカラーモノクロ判定を行うため、多くの時間を要することになってしまうといった問題があった。
そこで、特許文献1は、1ページの入力画像を縮小処理してサムネイル画像を生成し、そのサムネイル画像における各画素に対してカラーかモノクロか判定をおこなうようにしている。
2. Description of the Related Art Conventionally, in an image forming apparatus such as a multifunction peripheral, for example, color / monochrome determination is performed for each pixel in an input image of one page. A technique for judging that is known is known.
However, the above-described method has a problem that it takes a lot of time because color / monochrome determination is performed for all pixels in one page.
Therefore, Patent Document 1 reduces the input image of one page to generate a thumbnail image, and determines whether each pixel in the thumbnail image is color or monochrome.

特開2012−32668JP2012-32668

しかしながら、前述のサムネイル画像に対するカラーモノクロ判定を用いると、ある色の画素とその補色の画素が入り乱れて平均色差がグレイ軸の色差に近い値となるような入力画像だった場合、カラーモノクロ判定に失敗してしまう。
これは、1ページ全体の入力画像だけに発生する問題ではなく、それよりももっと小さな画像(例えば、1ブロックの画像)に対しても発生する。
発明を実施するための形態の欄では、こうした課題を解決するために必要な技術について説明を行う。
However, when the above-described color / monochrome determination for the thumbnail image is used, if an input image is such that a pixel of a certain color and its complementary color pixel are confused and the average color difference is close to the gray axis color difference, the color / monochrome determination is used. I will fail.
This is not a problem that occurs only in the input image of the entire page, but also occurs in a smaller image (for example, an image of one block).
In the column of the mode for carrying out the invention, a technique necessary for solving such a problem will be described.

画像を圧縮する圧縮手段と、
圧縮後の画像のデータサイズ及び圧縮される前の前記画像の色差平均値とに基づいて、前記画像がカラーであるかモノクロであるか判定する判定手段とを有することを特徴とする装置。
Compression means for compressing the image;
An apparatus comprising: determination means for determining whether the image is color or monochrome based on a data size of the image after compression and a color difference average value of the image before compression.

ある色の画素とその補色の画素が入り乱れて平均色差がグレイ軸の色差に近い値となるような画像のカラーモノクロ判定の精度が向上する。   The accuracy of color / monochrome determination of an image in which a pixel of a certain color and its complementary color pixel are mixed up and the average color difference is close to the color difference on the gray axis is improved.

実施例における画像処理装置のブロック図Block diagram of an image processing apparatus in an embodiment 実施例におけるスキャン画像処理部109のブロック図Block diagram of the scanned image processing unit 109 in the embodiment 実施例におけるパケットデータの構成を示す模式図The schematic diagram which shows the structure of the packet data in an Example 実施例における画像圧縮部206の処理フローを示すフローチャートThe flowchart which shows the processing flow of the image compression part 206 in an Example. 実施例におけるMCUのJPEG−DCT圧縮処理を示すフローチャートThe flowchart which shows the JPEG-DCT compression process of MCU in an Example 実施例におけるタイルデータとMCUの関係を示す模式図Schematic diagram showing the relationship between tile data and MCU in the embodiment 実施例における量子化テーブルを示す模式図The schematic diagram which shows the quantization table in an Example 実施例におけるカラーサイズ判定用閾値を示す模式図The schematic diagram which shows the threshold value for color size determination in an Example 実施例における1ページのカラータイル数を算出する処理を示すフローチャートThe flowchart which shows the process which calculates the number of color tiles of 1 page in an Example 実施例におけるカラーサイズ判定用閾値を決定する処理を示すフローチャート7 is a flowchart illustrating processing for determining a color size determination threshold in the embodiment.

以下、本発明を実施するための最良の形態について図面を用いて説明する。なお、本提案の実施形態を備える画像形成装置として、スキャン、プリンタ、コピーなどの複数の機能を有するMFP(デジタル複合機)を例に説明する。   The best mode for carrying out the present invention will be described below with reference to the drawings. Note that an MFP (digital multifunction peripheral) having a plurality of functions such as scan, printer, and copy will be described as an example of an image forming apparatus including the proposed embodiment.

図1は、本実施形態に係る画像処理システムの全体構成を示すブロック図である。図1において、MFP100は、画像入力デバイスであるスキャナ112と画像出力デバイスであるプリンタエンジン113が内部で接続されている。そして画像データの読み取りやプリント出力のための制御を行う。   FIG. 1 is a block diagram showing the overall configuration of the image processing system according to the present embodiment. In FIG. 1, an MFP 100 is internally connected with a scanner 112 that is an image input device and a printer engine 113 that is an image output device. Then, control for reading image data and printing is performed.

CPU101はMFP100を制御するための中央処理装置である。操作部102は、ユーザから操作指示の受付及び操作結果の表示を行う。HDD103はハードディスクドライブであり、各種処理のためのシステムソフトウェア及び入力された画像データ等を格納する。ROM104はブートROMであり、システムのブートプログラムが格納されている。RAM105は、CPU101が動作するためのシステムワークメモリであり、入力された画像データを一時記憶するための画像メモリでもある。デバイスI/F106は、スキャナ112やプリンタエンジン113と接続し、画像データの転送処理を行う。画像編集用画像処理部107は、画像データの回転や、変倍、色処理、トリミング・マスキング、2値変換、多値変換、白紙判定等の各種画像処理を行う。プリント画像処理部108は、プリント出力する画像データに対して、プリンタエンジン113に応じた画像処理補正等を行う。スキャン画像処理部109は、スキャナ112で読み込まれた画像データに対して、補正、加工、圧縮等の各種処理を行う。RIP(ラスタイメージプロセッサ)110は、図示しないネットワークI/Fから受信したページ記述言語(PDL)コードをイメージデータに展開する。以上のユニットがシステムバス114上に配置されている。   A CPU 101 is a central processing unit for controlling the MFP 100. The operation unit 102 receives an operation instruction from the user and displays an operation result. An HDD 103 is a hard disk drive, and stores system software for various processes, input image data, and the like. A ROM 104 is a boot ROM, and stores a system boot program. A RAM 105 is a system work memory for the CPU 101 to operate, and is also an image memory for temporarily storing input image data. The device I / F 106 is connected to the scanner 112 and the printer engine 113, and performs image data transfer processing. The image editing image processing unit 107 performs various kinds of image processing such as image data rotation, scaling, color processing, trimming / masking, binary conversion, multi-value conversion, and blank page determination. The print image processing unit 108 performs image processing correction or the like corresponding to the printer engine 113 on the image data to be printed out. The scan image processing unit 109 performs various processes such as correction, processing, and compression on the image data read by the scanner 112. A RIP (raster image processor) 110 expands a page description language (PDL) code received from a network I / F (not shown) into image data. The above units are arranged on the system bus 114.

図2は、本実施形態の画像処理装置に備えるスキャナ画像処理部109の内部構成を示すブロック図である。ライン間補正部201は、スキャナにより読み取ったRGB画像データに対して、各コンポーネント間のライン単位(副走査方向)のずれを補正する。ガンマ補正処理部202は、スキャナに依存してしまう画像データの色味をデジタル複合機内で共通の色味となるように色の補正を行う。フィルタ処理部203は、スムージング処理等のフィルタ処理を行う。ブロック画像生成部204は、ラスターフォーマットで入力される画像データから32画素×32画素のブロック画像データを生成する。更に、ブロック画像生成部204では、図3に示されるようなタイルデータに所定の固定長のヘッダーデータを付加したデータを生成する。なお、フィルタ処理部203とブロック画像生成部204の間に色変換処理部(例えば、RGB画像→YUV変換を行う色変換処理部)を設けるのも好ましい。本実施例では、その変換(RGB画像→YUV変換)を行うものとして以下、説明を行うが、こうした変換を行わなくても良い。   FIG. 2 is a block diagram showing an internal configuration of the scanner image processing unit 109 provided in the image processing apparatus of this embodiment. The inter-line correction unit 201 corrects a deviation in line units (sub-scanning direction) between components for RGB image data read by a scanner. The gamma correction processing unit 202 corrects the color so that the color of the image data depending on the scanner becomes a common color in the digital multi-function peripheral. The filter processing unit 203 performs filter processing such as smoothing processing. The block image generation unit 204 generates 32-pixel × 32-pixel block image data from image data input in a raster format. Further, the block image generation unit 204 generates data in which header data having a predetermined fixed length is added to tile data as shown in FIG. A color conversion processing unit (for example, a color conversion processing unit that performs RGB image → YUV conversion) is preferably provided between the filter processing unit 203 and the block image generation unit 204. In the present embodiment, the following description will be given on the assumption that the conversion (RGB image → YUV conversion) is performed, but such conversion may not be performed.

なお、処理の流れは以下の通りである。操作部102からコピー指示が行われると、スキャナ112は原稿をスキャンする。スキャン結果はデバイスI/F106及びシステムバス114を介してスキャン画像処理部109と送られ、図2に示す処理が行われる。処理が行われた結果(例えば、圧縮されたYUV画像データを含むパケットデータ)は、システムバス114を介してRAM105へと入力される。そして、図9に示す処理が行われる。その処理が終わると、RAM105に入力された結果は、CPU101によりシステムバス114を介してプリント画像処理部108へと送られる。すると、プリント画像処理部108は、パケットデータから、圧縮されたYUV画像データを取り出す。そして、取り出したYUV画像データを解凍する。そして、解凍結果(タイルデータ形式のYUV画像データ)をラスターデータ形式のYUV画像データに変換し、変換結果をCMYK画像データ又はK単色の画像データに変換する。さらに、プリント画像処理部108は、その変換結果に対してハーフトーン処理を行う。そして、得られたハーフトーン結果をシステムバス114及び、デバイスI/F106介してプリンタエンジン113に送る。そして、プリンタエンジン113がハーフトーン結果を印刷する。   The process flow is as follows. When a copy instruction is issued from the operation unit 102, the scanner 112 scans the document. The scan result is sent to the scan image processing unit 109 via the device I / F 106 and the system bus 114, and the process shown in FIG. 2 is performed. A result of the processing (for example, packet data including compressed YUV image data) is input to the RAM 105 via the system bus 114. Then, the process shown in FIG. 9 is performed. When the processing is completed, the result input to the RAM 105 is sent to the print image processing unit 108 by the CPU 101 via the system bus 114. Then, the print image processing unit 108 extracts compressed YUV image data from the packet data. Then, the extracted YUV image data is decompressed. Then, the decompression result (YUV image data in tile data format) is converted into YUV image data in raster data format, and the conversion result is converted into CMYK image data or K monochromatic image data. Further, the print image processing unit 108 performs halftone processing on the conversion result. Then, the obtained halftone result is sent to the printer engine 113 via the system bus 114 and the device I / F 106. Then, the printer engine 113 prints the halftone result.

なお、上の段落では、コピーの場合の一連のフローを説明したが、コピー以外のフローにも請求項は適用できる。例えば、PDL印刷の場合には、外部装置から送られてきたPDLデータがRIP110でラスター画像データに変換され、その変換結果が図2の処理へと流れていくことになる。なお、PDL印刷の際の画像であれ、コピーの際の画像であれ、その他の画像であれ、1頁分の画像のことを入力画像と称することにする。   In the above paragraph, a series of flows in the case of copying has been described, but the claims can be applied to flows other than copying. For example, in the case of PDL printing, PDL data sent from an external device is converted into raster image data by the RIP 110, and the conversion result flows to the processing of FIG. Note that an image for one page, whether an image for PDL printing, an image for copying, or another image, is referred to as an input image.

ここで、本実施例における画像データのフォーマットについて図3を用いて説明する。本実施例においては、前述した通り、ラスターのページ画像データは32画素×32画素のブロック(ブロックのことをブロック画像データと呼ぶこともある)に分割される。繰り返しになるが、この32画素×32画素のブロック画像データをタイルデータと定義する。なお、本実施例では32画素×32画素のブロック画像に分割したが、これに限りことではない。このタイルデータをハンドリングする際に必要となる各種情報を含むヘッダーデータを付加したデータが生成され、このデータ単位で各処理部によりハンドリングされることになる。タイルデータにヘッダーデータを付加したデータを本実施例ではパケットデータと定義する。なお、ヘッダーデータは、パケットIDやサムネイル値等の情報であり、本実施例では更にパケットデータ毎に、タイルデータサイズ、圧縮フラグ、量子化IDの情報がヘッダーデータに格納されることとする。パケットIDとは、このパケットデータに含まれるタイルがページ単位のラスター画像上のどの位置にあるかを示すX座標とY座標の2次元の座標情報である。色空間情報とは、このタイルが、RGB画像なのかYUV画像なのかGRAY−SCALE画像なのかを識別するための識別子を示す情報である。タイルデータサイズとは、タイルデータに含まれる1024画素の画像データのデータサイズを示すバイト単位の情報である。パケットデータに含まれるタイルデータが圧縮されている場合には、圧縮されたデータのデータサイズとなる。圧縮フラグとは、このタイルデータがJPEG−DCT圧縮されたデータか、他の方式で圧縮されたデータか、非圧縮のデータかを示すフラグの情報である。量子化IDとは、JPEG−DCT圧縮時に使用した量子化テーブルのIDを示す情報である。本実施例では2ビットのフラグの情報である。サムネイル値とは、タイルデータに含まれる1024画素の平均値を示す情報であり、後述するサムネイル生成部205により作成される。   Here, the format of the image data in the present embodiment will be described with reference to FIG. In the present embodiment, as described above, the raster page image data is divided into blocks of 32 pixels × 32 pixels (a block may be referred to as block image data). Again, this block image data of 32 pixels × 32 pixels is defined as tile data. In this embodiment, the image is divided into block images of 32 pixels × 32 pixels, but this is not a limitation. Data to which header data including various information necessary for handling the tile data is added is generated and handled by each processing unit in this data unit. In this embodiment, data obtained by adding header data to tile data is defined as packet data. The header data is information such as a packet ID and a thumbnail value. In this embodiment, the tile data size, compression flag, and quantization ID information are further stored in the header data for each packet data. The packet ID is two-dimensional coordinate information of an X coordinate and a Y coordinate indicating where the tile included in the packet data is located on the raster image in page units. The color space information is information indicating an identifier for identifying whether the tile is an RGB image, a YUV image, or a GRAY-SCALE image. The tile data size is information in bytes indicating the data size of 1024 pixel image data included in the tile data. When the tile data included in the packet data is compressed, the data size of the compressed data is obtained. The compression flag is flag information indicating whether the tile data is JPEG-DCT compressed data, data compressed by another method, or uncompressed data. The quantization ID is information indicating the ID of the quantization table used at the time of JPEG-DCT compression. In this embodiment, it is 2-bit flag information. The thumbnail value is information indicating an average value of 1024 pixels included in the tile data, and is created by the thumbnail generation unit 205 described later.

サムネイル生成部205は、パケットデータに含まれる1024画素のY値、U値、V値夫々の平均値の算出を行い、ブランクだったサムネイル値の欄にY値、U値、V値の平均値を格納する。即ち、輝度平均値と色差平均値を格納する。   The thumbnail generation unit 205 calculates the average value of each of the Y value, U value, and V value of 1024 pixels included in the packet data, and puts the average value of the Y value, U value, and V value in the blank thumbnail value column. Is stored. That is, the luminance average value and the color difference average value are stored.

画像圧縮部206は、ブロック画像生成部204で生成されたパケットデータに含まれるタイルデータに対してJPEG−DCT圧縮を行う。更に、パケットデータのヘッダーデータにおけるタイルデータサイズの欄、圧縮フラグの欄、量子化IDの欄に情報を格納する。画像圧縮部206から出力されたパケットデータはシステムバス114を経由してRAM105に格納される。なお、ユーザが操作部102からJPEG−DCT圧縮ではなく別の圧縮方式で圧縮して欲しい旨の指示を行った場合には、別の圧縮方式(例えば、JPEG2000の方式)でタイルデータが圧縮されることになる。   The image compression unit 206 performs JPEG-DCT compression on tile data included in the packet data generated by the block image generation unit 204. Further, information is stored in the tile data size column, the compression flag column, and the quantization ID column in the header data of the packet data. Packet data output from the image compression unit 206 is stored in the RAM 105 via the system bus 114. Note that when the user gives an instruction from the operation unit 102 that compression is not performed using JPEG-DCT compression but another compression method, tile data is compressed using another compression method (eg, JPEG2000 method). Will be.

ここで、画像圧縮部206における処理フローに関して、図4を用いて説明する。まず、画像圧縮部206はサムネイル生成部205から受信したパケットデータをJPEG−DCT圧縮の処理対象とし、該当パケットデータからタイルデータの抽出を行う(S401)。この際、後述するS411における処理で、非圧縮のタイルデータの参照を行う可能性があるため、抽出されたタイルデータは重複してデータを保持されるものとする。   Here, the processing flow in the image compression unit 206 will be described with reference to FIG. First, the image compression unit 206 uses the packet data received from the thumbnail generation unit 205 as a processing target of JPEG-DCT compression, and extracts tile data from the packet data (S401). At this time, since there is a possibility that uncompressed tile data may be referred to in the processing in S411 described later, the extracted tile data is held redundantly.

画像圧縮部206は抽出されたタイルデータを16個のMCU(1つのMCUは、8画素×8画素のブロックとなっている)に分割する(S402)。タイルデータは前述の通り、32画素×32画素のブロックであり、MCU16個分備えるデータである。生成されたMCUはタイルデータの左上を起点に主走査方向及び副走査方向に対して順に割り付けされ、図6のMCUの番号に示されるような順のデータ構成となる。また、次ステップ以降で処理されるMCUは図6に示されるMCUの番号順に処理されるものとする。次に、画像圧縮部206は処理対象となるMCUに対してJPEG−DCT圧縮処理を行う(S403)。   The image compression unit 206 divides the extracted tile data into 16 MCUs (one MCU is a block of 8 pixels × 8 pixels) (S402). As described above, the tile data is a block of 32 pixels × 32 pixels, and is data provided for 16 MCUs. The generated MCUs are sequentially assigned in the main scanning direction and the sub-scanning direction starting from the upper left of the tile data, and have a data structure in the order shown by the MCU numbers in FIG. It is assumed that the MCUs processed in the subsequent steps are processed in the order of the MCU numbers shown in FIG. Next, the image compression unit 206 performs JPEG-DCT compression processing on the MCU to be processed (S403).

ここで、MCUに対して行われるJPEG−DCT圧縮の処理フローについて図5を用いて説明する。   Here, a processing flow of JPEG-DCT compression performed on the MCU will be described with reference to FIG.

まず、画像圧縮部206は処理対象となるMCUの画像成分の分解を行う。本実施例では色空間情報をYUVとして説明しているため、ここではY、U及びVの3成分に分解され、画像成分毎のデータとなる。   First, the image compression unit 206 decomposes the image component of the MCU to be processed. In this embodiment, since the color space information is described as YUV, it is decomposed into three components Y, U, and V, and becomes data for each image component.

次に、画像圧縮部206はMCUの画像成分毎にDCT変換の処理を行う(S502)。DCT変換とは、いわゆる周波数成分毎の8×8のデータに変換する処理であり、この処理により2次元の低周波成分の係数から高周波成分の係数までが算出される。DCT変換処理がおこなわれた後、画像圧縮部206はMCUの画像成分毎に量子化テーブルを用いて夫々の係数の量子化の処理を行う(S503)。量子化テーブルは、図7に示されるように8×8の2次元の定数の集まりから構成されるものであり、各定数は、量子化の処理における量子化ステップを決定するものである。   Next, the image compression unit 206 performs DCT conversion processing for each image component of the MCU (S502). The DCT conversion is a process of converting so-called 8 × 8 data for each frequency component. By this process, a coefficient from a two-dimensional low frequency component to a high frequency component is calculated. After the DCT conversion processing is performed, the image compression unit 206 performs quantization processing of each coefficient using the quantization table for each image component of the MCU (S503). As shown in FIG. 7, the quantization table is composed of a collection of 8 × 8 two-dimensional constants, and each constant determines a quantization step in the quantization process.

例えば、定数が6の場合、0−255で表される係数は0−5へと量子化されることになる。その際、例えば、係数が50だと、255÷6=42以上、255×2÷6=84以下となるので、量子化結果は1となる。   For example, when the constant is 6, the coefficient represented by 0-255 is quantized to 0-5. At this time, for example, if the coefficient is 50, 255 ÷ 6 = 42 or more and 255 × 2 ÷ 6 = 84 or less, so the quantization result is 1.

つまり、量子化の定数を大きくすれば量子化結果のデータ量が小さくなり、その反面、画像データの画質が劣化する。逆に、量子化の定数を小さくすれば量子化ステップが小さくなるため量子化結果のデータ量が大きくなるが、画像データの画質劣化を抑えることができる。したがって、図7に示されるようにJPEG−DCT圧縮処理時に実現したいデータ量(即ち、圧縮率)に応じた量子化テーブルを複数備えることが一般的である。本実施例では量子化テーブル1から量子化テーブル4の方向に量子化ステップが大きくなるようなテーブルが構成されている。つまり、量子化テーブル4に近づくほど、画像データの劣化が大きくなるが、圧縮率は高くなる。本実施例における画像圧縮部206は、CPU101により量子化テーブルを4面設定可能とする構成であり、起動時等にCPU101により4面全てが設定されるものとする。また、量子化テーブルは量子化IDとリンクされて管理されており、CPU101が画像圧縮部206に対して量子化IDのみ指定を行うことでJPEG−DCT圧縮時に用いる量子化テーブルの指定を行うことができる。この量子化IDはデフォルト、00に設定されており、図7に示される量子化テーブル1が使用されるものとする。量子化IDが01の場合は量子化テーブル2、量子化IDが10の場合は量子化テーブル3、量子化IDが11の場合は量子化テーブル4が使用される。なお、CPU101が確保したRAM105の領域に画像圧縮部206からのページ画像データが収まらない際に、圧縮率が高くなるよう量子化IDが1段階変更され、画像圧縮処理部206による処理が再度行われる。   That is, if the quantization constant is increased, the data amount of the quantization result is reduced. On the other hand, the image quality of the image data is deteriorated. On the contrary, if the quantization constant is reduced, the quantization step is reduced and the data amount of the quantization result is increased, but the image quality deterioration of the image data can be suppressed. Therefore, as shown in FIG. 7, it is common to provide a plurality of quantization tables corresponding to the amount of data (that is, the compression rate) to be realized at the time of JPEG-DCT compression processing. In the present embodiment, a table is configured such that the quantization step increases in the direction from the quantization table 1 to the quantization table 4. That is, the closer to the quantization table 4, the greater the degradation of the image data, but the higher the compression rate. The image compression unit 206 in the present embodiment is configured to allow the CPU 101 to set four quantization tables, and all four surfaces are set by the CPU 101 at the time of startup or the like. The quantization table is managed by being linked to the quantization ID, and the CPU 101 designates only the quantization ID to the image compression unit 206 to designate the quantization table used at the time of JPEG-DCT compression. Can do. This quantization ID is set to default, 00, and the quantization table 1 shown in FIG. 7 is used. When the quantization ID is 01, the quantization table 2 is used, when the quantization ID is 10, the quantization table 3 is used, and when the quantization ID is 11, the quantization table 4 is used. When the page image data from the image compression unit 206 does not fit in the area of the RAM 105 secured by the CPU 101, the quantization ID is changed by one step so that the compression rate is increased, and the processing by the image compression processing unit 206 is performed again. Is called.

具体的には、量子化IDを1段階大きな値に変更した上で、1頁に含まれる全てのパケットデータ(サムネイル生成部205から入力されたパケットデータであって、図4の処理の過程で圧縮されたタイルデータを格納したパケットデータではない。)を対象とし、それらのパケットデータ一つずつに対して図4の処理が再度行われる。   Specifically, after changing the quantization ID to one step larger value, all the packet data included in one page (the packet data input from the thumbnail generation unit 205, which is the process of FIG. 4). 4 is performed again on each of the packet data one by one. The packet data is not packet data storing compressed tile data.

その後、画像圧縮部206は予め備えているハフマンテーブルの値に沿って、MCUの画像成分毎にエントロピー符号化の処理を行う(S504)。エントロピー符号化とは、データの生起確率の高低に応じて異なる長さの符号を割り当てることで圧縮を行うものである。なお、本実施例において使用するハフマンテーブルは、JPEG勧告書ITU−T Rec.T.81に記載されるK3〜K6であるものとする。以上の処理により1つのMCUのJPEG−DCT圧縮の処理が完了する。   After that, the image compression unit 206 performs entropy encoding processing for each image component of the MCU according to the value of the Huffman table provided in advance (S504). In entropy coding, compression is performed by assigning codes having different lengths depending on the occurrence probability of data. The Huffman table used in this embodiment is the JPEG recommendation ITU-T Rec. T.A. 81 to K3 to K6. With the above processing, the processing of JPEG-DCT compression of one MCU is completed.

次に画像圧縮部206は該当パケットデータの16個のMCUの全ての処理が完了したかどうかを判定する(S404)。該当パケットデータの16個のMCUの全ての処理が完了していないと判定された場合、S403において次のMCUの処理を行う。該当パケットデータの16個のMCUの全ての処理が完了したと判定された場合、画像圧縮部206はJPEG−DCT圧縮の処理が行われた16個のMCUの圧縮後のデータサイズの合計値を求める(S405)。そして、画像圧縮部206はS405で求めたデータサイズを基に、該当パケットデータのタイルデータの圧縮率が1未満であるかどうかの判定を行う(S406)。この判定処理は、該当パケットデータのヘッダーに格納される色空間情報をもとに非圧縮時のタイルデータのデータサイズ(非圧縮データサイズとする。)を決定し、S405で求まった圧縮後のデータサイズが非圧縮データサイズ未満であるかどうかを判定することにより行われる。本実施例では前述したとおり、色空間情報はYUVであるため、非圧縮データサイズは3Kバイトとなる。つまり、本実施例では圧縮後のデータサイズが3Kバイト未満であるかどうかを判定することなる。なお、非圧縮データサイズが3Kバイトなのは、32画素×32画素×1バイト(即ち、0−255)×3(YとUとVの三つ)という計算から求まっている。   Next, the image compression unit 206 determines whether all the processing of the 16 MCUs of the packet data has been completed (S404). If it is determined that all the 16 MCUs of the packet data have not been processed, the next MCU is processed in S403. When it is determined that all the 16 MCUs of the packet data have been processed, the image compression unit 206 calculates the total data size after compression of the 16 MCUs for which the JPEG-DCT compression process has been performed. Obtain (S405). Then, the image compression unit 206 determines whether or not the compression rate of the tile data of the packet data is less than 1 based on the data size obtained in S405 (S406). In this determination processing, the data size of the tile data at the time of non-compression (referred to as the uncompressed data size) is determined based on the color space information stored in the header of the corresponding packet data, and the compressed data obtained in S405 is determined. This is done by determining whether the data size is less than the uncompressed data size. In this embodiment, as described above, since the color space information is YUV, the uncompressed data size is 3K bytes. That is, in this embodiment, it is determined whether or not the data size after compression is less than 3 Kbytes. The uncompressed data size is 3 Kbytes, which is obtained from the calculation of 32 pixels × 32 pixels × 1 byte (that is, 0-255) × 3 (Y, U, and V).

S406で圧縮率が1未満であると判定された場合、画像圧縮部206は該当パケットデータのタイルデータの領域にJPEG−DCT圧縮された圧縮データを格納する(S407)。次に画像圧縮部206は該当パケットデータのヘッダーデータに含まれる圧縮フラグを、JPEG−DCT方式で圧縮されたことを示すフラグに更新する(S408)。次に、画像圧縮部206は該当パケットデータのヘッダーデータに含まれる量子化IDを、JPEG−DCT方式で圧縮したときに使用した量子化IDを示すIDに更新する(S409)。次に、画像圧縮部206は該当パケットデータのヘッダーデータに含まれるタイルデータサイズを、S405で算出したデータサイズに更新する(S410)。一方、S406で圧縮率が1未満でないと判定された場合、画像圧縮部206は該当パケットデータのタイルデータの領域にS401で非圧縮時のタイルデータの参照用に保持していた非圧縮のタイルデータを再び格納する(S411)。   If it is determined in S406 that the compression rate is less than 1, the image compression unit 206 stores JPEG-DCT compressed data in the tile data area of the packet data (S407). Next, the image compression unit 206 updates the compression flag included in the header data of the corresponding packet data to a flag indicating that the packet has been compressed by the JPEG-DCT method (S408). Next, the image compression unit 206 updates the quantization ID included in the header data of the packet data to an ID indicating the quantization ID used when compressed by the JPEG-DCT method (S409). Next, the image compression unit 206 updates the tile data size included in the header data of the packet data to the data size calculated in S405 (S410). On the other hand, if it is determined in S406 that the compression ratio is not less than 1, the image compression unit 206 stores the uncompressed tile held in the tile data area of the packet data for reference to the tile data at the time of non-compression in S401. The data is stored again (S411).

次に、画像圧縮部206は該当ページの全てのパケットデータの処理が完了したかどうかを判定する(S412)。該当ページの全てのパケットデータの処理が完了していないと判定された場合、画像圧縮部206は次のパケットデータの処理をS401から行う。   Next, the image compression unit 206 determines whether or not processing of all packet data of the corresponding page has been completed (S412). When it is determined that the processing of all the packet data of the corresponding page has not been completed, the image compression unit 206 performs the processing of the next packet data from S401.

S412で該当ページの全てのパケットデータの処理が完了したと判定された場合、画像圧縮部206における該当ページの圧縮処理が完了する。   If it is determined in S412 that the processing of all packet data of the corresponding page has been completed, the compression processing of the corresponding page in the image compression unit 206 is completed.

以上のような処理がスキャン画像処理部109により行われ、画像データがシステムバス114へ出力される。出力された画像データはRAM105に格納されることになる。   The processing as described above is performed by the scan image processing unit 109, and the image data is output to the system bus 114. The output image data is stored in the RAM 105.

次に本実施例における1ページに含まれるカラータイル数の算出を行う処理フローに関して、図9を用いて説明する。なお、この処理フローはCPU101により行われ、ページの画像データがスキャン画像処理部109から出力されてRAM105に一時的に格納されている状態で行われるものであるとする。   Next, a processing flow for calculating the number of color tiles included in one page in this embodiment will be described with reference to FIG. This processing flow is performed by the CPU 101, and is performed in a state where the image data of the page is output from the scan image processing unit 109 and temporarily stored in the RAM 105.

まず、CPU101はRAMに格納されたパケットデータのヘッダーデータに含まるサムネイル値の情報を取得する(S901)。前述したが、このサムネイル値は、タイルデータに含まれる1024画素の画素値(Y値、U値、V値)の平均値を算出することで求められた値である。次に、取得したサムネイル値を基に各ブロックがカラータイルか、モノクロタイルかを判定する(S902)。これは、各タイルの代表値となるサムネイル値を用いて、これがカラー画素なのかモノクロ画素なのかを、公知のカラーモノクロ判定技術によって判定する。すなわち、サムネイル値がカラー画素と判定されたタイルはカラータイル、サムネイル値がモノクロ画素と判定されたタイルはモノクロタイルとして判定する。ここで使用されるカラーモノクロ判定は、例えば、サムネイル値の色空間情報が1つの輝度情報(Y)と2つの色差情報(U及びV)から構成されるYUVを示しているのであれば、UとVの値がともに所定範囲内に収まっているかどうかを判定する。判定した際に、UとVの値が所定範囲内であればモノクロ画素、所定範囲外であればカラー画素とするような処理である。より具体的には例えば、UとVの値がともに110以上140以下であればサムネイル値はモノクロと判定される。なお、この場合、所定範囲は110以上140以下となるが、それ以外の範囲であっても構わない。   First, the CPU 101 acquires thumbnail value information included in the header data of the packet data stored in the RAM (S901). As described above, the thumbnail value is a value obtained by calculating the average value of the pixel values (Y value, U value, V value) of 1024 pixels included in the tile data. Next, it is determined whether each block is a color tile or a monochrome tile based on the acquired thumbnail value (S902). This is done by using a thumbnail value, which is a representative value of each tile, to determine whether this is a color pixel or a monochrome pixel by a known color / monochrome determination technique. That is, a tile whose thumbnail value is determined as a color pixel is determined as a color tile, and a tile whose thumbnail value is determined as a monochrome pixel is determined as a monochrome tile. The color / monochrome determination used here is, for example, if the color space information of the thumbnail value indicates YUV composed of one luminance information (Y) and two color difference information (U and V). And V are determined to be within a predetermined range. When the determination is made, the processing is such that if the values of U and V are within a predetermined range, it is a monochrome pixel, and if it is outside the predetermined range, it is a color pixel. More specifically, for example, if the values of U and V are both 110 and 140, the thumbnail value is determined to be monochrome. In this case, the predetermined range is 110 or more and 140 or less, but other ranges may be used.

次にS902でサムネイル値がカラーと判定された場合、CPU101は該当ページのカラータイル数のインクリメントを行う(S909)。一方、S902でサムネイル値がモノクロと判定された場合、CPU101はRAM105から該当パケットデータの圧縮フラグの取得を行う(S903)。圧縮フラグとは前述したようにパケットデータのヘッダーデータに格納されており、該当パケットデータのタイルデータが圧縮/非圧縮、さらに圧縮方式の識別が可能となる情報のことであり、本実施例では4ビットのコードを想定しているものとする。次にCPU101は取得した圧縮フラグを基に該当パケットデータのタイルデータの圧縮方式がJPEG−DCT方式であるかどうかの判定を行う(S904)。   Next, when it is determined in S902 that the thumbnail value is color, the CPU 101 increments the number of color tiles of the corresponding page (S909). On the other hand, when the thumbnail value is determined to be monochrome in S902, the CPU 101 acquires the compression flag of the corresponding packet data from the RAM 105 (S903). The compression flag is stored in the header data of the packet data as described above, and is information that enables the tile data of the packet data to be compressed / uncompressed and further identify the compression method. In this embodiment, Assume a 4-bit code. Next, the CPU 101 determines whether or not the tile data compression method of the packet data is the JPEG-DCT method based on the acquired compression flag (S904).

S904で圧縮方式がJPEG−DCT方式であると判定された場合、CPU101は図10を用いて後述する処理フローに従って、該当パケットデータのデータサイズ判定(S907における処理)時に用いるカラーサイズ判定用閾値の決定を行う。   If it is determined in step S904 that the compression method is the JPEG-DCT method, the CPU 101 determines the color size determination threshold value used when determining the data size of the packet data (processing in step S907) according to the processing flow described later with reference to FIG. Make a decision.

ここで図10を用いてカラーサイズ判定用閾値の決定のための処理フローについて説明する。まずCPU101はRAM105から該当パケットデータの量子化IDの取得を行う(S1001)。量子化IDとは前述したようにパケットデータのヘッダーデータに格納されており、タイルデータのJPEG−DCT方式による圧縮時に使用した量子化テーブルの識別が可能となるようにするための情報である。本実施例では前述したように、2ビットのフラグの情報である。次にCPU101は取得した量子化ID(2ビットのフラグ)が“00”であるかどうかの判定を行う(S1002)。量子化IDが“00”であると判定された場合、CPU101は、図8に示される予め作成されているカラーサイズ判定用閾値テーブルの1番目の要素に格納される閾値である「235」をカラーサイズ判定用閾値として決定する(S1003)。ここでカラーサイズ判定用閾値について詳細に説明する。カラーサイズ判定用閾値とは、画像圧縮部206で各パケットデータのタイルデータを圧縮する際に使用される量子化テーブルを用いて、特定のタイルデータを圧縮した場合のタイルデータサイズの値である。   Here, a processing flow for determining the color size determination threshold will be described with reference to FIG. First, the CPU 101 acquires the quantization ID of the corresponding packet data from the RAM 105 (S1001). The quantization ID is stored in the header data of the packet data as described above, and is information for enabling identification of the quantization table used when the tile data is compressed by the JPEG-DCT method. In this embodiment, as described above, it is 2-bit flag information. Next, the CPU 101 determines whether or not the acquired quantization ID (2-bit flag) is “00” (S1002). When it is determined that the quantization ID is “00”, the CPU 101 sets “235”, which is a threshold value stored in the first element of the color size determination threshold table created in advance shown in FIG. The threshold is determined as a color size determination threshold (S1003). Here, the color size determination threshold will be described in detail. The color size determination threshold is a value of tile data size when specific tile data is compressed using a quantization table used when the tile data of each packet data is compressed by the image compression unit 206. .

前述の特定のタイルデータとは、ブラック(R:0、G:0,B:0)画素とホワイト(R:255、G:255、B:255)画素の2つの画素が千鳥式に配置されたデータである。こうしたタイルデータは、モノクロのタイルデータとしては最もデータサイズが大きくなるデータとなっている。このタイルデータを画像圧縮部206でJPEG−DCT圧縮する際と同等のパラメータ(本実施例では量子化テーブルは図7に示されるもの)でJPEG−DCT圧縮した場合のデータサイズがカラータイルサイズ判定用閾値となり、図8に示される値である。単位はバイトである。なお、カラータイルサイズ判定閾値は必ずしもこのようにして決める必要はない。またYUV全てのデータのデータサイズ(Yのデータサイズ+Uのデータサイズ+Vのデータサイズ。)をカラータイルサイズ判定閾値と比較するのではなく、UVのデータのデータサイズ(Uのデータサイズ+Vのデータサイズ。)をカラータイルサイズ判定閾値と比較しても良い。こうした比較をする場合には、先ほど示した値よりももっと小さなカラータイルサイズ判定閾値が用いられるであろう。   The specific tile data mentioned above includes two pixels of black (R: 0, G: 0, B: 0) and white (R: 255, G: 255, B: 255) pixels arranged in a staggered manner. Data. Such tile data has the largest data size as monochrome tile data. The data size when the tile data is subjected to JPEG-DCT compression with the same parameters as those used when JPEG-DCT compression is performed by the image compression unit 206 (in this embodiment, the quantization table is shown in FIG. 7) is the color tile size determination. 8 is a value shown in FIG. The unit is byte. Note that the color tile size determination threshold does not necessarily have to be determined in this way. Also, the data size of all YUV data (Y data size + U data size + V data size) is not compared with the color tile size determination threshold, but the UV data data size (U data size + V data). Size)) may be compared with a color tile size determination threshold. In such a comparison, a color tile size determination threshold smaller than the value shown above will be used.

なお、JPEG−DCT圧縮した場合のタイルデータサイズには、JPEG規格で定められた各種マーカー等が含まれることになるため、当然、カラータイルサイズ判定用閾値は使用するシステムに合わせた値にすることが必要である。また、図8に示されるよう画像圧縮部206で使用される量子化テーブルの全てのケースで算出しておき、量子化IDと対応付けされるものである。なお、本実施例では画像圧縮部206で圧縮する際の色空間はYUVであるとしているが、圧縮する際の色空間が複数存在する場合には当然色空間毎にカラータイルサイズ判定用閾値を作成する必要がある。以上のように作成および構成されるものがカラーサイズ判定用閾値である。   Note that the tile data size in the case of JPEG-DCT compression includes various markers defined by the JPEG standard, and therefore, the color tile size determination threshold is naturally set to a value according to the system to be used. It is necessary. Also, as shown in FIG. 8, the calculation is made in all cases of the quantization table used by the image compression unit 206, and is associated with the quantization ID. In this embodiment, the color space when compressed by the image compression unit 206 is YUV. However, when there are a plurality of color spaces when compressed, the threshold value for determining the color tile size is naturally set for each color space. Need to create. What is created and configured as described above is a color size determination threshold.

一方、S1002で量子化IDが“00”ではないと判定された場合、CPU101は取得した量子化IDが“01”であるかどうかの判定を行う(S1004)。量子化IDが“01”であると判定された場合、CPU101は、カラーサイズ判定用閾値テーブルの2番目の要素に格納される閾値をカラーサイズ判定用閾値として決定する(S1005)。一方、量子化IDが“01”ではないと判定された場合、CPU101は取得した量子化IDが“10”であるかどうかの判定を行う(S1006)。量子化IDが“10”であると判定された場合、CPU101は、カラーサイズ判定用閾値テーブルの3番目の要素に格納される閾値を後述するカラーサイズ判定用閾値として決定する(S1007)。一方、量子化IDが“10”ではないと判定された場合、量子化IDは“11”であることが確定するため、CPU101はカラーサイズ判定用閾値テーブルの4番目の要素に格納されている閾値をカラーサイズ判定用閾値として決定する(S1008)。以上のようにして、S905における該当パケットデータのデータサイズ判定時に用いるカラーサイズ判定用閾値の決定を行う。ただし、本実施例では量子化テーブルの数を4個として記載しているが、これに限ることではない。   On the other hand, if it is determined in S1002 that the quantization ID is not “00”, the CPU 101 determines whether or not the acquired quantization ID is “01” (S1004). When it is determined that the quantization ID is “01”, the CPU 101 determines the threshold stored in the second element of the color size determination threshold table as the color size determination threshold (S1005). On the other hand, when it is determined that the quantization ID is not “01”, the CPU 101 determines whether or not the acquired quantization ID is “10” (S1006). When it is determined that the quantization ID is “10”, the CPU 101 determines a threshold stored in the third element of the color size determination threshold table as a color size determination threshold described later (S1007). On the other hand, when it is determined that the quantization ID is not “10”, since the quantization ID is determined to be “11”, the CPU 101 is stored in the fourth element of the color size determination threshold table. The threshold is determined as a color size determination threshold (S1008). As described above, the color size determination threshold value used in determining the data size of the corresponding packet data in S905 is determined. However, in this embodiment, the number of quantization tables is described as four, but this is not restrictive.

次にCPU101はRAM105から該当パケットデータのタイルデータサイズの取得を行う(S906)。そして、CPU101はタイルデータサイズがカラーサイズ判定用閾値以上であるかどうかの判定処理を行う(S907)。S907で該当パケットデータのタイルデータサイズがカラーサイズ判定用閾値以上であると判定された場合、CPU101は該当パケットデータに含まれるタイルはカラータイルと認識する。そして、CPU101は該当ページのカラータイル数のインクリメントを行う。これによって該当ページ内のカラータイル数をカウントするわけである(S909)。一方、S907で該当パケットデータのタイルデータサイズがカラーサイズ判定用閾値未満であると判定された場合、CPU101は該当パケットデータに含まれるタイルデータはモノクロタイルと認識する。そして、該当ページに含まれる全てのパケットデータの判定処理が行われたかどうかの判定を行う(S910)。   Next, the CPU 101 acquires the tile data size of the corresponding packet data from the RAM 105 (S906). Then, the CPU 101 determines whether the tile data size is equal to or larger than the color size determination threshold (S907). If it is determined in step S907 that the tile data size of the packet data is greater than or equal to the color size determination threshold, the CPU 101 recognizes the tile included in the packet data as a color tile. Then, the CPU 101 increments the number of color tiles of the corresponding page. Thus, the number of color tiles in the corresponding page is counted (S909). On the other hand, if it is determined in step S907 that the tile data size of the packet data is less than the color size determination threshold, the CPU 101 recognizes the tile data included in the packet data as a monochrome tile. Then, it is determined whether all packet data included in the corresponding page has been determined (S910).

一方、S904で圧縮方式がJPEG−DCT方式ではないと判定された場合、CPU101は圧縮フラグを基に更に該当パケットデータが非圧縮であるかどうかの判定を行う(S908)。S908で該当パケットデータが非圧縮であると判定された場合、CPU101は該当パケットデータに含まれるタイルはカラータイルであると認識し、該当ページのカラータイル数のインクリメントを行う(S909)。本実施例における画像形成装置では、画像圧縮部206で圧縮率が1以上の場合、前述した通り、パケットデータには非圧縮のタイルデータが格納される。このような場合、該当ページのデータのサイズは大きかったことと予想され、さらに大きかったのは当然、該当ページがカラーページだったからであると予想される。よって、S909の処理が行われることになる。なお、こうした場合、S902からS909までの処理をパケット毎に繰り返さずとも全パケットがカラーパケットであるものとして図9のフローチャートを抜けても良い。一方、S908で該当パケットデータが非圧縮ではないと判定された場合、CPU101は該当パケットデータに含まれるタイルはモノクロタイルであると認識し、該当ページに含まれる全てのパケットデータの判定処理が行われたかどうかの判定を行う(S910)。   On the other hand, if it is determined in S904 that the compression method is not the JPEG-DCT method, the CPU 101 further determines whether or not the corresponding packet data is uncompressed based on the compression flag (S908). When it is determined in S908 that the packet data is uncompressed, the CPU 101 recognizes that the tile included in the packet data is a color tile, and increments the number of color tiles of the page (S909). In the image forming apparatus according to the present exemplary embodiment, when the image compression unit 206 has a compression ratio of 1 or more, as described above, uncompressed tile data is stored in the packet data. In such a case, the size of the data of the corresponding page is expected to be large, and it is naturally expected that the size of the corresponding page was a color page. Therefore, the process of S909 is performed. In such a case, it is possible to leave the flowchart of FIG. 9 assuming that all the packets are color packets without repeating the processing from S902 to S909 for each packet. On the other hand, if it is determined in step S908 that the packet data is not uncompressed, the CPU 101 recognizes that the tile included in the packet data is a monochrome tile, and performs determination processing for all the packet data included in the page. It is determined whether or not it has been received (S910).

S910で該当ページに含まれる全てのパケットデータの判定処理が行われたと判定された場合、該当ページのカラータイル数の算出処理は終了する。S910で該当ページに含まれる全てのパケットデータの判定処理が行われていないと判定された場合、S901から次のパケットデータのカラーモノクロ判定処理が行われる。   If it is determined in S910 that the determination process for all the packet data included in the page has been performed, the calculation process of the number of color tiles for the page ends. If it is determined in S910 that the determination processing for all packet data included in the page has not been performed, the color / monochrome determination processing for the next packet data is performed from S901.

以上の処理から、CPU101は1ページに含まれるカラータイル数の算出を行い、該当ページのカラー画素割合の算出を行う。カラータイル数からカラー画素割合の算出は、例えば、1ページの全画素に対して、タイルに含まれる画素数とカラータイル数の積により算出される値の割合を出したものである。   From the above processing, the CPU 101 calculates the number of color tiles included in one page, and calculates the color pixel ratio of the corresponding page. The calculation of the color pixel ratio from the number of color tiles is, for example, to obtain a ratio of values calculated by the product of the number of pixels included in the tile and the number of color tiles with respect to all the pixels of one page.

なお、図9のフローチャートに付随して以下の処理を行うのも好ましい。即ち、CPU101は、算出したカラー画素割合に応じて、該当ページの印刷時に画像形成装置利用者に対して請求する料金の決定を行うようにするのも好ましい。例えば、カラー画素割合が第1の閾値(10%)以上の場合には該当ページの印刷は40円、第1の閾値未満第2の閾値(例えば、0.1%。)以上の場合には該当ページの印刷は20円、第2の閾値未満の場合には該当ページの印刷は10円というような構成としても良い。もちろん、第1の閾値は用いずに、第2の閾値以上の場合には40円、第2の閾値未満の場合には10円といたような二段階での料金決定を行ってもよい。もちろん、四段階以上での料金決定を行っても良いのは言うまでも無い。   In addition, it is also preferable to perform the following process accompanying the flowchart of FIG. That is, it is preferable that the CPU 101 determines a fee to be charged to the image forming apparatus user when printing the corresponding page according to the calculated color pixel ratio. For example, when the color pixel ratio is greater than or equal to the first threshold (10%), the corresponding page is printed at 40 yen, and when the percentage is less than the second threshold (for example, 0.1%) or greater The printing of the corresponding page may be 20 yen, and if it is less than the second threshold, the printing of the corresponding page may be 10 yen. Of course, the first threshold value may not be used, and the price may be determined in two stages, such as 40 yen when the threshold value is greater than or equal to the second threshold value and 10 yen when the threshold value is less than the second threshold value. Of course, it goes without saying that the price may be determined in four or more stages.

さらに、第2の閾値以上の場合(即ち、40円、20円の場合。カラー画像である場合。)には、プリント画像処理部108に対して、YUV画像データをCMYK画像データに変換するよう指令を行う。また、第2の閾値未満の場合(即ち、10円の場合。モノクロ画像である場合。)には、プリント画像処理部108に対して、YUV画像データをK単色の画像データに変換するよう指令を行う。といった指令をCPU101が別途行うのも好ましい。もちろん、その前提として、プリント画像処理部108には、YUV画像データ→CMYK画像データの色変換処理に用いる色変換パラメータと、YUV画像データ→K単色の画像データの色変換処理に用いる色変換パラメータが予め保存されているものとする。   Further, when the value is equal to or greater than the second threshold (that is, when the image is 40 yen or 20 yen, a color image), the print image processing unit 108 is configured to convert the YUV image data into CMYK image data. Make a command. In addition, if it is less than the second threshold (that is, 10 yen, a monochrome image), the print image processing unit 108 is instructed to convert the YUV image data into K single-color image data. I do. It is also preferable that the CPU 101 separately issues such a command. Of course, as a premise, the print image processing unit 108 includes a color conversion parameter used for color conversion processing of YUV image data → CMYK image data and a color conversion parameter used for color conversion processing of YUV image data → K single-color image data. Is pre-stored.

なお、本実施例のカラータイル数の算出処理はサムネイル値でのカラーモノクロ判定を先に行っているが、これを行わず、先に圧縮フラグ、タイルデータサイズでのカラーモノクロ判定だけを行ってもよい。   The calculation process of the number of color tiles according to the present embodiment performs the color / monochrome determination with the thumbnail value first, but does not perform this, but only performs the color / monochrome determination with the compression flag and the tile data size first. Also good.

以上、説明したように本実施例では1ページをタイルデータに分割し、各タイルデータのサムネイル値、各タイルデータの圧縮方式及びタイルデータサイズの情報を基に1ページに含まれるカラータイル数の算出を行うようにした。これにより、サムネイル値だけでカラーモノクロ判定を行っていた従来手法ではカラーと判定できなかったタイルを正しくカラータイルと判定することが可能となる。したがって、本実施例で説明した手法を用いることにより、更に高精度なカラータイル数の算出や、印刷時における画像形成装置利用者に対して請求する料金の正確性を保つことが可能となる。   As described above, in this embodiment, one page is divided into tile data, and the number of color tiles included in one page is determined based on the thumbnail value of each tile data, the compression method of each tile data, and information on the tile data size. Calculation was performed. This makes it possible to correctly determine a tile that could not be determined as a color by the conventional method in which the color / monochrome determination is performed using only the thumbnail value as a color tile. Therefore, by using the method described in the present embodiment, it is possible to calculate the number of color tiles with higher accuracy and to maintain the accuracy of the fee charged to the image forming apparatus user at the time of printing.

なお、上述の実施例では、JPEG−DCT圧縮の場合を例に説明を行ったが、画像を圧縮した際にカラー画像の方がモノクロ画像よりも圧縮効率が悪い(即ち、圧縮後の画像のデータサイズが大きい)圧縮形式は他にも存在する。例えば、JPEG2000圧縮やランレングス圧縮などである。従って、上記実施例におけるJPEG−DCT圧縮というのは、圧縮した際に「カラー画像の方がモノクロ顔図よりも圧縮効率が悪い」圧縮形式の一例としての説明であることを御理解頂きたい。   In the above-described embodiment, the case of JPEG-DCT compression has been described as an example. However, when the image is compressed, the color image has a lower compression efficiency than the monochrome image (that is, the compressed image is compressed). There are other compression formats (large data size). For example, JPEG2000 compression or run length compression. Therefore, it should be understood that the JPEG-DCT compression in the above-described embodiment is an example of a compression format in which a color image has a lower compression efficiency than a monochrome face image when compressed.

また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。   The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (13)

画像を圧縮する圧縮手段と、
圧縮後の画像のデータサイズ及び圧縮される前の前記画像の色差平均値とに基づいて、圧縮される前の前記画像がカラーであるかモノクロであるか判定する判定手段とを有することを特徴とする装置。
Compression means for compressing the image;
And determining means for determining whether the image before compression is color or monochrome based on the data size of the image after compression and the color difference average value of the image before compression. Equipment.
入力画像を複数のブロックに分割する分割手段をさらに有し、
圧縮される前の前記画像は、分割により得られた複数のブロックにおける1つのブロックであることを特徴とする請求項1に記載の装置。
Further comprising a dividing means for dividing the input image into a plurality of blocks;
The apparatus according to claim 1, wherein the image before being compressed is one block among a plurality of blocks obtained by division.
前記判定手段は、前記複数のブロックの一つ一つに対して前記判定を行うことを特徴とする請求項2に記載の装置。   The apparatus according to claim 2, wherein the determination unit performs the determination on each of the plurality of blocks. 前記複数のブロックの夫々に対する前記判定の結果、カラーと判定されたブロックの数が閾値以上である場合に、前記入力画像をカラー画像であると判定する手段をさらに有することを特徴とする請求項3に記載の装置。   The apparatus according to claim 1, further comprising means for determining that the input image is a color image when the number of blocks determined to be color is equal to or greater than a threshold value as a result of the determination for each of the plurality of blocks. 3. The apparatus according to 3. 前記圧縮後の画像のデータサイズとは、圧縮後の画像における色差のデータのサイズであることを特徴とする請求項1乃至4の何れか1項に記載の装置。   5. The apparatus according to claim 1, wherein the data size of the image after compression is a size of color difference data in the image after compression. 6. 前記判定手段は、圧縮される前の前記画像の色差平均値が所定の範囲内に収まる場合に、圧縮される前の前記画像をモノクロ画像であると判定し、
圧縮される前の前記画像の色差平均値が所定の範囲外である場合に、前記圧縮後の画像のデータサイズが閾値以上であるか判定し、
閾値以上であると判定した場合に、圧縮される前の前記画像をカラー画像であると判定し、
閾値未満であると判定した場合に、圧縮される前の前記画像をモノクロ画像であると判定することを特徴とする請求項1乃至5の何れか1項に記載の装置。
The determination unit determines that the image before being compressed is a monochrome image when the color difference average value of the image before being compressed is within a predetermined range;
When the color difference average value of the image before being compressed is outside a predetermined range, it is determined whether the data size of the image after the compression is a threshold value or more,
If it is determined that the image is equal to or greater than the threshold, the image before being compressed is determined to be a color image,
The apparatus according to claim 1, wherein when it is determined that the image is less than a threshold value, the image before being compressed is determined to be a monochrome image.
画像を圧縮する圧縮工程と、
圧縮後の画像のデータサイズ及び圧縮される前の前記画像の色差平均値とに基づいて、圧縮される前の前記画像がカラーであるかモノクロであるか判定する判定工程とを有することを特徴とする方法。
A compression process for compressing the image;
And determining whether the image before compression is color or monochrome based on the data size of the image after compression and the color difference average value of the image before compression. And how to.
入力画像を複数のブロックに分割する分割工程をさらに有し、
圧縮される前の前記画像は、分割により得られた複数のブロックにおける1つのブロックであることを特徴とする請求項7に記載の方法。
Further comprising a dividing step of dividing the input image into a plurality of blocks;
The method according to claim 7, wherein the image before being compressed is one block among a plurality of blocks obtained by division.
前記判定工程では、前記複数のブロックの一つ一つに対して前記判定を行うことを特徴とする請求項8に記載の方法。   The method according to claim 8, wherein in the determination step, the determination is performed for each of the plurality of blocks. 前記複数のブロックの夫々に対する前記判定の結果、カラーと判定されたブロックの数が閾値以上である場合に、前記入力画像をカラー画像であると判定する工程をさらに有することを特徴とする請求項9に記載の方法。   The step of determining that the input image is a color image when the number of blocks determined to be color as a result of the determination for each of the plurality of blocks is equal to or greater than a threshold value. 9. The method according to 9. 前記圧縮後の画像のデータサイズとは、圧縮後の画像における色差のデータのサイズであることを特徴とする請求項7乃至10の何れか1項に記載の方法。   The method according to claim 7, wherein the data size of the image after compression is a size of color difference data in the image after compression. 前記判定工程では、圧縮される前の前記画像の色差平均値が所定の範囲内に収まる場合に、圧縮される前の前記画像をモノクロ画像であると判定し、
前記画像の色差平均値が所定の範囲外である場合に、前記圧縮後の画像のデータサイズが閾値以上であるか判定し、
閾値以上であると判定した場合に、圧縮される前の前記画像をカラー画像であると判定し、
閾値未満であると判定した場合に、圧縮される前の前記画像をモノクロ画像であると判定することを特徴とする請求項7乃至11の何れか1項に記載の方法。
In the determination step, when the color difference average value of the image before being compressed is within a predetermined range, the image before being compressed is determined to be a monochrome image,
When the color difference average value of the image is outside a predetermined range, it is determined whether the data size of the image after compression is a threshold value or more,
If it is determined that the image is equal to or greater than the threshold, the image before being compressed is determined to be a color image,
The method according to claim 7, wherein when it is determined that the image is less than the threshold value, the image before being compressed is determined to be a monochrome image.
請求項12に記載の方法をコンピュータに実行させるためのコンピュータよみとり可能なプログラム。   A computer-readable program for causing a computer to execute the method according to claim 12.
JP2012250182A 2012-11-14 2012-11-14 Color/monochromatic determination Pending JP2014099742A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2012250182A JP2014099742A (en) 2012-11-14 2012-11-14 Color/monochromatic determination
US14/078,708 US9350883B2 (en) 2012-11-14 2013-11-13 Color/monochromatic determination

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012250182A JP2014099742A (en) 2012-11-14 2012-11-14 Color/monochromatic determination

Publications (1)

Publication Number Publication Date
JP2014099742A true JP2014099742A (en) 2014-05-29

Family

ID=50681748

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012250182A Pending JP2014099742A (en) 2012-11-14 2012-11-14 Color/monochromatic determination

Country Status (2)

Country Link
US (1) US9350883B2 (en)
JP (1) JP2014099742A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10284861B2 (en) 2016-12-09 2019-05-07 Advanced Micro Devices, Inc. Concurrent image compression and thumbnail generation

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5838455A (en) * 1919-05-11 1998-11-17 Minolta Co., Ltd. Image processor with image data compression capability
US5353132A (en) * 1989-02-06 1994-10-04 Canon Kabushiki Kaisha Image processing device
US5198898A (en) * 1990-10-10 1993-03-30 Fuji Xerox Co., Ltd. Data compressing system for compressing serial image data with color information
US5363218A (en) * 1990-11-26 1994-11-08 Konica Corporation Color estimation method for compressing color image data for image reproduction
JP3003261B2 (en) * 1991-05-14 2000-01-24 富士ゼロックス株式会社 Color image recognition device
JP3626966B2 (en) * 1996-03-28 2005-03-09 コニカミノルタビジネステクノロジーズ株式会社 Image processing device
US20060044576A1 (en) * 2004-07-30 2006-03-02 Kabushiki Kaisha Toshiba Apparatus for image processing
US7925083B2 (en) * 2007-07-09 2011-04-12 Eastman Kodak Company Method for digital image class detection
JP2012032668A (en) 2010-07-30 2012-02-16 Kyocera Mita Corp Image forming device, method for calculating usage amount of toner, and program for calculating usage amount of toner

Also Published As

Publication number Publication date
US20140133747A1 (en) 2014-05-15
US9350883B2 (en) 2016-05-24

Similar Documents

Publication Publication Date Title
US8849021B2 (en) Image processing apparatus, method, and storage medium for high speed compression processing
US8660347B2 (en) Image processing apparatus and processing method therefor
JP5052569B2 (en) Image compression apparatus, image compression method, image expansion apparatus, image expansion method, image forming apparatus, computer program, and recording medium
US7715637B2 (en) Image processing apparatus and control method therefor
US8553301B2 (en) Image processing apparatus, method, and program product to perform color-reduction processing for a block
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
CN101715038A (en) Image processing apparatus, compression method, and extension method
US8953220B2 (en) Image processing for rotation of compressed image data
JP2004336453A (en) Copying machine, image processing system, program and storage medium
US8406517B2 (en) Image processing apparatus and image processing method
EP2302896A2 (en) Data processing apparatus and data processing method for compressing image data
US8494261B2 (en) Image processing apparatus, image processing method, and computer-readable medium
JP2014099742A (en) Color/monochromatic determination
JP2004336487A (en) Facsimile apparatus, program and storage medium
JP5643578B2 (en) Image processing apparatus, image processing method, and program
CN101911692A (en) Method and apparatus for encoding and decoding halftone image
JP3997851B2 (en) Image coding apparatus and image coding program
JP5595142B2 (en) Image processing apparatus and image processing method
JP5606223B2 (en) Image processing apparatus and processing method thereof
JP2013121154A (en) Image processing device
US9854255B2 (en) Electronic apparatus, and method and computer-readable medium for the same
JP2012095227A (en) Image processing system, image processing method, and program
JP2008125020A (en) Image coding apparatus and control method thereof
JP2013085173A (en) Image processing device and control method therefor
JP2012054789A (en) Image processor, image processing method, and program