JP2009027385A - Image processor, its method and computer program - Google Patents

Image processor, its method and computer program Download PDF

Info

Publication number
JP2009027385A
JP2009027385A JP2007187600A JP2007187600A JP2009027385A JP 2009027385 A JP2009027385 A JP 2009027385A JP 2007187600 A JP2007187600 A JP 2007187600A JP 2007187600 A JP2007187600 A JP 2007187600A JP 2009027385 A JP2009027385 A JP 2009027385A
Authority
JP
Japan
Prior art keywords
image
correction
processing
area
image 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.)
Withdrawn
Application number
JP2007187600A
Other languages
Japanese (ja)
Inventor
Naoki Ito
直樹 伊藤
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 JP2007187600A priority Critical patent/JP2009027385A/en
Publication of JP2009027385A publication Critical patent/JP2009027385A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To correct images while suppressing the degradation of the images and to efficiently compress the images. <P>SOLUTION: When image data are inputted, a photograph image is specified from them. Then, for an image area which is the photograph image, the number of the pixels and a face area are recognized or the like and the feature amount of the image is obtained (S206, S207). Then, corresponding to the feature amount, image processing such as gray scale transformation and resolution conversion is performed (S1005, S1006). Finally, the entire image is compressed corresponding to the feature amount. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、画像処理装置とその制御方法およびコンピュータプログラムに関し、たとえば文書画像や図面などのデータに含まれるイメージの内容に基づいて適正な画像処理を行う画像処理装置とその方法およびコンピュータプログラムに関するものである。   The present invention relates to an image processing apparatus, a control method therefor, and a computer program. For example, the present invention relates to an image processing apparatus that performs appropriate image processing based on the contents of an image included in data such as document images and drawings, and a method thereof and a computer program. It is.

近年、デジタルカメラやイメージスキャナ等の普及により、写真画像のデジタル化が簡単に行えるようになった。特に、PC(パーソナルコンピュータ)にてデジタルデータとして写真調の画像を扱う機会が増え、アプリケーションにて画像ファイルの加工と編集を行うようになった。このような画像ファイルを文章や図面などにレイアウトして、ドキュメントを作成するようになっている。   In recent years, with the spread of digital cameras and image scanners, it has become easy to digitize photographic images. In particular, the opportunity to handle photographic images as digital data on a PC (personal computer) has increased, and image files have been processed and edited by applications. A document is created by laying out such an image file in a sentence or a drawing.

また、SCAN/COPY/PRINT/FAXなどの機能を有するデジタル複合機(MFP)などはPCに接続できる周辺装置となっている。この種のデジタル複合機をPCに接続し、デジタルカメラで撮影した画像ファイルをレイアウトした文章画像や図面などを印刷したり、送信したりする環境が整っている。   A digital multifunction peripheral (MFP) having functions such as SCAN / COPY / PRINT / FAX is a peripheral device that can be connected to a PC. This type of digital multi-function peripheral is connected to a PC, and an environment for printing and transmitting text images and drawings in which image files taken with a digital camera are laid out is prepared.

また、銀塩写真においては、印画紙へ画像を焼き付ける手法として、画像の中で注目される画像部分(例えば人物の顔)を対象にして、好ましい色を出すような工夫が行なわれている。   Further, in silver halide photography, as a technique for printing an image on photographic paper, a contrivance is made so as to produce a preferable color for an image portion (for example, a human face) of interest in the image.

また、デジタルカメラ等で撮影された画像データにおいては、メタデータと呼ばれる画像付属情報(抽出した画像部分の特徴情報や撮影条件等の属性情報)の内容が充実してきており、その利用方法も提案されてきている。その一つとして、付属情報をデータベースのキーとして利用するという技術がある(たとえば特許文献1等参照)。また、画像によっては、撮影された画像に合わせて好ましい調整を行うことがあり、この調整を人手で行うのは高い技術、経験が必要であったり、工数がかかりすぎたりと困難な場合が多い。そこで、自動あるいは、半自動でこれらの作業を行う方法も提案されてきている。その一つの利用方法として、画像から顔領域を抽出し、ソフトフォーカスという画像処理を施す技術が提案されている(たとえば特許文献2等参照)。   In addition, image data taken with a digital camera, etc. has been enriched in the content of image ancillary information called metadata (attribute information such as extracted image part feature information and shooting conditions). Has been. As one of the techniques, there is a technique of using attached information as a database key (for example, see Patent Document 1). In addition, depending on the image, there are cases where a preferable adjustment is made in accordance with the photographed image, and it is often difficult to perform this adjustment manually because it requires a high level of skill and experience or takes too many steps. . Therefore, a method of performing these operations automatically or semi-automatically has been proposed. As one of the utilization methods, a technique for extracting a face area from an image and performing image processing called soft focus has been proposed (see, for example, Patent Document 2).

また、PCからアプリケーションデータをデジタル複合機などに印刷する場合には、アプリケーションデータをいったん画像データとして展開する。その際に、画像中のオブジェクト(例えば、文字、イメージ、グラフィックスなど)を示す属性情報を抽出し、画像データと対応付けをして、その利用方法も提案されている。
特開2001−84274号公報 特開2007−65784号公報
In addition, when printing application data from a PC to a digital multifunction peripheral or the like, the application data is once expanded as image data. At that time, attribute information indicating objects (for example, characters, images, graphics, etc.) in the image is extracted, associated with the image data, and a method of using the same is also proposed.
JP 2001-84274 A JP 2007-65784 A

1枚の写真画像にはさまざまな輝度の被写体が写っている。そのため、写真画像から顔領域を抽出し、その顔を直視した際のコントラストを写真上で再現するために、顔領域を基準として画像全体に階調補正を施すと、顔領域以外の明部と暗部の階調がつぶれた写真になりやすかった。   A single photographic image contains subjects with various brightness levels. Therefore, if a face area is extracted from a photographic image and the contrast when the face is directly viewed is reproduced on the photograph, gradation correction is performed on the entire image based on the face area. It was easy to make a photo with dark gradation.

また、画像データを多重解像度変換して、分割した領域ごとに異なる画像補正量を適用する場合には、画像全体を多重解像度変換するために、処理時間や処理を行うためのメモリなどの記憶装置が必要となる。そのため処理時間、処理リソースともに大きくなってしまう。なお多重解像度変換とは、画像データにウエーブレット変換を施して得られた低周波成分に対して繰り返しウエーブレット変換を施す処理をいう。   In addition, when image data is subjected to multi-resolution conversion and different image correction amounts are applied to the divided areas, a storage device such as a processing time or a memory for performing the processing to perform multi-resolution conversion of the entire image Is required. For this reason, both processing time and processing resources become large. Multi-resolution conversion refers to processing for repeatedly performing wavelet conversion on low frequency components obtained by performing wavelet conversion on image data.

また、画像データに付随する画像付属情報を利用して画像補正を行う方法がある。その方法では、画像付属情報に含まれる所定の情報を利用して検出条件を決定し、その検出条件を満たす画像部分を画像データから検出して、検出された画像部分の属性値を利用して、その画像部分の画像データに補正などの処理を行う。その処理方法においては、撮影条件などが含まれた画像付属情報が必要である。そのため、撮影された画像データが編集された場合や、文書や図面などにレイアウトした場合などに画像付属情報が失われてしまうと、画像付随情報を用いた画像処理が困難になってしまう。   In addition, there is a method of performing image correction using image attached information accompanying image data. In the method, a detection condition is determined using predetermined information included in the image ancillary information, an image part satisfying the detection condition is detected from the image data, and an attribute value of the detected image part is used. Then, processing such as correction is performed on the image data of the image portion. In the processing method, image ancillary information including shooting conditions and the like is necessary. For this reason, if the image attached information is lost when the photographed image data is edited or laid out in a document or drawing, image processing using the image associated information becomes difficult.

また、PCからアプリケーションを使ってドキュメントや画像をデジタル複合機などの印刷装置で印刷する場合には、印刷装置が、印刷データを受信して印刷処理を行う過程で印刷データ内のオブジェクトに属性情報が付加される。そして、印刷装置により、その属性情報に応じてオブジェクト単位で異なる画像処理が施されていた。この場合、オブジェクトの種類に対して一意に画像処理の種類が決定されることや、アプリケーションからの情報を基にして属性情報が付加されることから、オブジェクトに必ずしも適切な属性情報が付加されるとは限らない。また、オブジェクトの種類にのみ依存して施される画像処理の種類も決まるために、常に当該オブジェクトに適した画像処理がされるとは限らなかった。そのため、印刷された画像は必ずしも高品質なものではなかった。   In addition, when printing a document or image with a printing apparatus such as a digital multi-function peripheral using an application from a PC, the printing apparatus receives attribute data and prints attribute information on the object in the print data. Is added. The printing apparatus performs different image processing for each object according to the attribute information. In this case, since the type of image processing is uniquely determined for the type of object and attribute information is added based on information from the application, appropriate attribute information is always added to the object. Not necessarily. In addition, since the type of image processing to be performed depends only on the type of object, image processing suitable for the object is not always performed. Therefore, the printed image is not always high quality.

さらに、画像処理のみならず、圧縮処理についても、画像データに対して適切な方法が選択されていないために、画像を劣化させることがあった。   Furthermore, not only image processing, but also compression processing, an appropriate method for image data has not been selected, and thus the image may be deteriorated.

本発明は上記従来例に鑑みて成されたもので、上記課題を解決することを目的とする。特に、オブジェクトの種類のみならず、その特徴に応じた画像処理方法および画像圧縮方法を選択することで、画質劣化を抑えた画像処理装置とその方法およびコンピュータプログラムを提供することを目的とする。   The present invention has been made in view of the above conventional example, and an object thereof is to solve the above problems. In particular, it is an object of the present invention to provide an image processing apparatus, a method thereof, and a computer program in which image quality deterioration is suppressed by selecting an image processing method and an image compression method in accordance with not only the type of object but also its characteristics.

上記課題を解決するために、本発明は以下の構成を備える。すなわち、画像データ中から、オブジェクトの種類が写真画像に分類される画像領域を特定する特定手段と、
前記特定手段により特定された画像領域の特徴量を計算する計算手段と、
前記画像領域の特徴量に応じた種類の画像補正処理を、前記画像データに施す画像補正手段と、
前記画像領域の特徴量に応じた種類の画像圧縮処理を、前記画像データに施す画像圧縮手段とを備える。
In order to solve the above problems, the present invention comprises the following arrangement. That is, a specifying means for specifying an image area in which the type of object is classified as a photographic image from the image data,
Calculating means for calculating the feature amount of the image area specified by the specifying means;
Image correction means for performing image correction processing of a type corresponding to the feature amount of the image area on the image data;
Image compression means for performing image compression processing of a type corresponding to the feature amount of the image area on the image data.

本発明によれば、画質劣化を抑えて画像処理及び画像圧縮を行うことができる。   According to the present invention, it is possible to perform image processing and image compression while suppressing image quality deterioration.

<概略>
本発明の実施形態を説明する前に、まず本実施形態に係る画像処理装置(実施形態ではたとえばMFPである。)の概略を示す。
<Outline>
Before describing an embodiment of the present invention, an outline of an image processing apparatus according to the present embodiment (for example, an MFP in the embodiment) will be described first.

