[go: up one dir, main page]

JP2011193073A - Image processing apparatus, printing system, image processing method, and program - Google Patents

Image processing apparatus, printing system, image processing method, and program Download PDF

Info

Publication number
JP2011193073A
JP2011193073A JP2010055445A JP2010055445A JP2011193073A JP 2011193073 A JP2011193073 A JP 2011193073A JP 2010055445 A JP2010055445 A JP 2010055445A JP 2010055445 A JP2010055445 A JP 2010055445A JP 2011193073 A JP2011193073 A JP 2011193073A
Authority
JP
Japan
Prior art keywords
correction
red
value
eye
correction intensity
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
JP2010055445A
Other languages
Japanese (ja)
Inventor
Satoshi Nishio
聰 西尾
Akira Hiroshige
陽 廣重
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 JP2010055445A priority Critical patent/JP2011193073A/en
Publication of JP2011193073A publication Critical patent/JP2011193073A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Analysis (AREA)

Abstract

【課題】赤目補正を適切に行うことを可能とする。
【解決手段】赤目領域特定情報生成部25は、決定処理で決定された補正強度係数と、前回の決定処理で決定された所定ライン数の画像データの補正強度係数を合成する垂直方向のぼかし処理を実行するとともに、その結果得られた補正強度係数について水平方向に隣接する複数の補正強度係数を利用してガウスぼかしを施す水平方向のぼかし処理を実行する。本発明は、プリンターに適用することができる。
【選択図】図2
It is possible to appropriately perform red-eye correction.
A red-eye region specifying information generation unit 25 combines a correction intensity coefficient determined in a determination process and a correction intensity coefficient of image data of a predetermined number of lines determined in a previous determination process in a vertical blur process. And a horizontal blurring process for performing Gaussian blurring on the correction intensity coefficient obtained as a result using a plurality of correction intensity coefficients adjacent in the horizontal direction. The present invention can be applied to a printer.
[Selection] Figure 2

Description

本発明は、画像処理装置、印刷システム、画像処理方法、およびプログラムに関する。   The present invention relates to an image processing apparatus, a printing system, an image processing method, and a program.

人物を、フラッシュを使用して撮影した場合、目の色が赤色や金色に撮影される赤目現象が発生する。デジタルカメラ、コンピューター、またはプリンター等の画像処理機能を有する装置には、この赤目現象が発生した画像を画像処理によって補正できるものがある(特許文献1参照)。   When a person is photographed using a flash, a red-eye phenomenon occurs in which the eyes are photographed in red or gold. Some apparatuses having an image processing function such as a digital camera, a computer, or a printer can correct an image in which the red-eye phenomenon occurs by image processing (see Patent Document 1).

特開平10−233929号JP-A-10-233929

しかしながら、従来の方法では、赤目現象が発生している領域を精度よく特定することができず、その結果、赤目補正を適切に行うことができない場合があった。   However, in the conventional method, the region where the red-eye phenomenon occurs cannot be accurately identified, and as a result, there are cases where the red-eye correction cannot be performed appropriately.

たとえば、プリンターの設計上の制限により、大容量のメモリーを搭載することができない場合、画像処理に必要なメモリー領域が確保できず、赤目補正を適正に行うことができない場合があった。   For example, if a large-capacity memory cannot be installed due to printer design limitations, a memory area necessary for image processing cannot be secured, and red-eye correction may not be performed properly.

本発明は、このような状況に鑑みてなされたものであり、赤目補正を適切に行うことができるようにするものである。   The present invention has been made in view of such a situation, and makes it possible to appropriately perform red-eye correction.

本発明の一側面の画像処理装置は、所定のライン数のカラー画像データ毎に、赤目を補正する処理を施す画像処理装置において、カラー画像の中の目の画像を含む領域を補正処理対象領域として取得する取得手段と、少なくても2つの色の特徴量を軸とする空間における補正処理対象領域の特徴量の分布において、赤目領域を構成する画素の分布とそれ以外の画素の分布を分離する分離曲線を生成する赤目領域特定情報生成手段と、補正処理対象領域の各画素の値と、その値の、分離曲線に対応する値の大きさに基づいて、その画素に対する補正の強度を示す補正強度係数を決定する決定処理を、ラスター順に、補正処理対象領域の所定のライン数の画像データ毎に行う補正強度決定手段とを有し、補正強度決定手段は、決定処理で決定された補正強度係数と、前回の決定処理で決定された所定ライン数の画像データの補正強度係数を合成する垂直方向のぼかし処理を実行するとともに、その結果得られた補正強度係数について水平方向に隣接する複数の補正強度係数を利用してガウスぼかしを施す水平方向のぼかし処理を実行することを特徴とする。   An image processing apparatus according to an aspect of the present invention is an image processing apparatus that performs processing for correcting red eyes for each color image data having a predetermined number of lines. The distribution of the pixels constituting the red-eye region and the distribution of the other pixels are separated in the acquisition means for acquiring the image and the distribution of the feature amount of the correction target region in a space centered on the feature amount of at least two colors. The red-eye area specifying information generating means for generating the separation curve, the value of each pixel in the correction processing target area, and the magnitude of the correction of the pixel based on the value corresponding to the separation curve A correction intensity determining unit that performs a determination process for determining a correction intensity coefficient for each image data of a predetermined number of lines in the correction process target region in raster order, and the correction intensity determination unit is determined by the determination process. A vertical blur process is performed to synthesize the correction intensity coefficient and the correction intensity coefficient of the predetermined number of lines of image data determined in the previous determination process, and the resulting correction intensity coefficient is adjacent in the horizontal direction. A horizontal blurring process for performing Gaussian blurring using a plurality of correction intensity coefficients is performed.

このような構成を有するようにしたので、たとえば、作業領域が小さく、1ラインの画像データしか処理できない場合であっても、適切に赤目補正を行うことができる。   With such a configuration, for example, even when the work area is small and only one line of image data can be processed, red-eye correction can be performed appropriately.

前記補正強度決定手段は、前記水平方向のぼかし処理におけるぼかしの度合を、前記垂直方向のぼかし処理におけるぼかしの度合より強くすることができる。   The correction intensity determining means can make the degree of blurring in the horizontal blurring process stronger than the degree of blurring in the vertical blurring process.

このような構成を有するようにしたので、より適切に赤目を補正することができる。   Since it has such a structure, red eyes can be corrected more appropriately.

補正強度決定手段は、垂直方向のぼかし処理において、所定の大きさの合成比率で合成し、垂直方向において隣接する補正強度係数の差の大きさによって、合成比率を変更することができる。   The correction strength determination means can combine the predetermined ratio in the vertical blurring process, and can change the combination ratio depending on the difference between the correction intensity coefficients adjacent in the vertical direction.

このような構成を有するようにしたので、より適切に赤目を補正することができる。   Since it has such a structure, red eyes can be corrected more appropriately.

補正強度決定手段は、前記水平方向のぼかし処理としてのガウスぼかし処理における参照範囲を、前記補正処理対象領域の赤みがかった領域の半径の大きさによって変更することができる。   The correction intensity determination means can change the reference range in the Gaussian blurring process as the horizontal blurring process according to the radius of the reddish area of the correction process target area.

このような構成を有するようにしたので、より適切に赤目を補正することができる。   Since it has such a structure, red eyes can be corrected more appropriately.

本発明の一側面の画像処理方法は、所定のライン数のカラー画像データ毎に、赤目を補正する処理を施す画像処理装置の画像処理方法において、カラー画像の中の目の画像を含む領域を補正処理対象領域として取得する取得ステップと、少なくても2つの色の特徴量を軸とする空間における補正処理対象領域の特徴量の分布において、赤目領域を構成する画素の分布とそれ以外の画素の分布を分離する分離曲線を生成する赤目領域特定情報生成ステップと、補正処理対象領域の各画素の値と、その値の、分離曲線に対応する値の大きさに基づいて、その画素に対する補正の強度を示す補正強度係数を決定する決定処理を、ラスター順に、補正処理対象領域の所定のライン数の画像データ毎に行う補正強度決定ステップとを含み、補正強度決定ステップは、決定処理で決定された補正強度係数と、前回の決定処理で決定された所定ライン数の画像データの補正強度係数を合成する垂直方向のぼかし処理を実行するとともに、その結果得られた補正強度係数について水平方向に隣接する複数の補正強度係数を利用してガウスぼかしを施す水平方向のぼかし処理を実行することを特徴とする。   An image processing method according to one aspect of the present invention is an image processing method of an image processing apparatus that performs a process of correcting red eyes for each color image data having a predetermined number of lines. In the acquisition step of acquiring as a correction process target area, and the distribution of the feature quantity of the correction process target area in a space centered on the feature quantity of at least two colors, the distribution of pixels constituting the red-eye area and other pixels A red-eye region specifying information generation step for generating a separation curve for separating the distribution of the image, a value of each pixel in the correction processing target region, and a correction of the pixel based on the value corresponding to the separation curve A correction strength determination step including a correction strength determination step for determining a correction strength coefficient indicating the strength of each of the image data for a predetermined number of lines in the correction processing target region in raster order. The step is obtained by performing a vertical blurring process that combines the correction intensity coefficient determined in the determination process and the correction intensity coefficient of the image data of the predetermined number of lines determined in the previous determination process, and the result is obtained. With respect to the correction intensity coefficient, horizontal blurring processing for performing Gaussian blurring is performed using a plurality of correction intensity coefficients adjacent in the horizontal direction.

本発明の一側面のプログラムは、画像処理をコンピューターに実行させるプログラムであって、所定のライン数のカラー画像データ毎に、赤目を補正する処理を施す画像処理装置の画像処理方法において、カラー画像の中の目の画像を含む領域を補正処理対象領域として取得する取得ステップと、少なくても2つの色の特徴量を軸とする空間における補正処理対象領域の特徴量の分布において、赤目領域を構成する画素の分布とそれ以外の画素の分布を分離する分離曲線を生成する赤目領域特定情報生成ステップと、補正処理対象領域の各画素の値と、その値の、分離曲線に対応する値の大きさに基づいて、その画素に対する補正の強度を示す補正強度係数を決定する決定処理を、ラスター順に、補正処理対象領域の所定のライン数の画像データ毎に行う補正強度決定ステップとを含み、補正強度決定ステップは、決定処理で決定された補正強度係数と、前回の決定処理で決定された所定ライン数の画像データの補正強度係数を合成する垂直方向のぼかし処理を実行するとともに、その結果得られた補正強度係数について水平方向に隣接する複数の補正強度係数を利用してガウスぼかしを施す水平方向のぼかし処理を実行する画像処理をコンピューターに実行させることを特徴とする。   A program according to an aspect of the present invention is a program that causes a computer to execute image processing, and in the image processing method of an image processing apparatus that performs a process of correcting red eyes for each color image data having a predetermined number of lines. In the acquisition step of acquiring the region including the eye image of the image as the correction processing target region, and the distribution of the feature amount of the correction processing target region in the space centered on the feature amount of at least two colors, the red eye region is A red-eye region specifying information generation step for generating a separation curve for separating the distribution of the constituting pixels and the distribution of the other pixels, the value of each pixel in the correction processing target region, and the value corresponding to the separation curve A determination process for determining a correction strength coefficient indicating the correction strength for the pixel based on the size is performed in the raster order in a predetermined number of lines of image data in the correction target area. A correction intensity determination step that is performed for each image, and the correction intensity determination step combines the correction intensity coefficient determined in the determination process and the correction intensity coefficient of the predetermined number of lines of image data determined in the previous determination process. The computer performs image processing for performing horizontal blur processing for performing Gaussian blur using a plurality of correction strength coefficients adjacent in the horizontal direction for the correction strength coefficient obtained as a result of performing vertical blur processing. It is made to perform.

