JP2006099280A - Image processor, printer equipped with the same, and image processing method - Google Patents

Image processor, printer equipped with the same, and image processing method Download PDF

Info

Publication number
JP2006099280A
JP2006099280A JP2004282536A JP2004282536A JP2006099280A JP 2006099280 A JP2006099280 A JP 2006099280A JP 2004282536 A JP2004282536 A JP 2004282536A JP 2004282536 A JP2004282536 A JP 2004282536A JP 2006099280 A JP2006099280 A JP 2006099280A
Authority
JP
Japan
Prior art keywords
image
predetermined
content
processing apparatus
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004282536A
Other languages
Japanese (ja)
Other versions
JP4617808B2 (en
Inventor
Masatoshi Matsudaira
正年 松平
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2004282536A priority Critical patent/JP4617808B2/en
Priority to US11/232,924 priority patent/US20060087699A1/en
Publication of JP2006099280A publication Critical patent/JP2006099280A/en
Application granted granted Critical
Publication of JP4617808B2 publication Critical patent/JP4617808B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To appropriately perform an image correction processing when an image is rotated and outputted. <P>SOLUTION: An image file is restored in order from the top, so as to obtain start point restoring information or the histogram of RGB values, and a skin color area, etc., is extracted and stored in a data buffer (S100-S190). An object recognition processing to determine whether an image content indicates a portrait image or a scenery image is performed, based on the size and position of the obtained skin color area and existence of a pixel area corresponding to both eyes and a mouth, etc., so as to calculate a parameter for an automatic correction processing (S195, S200). The image file is restored from a start point block with the use of the start point restoring information, so that the image after rotation is generated in order from an upper end and outputted by performing the automatic correction processing in response to the calculated parameter (S210-S300). Consequently, the image content is determined with the use of the image before rotation, so as to be more appropriately determined. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、画像処理装置およびこれを備えるプリンタ、画像処理方法、画像処理用プログラムに関し、詳しくは、画像に所定の画像補正処理を施して出力する画像処理装置およびこれを備えるプリンタ、画像処理方法、画像処理用プログラムに関する。   The present invention relates to an image processing apparatus, a printer including the same, an image processing method, and an image processing program. More specifically, the present invention relates to an image processing apparatus that performs predetermined image correction processing on an image and outputs the image, and a printer including the image processing apparatus. The present invention relates to an image processing program.

従来、この種の画像処理装置としては、入力された画像の中に人物の顔などのオブジェクトが含まれるかどうかを検出し、この検出結果に基づいて画像内容(人物画像や風景画像など)を判定すると共に補正パラメータを設定して画像を補正するものが提案されている(例えば、特許文献1参照)。この装置では、人物の顔を検出する際には、肌色の領域を検出したり目や口に相当する画素を検出したりしている。
特開2004−236110号公報
Conventionally, this type of image processing apparatus detects whether or not an input image includes an object such as a human face, and based on the detection result, the image content (such as a person image or a landscape image) is detected. There has been proposed one that corrects an image by determining and setting a correction parameter (see, for example, Patent Document 1). In this apparatus, when detecting the face of a person, a skin color region is detected or pixels corresponding to eyes and mouth are detected.
Japanese Patent Laid-Open No. 2004-236110

しかしながら、上述の装置では、人物の顔などのオブジェクトを検出する際には、目や口に相当する画素の位置関係や画像全体に対するオブジェクトの配置などを考慮して行なうから、画像の向きによってはオブジェクトの検出や画像内容の判定を正しく行なえない場合がある。例えば、こうした画像処理装置をプリンタなどに適用する場合を考えると、印刷レイアウトの設定や印刷用紙の向きに応じて画像を回転して印刷することがあり、この画像の回転に伴ってオブジェクトの検出や画像内容の判定に不都合が生じてしまう虞がある。   However, in the above-described apparatus, when detecting an object such as a human face, the positional relationship of pixels corresponding to eyes and mouth and the arrangement of the object with respect to the entire image are taken into consideration. In some cases, object detection and image content determination cannot be performed correctly. For example, when considering the case where such an image processing apparatus is applied to a printer or the like, an image may be rotated and printed according to the print layout setting or the orientation of the printing paper, and object detection is performed as the image rotates. And inconvenience may occur in the determination of the image content.

本発明の画像処理装置およびこれを備えるプリンタ、画像処理方法、画像処理用プログラムは、オブジェクトの検出や画像内容の判定をより適切に行なうことを目的の一つとする。また、本発明の画像処理装置およびこれを備えるプリンタ、画像処理方法、画像処理用プログラムは、画像を回転して出力する際の画像補正処理をより適切に施すことを目的の一つとする。   An object of an image processing apparatus, a printer including the image processing apparatus, an image processing method, and an image processing program according to the present invention is to more appropriately perform object detection and image content determination. Another object of the image processing apparatus, the printer including the image processing apparatus, the image processing method, and the image processing program of the present invention is to more appropriately perform image correction processing when rotating and outputting an image.

本発明の画像処理装置およびこれを備えるプリンタ、画像処理方法、画像処理用プログラムは、上述の目的の少なくとも一部を達成するために以下の手段を採った。   The image processing apparatus, the printer including the same, the image processing method, and the image processing program of the present invention employ the following means in order to achieve at least a part of the above object.

本発明の画像処理装置は、
画像に所定の画像補正処理を施して出力する画像処理装置であって、
指定された画像の回転を伴う出力指示がなされたときに、該画像の画素情報に基づいて該画像に含まれるオブジェクト領域を抽出し該抽出したオブジェクト領域の該画像全体に対する配置に基づいて該画像の画像内容を判定する画像内容判定手段と、
該判定された画像内容に基づいて前記指定された画像に所定の画像補正処理を施すと共に該画像を回転して出力する画像補正回転手段と、
を備えることを要旨とする。
The image processing apparatus of the present invention
An image processing apparatus that performs predetermined image correction processing on an image and outputs the image,
When an output instruction accompanied with rotation of the designated image is made, an object area included in the image is extracted based on pixel information of the image, and the image is based on the arrangement of the extracted object area with respect to the entire image. Image content determination means for determining the image content of
Image correction rotation means for performing predetermined image correction processing on the designated image based on the determined image content and rotating and outputting the image;
It is a summary to provide.

この本発明の画像処理装置では、指定された画像を回転して出力する際に、画像の画素情報に基づいてオブジェクト領域を抽出すると共に抽出したオブジェクト領域の画像全体に対する配置に応じて画像内容を判定し、この判定した画像内容に基づいて所定の画像処理を施すと共に回転して出力する。したがって、画像全体に対するオブジェクト領域の配置に基づく画像内容の判定を回転前の画像を用いて行なうから、より適切に画像内容を判定することができる。この結果、画像を回転して出力する際の画像補正処理をより適切に施すことができる。   In the image processing apparatus of the present invention, when a specified image is rotated and output, the object area is extracted based on the pixel information of the image, and the image content is changed according to the arrangement of the extracted object area with respect to the entire image. Based on the determined image content, predetermined image processing is performed and the image is rotated and output. Therefore, since the image content based on the arrangement of the object area with respect to the entire image is determined using the image before rotation, the image content can be determined more appropriately. As a result, the image correction process when rotating and outputting the image can be performed more appropriately.

こうした本発明の画像処理装置において、前記画像内容判定手段は、所定の肌色の画素により構成される領域を前記オブジェクト領域として抽出し該抽出したオブジェクト領域の前記画像全体に対する配置に基づいて該画像の画像内容を人物画像と判定する手段であるものとすることもできる。こうすれば、所定の肌色の画素により構成されるオブジェクト領域の画像全体に対する配置に基づく人物画像の判定をより適切に行なうことができる。   In such an image processing apparatus of the present invention, the image content determination means extracts an area composed of pixels of a predetermined skin color as the object area, and based on the arrangement of the extracted object area with respect to the entire image, It may be a means for determining the image content as a person image. In this way, it is possible to more appropriately determine the person image based on the arrangement of the object area composed of pixels of a predetermined skin color with respect to the entire image.

また、本発明の画像処理装置において、前記画像内容判定手段は、前記抽出したオブジェクト領域の該画像の上辺および左右辺に接する量が所定量以下であることを条件の一つとして該画像の画像内容を人物画像と判定する手段であるものとすることもできる。ここで「所定量」には値0が含まれる。即ち、抽出したオブジェクト領域が画像の上辺および左右辺に接しないことを条件の一つとして画像の画像内容を人物画像と判定するものも含まれる。   Further, in the image processing apparatus of the present invention, the image content determination means may be configured such that the amount of the extracted object region touching the upper side and the left and right sides of the image is not more than a predetermined amount. It may be a means for determining the content as a person image. Here, the “predetermined amount” includes the value 0. In other words, the image content of the image is determined to be a person image on the condition that the extracted object region does not touch the upper side and the left and right sides of the image.

さらに、本発明の画像処理装置において、前記画像内容判定手段は、前記抽出したオブジェクト領域内に、人物の両目に相当する横方向に並ぶ領域と該領域より下方向に位置する人物の口に相当する領域とが存在することを条件の一つとして、前記画像の画像内容を人物画像と判定する手段であるものとすることもできる。こうすれば、両目や口に相当する領域の存在に基づく人物画像の判定をより適切に行なうことができる。   Furthermore, in the image processing apparatus of the present invention, the image content determination means corresponds to a region aligned in the horizontal direction corresponding to both eyes of the person and a mouth of a person positioned below the region in the extracted object region. One of the conditions is that the image content of the image is a person image. In this way, it is possible to more appropriately determine a person image based on the presence of a region corresponding to both eyes and mouth.

こうした本発明の画像処理装置において、前記画像内容判定手段は、前記画像の画像内容が人物画像と判定されないときには、該画像の画像内容を風景画像と判定する手段であるものとすることもできる。   In such an image processing apparatus of the present invention, the image content determination means may be means for determining the image content of the image as a landscape image when the image content of the image is not determined as a person image.

また、本発明の画像処理装置において、前記画像補正回転手段は、前記画像の画像内容が風景画像のときには、所定の空色の画素が該画像の下辺に接していないことを条件の一つとして、該所定の空色を補正する空色補正処理を該画像に施す手段であるものとすることもできる。こうすれば、所定の空色の画素の配置に基づく空色補正処理をより適切に行なうことができる。   In the image processing apparatus of the present invention, when the image content of the image is a landscape image, the image correction rotation means is one of the conditions that a predetermined sky blue pixel is not in contact with the lower side of the image. It may be a means for applying a sky blue correction process for correcting the predetermined sky blue to the image. In this way, the sky blue correction process based on the arrangement of the predetermined sky blue pixels can be performed more appropriately.

さらに、本発明の画像処理装置において、前記画像は所定方式で圧縮されてなり、データを記憶するデータ記憶手段と前記指定された画像を先頭から順に少なくとも前記画素情報を取得可能な段階まで復元し該取得した画素情報を前記データ記憶手段に記憶すると共に該画像の復元過程において該画像の所定位置を起点として該画像を復元するための起点復元用情報を取得して前記データ記憶手段に記憶する情報演算取得手段とを備え、前記画像内容判定手段は前記データ記憶手段に記憶された画素情報に基づいて前記画像に含まれるオブジェクト領域を抽出する手段であり、前記画像補正回転手段は前記データ記憶手段に記憶された起点復元用情報に基づいて前記所定位置を起点として前記画像を復元することにより回転後の画像を上端から順に生成すると共に該生成された回転後の画像に前記所定の画像補正処理を施して出力する手段であるものとすることもできる。こうすれば、圧縮された画像の回転後の画像を起点復元用情報を用いて上端から順に生成して出力する際に、より適切に画像内容を判定して画像補正処理を施すことができる。   Further, in the image processing apparatus of the present invention, the image is compressed by a predetermined method, and the data storage means for storing data and the designated image are restored in order from the top to at least the stage where the pixel information can be acquired. The acquired pixel information is stored in the data storage means, and in the image restoration process, starting point restoration information for restoring the image from a predetermined position of the image is obtained and stored in the data storage means. Information calculation acquisition means, wherein the image content determination means is means for extracting an object area included in the image based on pixel information stored in the data storage means, and the image correction rotation means is the data storage Based on the origin restoration information stored in the means, the restored image is restored from the predetermined position as May be made so as to generate in the order is a means for outputting performing the predetermined image correction processing on the image after rotation that is the product. In this way, when the image after rotation of the compressed image is generated and output sequentially from the upper end using the starting point restoration information, it is possible to more appropriately determine the image content and perform image correction processing.

こうした本発明の画像処理装置において、前記画像補正回転手段は、前記画像の画像内容が人物画像のときには前記所定の画像補正処理として肌色を補正する肌色補正処理,ソフトフォーカス処理,明度補正処理のうち少なくとも一つを施す手段であるものとしたり、前記画像の画像内容が風景画像のときには前記所定の画像補正処理として新緑色を補正する新緑色補正処理,彩度補正処理の少なくとも一つを施す手段であるものとすることもできる。   In such an image processing apparatus of the present invention, the image correction rotation means includes a skin color correction process for correcting skin color, a soft focus process, and a brightness correction process as the predetermined image correction process when the image content of the image is a person image. Means for applying at least one, or means for applying at least one of a new green color correction process and a saturation correction process for correcting a new green color as the predetermined image correction process when the image content of the image is a landscape image It can also be assumed.

本発明のプリンタは、通信可能な記憶媒体から前記画像を取得するデータ取得手段と、上述したいずれかの態様の本発明の画像処理装置と、該画像処理装置から出力される画像を印刷する印刷実行手段と、を備えることを要旨とする。   The printer of the present invention includes a data acquisition unit that acquires the image from a communicable storage medium, the image processing apparatus of the present invention according to any one of the aspects described above, and a print that prints an image output from the image processing apparatus. And an execution means.

この本発明のプリンタでは、上述したいずれかの態様の本発明の画像処理装置を備えるから、本発明の画像処理装置が奏する効果、例えば、より適切に画像内容を判定することができる効果や画像を回転して出力する際の画像補正処理をより適切に施すことができる効果などを奏することができる。   Since the printer of the present invention includes the image processing apparatus of the present invention according to any one of the aspects described above, the effect exhibited by the image processing apparatus of the present invention, for example, the effect or image that can more appropriately determine the image content The effect that the image correction process at the time of rotating and outputting can be performed more appropriately can be exhibited.

本発明の画像処理方法は、
画像に所定の画像補正処理を施して出力する画像処理方法であって、
(a)指定された画像の回転を伴う出力指示がなされたときに、該画像の画素情報に基づいて該画像に含まれるオブジェクト領域を抽出し該抽出したオブジェクト領域の該画像全体に対する配置に基づいて該画像の画像内容を判定し、
(b)該判定された画像内容に基づいて前記指定された画像に所定の画像補正処理を施すと共に該画像を回転して出力する、
ことを要旨とする。
The image processing method of the present invention includes:
An image processing method for performing a predetermined image correction process on an image and outputting the image,
(A) When an output instruction accompanied with rotation of a designated image is made, an object region included in the image is extracted based on pixel information of the image, and based on the arrangement of the extracted object region with respect to the entire image To determine the image content of the image,
(B) A predetermined image correction process is performed on the designated image based on the determined image content, and the image is rotated and output.
This is the gist.

この本発明の画像処理方法では、指定された画像を回転して出力する際に、画像の画素情報に基づいてオブジェクト領域を抽出すると共に抽出したオブジェクト領域の画像全体に対する配置に応じて画像内容を判定し、この判定した画像内容に基づいて所定の画像処理を施すと共に回転して出力する。したがって、画像全体に対するオブジェクト領域の配置に基づく画像内容の判定を回転前の画像を用いて行なうから、より適切に画像内容を判定することができる。この結果、画像を回転して出力する際の画像補正処理をより適切に施すことができる。   In the image processing method of the present invention, when a specified image is rotated and output, the object area is extracted based on the pixel information of the image, and the image content is changed according to the arrangement of the extracted object area with respect to the entire image. Based on the determined image content, predetermined image processing is performed and the image is rotated and output. Therefore, since the image content based on the arrangement of the object area with respect to the entire image is determined using the image before rotation, the image content can be determined more appropriately. As a result, the image correction process when rotating and outputting the image can be performed more appropriately.

本発明の画像処理用プログラムは、
画像に所定の画像補正処理を施して出力する画像処理用プログラムであって、
指定された画像の回転を伴う出力指示がなされたときに、該画像の画素情報に基づいて該画像に含まれるオブジェクト領域を抽出し該抽出したオブジェクト領域の該画像全体に対する配置に基づいて該画像の画像内容を判定する画像内容判定モジュールと、
該判定された画像内容に基づいて前記指定された画像に所定の画像補正処理を施すと共に該画像を回転して出力する画像補正回転モジュールと、
を備えることを要旨とする。
The image processing program of the present invention includes:
An image processing program for performing predetermined image correction processing on an image and outputting the image,
When an output instruction accompanied with rotation of the designated image is made, an object area included in the image is extracted based on pixel information of the image, and the image is based on the arrangement of the extracted object area with respect to the entire image. An image content determination module for determining the image content of
An image correction rotation module for performing a predetermined image correction process on the designated image based on the determined image content and rotating and outputting the image;
It is a summary to provide.

この本発明の画像処理用プログラムでは、指定された画像を回転して出力する際に、画像の画素情報に基づいてオブジェクト領域を抽出すると共に抽出したオブジェクト領域の画像全体に対する配置に応じて画像内容を判定し、この判定した画像内容に基づいて所定の画像処理を施すと共に回転して出力する。したがって、画像全体に対するオブジェクト領域の配置に基づく画像内容の判定を回転前の画像を用いて行なうから、より適切に画像内容を判定することができる。この結果、画像を回転して出力する際の画像補正処理をより適切に施すことができる。   In the image processing program according to the present invention, when a specified image is rotated and output, the object area is extracted based on the pixel information of the image, and the image contents according to the arrangement of the extracted object area with respect to the entire image And performing predetermined image processing based on the determined image content and rotating and outputting the image. Therefore, since the image content based on the arrangement of the object area with respect to the entire image is determined using the image before rotation, the image content can be determined more appropriately. As a result, the image correction process when rotating and outputting the image can be performed more appropriately.

次に、本発明を実施するための最良の形態を実施例を用いて説明する。   Next, the best mode for carrying out the present invention will be described using examples.

図1は、本発明の一実施例としての画像処理装置を搭載したプリンタ20の構成の概略を示す構成図である。実施例のプリンタ20は、図示するように、装置全体を制御する制御部21と、メモリカードなどの記憶媒体30やデジタルスチルカメラ31,パーソナルコンピュータ32などとの接続を司るインタフェース部22と、記憶媒体30などから読み込んだ画像ファイルに対して各種の画像処理を施す画像処理部23と、データを一時的に記憶するデータバッファ24と、読み込んだ画像ファイルに色変換処理や二値化処理などを施して印刷データを生成する印刷データ生成部25と、生成された印刷データを蓄積するイメージバッファ26と、イメージバッファ26に蓄積された印刷データに基づいて印刷を実行するプリンタエンジン27とを備え、各色のインクを用紙に噴射して印刷を行なうインクジェットプリンタとして構成されている。画像処理部23では、記憶媒体30などに記憶されJPEG方式などで圧縮された画像ファイルを復元する処理なども行なわれる。JPEG方式の画像ファイルは、ブロック分割や離散コサイン変換(以下、DCTと略す)演算,量子化処理,ハフマン符号化などの工程を経て圧縮されている。こうしたJPEG方式の画像ファイルは一般的な画像ファイルであり、本発明の中核をなさないから、これ以上の詳細な説明は省略する。   FIG. 1 is a configuration diagram showing an outline of the configuration of a printer 20 equipped with an image processing apparatus as an embodiment of the present invention. As shown in the figure, the printer 20 of the embodiment includes a control unit 21 that controls the entire apparatus, an interface unit 22 that manages connection with a storage medium 30 such as a memory card, a digital still camera 31, a personal computer 32, and the like, and a storage unit. An image processing unit 23 that performs various types of image processing on an image file read from the medium 30 and the like, a data buffer 24 that temporarily stores data, and color conversion processing and binarization processing are performed on the read image file. A print data generation unit 25 that performs print data generation, an image buffer 26 that stores the generated print data, and a printer engine 27 that executes printing based on the print data stored in the image buffer 26. It is configured as an ink jet printer that performs printing by ejecting ink of each color onto paper.The image processing unit 23 also performs processing for restoring an image file stored in the storage medium 30 or the like and compressed by the JPEG method or the like. A JPEG image file is compressed through steps such as block division, discrete cosine transform (hereinafter abbreviated as DCT) operation, quantization processing, and Huffman coding. Such a JPEG image file is a general image file and does not form the core of the present invention.

次に、こうして構成されたプリンタ20の動作、特に、記憶媒体30などから読み込んだ画像ファイルに対して画像補正処理を施すと共に回転して印刷する際の動作について説明する。図2は、画像ファイルの回転を伴う印刷指示がなされたときに制御部21や画像処理部23,印刷データ生成部25などにより実行される画像回転印刷処理の一例を示すフローチャートである。画像ファイルの回転を伴う印刷指示がなされるケースとしては、例えば、プリンタ20の図示しない操作パネルなどを介して画像ファイルの回転を要する印刷レイアウトが設定されて印刷が指示されたときなどを挙げることができる。また、実施例では、画像ファイルを右方向に90°回転する場合を具体例として説明する。   Next, the operation of the printer 20 configured as described above, particularly the operation when performing image correction processing and rotating printing on an image file read from the storage medium 30 will be described. FIG. 2 is a flowchart illustrating an example of image rotation printing processing executed by the control unit 21, the image processing unit 23, the print data generation unit 25, and the like when a printing instruction involving rotation of an image file is made. An example of a case where a print instruction accompanied by rotation of an image file is given is when a print layout that requires rotation of the image file is set via a control panel (not shown) of the printer 20 and printing is instructed. Can do. In the embodiment, a case where the image file is rotated 90 degrees rightward will be described as a specific example.

画像回転印刷処理では、まず、図示するように、印刷指示に係る画像ファイルの1アクセス単位のデータを記憶媒体30などから読み込み(ステップS100)、読み込んだデータをハフマン解凍する処理を実行する(ステップS110)。ここで、アクセス単位とは、記憶媒体30などの仕様に応じて予め定められているデータの読込単位であり、例えば、フラッシュメモリにおけるセクタなどが該当する。また、図3に例示するように、JPEG方式で圧縮された画像ファイルの各ブロックのデータサイズはアクセス単位とは必ずしも一致せず、各ブロック間のデータサイズも異なるから、1ブロックのデータが複数のアクセス単位に跨ることがある。   In the image rotation printing process, as shown in the figure, first, data for one access unit of an image file related to a print instruction is read from the storage medium 30 or the like (step S100), and a process for decompressing the read data is executed (step S100). S110). Here, the access unit is a data reading unit predetermined according to the specifications of the storage medium 30 and the like, and corresponds to a sector in the flash memory, for example. In addition, as illustrated in FIG. 3, the data size of each block of the image file compressed by the JPEG method does not necessarily match the access unit, and the data size between the blocks is different. Across multiple access units.