この画像処理装置は、たとえば画像データをスキャナで読み取ってドット画像データとして入力する。あるいは、ページ記述言語(PDL)で記述されたり、電子文書として記述されたデータから生成されたドット画像データを入力する。なお、ドット画像データとは、RGBやYMCK等の色成分を持つ画素で構成された画像データであり、単に画像データやイメージデータと呼ぶこともある。PDLや電子文書から画像データを生成する際には、画像データと共に、画像データに含まれるオブジェクトの種類に対応した属性ビットマップデータを作成する。これは属性データ作成手段に相当する。属性にはたとえばオブジェクトの種類に対応して、文字属性、イメージ属性、グラフィック属性などが含まれる。イメージ属性とは、文字コードやベクタでの表現に適せず、もともとドット画像として生成された画像オブジェクトに対応する属性である。イメージ属性を持つ画像データを写真画像と呼び、その領域を画像領域と呼ぶ。もちろん写真画像はカメラで撮影された画像だけではなく、絵画など本質的にビットマップによる表現に適した画像を指す。本実施形態ではまた、画像に含まれるオブジェクトの内、ベクタや数式で表現できるベクタ画像と、文字コードで表現できる文字画像とを除いた画像を写真画像と呼ぶ。画像処理装置は、入力された画像データに含まれるオブジェクトの種類に対応した属性ビットマップデータが関連づけられているか判定する。これが判定手段に相当する。この際には属性ビットマップデータ自体の存在の有無を判定するとは限らない。   This image processing apparatus reads, for example, image data with a scanner and inputs it as dot image data. Alternatively, dot image data generated from data described in a page description language (PDL) or described as an electronic document is input. The dot image data is image data composed of pixels having color components such as RGB and YMCK, and may be simply referred to as image data or image data. When generating image data from PDL or an electronic document, attribute bitmap data corresponding to the type of object included in the image data is created together with the image data. This corresponds to attribute data creation means. The attributes include, for example, a character attribute, an image attribute, a graphic attribute, etc. corresponding to the type of object. The image attribute is an attribute corresponding to an image object that is not suitable for expression by a character code or a vector and is originally generated as a dot image. Image data having an image attribute is called a photographic image, and the area is called an image area. Of course, a photographic image is not only an image taken with a camera, but also an image that is essentially suitable for expression by a bitmap such as a picture. In the present embodiment, among the objects included in the image, an image excluding a vector image that can be expressed by a vector or a mathematical expression and a character image that can be expressed by a character code is called a photographic image. The image processing apparatus determines whether or not attribute bitmap data corresponding to the type of object included in the input image data is associated. This corresponds to determination means. At this time, it is not always determined whether or not the attribute bitmap data itself exists.

画像処理装置は、属性ビットマップデータが関連づけられていないと判定された画像データ、すなわちスキャナから入力された画像データについては、画像データに含まれるオブジェクトの種類に応じた領域に分類する。これが像域分離手段に相当する。そして、写真画像に分類された画像領域を特定し、そのサイズを決定する。これが特定手段に相当する。   The image processing apparatus classifies image data determined not to be associated with attribute bitmap data, that is, image data input from the scanner, into regions corresponding to the types of objects included in the image data. This corresponds to image area separation means. Then, an image area classified as a photographic image is specified and its size is determined. This corresponds to the specifying means.

一方、属性ビットマップデータが関連づけられていると判定された画像データすなわちPDL等から生成された画像データについては、写真画像に分類される画像領域を、属性ビットマップデータに基づいて特定する。これも特定手段による動作に相当する。   On the other hand, for image data determined to be associated with attribute bitmap data, that is, image data generated from PDL or the like, an image region classified as a photographic image is specified based on the attribute bitmap data. This also corresponds to the operation by the specifying means.

こうして画像データ中から、オブジェクトの種類が写真画像に分類される画像領域を特定すると、画像処理装置は特定された画像領域の特徴量を計算する。これが計算手段に相当する。そして、画像領域の特徴量に応じた種類の画像補正処理を、画像領域に施す。これが画像補正手段に相当する。また、画像領域の特徴量に応じた種類の画像圧縮処理を、画像データに施す。これが画像圧縮手段に相当する。   Thus, when an image area in which the object type is classified as a photographic image is specified from the image data, the image processing apparatus calculates the feature amount of the specified image area. This corresponds to calculation means. Then, an image correction process of a type corresponding to the feature amount of the image area is performed on the image area. This corresponds to image correction means. In addition, the image data is subjected to a type of image compression processing corresponding to the feature amount of the image area. This corresponds to image compression means.

なお、特徴量の計算においては、着目画像領域について顔領域の数およびサイズを前記特徴量として計算する。そして、顔領域の数およびサイズがそれぞれ一定値より大きい場合には、着目画像領域の解像度を落とす処理と、前記着目画像領域の高周波成分を除去する処理とのいずれか或いは両方を行う。   In the calculation of the feature amount, the number and size of the face regions are calculated as the feature amount with respect to the target image region. If the number and size of the face areas are larger than a certain value, either or both of the process of reducing the resolution of the target image area and the process of removing the high frequency component of the target image area are performed.

あるいは特徴量の計算においては、着目画像領域について、色成分ごとに色数を前記特徴量として計算する。そして、各色成分の色数の和が一定値よりも大きい場合には、前記着目画像領域の階調を低下させる処理を行う。   Alternatively, in the feature amount calculation, the number of colors for each color component is calculated as the feature amount for the image area of interest. When the sum of the number of colors of each color component is larger than a certain value, a process for reducing the gradation of the image area of interest is performed.

あるいは、特徴量の計算においては、着目画像領域について、色成分毎に輝度または濃度ごとの画素数の分散およびサイズを計算する。そして、計算した分散およびサイズがそれぞれ第1の一定値より大きい場合には、着目画像領域の解像度を落とす処理を行う。また、分散が第2の一定値以下の場合には、画像データに対して可逆圧縮処理を施し、分散が第2の一定値より大きい場合には、画像データに対して非可逆圧縮処理を施す。   Alternatively, in the calculation of the feature amount, the variance and size of the number of pixels for each luminance or density are calculated for each color component for the image area of interest. If the calculated variance and size are larger than the first constant value, a process for reducing the resolution of the image area of interest is performed. If the variance is less than or equal to the second constant value, the image data is subjected to a reversible compression process. If the variance is greater than the second constant value, the image data is subjected to an irreversible compression process. .

このようにして、画像データに含まれるオブジェクトの種類が写真画像であるような画像領域については、その特徴を分析した上でその画像に適した画像処理を施し、その画像に適した圧縮方法で圧縮する。次に詳しい実施形態を説明する。   In this way, for an image region in which the type of object included in the image data is a photographic image, after analyzing its characteristics, image processing suitable for the image is performed, and a compression method suitable for the image is used. Compress. Next, a detailed embodiment will be described.

[第1実施形態]
本実施形態の画像処理装置は、例えば、SCAN/COPY/PRINT/FAXなどの機能を有するデジタル複合機で実現できる。図1は、本実施形態の画像処理装置の概略ブロック図である。図1において、画像処理装置100は、スキャナ部101、コントローラ102、プリンタ部103、操作部104、メモリ105、プロセッサ109等で構成される。スキャナ部101では、原稿の読み取り処理を行う。コントローラ102は、スキャナ部101から読み取られた画像に画像処理を施しメモリ105に格納したり、その他の処理の制御を行ったりする。操作部104は、スキャナ部101で読み取った画像に対する各種の印刷条件を設定したり、ユーザからの各種指示を受けたりするためのユーザインタフェースである。プリンタ部103は、メモリ105から読み出された画像データを、操作部104で設定された印刷設定条件に従って記録用紙に印刷(画像形成)する。また、この画像処理装置は、ネットワーク106を介して、画像データを管理するサーバ107や、この画像処理装置に対してプリントの実行を指示するパソコン(PC)108等と接続されている。
[First Embodiment]
The image processing apparatus according to the present embodiment can be realized by, for example, a digital multifunction peripheral having a function such as SCAN / COPY / PRINT / FAX. FIG. 1 is a schematic block diagram of an image processing apparatus according to this embodiment. In FIG. 1, an image processing apparatus 100 includes a scanner unit 101, a controller 102, a printer unit 103, an operation unit 104, a memory 105, a processor 109, and the like. The scanner unit 101 performs a document reading process. The controller 102 performs image processing on the image read from the scanner unit 101 and stores it in the memory 105, or controls other processing. The operation unit 104 is a user interface for setting various printing conditions for an image read by the scanner unit 101 and receiving various instructions from the user. The printer unit 103 prints (image forms) the image data read from the memory 105 on a recording sheet in accordance with the print setting conditions set by the operation unit 104. The image processing apparatus is connected via a network 106 to a server 107 that manages image data, a personal computer (PC) 108 that instructs the image processing apparatus to execute printing, and the like.

図2は、本発明の処理フローの概略を説明するものである。図2の手順は、コントローラ102,特にプロセッサ109で、図2に即した手順のプログラムを実行することで実現される。   FIG. 2 explains the outline of the processing flow of the present invention. The procedure shown in FIG. 2 is realized by the controller 102, in particular, the processor 109, executing a program corresponding to the procedure shown in FIG.

ステップS201(画像入力処理)では、スキャナ部101で原稿を読み取って生成された画像データや、他の装置からネットワークを介して送信されてきた画像データが画像処理装置100に入力される。また、PCなどからアプリケーションを印刷命令したページ記述言語をレンダリングしてビットマップ化した画像データや画像のオブジェクトごとに付加された属性情報データも画像処理装置100に入力される。   In step S <b> 201 (image input processing), image data generated by reading a document with the scanner unit 101 and image data transmitted from another apparatus via a network are input to the image processing apparatus 100. Further, image data rendered by rendering a page description language in which an application is instructed to print from a PC or the like, and attribute information data added to each object of the image are also input to the image processing apparatus 100.

ステップS202では、スキャナ部から入力された画像データなのか、ページ記述言語をレンダリングした画像データなのかを分ける制御を行う。そのためには、たとえば画像データファイルにそれらを区別するための識別子を、入力時に付与しておけばよい。あるいは属性情報の関連づけの有無によって判定することもできる。   In step S202, control is performed to determine whether the image data is input from the scanner unit or the image data in which the page description language is rendered. For this purpose, for example, an identifier for distinguishing them may be given to the image data file at the time of input. Alternatively, the determination can be made based on whether or not the attribute information is associated.

入力された画像データがページ記述言語から生成されたものであった場合には、ステップS203へ進み、画像データの大きさ(画素数)を特定する。なお、画像データにそのサイズが付加されている場合には、大きさを測定する必要はない。すなわちこの場合にはS203ではなにもしない。しかしたとえば画素とそのアドレスとが対応づけられた形式の画像データであれば、画素に関連づけられたアドレスを参照して、1行の画素の長さと1列の画素の長さとを計算する。   If the input image data is generated from the page description language, the process proceeds to step S203, and the size (number of pixels) of the image data is specified. When the size is added to the image data, it is not necessary to measure the size. That is, in this case, nothing is done in S203. However, for example, in the case of image data in a format in which pixels and their addresses are associated with each other, the length of pixels in one row and the length of pixels in one column are calculated with reference to the addresses associated with the pixels.

ステップS204は、画像に付加された属性情報(すなわち属性ビットマップデータ)を参照する。そして、画像データのどの領域がどの属性に関連づけられているか判定しながら属性情報を走査し、画像領域を検索する。例えば、文字の領域、イメージの領域(イメージ領域あるいは画像領域と呼ぶ)、グラフィックスの領域などを判別しつつ検索する。ただ本実施形態では画像領域以外は参照していないので、画像領域のみを検索すれば十分である。図4に入力画像データに対して、ページ記述言語をレンダリングした際に得られる属性情報の一例を示す。図4は、画像データ400に関連づけられた属性ビットマップデータ(属性情報)410を示す。画像データ400は、イメージオブジェクト(すなわち写真画像オブジェクト)、文字オブジェクト、グラフィクスオブジェクトに3種の領域に分離され、領域毎に対応する属性情報が関連づけられる。関連づけは画素毎に成されており、属性ビットマップデータは、画像データ400の画素毎のオブジェクトの種類を示す情報となっている。したがって、属性ビットマップデータをラスタ走査してオブジェクトの種類が写真画像である場合には、そのデータに対応する画像データ400中の画素は写真画像を構成すると判断できる。写真画像を構成する画素の集まりがイメージ領域(あるいは画像領域)である。   In step S204, the attribute information (that is, attribute bitmap data) added to the image is referred to. Then, the attribute information is scanned while determining which area of the image data is associated with which attribute, and the image area is searched. For example, a search is performed while determining a character area, an image area (referred to as an image area or an image area), a graphics area, and the like. However, since only the image area is not referred to in the present embodiment, it is sufficient to search only the image area. FIG. 4 shows an example of attribute information obtained when a page description language is rendered for input image data. FIG. 4 shows attribute bitmap data (attribute information) 410 associated with the image data 400. The image data 400 is divided into an image object (that is, a photographic image object), a character object, and a graphics object into three types of regions, and corresponding attribute information is associated with each region. The association is made for each pixel, and the attribute bitmap data is information indicating the type of object for each pixel of the image data 400. Therefore, when the attribute bitmap data is raster scanned and the object type is a photographic image, it can be determined that the pixels in the image data 400 corresponding to the data constitute a photographic image. A collection of pixels constituting a photographic image is an image region (or image region).