本発明の一側面においては、カラー画像の中の目の画像を含む領域が補正処理対象領域として取得され、少なくても2つの色の特徴量を軸とする空間における補正処理対象領域の特徴量の分布において、赤目領域を構成する画素の分布とそれ以外の画素の分布を分離する分離曲線が生成され、補正処理対象領域の各画素の値と、その値の、分離曲線に対応する値の大きさに基づいて、その画素に対する補正の強度を示す補正強度係数を決定する決定処理が、ラスター順に、補正処理対象領域の所定のライン数の画像データ毎に行われ、決定処理で決定された補正強度係数と、前回の決定処理で決定された所定ライン数の画像データの補正強度係数を合成する垂直方向のぼかし処理が実行されるとともに、その結果得られた補正強度係数について水平方向に隣接する複数の補正強度係数を利用してガウスぼかしを施す水平方向のぼかし処理が実行される。   In one aspect of the present invention, a region including an eye image in a color image is acquired as a correction processing target region, and the feature amount of the correction processing target region in a space having at least two color feature amounts as axes. In this distribution, a separation curve for separating the distribution of the pixels constituting the red-eye region from the distribution of the other pixels is generated, and the value of each pixel in the correction processing target region and the value corresponding to the separation curve are generated. A determination process for determining a correction intensity coefficient indicating the correction intensity for the pixel based on the size is performed for each image data of a predetermined number of lines in the correction process target region in raster order, and determined by the determination process. A vertical blurring process that combines the correction intensity coefficient and the correction intensity coefficient of the image data of the predetermined number of lines determined in the previous determination process is executed, and the correction intensity coefficient obtained as a result is Blurring in the horizontal direction to apply a Gaussian blur by using a plurality of correction intensity coefficient adjacent in the horizontal direction is executed.

本発明の実施の形態に係るプリンター1の構成を示す斜視図である。1 is a perspective view illustrating a configuration of a printer 1 according to an embodiment of the present invention. 図1のプリンター1の機能的構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a functional configuration example of a printer 1 in FIG. 1. 印刷処理対象画像TIを模式的に示した図である。It is the figure which showed typically the printing process target image TI. 図3の印刷処理対象画像TIの中央の人物の左目を含む画像領域を拡大して模式的に示した図である。FIG. 4 is a diagram schematically showing an enlarged image region including a left eye of a person at the center of the print processing target image TI in FIG. 3. 印刷処理の流れを示すフローチャートである。6 is a flowchart illustrating a flow of printing processing. 特徴量抽出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of a feature-value extraction process. 補正処理対象領域Pe1の各画素を、R値とR値/G値を軸とする平面に、そのR値とR値/G値に応じてプロットした図である。It is the figure which plotted each pixel of correction | amendment process object area | region Pe1 on the plane which uses R value and R value / G value as an axis according to the R value and R value / G value. 補正強度マップ生成処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a correction | amendment intensity map production | generation process. 補正強度係数テーブルの例を示す図である。It is a figure which shows the example of a correction | amendment intensity | strength coefficient table. 出力データ生成処理の流れを示すフローチャートである。It is a flowchart which shows the flow of an output data generation process.

以下に本発明の実施の形態を説明するが、本発明の構成要件と、発明の詳細な説明に記載の実施の形態との対応関係を例示すると、次のようになる。この記載は、本発明をサポートする実施の形態が、発明の詳細な説明に記載されていることを確認するためのものである。従って、発明の詳細な説明中には記載されているが、本発明の構成要件に対応する実施の形態として、ここには記載されていない実施の形態があったとしても、そのことは、その実施の形態が、その構成要件に対応するものではないことを意味するものではない。逆に、実施の形態が構成要件に対応するものとしてここに記載されていたとしても、そのことは、その実施の形態が、その構成要件以外の構成要件には対応しないものであることを意味するものでもない。   Embodiments of the present invention will be described below. Correspondences between the configuration requirements of the present invention and the embodiments described in the detailed description of the present invention are exemplified as follows. This description is to confirm that the embodiments supporting the present invention are described in the detailed description of the invention. Accordingly, although there are embodiments that are described in the detailed description of the invention but are not described here as embodiments corresponding to the constituent elements of the present invention, It does not mean that the embodiment does not correspond to the configuration requirements. Conversely, even if an embodiment is described here as corresponding to a configuration requirement, that means that the embodiment does not correspond to a configuration requirement other than the configuration requirement. Not something to do.

本発明の一側面の画像処理装置は、所定のライン数のカラー画像データ毎に、赤目を補正する処理を施す画像処理装置において、カラー画像の中の目の画像を含む領域を補正処理対象領域として取得する取得手段(たとえば、図2の補正処理対象領域取得部24)と、少なくても2つの色の特徴量を軸とする空間における補正処理対象領域の特徴量の分布において、赤目領域を構成する画素の分布とそれ以外の画素の分布を分離する分離曲線を生成する赤目領域特定情報生成手段(たとえば、図2の特徴量抽出部31、分離曲線生成部32)と、補正処理対象領域の各画素の値と、その値の、分離曲線に対応する値の大きさに基づいて、その画素に対する補正の強度を示す補正強度係数を決定する決定処理を、ラスター順に、補正処理対象領域の所定のライン数の画像データ毎に行う補正強度決定手段(たとえば、図2の補正強度マップ生成部33)とを有し、補正強度決定手段は、決定処理で決定された補正強度係数と、前回の決定処理で決定された所定ライン数の画像データの補正強度係数を合成する垂直方向のぼかし処理を実行するとともに(たとえば、図8のステップS37)、その結果得られた補正強度係数について水平方向に隣接する複数の補正強度係数を利用してガウスぼかしを施す水平方向のぼかし処理(たとえば、図8のステップS38)を実行することを特徴とする。   An image processing apparatus according to an aspect of the present invention is an image processing apparatus that performs processing for correcting red eyes for each color image data having a predetermined number of lines. In the distribution of the feature quantity of the correction process target area in the space centered on the feature quantity of at least two colors and the acquisition means (for example, the correction process target area acquisition unit 24 in FIG. 2) A red-eye region specifying information generating unit (for example, the feature amount extraction unit 31 and the separation curve generation unit 32 in FIG. 2) that generates a separation curve for separating the distribution of the constituent pixels and the distribution of the other pixels, and a correction processing target region Based on the value of each pixel and the magnitude of the value corresponding to the separation curve, a determination process for determining a correction intensity coefficient indicating the correction intensity for the pixel is performed in the order of the correction process. Correction intensity determination means (for example, the correction intensity map generation unit 33 in FIG. 2) for each predetermined number of lines of image data, and the correction intensity determination means includes a correction intensity coefficient determined in the determination process, A vertical blurring process for combining the correction intensity coefficients of the image data of the predetermined number of lines determined in the previous determination process is executed (for example, step S37 in FIG. 8), and the correction intensity coefficient obtained as a result is horizontal. A horizontal blurring process (for example, step S38 in FIG. 8) for performing Gaussian blurring using a plurality of correction intensity coefficients adjacent to each other in the direction is performed.

[プリンター1の構成の説明]
図1は、本発明の実施の形態としてのプリンター1のハードウェアの構成例を示すブロック図である。このプリンター1は、メモリーカード18等から取得した画像データに基づき画像を印刷する、いわゆるダイレクトプリントに対応したカラーインクジェットプリンターである。また、プリンター1は、印刷するカラー画像に対して、自動的に、赤目部分を検出し、その部分を自然な色(たとえば、黒色等)に補正する機能(以下、自動赤目補正機能と称する)を有している。
[Description of Printer 1 Configuration]
FIG. 1 is a block diagram illustrating a hardware configuration example of a printer 1 according to an embodiment of the present invention. The printer 1 is a color inkjet printer that supports so-called direct printing, in which an image is printed based on image data acquired from a memory card 18 or the like. The printer 1 automatically detects a red-eye portion of a color image to be printed, and corrects the portion to a natural color (for example, black) (hereinafter referred to as an automatic red-eye correction function). have.

プリンター1は、CPU11、内部メモリー12、操作部13、表示部14、プリンターエンジン15、およびカードインターフェース(カードI/F)16を備えている。   The printer 1 includes a CPU 11, an internal memory 12, an operation unit 13, a display unit 14, a printer engine 15, and a card interface (card I / F) 16.

CPU(central processing unit)11は、各部を制御して、内部メモリー12に格納されているプログラムに応じて各種の処理等を実行する。   A CPU (central processing unit) 11 controls each unit and executes various processes according to a program stored in the internal memory 12.

たとえばCPU11は、自動赤目補正モードが設定されている場合、印刷に先立って、印刷されるカラー画像(以下、印刷処理対象画像TIと称する)の中から、人物、犬などのペット等の目の画像を含む領域等を、検出する処理(以下、検出処理Z0と称する)を実行する。CPU11はまた、検出した領域(以下、補正処理対象領域Pe1と称する)から、赤目現象が発生している赤目領域を特定するための情報を生成する処理(以下、赤目領域特定情報生成処理Z1と称する)を実行し、その情報により特定される赤目領域の色を自然な色(たとえば、黒色等)に置き換える処理(以下、補正処理Z2と称する)を実行する。   For example, when the automatic red-eye correction mode is set, the CPU 11 selects an eye such as a person, a dog or other pet from a color image to be printed (hereinafter referred to as a print processing target image TI) prior to printing. Processing for detecting an area including an image or the like (hereinafter referred to as detection processing Z0) is executed. The CPU 11 also generates information for specifying a red-eye region in which a red-eye phenomenon has occurred (hereinafter referred to as red-eye region specifying information generation processing Z1) from the detected region (hereinafter referred to as a correction processing target region Pe1). And a process of replacing the color of the red-eye area specified by the information with a natural color (for example, black) (hereinafter referred to as a correction process Z2).

内部メモリー12は、CPU11が実行する各種プログラムや各種データを格納しているROM(Read Only Memory)、およびCPU11が実行対象とするプログラムやデータを一時的に格納するRAM(Random Access Memory)によって構成されている。   The internal memory 12 includes a ROM (Read Only Memory) that stores various programs executed by the CPU 11 and various data, and a RAM (Random Access Memory) that temporarily stores programs and data to be executed by the CPU 11. Has been.

操作部13は、ボタンやタッチパネルの1つまたは複数により構成され、ユーザーによる操作内容をCPU11に通知する。   The operation unit 13 includes one or a plurality of buttons and a touch panel, and notifies the CPU 11 of the operation content by the user.

表示部14は、液晶ディスプレイ等により構成され、CPU11から供給された表示データに対応する画像を表示する。   The display unit 14 includes a liquid crystal display and displays an image corresponding to the display data supplied from the CPU 11.