そして、1ブロック分のデータがハフマン解凍されるまでアクセス単位のデータを読み込んでハフマン解凍する処理を繰り返し実行し、1ブロック分のデータが解凍されると(ステップS120)、解凍されたデータ(ブロックの量子化DCT係数)に対して逆量子化処理を実行する(ステップS130)。逆量子化処理を実行することにより、ブロックのDCT係数が取得される。ここで、JPEG方式の画像ファイルでは、量子化DCT係数の量子化DC成分についてはブロック間の差分値がハフマン符号化されているから、ハフマン解凍により得られる量子化DC成分の差分値を累計することにより量子化DC成分が取得され、この量子化DC成分に逆量子化処理を施すことによりDC成分が取得される。   Then, the process of reading the data in the access unit and decompressing the Huffman is repeatedly executed until the data for one block is decompressed. When the data for one block is decompressed (step S120), the decompressed data (block Inverse quantization processing is performed on the (quantized DCT coefficients) (step S130). By executing the inverse quantization process, the DCT coefficients of the block are obtained. Here, in the JPEG image file, since the difference value between blocks is quantized for the quantized DC component of the quantized DCT coefficient, the difference value of the quantized DC component obtained by Huffman decompression is accumulated. As a result, a quantized DC component is acquired, and a DC component is acquired by applying an inverse quantization process to the quantized DC component.

次に、現在のブロックが起点ブロックであるか否かを判定する(ステップS140)。ここで、起点ブロックとは、画像ファイルを途中から復元する起点となるブロックであり、実施例では、画像を右方向に90°回転したときに上端となる左端のブロックを起点ブロックとした(図4参照)。   Next, it is determined whether or not the current block is a starting block (step S140). Here, the starting block is a block that is a starting point for restoring the image file from the middle, and in the embodiment, the leftmost block that is the upper end when the image is rotated 90 ° rightward is the starting block (see FIG. 4).

そして、現在のブロックが起点ブロックである場合には、このブロックを起点として画像ファイルを復元するための起点復元用情報をデータバッファ24の所定領域に記憶する(ステップS150)。起点復元用情報は、具体的には、起点ブロックのデータが開始されるアクセス単位の物理的な位置を示すファイルポインタと、このアクセス単位から起点ブロックのデータをハフマン解凍するための解凍中間情報と、起点ブロックのDC成分とにより構成される。図5は、解凍中間情報を概念的に説明するための説明図である。前述したように、各ブロックのデータサイズとアクセス単位とは必ずしも一致せず、各ブロック間のデータサイズも異なるから、起点ブロックのデータが開始されるアクセス単位には前のブロックのデータも含まれることになる。したがって、起点ブロックのデータをハフマン解凍するためには前のブロックのデータのハフマン解凍に関する情報(例えば、前のブロックのデータとしてハフマン解凍されたビット数など)が必要であり、こうした情報が解凍中間情報に該当する。   If the current block is the starting block, the starting point restoration information for restoring the image file starting from this block is stored in a predetermined area of the data buffer 24 (step S150). Specifically, the origin restoration information includes a file pointer indicating the physical position of the access unit where the data of the origin block is started, and decompression intermediate information for decompressing the data of the origin block from the access unit. And the DC component of the starting block. FIG. 5 is an explanatory diagram for conceptually explaining the decompression intermediate information. As described above, since the data size of each block does not necessarily match the access unit, and the data size between the blocks is different, the access unit in which the data of the starting block is started includes the data of the previous block. It will be. Therefore, in order to perform Huffman decompression on the data of the starting block, information on Huffman decompression of the data of the previous block (for example, the number of bits decompressed by Huffman as data of the previous block) is necessary, and such information is in the middle of decompression. Applicable to information.

続いて、ステップS130の逆量子化処理により取得したDCT係数に対して逆DCT演算処理を施してブロックの画素情報を取得すると共に(ステップS160)、取得した画素情報の色空間を変換する色変換処理を実行する(ステップS170)。ここで、色変換処理は、JPEG方式の画像ファイルで用いられるYCC色空間をRGB色空間に変換する処理である。   Subsequently, inverse DCT calculation processing is performed on the DCT coefficient acquired by the inverse quantization processing in step S130 to acquire pixel information of the block (step S160), and color conversion for converting the color space of the acquired pixel information Processing is executed (step S170). Here, the color conversion process is a process of converting the YCC color space used in the JPEG image file into the RGB color space.

こうしてRGB色空間に変換された画素情報が得られると、画像ファイル全体のRGB値の分布を示すヒストグラムを累計してデータバッファ24の所定領域に記憶する(ステップS180)。なお、ヒストグラムを累計する対象とする画素は、適当なルールでサンプリングした画素としてもよい。   When the pixel information converted into the RGB color space is obtained in this way, a histogram indicating the distribution of RGB values of the entire image file is accumulated and stored in a predetermined area of the data buffer 24 (step S180). Note that the pixels for which histograms are to be accumulated may be pixels sampled according to an appropriate rule.

次に、現在のブロックの画素のうち肌色の画素からなる肌色領域や空色の画素からなる空色領域を抽出してデータバッファ24の所定領域に記憶する(ステップS185)。ここで、肌色領域や空色領域の抽出は、肌色や空色に相当するRGB値の範囲を予め定めておき、このRGB値の範囲内の画素を抽出することにより行なわれる。   Next, a flesh-color area composed of skin-colored pixels and a sky-blue area composed of sky-blue pixels are extracted from the pixels of the current block and stored in a predetermined area of the data buffer 24 (step S185). Here, the skin color area and the sky blue area are extracted by predetermining a range of RGB values corresponding to the skin color and sky blue, and extracting pixels within the range of the RGB values.

そして、現在のブロックが画像ファイルの最後のブロックでないときにはステップS100に戻り(ステップS190)、次のブロックについてステップS100〜S185の処理を繰り返し実行する。図6は、ステップS100〜S185の処理を繰り返し実行した際の起点復元用情報の一例を示す説明図である。図示するように、実施例では起点ブロックとして画像の左端のブロックが設定されているから、左端のブロックについての起点復元用情報(ファイルポインタと解凍中間情報とDC成分)が上のブロックから順に記憶されている。このように、画像ファイルを先頭から順に復元することにより、起点復元用情報やRGB値のヒストグラムを取得すると共に肌色領域や空色領域を抽出してデータバッファ24に記憶するのである。   When the current block is not the last block of the image file, the process returns to step S100 (step S190), and the processes of steps S100 to S185 are repeatedly executed for the next block. FIG. 6 is an explanatory diagram illustrating an example of the starting point restoration information when the processes of steps S100 to S185 are repeatedly executed. As shown in the figure, since the leftmost block of the image is set as the starting block in the embodiment, the starting point restoration information (file pointer, decompression intermediate information and DC component) for the leftmost block is stored in order from the upper block. Has been. Thus, by restoring the image file in order from the top, the starting point restoration information and the RGB value histogram are acquired, and the skin color area and the sky blue area are extracted and stored in the data buffer 24.

こうして画像ファイルの最後のブロックまでステップS100〜S185の処理を繰り返し実行すると、次に、ステップS185で抽出した肌色領域に基づいて画像内容が人物画像であるか風景画像であるかを判定するオブジェクト認識処理を実行する(ステップS195)。ここで、画像回転印刷処理の説明を中断し、図7に例示するオブジェクト認識処理について説明する。   When the processes in steps S100 to S185 are repeatedly executed up to the last block of the image file in this way, next, object recognition for determining whether the image content is a person image or a landscape image based on the skin color area extracted in step S185. Processing is executed (step S195). Here, the description of the image rotation printing process is interrupted, and the object recognition process illustrated in FIG. 7 will be described.

オブジェクト認識処理では、まず、図7に示すように、画像回転印刷処理のステップS185で抽出した肌色領域に関する情報をデータバッファ24から読み込む処理を実行する(ステップS500)。肌色領域の一例を図8に示す。そして、肌色領域の大きさが所定の大きさ以上であるか否か、肌色領域が画像の上辺または左右辺に接しているか否か、肌色領域内に人物の両目や口に相当する画素領域が存在するか否かについてそれぞれ判定する(ステップSS510〜S530)。ここで、所定の大きさは、画像全体に対する面積比などを用いて設定することができ、実施例では、画像全体の20%の大きさを所定の大きさとして設定した。また、両目や口に相当する画素領域が存在するか否かの判定は、肌色領域内の画素のうち周辺の画素より明度が低い画素領域を抽出し、この明度が低い画素領域が、図9に示すように、略逆三角形の頂点の位置(即ち、横方向に並ぶ二つの位置とこの二つの位置より下方向の一つの位置)に存在するときには、これらを両目や口に相当する画素領域と判定するものとした。   In the object recognition process, first, as shown in FIG. 7, a process of reading information on the skin color area extracted in step S185 of the image rotation printing process from the data buffer 24 is executed (step S500). An example of the skin color region is shown in FIG. Then, whether or not the size of the skin color area is equal to or larger than a predetermined size, whether or not the skin color area is in contact with the upper side or the left and right sides of the image, and a pixel area corresponding to both eyes and mouth of the person is in the skin color area It is determined whether or not it exists (steps SS510 to S530). Here, the predetermined size can be set using an area ratio with respect to the entire image, and in the embodiment, the size of 20% of the entire image is set as the predetermined size. Whether or not there is a pixel region corresponding to both eyes or mouth is determined by extracting a pixel region having a lower brightness than the surrounding pixels from the pixels in the skin color region, and the pixel region having the lower brightness is shown in FIG. As shown in FIG. 4, when the vertexes of the substantially inverted triangle exist (that is, two positions aligned in the horizontal direction and one position below the two positions), these are pixel areas corresponding to both eyes and mouth. It shall be judged.

そして、肌色領域の大きさが所定の大きさ以上であり、上辺と左右辺のいずれにも接しておらず、両目や口に相当する画素領域が存在するときには、画像内容を人物画像と判定し(ステップS540)、これ以外のときには画像内容を風景画像と判定して(ステップS550)、このオブジェクト認識処理を終了する。図8に例示した肌色領域では、画像全体の20%以上の大きさであると共に画像の上辺や左右辺に接しておらず、両目や口に相当する画素領域も存在するから、この画像の画像内容は人物画像であると判定されることになる。   When the skin color area is equal to or larger than the predetermined size, does not touch either the upper side or the left and right sides, and there is a pixel area corresponding to both eyes and mouth, the image content is determined to be a human image. (Step S540), otherwise, the image content is determined to be a landscape image (Step S550), and this object recognition process is terminated. The skin color area illustrated in FIG. 8 has a size of 20% or more of the entire image, does not touch the upper and left and right sides of the image, and there are pixel areas corresponding to both eyes and mouth. The content is determined to be a person image.

こうしてオブジェクト認識処理により画像内容を判定すると、画像回転印刷処理では、次に、判定した画像内容や累計したRGB値のヒストグラムなどに基づいて画像ファイルに対して自動補正処理を施すための自動補正処理用パラメータを計算してデータバッファ24の所定領域に記憶する(ステップS200)。自動補正処理用パラメータの計算は、各種のルールを適用して行なうことができる。実施例では、画像内容が人物画像であるときには、肌色がより良好な肌色となるように補正する肌色補正処理やソフトフォーカス処理、明度をやや明るめに補正する明度補正処理などを施すようにパラメータを計算し、画像内容が風景画像であるときには、新緑色がより良好な新緑色となるように補正する新緑色補正処理や彩度が鮮やかとなるように補正する彩度補正処理などを施すようにパラメータを計算するものとした。また、画像内容が風景画像である場合には、さらに、ステップS185で抽出した空色領域が画像の下辺に接していないときには、この空色領域が空であると判断し、空色がより良好な空色となるように補正する空色補正処理を施すようにパラメータを計算するものとした(図10参照)。なお、画像内容が人物画像であるか風景画像であるかに拘らず、RGB値のヒストグラムに応じて各種の画像補正処理(コントラスト補正処理やγ補正処理など)を施すようなパラメータの計算も行なわれる。   When the image content is determined by the object recognition processing in this way, the image rotation printing processing next performs automatic correction processing for performing automatic correction processing on the image file based on the determined image content, a histogram of accumulated RGB values, and the like. Parameters are calculated and stored in a predetermined area of the data buffer 24 (step S200). The calculation of the parameters for automatic correction processing can be performed by applying various rules. In the embodiment, when the image content is a human image, the parameters are set so as to perform a skin color correction process and a soft focus process for correcting the skin color to be a better skin color, a brightness correction process for correcting the brightness to be slightly brighter, and the like. When the image content is a landscape image, a new green correction process that corrects the new green color to be a better new green color, a saturation correction process that corrects the saturation to be vivid, etc. The parameters were calculated. If the image content is a landscape image, and if the sky blue area extracted in step S185 is not in contact with the lower side of the image, it is determined that the sky blue area is empty, and the sky blue is a better sky blue. The parameters are calculated so as to perform a sky blue correction process for correcting so as to be (see FIG. 10). Regardless of whether the image content is a person image or a landscape image, parameters are calculated such that various image correction processing (contrast correction processing, γ correction processing, etc.) is performed according to the RGB value histogram. It is.

続いて、データバッファ24に記憶されている起点復元用情報のうち最初の起点ブロックのファイルポインタを読み込み(ステップS210)、読み込んだファイルポインタにより特定されるアクセス単位のデータを記憶媒体30などから読み込んでハフマン解凍する(ステップS220)。この際、起点復元用情報の解凍中間情報を用いることにより、アクセス単位のデータのうち起点ブロックのデータを解凍することができる。   Subsequently, the file pointer of the first starting block in the starting point restoration information stored in the data buffer 24 is read (step S210), and the data of the access unit specified by the read file pointer is read from the storage medium 30 or the like. The Huffman decompression is performed (step S220). At this time, by using the decompression intermediate information of the origin restoring information, the data of the origin block can be decompressed from the data in the access unit.

そして、1ブロック分のデータを解凍すると(ステップS230)、逆量子化処理や逆DCT演算処理,色変換処理を実行する(ステップS240〜S260)。ここで、DCT係数のDC成分を取得する際には、起点復元用情報のDC成分が読み込まれる。   When one block of data is decompressed (step S230), inverse quantization processing, inverse DCT calculation processing, and color conversion processing are executed (steps S240 to S260). Here, when the DC component of the DCT coefficient is acquired, the DC component of the starting point restoration information is read.

続いて、ステップS200で計算した自動補正処理用パラメータに従ってこのブロックに対して自動補正処理を施すと共に(ステップS270)、右方向に90°回転させてデータバッファ24の所定領域に出力する(ステップS280)。データバッファ24の所定領域に出力する際には、ブロック自体を回転させると共にブロックの位置が回転後の位置となるように(例えば、左上隅のブロックは右上隅となるように)出力される。   Subsequently, the block is subjected to automatic correction processing according to the automatic correction processing parameter calculated in step S200 (step S270), and rotated 90 degrees rightward and output to a predetermined area of the data buffer 24 (step S280). ). When outputting to a predetermined area of the data buffer 24, the block itself is rotated and output so that the position of the block becomes the position after the rotation (for example, the block in the upper left corner becomes the upper right corner).