ステップS205では、イメージ領域の検索の結果、イメージ領域が見つかったか否かを判断する処理を行う。この判定の結果イメージ領域とそうでない領域に関して、次の処理を切り変える制御を行っている。   In step S205, processing is performed to determine whether an image area has been found as a result of the search of the image area. As a result of this determination, control is performed to switch the next process for the image area and the other area.

イメージ領域があった場合には、ステップS206へ進み、イメージ領域に属する画素数を計測する。これは、イメージ領域の大きさを計測するための処理である。なおステップS206からS209は、イメージ領域が複数あった場合には、各イメージ領域に着目しつつ全イメージ領域を対象として実行される。   If there is an image area, the process proceeds to step S206, and the number of pixels belonging to the image area is measured. This is a process for measuring the size of the image area. Steps S206 to S209 are executed for all image areas while paying attention to each image area when there are a plurality of image areas.

ステップS207では、画像認識処理を行う。ここでの認識処理とは、この後説明する所定の各種特徴量を算出するための処理である。ここでは、人物の顔を含む顔領域の認識及び、色数や色成分毎の画素の分散などが算出される。また、画像データの色分布情報から撮影されたときの光源を推測する処理や、明るさの分布情報から逆光や順光などの状態を推測する処理をおこなうこともできる。   In step S207, image recognition processing is performed. Here, the recognition process is a process for calculating predetermined various feature amounts described later. Here, the recognition of the face area including the face of the person and the variance of the pixels for each color number and color component are calculated. It is also possible to perform processing for estimating the light source when the image is taken from the color distribution information of the image data, and processing for estimating the state of backlight or direct light from the brightness distribution information.

人物の顔の認識としては、ニューロン動機づけによるダイナミックリンク照合や、3次元顔認識や、皮膚に着目するものや、隠れマルコフモデルを使ったものなど、いくつか提案されている。ここで必要となる顔認識は、人物を特定する処理は必要ではないため、顔領域を認識するアルゴリズムを適用する。例えば、あらかじめ用意した顔のテンプレート画像を画像データ上で様々な位置、大きさと回転角度で重ねてマッチングを行うことで顔領域を抽出する方法などが提案されている。ポートレート、集合写真、風景、夜景などのシーンの違いや、逆光や順光などの違いが、認識処理によって画像の特徴として現れる。   Several proposals have been made for human face recognition, such as dynamic link matching using neuron motivation, three-dimensional face recognition, focusing on skin, and using a hidden Markov model. The face recognition required here does not require a process for specifying a person, and therefore an algorithm for recognizing a face area is applied. For example, a method has been proposed in which a face area is extracted by performing matching by superimposing face template images prepared in advance at various positions, sizes, and rotation angles on image data. Differences in scenes such as portraits, group photos, landscapes, and night scenes, as well as differences in backlight and direct light, etc. appear as image features by the recognition process.

色数の計測に関しては、色成分ごとに輝度のヒストグラムを作成して、いくつの色数が出現しているのかを示す出現頻度を計測する。そのヒストグラムを求めたデータから、各色成分ごとの色の分散値を算出する。本例では、画像データに含まれるイメージ領域のサイズと顔領域の数を第1の、色数を第2の、イメージ領域のサイズと色成分毎の画素数の分散を第3の特徴量として算出している。   Regarding the measurement of the number of colors, a luminance histogram is created for each color component, and the appearance frequency indicating how many colors appear is measured. A color dispersion value for each color component is calculated from the data obtained from the histogram. In this example, the size of the image area and the number of face areas included in the image data are the first, the number of colors is the second, and the distribution of the image area size and the number of pixels for each color component is the third feature amount. Calculated.

ステップS208の認識結果解析処理は、ステップS207で得られた画像認識処理結果から、画像の特徴や性質を解析する処理である。ステップS207の顔領域認識処理の結果に基づき、着目するイメージ領域で検出された顔領域の数と、各顔領域の大きさ(画素数)とが数えられる。また着目イメージ領域の画素数(サイズ)との顔領域の数とに基づいて、画像補正処理及び画像圧縮処理を切り替えるための制御情報を作成する。すなわち、着目イメージ領域の画素数(サイズ)との顔領域の数とを、所定の閾値と比較して、比較結果に応じた制御情報を作成する。   The recognition result analysis process in step S208 is a process for analyzing the characteristics and properties of the image from the image recognition process result obtained in step S207. Based on the result of the face area recognition processing in step S207, the number of face areas detected in the image area of interest and the size (number of pixels) of each face area are counted. Also, control information for switching between the image correction process and the image compression process is created based on the number of pixels (size) of the target image area and the number of face areas. In other words, the number of pixels (size) of the image area of interest and the number of face areas are compared with a predetermined threshold value, and control information corresponding to the comparison result is created.

例えば、イメージの面積が250000ピクセルで、抽出された顔領域の数が1つで、顔抽出された画素数が8000ピクセルであった場合を考える。この場合には、閾値と大小関係に応じて画像補正処理及び画像圧縮処理を切り替える制御情報がセットされる。これらの制御情報をセットする方法としては、イメージ領域の大きさと顔領域の画素数と顔領域の数とを制御情報に対応づけるテーブルを作成しておき、テーブルを参照して、画像補正処理及び画像圧縮処理の切り替えのための制御情報を作成する。この方法に関しては、詳細に後述する。また、色数や分散値についても得られた数値からテーブルを使って、画像補正処理及び画像圧縮処理を切り替える情報を作成する。この方法に関しても、図10等の説明において詳細に説明する。   For example, consider a case where the image area is 250,000 pixels, the number of extracted face regions is one, and the number of face extracted pixels is 8000 pixels. In this case, control information for switching image correction processing and image compression processing is set according to the threshold value and the magnitude relationship. As a method of setting these control information, a table that associates the size of the image area, the number of pixels of the face area, and the number of face areas with the control information is created, and image correction processing and Create control information for switching image compression processing. This method will be described later in detail. Also, information for switching between image correction processing and image compression processing is created using a table from the obtained numerical values for the number of colors and the dispersion value. This method will also be described in detail in the description of FIG.

ステップS209の画像補正処理では、周知の解像度変換処理、周知の色調補正、周知の彩度補正、周知の尖鋭性補正等を行うことが可能である。また、画像補正処理として、Exif補正で行なわれている、画像の明るさやホワイトバランスなどを補正する処理を適用することもできる。Exifとは、画像データ以外に表示用画像、撮影日等のExis情報を付加した画像ファイルの規格名である。Exif補正では、Exif情報を参照して行う補正処理である。また、コントラスト、肌色再現、有彩色の彩度アップなどを補正する処理も適用可能であり、画像を強調または平坦にする処理を適用可能とする。なお、これらの補正処理は、ステップS208の認識結果解析処理によって切り替わるものであり、その制御によっては、これらの補正処理自体を行わない場合もある。   In the image correction process in step S209, a known resolution conversion process, a known color correction, a known saturation correction, a known sharpness correction, and the like can be performed. Further, as image correction processing, processing for correcting image brightness, white balance, and the like, which is performed by Exif correction, can be applied. Exif is a standard name of an image file in which Exis information such as a display image and a shooting date is added in addition to image data. Exif correction is correction processing performed with reference to Exif information. In addition, it is possible to apply processing for correcting contrast, skin color reproduction, saturation of chromatic colors, etc., and to apply processing for enhancing or flattening an image. Note that these correction processes are switched by the recognition result analysis process in step S208, and depending on the control, these correction processes themselves may not be performed.

ステップS210の圧縮処理は、画像データを圧縮処理する処理部であり、周知の非可逆符号化方式のひとつであるJPEGや、可逆符号化方式のひとつである周知のJPEG−LSを実行できる。ステップS208の画像認識結果解析の情報により、可逆符号化するか、非可逆符号化するか、非可逆符号化の量子化パラメータが設定される。すなわち、非可逆圧縮では画像の高周波成分が失われるので、高周波成分の少ない画像は量子化ステップの大きな非可逆符号化が利用できる。また、高周波成分の多い画像は、劣化防止のために可逆圧縮することが望ましい。これらの中間にある画像は、量子化ステップの小さな非可逆符号化が適用される。もちろん量子化ステップを、画像の特徴量に応じて3段階以上に切り替えることもできる。圧縮処理がどのように切り替わるかに関しては、詳細に後述する。   The compression processing in step S210 is a processing unit that compresses image data, and can execute JPEG, which is one of known lossy encoding methods, and known JPEG-LS, which is one of lossless encoding methods. Depending on the image recognition result analysis information in step S208, lossless encoding, lossy encoding, or lossy encoding quantization parameters are set. In other words, since the high frequency component of the image is lost in the lossy compression, the lossy encoding with a large quantization step can be used for an image with a small amount of high frequency component. In addition, it is desirable to reversibly compress an image with many high frequency components in order to prevent deterioration. For these intermediate images, lossy encoding with a small quantization step is applied. Of course, the quantization step can be switched to three or more stages according to the feature amount of the image. How the compression process is switched will be described later in detail.

ステップS211では、圧縮された画像データを保存する場合には、所定の記憶装置に記憶する。印刷命令であった場合には、圧縮されている画像データを伸張して、プリンタ用の画像処理(色変換や、画像形成処理)を行って、プリンタエンジンで印刷を行う。   In step S211, when the compressed image data is to be saved, it is stored in a predetermined storage device. If it is a print command, the compressed image data is expanded, image processing for the printer (color conversion and image formation processing) is performed, and printing is performed by the printer engine.

一方、ステップS202において、スキャン画像だと判断された場合には、ステップS213へ進む。ここで画像データの大きさ(画素数)を特定する。なお、この処理に関しては、前述したステップS203の出力画像サイズ認識と同じ処理であるであり、ここでは、ステップS203とステップS213を分けて書いてあるが、同じ処理で兼ねることも可能である。   On the other hand, if it is determined in step S202 that the image is a scanned image, the process proceeds to step S213. Here, the size (number of pixels) of the image data is specified. This process is the same as the output image size recognition in step S203 described above. Here, step S203 and step S213 are written separately, but the same process can also be used.

ステップS214像域分離(領域分割・属性識別処理)では、2値画像に基づいて公知の領域分割処理と属性識別処理を行う。ここでは、入力された2値画像データを、文字/図/線/表などの属性ごとの領域(ブロック形状の領域)を識別し、各領域に対して属性情報を付与する。   In step S214 image area separation (area division / attribute identification process), a known area division process and attribute identification process are performed based on the binary image. Here, areas (block-shaped areas) for each attribute such as characters / diagrams / lines / tables are identified from the input binary image data, and attribute information is given to each area.