プリンターエンジン15は、CPU11から供給された印刷データに基づき印刷を行う印刷機構である。   The printer engine 15 is a printing mechanism that performs printing based on print data supplied from the CPU 11.

カードインターフェース(I/F)16は、カードスロット17に挿入されたメモリーカード18との間でデータのやり取りを行うためのインターフェースである。なお、この例では、メモリーカード18にRGBデータとしての画像データが格納されており、プリンター1は、カードインターフェース16を介してメモリーカード18に格納された画像データの取得を行う。   The card interface (I / F) 16 is an interface for exchanging data with the memory card 18 inserted in the card slot 17. In this example, image data as RGB data is stored in the memory card 18, and the printer 1 acquires the image data stored in the memory card 18 via the card interface 16.

プリンター1の各構成要素は、バス19を介して互いに接続されている。   The components of the printer 1 are connected to each other via a bus 19.

なおプリンター1は、さらに、他の機器(例えばデジタルスチルカメラやコンピューター)とのデータ通信を行うためのインターフェースを備えているとしてもよい。   The printer 1 may further include an interface for performing data communication with other devices (for example, a digital still camera or a computer).

[プリンター1の機能的構成例の説明]
図2は、プリンター1の機能的構成例を示すブロック図である。この機能は、CPU11が内部メモリー12に記憶されている所定のプログラムを実行することより実現可能となる。
[Description of Functional Configuration Example of Printer 1]
FIG. 2 is a block diagram illustrating a functional configuration example of the printer 1. This function can be realized by the CPU 11 executing a predetermined program stored in the internal memory 12.

画像読取部21は、印刷処理対象画像TIを、たとえばメモリーカード18から、カードI/F16を介して読み取る。   The image reading unit 21 reads the print processing target image TI from, for example, the memory card 18 via the card I / F 16.

読出制御部22は、画像読取部21により読み取られた印刷処理対象画像TIから、所定のライン数の画像データ(この例の場合、1ラインの画像データ)を読み出し、ラインバッファ23に記憶する。このプリンター1では、ラインバッファ23に記憶される1ラインの画像データ毎に、印刷される印刷データが生成される。   The read control unit 22 reads a predetermined number of lines of image data (in this example, one line of image data) from the print processing target image TI read by the image reading unit 21 and stores it in the line buffer 23. In the printer 1, print data to be printed is generated for each line of image data stored in the line buffer 23.

補正処理対象領域取得部24は、画像読取部21により読み取られた印刷処理対象画像TIから所定の画像を間引いた縮小画像に対して、検出処理Z0を実行する。具体的には、たとえば人物の目の基本的な形状を表すテンプレートを利用したパターンマッチングによる方法(たとえば、特開2006−279460号公報)といった公知の検出方法を用いて、目玉、白目、瞼、目頭、目尻等の部位を含む領域を取得する処理を実行する。補正処理対象領域取得部24はさらに、この処理の結果取得された領域(すなわち補正処理対象領域Pe1)から、赤みがかった瞳孔や虹彩を含む領域を取得する処理を実行する。なおこの処理の結果取得された領域を、赤目候補領域Pe2と称する。   The correction process target area acquisition unit 24 performs a detection process Z0 on a reduced image obtained by thinning a predetermined image from the print process target image TI read by the image reading unit 21. Specifically, for example, using a known detection method such as a pattern matching method using a template representing a basic shape of a person's eyes (for example, Japanese Patent Application Laid-Open No. 2006-279460), eyeballs, white eyes, eyelids, A process of acquiring a region including a part such as the eyes and the corners of the eyes is executed. The correction process target area acquisition unit 24 further executes a process of acquiring a region including a reddish pupil and iris from the area acquired as a result of this process (that is, the correction process target area Pe1). Note that the region acquired as a result of this processing is referred to as a red-eye candidate region Pe2.

図3は、印刷処理対象画像TIを模式的に示した図である。ここではこの印刷処理対象画像TIの中央の人物の左目部分に生じている赤目現象を処理対象とするものとする。図4は、図3の印刷処理対象画像TIの中央の人物の左目を含む画像領域(図3中、四角の枠で囲まれている領域)を拡大して模式的に示した図である。図4には、補正処理対象領域Pe1と赤目候補領域Pe2が示されている。この例の場合、目玉、白目、瞼、目頭、目尻等の部位を含む矩形領域が、補正処理対象領域Pe1として検出され、その中の赤目現象が生じている目玉を含む円形領域が、赤目候補領域Pe2として検出される。   FIG. 3 is a diagram schematically showing the print processing target image TI. Here, the red-eye phenomenon occurring in the left eye portion of the person at the center of the print processing target image TI is assumed to be the processing target. FIG. 4 is a diagram schematically showing an enlarged image region (region surrounded by a square frame in FIG. 3) including the left eye of the person at the center of the print processing target image TI in FIG. FIG. 4 shows a correction processing target area Pe1 and a red-eye candidate area Pe2. In the case of this example, a rectangular area that includes parts such as eyeballs, white eyes, eyelids, eyes, and corners of the eye is detected as the correction processing target area Pe1, and a circular area that includes the eyeball in which the red-eye phenomenon occurs is a red-eye candidate. It is detected as a region Pe2.

図2に戻り赤目領域特定情報生成部25は、補正処理対象領域取得部24により取得された補正処理対象領域Pe1および赤目候補領域Pe2を用いて、赤目領域特定情報生成処理Z1を実行する。この例において、赤目領域を特定するための情報として、色の特徴量を軸とする空間における補正処理対象領域Pe1のその特徴量の分布において、赤目領域を構成する画素の分布とそれ以外の画素の分布を分離する分離曲線が生成される。たとえば、その分離曲線からの距離に応じた補正強度係数を画素毎に格納する補正強度マップMaが生成される。補正強度マップMaは、補正処理対象領域Pe1の各画素に対応する格納部を有しており、各格納部には、対応する補正処理対象領域Pe1の画素が赤目領域を構成する画素である可能性に応じた補正強度係数が格納される。   Returning to FIG. 2, the red-eye area specifying information generating unit 25 executes the red-eye area specifying information generating process Z1 using the correction process target area Pe1 and the red-eye candidate area Pe2 acquired by the correction process target area acquiring unit 24. In this example, as information for specifying the red-eye region, in the distribution of the feature amount of the correction processing target region Pe1 in the space having the color feature amount as an axis, the distribution of the pixels constituting the red-eye region and the other pixels A separation curve is generated that separates the distributions of. For example, a correction intensity map Ma that stores a correction intensity coefficient corresponding to the distance from the separation curve for each pixel is generated. The correction intensity map Ma has a storage unit corresponding to each pixel of the correction processing target region Pe1, and in each storage unit, the corresponding pixel of the correction processing target region Pe1 may be a pixel constituting a red-eye region. A correction strength coefficient corresponding to the sex is stored.

赤目領域特定情報生成部25は、特徴量抽出部31、分離曲線生成部32、および補正強度マップ生成部33を有して構成される。それらの構成要素の動作については、赤目領域特定情報生成処理Z1の説明と合わせて後述する。   The red-eye region specifying information generation unit 25 includes a feature amount extraction unit 31, a separation curve generation unit 32, and a correction intensity map generation unit 33. The operation of these components will be described later together with the description of the red-eye area specifying information generation process Z1.

補正部26は、赤目領域特定情報生成部25により生成された補正強度マップMaに格納されている補正強度係数に応じた補正強度で、印刷処理対象画像TIの色を黒色等に置き換える(赤目を修正する)処理を実行する。   The correction unit 26 replaces the color of the print processing target image TI with black or the like with the correction intensity according to the correction intensity coefficient stored in the correction intensity map Ma generated by the red-eye area specifying information generation unit 25 (red-eye). Execute the process.

出力制御部27は、補正部26により補正が施された画像データから印刷データを生成し、印刷データをプリンターエンジン15に供給して、印刷データに基づく画像の印刷を実行させる。   The output control unit 27 generates print data from the image data corrected by the correction unit 26, supplies the print data to the printer engine 15, and executes printing of an image based on the print data.

図5は、印刷処理の流れを示すフローチャートである。ステップS11において、補正処理対象領域取得部24は、画像読取部21により読み取られた印刷処理対象画像TIから所定の画素を間引いた縮小画像を生成する。ステップS12において、補正処理対象領域取得部24は、生成した縮小画像(以下、適宜、縮小印刷処理対象画像TIとも称する)に対して、検出処理Z0を実行する。すなわち補正処理対象領域Pe1と赤目候補領域Pe2が検出される(図4)。検出された補正処理対象領域Pe1と赤目候補領域Pe2の位置等は、内部メモリー12に記憶される。   FIG. 5 is a flowchart showing the flow of the printing process. In step S <b> 11, the correction process target area acquisition unit 24 generates a reduced image in which predetermined pixels are thinned out from the print process target image TI read by the image reading unit 21. In step S12, the correction process target area acquisition unit 24 performs a detection process Z0 on the generated reduced image (hereinafter also referred to as a reduced print process target image TI as appropriate). That is, the correction processing target area Pe1 and the red-eye candidate area Pe2 are detected (FIG. 4). The detected positions and the like of the correction processing target area Pe1 and the red-eye candidate area Pe2 are stored in the internal memory 12.

次にステップS13において、赤目領域特定情報生成部25の特徴量抽出部31は、補正処理対象領域取得部24により取得された補正処理対象領域Pe1の特徴量を抽出する。なお補正処理対象領域Pe1が複数存在する場合は、各補正処理対象領域Pe1の特徴量がそれぞれ抽出される。   Next, in step S <b> 13, the feature amount extraction unit 31 of the red-eye region specifying information generation unit 25 extracts the feature amount of the correction processing target region Pe <b> 1 acquired by the correction processing target region acquisition unit 24. When there are a plurality of correction processing target areas Pe1, the feature amounts of the respective correction processing target areas Pe1 are extracted.

図6は、この特徴量抽出処理の詳細を示すフローチャートである。補正処理対象領域Pe1が複数存在する場合、各補正処理対象領域Pe1のそれぞれについて、この処理が実行される。   FIG. 6 is a flowchart showing details of the feature amount extraction processing. When there are a plurality of correction process target areas Pe1, this process is executed for each correction process target area Pe1.

特徴量抽出部31は、ステップS21において、補正処理対象領域Pe1の大きさが適切な大きさであるか否かを判定する。具体的には、たとえば、補正処理対象領域Pe1の長手方向の幅が、赤目候補領域Pe2の直径の2倍以上の長さであるか否かが判定される。なお補正処理対象領域Pe1の大きさについてこのような判定を行う理由については、後述する。   In step S21, the feature amount extraction unit 31 determines whether or not the size of the correction processing target region Pe1 is an appropriate size. Specifically, for example, it is determined whether or not the width in the longitudinal direction of the correction processing target region Pe1 is twice or more the diameter of the red-eye candidate region Pe2. The reason for making such a determination on the size of the correction processing target area Pe1 will be described later.