こうしてブロックを回転して出力すると、このブロックの起点復元用情報を次のブロック(右隣のブロック)の起点復元用情報に更新する(ステップS290)。即ち、次のブロックのデータが開始されるアクセス単位のファイルポインタと、解凍中間情報と、DC成分とに更新する(図11参照)。ここでのDC成分は、現在のブロックの量子化DC成分が格納される。従って、次のブロックを復元する際には、この量子化DC成分と次のブロックのデータをハフマン解凍して得られる差分値とを累計することにより次のブロックの量子化DC成分を取得することになる。   When the block is rotated and output in this manner, the starting point restoration information of this block is updated to the starting point restoration information of the next block (the block on the right side) (step S290). That is, the file pointer of the access unit where the data of the next block is started, the decompression intermediate information, and the DC component are updated (see FIG. 11). The DC component here stores the quantized DC component of the current block. Therefore, when the next block is restored, the quantized DC component of the next block is obtained by accumulating the quantized DC component and the difference value obtained by Huffman decompressing the data of the next block. become.

そして、データバッファ24の所定領域に出力される回転後のブロックが蓄積されてプリンタエンジン27により印刷を実行する単位であるバンド単位となるまで、ステップS210〜S290の処理を繰り返し実行する(ステップS300)。図12は、ステップS210〜S290の処理が繰り返し実行される様子を示す説明図である。図示するように、起点ブロックとしての左端のブロックを上から順に対象としてステップS210〜S290の処理を実行することにより回転後の画像の上端のブロックが出力され、左端のブロックを対象とした処理が終了すると、左端のブロックの右隣の列のブロックを上から順に対象としてステップS210〜S290の処理を繰り返し実行する。そして、図13に示すように、蓄積された回転後のブロックがバンド単位となると、このバンド単位のデータに基づいて印刷データ生成部25により印刷データを生成してイメージバッファ26に出力し、この印刷データに基づいてプリンタエンジン27により印刷を実行する(ステップS310)。そして、画像ファイルの最後のブロックまで到達したときに(ステップS320)、この画像回転印刷処理を終了するのである。   Then, the processes in steps S210 to S290 are repeatedly executed until the rotated blocks output in a predetermined area of the data buffer 24 are accumulated and become a band unit which is a unit for executing printing by the printer engine 27 (step S300). ). FIG. 12 is an explanatory diagram showing how the processes in steps S210 to S290 are repeatedly executed. As shown in the figure, by executing the processing of steps S210 to S290 with the left end block as the starting block in order from the top, the upper end block of the rotated image is output, and the processing for the left end block is performed. When the processing is completed, the processes in steps S210 to S290 are repeatedly executed on the blocks in the column adjacent to the right of the leftmost block in order from the top. As shown in FIG. 13, when the accumulated rotated block is in band units, print data is generated by the print data generation unit 25 based on the data in band units and output to the image buffer 26. Printing is executed by the printer engine 27 based on the print data (step S310). When the last block of the image file is reached (step S320), the image rotation printing process is terminated.