例えば、次のような処理を用いて領域分割・属性識別処理とを行うことができる。まず、2値化処理で得られた2値画像より、黒画素の輪郭線追跡を行って黒画素輪郭で囲まれる画素の塊を抽出することによって領域分割する。更に、面積の大きい黒画素の塊については、内部にある白画素に対しても白画素の輪郭線追跡を行い、白画素の塊を抽出し、更に一定面積以上の白画素の塊の内部からは再帰的に黒画素の塊を抽出していく。このようにして得られた黒画素の塊を、大きさ及び形状で分類し、異なる属性を持つ領域へ分類していく。例えば、縦横比が1に近く、大きさが所定の範囲のものを文字相当の画素塊とする。そして、文字相当の画素塊同士が近接し且つ整列している場合はグループ化を行って、文字行を定め、更に所定の距離内にある同様の形状の文字行同士をグループ化して文字領域として判別する。また、扁平な画素塊を線領域とする。また、一定の大きさ以上で、かつ四角系の白画素塊を整列よく内包する黒画素塊の占める範囲を表領域とする。また、不定形の画素塊が散在している領域を写真領域とする。それ以外の形状の画素塊を図画領域などとして判別する。図3に、入力画像に対して、ステップS214の像域分離を行った一例を示す。文字画像311,313、ベクタ画像312,314、写真画像313という領域に分離されている。この分離結果に従って、図4に示したのと同じ属性ビットマップデータが作成される。ベクタ画像にはグラフィック属性が、文字画像には文字属性が、写真画像にはイメージ属性が与えられる。   For example, region division / attribute identification processing can be performed using the following processing. First, from the binary image obtained by the binarization processing, the contour of the black pixel is traced to extract a block of pixels surrounded by the black pixel contour, thereby dividing the region. Furthermore, for a black pixel block with a large area, the white pixel outline is also traced for the white pixels inside, and a white pixel block is extracted. Recursively extracts black pixel blocks. The black pixel blocks thus obtained are classified by size and shape, and are classified into regions having different attributes. For example, a pixel block corresponding to a character having an aspect ratio close to 1 and a predetermined size range is used. Then, when pixel blocks corresponding to characters are close and aligned, grouping is performed to define character lines, and character lines having similar shapes within a predetermined distance are further grouped as character regions. Determine. A flat pixel block is defined as a line region. Further, a range occupied by a black pixel block having a certain size or more and including a square white pixel block in a well-aligned manner is defined as a surface area. Also, a region where irregular pixel clusters are scattered is defined as a photographic region. A pixel block having a shape other than that is determined as a drawing area or the like. FIG. 3 shows an example in which the image area separation in step S214 is performed on the input image. The images are separated into character images 311 and 313, vector images 312 and 314, and a photographic image 313. According to this separation result, the same attribute bitmap data as shown in FIG. 4 is created. Vector images are given graphic attributes, character images are given character attributes, and photographic images are given image attributes.

またステップS214では、領域分離して特定された画像領域を検索する。   In step S214, an image area specified by area separation is searched.

ステップS215では、イメージ領域の検索の結果、イメージ領域が見つかったか否かを判断する処理を行う。この判定の結果イメージ領域とそうでない領域に関して、次の処理を切り変える制御を行っている。   In step S215, it is determined whether or not an image area has been found as a result of the search of the image area. As a result of this determination, control is performed to switch the next process for the image area and the other area.

イメージ領域があった場合には、ステップS216へ進み、イメージ領域に属する画素数を計測する。これは、イメージ領域の大きさを計測するための処理である。なおステップS216からS219は、イメージ領域が複数あった場合には、各イメージ領域に着目しつつ全イメージ領域を対象として実行される。   If there is an image area, the process proceeds to step S216, and the number of pixels belonging to the image area is measured. This is a process for measuring the size of the image area. Steps S216 to S219 are executed for all image areas while paying attention to each image area when there are a plurality of image areas.

ステップS217では、画像認識処理を行う。ここでの認識処理とは、この後説明する所定の各種特徴量を算出するための処理である。ここでは、人物の顔を含む顔領域の認識及び、色数や色成分毎の画素の分散などが算出される。また、画像データの色分布情報から撮影されたときの光源を推測する処理や、明るさの分布情報から逆光や順光などの状態を推測する処理をおこなうこともできる。   In step S217, image recognition processing is performed. Here, the recognition process is a process for calculating predetermined various feature amounts described later. Here, the recognition of the face area including the face of the person and the variance of the pixels for each color number and color component are calculated. It is also possible to perform processing for estimating the light source when the image is taken from the color distribution information of the image data, and processing for estimating the state of backlight or direct light from the brightness distribution information.

人物の顔の認識としては、ニューロン動機づけによるダイナミックリンク照合や、3次元顔認識や、皮膚に着目するものや、隠れマルコフモデルを使ったものなど、いくつか提案されている。ここで必要となる顔認識は、人物を特定する処理は必要ではないため、顔領域を認識するアルゴリズムを適用する。例えば、あらかじめ用意した顔のテンプレート画像を画像データ上で様々な位置、大きさと回転角度で重ねてマッチングを行うことで顔領域を抽出する方法などが提案されている。ポートレート、集合写真、風景、夜景などのシーンの違いや、逆光や順光などの違いが、認識処理によって画像の特徴として現れる。   Several proposals have been made for human face recognition, such as dynamic link matching using neuron motivation, three-dimensional face recognition, focusing on skin, and using a hidden Markov model. The face recognition required here does not require a process for specifying a person, and therefore an algorithm for recognizing a face area is applied. For example, a method has been proposed in which a face area is extracted by performing matching by superimposing face template images prepared in advance at various positions, sizes, and rotation angles on image data. Differences in scenes such as portraits, group photos, landscapes, and night scenes, as well as differences in backlight and direct light, etc. appear as image features by the recognition process.

色数の計測に関しては、色成分ごとに輝度のヒストグラムを作成して、いくつの色数が出現しているのかを示す出現頻度を計測する。そのヒストグラムを求めたデータから、各色成分ごとの色の分散値を算出する。本例では、画像データに含まれるイメージ領域のサイズと顔領域の数を第1の、色数を第2の、イメージ領域のサイズと色成分毎の画素数の分散を第3の特徴量として算出している。   Regarding the measurement of the number of colors, a luminance histogram is created for each color component, and the appearance frequency indicating how many colors appear is measured. A color dispersion value for each color component is calculated from the data obtained from the histogram. In this example, the size of the image area and the number of face areas included in the image data are the first, the number of colors is the second, and the distribution of the image area size and the number of pixels for each color component is the third feature amount. Calculated.

ステップS218の認識結果解析処理は、ステップS217で得られた画像認識処理結果から、画像の特徴や性質を解析する処理である。ステップS217の顔領域認識処理の結果に基づき、着目するイメージ領域で検出された顔領域の数と、各顔領域の大きさ(画素数)とが数えられる。また着目イメージ領域の画素数(サイズ)との顔領域の数とに基づいて、画像補正処理及び画像圧縮処理を切り替えるための制御情報を作成する。すなわち、着目イメージ領域の画素数(サイズ)との顔領域の数とを、所定の閾値と比較して、比較結果に応じた制御情報を作成する。   The recognition result analysis processing in step S218 is processing for analyzing the characteristics and properties of the image from the image recognition processing result obtained in step S217. Based on the result of the face area recognition process in step S217, the number of face areas detected in the image area of interest and the size (number of pixels) of each face area are counted. Control information for switching between image correction processing and image compression processing is created based on the number of pixels (size) of the target image region and the number of face regions. That is, the number of pixels (size) of the image area of interest and the number of face areas are compared with a predetermined threshold value, and control information corresponding to the comparison result is created.

例えば、イメージの面積が250000ピクセルで、抽出された顔領域の数が1つで、顔抽出された画素数が8000ピクセルであった場合を考える。この場合には、閾値と大小関係に応じて画像補正処理及び画像圧縮処理を切り替える制御情報がセットされる。これらの制御情報をセットする方法としては、イメージ領域の大きさと顔領域の画素数と顔領域の数とを制御情報に対応づけるテーブルを作成しておき、テーブルを参照して、画像補正処理及び画像圧縮処理の切り替えのための制御情報を作成する。この方法に関しては、詳細に後述する。また、色数や分散値についても得られた数値からテーブルを使って、画像補正処理及び画像圧縮処理を切り替える情報を作成する。この方法に関しても、図10等の説明において詳細に説明する。   For example, consider a case where the image area is 250,000 pixels, the number of extracted face regions is one, and the number of face extracted pixels is 8000 pixels. In this case, control information for switching image correction processing and image compression processing is set according to the threshold value and the magnitude relationship. As a method of setting these control information, a table that associates the size of the image area, the number of pixels of the face area, and the number of face areas with the control information is created, and image correction processing and Create control information for switching image compression processing. This method will be described later in detail. Also, information for switching between image correction processing and image compression processing is created using a table from the obtained numerical values for the number of colors and the dispersion value. This method will also be described in detail in the description of FIG.

ステップS219の画像補正処理では、周知の解像度変換処理、周知の色調補正、周知の彩度補正、周知の尖鋭性補正等を行うことが可能である。また、画像補正処理として、Exif補正で行なわれている、画像の明るさやホワイトバランスなどを補正する処理を適用することもできる。Exifとは、画像データ以外に表示用画像、撮影日等のExis情報を付加した画像ファイルの規格名である。Exif補正では、Exif情報を参照して行う補正処理である。また、コントラスト、肌色再現、有彩色の彩度アップなどを補正する処理も適用可能であり、画像を強調または平坦にする処理を適用可能とする。なお、これらの補正処理は、ステップS218の認識結果解析処理によって切り替わるものであり、その制御によっては、これらの補正処理自体を行わない場合もある。   In the image correction process in step S219, a known resolution conversion process, a known color tone correction, a known saturation correction, a known sharpness correction, and the like can be performed. Further, as image correction processing, processing for correcting image brightness, white balance, and the like, which is performed by Exif correction, can be applied. Exif is a standard name of an image file in which Exis information such as a display image and a shooting date is added in addition to image data. Exif correction is correction processing performed with reference to Exif information. In addition, it is possible to apply processing for correcting contrast, skin color reproduction, saturation of chromatic colors, etc., and to apply processing for enhancing or flattening an image. Note that these correction processes are switched by the recognition result analysis process in step S218, and depending on the control, these correction processes themselves may not be performed.

ステップS220の圧縮処理は、画像データを圧縮処理する処理部であり、周知の非可逆符号化方式のひとつであるJPEGや、可逆符号化方式のひとつである周知のJPEG−LSを実行できる。ステップS218の画像認識結果解析の情報により、可逆符号化するか、非可逆符号化するか、非可逆符号化の量子化パラメータが設定される。すなわち、非可逆圧縮では画像の高周波成分が失われるので、高周波成分の少ない画像は量子化ステップの大きな非可逆符号化が利用できる。また、高周波成分の多い画像は、劣化防止のために可逆圧縮することが望ましい。これらの中間にある画像は、量子化ステップの小さな非可逆符号化が適用される。もちろん量子化ステップを、画像の特徴量に応じて3段階以上に切り替えることもできる。圧縮処理がどのように切り替わるかに関しては、詳細に後述する。   The compression processing in step S220 is a processing unit that compresses image data, and can execute JPEG, which is one of known lossy encoding methods, and known JPEG-LS, which is one of lossless encoding methods. Depending on the image recognition result analysis information in step S218, lossless encoding, lossy encoding, or lossy encoding quantization parameters are set. In other words, since the high frequency component of the image is lost in the lossy compression, the lossy encoding with a large quantization step can be used for an image with a small amount of high frequency component. In addition, it is desirable to reversibly compress an image with many high frequency components in order to prevent deterioration. For these intermediate images, lossy encoding with a small quantization step is applied. Of course, the quantization step can be switched to three or more stages according to the feature amount of the image. How the compression process is switched will be described later in detail.

ステップS221では、圧縮された画像データを保存する場合には、所定の記憶装置に記憶する。印刷命令であった場合には、圧縮されている画像データを伸張して、プリンタ用の画像処理(色変換や、画像形成処理)を行って、プリンタエンジンで印刷を行う。   In step S221, when the compressed image data is stored, it is stored in a predetermined storage device. If it is a print command, the compressed image data is expanded, image processing for the printer (color conversion and image formation processing) is performed, and printing is performed by the printer engine.