ステップS21で、補正処理対象領域Pe1の大きさが適切な大きさではない(すなわちこの例の場合、補正処理対象領域Pe1の長手方向の幅が赤目候補領域Pe2の直径の2倍より短い)と判定された場合、ステップS22において、特徴量抽出部31は、補正処理対象領域Pe1を適切な大きさに拡大する。この例の場合、補正処理対象領域Pe1の長手方向の幅が赤目候補領域Pe2の直径の2倍となる拡大率で、補正処理対象領域Pe1の画素が補完される。   In step S21, if the size of the correction processing target region Pe1 is not an appropriate size (that is, in this example, the longitudinal width of the correction processing target region Pe1 is shorter than twice the diameter of the red-eye candidate region Pe2). If it is determined, in step S22, the feature amount extraction unit 31 enlarges the correction processing target region Pe1 to an appropriate size. In the case of this example, the pixels of the correction processing target region Pe1 are complemented with an enlargement ratio at which the width in the longitudinal direction of the correction processing target region Pe1 is twice the diameter of the red-eye candidate region Pe2.

ステップS21で、補正処理対象領域Pe1の大きさが適切な大きさであると判定されたとき、またはステップS22で、補正処理対象領域Pe1が適切な大きさに拡大されたとき、ステップS23において、特徴量抽出部31は、補正処理対象領域Pe1の各画素のR成分値(R値)、G成分値(G値)、およびB成分値(B値)をそれぞれ検出し、補正処理対象領域Pe1のR値、G値、およびB値の平均値をそれぞれ算出する。   When it is determined in step S21 that the size of the correction processing target area Pe1 is an appropriate size, or when the correction processing target area Pe1 is enlarged to an appropriate size in step S22, in step S23, The feature amount extraction unit 31 detects the R component value (R value), the G component value (G value), and the B component value (B value) of each pixel in the correction processing target region Pe1, and corrects the correction processing target region Pe1. The average values of R value, G value, and B value are respectively calculated.

次にステップS24において、特徴量抽出部31は、補正処理対象領域Pe1のR値/G値の標準偏差とR値/B値の標準偏差をそれぞれ算出する。そしてステップS25において、特徴量抽出部31は、R値の値(軸)の範囲(0〜255)を16等分して得られた区間(以下、赤成分区間Lrと称する)毎に、その赤成分区間LrのR値を有する各画素のR値/G値の平均値とR値/B値の平均値を、それぞれ求める。   Next, in step S24, the feature amount extraction unit 31 calculates the R value / G value standard deviation and the R value / B value standard deviation of the correction processing target region Pe1. Then, in step S25, the feature amount extraction unit 31 calculates the R value (axis) range (0 to 255) every 16 sections (hereinafter referred to as red component sections Lr) obtained by equally dividing the range. The average value of the R value / G value and the average value of the R value / B value of each pixel having the R value in the red component section Lr are obtained.

このように、「補正処理対象領域Pe1のR値、G値、B値のそれぞれの平均値」、「補正処理対象領域Pe1のR値/G値の標準偏差とR値/B値の標準偏差」、および「赤成分区間Lr毎のR値/G値の平均値とR値/B値の平均値」が、特徴量として抽出される。なお抽出された特徴量は、適宜、内部メモリー12に記憶される。その後、処理は、図5のステップS14に進む。   In this way, “average values of R value, G value, and B value of correction processing target region Pe1”, “standard deviation of R value / G value and standard deviation of R value / B value of correction processing target region Pe1” And “average value of R value / G value and average value of R value / B value for each red component section Lr” are extracted as feature amounts. The extracted feature amount is stored in the internal memory 12 as appropriate. Thereafter, the processing proceeds to step S14 in FIG.

ステップS14において、赤目領域特定情報生成部25の分離曲線生成部32は、補正強度マップMaを生成するために用いる分離曲線を求める。この例では、式(1)に示すFR/G(r)と式(2)に示すFR/B(r)が求められる。なお補正処理対象領域Pe1が複数存在する場合は、各補正処理対象領域Pe1についての分離曲線がそれぞれ生成される。

Figure 2011193073
Figure 2011193073
In step S14, the separation curve generation unit 32 of the red-eye area specifying information generation unit 25 obtains a separation curve used for generating the correction intensity map Ma. In this example, F R / G (r) shown in Formula (1) and F R / B (r) shown in Formula (2) are obtained. When there are a plurality of correction process target areas Pe1, a separation curve is generated for each correction process target area Pe1.
Figure 2011193073
Figure 2011193073

式(1)中、HR/G(r)は、赤成分区間LrのR値/G値の平均値を通る曲線である。rは、R値である。σR/Gは、補正処理対象領域Pe1のR値/G値の標準偏差である。αR/GとβR/Gは所定の係数である。また式(2)中、HR/B(r)は、赤成分区間LrのR値/B値の平均値を通る曲線である。σR/Bは、補正処理対象領域Pe1のR値/B値の標準偏差である。αR/BとβR/Bは所定の係数である。 In the formula (1), H R / G (r) is a curve that passes through the average value of the R value / G value of the red component section Lr. r is the R value. σ R / G is a standard deviation of the R value / G value of the correction processing target region Pe1. α R / G and β R / G are predetermined coefficients. In Equation (2), H R / B (r) is a curve that passes through the average value of the R value / B value of the red component section Lr. σ R / B is a standard deviation of the R value / B value of the correction processing target region Pe1. α R / B and β R / B are predetermined coefficients.

すなわちいずれの分離曲線について、その形は、式(1)および式(2)の第1項で決定され、赤成分区間LrのR値/G値またはR値/B値の平均値を基準として、R値/G値またはR値/B値の標準偏差の大きさに応じた大きさの凹凸で変化する。なおαによりその変化が微調整される。曲線の高さは、式(1)および式(2)の第2項で決定され、補正処理対象領域Pe1における、R値の平均値とG値の平均値の比またはR値の平均値とB値の平均値の比が基準となっている。なおβによりその高さが微調整される。   In other words, the shape of any separation curve is determined by the first term of the equations (1) and (2), and the R value / G value or the average value of the R value / B value in the red component section Lr is used as a reference. , And changes in irregularities having a size corresponding to the standard deviation of the R value / G value or the R value / B value. The change is finely adjusted by α. The height of the curve is determined by the second term of the equations (1) and (2), and the ratio of the average value of the R values to the average value of the G values or the average value of the R values in the correction processing target region Pe1. The ratio of the average value of B values is the standard. Note that the height is finely adjusted by β.

ここで式(1)および式(2)の意味について説明する。   Here, the meanings of the expressions (1) and (2) will be described.

図7は、補正処理対象領域Pe1の各画素を、R値とR値/G値を軸とする平面に、そのR値とR値/G値に応じた位置にプロットした図である。白抜きの四角印(□印)は、赤色の赤目現象が生じている画素(以下、適宜、赤色赤目画素と称する)を示し、黒塗りの四角印(■印)は、赤色赤目画素以外の画素(すなわち赤色の赤目現象が生じていない画素(以下、適宜、非赤色赤目画素と称する))を示している。赤目現象には、瞳孔部分が赤色になる場合の他に、金色になる現象(いわゆる金目)があるが、金色の赤目現象が生じている画素については、後述する。   FIG. 7 is a diagram in which each pixel in the correction processing target region Pe1 is plotted on a plane having the R value and the R value / G value as axes, at positions corresponding to the R value and the R value / G value. A white square mark (□ mark) indicates a pixel in which a red red-eye phenomenon occurs (hereinafter, referred to as a red-red eye pixel as appropriate), and a black square mark (■ mark) indicates a pixel other than a red-red-eye pixel. A pixel (that is, a pixel in which a red red-eye phenomenon has not occurred (hereinafter, appropriately referred to as a non-red red-eye pixel)) is shown. In addition to the case where the pupil portion is red, the red eye phenomenon includes a gold phenomenon (so-called gold eye). A pixel in which the gold red eye phenomenon occurs will be described later.

図7の例では、非赤色赤目画素は、その多くが下側に集まっている。一方赤色赤目画素は、非赤色赤目画素に比べ分散して分布しており、その多くは、非赤色赤目画素が集まっている領域より上方に存在する。   In the example of FIG. 7, most of the non-red red-eye pixels are gathered on the lower side. On the other hand, the red red-eye pixels are distributed and distributed in comparison with the non-red red-eye pixels, and many of them exist above the region where the non-red red-eye pixels are gathered.

ところで補正処理対象領域Pe1(図4)の大きさが十分大きい場合、補正処理対象領域Pe1には、瞳孔以外の部分の画像の画素が多く含まれる。すなわち補正処理対象領域Pe1における非赤色赤目画素の数は、赤色赤目画素の数より圧倒的に多くなる。したがって補正処理対象領域Pe1の大きさが十分に大きい場合、R値毎(たとえば、赤成分区間Lr毎)のR値/G値の平均値は、非赤色赤目画素の分布を表していることになる。したがって式(1)に示した赤成分区間LrのR値/G値の平均値を通る曲線HR/G(r)は、非赤色赤目画素の分布に沿った曲線になる。 By the way, when the size of the correction processing target region Pe1 (FIG. 4) is sufficiently large, the correction processing target region Pe1 includes a large number of pixels of the image other than the pupil. That is, the number of non-red red eye pixels in the correction processing target region Pe1 is overwhelmingly larger than the number of red red eye pixels. Therefore, when the size of the correction processing target region Pe1 is sufficiently large, the average value of the R value / G value for each R value (for example, for each red component section Lr) represents the distribution of non-red red-eye pixels. Become. Therefore, the curve H R / G (r) passing through the average value of the R value / G value of the red component section Lr shown in the equation (1) is a curve along the distribution of the non-red red-eye pixels.

また非赤色赤目画素の分布に沿った曲線HR/G(r)を、[補正処理対象領域Pe1におけるR値の平均値とG値の平均値の比]に対応する値だけ上方に移動させると(すなわち加算されると)、非赤色赤目画素の分布の上側に沿った曲線を得ることができる。赤色赤目画素の多くは非赤色赤目画素が集まっている領域より上方に存在するので、この非赤色赤目画素の分布の上側に沿った曲線は、非赤色赤目画素の分布と赤色赤目画素の分布の境界を示す曲線、すなわち両者を分離する曲線になる。したがって式(1)のFR/G(r)は、非赤色赤目画素の分布の上側に沿った曲線であって、非赤色赤目画素の分布と赤色赤目画素の分布を分離する曲線になる。 Further, the curve H R / G (r) along the distribution of the non-red red-eye pixels is moved upward by a value corresponding to [ratio of the average value of the R value and the average value of the G value in the correction processing target region Pe1]. And (ie, when added), a curve along the upper side of the non-red red-eye pixel distribution can be obtained. Since many of the red-red-eye pixels exist above the area where the non-red-red-eye pixels are gathered, the curve along the upper side of this non-red-red-eye pixel distribution is the distribution of the non-red-red-eye pixel distribution and the red-red-eye pixel distribution. It becomes a curve indicating the boundary, that is, a curve separating the two. Therefore, F R / G (r) in Expression (1) is a curve along the upper side of the distribution of the non-red red-eye pixels, and is a curve that separates the distribution of the non-red red-eye pixels and the distribution of the red-red eye pixels.