以上説明した実施例のプリンタ20によれば、画像ファイルに対して画像補正処理を施すと共に回転して印刷する際に、画像ファイルを先頭から順に復元して起点復元用情報やRGB値のヒストグラムを取得すると共に肌色領域などを抽出してデータバッファ24に記憶し、この肌色領域の大きさや位置,両目や口に相当する画素領域の存在に基づいて画像内容が人物画像か風景画像かを判定して自動補正処理用のパラメータを計算し、起点復元用情報を用いて画像ファイルを起点ブロックから復元することにより回転後の画像を上端から順に生成すると共に計算したパラメータに従って自動補正処理を施して出力することができる。したがって、画像内容の判定を回転前の画像を用いて行なうから、より適切に画像内容を判定することができる。この結果、画像を回転して出力する際の画像補正処理をより適切に施すことができる。   According to the printer 20 of the embodiment described above, when image correction processing is performed on an image file and the image file is rotated and printed, the image file is restored in order from the beginning, and the origin restoration information and the RGB value histogram are displayed. At the same time, the skin color area and the like are extracted and stored in the data buffer 24. Based on the size and position of the skin color area and the presence of pixel areas corresponding to both eyes and mouth, it is determined whether the image content is a person image or a landscape image. The parameters for automatic correction processing are calculated, and the image file is restored from the starting point block using the starting point restoration information, and the rotated images are generated in order from the top, and the automatic correction processing is performed according to the calculated parameters and output. can do. Therefore, since the image content is determined using the image before rotation, the image content can be determined more appropriately. As a result, the image correction process when rotating and outputting the image can be performed more appropriately.