なおステップS215〜S221はステップS205〜S211と同じ処理であるから、共通の処理を行うように構成することもできる。   Since steps S215 to S221 are the same processing as steps S205 to S211, it can be configured to perform common processing.

次に前述した図2のステップS206〜S210について更に詳細に説明する。図10は、イメージ領域を対象として画像認識処理を行って、その結果に応じて画像補正処理および、画像圧縮処理それぞれの手順を切り替える処理を示すフローチャートである。すなわち、図2のステップS206〜S210に相当する処理であり、図2との対応関係は図10のかっこ内に示した。   Next, steps S206 to S210 in FIG. 2 will be described in more detail. FIG. 10 is a flowchart showing a process of performing an image recognition process on an image area and switching the procedures of the image correction process and the image compression process according to the result. That is, the processing corresponds to steps S206 to S210 in FIG. 2, and the correspondence with FIG. 2 is shown in parentheses in FIG.

ステップS1001ではイメージ領域となった画像が入力されて、ステップS1002イメージ領域の大きさを計測する処理が行なわれる。   In step S1001, an image that is an image area is input, and a process of measuring the size of the image area in step S1002 is performed.

ステップS1003では前述の顔認識処理、色数認識処理、分散値算出処理等が行なわれて、ステップS1004で認識結果解析処理が行なわれる。   In step S1003, the above-described face recognition processing, color number recognition processing, variance value calculation processing, and the like are performed. In step S1004, recognition result analysis processing is performed.

この結果に応じて、ステップS1005で解像度変換されるか階調変換するか、画像に適正な明るさ、ホワイトバランスなど処理が行われるか判定される。ステップS1006では、判定結果に応じた画像処理が適用される。ここでは解像度変換、階調変換、明度補正、ホワイトバランスのほか、コントラスト、肌色再現、有彩色の彩度アップなどを補正する処理も適用可能である。さらに、画像を強調または平坦にする処理の制御が行なわれる。   Based on this result, it is determined in step S1005 whether resolution conversion or gradation conversion is performed, or whether processing such as appropriate brightness and white balance is performed on the image. In step S1006, image processing according to the determination result is applied. Here, in addition to resolution conversion, gradation conversion, lightness correction, and white balance, processing for correcting contrast, skin color reproduction, saturation increase of chromatic colors, and the like can also be applied. Further, processing for emphasizing or flattening the image is controlled.

次に、圧縮処理の可否判定ステップS1007により、圧縮が必要かどうかの制御が行なわれる。圧縮が行なわれる場合には、ステップS1008圧縮処理が行なわれる。なお、この圧縮処理の詳細な説明は後述する。   Next, whether or not compression is necessary is controlled in step S1007 of whether or not compression processing is possible. When compression is performed, step S1008 compression processing is performed. A detailed description of this compression processing will be described later.

図5にイメージ領域からの顔検出した結果を保持するテーブルを示している。ここで、顔を検出された顔にナンバリングをして、その顔の領域の画素数を記入する。顔が検出されなかった場合には、このテーブルに結果が入ることはない。   FIG. 5 shows a table that holds the result of face detection from the image area. Here, the number of the detected face is numbered and the number of pixels in the face area is entered. If no face is detected, no result is entered in this table.

<特徴量として顔領域を用いる場合>
図6に、検出された顔領域の数と、イメージ領域全体のサイズとから決まる閾値と、画像補正ID:Kとを関連づけた、画像補正IDテーブル600の一例を示す。すなわち、本例では、着目画像領域内において検出された顔領域の数と、イメージ領域の画像サイズとがイメージデータの特徴量である。そしてその特徴量は、図6では4つの閾値で区分され、着目イメージデータがどの区分に属するかが、画像補正IDテーブル600で決定される画像補正ID:Kで示される。閾値は、検出された顔領域の数と、イメージ領域の画像サイズとの組み合わせで決定される。図6の例では、第1の閾値601は、顔領域の数が2、かつ、イメージ領域のサイズが10000である。着目イメージデータから検出された顔領域の数が2以下であり、かつイメージ領域のサイズが10000画素以下であれば、図6のテーブルから画像補正ID:KはK1となる。第2の閾値602は、顔領域の数が4、かつ、イメージ領域のサイズが20000である。着目イメージデータから検出された顔領域の数が2より大きくかつ4以下であり、かつ、イメージ領域のサイズが10000画素より大きくかつ20000画素以下であれば、図6のテーブルからKはK2となる。着目イメージデータから検出された顔領域の数が4より大きくかつ8以下であり、かつ、イメージ領域のサイズが40000画素より大きくかつ80000画素以下であれば、図6のテーブルから画像補正ID:KはK3となる。着目イメージデータから検出された顔領域の数が8より大きくかつ12以下であり、かつ、イメージ領域のサイズが40000画素より大きくかつ60000画素以下であれば、図6のテーブルから画像補正ID:KはK4となる。着目イメージデータから検出された顔領域の数が12より大きく、かつ、イメージ領域のサイズが60000画素より大きければ、図6には図示されていないが、画像補正ID:KはK5となる。
<When using a face area as a feature quantity>
FIG. 6 shows an example of an image correction ID table 600 in which a threshold value determined from the number of detected face areas and the size of the entire image area is associated with an image correction ID: K. That is, in this example, the number of face areas detected in the target image area and the image size of the image area are the feature amounts of the image data. The feature amount is divided into four threshold values in FIG. 6, and to which division the target image data belongs is indicated by an image correction ID: K determined by the image correction ID table 600. The threshold value is determined by a combination of the number of detected face areas and the image size of the image area. In the example of FIG. 6, the first threshold value 601 is that the number of face areas is 2 and the size of the image area is 10,000. If the number of face areas detected from the target image data is 2 or less and the size of the image area is 10000 pixels or less, the image correction ID: K is K1 from the table of FIG. The second threshold 602 is the number of face areas is 4 and the size of the image area is 20000. If the number of face areas detected from the target image data is greater than 2 and less than or equal to 4 and the size of the image area is greater than 10000 pixels and less than or equal to 20000 pixels, K is K2 from the table of FIG. . If the number of face areas detected from the image data of interest is greater than 4 and less than or equal to 8, and the size of the image area is greater than 40000 pixels and less than or equal to 80000 pixels, the image correction ID: K from the table of FIG. Becomes K3. If the number of face areas detected from the image data of interest is greater than 8 and less than or equal to 12 and the size of the image area is greater than 40000 pixels and less than or equal to 60000 pixels, the image correction ID: K from the table of FIG. Becomes K4. If the number of face areas detected from the image data of interest is larger than 12 and the size of the image area is larger than 60000 pixels, the image correction ID: K is K5 although not shown in FIG.

なお、図6は理解のためにグラフで記載されているが、コンピュータには、たとえば閾値である特徴量の値と、対応する係数の値とを関連づけた表として保存される。たとえば図6の閾値601と画像補正ID:K1、閾値602と画像補正ID:K2、閾値603と画像補正ID:K3、閾値604と画像補正ID:K4が対応づけられたテーブルが、画像補正IDテーブル600として保存される。   Although FIG. 6 is described in a graph for the sake of understanding, it is stored in the computer as a table in which, for example, feature value values that are threshold values are associated with corresponding coefficient values. For example, a table in which the threshold value 601 and the image correction ID: K1, the threshold value 602 and the image correction ID: K2, the threshold value 603 and the image correction ID: K3, and the threshold value 604 and the image correction ID: K4 in FIG. Stored as table 600.

このように、図6のテーブルにおいて、画像補正ID:Kの値は閾値に関連づけてテーブル化されている。画像補正ID:Kは、顔検出された数とそのイメージ領域の大きさによって決められるもので、どこの領域にどのような補正を行う係数に対応付けが出来るかは、あらかじめ設定しておく。例えば、画像補正IDがK3の場合には、イメージ領域に対して、解像度を落とす処理をしても問題がないとしていた場合には、解像度を半分に落とす処理を行う。また、尖鋭性補正では、画像の高周波を落とす処理を行う。このように、各画像補正ID:Kに対して行うべき処理を規定しておき、それにしたがって、画像補正を行うようにする。なお、この係数に対する画像補正を変更するにあたっては、ステップS209にこの画像補正ID:を理解できる機能を持たせることにより、画像認識結果解析からは、その認識できる情報を送ることで、画像補正の切り替えが行えるようになる。これは、画像データとは別に、この情報を送ることや、画像データに対して、フォーマットを規定しておき、そのフォーマットの所定の場所に画像補正ID:を入れておくことで、画像補正を切り替えることが可能となる。   Thus, in the table of FIG. 6, the value of the image correction ID: K is tabulated in association with the threshold value. The image correction ID: K is determined by the number of detected faces and the size of the image area, and it is set in advance which area can be associated with what correction coefficient. For example, when the image correction ID is K3, if there is no problem even if the process of reducing the resolution is performed on the image area, the process of reducing the resolution by half is performed. In sharpness correction, processing for reducing the high frequency of an image is performed. In this way, processing to be performed for each image correction ID: K is defined, and image correction is performed in accordance with the specified processing. When changing the image correction for this coefficient, the function for understanding this image correction ID: is provided in step S209, and from the image recognition result analysis, the recognizable information is sent so that the image correction can be performed. It will be possible to switch. This can be done by sending this information separately from the image data or by prescribing a format for the image data and inserting an image correction ID: at a predetermined location in the format. It is possible to switch.

これを図2に適用すると、S208,S218において特徴量と閾値との比較が行われて画像補正ID:Kが決定される。そしてS209,219(図10のS1005)において画像補正ID:Kの値が参照され、画像の補正処理を行うか否かあるいはどの補正処理を行うかが決定される。この決定は、補正処理のプログラム自体が画像補正ID:Kに応じて適切な処理に分岐する工程をそなえるなどによって実現できる。また、S209,S219(図10のS1006)において、画像補正ID:Kに応じた上述したような画像補正処理が行われる。   When this is applied to FIG. 2, the feature amount and the threshold are compared in S208 and S218, and the image correction ID: K is determined. In S209 and 219 (S1005 in FIG. 10), the value of the image correction ID: K is referred to, and it is determined whether or not to perform image correction processing. This determination can be realized by including a process in which the correction processing program itself branches to an appropriate process according to the image correction ID: K. In S209 and S219 (S1006 in FIG. 10), the image correction process as described above corresponding to the image correction ID: K is performed.

なお、画像処理の内容を、画像補正ID:Kともうひとつのパラメータに対応して決定してもよい。この、もう一つのパラメータとは、画像補正ID:Kと画像補正処理との対応付けを固定せず、柔軟に変更するためのパラメータである。このパラメータを本例では、補正処理切り替えパラメータと呼ぶ。本実施形態では画像補正ID:Kと補正処理との対応付けを切り替えるために、このように補正処理切り替えパラメータを用いているが、補正処理切り替えパラメータと特徴量とに応じて画像補正IDの値を決定しても良い。こうすれば、画像補正IDの値と補正処理の内容とは固定化できるので、補正処理を行うプログラムは、画像補正IDだけを参照して処理内容を決定すればよい。   Note that the content of the image processing may be determined in correspondence with the image correction ID: K and another parameter. The other parameter is a parameter for flexibly changing the association between the image correction ID: K and the image correction process without fixing the association. In this example, this parameter is called a correction process switching parameter. In this embodiment, in order to switch the association between the image correction ID: K and the correction process, the correction process switching parameter is used as described above. However, the value of the image correction ID is determined according to the correction process switching parameter and the feature amount. May be determined. In this way, the value of the image correction ID and the content of the correction process can be fixed, so that the program for performing the correction process only needs to determine the process content with reference to only the image correction ID.