一方、金色の赤目現象が生じている画素(以下、金色赤目画素と称する)は、黄色系の色であるので、金色赤目画素は、R値とR値/G値を軸とする平面では、非赤色赤目画素の分布の中に含まれてしまう。しかしながら、R値とR値/B値を軸とする平面では、金色赤目画素の分布は、R値とR値/G値を軸とする平面における赤色赤目画素と同じように上方に分散して分布する。金色赤目画素以外の画素(以下、非金色赤目画素と称する)は、R値とR値/G値を軸とする平面における非赤色赤目画素と同じようにその多くが下側に集まるように分布する。したがって金色赤目画素は、非金色赤目画素が集まっている領域より上方に存在する。   On the other hand, a pixel in which the golden red-eye phenomenon occurs (hereinafter referred to as a golden red-eye pixel) is a yellowish color, and therefore, the golden red-eye pixel has a plane with R value and R value / G value as axes. It will be included in the distribution of non-red red-eye pixels. However, on the plane with the R value and the R value / B value as the axes, the distribution of the golden red eye pixels is distributed upward in the same manner as the red red eye pixels on the plane having the R value and the R value / G value as the axes. Distributed. Pixels other than the golden red-eye pixels (hereinafter referred to as non-golden red-eye pixels) are distributed so that many of them are gathered on the lower side in the same manner as the non-red red-eye pixels in the plane having the R value and R value / G value as axes. To do. Accordingly, the golden red-eye pixel is present above the region where the non-golden red-eye pixels are gathered.

そのことから式(2)のFR/B(r)も、式(1)のFR/G(r)と同様な理由により、非金色赤目画素の分布の上側に沿った曲線であって、非金色赤目画素の分布と金色赤目画素の分布を分離する曲線となる。 Therefore, FR / B (r) in equation (2) is also a curve along the upper side of the non-golden red-eye pixel distribution for the same reason as FR / G (r) in equation (1). This is a curve that separates the distribution of non-golden red-eye pixels and the distribution of golden-red-eye pixels.

なお非赤色赤目画素の分布と赤色赤目画素の分布を分離する曲線FR/G(r)と、非金色赤目画素の分布と金色赤目画素の分布を分離する曲線FR/B(r)を得るには、R値毎(この例の場合、赤成分区間Lr毎)のR値/G値の平均値が、非赤色赤目画素の分布を表し、R値/B値の平均値が、非金色赤目画素の分布を表していることが必要になる。すなわち補正処理対象領域Pe1が、瞳孔以外の部分の画像の画素が多く含むような画サイズを有する必要がある。 Note that a curve F R / G (r) that separates the distribution of non-red red-eye pixels and the distribution of red-red eye pixels and a curve F R / B (r) that separates the distribution of non-gold red-eye pixels and the distribution of golden red-eye pixels are used. To obtain, the average value of the R value / G value for each R value (in this example, for each red component section Lr) represents the distribution of non-red red eye pixels, and the average value of the R value / B value is It is necessary to represent the distribution of golden red-eye pixels. That is, it is necessary that the correction processing target region Pe1 has an image size that includes a large number of pixels of an image other than the pupil.

そのような理由から補正処理対象領域Pe1の特徴量抽出処理(図6のステップS13)では、補正処理対象領域Pe1が、瞳孔以外の部分の画像を多く含むだけの大きさであるか否かが判定され(図6のステップS21)、そのような大きさでないと判定された場合、補正処理対象領域Pe1が拡大される(ステップS22)。この例の場合、補正処理対象領域Pe1の長手方向の幅が、赤目候補領域Pe2の直径の2倍になるように補正処理対象領域Pe1が拡大される。   For this reason, in the feature amount extraction process (step S13 in FIG. 6) of the correction process target area Pe1, it is determined whether or not the correction process target area Pe1 is large enough to include many images other than the pupil. If it is determined (step S21 in FIG. 6) and it is determined that the size is not such, the correction processing target area Pe1 is enlarged (step S22). In this example, the correction processing target area Pe1 is enlarged so that the longitudinal width of the correction processing target area Pe1 is twice the diameter of the red-eye candidate area Pe2.

分離曲線生成部32は、求めた分離曲線FR/G(r)とFR/B(r)を、内部メモリー12に記憶する。 The separation curve generation unit 32 stores the obtained separation curves F R / G (r) and F R / B (r) in the internal memory 12.

なおこの例の場合、R=0、R=225、および各赤成分区間Lrの中央値(16点)に対応付けてR値/G値の平均値を、分離曲線FR/G(r)の制御点として記憶し、その制御点の間は両隣の制御点に基づいて補完するものとする。またR=0、R=225、および各赤成分区間Lrの中央値(16点)に対応付けてR値/B値の平均値を、分離曲線FR/B(r)の制御点として記憶し、その制御点の間は両隣の制御点に基づいて補完するものとする。このように制御点のみを記憶することで、記憶容量を節約することができる。 In the case of this example, R = 0 / R = 225, and the average value of R / G values in association with the median value (16 points) of each red component section Lr is determined as a separation curve F R / G (r). It is memorized as a control point, and the space between the control points is complemented based on the adjacent control points. Further, R = 0 / R = 225 and the average value of R / B values are stored as control points of the separation curve F R / B (r) in association with the median value (16 points) of each red component section Lr. And between the control points, it complements based on the control points on both sides. By storing only the control points in this way, the storage capacity can be saved.

このように分離曲線が生成されると、処理は、図5のステップS15に進む。ステップS15において、読出制御部22は、印刷処理対象画像TIから1ライン分の画像データを読み出してラインバッファ23に記憶させる。   When the separation curve is generated in this way, the process proceeds to step S15 in FIG. In step S <b> 15, the read control unit 22 reads image data for one line from the print processing target image TI and stores it in the line buffer 23.

ラインバッファ23に1ライン分のデータが記憶されると、ステップS16において、赤目領域特定情報生成部25の補正強度マップ生成部33は、分離曲線に基づいて、ラインバッファ23に記憶された1ラインの画像データの画素が、赤目領域を構成する画像であるか否かを特定する。この例の場合、その特定の結果を示す情報として補正強度マップMaが生成される。   When the data for one line is stored in the line buffer 23, in step S16, the correction intensity map generating unit 33 of the red-eye area specifying information generating unit 25 stores one line stored in the line buffer 23 based on the separation curve. It is specified whether or not the pixel of the image data is an image constituting the red-eye area. In the case of this example, a correction intensity map Ma is generated as information indicating the specific result.

補正強度マップMaの各格納部(すなわち各画素)には、この例の場合、対応する補正処理対象領域Pe1の画素が赤目領域を構成する画素であると推定できる場合は、128以上の値が、そうでない場合には128より小さい値が補正強度係数として格納される。   In this example, each storage unit (that is, each pixel) of the correction intensity map Ma has a value of 128 or more when it can be estimated that the corresponding pixel in the correction processing target region Pe1 is a pixel constituting the red-eye region. Otherwise, a value smaller than 128 is stored as the correction intensity coefficient.

図8は、補正強度マップ生成処理の流れを示すフローチャートである。   FIG. 8 is a flowchart showing the flow of the correction intensity map generation process.

ステップS31において、補正強度マップ生成部33は、ラインバッファ23に記憶されている画像データの中に補正処理対象領域Pe1(図4)の画素が含まれているか否かを判定する。ラインバッファ23に記憶されている画像データの中に補正処理対象領域Pe1の画素が含まれていると判定された場合、ステップS32において、補正強度マップ生成部33は、ラインバッファ23に記憶されている補正処理対象領域Pe1の画素の中から注目する画素を1個選択する。   In step S31, the correction intensity map generation unit 33 determines whether or not the image data stored in the line buffer 23 includes a pixel in the correction processing target area Pe1 (FIG. 4). If it is determined that the image data stored in the line buffer 23 includes a pixel in the correction processing target area Pe1, the correction intensity map generation unit 33 stores the correction data in the line buffer 23 in step S32. One pixel of interest is selected from the pixels in the correction processing target area Pe1.

ステップS33において、補正強度マップ生成部33は、注目画素のR値、R値/G値、およびR値/B値を取得する。   In step S33, the correction intensity map generation unit 33 acquires the R value, R value / G value, and R value / B value of the target pixel.

次にステップS34において、補正強度マップ生成部33は、注目画素のR値に対応する分離曲線の値(以下、分離閾値と称する)を取得する。具体的には、式(1)より注目画素のR値における分離閾値としてのR値/G値(以下、分離閾値R/Gと称する)が求められ、式(2)より注目画素のR値における分離閾値としてのR値/B値(以下、分離閾値R/Bと称する)が求められる。   In step S34, the correction intensity map generation unit 33 acquires a value of a separation curve corresponding to the R value of the target pixel (hereinafter referred to as a separation threshold). Specifically, an R value / G value (hereinafter referred to as a separation threshold R / G) as a separation threshold for the R value of the pixel of interest is obtained from Equation (1), and the R value of the pixel of interest is obtained from Equation (2). R value / B value (hereinafter referred to as separation threshold value R / B) is obtained as a separation threshold value.

ステップS35において、補正強度マップ生成部33は、ステップS34で求められた分離閾値に応じた補正強度係数を決定する。たとえば、図9に示す補正強度係数テーブルが参照されて、注目画素のR値/G値と分離閾値R/Gの比に対応する補正強度係数と、注目画素のR値/B値と分離閾値R/Bの比に対応する補正強度係数とが求められ、大きい方の補正強度係数が、その注目画素の補正強度係数とされる。そして補正強度マップ生成部33は、求めた補正強度係数を、注目画素に対応する補正強度マップMaの格納部に格納する。   In step S35, the correction intensity map generation unit 33 determines a correction intensity coefficient corresponding to the separation threshold obtained in step S34. For example, referring to the correction intensity coefficient table shown in FIG. 9, the correction intensity coefficient corresponding to the ratio between the R value / G value of the target pixel and the separation threshold R / G, the R value / B value of the target pixel, and the separation threshold A correction intensity coefficient corresponding to the R / B ratio is obtained, and the larger correction intensity coefficient is set as the correction intensity coefficient of the target pixel. Then, the correction intensity map generation unit 33 stores the obtained correction intensity coefficient in the storage unit of the correction intensity map Ma corresponding to the target pixel.

注目画素のR値/G値と分離閾値R/Gの比が1以上となる画素は、R値とR値/G値を軸とする平面において(図7)、分離曲線FR/G上またはそれより上方に存在する。また注目画素のR値/B値と分離閾値R/Bの比が1以上となる画素は、R値とR値/B値を軸とする平面において、分離曲線FR/B上またはそれより上方に存在する。したがって注目画素のR値/G値と分離閾値R/Gの比、または注目画素のR値/B値と分離閾値R/Bの比が1以上になったときは、注目画素は、赤目画素の分布の中の画素、すなわち赤目領域を構成する画素として推定され、その画素には、128以上の値が割り当てられる。 A pixel in which the ratio of the R value / G value of the pixel of interest to the separation threshold R / G is 1 or more is on the separation curve FR / G on a plane having the R value and the R value / G value as an axis (FIG. 7). Or it exists above it. A pixel having a ratio of the R value / B value of the target pixel to the separation threshold R / B of 1 or more is on or above the separation curve FR / B on a plane having the R value and the R value / B value as an axis. Present above. Therefore, when the ratio between the R value / G value of the target pixel and the separation threshold R / G, or the ratio between the R value / B value of the target pixel and the separation threshold R / B is 1 or more, the target pixel is a red-eye pixel. Are estimated as pixels constituting the red-eye region, and a value of 128 or more is assigned to the pixel.