ここで、実施例のプリンタ20では、データバッファ24がデータ記憶手段に相当し、ステップS100〜S190の処理を実行する制御部21や画像処理部23が情報演算取得手段に相当し、ステップS195のオブジェクト認識処理を実行する制御部21や画像処理部23が画像内容判定手段に相当し、ステップS200〜S300の処理を実行する制御部21や画像処理部23が画像補正回転手段に相当する。また、インタフェース部22がデータ取得手段に相当し、ステップS310の処理を実行する制御部21や印刷データ生成部25,プリンタエンジン27が印刷実行手段に相当する。また、肌色領域がオブジェクト領域に相当する。   Here, in the printer 20 of the embodiment, the data buffer 24 corresponds to the data storage unit, the control unit 21 and the image processing unit 23 that execute the processes of steps S100 to S190 correspond to the information calculation acquisition unit, and the process of step S195 is performed. The control unit 21 and the image processing unit 23 that execute the object recognition process correspond to an image content determination unit, and the control unit 21 and the image processing unit 23 that execute the processes of steps S200 to S300 correspond to an image correction rotation unit. The interface unit 22 corresponds to a data acquisition unit, and the control unit 21, the print data generation unit 25, and the printer engine 27 that execute the process of step S310 correspond to a print execution unit. The skin color area corresponds to the object area.

