JP2017103685A - Image processing device and method, and imaging device - Google Patents

Image processing device and method, and imaging device Download PDF

Info

Publication number
JP2017103685A
JP2017103685A JP2015236990A JP2015236990A JP2017103685A JP 2017103685 A JP2017103685 A JP 2017103685A JP 2015236990 A JP2015236990 A JP 2015236990A JP 2015236990 A JP2015236990 A JP 2015236990A JP 2017103685 A JP2017103685 A JP 2017103685A
Authority
JP
Japan
Prior art keywords
image
shadow
area
region
unit
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
JP2015236990A
Other languages
Japanese (ja)
Other versions
JP6616674B2 (en
JP2017103685A5 (en
Inventor
光太郎 北島
Kotaro Kitajima
光太郎 北島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2015236990A priority Critical patent/JP6616674B2/en
Publication of JP2017103685A publication Critical patent/JP2017103685A/en
Publication of JP2017103685A5 publication Critical patent/JP2017103685A5/ja
Application granted granted Critical
Publication of JP6616674B2 publication Critical patent/JP6616674B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To reduce a shadow with higher accuracy by adaptively determining a non-shadow region to be referred to in order to reduce the shadow.SOLUTION: An image processing device includes extraction means (50) for extracting a shadow region of a subject occurring in a first image by using lighting means from the first image photographed by using the lighting means, a reference region determination processing part (503) for setting a reference region to be referred to in order to correct an image signal of the shadow region in the first image so as not to include the shadow region and a region satisfying a predetermined condition, and a reference pixel conversion processing part (504) for correcting the image signal of the shadow region by using information of the reference region.SELECTED DRAWING: Figure 5

Description

本発明は、画像処理装置および方法、および撮像装置に関する。   The present invention relates to an image processing apparatus and method, and an imaging apparatus.

従来から被写体の影を補正する技術が開示されている。具体的には、画像の輝度および色相情報を用いて影領域を検出し、検出した影領域を除去する技術が開示されている。   Conventionally, a technique for correcting a shadow of a subject has been disclosed. Specifically, a technique for detecting a shadow area using luminance and hue information of an image and removing the detected shadow area is disclosed.

特許文献1では、影領域を検出するとともに、影領域に隣接する任意の非影の領域を参照領域として選択する。そして、影領域と非影の参照領域の輝度、色相の差分を影領域に加算することで、影を除去した画像を得ることができる。   In Patent Document 1, a shadow area is detected, and an arbitrary non-shadow area adjacent to the shadow area is selected as a reference area. Then, by adding the luminance and hue differences between the shadow area and the non-shadow reference area to the shadow area, an image from which the shadow is removed can be obtained.

特開2010−237976号公報JP 2010-237976 A

しかしながら、特許文献1には、影除去に用いる非影の参照領域をどのように選択するかが開示されていない。また、影領域に隣接する領域全てが参照領域として適しているとは言えず、適切な参照領域を適応的に選択する必要がある。   However, Patent Document 1 does not disclose how to select a non-shadow reference region used for shadow removal. Moreover, it cannot be said that all the regions adjacent to the shadow region are suitable as the reference region, and it is necessary to adaptively select an appropriate reference region.

本発明は上記問題点を鑑みてなされたものであり、影を低減するために参照する非影領域を適応的に決定することで、より精度良く影を低減することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to adaptively determine a non-shadow region to be referred to in order to reduce shadows, thereby reducing shadows with higher accuracy.

上記目的を達成するために、本発明の画像処理装置は、照明手段を用いて撮影した第1の画像から、前記照明手段を用いることで前記第1の画像に発生する被写体の影領域を抽出する抽出手段と、前記影領域の画像信号を補正するために参照する参照領域を、前記影領域および予め決められた条件を満たす領域を含まないように、前記第1の画像内に設定する設定手段と、前記参照領域の情報を用いて、前記影領域の画像信号を補正する補正手段とを有する。   In order to achieve the above object, the image processing apparatus of the present invention extracts a shadow region of a subject generated in the first image by using the illumination unit, from a first image taken using the illumination unit. A setting unit configured to set, in the first image, a reference region to be referred to for correcting the image signal of the shadow region and the reference region to be corrected so as not to include the shadow region and a region satisfying a predetermined condition. And correction means for correcting the image signal of the shadow area using the information of the reference area.

本発明によれば、影を低減するために参照する非影領域を適応的に決定することで、より精度良く影を低減することができる。   According to the present invention, it is possible to reduce the shadow with higher accuracy by adaptively determining the non-shadow region to be referred to in order to reduce the shadow.

本発明の実施形態におけるデジタルカメラの構成を示すブロック図。1 is a block diagram illustrating a configuration of a digital camera according to an embodiment of the present invention. 実施形態における画像処理部の構成を示すブロック図。The block diagram which shows the structure of the image process part in embodiment. 第1の実施形態における撮影処理及び影低減処理を示すフローチャート。6 is a flowchart illustrating photographing processing and shadow reduction processing according to the first embodiment. 第1の実施形態における撮影画像および差分画像の一例を示す図。The figure which shows an example of the picked-up image and difference image in 1st Embodiment. 第1の実施形態における影低減処理部の構成を示すブロック図。The block diagram which shows the structure of the shadow reduction process part in 1st Embodiment. 第1の実施形態における参照画像領域の決定方法を説明する図。FIG. 6 is a diagram for explaining a reference image region determination method according to the first embodiment. 第2の実施形態における参照画像領域の決定方法を説明する図。FIG. 10 is a diagram illustrating a method for determining a reference image area in the second embodiment.

以下、添付図面を参照して本発明を実施するための形態を詳細に説明する。なお、本実施形態では、画像処理装置としてデジタルカメラに適用した例について説明する。   DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the accompanying drawings. In the present embodiment, an example in which the image processing apparatus is applied to a digital camera will be described.

<第1の実施形態>
以下、図1〜6を参照して、本発明の第1の実施形態について説明する。図1は、第1の実施形態におけるデジタルカメラ100の構成例を示すブロック図である。
<First Embodiment>
The first embodiment of the present invention will be described below with reference to FIGS. FIG. 1 is a block diagram illustrating a configuration example of a digital camera 100 according to the first embodiment.

図1に示すデジタルカメラ100において、ズームレンズ、フォーカスレンズを含むレンズ群101(撮像光学系)、及び、絞り機能を備えるシャッター102を介して入射した光は、撮像部103において光電変換される。撮像部103は、CCDやCMOS素子などで構成され、光電変換により得られた電気信号は、画像信号としてA/D変換器104へ出力される。A/D変換器104は、撮像部103から出力されるアナログ画像信号をデジタル画像信号(画像データ)に変換し、画像処理部105に出力する。   In the digital camera 100 shown in FIG. 1, light incident through a lens group 101 (imaging optical system) including a zoom lens and a focus lens and a shutter 102 having a diaphragm function is photoelectrically converted in an imaging unit 103. The imaging unit 103 is configured by a CCD, a CMOS element, or the like, and an electric signal obtained by photoelectric conversion is output to the A / D converter 104 as an image signal. The A / D converter 104 converts the analog image signal output from the imaging unit 103 into a digital image signal (image data) and outputs the digital image signal to the image processing unit 105.

画像処理部105は、A/D変換器104からの画像データ、または、メモリ制御部107を介して画像メモリ106から読み出された画像データに対し、ホワイトバランスなどの色変換処理、γ処理、輪郭強調処理、色補正処理などの各種画像処理を行う。画像処理部105から出力された画像データは、メモリ制御部107を介して画像メモリ106に書き込まれる。画像メモリ106は、画像処理部105から出力された画像データや、表示部109に表示するための画像データを格納する。   The image processing unit 105 performs color conversion processing such as white balance, γ processing, image data from the A / D converter 104 or image data read from the image memory 106 via the memory control unit 107. Various image processing such as contour enhancement processing and color correction processing is performed. The image data output from the image processing unit 105 is written into the image memory 106 via the memory control unit 107. The image memory 106 stores image data output from the image processing unit 105 and image data to be displayed on the display unit 109.

顔検出部113は、撮影された画像から人物の顔が存在する顔領域を検出する。画像処理部105では、顔検出部113の顔検出結果や、撮像した画像データを用いて所定の評価値算出処理を行い、得られた評価値に基づいてシステム制御部50が露光制御、焦点調節制御を行う。これにより、TTL(スルー・ザ・レンズ)方式のAF(オートフォーカス)処理、AE(自動露出)処理、AWB(オートホワイトバランス)処理などを行う。   The face detection unit 113 detects a face area where a human face exists from the captured image. The image processing unit 105 performs a predetermined evaluation value calculation process using the face detection result of the face detection unit 113 and the captured image data, and the system control unit 50 performs exposure control and focus adjustment based on the obtained evaluation value. Take control. Thus, TTL (through-the-lens) AF (autofocus) processing, AE (automatic exposure) processing, AWB (auto white balance) processing, and the like are performed.

また、D/A変換器108は、画像メモリ106に格納されている表示用のデジタルの画像データをアナログ信号に変換して表示部109に供給する。表示部109は、LCD等の表示器上に、D/A変換器108からのアナログ信号に応じた表示を行う。   Further, the D / A converter 108 converts the display digital image data stored in the image memory 106 into an analog signal and supplies the analog signal to the display unit 109. The display unit 109 performs display according to an analog signal from the D / A converter 108 on a display such as an LCD.

コーデック部110は、画像メモリ106に格納された画像データをJPEG、MPEGなどの規格に基いてそれぞれ圧縮符号化または復号化する。システム制御部50は符号化した画像データを、インタフェース(I/F)111を介して、メモリカードやハードディスク等の記録媒体112に格納する。   The codec unit 110 compresses and decodes the image data stored in the image memory 106 based on a standard such as JPEG or MPEG. The system control unit 50 stores the encoded image data in a recording medium 112 such as a memory card or a hard disk via an interface (I / F) 111.

また、I/F111を介して記録媒体112から読み出された画像データをコーデック部110により復号して伸長し、画像メモリ106に格納する。そして、画像メモリ106に格納された画像データを、メモリ制御部107、D/A変換器108を介して表示部109に表示することで、画像を再生表示することができる。   Further, the image data read from the recording medium 112 via the I / F 111 is decoded and expanded by the codec unit 110 and stored in the image memory 106. Then, by displaying the image data stored in the image memory 106 on the display unit 109 via the memory control unit 107 and the D / A converter 108, the image can be reproduced and displayed.

影低減処理部114は、撮影画像の影を低減または除去する。なお、影低減処理部114により行われる影低減処理については、詳細に後述する。   The shadow reduction processing unit 114 reduces or removes the shadow of the captured image. The shadow reduction processing performed by the shadow reduction processing unit 114 will be described in detail later.

システム制御部50はデジタルカメラ100のシステム全体を制御する。不揮発性メモリ121は、EEPROMなどのメモリにより構成され、システム制御部50の処理に必要なプログラムやパラメータなどを格納する。システムメモリ122はシステム制御部50の動作用の定数、変数、不揮発性メモリ121から読みだしたプログラム等を展開するために用いられる。システム制御部50は、不揮発性メモリ121に記録されたプログラムを実行することで、後述する本実施形態の各処理を実現する。なお、ここでいうプログラムとは、本実施形態にて後述する各種フローチャートを実行するためのプログラムのことである。この際、システム制御部50の動作用の定数、変数、不揮発性メモリ121から読み出したプログラム等をシステムメモリ122に展開する。   The system control unit 50 controls the entire system of the digital camera 100. The nonvolatile memory 121 is configured by a memory such as an EEPROM, and stores programs, parameters, and the like necessary for processing of the system control unit 50. The system memory 122 is used for developing constants and variables for operation of the system control unit 50, programs read from the nonvolatile memory 121, and the like. The system control unit 50 implements each process of the present embodiment to be described later by executing a program recorded in the nonvolatile memory 121. In addition, the program here is a program for executing various flowcharts described later in the present embodiment. At this time, constants, variables for operation of the system control unit 50, programs read from the nonvolatile memory 121, and the like are expanded in the system memory 122.

操作部120は、ユーザによる操作を受け付ける。フラッシュ123は照明装置であり、デジタルカメラ100に内蔵された照明装置であっても、デジタルカメラ100に着脱可能な照明装置であってもよい。測距センサ124は被写体までの距離を測定し、撮影画素の画素単位に対応する距離情報を2次元の距離マップ画像として出力する。なお、被写体までの距離を測定する方法は測距センサ124を用いた方法に限定されない。例えば、撮像部103を用いて得られた画像データに基づいて被写体までの距離を測定する方法でもよい。   The operation unit 120 receives an operation by a user. The flash 123 is a lighting device, and may be a lighting device built in the digital camera 100 or a lighting device detachable from the digital camera 100. The distance measuring sensor 124 measures the distance to the subject and outputs distance information corresponding to the pixel unit of the photographic pixel as a two-dimensional distance map image. The method for measuring the distance to the subject is not limited to the method using the distance measuring sensor 124. For example, a method of measuring the distance to the subject based on image data obtained using the imaging unit 103 may be used.

図2は画像処理部105の構成を示すブロック図である。以下、図2を参照して、画像処理部105における処理について説明する。なお、本実施形態では、撮像部103はベイヤー配列のカラーフィルタにより覆われているものとする。従って、撮像部103の各画素からはR、G、Bいずれかの画像信号が出力される。   FIG. 2 is a block diagram illustrating a configuration of the image processing unit 105. Hereinafter, the processing in the image processing unit 105 will be described with reference to FIG. In the present embodiment, it is assumed that the imaging unit 103 is covered with a Bayer array color filter. Accordingly, one of R, G, and B image signals is output from each pixel of the imaging unit 103.

図1のA/D変換器104から画像処理部105に入力された画像信号は、まず、図2の同時化処理部200に入力される。同時化処理部200は、入力されたR、G、Bの画像信号に対して同時化処理を行い、各画素について色信号RGBを生成する。WB増幅部201は、公知の処理によりシステム制御部50が算出するホワイトバランスゲイン値に基づき、生成された各画素の色信号RGBにゲインをかけ、ホワイトバランスを調整する。WB増幅部201によりホワイトバランスが調整された色信号RGBは、輝度・色信号生成部202に入力される。輝度・色信号生成部202は色信号RGBから輝度信号Yを生成し、生成した輝度信号Yを輪郭強調処理部203へ、また、色信号RGBを色変換処理部205へ出力する。   The image signal input from the A / D converter 104 of FIG. 1 to the image processing unit 105 is first input to the synchronization processing unit 200 of FIG. The synchronization processing unit 200 performs synchronization processing on the input R, G, and B image signals, and generates a color signal RGB for each pixel. The WB amplification unit 201 adjusts the white balance by applying a gain to the generated color signal RGB of each pixel based on the white balance gain value calculated by the system control unit 50 by a known process. The color signal RGB whose white balance is adjusted by the WB amplification unit 201 is input to the luminance / color signal generation unit 202. The luminance / color signal generation unit 202 generates a luminance signal Y from the color signals RGB, and outputs the generated luminance signal Y to the contour enhancement processing unit 203 and the color signal RGB to the color conversion processing unit 205.

輪郭強調処理部203では、輝度信号Yに対して輪郭強調処理を行い、輝度ガンマ処理部204へ出力する。輝度ガンマ処理部204では輝度信号Yに対してガンマ補正を行い、メモリ制御部107を介して輝度信号Yを画像メモリ106に出力する。   The contour enhancement processing unit 203 performs contour enhancement processing on the luminance signal Y and outputs the result to the luminance gamma processing unit 204. The luminance gamma processing unit 204 performs gamma correction on the luminance signal Y and outputs the luminance signal Y to the image memory 106 via the memory control unit 107.

一方、色変換処理部205は、色信号RGBに、例えば、マトリクス演算を行って、所望のカラーバランスへ変換する。色ガンマ処理部206では、色信号RGBにガンマ補正を行う。色差信号生成部207では、RGB信号から色差信号R−Y、B−Yを生成する。   On the other hand, the color conversion processing unit 205 converts the color signal RGB into a desired color balance by performing, for example, a matrix operation. The color gamma processing unit 206 performs gamma correction on the color signals RGB. The color difference signal generation unit 207 generates color difference signals RY and BY from the RGB signals.

このようにして生成された輝度信号Y及び色差信号R−Y、B−Y(画像データ)は、画像メモリ106に一旦記憶され、コーデック部110によって圧縮符号化され、記録媒体112に記録される。   The luminance signal Y and the color difference signals RY and BY (image data) generated in this way are temporarily stored in the image memory 106, compressed and encoded by the codec unit 110, and recorded on the recording medium 112. .

次に、上記構成を有するデジタルカメラ100の第1の実施形態における処理について説明する。なお、第1の実施形態におけるデジタルカメラ100は、少なくとも、通常の撮影モードと、フラッシュ123によって生じる影を低減もしくは除去可能な影低減撮影モードの2種類の撮影モードを備えているものとする。   Next, processing in the first embodiment of the digital camera 100 having the above configuration will be described. Note that the digital camera 100 according to the first embodiment includes at least two types of shooting modes, that is, a normal shooting mode and a shadow reduction shooting mode in which a shadow caused by the flash 123 can be reduced or removed.

図3(a)は、撮影処理におけるシステム制御部50の処理を説明するフローチャートである。まず、S301において、フラッシュ123を用いた撮影モード(フラッシュ発光モード)であるか否かを判定する。フラッシュ撮影を行う場合は、S302に進み、フラッシュ撮影を行わない撮影モード(フラッシュ非発光モード)の場合は、S305に進んで通常のフラッシュ非発光撮影を行う。   FIG. 3A is a flowchart for explaining the process of the system control unit 50 in the photographing process. First, in S301, it is determined whether or not it is a photographing mode using the flash 123 (flash emission mode). If flash photography is to be performed, the process proceeds to S302. If the photography mode is not to perform flash photography (flash non-flash mode), the process proceeds to S305 and normal flash non-flash photography is performed.

S302では、ユーザによる操作部120への操作により、影低減撮影モードが選択されているか否かを判定する。影低減撮影モードが選択されている場合は、S303に進み、影低減撮影モードが選択されていない場合は、S305へ進んで通常のフラッシュ発光撮影を行う。   In S302, it is determined whether or not the shadow reduction shooting mode is selected by an operation on the operation unit 120 by the user. If the shadow reduction shooting mode has been selected, the process proceeds to S303. If the shadow reduction shooting mode has not been selected, the process proceeds to S305 to perform normal flash shooting.

S303では、まず、フラッシュ123を非発光状態として、撮影露出の制御を行う。具体的には、主となる被写体(人物など)領域に関して、フラッシュ撮影した時の明るさと同等の明るさの画像が得られるように、非発光時の露出を制御する。なお、フラッシュ撮影した時の明るさは、フラッシュ123の発光量と被写体領域の反射率に影響するため、S303で想定するフラッシュ撮影した時の明るさと実際のフラッシュ撮影した時の明るさは異なる場合がある。しかしながら、S303で想定するフラッシュ撮影した時の明るさはフラッシュ発光撮影で目標とする明るさである。そのためステップS303は、主となる被写体(人物など)領域に関して、フラッシュ撮影で目標とする明るさと同等の明るさの画像が得られるように、非発光時の露出を制御することになる。なお、この時点で、ユーザによる操作部120への操作等により主となる被写体(人物など)領域の反射率やフラッシュ撮影時の発光量が設定されているときは、発光量と反射率からフラッシュ撮影した時の明るさを求めてもよい。   In step S303, first, the flash 123 is set in a non-light-emitting state, and exposure control is performed. Specifically, with respect to the main subject (such as a person) region, the exposure at the time of non-light emission is controlled so that an image having the same brightness as that obtained by flash photography can be obtained. Note that the brightness at the time of flash photography affects the light emission amount of the flash 123 and the reflectance of the subject area, and therefore the brightness at the time of flash photography assumed in S303 differs from the brightness at the time of actual flash photography. There is. However, the brightness at the time of flash photography assumed in S303 is the target brightness for flash photography. For this reason, in step S303, the exposure during non-light emission is controlled so that an image having a brightness equivalent to the target brightness in flash photography can be obtained for the main subject (such as a person) region. At this time, if the reflectance of the main subject (person or the like) area or the flash amount at the time of flash shooting is set by the user operating the operation unit 120 or the like, the flash is calculated from the flash amount and the reflectivity. You may ask for the brightness at the time of photography.

次にS304では、フラッシュ非発光撮影を行う。フラッシュ非発光撮影で得られた画像の例を図4(a)に示す。そして、フラッシュ非発光撮影で得られた画像(以下、「非発光画像」と呼ぶ。)を画像メモリ106に記録する。その後、S305に進んで、フラッシュ発光モードによりフラッシュ123を発光して本撮影を行う。   In step S304, flash non-flash photography is performed. An example of an image obtained by non-flash photography is shown in FIG. Then, an image obtained by flash non-flash shooting (hereinafter referred to as “non-flash image”) is recorded in the image memory 106. Thereafter, the process proceeds to S305, and the flash 123 is emitted in the flash emission mode to perform the main photographing.

なお、S305で行われる本撮影においては、上述したように、S302でNOの場合に、フラッシュ123を発光して撮影が行われ、S301でNOの場合に、フラッシュ123を発光せずに撮影が行われる。   In the main photographing performed in S305, as described above, when NO is determined in S302, photographing is performed with the flash 123 being emitted, and in the case of NO in S301, photographing is performed without emitting the flash 123. Done.

S306では、S305で撮影した画像を記録媒体112に記録する。フラッシュ123を発光した場合の画像(以下、「発光画像」と呼ぶ。)の一例を図4(b)に示す。ここで、影低減撮影モードが選択され、S304で非発光画像を記録している場合には、非発光画像と発光画像とを対応付けて記録媒体112に記録し、撮影処理を終了する。   In S306, the image taken in S305 is recorded on the recording medium 112. An example of an image when the flash 123 emits light (hereinafter referred to as a “light-emitting image”) is shown in FIG. If the shadow reduction shooting mode is selected and a non-light-emitting image is recorded in S304, the non-light-emitting image and the light-emitting image are recorded in association with each other on the recording medium 112, and the shooting process ends.

次に、影低減処理について、図3(b)のフローチャートを用いて説明する。図3(a)に示す撮影後、影低減する画像がユーザ操作によって選択されると、選択された画像データに対して、図3(b)の処理を行う。   Next, the shadow reduction process will be described with reference to the flowchart of FIG. After the shooting shown in FIG. 3A, when an image for shadow reduction is selected by a user operation, the process of FIG. 3B is performed on the selected image data.

図3(b)のS310において、対応付けて記録されていた、選択された画像の発光画像と非発光画像の画像データ間の差分を算出する。差分を算出する際には、2枚の画像の位置ずれ量を算出し、位置ずれを補正した後、差分を算出する。図4(a)に示す非発光画像と図4(b)に示す発光画像との差分画像の例を図4(c)に示す。フラッシュ123の発光・非発光で、被写体領域が同程度の明るさとなるように露出を制御して撮影しているため、発光画像と非発光画像間で主となる被写体部分に大きな差分は生じない。一方で、フラッシュ光によって生じた影になっている領域に関しては、401に示すように大きな差分が生じる。   In S310 of FIG. 3B, the difference between the image data of the selected image and the non-light-emitting image recorded in association with each other is calculated. When calculating the difference, the amount of positional deviation between the two images is calculated, the positional deviation is corrected, and then the difference is calculated. FIG. 4C shows an example of a difference image between the non-luminescent image shown in FIG. 4A and the luminescent image shown in FIG. Since the flash 123 emits and does not emit light and the exposure is controlled so that the subject area has the same brightness, there is no significant difference in the main subject part between the emitted image and the non-emitted image. . On the other hand, as shown in 401, a large difference occurs in the shadowed area generated by the flash light.

ただし、フラッシュからの距離が遠い被写体に関しては、フラッシュ光が届かないため、非発光撮影時に露出を上げてして撮影した分だけ明るくなってしまい、差分が生じてしまう。そのため、所定の距離範囲以内にある距離に限定して、影検出のための差分をとるような構成をとることも可能である。   However, since the flash light does not reach the subject that is far from the flash, it becomes brighter as much as it is taken with the exposure increased during non-flash photography, and a difference occurs. Therefore, it is possible to adopt a configuration in which a difference for shadow detection is obtained by limiting to a distance within a predetermined distance range.

上記のようにして取得した非発光画像と発光画像との差分が閾値以上の領域(例えば図4の領域401)を、第1の実施形態では影領域として用いる。   A region where the difference between the non-light-emitting image and the light-emitting image acquired as described above is equal to or greater than a threshold (for example, the region 401 in FIG. 4) is used as a shadow region in the first embodiment.

図3に戻り、S311では、システム制御部50は、フラッシュ123による影領域が存在するか判定する。具体的には、S310で算出した閾値以上の差分を有する領域が所定の画素数以上あるか否かを判定する。閾値以上の差分を有する領域が所定の画素数以上ある場合は、フラッシュ123の発光により影が生じていると判断し、S312に進む。一方、影領域が無いと判断した場合は、処理を終了する。   Returning to FIG. 3, in S <b> 311, the system control unit 50 determines whether a shadow area by the flash 123 exists. Specifically, it is determined whether or not there are areas having a difference equal to or greater than the threshold calculated in S310. If there are more than a predetermined number of pixels having a difference greater than or equal to the threshold value, it is determined that a shadow is generated by the light emission of the flash 123, and the process proceeds to S312. On the other hand, if it is determined that there is no shadow area, the process ends.

S312では、操作部120に対するユーザ操作により入力された影の低減割合(影低減割合)を設定する。影低減割合とは、影をどの程度低減するかを示す数値であり、影低減割合100%の場合は、完全に影を除去することになる。   In S312, a shadow reduction ratio (shadow reduction ratio) input by a user operation on the operation unit 120 is set. The shadow reduction ratio is a numerical value indicating how much the shadow is reduced. When the shadow reduction ratio is 100%, the shadow is completely removed.

S313において、記録媒体112に記録された画像データ(発光画像)を影低減処理部114に入力し、影低減処理を行う。なお、影低減処理の詳細に関しては後述する。S314において、影を低減した画像を記録媒体112に記録し、処理を終了する。   In S313, the image data (light emission image) recorded on the recording medium 112 is input to the shadow reduction processing unit 114, and shadow reduction processing is performed. Details of the shadow reduction process will be described later. In S314, the image with the shadow reduced is recorded on the recording medium 112, and the process ends.

次に、S313において影低減処理部114で行われる影低減処理について説明する。図5は影低減処理部114の内部構成を示すブロック図である。   Next, the shadow reduction process performed by the shadow reduction processing unit 114 in S313 will be described. FIG. 5 is a block diagram showing the internal configuration of the shadow reduction processing unit 114.

影低減処理部114に入力した発光画像の画像データ(輝度信号Y及び色差信号R−Y、B−Y)は、図5に示すようにLPF501に入力され、低域通過のLPF処理が施される一方、HPF502にも入力されて、高域通過のHPF処理が施される。LPF501により処理された低域信号は、参照領域決定処理部503へ出力される。   The image data (luminance signal Y and color difference signals RY, BY) input to the shadow reduction processing unit 114 is input to the LPF 501 as shown in FIG. 5 and subjected to low-pass LPF processing. On the other hand, it is also input to the HPF 502 and subjected to high-pass HPF processing. The low frequency signal processed by the LPF 501 is output to the reference area determination processing unit 503.

参照領域決定処理部503には、LPF501からの発光画像の低域信号の他に、測距センサ124で生成した距離マップ画像(距離情報)および、図3のS310で算出した影領域の情報が入力される。参照領域決定処理部503では、LPF501から入力された画像データが影領域の画素の画像データか否かを判定し、影領域の画素である場合は、低減対象となる影画素と類似した、影低減に用いる参照領域を検出する。   In the reference area determination processing unit 503, in addition to the low-frequency signal of the light emission image from the LPF 501, the distance map image (distance information) generated by the distance measuring sensor 124 and the shadow area information calculated in S310 of FIG. Entered. The reference area determination processing unit 503 determines whether the image data input from the LPF 501 is image data of a shadow area pixel. If the image data is a shadow area pixel, the reference area determination processing unit 503 determines whether the shadow area pixel is similar to the shadow pixel to be reduced. A reference region used for reduction is detected.

ここで、参照領域決定処理部503で行われる処理について、図6を用いて具体的に説明する。参照領域決定処理部503では、影領域情報を参照して、入力された画像信号のうち、影領域にある画素の画像信号に対して順に処理を行う。   Here, the processing performed in the reference area determination processing unit 503 will be specifically described with reference to FIG. The reference area determination processing unit 503 refers to the shadow area information and sequentially processes the image signals of the pixels in the shadow area among the input image signals.

図6(a)において、影画素601は、処理対象となる影領域にある画素の1つを示し、発光画像内の影画素601に対して、参照画素のサーチ範囲602を設定する。図6(b)は図6(a)の一部を拡大した図である。影画素601が処理対象の画素である場合、影画素601を基準としたサーチ範囲602を設定し、そのサーチ範囲602内にある画素に関して、影画素601と類似した画素を検出する。この時、1画素だけの比較ではなく、周辺画素も含む領域でパターンマッチングを行う。参照画素603は、検出した参照画素の一例である。   In FIG. 6A, a shadow pixel 601 indicates one of the pixels in the shadow area to be processed, and a reference pixel search range 602 is set for the shadow pixel 601 in the light emission image. FIG. 6B is an enlarged view of a part of FIG. When the shadow pixel 601 is a pixel to be processed, a search range 602 based on the shadow pixel 601 is set, and a pixel similar to the shadow pixel 601 is detected with respect to the pixels within the search range 602. At this time, pattern matching is performed not in the comparison of only one pixel but in a region including peripheral pixels. The reference pixel 603 is an example of the detected reference pixel.

この時、パターンマッチングは、単純に輝度情報だけを用いて行うのではなく、距離情報および影領域情報を利用する。影領域は参照対象としてふさわしくないため、サーチ範囲内であっても、パターンマッチングは行わない。さらに距離情報を参照し、影の領域よりも、カメラに向かって手前の距離にある被写体領域に関しては、影領域の参照対象としてふさわしくないため、パターンマッチング対象から除外する(参照領域)。このように処理する理由について図6(c)を用いて説明する。   At this time, the pattern matching is not simply performed using only luminance information, but uses distance information and shadow region information. Since the shadow region is not suitable as a reference object, pattern matching is not performed even within the search range. Further, the distance information is referred to, and the subject region that is closer to the camera than the shadow region is excluded from the pattern matching target because it is not suitable as the reference target of the shadow region (reference region). The reason for processing in this way will be described with reference to FIG.

図6(c)は距離情報信号を元に生成される距離マップ画像の一例を示している。ここでは、距離マップとして、被写体の距離がカメラに近いほど白くなり、遠いほど黒となるものとして表している。   FIG. 6C shows an example of a distance map image generated based on the distance information signal. Here, the distance map is expressed as white as the distance of the subject is closer to the camera and black as the distance is longer.

図6の例では、影領域付近にあり、かつ影領域よりも手前にある被写体は、影を発生させる原因となった被写体である可能性が高く、影を低減するために参照するにはふさわしくない。そのためパターンマッチング対象から除外する。   In the example of FIG. 6, a subject near the shadow region and in front of the shadow region is likely to be the subject that caused the shadow, and is suitable for reference to reduce the shadow. Absent. Therefore, it is excluded from pattern matching targets.

上記のように、影領域および、影領域よりも距離が近いものを除外した画素に対して、パターンマッチング処理を行う。なお、パターンマッチングの際には、影と非影領域のマッチングとなるため、輝度を正規化してのマッチングを行う。   As described above, the pattern matching process is performed on the shadow area and the pixels excluding those that are closer than the shadow area. Note that, since pattern matching is performed by matching shadows and non-shadow areas, matching is performed with luminance normalized.

上記のように、参照領域決定処理部503は、処理対象の画素に類似した参照画素を決定し、決定した参照画素の情報および画像信号を参照画素変換処理部504へ送る。   As described above, the reference region determination processing unit 503 determines a reference pixel similar to the pixel to be processed, and sends information on the determined reference pixel and an image signal to the reference pixel conversion processing unit 504.

参照画素変換処理部504は、影画素と参照画素を合成する処理を行う。この時の合成比率は、図3のS312で設定した影低減割合によって決定される。即ち、影低減割合が100%である場合には、影画素を参照画素で完全に置き換える。影低減割合が50%の場合は、影画素と参照画素を1:1の比率で合成する。   The reference pixel conversion processing unit 504 performs a process of combining the shadow pixel and the reference pixel. The composition ratio at this time is determined by the shadow reduction ratio set in S312 of FIG. That is, when the shadow reduction ratio is 100%, the shadow pixel is completely replaced with the reference pixel. When the shadow reduction ratio is 50%, the shadow pixel and the reference pixel are combined at a ratio of 1: 1.

参照画素を用いて影画素を変換した(影を低減した)信号は合成処理部505に出力され、合成処理部505は、影画素を変換した信号に対して、元の画像信号の高域信号を加算し、合成結果の画像を出力する。   The signal obtained by converting the shadow pixel using the reference pixel (the shadow is reduced) is output to the synthesis processing unit 505, and the synthesis processing unit 505 outputs the high-frequency signal of the original image signal to the signal obtained by converting the shadow pixel. Are added and an image of the composite result is output.

以上説明したように第1の実施形態では、影領域を低減するために参照する画素を選択する際に、影領域および影領域よりも距離が近い領域(予め決められた条件を満たす画素)を参照しないように制御する構成とした。これにより、影を補正するための参照画素もしくは参照領域を的確に選ぶことができるようになり、影低減の精度が向上する。   As described above, in the first embodiment, when selecting a pixel to be referred to in order to reduce the shadow area, the shadow area and the area closer to the distance than the shadow area (pixels satisfying a predetermined condition) are selected. It was set as the structure controlled so that it may not be referred. As a result, the reference pixel or the reference region for correcting the shadow can be accurately selected, and the accuracy of shadow reduction is improved.

なお、第1の実施形態では、距離が影領域よりも近い被写体は、影低減の参照対象から除外するように制御したが、影の原因となっている被写体(例えば図6の人物)を除外できるのであれば、これ以外の制御を用いてもよい。例えば、影領域の輪郭情報(形状情報)を利用して、テンプレートマッチングを行い、影領域と輪郭の一致度が高い領域(例えば、図6の人物領域)を特定する。そして、影領域と、影領域と形状の一致度が高い領域を除外した領域から参照画素を選択する方法を用いてもよい。   In the first embodiment, the subject whose distance is shorter than the shadow region is controlled to be excluded from the reference object for shadow reduction. However, the subject causing the shadow (for example, the person in FIG. 6) is excluded. If possible, other controls may be used. For example, template matching is performed using contour information (shape information) of the shadow region, and a region (for example, a human region in FIG. 6) having a high degree of matching between the shadow region and the contour is specified. Then, a method of selecting a reference pixel from a shadow area and an area excluding an area having a high degree of coincidence with the shadow area may be used.

また、図6の人物領域のような主被写体領域を抽出し、その領域は、参照画素の選択から除外する構成とすることも可能である。例えば、顔検出を用いて、顔を含む被写体領域は参照領域の選択から除外するなどの処理を行うことができる。   It is also possible to extract a main subject area such as the person area of FIG. 6 and exclude the area from the selection of the reference pixel. For example, processing such as excluding a subject area including a face from selection of a reference area can be performed using face detection.

また、処理対象の影画素と色相が所定の閾値を越えて異なる場合、その画素は参照画素とはしないように、色相などの情報を加えて制御してもかまわない。   Further, when the hue of a shadow pixel to be processed differs from a hue exceeding a predetermined threshold, the pixel may be controlled by adding information such as a hue so as not to be a reference pixel.

また、第1の実施形態では、参照画素を選択する際に影画素および影の原因となっている被写体の画素を除外する構成について説明したが、完全に除外しない構成をとることも可能である。例えば、影および影の原因となっている被写体を完全に除外するのではなく、参照画素として選択されにくくするようにマッチングの結果が低く出るように制御する構成をとることも可能である。   Further, in the first embodiment, the configuration in which the shadow pixel and the subject pixel causing the shadow are excluded when selecting the reference pixel has been described. However, a configuration in which the pixel is not completely excluded may be employed. . For example, instead of completely excluding shadows and the subject that causes the shadows, it is possible to adopt a configuration in which control is performed so that the matching result is low so that it is difficult to be selected as a reference pixel.

また、第1の実施形態では、参照画素が1画素である場合を例に説明したが、参照画素は1画素だけでなく、複数画素であってもよい。例えば、影画素との一致度が高い参照領域を複数検出し、その平均値で処理対象の影画素を置きかえる処理を行う構成を取ることが可能である。これにより一画素だけの場合と比較してノイズの影響を抑えることが可能である。   In the first embodiment, the case where the reference pixel is one pixel has been described as an example. However, the reference pixel may be not only one pixel but also a plurality of pixels. For example, it is possible to adopt a configuration in which a plurality of reference areas having a high degree of coincidence with shadow pixels are detected, and processing for replacing the shadow pixels to be processed with the average value is performed. As a result, the influence of noise can be suppressed as compared with the case of only one pixel.

また、影画素及び参照画素の単位を画素ではなく小領域単位で処理する構成をとることも可能である。例えば、3×3画素の小領域単位で影領域と参照領域のマッチングを行い、領域単位で参照領域の平均値に置き換える構成を取ることも可能である。   It is also possible to adopt a configuration in which the unit of the shadow pixel and the reference pixel is processed in units of small areas instead of pixels. For example, it is possible to adopt a configuration in which a shadow region and a reference region are matched in units of small regions of 3 × 3 pixels and replaced with the average value of the reference regions in units of regions.

また、第1の実施形態では、参照画素と影画素を合成する処理について説明したが、参照画素を利用して影画素の影を低減させる処理であればどのような処理を行ってもよい。例えば、影画素を参照画素の特性に近づける変換ゲインを算出し、その変換ゲインを影画素にかける構成を取ることも可能である。具体的には、影画素と参照画素の輝度および色の比率を計算し、影画素を参照画素に近づけるための輝度および色ゲインを算出する。そして、影画素に対して輝度および、色ゲインを乗算する。なお、画素単位でなく、画面全体や小領域単位で、変換ゲインを算出する構成をとってもよい。   In the first embodiment, the process of combining the reference pixel and the shadow pixel has been described. However, any process may be performed as long as it is a process for reducing the shadow of the shadow pixel using the reference pixel. For example, it is possible to calculate a conversion gain that brings a shadow pixel closer to the characteristics of the reference pixel and apply the conversion gain to the shadow pixel. Specifically, the luminance and color ratios of the shadow pixel and the reference pixel are calculated, and the luminance and color gain for bringing the shadow pixel close to the reference pixel are calculated. Then, the shadow pixel is multiplied by the luminance and the color gain. Note that the conversion gain may be calculated not for each pixel but for the entire screen or small area.

<第2の実施形態>
次に、本発明の第2の実施形態について説明する。第2の実施形態では、影低減のための参照画素のサーチ範囲の設定方法、すなわち、参照領域決定処理部503における処理が、第1の実施形態と異なる。なお、第2の実施形態におけるデジタルカメラの構成は、第1の実施形態において図1、2、5を参照して説明したものと同様であるため、ここでは説明を省略する。また撮像処理および影低減処理の流れも図3のフローチャートで示したものと同様であるため、説明を省略する。
<Second Embodiment>
Next, a second embodiment of the present invention will be described. In the second embodiment, the reference pixel search range setting method for shadow reduction, that is, the processing in the reference region determination processing unit 503 is different from that in the first embodiment. Note that the configuration of the digital camera in the second embodiment is the same as that described with reference to FIGS. 1, 2, and 5 in the first embodiment, and thus the description thereof is omitted here. The flow of the imaging process and the shadow reduction process is the same as that shown in the flowchart of FIG.

第1の実施形態では、図6(a)に示すように、処理対象の影画素601に対して、影画素の周辺に参照画素のサーチ範囲を設定した。しかし影の周囲を影の原因となる被写体で囲まれている場合などは、参照するのに有効な領域が存在しない場合がある。例えば、図7(a)において、画素701が処理対象である影画素、領域702は参照画素のサーチ範囲を示している。この場合、サーチ範囲がほぼ影領域および影の原因となっている被写体領域であるため、参照画素を検出することができない。   In the first embodiment, as shown in FIG. 6A, for the shadow pixel 601 to be processed, a reference pixel search range is set around the shadow pixel. However, when the periphery of the shadow is surrounded by a subject that causes the shadow, there is a case where there is no effective area for reference. For example, in FIG. 7A, a pixel 701 is a shadow pixel to be processed, and an area 702 indicates a reference pixel search range. In this case, since the search range is almost the shadow area and the subject area causing the shadow, the reference pixel cannot be detected.

そこで、第2の実施形態では、影領域および影の原因となっている被写体領域情報を元に、サーチ範囲を適応的に設定する。以下、具体的な制御方法について説明する。まず、図7(b)に示すように、複数のサーチ範囲の候補領域702〜704を設定する。そして、サーチ範囲の候補領域702〜704それぞれに関して、矩形のサーチ候補領域の四隅の画素が影領域もしくは、影の原因となっている被写体領域であるか判定する。そして、2か所以上が影画素でも影の原因となる被写体領域の画素でもなく、最も影画素に近いサーチ範囲をサーチ範囲として選択する。   Therefore, in the second embodiment, the search range is adaptively set based on the shadow area and the subject area information causing the shadow. Hereinafter, a specific control method will be described. First, as shown in FIG. 7B, candidate areas 702 to 704 for a plurality of search ranges are set. Then, for each of the search range candidate areas 702 to 704, it is determined whether the pixels at the four corners of the rectangular search candidate area are shadow areas or subject areas that cause shadows. The search range closest to the shadow pixel is selected as the search range, not two or more shadow pixels or pixels in the subject area causing the shadow.

図7(b)の例で説明すると、候補領域702は、領域の四隅全ての画素が影画素もしくは影の原因となっている被写体領域の画素である。候補領域703は、左上の画素を除く3か所の画素が影画素もしくは影の原因となっている被写体領域の画素である。候補領域704は、四隅全ての画素が影画素でも影の原因となる被写体領域の画素でもない。そのため、図7(b)の例では、候補領域704をサーチ範囲として設定する。   In the example of FIG. 7B, the candidate area 702 is a shadow area or a pixel in the subject area in which all the pixels at the four corners of the area cause shadows. The candidate area 703 is a pixel in the subject area in which three pixels excluding the upper left pixel are shadow pixels or shadows. The candidate area 704 is not a pixel in all four corners, or a pixel in the subject area that causes a shadow. Therefore, in the example of FIG. 7B, the candidate area 704 is set as the search range.

以上で説明したように、第2の実施形態では、第1の実施形態に加えて参照画素のサーチ範囲を影画素もしくは影の原因となっている被写体領域の情報を用いて適応的に選択する構成とした。これにより、サーチ範囲の中に参照できる画素が含まれていない状態を低減できることが可能となり、より精度よく参照画素を検出することが可能となる。   As described above, in the second embodiment, in addition to the first embodiment, the search range of the reference pixel is adaptively selected using information on the shadow pixel or the subject area causing the shadow. The configuration. As a result, it is possible to reduce a state in which no referenceable pixel is included in the search range, and it is possible to detect the reference pixel with higher accuracy.

なお、第2の実施形態では、参照画素のサーチ範囲の候補を3つ設定し、その中から最適なサーチ範囲を選択する例を説明したが、参照画素のサーチ範囲の選び方をこの方法に限定するものではない。影画素もしくは影の原因となっている被写体領域の画素を利用して、参照画素のサーチ範囲を決定するのであればどのような方法を用いてもよい。   In the second embodiment, three reference pixel search range candidates are set and the optimum search range is selected from the three search pixel candidates. However, the method of selecting the reference pixel search range is limited to this method. Not what you want. Any method may be used as long as the search range of the reference pixel is determined using the shadow pixel or the pixel of the subject area causing the shadow.

例えば、影画素に対して水平・垂直方向にもっと多くの参照画素のサーチ範囲候補を設定し、その中から選択することも可能である。また、4隅に影画素および影の原因となる被写体領域の画素を含まない領域ができるまで、サーチ範囲を少しずつずらしながら調べる方法をとることも可能である。   For example, it is possible to set more search range candidates for reference pixels in the horizontal and vertical directions with respect to the shadow pixels, and to select from among them. It is also possible to take a method of examining the search range little by little until a shadow pixel and an area that does not include the pixel of the subject area causing the shadow are formed at the four corners.

また、影領域および影の原因となる被写体領域を使わずに、距離情報を用いてサーチ範囲を決定する方法をとることも可能である。例えば、影領域と距離が近い領域にサーチ範囲を設定してもよい。図7(b)を例に説明すると、距離情報を用いて、候補領域702〜704に関してそれぞれ平均距離を算出し、平均距離が処理対象となる影の距離と最も近いサーチ範囲を選択する。図7(b)の例では、候補領域702、703は、影よりも手前の被写体を含んでいるため、距離の平均値は影よりも手前にくる。これに対し、候補領域704は影とほぼ同じ距離の領域であるため、候補領域704をサーチ範囲として決定する。   It is also possible to use a method of determining the search range using the distance information without using the shadow region and the subject region causing the shadow. For example, the search range may be set in an area close to the shadow area. Referring to FIG. 7B as an example, an average distance is calculated for each of the candidate regions 702 to 704 using the distance information, and a search range whose average distance is closest to the shadow distance to be processed is selected. In the example of FIG. 7B, since the candidate areas 702 and 703 include a subject in front of the shadow, the average value of the distance is in front of the shadow. On the other hand, since the candidate area 704 is an area having the same distance as the shadow, the candidate area 704 is determined as the search range.

なお、上記第1及び第2の実施形態では、カメラの内部に影低減処理部114を備え、カメラ内で影低減処理を行う構成について説明したが、影低減処理を行う場所をカメラ内に限定するものではない。例えば、パソコンなどの他のデバイスに取りこんで、そのデバイス内に影低減処理部114を備え、影低減処理を行う構成をとることも可能である。   In the first and second embodiments, the configuration in which the shadow reduction processing unit 114 is provided inside the camera and the shadow reduction processing is performed in the camera has been described. However, the place where the shadow reduction processing is performed is limited to the camera. Not what you want. For example, it is possible to adopt a configuration in which a shadow reduction processing unit 114 is provided in another device such as a personal computer and the shadow reduction processing is performed in the device.

また、本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。   Further, the present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus execute the program. It can also be realized by a process of reading and executing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

50:システム制御部、103:撮像部、105:画像処理部、112:記録媒体、113:顔検出部、114:影低減処理部、123:フラッシュ、124:測距センサ、503:参照領域決定処理部、504:参照画素変換処理部、505:合成処理部   50: System control unit, 103: Imaging unit, 105: Image processing unit, 112: Recording medium, 113: Face detection unit, 114: Shadow reduction processing unit, 123: Flash, 124: Distance sensor, 503: Determination of reference area Processing unit, 504: Reference pixel conversion processing unit, 505: Composition processing unit

Claims (16)

照明手段を用いて撮影した第1の画像から、前記照明手段を用いることで前記第1の画像に発生する被写体の影領域を抽出する抽出手段と、
前記影領域の画像信号を補正するために参照する参照領域を、前記影領域および予め決められた条件を満たす領域を含まないように、前記第1の画像内に設定する設定手段と、
前記参照領域の情報を用いて、前記影領域の画像信号を補正する補正手段と
を有することを特徴とする画像処理装置。
An extraction means for extracting a shadow region of a subject generated in the first image by using the illumination means from a first image photographed using the illumination means;
Setting means for setting, in the first image, a reference area to be referred to for correcting the image signal of the shadow area so as not to include the shadow area and an area satisfying a predetermined condition;
An image processing apparatus comprising: a correction unit that corrects an image signal of the shadow region using the information of the reference region.
照明手段を用いて撮影した第1の画像から、前記照明手段を用いることで前記第1の画像に発生する被写体の影領域を抽出する抽出手段と、
前記影領域の画像信号を補正するために参照する参照領域を、前記第1の画像内に設定する設定手段と、
前記参照領域の情報を用いて、前記影領域の画像信号を補正する補正手段とを有し、
前記設定手段は、前記参照領域のうち、前記影領域および予め決められた条件を満たす領域を、前記補正手段による補正に用いられにくくするように制御することを特徴とする画像処理装置。
An extraction means for extracting a shadow region of a subject generated in the first image by using the illumination means from a first image photographed using the illumination means;
Setting means for setting, in the first image, a reference area to be referred to for correcting the image signal of the shadow area;
Correction means for correcting the image signal of the shadow region using the information of the reference region;
The image processing apparatus according to claim 1, wherein the setting unit controls the shadow region and a region satisfying a predetermined condition in the reference region so as not to be used for correction by the correction unit.
前記抽出手段は、前記第1の画像と、前記照明手段を用いずに撮影した第2の画像との差分から、前記影領域を抽出することを特徴とする請求項1または2に記載の画像処理装置。   3. The image according to claim 1, wherein the extraction unit extracts the shadow region from a difference between the first image and a second image captured without using the illumination unit. 4. Processing equipment. 前記予め決められた条件を満たす領域は、前記第1の画像を撮影した撮像装置からの距離が前記影領域よりも手前にある被写体の領域、前記影領域を発生させた被写体の領域、主被写体の領域、および、色相が、前記影領域の画像信号の色相から予め決められた範囲を超えて異なる画像信号の領域の少なくともいずれかを含むことを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。   The area that satisfies the predetermined condition includes an area of a subject whose distance from the imaging device that captured the first image is in front of the shadow area, an area of the subject that generated the shadow area, and a main subject The region and the hue include at least one of regions of the image signal different from the hue of the image signal of the shadow region exceeding a predetermined range. The image processing apparatus according to item. 前記参照領域から、前記影領域の画像信号を補正するために参照する参照画素を選択する選択手段を更に有することを特徴とすることを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。   5. The method according to claim 1, further comprising selection means for selecting a reference pixel to be referred to in order to correct an image signal of the shadow area from the reference area. Image processing apparatus. 前記選択手段は、前記影領域の1つの画素の画像信号に対して、複数の参照画素を選択することを特徴とする請求項5に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein the selection unit selects a plurality of reference pixels for an image signal of one pixel in the shadow region. 前記選択手段は、予め決められた数の画素ごとに、複数の参照画素を選択することを特徴とする請求項5に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein the selection unit selects a plurality of reference pixels for each predetermined number of pixels. 前記設定手段は、複数の候補領域を設定し、該複数の候補領域のうちの1つを前記参照領域として設定することを特徴とする請求項1乃至7のいずれか1項に記載の画像処理装置。   The image processing according to any one of claims 1 to 7, wherein the setting unit sets a plurality of candidate areas, and sets one of the plurality of candidate areas as the reference area. apparatus. 前記設定手段は、矩形の前記複数の候補領域の四隅の画素のうち、前記予め決められた条件を満たす画素がより少ない候補領域を前記参照領域として設定することを特徴とする請求項8に記載の画像処理装置。   The said setting means sets the candidate area | region where there are few pixels which satisfy | fill the said predetermined conditions as said reference area among the pixels of the four corners of the said some candidate area of a rectangle, The said area | region is characterized by the above-mentioned. Image processing apparatus. 前記設定手段は、前記複数の候補領域のうち、前記第1の画像を撮影した撮像装置からの距離が、前記影領域までの距離に最も近い候補領域を前記参照領域として設定することを特徴とする請求項8に記載の画像処理装置。   The setting means sets the candidate area closest to the distance to the shadow area as the reference area, among the plurality of candidate areas, the distance from the imaging device that captured the first image. The image processing apparatus according to claim 8. 前記設定手段は、前記第1の画像内で矩形の候補領域をずらしながら、該候補領域の四隅の画素が前記予め決められた条件に該当しない位置となった場合に、当該位置にある前記候補領域を前記参照領域として設定することを特徴とする請求項1乃至7のいずれか1項に記載の画像処理装置。   The setting means shifts the rectangular candidate area in the first image, and when the pixels at the four corners of the candidate area become positions not corresponding to the predetermined condition, the candidate at the position The image processing apparatus according to claim 1, wherein an area is set as the reference area. 請求項1乃至11のいずれか1項に記載の画像処理装置と、
前記第1の画像を撮影するための撮像手段と
を有することを特徴とする撮像装置。
An image processing apparatus according to any one of claims 1 to 11,
An image pickup apparatus comprising: an image pickup unit for taking the first image.
抽出手段が、照明手段を用いて撮影した画像から、前記照明手段を用いることで前記画像に発生する被写体の影領域を抽出する抽出工程と、
設定手段が、前記影領域の画像信号を補正するために参照する参照領域を、前記影領域および予め決められた条件を満たす領域を含まないように、前記画像内に設定する設定工程と、
補正手段が、前記参照領域の情報を用いて、前記影領域の画像信号を補正する補正工程と
を有することを特徴とする画像処理方法。
An extraction step in which an extraction unit extracts a shadow region of a subject generated in the image by using the illumination unit from an image captured using the illumination unit;
A setting step in which a setting unit sets a reference area to be referred to for correcting an image signal of the shadow area in the image so as not to include the shadow area and an area satisfying a predetermined condition;
And a correction step of correcting the image signal of the shadow area using the information of the reference area.
抽出手段が、照明手段を用いて撮影した画像から、前記照明手段を用いることで前記画像に発生する被写体の影領域を抽出する抽出工程と、
設定手段が、前記影領域の画像信号を補正するために参照する参照領域を、前記画像内に設定する設定工程と、
前記設定手段が、前記参照領域のうち、前記影領域および予め決められた条件を満たす領域を、前記補正に用いられにくくするように制御する制御工程と、
補正手段が、前記制御工程で制御された参照領域の情報を用いて、前記影領域の画像信号を補正する補正工程と
を有することを特徴とする画像処理方法。
An extraction step in which an extraction unit extracts a shadow region of a subject generated in the image by using the illumination unit from an image captured using the illumination unit;
A setting step in which a setting unit sets a reference area to be referred to for correcting the image signal of the shadow area in the image;
A control step in which the setting means controls the shadow region and a region satisfying a predetermined condition among the reference regions so as not to be used for the correction;
And a correction step of correcting the image signal of the shadow region using information on the reference region controlled in the control step.
コンピュータを、請求項1乃至11のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。   The program for functioning a computer as each means of the image processing apparatus of any one of Claims 1 thru | or 11. 請求項15に記載のプログラムを格納したコンピュータが読み取り可能な記憶媒体。   A computer-readable storage medium storing the program according to claim 15.
JP2015236990A 2015-12-03 2015-12-03 Image processing apparatus and method, and imaging apparatus Active JP6616674B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015236990A JP6616674B2 (en) 2015-12-03 2015-12-03 Image processing apparatus and method, and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015236990A JP6616674B2 (en) 2015-12-03 2015-12-03 Image processing apparatus and method, and imaging apparatus

Publications (3)

Publication Number Publication Date
JP2017103685A true JP2017103685A (en) 2017-06-08
JP2017103685A5 JP2017103685A5 (en) 2018-12-20
JP6616674B2 JP6616674B2 (en) 2019-12-04

Family

ID=59017155

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015236990A Active JP6616674B2 (en) 2015-12-03 2015-12-03 Image processing apparatus and method, and imaging apparatus

Country Status (1)

Country Link
JP (1) JP6616674B2 (en)

Also Published As

Publication number Publication date
JP6616674B2 (en) 2019-12-04

Similar Documents

Publication Publication Date Title
JP2006352795A (en) Imaging apparatus and image processing method
US9813634B2 (en) Image processing apparatus and method
US8294785B2 (en) Method for adjusting photosensitiveness of digital camera
JP2018041380A (en) Image processing apparatus, image processing method, and program
WO2012093519A1 (en) Imaging device and light emission amount control method
JP5225137B2 (en) Imaging apparatus, image processing method, and program
US20200304723A1 (en) Image processing device, imaging apparatus, image processing method, and program
US11893716B2 (en) Image processing apparatus and image processing method, and image capturing apparatus
JP6937603B2 (en) Image processing equipment and its control methods, programs, and storage media
JP6742231B2 (en) Image processing apparatus and method, and imaging apparatus
JP2019179463A (en) Image processing device, control method thereof, program, and recording medium
JP4971785B2 (en) Image processing apparatus and method, and imaging apparatus
JP6808482B2 (en) Image processing equipment, image processing methods, and programs
JP2014007528A (en) Image processing apparatus and control method thereof
US10021314B2 (en) Image processing apparatus, image capturing apparatus, method of controlling the same, and storage medium for changing shading using a virtual light source
JP6570311B2 (en) Image processing apparatus and image processing method
JP6541416B2 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, PROGRAM, AND STORAGE MEDIUM
JP6616674B2 (en) Image processing apparatus and method, and imaging apparatus
JP2012050121A (en) Imaging device, imaging method and imaging program
JP2017138927A (en) Image processing device, imaging apparatus, control method and program thereof
JP2016091376A (en) Image processor and control method thereof, program and recording medium
JP6053501B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP6663223B2 (en) Image processing apparatus and method, and imaging apparatus
JP2016051982A (en) Image processing system, camera, and image processing program
JP5943682B2 (en) Imaging apparatus, control method thereof, and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181109

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181109

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190722

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190726

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190924

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191108

R151 Written notification of patent or utility model registration

Ref document number: 6616674

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151