一方、注目画素のR値/G値と分離閾値R/Gの比が1より小さい画素は、R値とR値/G値を軸とする平面において(図7)、分離曲線FR/Gより下方に存在する。また注目画素のR値/B値と分離閾値R/Bの比が1より小さい画素は、R値とR値/B値を軸とする平面において、分離曲線FR/Bより下方に存在する。したがって注目画素のR値/G値と分離閾値R/Gの比、および注目画素のR値/B値と分離閾値R/Bの比がいずれも1より小さいときは、注目画素は、非赤目画素の分布の中の画素、すなわち赤目を構成しない画素として推定され、128より小さな値が割り当てられる。 On the other hand, a pixel in which the ratio of the R value / G value of the pixel of interest and the separation threshold R / G is smaller than 1 is a separation curve FR / G on a plane having the R value and the R value / G value as an axis (FIG. 7). It exists below. A pixel having a ratio of the R value / B value of the pixel of interest and the separation threshold R / B smaller than 1 exists below the separation curve FR / B on a plane having the R value and the R value / B value as an axis. . Therefore, when the ratio between the R value / G value of the target pixel and the separation threshold R / G, and the ratio of the R value / B value of the target pixel and the separation threshold R / B are both smaller than 1, the target pixel is a non-red-eye Estimated as a pixel in the pixel distribution, that is, a pixel that does not constitute a red eye, a value less than 128 is assigned.

なお赤目を構成しない画素と推定された画素においても、R値/G値と分離閾値R/Gの比(またはR値/B値と分離閾値R/Bの比)が0.8以上である場合は(すなわち分離曲線から2割下側に分布する画素については)、ある大きさの補正強度係数が割り与えられる。その結果、その画素には、補正処理Z2によりその補正強度係数に応じた補正強度で色補正される。これは、瞳孔でなくても赤目現象の影響を受けている部分にもある程度の補正をかけるためである。   Even in a pixel estimated to be a pixel that does not constitute red eye, the ratio of the R value / G value to the separation threshold R / G (or the ratio of the R value / B value to the separation threshold R / B) is 0.8 or more. In some cases (ie, for pixels distributed 20% below the separation curve), a certain magnitude of correction intensity factor is assigned. As a result, the color of the pixel is corrected by the correction process Z2 with the correction intensity corresponding to the correction intensity coefficient. This is to apply a certain amount of correction to a portion that is not affected by the red-eye phenomenon even if it is not a pupil.

次にステップS36において、補正強度マップ生成部33は、ラインバッファ23内に格納されている補正処理対象領域Pe1のすべての画素を注目画素として選択したか否かを判定する。まだ注目画素として選択されていない画素が存在する場合、補正強度マップ生成部33は、ステップS32に戻り、ラインバッファ23に記憶されている補正処理対象領域Pe1の他の画素を注目画素として選択し、ステップS33以降の処理を同様に実行する。   Next, in step S36, the correction intensity map generation unit 33 determines whether or not all the pixels in the correction processing target region Pe1 stored in the line buffer 23 have been selected as the target pixel. If there is a pixel that has not yet been selected as the target pixel, the correction intensity map generation unit 33 returns to step S32 and selects another pixel of the correction processing target area Pe1 stored in the line buffer 23 as the target pixel. The processes after step S33 are similarly executed.

ステップS36で、ラインバッファ23に記憶されている補正処理対象領域Pe1のすべての画素を注目画素として選択したと判定された場合、1ライン分の補正強度マップMaが生成されたことになる。補正強度マップMaには、赤目領域を構成する画素であると推定された画素については128以上の値が格納され、赤目を構成しない画素であると推定された画素については128より小さな値が補正強度係数として格納される。   If it is determined in step S36 that all the pixels in the correction processing target area Pe1 stored in the line buffer 23 have been selected as the target pixel, the correction intensity map Ma for one line is generated. In the correction intensity map Ma, a value of 128 or more is stored for a pixel estimated to be a pixel constituting a red-eye region, and a value smaller than 128 is corrected for a pixel estimated to be a pixel not constituting a red-eye. Stored as an intensity factor.

補正強度マップ生成部33は、このように、補正強度係数の決定を、ラスター順に、1ラインの画像データ毎に行う。なお補正強度マップ生成部33は、作業領域として、この補正強度係数決定処理で得られた2ライン分の補正強度係数を記憶するメモリー領域を有しており、そこには、隣接するライン(たとえば、第n−1番目のラインと第n番目のライン)の補正強度係数がライン毎に記憶されている。次のライン(たとえば、第n+1番目ライン)の補正強度係数を求める際には、2つ前のライン(たとえば、第n−1番目のライン)の補正強度係数が消去され、そのメモリー領域に求められた第n+1番目のラインの補正強度係数が記憶される。   In this way, the correction intensity map generation unit 33 determines the correction intensity coefficient for each line of image data in raster order. The correction intensity map generation unit 33 has a memory area for storing correction intensity coefficients for two lines obtained by the correction intensity coefficient determination process as a work area, and there are adjacent lines (for example, , (N-1th line and nth line) correction intensity coefficients are stored for each line. When the correction intensity coefficient of the next line (for example, the (n + 1) th line) is obtained, the correction intensity coefficient of the previous line (for example, the (n-1) th line) is erased and obtained in the memory area. The corrected intensity coefficient of the (n + 1) th line is stored.

ステップS37において、垂直方向のぼかし処理が行われる。この垂直方向のぼかし処理は、いま求められたライン(たとえば、第n番目のライン)の補正強度係数と1つ前のライン(たとえば、第n−1番目のライン)の補正強度係数とを合成するもので、具体的には、式(3)が演算される。式(3)中、Map(x)、いま求められたライン(第n番目のライン)の補正処理対象領域Pe1において原点から水平方向に第x番目の補正強度係数を示している。Mapn−1(x)、1つ前のライン(第n−1番目のライン)の補正処理対象領域Pe1において原点から水平方向に第x番目の補正強度係数を示している。αは、ブレンド比率(合成比率)であり、たとえば、1以下の係数である。この例の場合、0.75である。Mapnewは、垂直方向のぼかしが施された結果得られる補正強度係数である。

Figure 2011193073
In step S37, vertical blurring is performed. This vertical blurring process combines the correction intensity coefficient of the currently obtained line (for example, the nth line) and the correction intensity coefficient of the previous line (for example, the (n-1) th line). Specifically, equation (3) is calculated. In Expression (3), Map n (x) represents the xth correction intensity coefficient in the horizontal direction from the origin in the correction processing target area Pe1 of the line (nth line) obtained now. Map n-1 (x) shows the xth correction intensity coefficient in the horizontal direction from the origin in the correction processing target region Pe1 of the previous line (the (n-1) th line). α is a blend ratio (synthesis ratio), for example, a coefficient of 1 or less. In this example, it is 0.75. Map new is a correction strength coefficient obtained as a result of the vertical blurring.
Figure 2011193073

いま求められた1ライン分のすべての補正強度係数について、式(3)が演算されると、ステップS38において、水平方向のぼかし処理が行われる。この水平方向のぼかし処理は、水平方向にガウスぼかしを施すもので、具体的には、式(4)が演算される。式(4)中、Pは、垂直方向のぼかし処理が施された1ライン分の補正強度係数の中のいま注目している補正強度係数を示し、Pnewは、水平方向のぼかしが施された結果得られる補正強度係数である。この例の場合、注目している補正強度係数Pを中心に水平方向に並ぶ8個の補正強度係数が参照されてガウスぼかしが行われる。係数rは補正強度を決定する係数である。

Figure 2011193073
When Equation (3) is calculated for all the correction intensity coefficients for one line that have been obtained, horizontal blurring processing is performed in step S38. This horizontal blurring process performs Gaussian blurring in the horizontal direction, and specifically, equation (4) is calculated. In Expression (4), P i represents the correction intensity coefficient of interest in the correction intensity coefficient for one line that has been subjected to the vertical blurring process, and P new represents the horizontal blurring. Is a corrected intensity coefficient obtained as a result. In this example, eight correction intensity coefficient is referenced Gaussian blur around the correction intensity coefficient P i of interest aligned in the horizontal direction is performed. The coefficient r is a coefficient that determines the correction strength.
Figure 2011193073

以上のように、ステップS38で、水平方向のぼかし処理が行われたとき、その結果得られた補正強度係数が補正強度マップMaに記憶させる。その後処理は、図5のステップ17に進む。またステップS31で、ラインバッファ23に記憶されている画像データの中に補正処理対象領域Pe1の画素が含まれていないと判定されたとき、ステップS31〜S38の処理がスキップされて、同様に、図5のステップS17に進む。ステップS17において、出力データ生成処理が実行される。   As described above, when the horizontal blur process is performed in step S38, the correction intensity coefficient obtained as a result is stored in the correction intensity map Ma. Thereafter, the processing proceeds to step 17 in FIG. When it is determined in step S31 that the image data stored in the line buffer 23 does not include the pixel in the correction processing target area Pe1, the processing in steps S31 to S38 is skipped, and similarly, Proceed to step S17 of FIG. In step S17, output data generation processing is executed.

[出力データ生成処理の説明]
図10は、出力データ生成処理の流れを示すフローチャートである。ステップS41において、補正部26は、ラインバッファ23に赤目候補領域Pe2(図4)の画素が記憶されているか否かを判定し、ラインバッファ23に赤目候補領域Pe2の画素が記憶されていると判定した場合、ステップS42において、ラインバッファ23に記憶されている赤目候補領域Pe2の画素の中から注目する画素を1個選択する。
[Description of output data generation processing]
FIG. 10 is a flowchart showing the flow of output data generation processing. In step S41, the correction unit 26 determines whether or not the pixel of the red-eye candidate region Pe2 (FIG. 4) is stored in the line buffer 23, and if the pixel of the red-eye candidate region Pe2 is stored in the line buffer 23. If determined, in step S42, one pixel of interest is selected from the pixels of the red-eye candidate region Pe2 stored in the line buffer 23.

ステップS43において、補正部26は、注目画素の補正強度係数を、補正強度マップ生成部33(の補正強度マップMa)から読み取る。   In step S43, the correction unit 26 reads the correction intensity coefficient of the target pixel from the correction intensity map generation unit 33 (its correction intensity map Ma).

ステップS44において、補正部26は、読み取った補正強度係数に応じて、注目画素の色を調整する。たとえば補正強度係数の大きさに応じた濃さの黒色を選択し、注目画素の色を、その黒色に置き換える。   In step S44, the correction unit 26 adjusts the color of the target pixel according to the read correction intensity coefficient. For example, a dark black color corresponding to the magnitude of the correction intensity coefficient is selected, and the color of the target pixel is replaced with the black color.

たとえば式(5)により、赤目候補領域Pe2の注目画素iとその両隣の画素i-1,画素i+1のRGBがブレンドされる。そして式(6)により、ブレンドされたRGB(式(5)中、R’,G’,B’)を用いて、ターゲットカラー(式(6)中、TargetColor)としてグレー色が求められる。

Figure 2011193073
Figure 2011193073
For example, according to Expression (5), the target pixel i of the red-eye candidate region Pe2 and the RGB of the pixels i-1 and i + 1 on both sides thereof are blended. Then, the gray color is obtained as the target color (Target Color in Expression (6)) using the blended RGB (R ′, G ′, B ′ in Expression (5)) according to Expression (6).
Figure 2011193073
Figure 2011193073

さらに式(7)により、注目画素の補正強度係数(式(7)中、Intensity)を用いて、ターゲットカラーと注目画素のRGBがブレンドされて、置き換えられる色(式(7)中、Rnew、Gnew,Bnew)が決定される。そして注目画素の色が、ここで求められた色に置き換えられる。

Figure 2011193073
Further, according to the equation (7), the target color and the RGB of the pixel of interest are blended using the correction intensity coefficient of the pixel of interest (Intensity in equation (7)), and the color to be replaced (Rnew, Gnew, Bnew) is determined. Then, the color of the target pixel is replaced with the color obtained here.
Figure 2011193073

次にステップS45において、補正部26は、赤目候補領域Pe2内のすべての画素を注目画素として選択したか否かを判定する。まだ注目画素として選択されていない画素が存在する場合、ステップS42に戻り、補正部26は、それ以降の処理を同様に実行する。   Next, in step S45, the correction unit 26 determines whether or not all the pixels in the red-eye candidate region Pe2 have been selected as the target pixel. If there is a pixel that has not yet been selected as the target pixel, the process returns to step S42, and the correction unit 26 performs the subsequent processing in the same manner.

ステップS45で、赤目候補領域Pe2内のすべての画素を注目画素として選択されたと判定された場合、またはステップS41で、ラインバッファ23に記憶されている画像データの中に赤目候補領域Pe2(図4)の画素が含まれていないと判定された場合、処理は、ステップS46に進む。ステップS46において、出力制御部27は、ラインバッファ23に記憶されている印刷処理対象画像TIの1ライン分の画像データから、印刷データを生成する。生成された印刷データはプリンターエンジン15に供給され、そこで印刷データに基づく画像の印刷が実行される。   If it is determined in step S45 that all the pixels in the red-eye candidate region Pe2 have been selected as the target pixel, or in step S41, the red-eye candidate region Pe2 (FIG. 4) is included in the image data stored in the line buffer 23. ), The process proceeds to step S46. In step S <b> 46, the output control unit 27 generates print data from the image data for one line of the print processing target image TI stored in the line buffer 23. The generated print data is supplied to the printer engine 15, where an image is printed based on the print data.