実施例のプリンタ20では、肌色の画素からなる肌色領域を抽出して画像内容の判定に用いるものとしたが、人物の顔などに相当するオブジェクト領域を抽出することができればよいから、その他の基準で抽出するものとしてもよい。例えば、隣接する画素との輝度差に基づくエッジ度が所定の閾値より大きなエッジ画素をオブジェクト領域として抽出するものとしてもよい。   In the printer 20 of the embodiment, the skin color area composed of the skin color pixels is extracted and used for the determination of the image content. However, it is sufficient that an object area corresponding to a human face or the like can be extracted. It is good also as what is extracted by. For example, an edge pixel having an edge degree based on a luminance difference between adjacent pixels larger than a predetermined threshold may be extracted as an object region.

実施例のプリンタ20では、肌色領域が画像の上辺と左右辺のいずれにも接していないことを条件の一つとして画像内容を人物画像と判定するものとしたが、上辺や左右辺に若干接していても構わない。   In the printer 20 of the embodiment, the image content is determined to be a person image on the condition that the skin color area is not in contact with either the upper side or the left and right sides of the image. It does not matter.

実施例のプリンタ20では、肌色領域の大きさが所定の大きさ以上であるか否か、肌色領域が画像の上辺または左右辺に接しているか否か、肌色領域内に人物の両目や口に相当する画素領域が存在するか否かに基づいて画像内容を人物画像と判定するものとしたが、これに限られないのは勿論であり、これらのうち1つまたは2つの条件を満たしたときに人物画像と判定するものとしてもよいし、その他の条件を用いるものとしても構わない。   In the printer 20 of the embodiment, whether the size of the skin color area is equal to or larger than a predetermined size, whether the skin color area is in contact with the upper side or the left side of the image, and in the eyes and mouth of the person in the skin color area. The image content is determined to be a person image based on whether or not the corresponding pixel area exists, but the present invention is not limited to this, and when one or two of these conditions are satisfied The image may be determined as a person image, or other conditions may be used.

実施例のプリンタ20では、人物画像と判定されないときには風景画像と判定するものとしたが、これに限られないのは勿論である。例えば、空色領域の配置などに基づいて風景画像と判定するものとしても構わない。さらに、人物画像と風景画像以外の画像内容を判定するものとしても差し支えない。   In the printer 20 of the embodiment, it is determined that the image is a landscape image when the image is not determined to be a person image, but the present invention is not limited to this. For example, the image may be determined as a landscape image based on the arrangement of the sky blue area. Furthermore, it is possible to determine image contents other than a person image and a landscape image.

実施例のプリンタ20では、JPEG方式で圧縮された画像ファイルを例に説明したが、その他の方式で圧縮された画像ファイルに適用することができるのは勿論である。この場合、その圧縮方式に応じて、画像ファイルを所定位置(例えば、左端の画素)から復元するために必要な情報を起点復元用情報として記憶するものとすればよい。   In the printer 20 of the embodiment, the image file compressed by the JPEG method has been described as an example, but it is needless to say that the printer 20 can be applied to an image file compressed by another method. In this case, according to the compression method, information necessary for restoring the image file from a predetermined position (for example, the leftmost pixel) may be stored as the starting point restoration information.