<特徴量として色数を用いる場合>
図7に色解析テーブルを示して、色数解析の方法に関して説明を行う。この色数解析では、着目画像領域に対して、各色成分ごとに出現した輝度の数(これを色数と呼ぶ)をカウントする。図7では、コンポーネントがRGBであった場合の例を挙げている。この他、CMYKなどの色空間に関しても同様なテーブルを作成できることは示すまでもない。この場合には濃度ごとの色数を数えることとなる。この例では、各色成分は8ビットで示されるものとし、色数は4つの範囲に区切られている。たとえば、或る色成分について、0〜255のすべての輝度が出現していれば、色数は256である。またある色成分について、輝度が一様であれば、その輝度がどの値であろうと、出現した色数は1である。すなわち各値の色数は、最小値が1,最大値が256である。そして区切られた範囲ごとに、出現した色数が数えられる。そして、各色成分毎に、図7の色解析テーブルにしたがって、出現した色数に対応する色数区分値が決定される。例えば、RGB値の最高出現頻度がそれぞれ30、100、150となったとする。その場合には、Rに対しては色数区分値が1となり、Gに対しては色数区分値が2となり、Bに対しては色数区分値が3となる。つまり、各色成分ごとに色数によって色数区分値が決定される。なおここでは、色数の区切りを4つにしているがこれに限ることはない。
<When the number of colors is used as the feature amount>
FIG. 7 shows a color analysis table, and the color number analysis method will be described. In this color number analysis, the number of luminances that appear for each color component (referred to as the number of colors) is counted for the image area of interest. FIG. 7 shows an example where the component is RGB. In addition, it goes without saying that a similar table can be created for a color space such as CMYK. In this case, the number of colors for each density is counted. In this example, each color component is assumed to be 8 bits, and the number of colors is divided into four ranges. For example, if all the luminances of 0 to 255 appear for a certain color component, the number of colors is 256. If the luminance is uniform for a certain color component, the number of appearing colors is 1 regardless of the value of the luminance. That is, the number of colors of each value is 1 for the minimum value and 256 for the maximum value. Then, for each divided range, the number of colors that appear is counted. Then, for each color component, the color number division value corresponding to the number of appearing colors is determined according to the color analysis table of FIG. For example, it is assumed that the highest appearance frequencies of RGB values are 30, 100, and 150, respectively. In that case, the color number division value is 1 for R, the color number division value is 2 for G, and the color number division value is 3 for B. That is, the color number division value is determined by the number of colors for each color component. Here, the number of colors is divided into four, but this is not restrictive.

このように色数が決定されるため、たとえば色数が多い画像領域は多階調の画像であると考えられる。逆に、色数が少ない画像領域は、階調は少ないが解像度の高い表現が望まれる画像であると考えられる。したがって色数が一定値よりも多い場合には、階調を圧縮して(低下させて)も、画質の劣化は小さいものと予想できる。そこで、色数が一定値よりも多い場合には、階調を圧縮する画像処理を施す。これによりデータ量を削減でき、しかも画質の劣化は比較的小さい。逆に色数が一定値以下の場合には、階調を保存する。もちろん閾値はひとつではなく、複数の閾と比較して圧縮する階調数を変化させても良い。   Since the number of colors is determined in this way, for example, an image region having a large number of colors is considered to be a multi-tone image. Conversely, an image region with a small number of colors is considered to be an image for which an expression with a small gradation but a high resolution is desired. Therefore, when the number of colors is larger than a certain value, it can be expected that the deterioration in image quality is small even if the gradation is compressed (decreased). Therefore, when the number of colors is larger than a certain value, image processing for compressing the gradation is performed. As a result, the amount of data can be reduced, and image quality degradation is relatively small. Conversely, if the number of colors is less than a certain value, the gradation is stored. Of course, the threshold value is not one, and the number of gradations to be compressed may be changed as compared with a plurality of threshold values.

この色数区分値が決定したら、それぞれのコンポーネントの色数区分値の数値の合計を行う。例えば、先ほどの例の場合には、Rの色数区分値が1、Gの色数区分値が2、Bの色数区分値が3であるので、それぞれの数値を合計した6という数値が得られる。   When this color number division value is determined, the numerical values of the color number division values of the respective components are summed. For example, in the case of the previous example, since the R color number division value is 1, the G color number division value is 2, and the B color number division value is 3, the numerical value of 6 is obtained by adding the respective numerical values. can get.

この数値を図8に示す色数区分値点数と画像補正ID:Cと対応付けしたテーブルにしたがって、画像補正ID:Cを決定する。先ほどの例では、色数区分値点数が6であったので、画像補正ID:CはC1となる。画像補正ID:Cによって変化する補正処理としては、階調を落としていく処理を実施する。その落とす割合を決めているのもが画像補正ID:Cである。   The image correction ID: C is determined according to a table in which these numerical values are associated with the color number division value score and the image correction ID: C shown in FIG. In the previous example, since the number-of-colors classification value score is 6, the image correction ID: C is C1. As a correction process that changes depending on the image correction ID: C, a process of lowering the gradation is performed. It is the image correction ID: C that determines the drop ratio.

諧調を補正する方法としては、ガンマ補正やヒストグラム平滑化を適用する。ここで、画像補正ID:Cに応じて、これら処理の実施の有無を切り替えることにする。また、ガンマ補正のガンマ値を決定する。例えば、画像補正ID:C1のときは、ガンマ補正値のガンマ1.6乗値として、ヒストグラム平滑は行わない設定にしておく。このような、画像補正Cの値とそれに対応する画像補正処理の実施の有無、また、処理必用なパラメータを対応つけてあらかじめ設定をしておく。   As a method for correcting gradation, gamma correction and histogram smoothing are applied. Here, according to the image correction ID: C, whether to perform these processes is switched. Also, the gamma value for gamma correction is determined. For example, when the image correction ID is C1, the gamma correction value is set to a power of 1.6 to prevent the histogram from being smoothed. Such a value of image correction C is set in advance by associating whether or not image correction processing corresponding to the value is performed and parameters necessary for the processing.

以上の処理を図2に適用すると、S208,S218において特徴量と閾値との比較が行われて画像補正IDが決定される。そしてS209,219(図10のS1005)において画像補正IDの値が参照され、画像の補正処理を行うか否かあるいはどの補正処理を行うかが決定される。この決定は、補正処理のプログラム自体が画像補正IDに応じて適切な処理に分岐する工程をそなえるなどによって実現できる。また、S209,S219(図10のS1006)において、画像補正IDに応じた上述したような画像補正処理が行われる。   When the above processing is applied to FIG. 2, the image correction ID is determined by comparing the feature amount with the threshold value in S208 and S218. In S209 and 219 (S1005 in FIG. 10), the value of the image correction ID is referred to, and it is determined whether or not to perform image correction processing. This determination can be realized by including a process in which the correction processing program itself branches to an appropriate process according to the image correction ID. In S209 and S219 (S1006 in FIG. 10), the image correction process as described above according to the image correction ID is performed.

なお、画像処理の内容を、画像補正IDともうひとつのパラメータに対応して決定してもよい。この、もう一つのパラメータとは、画像補正IDと画像補正処理との対応付けを固定せず、柔軟に変更するためのパラメータである。このパラメータを本例では、補正処理切り替えパラメータと呼ぶ。本実施形態では画像補正IDと補正処理との対応付けを切り替えるために、このように補正処理切り替えパラメータを用いているが、補正処理切り替えパラメータと特徴量とに応じて画像補正IDの値を決定しても良い。こうすれば、画像補正IDの値と補正処理の内容とは固定化できるので、補正処理を行うプログラムは、画像補正IDだけを参照して処理内容を決定すればよい。   Note that the content of the image processing may be determined corresponding to the image correction ID and another parameter. The other parameter is a parameter for flexibly changing the association between the image correction ID and the image correction process without fixing the association. In this example, this parameter is called a correction process switching parameter. In this embodiment, in order to switch the association between the image correction ID and the correction process, the correction process switching parameter is used as described above. However, the value of the image correction ID is determined according to the correction process switching parameter and the feature amount. You may do it. In this way, the value of the image correction ID and the content of the correction process can be fixed, so that the program for performing the correction process only needs to determine the process content with reference to only the image correction ID.

<特徴量として画素の分散を用いる場合>
図9に、認識結果解析処理で得られた分散値とイメージ領域のサイズを2軸とり、イメージ領域の大きさと分散値によって、画像補正ID:Vを決定するための表の一例を示す。画像補正ID:Vによって変化する画像補正としては、解像度変換及び圧縮処理である。分散が大きい場合には、着目画像領域内の画像は細かい、すなわち高周波成分が多い画像である。この画像を印刷した場合に、細部を再現できない場合や、印刷時の画像形成処理により生じる周期パターンと干渉を起こし、良好な結果が得られない場合がある。よって、分散が大きい場合には、着目画像領域について解像度を落とす処理をして、結果的に意味をなさない情報を落としてしまう。また、この画像補正ID:Vを圧縮処理で使うときには、分散が小さい場合には、可逆符号化を用いても符号化効率が良くなる期待が持てることがある。そこで可逆符号化を適用するようにする。また、分散が大きい場合には、圧縮した際の符号量が大きくなってしまうことが想定される。そのために、非可逆符号化を適用するように制御すると共に、分散値の大きさに応じた圧縮パラメータ(例えば、JPEGの場合には量子化係数を変更する)を変更する。例えば、画像補正ID:V1の時は、可逆符号化を選択する。画像補正IDがV2のときは、非可逆符号化の量子化値が小さくなるもの、たとえばJPEGの場合Qファクタを90とする。画像補正IDがV3のときは、非可逆符号化の量子化値がV2より大きくなるもの、たとえばJPEGの場合Qファクタを70とする。画像補正IDがV4のときは、非可逆符号化の量子化値がV3より大きくなるもの、たとえばJPEGの場合Qファクタを50とするように設定しておく。この圧縮方式の選択及び非可逆符号化でのパラメータの設定はあらかじめ設定しておく。もちろん選択は任意ではなく、画像補正IDの値に応じて、画像劣化の少なくなる圧縮方法を選ぶ必要がある。
<When pixel dispersion is used as a feature quantity>
FIG. 9 shows an example of a table for determining the image correction ID: V based on two axes of the variance value and the image area size obtained by the recognition result analysis process, and the size and variance value of the image area. The image correction that changes depending on the image correction ID: V includes resolution conversion and compression processing. When the variance is large, the image in the image area of interest is fine, that is, an image with many high-frequency components. When this image is printed, details may not be reproduced, or there may be cases where good results cannot be obtained due to interference with a periodic pattern generated by image forming processing during printing. Therefore, when the variance is large, processing for lowering the resolution of the image area of interest results in information that does not make sense as a result. Further, when this image correction ID: V is used in compression processing, if the variance is small, it may be expected that the encoding efficiency will be improved even if lossless encoding is used. Therefore, lossless encoding is applied. In addition, when the variance is large, it is assumed that the code amount when compressed is large. Therefore, control is performed so that lossy encoding is applied, and a compression parameter (for example, a quantization coefficient is changed in the case of JPEG) is changed in accordance with the size of the variance value. For example, when the image correction ID is V1, lossless encoding is selected. When the image correction ID is V2, the Q factor is set to 90 when the quantized value of the lossy encoding is small, for example, JPEG. When the image correction ID is V3, the Q factor is set to 70 when the quantized value of the lossy encoding is larger than V2, for example, JPEG. If the image correction ID is V4, the Q factor is set to 50 when the quantization value of the lossy encoding is larger than V3, for example, JPEG. Selection of the compression method and parameter setting for lossy encoding are set in advance. Of course, the selection is not arbitrary, and it is necessary to select a compression method that reduces image deterioration according to the value of the image correction ID.