以上のように出力データ生成処理が実行されると、処理は、図5のステップS18に進み、読出制御部22は、印刷処理対象画像TIからすべてのライン分のデータを読み出したか否かを判定し、まだ読み出していないラインがまだ残っていると判定した場合、処理は、ステップS15に戻り、それ以降の処理が同様に行われる。   When the output data generation process is executed as described above, the process proceeds to step S18 in FIG. 5, and the read control unit 22 determines whether or not data for all lines has been read from the print process target image TI. However, if it is determined that there are still unread lines, the process returns to step S15, and the subsequent processes are performed in the same manner.

ステップS18で、すべてのライン分のデータ(すなわち印刷処理対象画像TIのすべての画像データ)が読み出されたと判定された場合、印刷処理は終了する。   If it is determined in step S18 that data for all lines (that is, all image data of the print processing target image TI) has been read, the printing process ends.

[実施形態における効果] [Effect in the embodiment]

1.以上のように、補正処理対象領域Pe1の1ラインの画像データ毎に、補正強度係数を設定するようにしたので、内部メモリー12の作業領域が小さく、たとえば赤目領域特定情報生成部25に、1ラインの画像データしか供給されない場合であっても、適切に赤目補正を行うことができる。   1. As described above, since the correction intensity coefficient is set for each line of image data in the correction processing target area Pe1, the work area of the internal memory 12 is small. Even when only line image data is supplied, red-eye correction can be performed appropriately.

2.また以上において、生成した1ラインの画像データの補正強度係数に対して垂直方向および水平方向のぼかし補正を施すようにしたので、たとえば、赤目領域のエッジ部分をなだらかにするなど、見栄えよく赤目を補正することができる。   2. In the above, since the vertical and horizontal blur correction is applied to the correction intensity coefficient of the generated one-line image data, for example, the red eye has a good appearance such as smoothing the edge portion of the red-eye region. It can be corrected.

[変形例]
1.以上においては、垂直方向のぼかし処理のぼかしの度合、および水平方向のぼかし処理のぼかしの度合の相対的な差については、言及しなかったが、たとえば、水平方向のぼかし処理のぼかしの度合を、垂直方向のぼかし処理のぼかしの度合より強くすることができる。なおぼかしの度合は、たとえば、人間の視覚によって確認され、水平方向のぼかし処理のいわゆるぼけ具合が、垂直方向のぼかし処理のいわゆるぼけ具合より強くなるように、水平方向のぼかし処理における係数rや、垂直方向のぼかし処理における係数αの値が決定される。
[Modification]
1. In the above, we did not mention the relative difference between the degree of blurring in the vertical direction blurring process and the degree of blurring degree in the horizontal direction blurring process. The degree of blur in the vertical blur process can be made stronger. Note that the degree of blurring is confirmed by human vision, for example, the coefficient r in the horizontal blurring process so that the so-called blurring degree of the horizontal blurring process is stronger than the so-called blurring degree of the vertical blurring process. The value of the coefficient α in the vertical blurring process is determined.

2.以上においては、垂直方向のぼかし処理で用いたブレンド率αは、0.75としたが、他の値とすることもできる。また第n番目のラインの注目している補正強度係数と1つ前の第n−1番目のラインの注目している補正強度係数に対応する補正強度係数との差の大きさに応じてブレンド率αの値を変更することもできる。たとえば、両者の差異が10以上あったとき、ブレンド率は他の値に変更するようにできる。   2. In the above description, the blend rate α used in the vertical blurring process is 0.75, but other values may be used. Also, blending is performed in accordance with the magnitude of the difference between the correction intensity coefficient of interest in the nth line and the correction intensity coefficient corresponding to the correction intensity coefficient of interest of the previous (n−1) th line. It is also possible to change the value of the rate α. For example, when the difference between the two is 10 or more, the blend rate can be changed to another value.

3.また以上においては、水平方向のぼかし処理としてのガウスぼかし処理の参照範囲を、所定の値としたが、赤目候補領域Pe2の径の大きさから求めることができる。   3. In the above description, the reference range of the Gaussian blur processing as the horizontal blur processing is set to a predetermined value, but can be obtained from the size of the diameter of the red-eye candidate region Pe2.

4.また以上においては、1ラインの画像データ毎に処理を施す場合を例として説明したが、たとえば2ライン以上の所定のライン数の画像データ毎に処理を施すようにすることもできる。   4). In the above description, the case where processing is performed for each line of image data has been described as an example. However, for example, processing may be performed for image data of a predetermined number of lines of two or more lines.

5.また以上においては、プリンター1を利用した場合を例として説明したが、コンピューター、デジタルビデオカメラ、またはデジタルスチルカメラ等の他の画像処理装置に適用することができる。すなわち画像処理装置にインストールされる赤目補正ソフトウェア等に実装することができる。この場合、補正強度マップMaを生成する機能が画像処理装置に実装され、画像処理装置からプリンターや表示側に補正強度マップMaが提供され、プリンターや表示側で色補正が実行されるようにすることもできる。   5. In the above description, the case where the printer 1 is used has been described as an example. That is, it can be implemented in red-eye correction software or the like installed in the image processing apparatus. In this case, a function for generating the correction intensity map Ma is implemented in the image processing apparatus, and the correction intensity map Ma is provided from the image processing apparatus to the printer or the display side so that color correction is executed on the printer or the display side. You can also.

6.また上述した機能は、コンピューター等によって実現される場合、上述した機能の処理内容を記述したプログラムが提供される。そのプログラムをコンピューターで実行することにより、処理機能がコンピューター上で実現される。処理内容を記述したプログラムは、コンピューターで読み取り可能な記録媒体に記録しておくことができる。コンピューターで読み取り可能な記録媒体としては、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリーなどがある。磁気記録装置には、ハードディスク装置(HDD)、フレキシブルディスク(FD)、磁気テープなどがある。光ディスクには、DVD(Digital Versatile Disc)、DVD−RAM、CD−ROM (Compact
Disc ROM)、CD−R (Recordable)/RW (ReWritable)などがある。光磁気記録媒体には、MO(Magneto-Optical Disc)などがある。
6). When the functions described above are realized by a computer or the like, a program describing the processing contents of the functions described above is provided. The processing function is realized on the computer by executing the program on the computer. The program describing the processing contents can be recorded on a computer-readable recording medium. Examples of the computer-readable recording medium include a magnetic recording device, an optical disk, a magneto-optical recording medium, and a semiconductor memory. Examples of the magnetic recording device include a hard disk device (HDD), a flexible disk (FD), and a magnetic tape. Optical discs include DVD (Digital Versatile Disc), DVD-RAM, CD-ROM (Compact
Disc ROM) and CD-R (Recordable) / RW (ReWritable). Magneto-optical recording media include MO (Magneto-Optical Disc).

プログラムを流通させる場合には、たとえば、そのプログラムが記録されたDVD、CD−ROMなどの可搬型記録媒体が販売される。また、プログラムをサーバコンピューターの記憶装置に格納しておき、ネットワークを介して、サーバコンピューターから他のコンピューターにそのプログラムを転送することもできる。   When distributing the program, for example, portable recording media such as a DVD and a CD-ROM in which the program is recorded are sold. It is also possible to store the program in a storage device of a server computer and transfer the program from the server computer to another computer via a network.

プログラムを実行するコンピューターは、たとえば、可搬型記録媒体に記録されたプログラム若しくはサーバコンピューターから転送されたプログラムを、自己の記憶装置に格納する。そして、コンピューターは、自己の記憶装置からプログラムを読み取り、プログラムに従った処理を実行する。なお、コンピューターは、可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することもできる。また、コンピューターは、サーバコンピューターからプログラムが転送される毎に、逐次、受け取ったプログラムに従った処理を実行することもできる。   The computer that executes the program stores, for example, the program recorded on the portable recording medium or the program transferred from the server computer in its own storage device. Then, the computer reads the program from its own storage device and executes processing according to the program. The computer can also read a program directly from a portable recording medium and execute processing according to the program. Further, each time the program is transferred from the server computer, the computer can sequentially execute processing according to the received program.

なお上記実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部をハードウェアに置き換えるようにしてもよい。   In the above embodiment, a part of the configuration realized by hardware may be replaced with software, and conversely, a part of the configuration realized by software may be replaced by hardware. .

7.またフローチャートにその流れを示した処理は、各ステップが、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくても、並列的あるいは個別に実行される処理を含むものである。また適宜処理を省略することもできる。たとえば、図5においては、分離曲線を生成する処理、補正強度マップMaを生成する処理、出力データを生成する処理(補正処理を含む)が、連続して行われているが、それらは別途並列的に行われるようにすることもできる。   7). The process shown in the flowchart is executed in parallel or individually even if the steps are not necessarily processed in time series, as well as processes performed in time series in the order described. It includes processing that. Further, the processing can be omitted as appropriate. For example, in FIG. 5, the process of generating the separation curve, the process of generating the correction intensity map Ma, and the process of generating the output data (including the correction process) are continuously performed. It can also be done automatically.