実施例のプリンタ20では、右方向に90°回転する場合を具体例として説明したが、これに限られないのは勿論である。例えば、180°回転する場合には、起点ブロックとしての左端のブロックを下から順に復元することにより回転後の画像の上端のブロックから順に出力することができる。さらに、左方向に90°回転する場合には、図14に例示するように、起点ブロックとして、左端のブロックに加え、画像ファイルの略中央に位置する列を起点ブロックとし、回転後の画像の上半分については略中央に位置する列の起点ブロックを起点として復元し、回転後の画像の下半分については左端の起点ブロックを起点として復元するものとすればよい。   In the printer 20 of the embodiment, the case where it is rotated 90 ° in the right direction has been described as a specific example, but it is needless to say that the present invention is not limited to this. For example, in the case of 180 ° rotation, the leftmost block as the starting block can be restored in order from the bottom to sequentially output from the uppermost block of the rotated image. Furthermore, in the case of 90 ° rotation in the left direction, as illustrated in FIG. 14, in addition to the leftmost block, the column located at the approximate center of the image file is used as the starting block as the starting block, The upper half may be restored starting from the starting block of the column located substantially in the center, and the lower half of the rotated image may be restored starting from the leftmost starting block.

実施例のプリンタ20では、画像ファイルを先頭から順に復元して取得した起点復元用情報を用いて画像ファイルを起点ブロックから復元することにより回転後の画像を上端から順に生成するものとしたが、必ずしもこのように画像の回転を行なわなくても構わないのは勿論であり、例えば、画像全体を復元してから回転する処理を行なうものとしても差し支えない。   In the printer 20 of the embodiment, the rotated image is generated in order from the upper end by restoring the image file from the starting point block using the starting point restoring information acquired by restoring the image file in order from the top. Of course, it is not always necessary to rotate the image in this way. For example, the image may be rotated after the entire image is restored.

実施例では、画像内容の判定を回転前の画像を用いて行なって画像補正処理を施す本発明をプリンタ20の形態として説明したが、こうした画像補正処理を施す画像処理装置の形態としてもよい。また、こうした画像処理方法の形態としたり画像処理用プログラムの形態とすることもできる。   In the embodiment, the present invention in which image content determination is performed using an image before rotation and image correction processing is performed has been described as a form of the printer 20, but an image processing apparatus that performs such image correction processing may be used. Further, it can be in the form of such an image processing method or an image processing program.

以上、本発明を実施するための最良の形態について実施例を用いて説明したが、本発明はこうした実施例に何等限定されるものではなく、本発明の要旨を逸脱しない範囲内において、種々なる形態で実施し得ることは勿論である。   The best mode for carrying out the present invention has been described with reference to the embodiments. However, the present invention is not limited to these embodiments, and various modifications can be made without departing from the gist of the present invention. Of course, it can be implemented in the form.

本発明の画像処理装置を搭載したプリンタ20の構成の概略を示す構成図。1 is a configuration diagram showing an outline of the configuration of a printer 20 equipped with an image processing apparatus of the present invention. 画像回転印刷処理の一例を示すフローチャート。6 is a flowchart illustrating an example of image rotation printing processing. 画像ファイルのブロックとアクセス単位との関係を示す説明図。Explanatory drawing which shows the relationship between the block of an image file, and an access unit. 起点ブロックの一例を示す説明図。Explanatory drawing which shows an example of a starting point block. 解凍中間情報を概念的に説明するための説明図。Explanatory drawing for demonstrating conceptually decompress | decompressing intermediate information. 起点復元用情報の一例を示す説明図。An explanatory view showing an example of information for starting point restoration. オブジェクト認識処理の一例を示すフローチャート。The flowchart which shows an example of an object recognition process. 肌色領域の一例を示す説明図。Explanatory drawing which shows an example of a skin color area | region. 両目や口に相当する画素領域の一例を示す説明図。Explanatory drawing which shows an example of the pixel area | region corresponded to both eyes and an opening | mouth. 風景画像の空色領域の一例を示す説明図。Explanatory drawing which shows an example of the sky blue area | region of a landscape image. 起点復元用情報を更新する様子の一例を示す説明図。Explanatory drawing which shows an example of a mode that the information for starting point restoration is updated. ステップS210〜S290の処理が実行される様子を示す説明図。Explanatory drawing which shows a mode that the process of step S210-S290 is performed. 蓄積された回転後のブロックがバンド単位となる様子を示す説明図。Explanatory drawing which shows a mode that the block after rotation accumulate | stored becomes a band unit. 変形例の起点ブロックの一例を示す説明図。Explanatory drawing which shows an example of the starting point block of a modification.

符号の説明Explanation of symbols

20 プリンタ、21 制御部、22 インタフェース部、23 画像処理部、24 データバッファ、25 印刷データ生成部、26 イメージバッファ、27 プリンタエンジン、30 記憶媒体、31 デジタルスチルカメラ、32 パーソナルコンピュータ。   20 printer, 21 control unit, 22 interface unit, 23 image processing unit, 24 data buffer, 25 print data generation unit, 26 image buffer, 27 printer engine, 30 storage medium, 31 digital still camera, 32 personal computer.

Claims (10)