以上の処理を図2に適用すると、S208,S218において特徴量と閾値との比較が行われて画像補正IDが決定される。そしてS209,219(図10のS1005)において画像補正IDの値が参照され、画像の補正処理を行うか否かあるいはどの補正処理を行うかが決定される。この決定は、補正処理のプログラム自体が画像補正IDに応じて適切な処理に分岐する工程をそなえるなどによって実現できる。また、S209,S219(図10のS1006)において、画像補正IDに応じた上述したような画像補正処理が行われる。また、S210,S220において、画像補正IDに応じた上述したような画像圧縮処理が行われる。   When the above processing is applied to FIG. 2, the image correction ID is determined by comparing the feature amount with the threshold value in S208 and S218. In S209 and 219 (S1005 in FIG. 10), the value of the image correction ID is referred to, and it is determined whether or not to perform image correction processing. This determination can be realized by including a process in which the correction processing program itself branches to an appropriate process according to the image correction ID. In S209 and S219 (S1006 in FIG. 10), the image correction process as described above according to the image correction ID is performed. In S210 and S220, the above-described image compression processing corresponding to the image correction ID is performed.

なお、画像処理(補正及び圧縮)の内容及び方法を、画像補正IDともうひとつのパラメータに対応して決定してもよい。この、もう一つのパラメータとは、画像補正IDと画像補正処理との対応付けを固定せず、柔軟に変更するためのパラメータである。このパラメータを本例では、補正処理切り替えパラメータと呼ぶ。本実施形態では画像補正IDと補正処理との対応付けを切り替えるために、このように補正処理切り替えパラメータを用いているが、補正処理切り替えパラメータと特徴量とに応じて画像補正IDの値を決定しても良い。こうすれば、画像補正IDの値と補正処理の内容とは固定化できるので、補正処理を行うプログラムは、画像補正IDだけを参照して処理内容を決定すればよい。   Note that the content and method of image processing (correction and compression) may be determined in correspondence with the image correction ID and another parameter. The other parameter is a parameter for flexibly changing the association between the image correction ID and the image correction process without fixing the association. In this example, this parameter is called a correction process switching parameter. In this embodiment, in order to switch the association between the image correction ID and the correction process, the correction process switching parameter is used as described above. However, the value of the image correction ID is determined according to the correction process switching parameter and the feature amount. You may do it. In this way, the value of the image correction ID and the content of the correction process can be fixed, so that the program for performing the correction process only needs to determine the process content with reference to only the image correction ID.

ここまでに説明を行ってきたステップS208の認識結果解析処理および、ステップS209の画像補正処理、ステップS210の画像圧縮処理は、スキャン入力画像データに対しても適用可能である。つまり、ステップS218の認識結果解析処理、ステップS219の画像補正処理、ステップS220の圧縮処理に関しては、上記と同じ処理をすることで実現が可能である。ただし、スキャナ入力の画像とページ記述言語をレンダリングした画像とでは特性が違うことから、ステップS209の画像補正処理、ステップS219の画像補正処理の内容は同じであっても、画像補正ID:K、C、Vのパラメータを変更しても良い。具体的な例としては、スキャナ読み込み画像は、色数や分散値が大きく出る傾向にあるので、画像補正ID:VのV1の分散の範囲を0〜300にするなど、値の幅を大きくするなど変更することで、入力画像の特性に応じた補正を行えるようにする。このために、画像補正IDを求めるためのテーブルをPDL記述言語入力用と、スキャン画像入力用と両方の入力用に持っていて、入力画像に応じて、どちらかを適応的に切り替えて適用させることで、処理をまとめることが可能になる。   The recognition result analysis processing in step S208, the image correction processing in step S209, and the image compression processing in step S210 that have been described so far can be applied to scan input image data. That is, the recognition result analysis process in step S218, the image correction process in step S219, and the compression process in step S220 can be realized by performing the same process as described above. However, since the characteristics of the scanner input image and the image rendered by rendering the page description language are different, even if the image correction processing in step S209 and the image correction processing in step S219 are the same, the image correction ID: K, The C and V parameters may be changed. As a specific example, the scanner read image tends to have a large number of colors and dispersion values. Therefore, the value range is increased, for example, the dispersion range of V1 of the image correction ID: V is set to 0 to 300. Etc., so that correction according to the characteristics of the input image can be performed. For this purpose, a table for obtaining an image correction ID is provided for both the PDL description language input and the scan image input, and either one is adaptively switched and applied depending on the input image. This makes it possible to combine the processing.

以上の構成により、画像中に含まれる写真画像の特徴を分析し、その特徴に応じた画像処理及び画像圧縮を行うことができる。このため、画像の劣化が少なく、また効率的に圧縮できる。   With the above configuration, it is possible to analyze the characteristics of a photographic image included in an image and perform image processing and image compression according to the characteristics. For this reason, there is little deterioration of an image and it can compress efficiently.

[第2実施形態]
第2の実施形態は、第1実施形態における図2のステップS202でPDL記述言語からの入力と判定された場合に行なわれる処理の別実施形態である。つまり、図2のステップS203からステップS207までの処理を図11のフローチャートの処理で置換したものに相当する。
[Second Embodiment]
The second embodiment is another embodiment of the processing that is performed when it is determined in step S202 of FIG. 2 in the first embodiment that the input is from the PDL description language. That is, this is equivalent to the processing from step S203 to step S207 in FIG. 2 replaced by the processing in the flowchart in FIG.

図11のフローチャートを説明する。ステップS1111でPDL画像データが入力された場合、レンダリング時に付加された属性情報を使わずにステップS1112の像域分離を行う。この像域分離の処理は第1実施形態で説明をした処理と同じ処理である。ここで、像域分離をすることにより、PDLで付加された属性情報が間違っていた場合にも、あらためて属性を判断することが可能になる。また、PDLデータそのものにおいて、画像全体をドット画像(すなわちイメージ属性)として記述されている場合でも、その中に文字や写真が混在しているデータの場合も考えられる。この場合にも画像全体を認識処理の対象として、画像補正を行うことになってしまうために、画像全体として所望の処理が出来ないことがある。そのために、像域分離を行って適切な属性情報をつけることにより、この後の処理を効果的に行うことが可能になる。ステップS1113でイメージ領域かの判定を行う、イメージ領域であった場合には、ステップS1114でイメージ領域の画素数を認識カウントする。   The flowchart of FIG. 11 will be described. When PDL image data is input in step S1111, image area separation in step S1112 is performed without using attribute information added during rendering. This image area separation process is the same as the process described in the first embodiment. Here, by performing image area separation, even if the attribute information added in the PDL is wrong, the attribute can be determined again. Further, even when the entire image is described as a dot image (that is, an image attribute) in the PDL data itself, there may be a case in which characters and photographs are mixed therein. In this case as well, since the entire image is subject to recognition processing and image correction is performed, desired processing may not be performed for the entire image. Therefore, it is possible to effectively perform the subsequent processing by performing image area separation and attaching appropriate attribute information. In step S1113, the image area is determined. If it is an image area, the number of pixels in the image area is recognized and counted in step S1114.

ステップS1115の画像認識処理は第1実施形態のS217と同様であるのでここでは省略する。ステップS1116では画像認識結果解析を行い、ステップS1117画像補正処理で、画像補正が行なわれて、ステップS1118圧縮処理へ進み、印刷処理あるいは、記憶装置に保存される。   Since the image recognition process in step S1115 is the same as that in S217 of the first embodiment, it is omitted here. In step S1116, image recognition result analysis is performed. In step S1117, image correction is performed, and image correction is performed. Then, the flow proceeds to compression processing in step S1118, and is stored in the printing process or the storage device.

なお、ここでのステップS1116〜S1119に関しては、第1実施形態の図2のS218〜S221と同様でよい。   Note that steps S1116 to S1119 here may be the same as S218 to S221 of FIG. 2 of the first embodiment.

このように構成することで、入力形態(スキャンまたはPDL)によらず、画像中に含まれる写真画像の特徴を分析し、その特徴に応じた画像処理及び画像圧縮を行うことができる。このため、画像の劣化が少なく、また効率的に圧縮できる。   With this configuration, it is possible to analyze the characteristics of a photographic image included in an image and perform image processing and image compression according to the characteristics regardless of the input form (scan or PDL). For this reason, there is little deterioration of an image and it can compress efficiently.

[その他の実施形態]
以上、実施例を詳述したが、本発明は、例えば、システム、装置、方法、プログラム若しくは記憶媒体(記録媒体)等としての実施態様をとることが可能である。具体的には、複数の機器から構成されるシステムに適用しても良いし、また、一つの機器からなる装置に適用しても良い。
[Other Embodiments]
Although the embodiments have been described in detail above, the present invention can take an embodiment as, for example, a system, apparatus, method, program, or storage medium (recording medium). Specifically, the present invention may be applied to a system composed of a plurality of devices, or may be applied to an apparatus composed of a single device.

尚、本発明は、前述した実施形態の機能を実現するソフトウェアのプログラム(実施形態では図に示すフローチャートに対応したプログラム)を、システムあるいは装置に直接あるいは遠隔から供給する。そして、そのシステムあるいは装置のコンピュータが該供給されたプログラムコードを読み出して実行することによっても達成される場合を含む。   In the present invention, a software program (in the embodiment, a program corresponding to the flowchart shown in the drawing) that realizes the functions of the above-described embodiments is directly or remotely supplied to a system or apparatus. In addition, this includes a case where the system or the computer of the apparatus is also achieved by reading and executing the supplied program code.

従って、本発明の機能処理をコンピュータで実現するために、該コンピュータにインストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明は、本発明の機能処理を実現するためのコンピュータプログラム自体も含まれる。   Accordingly, since the functions of the present invention are implemented by computer, the program code installed in the computer also implements the present invention. In other words, the present invention includes a computer program itself for realizing the functional processing of the present invention.

その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等の形態であっても良い。   In that case, as long as it has the function of a program, it may be in the form of object code, a program executed by an interpreter, script data supplied to the OS, or the like.

プログラムを供給するための記録媒体としては、例えば、以下のようなものがある。フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、MO、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード、ROM、DVD(DVD−ROM,DVD−R)。   Examples of the recording medium for supplying the program include the following. Flexible disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, DVD (DVD-ROM, DVD-R).

その他、プログラムの供給方法としては、クライアントコンピュータのブラウザを用いてインターネットからハードディスク等の記録媒体にダウンロードすることによっても供給できる。すなわち、インテーネットから本発明のコンピュータプログラムそのもの、もしくは圧縮され自動インストール機能を含むファイルをダウンロードする。また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるサーバからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるサーバも、本発明に含まれるものである。   As another program supply method, the program can be supplied by downloading it from the Internet to a recording medium such as a hard disk using a browser of a client computer. That is, the computer program itself of the present invention or a compressed file including an automatic installation function is downloaded from the Internet. It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different server. That is, a server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer is also included in the present invention.

また、コンピュータが、読み出したプログラムを実行することによって、前述した実施形態の機能が実現される。その他にも、そのプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行い、その処理によっても前述した実施形態の機能が実現され得る。   Further, the functions of the above-described embodiments are realized by the computer executing the read program. In addition, the function of the above-described embodiment can be realized by an OS running on the computer based on an instruction of the program and performing part or all of the actual processing.

さらに、記録媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後にも前述した実施形態の機能が実現される。すなわち、そのプログラムの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行うことによっても前述した実施形態の機能が実現される。   Further, the functions of the above-described embodiments are realized even after the program read from the recording medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. That is, the functions of the above-described embodiments are realized by performing a part or all of the actual processing by the CPU or the like provided in the function expansion board or function expansion unit based on the instructions of the program.

本発明を適用できる画像処理装置の概略ブロック図である1 is a schematic block diagram of an image processing apparatus to which the present invention can be applied. 第1実施形態の処理を説明したフローチャートである。It is a flowchart explaining the process of 1st Embodiment. スキャン画像を像域分離した結果の一例である。It is an example of the result of image area separation of a scanned image. PDL画像の属性情報を示した一例である。It is an example which showed the attribute information of a PDL image. 第1実施形態の顔検出結果テーブルの一例である。It is an example of the face detection result table of 1st Embodiment. 第1実施形態の顔補正ID決定の関係を示した図である。It is the figure which showed the relationship of the face correction ID determination of 1st Embodiment. 第1実施形態の色解析テーブルの一例である。It is an example of the color analysis table of 1st Embodiment. 第1実施形態の色数補正ID決定の関係を示した図である。It is the figure which showed the relationship of color number correction ID determination of 1st Embodiment. 第1実施形態の分散からの画像補正係数決定の関係を示した図である。It is the figure which showed the relationship of the image correction coefficient determination from dispersion | distribution of 1st Embodiment. 第1実施形態の画像認識、画像補正、圧縮処理の詳細のフローチャートである。4 is a flowchart illustrating details of image recognition, image correction, and compression processing according to the first embodiment. 第2実施形態の処理を説明したフローチャートである。It is a flowchart explaining the process of 2nd Embodiment.

符号の説明Explanation of symbols

100 デジタル複合機
102 コントローラ
103 プリンタ
106 メモリ
100 Digital MFP 102 Controller 103 Printer 106 Memory

Claims (8)

画像データ中から、オブジェクトの種類が写真画像に分類される画像領域を特定する特定手段と、
前記特定手段により特定された画像領域の特徴量を計算する計算手段と、
前記画像領域の特徴量に応じた種類の画像補正処理を、前記画像領域に施す画像補正手段と、
前記画像領域の特徴量に応じた種類の画像圧縮処理を、前記画像データに施す画像圧縮手段と
を備えることを特徴とする画像処理装置。
A specifying means for specifying an image area in which the type of object is classified as a photographic image from the image data;
Calculating means for calculating the feature amount of the image area specified by the specifying means;
Image correction means for performing image correction processing of a type corresponding to the feature amount of the image area on the image area;
An image processing apparatus, comprising: an image compression unit that applies, to the image data, a type of image compression processing corresponding to a feature amount of the image region.
画像データを、該画像データに含まれるオブジェクトの種類に応じた画像領域に分類する像域分離手段を更に備え、
前記特定手段は、前記像域分離手段により写真画像に分類された画像領域を特定し、そのサイズを決定することを特徴とする請求項1に記載の画像処理装置。
Image region separating means for classifying the image data into image regions corresponding to the types of objects included in the image data;
The image processing apparatus according to claim 1, wherein the specifying unit specifies an image region classified into a photographic image by the image region separating unit and determines a size thereof.
画像データに、該画像データに含まれるオブジェクトの種類に対応した属性ビットマップデータが関連づけられているか判定する判定手段を更に備え、
前記属性ビットマップデータが関連づけられていないと判定された画像データについては、前記像域分離手段により画像領域を分類し、
前記属性ビットマップデータが関連づけられていると判定された画像データについては、前記特定手段により、写真画像に分類される画像領域を、前記属性ビットマップデータに基づいて特定することを特徴とすることを特徴とする請求項2に記載の画像処理装置。
Determination means for determining whether attribute bitmap data corresponding to the type of object included in the image data is associated with the image data;
For image data determined not to be associated with the attribute bitmap data, the image area is classified by the image area separation means,
For the image data determined to be associated with the attribute bitmap data, the specifying unit specifies an image region classified as a photographic image based on the attribute bitmap data. The image processing apparatus according to claim 2.
前記計算手段は、着目画像領域について顔領域の数およびサイズを前記特徴量として計算し、
前記画像補正手段は、前記顔領域の数およびサイズがそれぞれ一定値より大きい場合には、前記着目画像領域の解像度を落とす処理と、前記着目画像領域の高周波成分を除去する処理とのいずれか或いは両方を行うことを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。
The calculation means calculates the number and size of face regions for the image region of interest as the feature amount,
When the number and size of the face areas are each greater than a certain value, the image correction unit is either one of a process of reducing the resolution of the target image area and a process of removing high frequency components of the target image area, or 4. The image processing apparatus according to claim 1, wherein both are performed.
前記計算手段は、着目画像領域について、色成分ごとに色数を前記特徴量として計算し、
前記画像補正手段は、各色成分の色数の和が一定値よりも大きい場合には、前記着目画像領域の階調を低下させる処理を行うことを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。
The calculation means calculates the number of colors for each color component as the feature amount for the image area of interest,
4. The image correction unit according to claim 1, wherein when the sum of the number of colors of each color component is larger than a predetermined value, the image correction unit performs a process of reducing the gradation of the image area of interest. The image processing apparatus according to item.
前記計算手段は、着目画像領域について、色成分毎に輝度または濃度ごとの画素数の分散およびサイズを前記特徴量として計算し、
前記画像補正手段は、前記分散およびサイズがそれぞれ第1の一定値より大きい場合には、前記着目画像領域の解像度を落とす処理を行い、
前記画像圧縮手段は、前記分散が第2の一定値以下の場合には、前記画像データに対して可逆圧縮処理を施し、前記分散が第2の一定値より大きい場合には、前記画像データに対して非可逆圧縮処理を施すことを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。
The calculation means calculates, for the image area of interest, the variance and size of the number of pixels for each luminance component or density for each color component as the feature amount,
The image correction means performs a process of reducing the resolution of the image area of interest when the variance and the size are each greater than a first constant value,
The image compression means performs a reversible compression process on the image data when the variance is less than or equal to a second constant value, and applies the image data to the image data when the variance is greater than a second constant value. The image processing apparatus according to claim 1, wherein an irreversible compression process is performed on the image processing apparatus.
画像データ中から、オブジェクトの種類が写真画像に分類される画像領域を特定する特定工程と、
前記特定工程により特定された画像領域の特徴量を計算する計算工程と、
前記画像領域の特徴量に応じた種類の画像補正処理を、前記画像データに施す画像補正工程と、
前記画像領域の特徴量に応じた種類の画像圧縮処理を、前記画像データに施す画像圧縮工程と
を有することを特徴とする画像処理方法。
From the image data, a specific step of identifying an image region in which the type of object is classified as a photographic image,
A calculation step of calculating a feature amount of the image region specified by the specifying step;
An image correction step of performing, on the image data, a type of image correction processing according to the feature amount of the image region;
And an image compression step of performing, on the image data, an image compression process of a type corresponding to the feature amount of the image area.
画像データ中から、オブジェクトの種類が写真画像に分類される画像領域を特定する特定工程と、
前記特定工程により特定された画像領域の特徴量を計算する計算工程と、
前記画像領域の特徴量に応じた種類の画像補正処理を、前記画像データに施す画像補正工程と、
前記画像領域の特徴量に応じた種類の画像圧縮処理を、前記画像データに施す画像圧縮工程と
を有する画像処理方法をコンピュータにより実現するためのプログラム。
From the image data, a specific step of identifying an image region in which the type of object is classified as a photographic image,
A calculation step of calculating a feature amount of the image region specified by the specifying step;
An image correction step of performing, on the image data, a type of image correction processing according to the feature amount of the image region;
A program for realizing, by a computer, an image processing method including an image compression process for performing image compression processing of a type corresponding to a feature amount of the image area on the image data.
JP2007187600A 2007-07-18 2007-07-18 Image processor, its method and computer program Withdrawn JP2009027385A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007187600A JP2009027385A (en) 2007-07-18 2007-07-18 Image processor, its method and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007187600A JP2009027385A (en) 2007-07-18 2007-07-18 Image processor, its method and computer program

Publications (1)

Publication Number Publication Date
JP2009027385A true JP2009027385A (en) 2009-02-05

Family

ID=40398790

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007187600A Withdrawn JP2009027385A (en) 2007-07-18 2007-07-18 Image processor, its method and computer program

Country Status (1)

Country Link
JP (1) JP2009027385A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010198313A (en) * 2009-02-25 2010-09-09 Denso Corp Device for specifying degree of eye opening
JP2011121275A (en) * 2009-12-10 2011-06-23 Konica Minolta Business Technologies Inc Image processing apparatus and image processing method
WO2011114668A1 (en) 2010-03-18 2011-09-22 パナソニック株式会社 Data processing device and data processing method
US9110613B2 (en) 2013-03-29 2015-08-18 Seiko Epson Corporation Print control apparatus and print control program using compression processing
JP2015162852A (en) * 2014-02-28 2015-09-07 ブラザー工業株式会社 Image processing system and image processing program
JP2015203978A (en) * 2014-04-14 2015-11-16 キヤノン株式会社 Image processor, image retrieval device, and method for controlling image processor
JP2020057348A (en) * 2018-03-30 2020-04-09 エーオー カスペルスキー ラボAO Kaspersky Lab System and method for identifying image containing identification document

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010198313A (en) * 2009-02-25 2010-09-09 Denso Corp Device for specifying degree of eye opening
JP2011121275A (en) * 2009-12-10 2011-06-23 Konica Minolta Business Technologies Inc Image processing apparatus and image processing method
WO2011114668A1 (en) 2010-03-18 2011-09-22 パナソニック株式会社 Data processing device and data processing method
US9113173B2 (en) 2010-03-18 2015-08-18 Panasonic Intellectual Property Corporation Of America Data processing device and data processing method which compresses image data
US9110613B2 (en) 2013-03-29 2015-08-18 Seiko Epson Corporation Print control apparatus and print control program using compression processing
JP2015162852A (en) * 2014-02-28 2015-09-07 ブラザー工業株式会社 Image processing system and image processing program
US9788014B2 (en) 2014-02-28 2017-10-10 Brother Kogyo Kabushiki Kaisha Image processing device for reducing data size of object in image data based on target value
JP2015203978A (en) * 2014-04-14 2015-11-16 キヤノン株式会社 Image processor, image retrieval device, and method for controlling image processor
JP2020057348A (en) * 2018-03-30 2020-04-09 エーオー カスペルスキー ラボAO Kaspersky Lab System and method for identifying image containing identification document

Similar Documents

Publication Publication Date Title
JP5302768B2 (en) Image processing apparatus and image processing method
JP4118749B2 (en) Image processing apparatus, image processing program, and storage medium
US8331671B2 (en) Image processing apparatus and image encoding method related to non-photo image regions
US7551753B2 (en) Image processing apparatus and method therefor
JP3922298B2 (en) Image processing device
US20040247175A1 (en) Image processing method, image capturing apparatus, image processing apparatus and image recording apparatus
EP1014688A2 (en) Image processing method and apparatus, image processing system, and storage medium
JP5219706B2 (en) Image processing apparatus, image processing method, and image processing program
JP2006005923A (en) Image inputting system and method for dynamically controlling file size of digital image
JP2006023945A (en) Image processing system and image processing method
JP2009027385A (en) Image processor, its method and computer program
US20060274081A1 (en) Image retrieving apparatus, image retrieving method, program, and storage medium
JP4350778B2 (en) Image processing apparatus, image processing program, and recording medium
JP4708888B2 (en) Image processing apparatus, image processing method, and computer program
EP1398950A2 (en) Image forming method, image processing apparatus, and image recording apparatus for forming an optimum viewing image from a captured image
JP4364809B2 (en) Image processing apparatus, image processing method, program, and recording medium
CN1179558C (en) Image recording apparatus and method, image reproducing apparatus and method, and recorded medium on which image processing program is recorded
JP2003244447A (en) Image processor and image processing method
JP4920814B2 (en) Image processing method, apparatus, and recording medium
JP2010146218A (en) Image processing apparatus, image processing method, computer program
JP3820751B2 (en) Image processing apparatus and method, and recording medium on which image processing program is recorded
JP2003085556A (en) Image processing device and program
JP3899872B2 (en) Image processing apparatus, image processing method, image processing program, and computer-readable recording medium recording the same
US8270722B2 (en) Image processing with preferential vectorization of character and graphic regions
CN1643893A (en) Image processor and image printer

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20101005