1 プリンター, 11 CPU , 12 内部メモリー, 13 操作部, 14 表示部, 15 プリンターエンジン, 16 カードI/F, 17 カードスロット, 18 メモリーカード, 21 画像読取部, 22 読出制御部, 23 ラインバッファ, 24 補正処理対象領域取得部, 25 赤目領域特定情報生成部, 26 補正部, 27 出力制御部, 31 特徴量抽出部, 32 分離曲線生成部, 33 補正強度マップ生成部   DESCRIPTION OF SYMBOLS 1 Printer, 11 CPU, 12 Internal memory, 13 Operation part, 14 Display part, 15 Printer engine, 16 Card I / F, 17 Card slot, 18 Memory card, 21 Image reading part, 22 Reading control part, 23 Line buffer, 24 correction processing target region acquisition unit, 25 red-eye region specific information generation unit, 26 correction unit, 27 output control unit, 31 feature amount extraction unit, 32 separation curve generation unit, 33 correction intensity map generation unit

Claims (6)

所定のライン数のカラー画像データ毎に、赤目を補正する処理を施す画像処理装置において、
上記カラー画像の中の目の画像を含む領域を補正処理対象領域として取得する取得手段と、
少なくても2つの色の特徴量を軸とする空間における上記補正処理対象領域の上記特徴量の分布において、赤目領域を構成する画素の分布とそれ以外の画素の分布を分離する分離曲線を生成する赤目領域特定情報生成手段と、
上記補正処理対象領域の各画素の値と、その値の、上記分離曲線に対応する値の大きさに基づいて、その画素に対する補正の強度を示す補正強度係数を決定する決定処理を、ラスター順に、上記補正処理対象領域の所定のライン数の画像データ毎に行う補正強度決定手段と
を有し、
上記補正強度決定手段は、上記決定処理で決定された補正強度係数と、前回の決定処理で決定された上記所定ライン数の画像データの補正強度係数を合成する垂直方向のぼかし処理を実行するとともに、その結果得られた補正強度係数について水平方向に隣接する複数の補正強度係数を利用してガウスぼかしを施す水平方向のぼかし処理を実行する
ことを特徴とする画像処理装置。
In an image processing apparatus that performs processing for correcting red eyes for each color image data of a predetermined number of lines,
Acquisition means for acquiring an area including an eye image in the color image as a correction processing target area;
Generates a separation curve that separates the distribution of the pixels that make up the red-eye region from the distribution of other pixels in the distribution of the feature amounts in the correction target region in a space that has at least two color feature amounts as axes. Red-eye area specifying information generating means for
Based on the value of each pixel in the correction processing target area and the magnitude of the value corresponding to the separation curve, a determination process for determining a correction strength coefficient indicating the strength of correction for the pixel is performed in raster order. Correction intensity determination means for each image data of a predetermined number of lines in the correction processing target area,
The correction intensity determining means executes a vertical blur process for combining the correction intensity coefficient determined in the determination process and the correction intensity coefficient of the predetermined number of lines of image data determined in the previous determination process. An image processing apparatus that performs horizontal blurring processing that performs Gaussian blurring using a plurality of correction strength coefficients adjacent in the horizontal direction with respect to the correction intensity coefficient obtained as a result.
請求項1に記載の画像処理装置において、
前記補正強度決定手段は、前記水平方向のぼかし処理におけるぼかしの度合を、前記垂直方向のぼかし処理におけるぼかしの度合より強くする
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
The image processing apparatus according to claim 1, wherein the correction intensity determination unit makes the degree of blurring in the blurring process in the horizontal direction stronger than the degree of blurring in the blurring process in the vertical direction.
請求項1に記載の画像処理装置において、
前記補正強度決定手段は、前記垂直方向のぼかし処理において、所定の大きさの合成比率で合成し、垂直方向において隣接する補正強度係数の差の大きさによって、上記合成比率を変更する
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
The correction intensity determination means combines the predetermined ratio in the vertical blurring process, and changes the combination ratio according to the difference between the correction intensity coefficients adjacent in the vertical direction. An image processing apparatus.
請求項1に記載の画像処理装置において、
前記補正強度決定手段は、前記水平方向のぼかし処理としてのガウスぼかし処理における参照範囲を、前記補正処理対象領域の赤みがかった領域の半径の大きさによって変更する
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
The image processing apparatus according to claim 1, wherein the correction intensity determination unit changes a reference range in the Gaussian blur process as the horizontal blur process according to a radius of a reddish area of the correction process target area.
所定のライン数のカラー画像データ毎に、赤目を補正する処理を施す画像処理装置の画像処理方法において、
上記カラー画像の中の目の画像を含む領域を補正処理対象領域として取得する取得ステップと、
少なくても2つの色の特徴量を軸とする空間における上記補正処理対象領域の上記特徴量の分布において、赤目領域を構成する画素の分布とそれ以外の画素の分布を分離する分離曲線を生成する赤目領域特定情報生成ステップと、
上記補正処理対象領域の各画素の値と、その値の、上記分離曲線に対応する値の大きさに基づいて、その画素に対する補正の強度を示す補正強度係数を決定する決定処理を、ラスター順に、上記補正処理対象領域の所定のライン数の画像データ毎に行う補正強度決定ステップと
を含み、
上記補正強度決定ステップは、上記決定処理で決定された補正強度係数と、前回の決定処理で決定された上記所定ライン数の画像データの補正強度係数を合成する垂直方向のぼかし処理を実行するとともに、その結果得られた補正強度係数について水平方向に隣接する複数の補正強度係数を利用してガウスぼかしを施す水平方向のぼかし処理を実行する
ことを特徴とする画像処理方法。
In an image processing method of an image processing apparatus that performs processing for correcting red eyes for each color image data of a predetermined number of lines,
An acquisition step of acquiring an area including an eye image in the color image as a correction processing target area;
Generates a separation curve that separates the distribution of the pixels that make up the red-eye region from the distribution of other pixels in the distribution of the feature amounts in the correction target region in a space that has at least two color feature amounts as axes. A red-eye region identification information generation step,
Based on the value of each pixel in the correction processing target area and the magnitude of the value corresponding to the separation curve, a determination process for determining a correction strength coefficient indicating the strength of correction for the pixel is performed in raster order. A correction intensity determination step performed for each image data of a predetermined number of lines in the correction processing target area,
The correction intensity determination step executes a vertical blurring process for combining the correction intensity coefficient determined in the determination process and the correction intensity coefficient of the predetermined number of lines of image data determined in the previous determination process. An image processing method characterized by executing a horizontal blurring process for performing Gaussian blurring using a plurality of correction intensity coefficients adjacent in the horizontal direction with respect to the correction intensity coefficient obtained as a result.
画像処理をコンピューターに実行させるプログラムであって、
所定のライン数のカラー画像データ毎に、赤目を補正する処理を施す画像処理装置の画像処理方法において、
上記カラー画像の中の目の画像を含む領域を補正処理対象領域として取得する取得ステップと、
少なくても2つの色の特徴量を軸とする空間における上記補正処理対象領域の上記特徴量の分布において、赤目領域を構成する画素の分布とそれ以外の画素の分布を分離する分離曲線を生成する赤目領域特定情報生成ステップと、
上記補正処理対象領域の各画素の値と、その値の、上記分離曲線に対応する値の大きさに基づいて、その画素に対する補正の強度を示す補正強度係数を決定する決定処理を、ラスター順に、上記補正処理対象領域の所定のライン数の画像データ毎に行う補正強度決定ステップと
を含み、
上記補正強度決定ステップは、上記決定処理で決定された補正強度係数と、前回の決定処理で決定された上記所定ライン数の画像データの補正強度係数を合成する垂直方向のぼかし処理を実行するとともに、その結果得られた補正強度係数について水平方向に隣接する複数の補正強度係数を利用してガウスぼかしを施す水平方向のぼかし処理を実行する
画像処理をコンピューターに実行させることを特徴とするプログラム。
A program for causing a computer to execute image processing,
In an image processing method of an image processing apparatus that performs processing for correcting red eyes for each color image data of a predetermined number of lines,
An acquisition step of acquiring an area including an eye image in the color image as a correction processing target area;
Generates a separation curve that separates the distribution of the pixels that make up the red-eye region from the distribution of other pixels in the distribution of the feature amounts in the correction target region in a space that has at least two color feature amounts as axes. A red-eye region identification information generation step,
Based on the value of each pixel in the correction processing target area and the magnitude of the value corresponding to the separation curve, a determination process for determining a correction strength coefficient indicating the strength of correction for the pixel is performed in raster order. A correction intensity determination step performed for each image data of a predetermined number of lines in the correction processing target area,
The correction intensity determination step executes a vertical blurring process for combining the correction intensity coefficient determined in the determination process and the correction intensity coefficient of the predetermined number of lines of image data determined in the previous determination process. A program for causing a computer to execute image processing for executing horizontal blurring processing for performing Gaussian blurring using a plurality of correction strength coefficients adjacent in the horizontal direction with respect to the correction intensity coefficient obtained as a result.
JP2010055445A 2010-03-12 2010-03-12 Image processing apparatus, printing system, image processing method, and program Withdrawn JP2011193073A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010055445A JP2011193073A (en) 2010-03-12 2010-03-12 Image processing apparatus, printing system, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010055445A JP2011193073A (en) 2010-03-12 2010-03-12 Image processing apparatus, printing system, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2011193073A true JP2011193073A (en) 2011-09-29

Family

ID=44797581

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010055445A Withdrawn JP2011193073A (en) 2010-03-12 2010-03-12 Image processing apparatus, printing system, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2011193073A (en)

Similar Documents

Publication Publication Date Title
US7734098B2 (en) Face detecting apparatus and method
JP2008234342A (en) Image processing apparatus and image processing method
US10007846B2 (en) Image processing method
US20090245655A1 (en) Detection of Face Area and Organ Area in Image
US20140064617A1 (en) Image generation apparatus, image generation method, and recording medium
JP2012027687A (en) Image processing apparatus and program
US20090231628A1 (en) Image Processing Apparatus, Image Processing Method, Computer Program for Image Processing
JP2005086516A (en) Imaging apparatus, printing apparatus, image processing apparatus, and program
CN102111556A (en) Image pickup device, image processing method
JP5541679B2 (en) Image processing apparatus and method, and program
JP2009237977A (en) Image output control device, image output control method, image output control program, and printer
JP4957607B2 (en) Detection of facial regions in images
JP4710550B2 (en) Comment layout in images
JP5504990B2 (en) Imaging apparatus, image processing apparatus, and program
JP2018137636A (en) Image processing apparatus and image processing program
JP6098133B2 (en) Face component extraction device, face component extraction method and program
JP2005148915A (en) Appropriate face discrimination method and apparatus for carrying out this method
JP2009251634A (en) Image processor, image processing method, and program
JP2009251633A (en) Image processor, image processing method and program
JP2010224775A (en) Eye catch composition device and method
JP2011193073A (en) Image processing apparatus, printing system, image processing method, and program
JP7443965B2 (en) Information processing device, correction method, program
JP2014174855A (en) Image processor, image processing method and program
JP2006072743A (en) Catchlight synthesis method and apparatus
JP2009237978A (en) Image output control device, image output control method, image output control program, and printer

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20130604