画像に所定の画像補正処理を施して出力する画像処理装置であって、
指定された画像の回転を伴う出力指示がなされたときに、該画像の画素情報に基づいて該画像に含まれるオブジェクト領域を抽出し該抽出したオブジェクト領域の該画像全体に対する配置に基づいて該画像の画像内容を判定する画像内容判定手段と、
該判定された画像内容に基づいて前記指定された画像に所定の画像補正処理を施すと共に該画像を回転して出力する画像補正回転手段と、
を備える画像処理装置。
An image processing apparatus that performs predetermined image correction processing on an image and outputs the image,
When an output instruction accompanied with rotation of the designated image is made, an object area included in the image is extracted based on pixel information of the image, and the image is based on the arrangement of the extracted object area with respect to the entire image. Image content determination means for determining the image content of
Image correction rotation means for performing predetermined image correction processing on the designated image based on the determined image content and rotating and outputting the image;
An image processing apparatus comprising:
前記画像内容判定手段は、所定の肌色の画素により構成される領域を前記オブジェクト領域として抽出し該抽出したオブジェクト領域の前記画像全体に対する配置に基づいて該画像の画像内容を人物画像と判定する手段である請求項1記載の画像処理装置。   The image content determining means extracts a region composed of pixels of a predetermined skin color as the object region, and determines the image content of the image as a person image based on the arrangement of the extracted object region with respect to the entire image The image processing apparatus according to claim 1. 前記画像内容判定手段は、前記抽出したオブジェクト領域の該画像の上辺および左右辺に接する量が所定量以下であることを条件の一つとして該画像の画像内容を人物画像と判定する手段である請求項1または2記載の画像処理装置。   The image content determination means is a means for determining that the image content of the image is a person image on the condition that the amount of the extracted object region contacting the upper side and the left and right sides of the image is not more than a predetermined amount. The image processing apparatus according to claim 1. 前記画像内容判定手段は、前記抽出したオブジェクト領域内に、人物の両目に相当する横方向に並ぶ領域と該領域より下方向に位置する人物の口に相当する領域とが存在することを条件の一つとして、前記画像の画像内容を人物画像と判定する手段である請求項1ないし3いずれか記載の画像処理装置。   The image content determination means is provided on the condition that a region aligned in the horizontal direction corresponding to both eyes of the person and a region corresponding to the mouth of the person positioned below the region exist in the extracted object region. 4. The image processing apparatus according to claim 1, wherein the image processing apparatus is means for determining the image content of the image as a person image. 前記画像内容判定手段は、前記画像の画像内容が人物画像と判定されないときには、該画像の画像内容を風景画像と判定する手段である請求項1ないし4いずれか記載の画像処理装置。   5. The image processing apparatus according to claim 1, wherein the image content determination unit is a unit that determines that the image content of the image is a landscape image when the image content of the image is not determined to be a person image. 前記画像補正回転手段は、前記画像の画像内容が風景画像のときには、所定の空色の画素が該画像の下辺に接していないことを条件の一つとして、該所定の空色を補正する空色補正処理を該画像に施す手段である請求項1ないし5いずれか記載の画像処理装置。   When the image content of the image is a landscape image, the image correction rotation means corrects the predetermined sky color on the condition that a predetermined sky blue pixel is not in contact with the lower side of the image. The image processing apparatus according to claim 1, wherein the image processing apparatus is a unit that applies the image to the image. 請求項1ないし6いずれか記載の画像処理装置であって、
前記画像は、所定方式で圧縮されてなり、
データを記憶するデータ記憶手段と、
前記指定された画像を先頭から順に少なくとも前記画素情報を取得可能な段階まで復元し該取得した画素情報を前記データ記憶手段に記憶すると共に、該画像の復元過程において、該画像の所定位置を起点として該画像を復元するための起点復元用情報を取得して前記データ記憶手段に記憶する情報演算取得手段と、を備え、
前記画像内容判定手段は、前記データ記憶手段に記憶された画素情報に基づいて前記画像に含まれるオブジェクト領域を抽出する手段であり、
前記画像補正回転手段は、前記データ記憶手段に記憶された起点復元用情報に基づいて前記所定位置を起点として前記画像を復元することにより回転後の画像を上端から順に生成すると共に該生成された回転後の画像に前記所定の画像補正処理を施して出力する手段である、
画像処理装置。
The image processing apparatus according to any one of claims 1 to 6,
The image is compressed by a predetermined method,
Data storage means for storing data;
The designated image is restored in order from the head to at least the stage where the pixel information can be obtained, and the obtained pixel information is stored in the data storage means, and a predetermined position of the image is a starting point in the restoration process of the image. And an information calculation acquisition means for acquiring starting point restoration information for restoring the image and storing the information in the data storage means,
The image content determination means is means for extracting an object area included in the image based on pixel information stored in the data storage means,
The image correction rotation means generates the rotated images in order from the upper end by restoring the image starting from the predetermined position based on the starting point restoration information stored in the data storage means, and the generated image correction rotation means Means for applying the predetermined image correction process to the rotated image and outputting the image;
Image processing device.
通信可能な記憶媒体から前記画像を取得するデータ取得手段と、
請求項1ないし7いずれか記載の画像処理装置と、
該画像処理装置から出力される画像を印刷する印刷実行手段と、
を備えるプリンタ。
Data acquisition means for acquiring the image from a communicable storage medium;
An image processing device according to any one of claims 1 to 7,
Print execution means for printing an image output from the image processing apparatus;
Printer with.
画像に所定の画像補正処理を施して出力する画像処理方法であって、
(a)指定された画像の回転を伴う出力指示がなされたときに、該画像の画素情報に基づいて該画像に含まれるオブジェクト領域を抽出し該抽出したオブジェクト領域の該画像全体に対する配置に基づいて該画像の画像内容を判定し、
(b)該判定された画像内容に基づいて前記指定された画像に所定の画像補正処理を施すと共に該画像を回転して出力する、
画像処理方法。
An image processing method for performing a predetermined image correction process on an image and outputting the image,
(A) When an output instruction accompanied with rotation of a designated image is made, an object region included in the image is extracted based on pixel information of the image, and based on the arrangement of the extracted object region with respect to the entire image To determine the image content of the image,
(B) A predetermined image correction process is performed on the designated image based on the determined image content, and the image is rotated and output.
Image processing method.
画像に所定の画像補正処理を施して出力する画像処理用プログラムであって、
指定された画像の回転を伴う出力指示がなされたときに、該画像の画素情報に基づいて該画像に含まれるオブジェクト領域を抽出し該抽出したオブジェクト領域の該画像全体に対する配置に基づいて該画像の画像内容を判定する画像内容判定モジュールと、
該判定された画像内容に基づいて前記指定された画像に所定の画像補正処理を施すと共に該画像を回転して出力する画像補正回転モジュールと、
を備える画像処理用プログラム。
An image processing program for performing predetermined image correction processing on an image and outputting the image,
When an output instruction accompanied with rotation of the designated image is made, an object area included in the image is extracted based on pixel information of the image, and the image is based on the arrangement of the extracted object area with respect to the entire image. An image content determination module for determining the image content of
An image correction rotation module for performing a predetermined image correction process on the designated image based on the determined image content and rotating and outputting the image;
An image processing program comprising:
JP2004282536A 2004-09-28 2004-09-28 Image processing apparatus, printer including the same, and image processing method Expired - Fee Related JP4617808B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2004282536A JP4617808B2 (en) 2004-09-28 2004-09-28 Image processing apparatus, printer including the same, and image processing method
US11/232,924 US20060087699A1 (en) 2004-09-28 2005-09-23 Image processing apparatus, control method of the same, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004282536A JP4617808B2 (en) 2004-09-28 2004-09-28 Image processing apparatus, printer including the same, and image processing method

Publications (2)

Publication Number Publication Date
JP2006099280A true JP2006099280A (en) 2006-04-13
JP4617808B2 JP4617808B2 (en) 2011-01-26

Family

ID=36239049

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004282536A Expired - Fee Related JP4617808B2 (en) 2004-09-28 2004-09-28 Image processing apparatus, printer including the same, and image processing method

Country Status (1)

Country Link
JP (1) JP4617808B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001086318A (en) * 1999-09-10 2001-03-30 Seiko Epson Corp Image processor, image-processing method, image-forming device and recording medium with program recorded therein
WO2004030373A1 (en) * 2002-09-26 2004-04-08 Seiko Epson Corporation Adjusting output image of image data
JP2004236110A (en) * 2003-01-31 2004-08-19 Canon Inc Image processor, image processing method, storage medium and program
JP2004265431A (en) * 2004-04-05 2004-09-24 Konica Minolta Holdings Inc Face extraction method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001086318A (en) * 1999-09-10 2001-03-30 Seiko Epson Corp Image processor, image-processing method, image-forming device and recording medium with program recorded therein
WO2004030373A1 (en) * 2002-09-26 2004-04-08 Seiko Epson Corporation Adjusting output image of image data
JP2004236110A (en) * 2003-01-31 2004-08-19 Canon Inc Image processor, image processing method, storage medium and program
JP2004265431A (en) * 2004-04-05 2004-09-24 Konica Minolta Holdings Inc Face extraction method

Also Published As

Publication number Publication date
JP4617808B2 (en) 2011-01-26

Similar Documents

Publication Publication Date Title
JP4011933B2 (en) Image processing apparatus and method
JP4176114B2 (en) Image compression apparatus, image reading apparatus including the same, image processing apparatus including the image compression apparatus, image forming apparatus including the same, and image compression processing method
JP2010103681A (en) Image processing device and method
US8249321B2 (en) Image processing apparatus and method for red eye detection
JP2019092027A (en) Image processing apparatus, image processing method, and image processing program
US7768674B2 (en) Exposure determining device and exposure determining method
JP2005333393A (en) Image compressing device, image output device, image expanding device, printer, image processor, copying machine, image compression method, image expansion method, image processing program, and recording medium with image processing program recorded thereon
US7570822B2 (en) Image processing apparatus, printer and control method of the image processing
US20060087699A1 (en) Image processing apparatus, control method of the same, and storage medium
JP4617808B2 (en) Image processing apparatus, printer including the same, and image processing method
JP4966260B2 (en) Image processing method, image processing apparatus, program, and computer-readable storage medium
JP4908382B2 (en) Image processing apparatus and image processing method
JP2001016452A (en) Image processor, image reader loading the same. image forming device and image processing method
JP4556602B2 (en) Image processing apparatus, printer including the same, image processing method, and image processing program
US8125680B2 (en) Image processing apparatus and control method thereof
JP4363292B2 (en) Image processing apparatus, printer including the same, and image processing method
JP4526577B2 (en) Image processing apparatus, image processing system, and image processing method
JP4665802B2 (en) Lightness correction processing apparatus and lightness correction determination method
JP2007072852A (en) Image processing device, cellular telephone, image processing method and image processing program
JP4363291B2 (en) Image processing apparatus, printer including the same, and control method of image processing apparatus
US8102571B2 (en) Image processing apparatus, printer including the same, and image processing method
JP2010257472A (en) Image processing apparatus, printer equipped with the same, and image processing method
JP2004120639A (en) Image processing method
JP2006042169A (en) Image processing method, and image processor
JP2008193386A (en) Method for outputting image, and system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070808

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20090622

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20090706

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100514

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100608

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100805

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100928

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101011

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131105

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4617808

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees