JP6302555B2 - Image processing apparatus, imaging apparatus, image processing method, and program - Google Patents

Image processing apparatus, imaging apparatus, image processing method, and program Download PDF

Info

Publication number
JP6302555B2
JP6302555B2 JP2016532469A JP2016532469A JP6302555B2 JP 6302555 B2 JP6302555 B2 JP 6302555B2 JP 2016532469 A JP2016532469 A JP 2016532469A JP 2016532469 A JP2016532469 A JP 2016532469A JP 6302555 B2 JP6302555 B2 JP 6302555B2
Authority
JP
Japan
Prior art keywords
data
flash
image
color
ambient light
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.)
Active
Application number
JP2016532469A
Other languages
Japanese (ja)
Other versions
JPWO2016006305A1 (en
Inventor
太郎 斎藤
太郎 斎藤
慎也 藤原
慎也 藤原
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.)
Fujifilm Corp
Original Assignee
Fujifilm 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 Fujifilm Corp filed Critical Fujifilm Corp
Publication of JPWO2016006305A1 publication Critical patent/JPWO2016006305A1/en
Application granted granted Critical
Publication of JP6302555B2 publication Critical patent/JP6302555B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • G06T5/94
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • H04N1/6027Correction or control of colour gradation or colour contrast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • H04N23/12Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths with one sensor only
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/56Cameras or camera modules comprising electronic image sensors; Control thereof provided with illuminating means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10141Special mode during image acquisition
    • G06T2207/10152Varying illumination
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Description

本発明は、画像処理装置、撮像装置、画像処理方法及びプログラムに係り、特に、フラッシュ光の発光下で撮影取得された画像データの画像処理に関する。   The present invention relates to an image processing apparatus, an imaging apparatus, an image processing method, and a program, and more particularly, to image processing of image data captured and acquired under flash light emission.

フラッシュ光を発光させずに行われた撮影(以下、「フラッシュ非発光撮影」とも称する)により取得される画像(以下、「フラッシュ非発光画像」とも称する)は、基本的には環境光のみからの光の影響を受けた画像になる。一方、フラッシュ光の発光下で行われた撮影(以下、「フラッシュ発光撮影」とも称する)により取得される画像(以下、「フラッシュ発光画像」とも称する)は、環境光の他にフラッシュ光の影響を受けた画像になる。   An image (hereinafter, also referred to as “flash non-flash image”) obtained by shooting performed without flash light (hereinafter also referred to as “flash non-flash shooting”) is basically only from ambient light. The image is affected by the light. On the other hand, an image (hereinafter also referred to as “flash emission image”) obtained by shooting performed under flash light emission (hereinafter also referred to as “flash emission shooting”) is affected by flash light in addition to ambient light. Received image.

このフラッシュ発光画像中には、「フラッシュ光の影響が大きい主要被写体等の部分」と「フラッシュ光の影響が小さい又は影響が実質的にない背景等の部分」とが混在する。すなわちフラッシュ発光部の近くに存在する主要被写体等は、フラッシュ発光画像中では環境光に加えてフラッシュ光の影響を受けた画像となる。一方、フラッシュ発光部の近くには存在しない背景等は、フラッシュ発光画像中では主として環境光の影響を受けた画像となる。このように1つのフラッシュ発光画像中には、光源の種類が実質的に異なる複数の画像部分が存在する。そのため、フラッシュ発光画像の全体のホワイトバランスを一律に調整する場合、光源の種類が実質的に異なる複数の画像部分のホワイトバランスを同時に最適化することは難しい。   In this flash emission image, “a portion of a main subject or the like where the influence of the flash light is large” and “a portion of a background or the like where the influence of the flash light is small or substantially unaffected” are mixed. That is, the main subject or the like present near the flash light emitting unit is an image affected by the flash light in addition to the environmental light in the flash light emission image. On the other hand, a background or the like that does not exist near the flash light emitting portion is an image that is mainly affected by ambient light in the flash light emitting image. Thus, in one flash emission image, there are a plurality of image portions having substantially different types of light sources. For this reason, when uniformly adjusting the overall white balance of the flash emission image, it is difficult to simultaneously optimize the white balance of a plurality of image portions having substantially different types of light sources.

そこでフラッシュ発光画像のホワイトバランス処理では、背景等の画像部分及び主要被写体等の画像部分を別々の光源領域とみなし、各画像部分を個別にホワイトバランス処理することによって、画像の色味を改善することが行われている。   Therefore, in the white balance processing of the flash emission image, the image portion such as the background and the image portion such as the main subject are regarded as separate light source regions, and the color balance of the image is improved by performing white balance processing on each image portion individually. Things have been done.

例えば特許文献1は、撮影画像データ及びモニタ画像データからホワイトバランスマップを算出する画像処理装置を開示する。このホワイトバランスマップは、撮影画像データの中で、ストロボ(フラッシュ)が照射されて明るくなっているピクセルの領域と、ストロボの照射が及ばず暗いままのピクセルの領域とのそれぞれに対して適切なホワイトバランスの調整を行うためのデータである。   For example, Patent Document 1 discloses an image processing apparatus that calculates a white balance map from captured image data and monitor image data. This white balance map is appropriate for each pixel area in the captured image data that is brightened by the flash (flash) and pixels that are dark without being exposed to the flash. This is data for adjusting the white balance.

また特許文献2は、ストロボ(フラッシュ)発光撮影により取得される画像のホワイトバランス処理において、安定したホワイトバランス補正を実現することを目的とした画像処理を行う撮像装置を開示する。この撮像装置では、ストロボ発光画像データ、ストロボ非発光画像データ及びストロボ非発光時の過去画像データからホワイトバランス補正値が算出される。   Patent Document 2 discloses an imaging apparatus that performs image processing for the purpose of realizing stable white balance correction in white balance processing of an image acquired by flash (flash) flash photography. In this imaging apparatus, the white balance correction value is calculated from the flash emission image data, the flash non-flash image data, and the past image data when the flash is not flashing.

特開2012−19293号公報JP 2012-19293 A 特開2010−193002号公報JP 2010-193002 A

上述のように、例えばフラッシュ発光画像のデータとフラッシュ非発光画像のデータなどを用いて、被写体は同一ではあるが主要被写体等の画像部分の明るさが異なる複数の撮影画像に基づいて、「フラッシュ光の影響を受けている画像部分」と「フラッシュ光の影響を受けていない画像部分」とを分離する方法が考えられている。   As described above, for example, using flash emission image data and flash non-emission image data, based on a plurality of captured images with the same subject but with different image portions such as the main subject, A method of separating an “image portion affected by light” from an “image portion not affected by flash light” is considered.

しかしながら、フラッシュ発光撮影の際にフラッシュ光が被写体に均一に照射されても、実際の撮影画像の明度は被写体の色に依存して変わってしまう。そのため、フラッシュ発光画像のデータとフラッシュ非発光画像のデータとの間の差分データのみからでは、フラッシュ発光画像の明度に関するフラッシュ光の影響を正確に推定することが難しい。   However, even when flash light is evenly applied to the subject during flash photography, the brightness of the actual captured image changes depending on the color of the subject. Therefore, it is difficult to accurately estimate the influence of the flash light on the brightness of the flash emission image only from the difference data between the flash emission image data and the flash non-emission image data.

一例として、平坦な板に貼り付けた赤の色票、緑の色票及び青の色票の各々を被写体として、フラッシュ発光撮影及びフラッシュ非発光撮影を行った。これらの撮影では、RGB(赤緑青)カラーフィルタを有する撮像素子を具備したデジタルカメラ(撮像装置)を使用し、そのデジタルカメラからほぼ等距離の位置に赤の色票、緑の色票及び青の色票の各々を配置した。そして、フラッシュ発光画像とフラッシュ非発光画像との間の差分データから算出される輝度値に基づいて、フラッシュ光による画像成分に関して色票間における明るさ(輝度値)の関係を求めた。ここで「輝度値(Y)」の算出は、フラッシュ発光画像とフラッシュ非発光画像との間の差分データをRGBデータ(RGB画素値)に基づいて求めて、この差分データのRGBデータを「Y=0.3*R+0.6*G+0.1*B」で表される式に適用することで行い、図32に示す結果を得た。   As an example, flash photography and non-flash photography were performed using each of the red color chart, green color chart, and blue color chart pasted on a flat plate as subjects. In these shootings, a digital camera (imaging device) equipped with an image sensor having an RGB (red, green, blue) color filter is used, and a red color chart, a green color chart, and a blue color are located at approximately equal distances from the digital camera. Each of the color charts was placed. Then, based on the luminance value calculated from the difference data between the flash emission image and the flash non-emission image, the relationship between the brightness (luminance value) between the color charts for the image component by the flash light was obtained. Here, the “luminance value (Y)” is calculated by obtaining difference data between the flash emission image and the flash non-emission image based on RGB data (RGB pixel value), and calculating the RGB data of the difference data as “Y = 0.3 * R + 0.6 * G + 0.1 * B ", and the result shown in FIG. 32 was obtained.

図32は、赤の色票、緑の色票及び青の色票に関する「フラッシュ発光画像とフラッシュ非発光画像との間の差分データ」の輝度の関係を例示するグラフである。図32の縦軸は、各色票の「フラッシュ発光画像とフラッシュ非発光画像との間の差分データ」の輝度値(Y)の大きさを示す。   FIG. 32 is a graph illustrating the luminance relationship of “difference data between flash emission image and flash non-emission image” regarding the red color chart, the green color chart, and the blue color chart. The vertical axis in FIG. 32 indicates the magnitude of the luminance value (Y) of “difference data between the flash emission image and the flash non-emission image” of each color chart.

撮影取得される画像の明るさが被写体の色に依存しないと仮定した場合、平板に貼り付けられた赤の色票、緑の色票及び青の色票の「フラッシュ発光画像とフラッシュ非発光画像との間の差分データ」の輝度値は相互に等しくなると考えられる。しかしながら実際には、図32からも明らかなように、赤の色票、緑の色票及び青の色票の「フラッシュ発光画像とフラッシュ非発光画像との間の差分データ」の輝度値は相互に異なり、フラッシュ発光画像の明るさが被写体の色に依存することが分かる。   Assuming that the brightness of the captured image does not depend on the color of the subject, the “flash emission image and flash non-emission image” of the red color chart, green color chart, and blue color chart pasted on the flat plate It is considered that the luminance values of the “difference data between” are equal to each other. However, as is apparent from FIG. 32, the luminance values of the “difference data between the flash emission image and the flash non-emission image” of the red color chart, the green color chart, and the blue color chart are actually mutual. It can be seen that the brightness of the flash emission image depends on the color of the subject.

したがってフラッシュ発光画像とフラッシュ非発光画像との間の差分データは、フラッシュ光の影響に加え、被写体自身の色に依存する影響が反映されたデータとなる。「被写体の色に依存する影響が取り除かれていないデータ」からは、「フラッシュ発光画像におけるフラッシュ光の影響を示すデータ」を必ずしも正確には得られない。したがってホワイトバランス処理等の各種の画像処理を精度良く行う観点からは、処理対象の画像データにおいて、被写体の色に応じてもたらされる明度の相違を補償することが好ましい。   Therefore, the difference data between the flash emission image and the flash non-emission image is data in which the influence depending on the color of the subject itself is reflected in addition to the influence of the flash light. The “data indicating the influence of the flash light in the flash emission image” cannot always be obtained accurately from the “data from which the influence depending on the color of the subject is not removed”. Therefore, from the viewpoint of performing various image processing such as white balance processing with high accuracy, it is preferable to compensate for the brightness difference caused by the color of the subject in the image data to be processed.

しかしながら従来、被写体の色に応じてもたらされる明度の相違に注目してホワイトバランス処理等の各種の画像処理を行う手法は提案されていなかった。例えば特許文献1の画像処理装置では、撮影画像データを明るいピクセルの領域と暗いピクセルの領域とに分類した上でホワイトバランス処理が行われるが、被写体の色に応じてもたらされる明度の相違には全く注目されていない。また特許文献2に開示されるホワイトバランス処理では、ストロボ発光画像データ及びストロボ非発光画像データからホワイトバランス補正値が算出されるが、ホワイトバランス処理において被写体の色に応じてもたらされる明度の相違は全く考慮されていない。   However, conventionally, there has not been proposed a method for performing various image processing such as white balance processing, paying attention to the difference in brightness caused according to the color of the subject. For example, in the image processing apparatus disclosed in Patent Document 1, white balance processing is performed after classifying photographed image data into a bright pixel region and a dark pixel region. However, there is a difference in brightness brought about according to the color of the subject. Not much attention. In the white balance processing disclosed in Patent Document 2, the white balance correction value is calculated from the strobe light emission image data and the strobe non-light emission image data. However, the difference in brightness caused according to the color of the subject in the white balance processing is as follows. It is not considered at all.

本発明は上述の事情に鑑みてなされたものであり、処理対象の画像データにおいて、被写体の色に応じてもたらされる明度の相違を補償することができる画像処理技術及びその関連技術を提供することを目的とする。   The present invention has been made in view of the above circumstances, and provides an image processing technique capable of compensating for a difference in brightness caused by the color of a subject in image data to be processed and a related technique. With the goal.

本発明の一態様は、フラッシュ光の発光下で被写体を撮影することにより取得された第1の画像データに基づき、フラッシュ光による被写体の画像成分を示すフラッシュ画像成分データを取得するフラッシュ画像成分取得部と、フラッシュ画像成分データに基づき、被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違を反映したフラッシュ補正データを取得するフラッシュ補正データ取得部と、フラッシュ画像成分データ及びフラッシュ補正データに基づき、被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違が補償されたフラッシュ画像補正成分データを取得するフラッシュ明度補正部と、を備える画像処理装置に関する。   One embodiment of the present invention is a flash image component acquisition that acquires flash image component data indicating an image component of a subject by flash light based on first image data acquired by photographing the subject under flash light emission. A flash correction data acquisition unit for acquiring flash correction data reflecting the brightness difference of the flash image component data brought about according to the color of the subject based on the flash image component data, and the flash image component data and the flash correction data And a flash brightness correction unit that acquires flash image correction component data in which a difference in brightness of flash image component data caused according to the color of the subject is compensated.

本態様によれば、「フラッシュ光による被写体の画像成分を示すフラッシュ画像成分データ」と「被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違を反映したフラッシュ補正データ」とに基づいて、フラッシュ画像成分データの明度の相違が補償(補正)されたフラッシュ画像補正成分データが取得される。このフラッシュ画像補正成分データに基づいて第1の画像データに対する各種の画像処理を行うことで、被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違を補償した処理結果を得ることができる。   According to this aspect, based on “flash image component data indicating the image component of the subject by flash light” and “flash correction data reflecting the difference in brightness of the flash image component data brought about according to the color of the subject” The flash image correction component data in which the difference in brightness of the flash image component data is compensated (corrected) is acquired. By performing various types of image processing on the first image data based on the flash image correction component data, it is possible to obtain a processing result that compensates for the difference in the brightness of the flash image component data caused according to the color of the subject. .

ここでいう「フラッシュ光による被写体の画像成分を示すフラッシュ画像成分データ」は、例えば、フラッシュ光と環境光との影響下で取得されたフラッシュ発光画像のデータ(第1の画像データ)から環境光の影響を取り除いたデータによって表すことができる。なお「フラッシュ画像成分データ」は、フラッシュ光の影響を直接的又は間接的に示すデータによって表現可能であり、例えば撮影に使用されたフラッシュ光と同等の色成分比を持つ光の影響を受けたデータによって表されてもよい。   The “flash image component data indicating the image component of the subject by flash light” as used herein is, for example, ambient light from flash emission image data (first image data) acquired under the influence of flash light and ambient light. It can be expressed by data that removes the influence of. The “flash image component data” can be expressed by data that directly or indirectly indicates the influence of the flash light. For example, the “flash image component data” is affected by light having a color component ratio equivalent to that of the flash light used for photographing. It may be represented by data.

また、ここでいう「環境光」は、撮影の際に被写体に影響を及ぼすフラッシュ光以外の光成分を指し、単一の光源からの光によって「環境光」が構成されてもよいし、複数の光源からの光がミックスされて「環境光」が構成されてもよい。   In addition, “environment light” here refers to a light component other than flash light that affects a subject at the time of shooting, and “environment light” may be constituted by light from a single light source. The light from these light sources may be mixed to constitute “ambient light”.

望ましくは、フラッシュ画像成分取得部は、第1の画像データと、フラッシュ光の非発光下で被写体を撮影することにより取得された第2の画像データとの差分を表す第1の差分データから、フラッシュ画像成分データを取得する。   Desirably, the flash image component acquisition unit, from the first difference data representing the difference between the first image data and the second image data acquired by photographing the subject under non-flash light emission, Get flash image component data.

本態様によれば、「フラッシュ光の発光下で被写体を撮影することにより取得された第1の画像データ」と「フラッシュ光の非発光下で被写体を撮影することにより取得された第2の画像データ」との差分を表す第1の差分データによって、「フラッシュ光による被写体の画像成分を直接的に示すフラッシュ画像成分データ」を精度良く表すことができる。   According to this aspect, “first image data acquired by shooting a subject under flash light emission” and “second image acquired by shooting a subject under non-flash light emission”. With the first difference data representing the difference from “data”, “flash image component data directly indicating the image component of the subject by the flash light” can be accurately represented.

望ましくは、フラッシュ画像成分取得部は、第1の発光量のフラッシュ光の発光下で被写体を撮影することにより取得された第1の画像データと、第1の発光量とは異なる第2の発光量のフラッシュ光の発光下で被写体を撮影することにより取得された第2の画像データとの差分を表す第1の差分データから、フラッシュ画像成分データを取得する。   Desirably, the flash image component acquisition unit captures the first image data acquired by photographing the subject under the light emission of the first light emission amount and the second light emission different from the first light emission amount. Flash image component data is acquired from first difference data representing a difference from second image data acquired by photographing a subject under the amount of flash light emitted.

本態様によれば、「第1の発光量のフラッシュ光の発光下で被写体を撮影することにより取得された第1の画像データ」と「第2の発光量のフラッシュ光の発光下で被写体を撮影することにより取得された第2の画像データ」との差分を表す第1の差分データによって、「フラッシュ光による被写体の画像成分を示すフラッシュ画像成分データ」を精度良く取得することができる。本態様では、「フラッシュ光と同等の色成分比を持つ光の影響を受けたデータ」によって「フラッシュ光による被写体の画像成分を間接的に示すフラッシュ画像成分データ」を表すことができる。   According to this aspect, “the first image data acquired by photographing the subject under the light emission of the first light emission amount” and “the subject under the light emission of the second light emission amount of the flash light”. The “flash image component data indicating the image component of the subject by the flash light” can be accurately acquired by the first difference data representing the difference from the “second image data acquired by photographing”. In this aspect, “flash image component data indirectly indicating an image component of a subject by flash light” can be represented by “data affected by light having a color component ratio equivalent to that of flash light”.

望ましくは、フラッシュ画像成分取得部は、第1の差分データにフラッシュ光用ホワイトバランスゲインを適用することでフラッシュ画像成分データを取得する。   Preferably, the flash image component acquisition unit acquires flash image component data by applying a flash light white balance gain to the first difference data.

本態様によれば、「フラッシュ光による被写体の画像成分を示すフラッシュ画像成分データ」はフラッシュ光用のホワイトバランスゲインが適用されてホワイトバランスが調整されるため、被写体が本来有する適正な色調が再現されたフラッシュ画像成分データを取得することができる。   According to this aspect, the “flash image component data indicating the image component of the subject by the flash light” is applied with the white balance gain for the flash light and the white balance is adjusted, so that the proper color tone inherent to the subject is reproduced. The obtained flash image component data can be acquired.

望ましくは、フラッシュ補正データ取得部は、複数の処理ブロックに区分されたフラッシュ画像成分データの複数の処理ブロックの各々におけるフラッシュ画像成分データの色成分比を表す色比データを取得し、フラッシュ画像成分データの色比データに基づいて、被写体の色に応じてもたらされるフラッシュ画像成分データの複数の処理ブロック間における明度の相違を反映したフラッシュ補正データを取得する。   Preferably, the flash correction data acquisition unit acquires color ratio data representing a color component ratio of the flash image component data in each of the plurality of processing blocks of the flash image component data divided into the plurality of processing blocks, and the flash image component Based on the color ratio data of the data, flash correction data reflecting the difference in brightness between the plurality of processing blocks of the flash image component data brought about according to the color of the subject is acquired.

本態様によれば、処理ブロック単位でフラッシュ補正データを取得することができる。   According to this aspect, the flash correction data can be acquired for each processing block.

望ましくは、フラッシュ補正データは、フラッシュ画像成分データの明度を示す第1の明度データに適用されることで、被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違を補償するデータであり、フラッシュ補正データ取得部は、フラッシュ画像成分データの複数の処理ブロックの各々に関してフラッシュ補正データを取得する。   Desirably, the flash correction data is applied to the first brightness data indicating the brightness of the flash image component data to compensate for the difference in the brightness of the flash image component data caused according to the color of the subject. The flash correction data acquisition unit acquires flash correction data for each of the plurality of processing blocks of the flash image component data.

本態様によれば、フラッシュ画像成分データの明度を示す第1の明度データに適用することで、被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違を補償することが可能なフラッシュ補正データを取得することができる。   According to this aspect, the flash correction can be applied to the first brightness data indicating the brightness of the flash image component data to compensate for the difference in the brightness of the flash image component data caused according to the color of the subject. Data can be acquired.

望ましくは、フラッシュ明度補正部は、フラッシュ画像成分データに基づいて、複数の処理ブロックの各々における第1の明度データを取得し、複数の処理ブロックの各々に関して第1の明度データにフラッシュ補正データを適用することで、フラッシュ画像補正成分データを取得する。   Preferably, the flash lightness correction unit acquires first lightness data in each of the plurality of processing blocks based on the flash image component data, and adds flash correction data to the first lightness data for each of the plurality of processing blocks. By applying this, flash image correction component data is acquired.

本態様によれば、フラッシュ画像成分データの明度を示す第1の明度データにフラッシュ補正データが適用され、被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違が補償されたフラッシュ画像補正成分データが取得される。   According to this aspect, the flash image correction is applied to the first lightness data indicating the lightness of the flash image component data, and the difference in the lightness of the flash image component data caused according to the color of the subject is compensated. Component data is acquired.

望ましくは、フラッシュ補正データ取得部は、無彩色の色比データを基準に、複数の処理ブロックの各々に関するフラッシュ補正データを取得する。   Preferably, the flash correction data acquisition unit acquires flash correction data for each of the plurality of processing blocks based on achromatic color ratio data.

本態様によれば、無彩色を基準にしてフラッシュ補正データが取得される。無彩色は、「白」、「黒」及び「白と黒との混合で得られる色」であり、本明細書において「グレー」とは、これらの「白」、「黒」及び「白と黒との混合で得られる色」を含みうる概念である。原色を使う色空間上において無彩色は各原色量が等しくなり、例えばRGB色空間において無彩色は「Rデータ=Gデータ=Bデータ(すなわち「Rデータ:Gデータ:Bデータ=1:1:1」)」の関係を有する。   According to this aspect, the flash correction data is acquired based on the achromatic color. Achromatic colors are “white”, “black” and “color obtained by mixing white and black”. In this specification, “gray” means “white”, “black” and “white”. It is a concept that can include “color obtained by mixing with black”. In the color space using the primary color, the achromatic color has the same primary color amount. For example, in the RGB color space, the achromatic color is “R data = G data = B data (that is,“ R data: G data: B data = 1: 1: 1 ")".

望ましくは、第1の画像データは、複数色のカラーフィルタを含む撮像素子によって取得され、フラッシュ画像成分データは複数色の各々に関する色成分データを含み、フラッシュ補正データ取得部は、色成分データに基づいて、複数の処理ブロックの各々におけるフラッシュ画像成分データの色比データを取得する。   Preferably, the first image data is acquired by an image sensor including a plurality of color filters, the flash image component data includes color component data for each of the plurality of colors, and the flash correction data acquisition unit includes the color component data. Based on this, the color ratio data of the flash image component data in each of the plurality of processing blocks is acquired.

本態様によれば、撮影に使用される撮像素子のカラーフィルタの色に基づいて、フラッシュ画像成分データの色比データを簡便に取得することができる。   According to this aspect, the color ratio data of the flash image component data can be easily acquired based on the color of the color filter of the image sensor used for photographing.

望ましくは、フラッシュ画像成分データの色比データは、複数の処理ブロックの各々におけるフラッシュ画像成分データの複数色の色成分データの合計に対する、複数色の各々に関するフラッシュ画像成分データの色成分データの比に基づいている。   Preferably, the color ratio data of the flash image component data is a ratio of the color component data of the flash image component data for each of the plurality of colors to the sum of the color component data of the plurality of colors of the flash image component data in each of the plurality of processing blocks. Based on.

本態様によれば、フラッシュ画像成分データの色比データは、複数の処理ブロックの各々におけるフラッシュ画像成分データの複数色の色成分データの合計に基づいて正規化されたデータとして取得可能である。   According to this aspect, the color ratio data of the flash image component data can be acquired as data normalized based on the sum of the color component data of the plurality of colors of the flash image component data in each of the plurality of processing blocks.

望ましくは、フラッシュ補正データ取得部は、被写体の色に応じたフラッシュ画像成分データの明度を示す明度指標データをフラッシュ画像成分データの色比データから導き出す演算処理に基づいて、複数の処理ブロックの各々におけるフラッシュ画像成分データの色比データから、複数の処理ブロックの各々におけるフラッシュ画像成分データの明度指標データを取得し、複数の処理ブロックの各々における複数色の色成分データの合計に対する複数色の各々に関する色成分データの比が相互に等しい無彩色の色比データから、無彩色に関する明度指標データを演算処理に基づいて取得し、無彩色に関する明度指標データに対する複数の処理ブロックの各々におけるフラッシュ画像成分データの明度指標データの比に基づいて、フラッシュ画像成分データの複数の処理ブロックの各々に関するフラッシュ補正データを取得する。   Desirably, the flash correction data acquisition unit is configured so that each of the plurality of processing blocks is based on arithmetic processing for deriving lightness index data indicating the lightness of the flash image component data corresponding to the color of the subject from the color ratio data of the flash image component data. The lightness index data of the flash image component data in each of the plurality of processing blocks is obtained from the color ratio data of the flash image component data in each of the plurality of colors with respect to the sum of the color component data of the plurality of colors in each of the plurality of processing blocks The flash image component in each of the plurality of processing blocks for the lightness index data for the achromatic color is obtained from the color ratio data of the achromatic color having the same ratio of the color component data for the achromatic color based on the arithmetic processing. Flash based on the ratio of data brightness index data It acquires flash correction data for each of the plurality of processing blocks of the image component data.

本態様によれば、「無彩色に関する明度指標データ」に対する「フラッシュ画像成分データの明度指標データ」の比に基づいてフラッシュ補正データが取得される。   According to this aspect, the flash correction data is acquired based on the ratio of the “brightness index data of the flash image component data” to the “brightness index data regarding the achromatic color”.

なお明度指標データを導き出すために用いられる「演算処理」は、明度を直接的又は間接的に示すデータを算出することが可能な処理であればよく、予め定められた演算式や参照テーブルを使用可能である。したがって、例えば「輝度値」の算出に用いられる演算式をここでいう「演算処理」で使用してもよく、そのような演算式によって算出される「輝度値」を「明度指標データ」としてもよい。   Note that the “arithmetic processing” used for deriving the lightness index data may be any process capable of calculating data indicating the lightness directly or indirectly, and uses a predetermined arithmetic expression or reference table. Is possible. Therefore, for example, an arithmetic expression used for calculating the “luminance value” may be used in the “arithmetic processing” here, and the “luminance value” calculated by such an arithmetic expression may be used as “lightness index data”. Good.

望ましくは、複数の処理ブロックの各々は、単一の画素によって構成される。   Preferably, each of the plurality of processing blocks is configured by a single pixel.

本態様によれば、画素単位でフラッシュ補正データを取得することができる。ここでいう「画素」は、フラッシュ画像成分データの構成単位であり、撮像素子を構成する画素を基準とすることができる。   According to this aspect, the flash correction data can be acquired in pixel units. The “pixel” here is a structural unit of flash image component data, and can be based on the pixels constituting the image sensor.

望ましくは、複数の処理ブロックの各々は、複数の画素によって構成される。   Desirably, each of the plurality of processing blocks includes a plurality of pixels.

本態様によれば、複数画素の単位でフラッシュ補正データを取得することができる。例えばフラッシュ画像成分データを構成する各画素データに予期していないノイズ成分が含まれる場合であっても、複数画素単位でフラッシュ補正データの取得処理を行うことで、そのようなノイズ成分の影響を実質的に低減することができる。   According to this aspect, the flash correction data can be acquired in units of a plurality of pixels. For example, even if each pixel data constituting the flash image component data includes an unexpected noise component, the effect of such a noise component can be reduced by performing flash correction data acquisition processing in units of multiple pixels. It can be substantially reduced.

望ましくは、第1の画像データの撮影に使用された撮像素子は複数色のカラーフィルタを含む単板式の撮像素子であり、複数色のカラーフィルタは、特定の色パターンの基本配列が繰り返し配置されることで構成され、複数の処理ブロックの各々を構成する複数の画素は、基本配列を構成する画素に対応する。   Desirably, the image sensor used for photographing the first image data is a single-plate image sensor including a plurality of color filters, and a plurality of color filters have a basic arrangement of specific color patterns repeatedly arranged. The plurality of pixels constituting each of the plurality of processing blocks corresponds to the pixels constituting the basic array.

本態様によれば、撮像素子のカラーフィルタの基本配列を基準にフラッシュ補正データを取得することができ、フラッシュ補正データの取得処理を簡便に行うことができる。   According to this aspect, the flash correction data can be acquired based on the basic arrangement of the color filters of the image sensor, and the flash correction data acquisition process can be easily performed.

望ましくは、画像処理装置は、環境光による被写体の画像成分を示す環境光画像成分データを取得する環境光画像成分取得部と、環境光画像成分データに基づき、被写体の色に応じてもたらされる環境光画像成分データの明度の相違を反映した環境光補正データを取得する環境光補正データ取得部と、環境光画像成分データ及び環境光補正データに基づき、被写体の色に応じてもたらされる環境光画像成分データの明度の相違が補償された環境光画像補正成分データを取得する環境光明度補正部と、を更に備える。   Preferably, the image processing apparatus includes an environment light image component acquisition unit that acquires environment light image component data indicating an image component of the subject by the environment light, and an environment brought about according to the color of the subject based on the environment light image component data. An ambient light correction data acquisition unit that acquires ambient light correction data that reflects the difference in brightness of the light image component data, and an ambient light image that is generated according to the color of the subject based on the ambient light image component data and the ambient light correction data And an ambient light brightness correction unit that acquires ambient light image correction component data in which the difference in brightness of the component data is compensated.

本態様によれば、「環境光による被写体の画像成分を示す環境光画像成分データ」と「被写体の色に応じてもたらされる環境光画像成分データの明度の相違を反映した環境光補正データ」とに基づいて、環境光画像成分データの明度の相違が補償された環境光画像補正成分データが取得される。この環境光画像補正成分データに基づいて第1の画像データに対する各種の画像処理を行うことで、被写体の色に応じてもたらされる環境光画像成分データの明度の相違を補償した処理結果を得ることができる。   According to this aspect, “environmental light image component data indicating the image component of the subject by ambient light” and “environmental light correction data reflecting the difference in brightness of the ambient light image component data brought about according to the color of the subject” and Based on the above, ambient light image correction component data in which the difference in brightness of the ambient light image component data is compensated is acquired. By performing various types of image processing on the first image data based on the ambient light image correction component data, a processing result that compensates for the difference in brightness of the ambient light image component data caused according to the color of the subject is obtained. Can do.

ここでいう「環境光による被写体の画像成分を示す環境光画像成分データ」は、例えば、フラッシュ光と環境光との影響下で取得されたフラッシュ発光画像のデータ(第1の画像データ)からフラッシュ光の影響を取り除いたデータによって表すことができる。この「環境光画像成分データ」は、フラッシュ発光画像のデータ(第1の画像データ)の撮影取得に使用された環境光と同等の色成分比を持つ光の影響を受けたデータによって表すことができる。   The “environment light image component data indicating the image component of the subject by ambient light” here is, for example, flash data from flash emission image data (first image data) acquired under the influence of flash light and ambient light. It can be represented by data excluding the influence of light. This “ambient light image component data” can be expressed by data influenced by light having a color component ratio equivalent to that of the ambient light used to capture and acquire the data of the flash emission image (first image data). it can.

望ましくは、環境光画像成分取得部は、フラッシュ光の非発光下で被写体を撮影することにより取得された第2の画像データを基礎データとして環境光画像成分データを取得する。   Preferably, the ambient light image component acquisition unit acquires the ambient light image component data using the second image data acquired by photographing the subject under non-flash light as basic data.

本態様によれば、第2の画像データに基づいて、環境光画像成分データを精度良く取得することができる。   According to this aspect, the ambient light image component data can be obtained with high accuracy based on the second image data.

環境光画像成分データは、第2の画像データ自体であってもよいし、第2の画像データから導き出される他のデータであってもよい。   The ambient light image component data may be the second image data itself or other data derived from the second image data.

望ましくは、環境光画像成分取得部は、第1の画像データと、第1の画像データとフラッシュ光の非発光下で被写体を撮影することにより取得された第2の画像データとの差分を表す第1の差分データと、の差分を表す第2の差分データを基礎データとして、環境光画像成分データを取得する。   Preferably, the ambient light image component acquisition unit represents a difference between the first image data, the first image data, and the second image data acquired by photographing the subject under non-flash light emission. The ambient light image component data is acquired using the second difference data representing the difference from the first difference data as basic data.

本態様によれば、第1の差分データによって表されるフラッシュ画像成分データを、フラッシュ発光画像のデータである第1の画像データから取り除くことで、環境光画像成分データを取得することができる。   According to this aspect, the ambient light image component data can be acquired by removing the flash image component data represented by the first difference data from the first image data that is the data of the flash emission image.

環境光画像成分取得部は、第1の発光量のフラッシュ光の発光下で被写体を撮影することにより取得された第1の画像データと、第1の画像データと第1の発光量とは異なる第2の発光量のフラッシュ光の発光下で被写体を撮影することにより取得された第2の画像データとの差分を表す第1の差分データと、に基づいて基礎データを導き出し、この基礎データに基づいて環境光画像成分データを取得してもよい。   The ambient light image component acquisition unit is different from the first image data acquired by photographing the subject under the light emission of the flash light having the first light emission amount, the first image data, and the first light emission amount. Basic data is derived based on the first difference data representing the difference from the second image data acquired by photographing the subject under the light emission of the second light emission amount, and the basic data is Based on this, ambient light image component data may be acquired.

望ましくは、環境光画像成分取得部は、複数の処理ブロックの各々における基礎データの色成分比を表す色比データを取得し、複数の処理ブロックの各々におけるフラッシュ画像成分データの色比データと基礎データの色比データとに基づいて環境光用ホワイトバランスゲインを取得し、基礎データに環境光用ホワイトバランスゲインを適用することで環境光画像成分データを取得する。   Preferably, the ambient light image component acquisition unit acquires color ratio data representing the color component ratio of the basic data in each of the plurality of processing blocks, and the color ratio data and basic information of the flash image component data in each of the plurality of processing blocks. The ambient light white balance gain is acquired based on the data color ratio data, and the ambient light image component data is acquired by applying the ambient light white balance gain to the basic data.

本態様によれば、「環境光による被写体の画像成分を示す環境光画像成分データ」は環境光用のホワイトバランスゲインが適用されてホワイトバランスが調整されるため、被写体の適正な色調が再現された環境光画像成分データを取得することができる。   According to this aspect, the “ambient light image component data indicating the image component of the subject by ambient light” is adjusted by applying the white balance gain for ambient light to adjust the white balance, so that the appropriate color tone of the subject is reproduced. The ambient light image component data can be acquired.

望ましくは、環境光用ホワイトバランスゲインは、複数の処理ブロックの各々における基礎データの色比データに適用されると、複数の処理ブロックの各々における環境光画像成分データの色比データが導き出される。   Desirably, when the ambient light white balance gain is applied to the color ratio data of the basic data in each of the plurality of processing blocks, the color ratio data of the ambient light image component data in each of the plurality of processing blocks is derived.

本態様によれば、環境光用のホワイトバランスゲインを使って環境光画像成分データの色比データが導き出される。   According to this aspect, the color ratio data of the ambient light image component data is derived using the ambient light white balance gain.

望ましくは、環境光補正データ取得部は、複数の処理ブロックの各々における環境光画像成分データの色成分比を表す色比データを取得し、環境光画像成分データの色比データに基づいて、被写体の色に応じてもたらされる環境光画像成分データの複数の処理ブロック間における明度の相違を反映した環境光補正データを取得する。   Preferably, the ambient light correction data acquisition unit acquires color ratio data representing the color component ratio of the ambient light image component data in each of the plurality of processing blocks, and based on the color ratio data of the ambient light image component data, the subject Ambient light correction data reflecting the difference in brightness between the plurality of processing blocks of the ambient light image component data brought about according to the color of the ambient light is acquired.

本態様によれば、処理ブロック単位で環境光補正データを取得することができる。   According to this aspect, ambient light correction data can be acquired in units of processing blocks.

望ましくは、環境光補正データは、環境光画像成分データの明度を示す第2の明度データに適用されることで、被写体の色に応じてもたらされる環境光画像成分データの明度の相違を補償するデータであり、環境光補正データ取得部は、環境光画像成分データの複数の処理ブロックの各々に関して環境光補正データを取得する。   Preferably, the ambient light correction data is applied to the second brightness data indicating the brightness of the ambient light image component data to compensate for the difference in brightness of the ambient light image component data caused according to the color of the subject. The ambient light correction data acquisition unit acquires ambient light correction data for each of the plurality of processing blocks of the ambient light image component data.

本態様によれば、環境光画像成分データの明度を示す第2の明度データに適用することで、被写体の色に応じてもたらされる環境光画像成分データの明度の相違を補償することが可能な環境光補正データを取得することができる。   According to this aspect, by applying to the second brightness data indicating the brightness of the ambient light image component data, it is possible to compensate for the difference in brightness of the ambient light image component data caused according to the color of the subject. Ambient light correction data can be acquired.

望ましくは、環境光明度補正部は、環境光画像成分データに基づいて、複数の処理ブロックの各々における第2の明度データを取得し、複数の処理ブロックの各々に関して第2の明度データに環境光補正データを適用することで、環境光画像補正成分データを取得する。   Desirably, the ambient light brightness correction unit acquires second brightness data in each of the plurality of processing blocks based on the ambient light image component data, and converts the ambient light to the second brightness data for each of the plurality of processing blocks. Ambient light image correction component data is acquired by applying the correction data.

本態様によれば、環境光画像成分データの明度を示す第2の明度データに環境光補正データが適用され、被写体の色に応じてもたらされる環境光画像成分データの明度の相違が補償された環境光画像補正成分データが取得される。   According to this aspect, the ambient light correction data is applied to the second brightness data indicating the brightness of the ambient light image component data, and the difference in the brightness of the ambient light image component data caused according to the color of the subject is compensated. Ambient light image correction component data is acquired.

望ましくは、環境光補正データ取得部は、無彩色の色比データを基準に、複数の処理ブロックの各々に関する環境光補正データを取得する。   Preferably, the ambient light correction data acquisition unit acquires ambient light correction data for each of the plurality of processing blocks based on achromatic color ratio data.

本態様によれば、無彩色を基準にして環境光補正データが取得される。   According to this aspect, the ambient light correction data is acquired based on the achromatic color.

望ましくは、第1の画像データは、複数色のカラーフィルタを含む撮像素子によって撮影され、環境光画像成分データは複数色の各々に関する色成分データを含み、環境光補正データ取得部は、色成分データに基づいて、複数の処理ブロックの各々における環境光画像成分データの色比データを取得する。   Preferably, the first image data is captured by an image sensor including a plurality of color filters, the ambient light image component data includes color component data for each of the plurality of colors, and the ambient light correction data acquisition unit includes the color component Based on the data, the color ratio data of the ambient light image component data in each of the plurality of processing blocks is acquired.

本態様によれば、撮影に使用される撮像素子のカラーフィルタの色に基づいて、環境光画像成分データの色比データを簡便に取得することができる。   According to this aspect, the color ratio data of the ambient light image component data can be easily obtained based on the color of the color filter of the image sensor used for photographing.

望ましくは、環境光画像成分データの色比データは、複数の処理ブロックの各々における環境光画像成分データの複数色の色成分データの合計に対する、複数色の各々に関する環境光画像成分データの色成分データの比に基づいている。   Preferably, the color ratio data of the ambient light image component data is the color component of the ambient light image component data for each of the plurality of colors with respect to the sum of the multiple color component data of the ambient light image component data in each of the plurality of processing blocks. Based on data ratio.

本態様によれば、環境光画像成分データの色比データは、複数の処理ブロックの各々における環境光画像成分データの複数色の色成分データの合計に基づいて正規化されたデータとして取得可能である。   According to this aspect, the color ratio data of the ambient light image component data can be acquired as data normalized based on the sum of the color component data of the multiple colors of the ambient light image component data in each of the multiple processing blocks. is there.

望ましくは、環境光補正データ取得部は、被写体の色に応じた環境光画像成分データの明度を示す明度指標データを環境光画像成分データの色比データから導き出す演算処理に基づいて、複数の処理ブロックの各々における環境光画像成分データの色比データから、複数の処理ブロックの各々における環境光画像成分データの明度指標データを取得し、複数の処理ブロックの各々における複数色の色成分データの合計に対する複数色の各々に関する色成分データの比が相互に等しい無彩色の色比データから、無彩色に関する明度指標データを演算処理に基づいて取得し、無彩色に関する明度指標データに対する複数の処理ブロックの各々における環境光画像成分データの明度指標データの比に基づいて、環境光画像成分データの複数の処理ブロックの各々に関する環境光補正データを取得する。   Preferably, the ambient light correction data acquisition unit is configured to perform a plurality of processes based on an arithmetic process for deriving brightness index data indicating the brightness of the ambient light image component data according to the color of the subject from the color ratio data of the ambient light image component data. The brightness index data of the ambient light image component data in each of the plurality of processing blocks is obtained from the color ratio data of the ambient light image component data in each of the blocks, and the sum of the color component data of the plurality of colors in each of the plurality of processing blocks The lightness index data related to the achromatic color is obtained from the color ratio data of the achromatic color having the same ratio of the color component data for each of the plurality of colors based on the arithmetic processing, and a plurality of processing blocks for the lightness index data related to the achromatic color are obtained. Based on the ratio of the brightness index data of the ambient light image component data in each, a plurality of processing blocks of the ambient light image component data are obtained. It acquires ambient light correction data for each of the click.

本態様によれば、「無彩色に関する明度指標データ」に対する「環境光画像成分データの明度指標データ」の比に基づいて環境光補正データが取得される。   According to this aspect, the ambient light correction data is acquired based on the ratio of the “brightness index data of the ambient light image component data” to the “brightness index data related to the achromatic color”.

なお明度指標データを導き出すために用いられる「演算処理」は、明度を直接的又は間接的に示すデータを算出することが可能な処理であればよい。したがって、「輝度値」の算出に用いられる演算式をここでいう「演算処理」で使用してもよく、そのような演算式によって算出される「輝度値」を「明度指標データ」としてもよい。   The “arithmetic processing” used for deriving the lightness index data may be any process that can calculate data indicating the lightness directly or indirectly. Therefore, the arithmetic expression used for calculating the “luminance value” may be used in the “arithmetic processing” here, and the “luminance value” calculated by such an arithmetic expression may be used as “lightness index data”. .

望ましくは、画像処理装置は、フラッシュ画像補正成分データに基づいて、第1の画像データのホワイトバランスを調整するホワイトバランス処理部を更に備える。   Preferably, the image processing apparatus further includes a white balance processing unit that adjusts the white balance of the first image data based on the flash image correction component data.

本態様によれば、被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違が補償されたフラッシュ画像補正成分データに基づいて、第1の画像データのホワイトバランスを調整することができる。   According to this aspect, the white balance of the first image data can be adjusted based on the flash image correction component data in which the difference in brightness of the flash image component data caused according to the color of the subject is compensated.

望ましくは、ホワイトバランス処理部は、フラッシュ画像補正成分データに基づいて、第1の画像データにフラッシュ光用ホワイトバランスゲインを適用する。   Preferably, the white balance processing unit applies a flash light white balance gain to the first image data based on the flash image correction component data.

本態様によれば、被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違が補償されたフラッシュ画像補正成分データに基づいて、第1の画像データにフラッシュ光用ホワイトバランスゲインが適用される。   According to this aspect, the flash light white balance gain is applied to the first image data based on the flash image correction component data in which the difference in the brightness of the flash image component data caused according to the color of the subject is compensated. The

望ましくは、画像処理装置は、フラッシュ画像補正成分データ及び環境光画像補正成分データに基づいて、第1の画像データのホワイトバランスを調整するホワイトバランス処理部を更に備える。   Preferably, the image processing apparatus further includes a white balance processing unit that adjusts the white balance of the first image data based on the flash image correction component data and the ambient light image correction component data.

本態様によれば、「被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違が補償されたフラッシュ画像補正成分データ」と「被写体の色に応じてもたらされる環境光画像成分データの明度の相違が補償された環境光画像補正成分データ」とに基づいて、第1の画像データのホワイトバランスを調整することができる。   According to this aspect, “the flash image correction component data in which the difference in the brightness of the flash image component data brought about according to the subject color is compensated” and “the lightness of the ambient light image component data brought about according to the subject color” The white balance of the first image data can be adjusted based on the ambient light image correction component data compensated for the difference.

望ましくは、ホワイトバランス処理部は、フラッシュ画像補正成分データと環境光画像補正成分データとに基づいて、第1の画像データに、フラッシュ光用ホワイトバランスゲイン及び環境光用ホワイトバランスゲインを適用する。   Preferably, the white balance processing unit applies the flash light white balance gain and the ambient light white balance gain to the first image data based on the flash image correction component data and the ambient light image correction component data.

本態様によれば、「被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違が補償されたフラッシュ画像補正成分データ」と「被写体の色に応じてもたらされる環境光画像成分データの明度の相違が補償された環境光画像補正成分データ」とに基づいて、第1の画像データにフラッシュ光用ホワイトバランスゲイン及び環境光用ホワイトバランスゲインが適用される。   According to this aspect, “the flash image correction component data in which the difference in the brightness of the flash image component data brought about according to the subject color is compensated” and “the lightness of the ambient light image component data brought about according to the subject color” The flash light white balance gain and the environmental light white balance gain are applied to the first image data based on the environmental light image correction component data in which the difference is compensated.

望ましくは、明度は輝度である。   Desirably, the brightness is luminance.

本態様によれば、被写体の色に応じてもたらされるフラッシュ画像成分データの輝度の相違が補償されたフラッシュ画像補正成分データが取得される。   According to this aspect, the flash image correction component data in which the difference in the brightness of the flash image component data caused according to the color of the subject is compensated is acquired.

本発明の他の態様は、撮像素子と、上記の画像処理装置と、を備える撮像装置に関する。   Another aspect of the present invention relates to an imaging device including an imaging device and the above-described image processing device.

本発明の他の態様は、フラッシュ光の発光下で被写体を撮影することにより取得された第1の画像データから、フラッシュ光による被写体の画像成分を示すフラッシュ画像成分データを取得するステップと、フラッシュ画像成分データに基づき、被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違を反映したフラッシュ補正データを取得するステップと、フラッシュ画像成分データ及びフラッシュ補正データに基づき、被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違が補償されたフラッシュ画像補正成分データを取得するステップと、を備える画像処理方法に関する。   According to another aspect of the present invention, there is provided a step of acquiring flash image component data indicating an image component of a subject by flash light from first image data acquired by photographing the subject under flash light emission, and a flash Based on the image component data, obtaining flash correction data reflecting the difference in brightness of the flash image component data brought about according to the color of the subject, and depending on the color of the subject based on the flash image component data and the flash correction data Obtaining flash image correction component data in which a difference in brightness of the flash image component data caused is compensated.

本発明の他の態様は、フラッシュ光の発光下で被写体を撮影することにより取得された第1の画像データから、フラッシュ光による被写体の画像成分を示すフラッシュ画像成分データを取得する手順と、フラッシュ画像成分データに基づき、被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違を反映したフラッシュ補正データを取得する手順と、フラッシュ画像成分データ及びフラッシュ補正データに基づき、被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違が補償されたフラッシュ画像補正成分データを取得する手順と、をコンピュータに実行させるためのプログラムに関する。   According to another aspect of the present invention, there is provided a procedure for acquiring flash image component data indicating an image component of a subject by flash light from first image data acquired by photographing the subject under flash light emission, a flash Based on the image component data, the procedure for obtaining flash correction data reflecting the difference in brightness of the flash image component data brought about according to the subject color, and the subject color based on the flash image component data and the flash correction data The present invention relates to a program for causing a computer to execute a procedure for acquiring flash image correction component data in which a difference in brightness of flash image component data caused by the correction is compensated.

本発明によれば、被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違が補償されたフラッシュ画像補正成分データを取得することができる。この「被写体の色に応じてもたらされるフラッシュ画像成分データの明度の相違が補償されたフラッシュ画像補正成分データ」を用いてホワイトバランス処理等の各種の画像処理を処理対象の画像データに対して行うことで、被写体の色に応じてもたらされる明度の相違を補償することができ、処理精度を高めることが可能になる。   According to the present invention, it is possible to obtain flash image correction component data in which a difference in brightness of flash image component data caused according to the color of a subject is compensated. Using this “flash image correction component data in which the difference in brightness of the flash image component data brought about according to the color of the subject is compensated”, various image processing such as white balance processing is performed on the image data to be processed. Thus, it is possible to compensate for the difference in brightness caused according to the color of the subject, and it is possible to increase the processing accuracy.

デジタルカメラの正面斜視図である。It is a front perspective view of a digital camera. デジタルカメラの背面斜視図である。It is a rear perspective view of a digital camera. デジタルカメラの制御処理系を示すブロック図である。It is a block diagram which shows the control processing system of a digital camera. 被写体の色に応じてもたらされる画像データの明度(輝度)の相違を説明する図であり、図4(a)は、グレーの被写体及び青の被写体の各々に関する画像データの輝度値の関係を示す図であり、図4(b)は、被写体の色に応じてもたらされる画像データの明度の相違を補償した後の画像データの輝度値の関係を示す図である。FIG. 4A is a diagram for explaining a difference in brightness (brightness) of image data brought about according to the color of a subject, and FIG. 4A shows a relationship between brightness values of image data relating to each of a gray subject and a blue subject. FIG. 4B is a diagram illustrating the relationship between the luminance values of the image data after compensating for the difference in brightness of the image data caused according to the color of the subject. 第1実施形態に係る画像処理装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the image processing apparatus which concerns on 1st Embodiment. 第1実施形態に係るホワイトバランス処理のフローチャートである。It is a flowchart of the white balance process which concerns on 1st Embodiment. 第2実施形態に係るフラッシュ画像成分取得部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the flash image component acquisition part which concerns on 2nd Embodiment. フラッシュ画像成分取得部の第1の画像データ抽出部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the 1st image data extraction part of a flash image component acquisition part. フラッシュ画像成分取得部の第1の抽出データ調整部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the 1st extraction data adjustment part of a flash image component acquisition part. 撮像素子を構成する複数の画素の平面構造を示す概念図である。It is a conceptual diagram which shows the planar structure of the some pixel which comprises an image pick-up element. カラーフィルタの基本配列例を示す平面図であり、(a)はベイヤー配列の基本配列パターンを示し、(b)はX−Trans(登録商標)タイプの基本配列パターンを示す。It is a top view which shows the basic array example of a color filter, (a) shows the basic array pattern of a Bayer array, (b) shows the basic array pattern of X-Trans (trademark) type. 第2実施形態に係るフラッシュ補正データ取得部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the flash correction data acquisition part which concerns on 2nd Embodiment. 第1の色比データ取得部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of a 1st color ratio data acquisition part. 第1の補正データ算出部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of a 1st correction data calculation part. 第2実施形態に係るホワイトバランス処理のフローチャートである。It is a flowchart of the white balance process which concerns on 2nd Embodiment. 第3実施形態に係るフラッシュ明度補正部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the flash lightness correction | amendment part which concerns on 3rd Embodiment. 第3実施形態に係るホワイトバランス処理のフローチャートである。It is a flowchart of the white balance process which concerns on 3rd Embodiment. 第4実施形態に係る画像処理装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the image processing apparatus which concerns on 4th Embodiment. 第4実施形態に係る環境光画像成分取得部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the ambient light image component acquisition part which concerns on 4th Embodiment. 環境光画像成分取得部の第2の画像データ抽出部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the 2nd image data extraction part of an ambient light image component acquisition part. 環境光画像成分取得部の第2の抽出データ調整部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the 2nd extraction data adjustment part of an ambient light image component acquisition part. 環境光補正データ取得部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of an environmental light correction data acquisition part. 第2の色比データ取得部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the 2nd color ratio data acquisition part. 第2の補正データ算出部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of a 2nd correction data calculation part. 環境光明度補正部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of an ambient light brightness correction | amendment part. 第4実施形態に係るホワイトバランス処理部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the white balance process part which concerns on 4th Embodiment. 第4実施形態に係るホワイトバランス処理のフローチャートである。It is a flowchart of the white balance process which concerns on 4th Embodiment. 第4実施形態においてフラッシュ画像補正成分データを取得するための処理フロー(図27のステップS42)の詳細を示すフローチャートである。It is a flowchart which shows the detail of the processing flow (step S42 of FIG. 27) for acquiring flash image correction component data in 4th Embodiment. 第4実施形態において環境光画像補正成分データを取得するための処理フロー(図27のステップS43)の詳細を示すフローチャートである。It is a flowchart which shows the detail of the processing flow (step S43 of FIG. 27) for acquiring environmental light image correction component data in 4th Embodiment. スマートフォンの外観を示す図である。It is a figure which shows the external appearance of a smart phone. 図30に示すスマートフォンの構成を示すブロック図である。It is a block diagram which shows the structure of the smart phone shown in FIG. 赤の色票、緑の色票及び青の色票に関する「フラッシュ発光画像とフラッシュ非発光画像との間の差分データ」の輝度の関係を例示するグラフである。It is a graph which illustrates the brightness | luminance relationship of "the difference data between a flash light emission image and a flash non-light emission image" regarding a red color chart, a green color chart, and a blue color chart.

図面を参照して本発明の実施形態について説明する。以下の実施形態では、デジタルカメラ(撮像装置)に本発明を適用する例について説明する。ただし、デジタルカメラ以外の画像処理装置、撮像装置、画像処理方法及びプログラムにも本発明を適用することが可能である。   Embodiments of the present invention will be described with reference to the drawings. In the following embodiments, an example in which the present invention is applied to a digital camera (imaging device) will be described. However, the present invention can also be applied to image processing apparatuses other than digital cameras, imaging apparatuses, image processing methods, and programs.

図1は、デジタルカメラ2の正面斜視図である。図2は、デジタルカメラ2の背面斜視図である。   FIG. 1 is a front perspective view of the digital camera 2. FIG. 2 is a rear perspective view of the digital camera 2.

デジタルカメラ2は、カメラ本体3と、カメラ本体3の前面に取り付けられるレンズ鏡筒4とを備える。カメラ本体3及びレンズ鏡筒4は、一体的に設けられてもよいし、レンズ交換式カメラとして着脱自在に設けられてもよい。   The digital camera 2 includes a camera body 3 and a lens barrel 4 attached to the front surface of the camera body 3. The camera body 3 and the lens barrel 4 may be provided integrally, or may be provided detachably as a lens interchangeable camera.

カメラ本体3の前面には、レンズ鏡筒4に加えてフラッシュ発光部5が設けられ、カメラ本体3の上面には、シャッタボタン6及び電源スイッチ7が設けられている。シャッタボタン6は、ユーザからの撮影指示を受け付ける撮影指示部であり、電源スイッチ7は、デジタルカメラ2の電源のオン及びオフの切り換え指示をユーザから受け付ける電源切換部である。なおフラッシュ発光部5は、デジタルカメラ2(カメラ本体3)に内蔵されているタイプのフラッシュ装置であってもよいし、外付けタイプのフラッシュ装置であってもよい。   In addition to the lens barrel 4, a flash light emitting unit 5 is provided on the front surface of the camera body 3, and a shutter button 6 and a power switch 7 are provided on the upper surface of the camera body 3. The shutter button 6 is a shooting instruction unit that receives a shooting instruction from a user, and the power switch 7 is a power supply switching unit that receives a power ON / OFF switching instruction of the digital camera 2 from the user. The flash light emitting unit 5 may be a flash device built in the digital camera 2 (camera body 3) or an external flash device.

カメラ本体3の背面には、液晶パネル等によって構成される表示部8と、ユーザによって直接的に操作される操作部9とが設けられている。表示部8は、撮影待機状態ではライブビュー画像(スルー画像)を表示して電子ビューファインダとして機能し、撮影画像やメモリ記憶画像の再生時には再生画像表示部として機能する。   On the back surface of the camera body 3, a display unit 8 constituted by a liquid crystal panel or the like and an operation unit 9 directly operated by a user are provided. The display unit 8 displays a live view image (through image) in a shooting standby state and functions as an electronic viewfinder, and functions as a playback image display unit during playback of a captured image and a memory storage image.

操作部9は、モード切換スイッチ、十字キー、実行キーなどの任意の操作デバイスによって構成される。例えばモード切換スイッチは、デジタルカメラ2の動作モードを切り換える際にユーザによって操作される。デジタルカメラ2の動作モードとして、被写体を撮像して撮影画像を得るための撮影モード、画像を再生表示する再生モード、等がある。また他の撮影モードとして、オートフォーカスを行うAF(Auto Focus)モード及びマニュアルフォーカス操作を行うMF(Manual Focus)モードがある。一方、十字キー及び実行キーは、表示部8にメニュー画面や設定画面を表示したり、メニュー画面や設定画面内に表示されるカーソルを移動したり、デジタルカメラ2の各種設定を確定したりする場合に、ユーザによって操作される。   The operation unit 9 includes an arbitrary operation device such as a mode change switch, a cross key, and an execution key. For example, the mode switch is operated by the user when the operation mode of the digital camera 2 is switched. The operation mode of the digital camera 2 includes a shooting mode for capturing an image of a subject and obtaining a captured image, a playback mode for reproducing and displaying an image, and the like. As other photographing modes, there are an AF (Auto Focus) mode for performing auto focus and an MF (Manual Focus) mode for performing manual focus operation. On the other hand, the cross key and the execution key display a menu screen or a setting screen on the display unit 8, move a cursor displayed in the menu screen or the setting screen, and confirm various settings of the digital camera 2. In some cases, it is operated by the user.

カメラ本体3の底部(図示省略)には、メインメモリ10が装填されるメモリスロットと、このメモリスロットの開口を開閉する装填蓋とが設けられている。メインメモリ10は、カメラ本体3に着脱自在に設けられており、カメラ本体3に装着されると、カメラ本体3に設けられる記憶制御部33(図3参照)と電気的に接続される。メインメモリ10は、一般にカード型フラッシュメモリ等の半導体メモリにより構成可能であるが、特に限定されるものではなく、磁気媒体等の任意の記憶方式の記憶媒体をメインメモリ10として用いることが可能である。   On the bottom (not shown) of the camera body 3, a memory slot into which the main memory 10 is loaded and a loading lid for opening and closing the opening of the memory slot are provided. The main memory 10 is detachably provided on the camera body 3 and is electrically connected to a storage control unit 33 (see FIG. 3) provided on the camera body 3 when attached to the camera body 3. The main memory 10 can generally be constituted by a semiconductor memory such as a card-type flash memory, but is not particularly limited, and a storage medium of any storage system such as a magnetic medium can be used as the main memory 10. is there.

図3は、デジタルカメラ2の制御処理系を示すブロック図である。   FIG. 3 is a block diagram showing a control processing system of the digital camera 2.

被写体光は、レンズ鏡筒4に設けられるレンズ部12とカメラ本体3に設けられるメカニカルシャッタ20とを通過し、撮像素子21によって受光される。レンズ部12は、撮影レンズ(レンズ群)及び絞りを含む撮影光学系によって構成される。撮像素子21は、被写体像を受光して画像データを生成する素子であり、RGB(赤緑青)等のカラーフィルタと、光学像を電気信号に変換するCCD(Charge Coupled Device)やCMOS(Complementary Metal Oxide Semiconductor)等のイメージセンサ(フォトダイオード)とを有する。撮像素子21から出力される画像データは、プロセス処理部22でAGC(Automatic Gain Control)回路等によってプロセス処理が施され、その後AD変換部23によってアナログ形式の画像データがデジタル形式の画像データに変換される。デジタル化された画像データはバッファメモリ24に保存される。   The subject light passes through the lens unit 12 provided in the lens barrel 4 and the mechanical shutter 20 provided in the camera body 3 and is received by the image sensor 21. The lens unit 12 includes a photographic optical system including a photographic lens (lens group) and a diaphragm. The image sensor 21 is an element that receives a subject image and generates image data. The image sensor 21 is a color filter such as RGB (Red Green Blue), a CCD (Charge Coupled Device) that converts an optical image into an electric signal, or a CMOS (Complementary Metal). And an image sensor (photodiode) such as an Oxide Semiconductor. The image data output from the image sensor 21 is processed by an AGC (Automatic Gain Control) circuit or the like in the process processing unit 22, and then the analog image data is converted into digital image data by the AD conversion unit 23. Is done. The digitized image data is stored in the buffer memory 24.

バッファメモリ24は、画像データを一時的に記憶する領域であり、DRAM(Dynamic Random Access Memory)等によって構成される。AD変換部23から送られてきてバッファメモリ24に蓄えられた画像データは、システム制御部25により制御される画像処理装置31によって読み出される。   The buffer memory 24 is an area for temporarily storing image data, and is configured by a DRAM (Dynamic Random Access Memory) or the like. Image data sent from the AD conversion unit 23 and stored in the buffer memory 24 is read by the image processing device 31 controlled by the system control unit 25.

画像処理装置31は、バッファメモリ24から読み出した画像データを処理対象として使用し、後述のホワイトバランス処理の他に、ガンマ補正処理及びデモザイク処理等の各種の画像処理を行い、画像処理後の画像データを再びバッファメモリ24に保存する。   The image processing device 31 uses the image data read from the buffer memory 24 as a processing target, performs various image processing such as gamma correction processing and demosaicing processing in addition to the white balance processing described later, and performs image processing after image processing. The data is stored again in the buffer memory 24.

画像処理装置31において画像処理が施されてバッファメモリ24に保存された画像データは、表示制御部35及び圧縮伸張部32によって読み出される。表示制御部35は表示部8を制御し、バッファメモリ24から読み出した画像データを表示部8に表示させる。このように、撮像素子21から出力され画像処理装置31において画像処理を受けた画像データは、撮影確認画像(ポストビュー画像)として表示部8に表示される。   Image data subjected to image processing in the image processing device 31 and stored in the buffer memory 24 is read by the display control unit 35 and the compression / decompression unit 32. The display control unit 35 controls the display unit 8 to display the image data read from the buffer memory 24 on the display unit 8. In this manner, the image data output from the image sensor 21 and subjected to image processing in the image processing device 31 is displayed on the display unit 8 as a shooting confirmation image (postview image).

一方、圧縮伸張部32は、バッファメモリ24から読み出した画像データの圧縮処理を行って、JPEG(Joint Photographic Experts Group)やTIFF(Tagged Image File Format)等の任意の圧縮形式の画像データを作成する。圧縮処理後の画像データは、メインメモリ10へのデータ記憶処理及びメインメモリ10からのデータ読み出し処理をコントロールする記憶制御部33によって、メインメモリ10に記憶される。なおメインメモリ10に画像データ等のデータ類を記憶する場合、記憶制御部33は、システム制御部25を介してクロックデバイス34から取得される日時情報等に基づいて、そのデータ類に編集日時情報(更新日時情報)等の撮影情報やその他の関連情報を付加する。この撮影情報を含む関連情報は、任意のフォーマットで画像データに付加され、例えばExif(Exchangeable image file format)形式を採用可能である。   On the other hand, the compression / decompression unit 32 compresses the image data read from the buffer memory 24 to create image data in an arbitrary compression format such as JPEG (Joint Photographic Experts Group) or TIFF (Tagged Image File Format). . The compressed image data is stored in the main memory 10 by a storage control unit 33 that controls data storage processing to the main memory 10 and data reading processing from the main memory 10. When data such as image data is stored in the main memory 10, the storage control unit 33 adds editing date / time information to the data based on date / time information acquired from the clock device 34 via the system control unit 25. Shooting information such as (update date information) and other related information are added. The related information including the shooting information is added to the image data in an arbitrary format, and, for example, an Exif (Exchangeable image file format) format can be adopted.

メインメモリ10に保存されている画像データを再生する再生モードにおいて、メインメモリ10に保存されている画像データは、システム制御部25により制御される記憶制御部33によって読み出され、圧縮伸張部32によって伸張処理が施された後にバッファメモリ24に保存される。そして撮影画像の確認表示と同様の手順で、表示制御部35によってバッファメモリ24から画像データが読み出され、表示部8において画像データが再生表示される。   In the reproduction mode for reproducing the image data stored in the main memory 10, the image data stored in the main memory 10 is read by the storage control unit 33 controlled by the system control unit 25, and the compression / decompression unit 32. After being subjected to the decompression process, the data is stored in the buffer memory 24. Then, the image data is read from the buffer memory 24 by the display control unit 35 in the same procedure as the confirmation display of the photographed image, and the image data is reproduced and displayed on the display unit 8.

システム制御部25は、上述のようにバッファメモリ24、画像処理装置31及び記憶制御部33をコントロールするが、デジタルカメラ2における他の各部もコントロールする。例えば、システム制御部25は、レンズ駆動部27を制御してレンズ部12の駆動をコントロールし、シャッタ駆動部26を制御してメカニカルシャッタ20の駆動をコントロールし、撮像素子21を制御して画像データの出力をコントロールする。またシステム制御部25は、フラッシュ発光部5を制御してフラッシュの発光及び非発光をコントロールし、電源制御部28を制御して電源29における電池装着の有無、電池の種類、電池残量の検出等を行う。またシステム制御部25は、クロックデバイス34においてカウントされる日時情報を取得して各種の処理に利用する。またシステム制御部25は、画像処理装置31を構成する各種の処理部を制御する。   The system control unit 25 controls the buffer memory 24, the image processing device 31, and the storage control unit 33 as described above, but also controls other units in the digital camera 2. For example, the system control unit 25 controls the lens driving unit 27 to control the driving of the lens unit 12, controls the shutter driving unit 26 to control the driving of the mechanical shutter 20, and controls the image sensor 21 to control the image. Control the output of data. Further, the system control unit 25 controls the flash light emitting unit 5 to control light emission and non-light emission of the flash, and controls the power supply control unit 28 to detect the presence or absence of the battery in the power source 29, the type of battery, and the remaining battery level. Etc. Further, the system control unit 25 acquires date and time information counted by the clock device 34 and uses it for various processes. The system control unit 25 controls various processing units that constitute the image processing apparatus 31.

さらにシステム制御部25は、シャッタボタン6、電源スイッチ7及び操作部9を含むユーザインタフェース36からの操作信号を取得し、操作信号に応じた各種の処理及びデバイス制御を行う。例えば、システム制御部25は、シャッタボタン6から受信したレリーズ信号に応じてシャッタ駆動部26を制御し、メカニカルシャッタ20の開閉をコントロールする。またシステム制御部25は、電源スイッチ7から受信した電源オンオフ信号に応じて電源制御部28を制御し、電源29のオン及びオフをコントロールする。   Further, the system control unit 25 acquires an operation signal from the user interface 36 including the shutter button 6, the power switch 7, and the operation unit 9, and performs various processes and device control according to the operation signal. For example, the system control unit 25 controls the shutter driving unit 26 according to the release signal received from the shutter button 6 to control the opening / closing of the mechanical shutter 20. Further, the system control unit 25 controls the power control unit 28 in accordance with the power on / off signal received from the power switch 7, and controls on / off of the power source 29.

システム制御部25で行われる各種の処理及びデバイス制御に必要なプログラムやデータ類は、制御メモリ30に記憶されている。システム制御部25は、必要に応じて、制御メモリ30に記憶されているプログラムやデータ類を読み出すことができ、また新たなプログラムやデータ類を制御メモリ30に保存することができる。例えば設定されたホワイトバランスモードの種類やホワイトバランスゲイン等の条件データを、システム制御部25は制御メモリ30に書き込むことができる。またシステム制御部25は、表示制御部35を制御し、各部から取得した各種情報を表示部8に表示させることができる。なおシステム制御部25は、ユーザがユーザインタフェース36を介して入力する操作信号に応じて、表示部8に表示させる各種情報を変更することができる。   Programs and data necessary for various processes performed by the system control unit 25 and device control are stored in the control memory 30. The system control unit 25 can read out programs and data stored in the control memory 30 as necessary, and can store new programs and data in the control memory 30. For example, the system control unit 25 can write condition data such as the type of white balance mode and white balance gain that have been set in the control memory 30. The system control unit 25 can control the display control unit 35 to display various information acquired from each unit on the display unit 8. The system control unit 25 can change various information displayed on the display unit 8 in accordance with an operation signal input by the user via the user interface 36.

次に、画像処理装置31におけるホワイトバランス処理について説明する。   Next, white balance processing in the image processing apparatus 31 will be described.

以下の各実施形態ではホワイトバランス処理を画像処理の一例として説明するが、下述の画像処理プロセスはホワイトバランス処理以外の他の処理にも応用可能である。   In the following embodiments, white balance processing is described as an example of image processing. However, the image processing process described below can be applied to processing other than white balance processing.

以下の各実施形態では、フラッシュ発光画像のホワイトバランス処理において、被写体の色に応じてもたらされる明度の相違を補償(補正)するための補正処理が行われる。以下の各実施形態では、画像データの「明度」として「輝度」が使われる。   In each of the following embodiments, in the white balance processing of the flash emission image, correction processing for compensating (correcting) a difference in brightness caused according to the color of the subject is performed. In the following embodiments, “luminance” is used as “brightness” of image data.

図4は、被写体の色に応じてもたらされる画像データの明度(輝度)の相違を説明する図である。図4(a)は、グレー(無彩色)の被写体及び青(有彩色)の被写体の各々に関する画像データの輝度値の関係を示す図であり、図4(b)は、被写体の色に応じてもたらされる画像データの明度の相違を補償した後の画像データの輝度値の関係を示す図である。図4(a)及び図4(b)の縦軸は、グレーの被写体及び青の被写体の各々に関する画像データの輝度値を示す。なお図4(a)及び図4(b)は、グレーの被写体及び青の被写体がフラッシュ発光部から等距離に配置されるケースを示す。図4(a)及び図4(b)において、「Fg1」はグレーの被写体の画像データの輝度のうちフラッシュ光が寄与する部分を概念的に示し、「Lg1」はグレーの被写体の画像データの輝度のうち環境光が寄与する部分を概念的に示す。また「Fb1」及び「Fb2」は青の被写体の画像データの輝度のうちフラッシュ光が寄与する部分を概念的に示し、「Lb1」及び「Lb2」は青の被写体の画像データの輝度のうち環境光が寄与する部分を概念的に示す。   FIG. 4 is a diagram for explaining the difference in brightness (luminance) of image data brought about according to the color of the subject. FIG. 4A is a diagram illustrating the relationship between the luminance values of the image data for each of a gray (achromatic) subject and a blue (chromatic) subject, and FIG. 4B corresponds to the color of the subject. It is a figure which shows the relationship of the luminance value of the image data after compensating the difference in the brightness of the image data brought about. The vertical axes in FIGS. 4A and 4B indicate the luminance values of the image data for each of the gray subject and the blue subject. 4A and 4B show a case where a gray subject and a blue subject are arranged at an equal distance from the flash light emitting unit. 4 (a) and 4 (b), “Fg1” conceptually indicates a portion to which flash light contributes in the luminance of the image data of the gray subject, and “Lg1” indicates the image data of the gray subject. The part which environmental light contributes among luminance is shown notionally. “Fb1” and “Fb2” conceptually indicate a portion to which flash light contributes in the luminance of the image data of the blue subject, and “Lb1” and “Lb2” indicate the environment of the luminance of the image data of the blue subject. The part which light contributes is shown notionally.

一般に、フラッシュ発光部5と被写体との間の距離に応じて、画像データにおける「フラッシュ光の影響量(図4(a)の「Fg1」及び「Fb1」参照)」及び「環境光の影響量(図4(a)の「Lg1」及び「Lb1」参照)」は変化する。また、画像の明るさは被写体の色に依存するため、フラッシュ発光部5と被写体との間の距離が同じであっても被写体の色が異なると、画像におけるフラッシュ光の影響量及び環境光の影響量は変わる。したがって図4(a)に示す例では、グレーの被写体の画像データと青の被写体の画像データとの間で、フラッシュ光が寄与する輝度部分の大きさは一致せず(すなわち「Fg1≠Fb1」)、また環境光が寄与する輝度部分の大きさも一致せず(すなわち「Lg1≠Lb1」)、全体の輝度の大きさも異なる(すなわち「Fg1+Lg1≠Fb1+Lb1」)。   In general, according to the distance between the flash light emitting unit 5 and the subject, “the influence amount of flash light (see“ Fg1 ”and“ Fb1 ”in FIG. 4A)” and “the influence amount of environmental light” in the image data. (See “Lg1” and “Lb1” in FIG. 4A). Further, since the brightness of the image depends on the color of the subject, even if the distance between the flash light emitting unit 5 and the subject is the same, if the color of the subject is different, the influence amount of the flash light on the image and the ambient light The amount of influence varies. Therefore, in the example shown in FIG. 4A, the size of the luminance portion contributed by the flash light does not match between the image data of the gray subject and the image data of the blue subject (that is, “Fg1 ≠ Fb1”). In addition, the size of the luminance portion to which the ambient light contributes does not match (that is, “Lg1 ≠ Lb1”), and the overall luminance also differs (that is, “Fg1 + Lg1 ≠ Fb1 + Lb1”).

下述の各実施形態では、このような被写体の色に応じてもたらされる画像データの輝度(明度)の相違を補償し、図4(b)に示すように、下記の式1〜式3のうち少なくともいずれかの関係を実現するための処理が行われる。
式1 「Fg1=Fb2(ただし「Fb2=Fb1×フラッシュ光用の補正データ(フラッシュ補正データ)」)」
式2 「Lg1=Lb2(ただし「Lb2=Lb1×環境光用の補正データ(環境光補正データ)」)」
式3 「Fg1+Lg1=Fb2+Lb2」
このように被写体の色に依存する明度の相違などの影響を取り除いて、上記の式1〜式3のうち少なくともいずれかにより表される関係を実現することによって、より正確な「フラッシュ光の影響を示す画像データ」を取得することができ、これを用いて画像処理を行うことにより画像データの輝度(明度)の相違を補償することができる。
In each of the embodiments described below, the difference in brightness (brightness) of the image data brought about according to the color of the subject is compensated, and as shown in FIG. Processing for realizing at least one of the relationships is performed.
Formula 1 “Fg1 = Fb2 (where“ Fb2 = Fb1 × correction data for flash light (flash correction data) ”)”
Formula 2 “Lg1 = Lb2 (where“ Lb2 = Lb1 × ambient light correction data (ambient light correction data) ”)
Formula 3 “Fg1 + Lg1 = Fb2 + Lb2”
In this way, by removing the influence such as the difference in brightness depending on the color of the subject and realizing the relationship represented by at least one of the above formulas 1 to 3, a more accurate “effect of flash light” The image data indicating “can be acquired, and image processing is performed using the image data to compensate for a difference in brightness (brightness) of the image data.

上述のように画像処理装置31ではホワイトバランス処理以外の画像処理も行われるが、以下では、主としてホワイトバランス処理について説明し、ホワイトバランス処理以外の画像処理についての説明は省略する。   As described above, the image processing apparatus 31 performs image processing other than the white balance processing. However, the white balance processing will be mainly described below, and the description of image processing other than the white balance processing will be omitted.

<第1実施形態>
図5は、第1実施形態に係る画像処理装置31の機能構成を示すブロック図である。本実施形態の画像処理装置31は、フラッシュ画像成分取得部40、フラッシュ補正データ取得部42、フラッシュ明度補正部44及びホワイトバランス処理部46を有する。
<First Embodiment>
FIG. 5 is a block diagram illustrating a functional configuration of the image processing apparatus 31 according to the first embodiment. The image processing apparatus 31 of this embodiment includes a flash image component acquisition unit 40, a flash correction data acquisition unit 42, a flash brightness correction unit 44, and a white balance processing unit 46.

フラッシュ画像成分取得部40は、フラッシュ光の発光下で被写体を撮影することにより取得された第1の画像データ(フラッシュ発光画像データD1)に基づき、フラッシュ光による被写体の画像成分を示すフラッシュ画像成分データ(RGBフラッシュ影響度マップ)D3を取得する。   The flash image component acquisition unit 40, based on the first image data (flash emission image data D1) acquired by photographing the subject under the emission of flash light, the flash image component indicating the image component of the subject by flash light. Data (RGB flash influence map) D3 is acquired.

フラッシュ画像成分取得部40におけるフラッシュ画像成分データD3の具体的な取得手法は特に限定されない。例えばフラッシュ画像成分取得部40は、「フラッシュ発光画像データD1(第1の画像データ)」と「フラッシュ光の非発光下で被写体を撮影することにより取得されたフラッシュ非発光画像データD2(第2の画像データ)」との差分データを、フラッシュ画像成分データD3とすることができる。このフラッシュ画像成分データD3は、フラッシュ発光画像データD1から環境光の影響がキャンセルされた「フラッシュ光の影響を示す画像データ」である。すなわちフラッシュ画像成分データD3は、フラッシュ発光画像から、フラッシュ光の影響を受けずに環境光の影響のみを受けている領域を排除して、フラッシュ光の影響を受けている領域を分離したデータとなる。   A specific method for acquiring the flash image component data D3 in the flash image component acquisition unit 40 is not particularly limited. For example, the flash image component acquisition unit 40 acquires “flash emission image data D1 (first image data)” and “flash non-emission image data D2 (second image) acquired by photographing a subject under non-emission of flash light”. The difference data from the image data) ”can be the flash image component data D3. The flash image component data D3 is “image data indicating the influence of flash light” in which the influence of ambient light is canceled from the flash emission image data D1. That is, the flash image component data D3 is data obtained by excluding an area affected by the ambient light without being affected by the flash light and separating the area affected by the flash light from the flash emission image. Become.

フラッシュ画像成分取得部40によるフラッシュ発光画像データD1及びフラッシュ非発光画像データD2の取得手法は特に限定されない。例えば、連続的に撮影取得された同一被写体に関するフラッシュ発光画像データD1及びフラッシュ非発光画像データD2が、撮像素子21(図3参照)から、プロセス処理部22、AD変換部23及びバッファメモリ24を介し、画像処理装置31のフラッシュ画像成分取得部40に供給されてもよい。またフラッシュ画像成分取得部40は、メインメモリ10に保存されている同一被写体に関するフラッシュ発光画像データD1及びフラッシュ非発光画像データD2を処理対象として取得してもよい。この場合、メインメモリ10に保存されているフラッシュ発光画像データD1及びフラッシュ非発光画像データD2は記憶制御部33によって読み出され、圧縮伸張部32で伸張処理が施された後に、バッファメモリ24を介して画像処理装置31のフラッシュ画像成分取得部40に供給される。   The method for acquiring the flash emission image data D1 and the flash non-emission image data D2 by the flash image component acquisition unit 40 is not particularly limited. For example, the flash emission image data D1 and the flash non-emission image data D2 relating to the same subject that are continuously photographed and acquired are transferred from the image sensor 21 (see FIG. 3) to the process processing unit 22, the AD conversion unit 23, and the buffer memory 24. Via the flash image component acquisition unit 40 of the image processing apparatus 31. The flash image component acquisition unit 40 may acquire flash emission image data D1 and flash non-emission image data D2 related to the same subject stored in the main memory 10 as processing targets. In this case, the flash light emission image data D1 and the flash non-light emission image data D2 stored in the main memory 10 are read by the storage control unit 33 and decompressed by the compression / decompression unit 32, and then stored in the buffer memory 24. To the flash image component acquisition unit 40 of the image processing device 31.

また、画像処理装置31(フラッシュ画像成分取得部40)に供給されるフラッシュ発光画像データD1及びフラッシュ非発光画像データD2の撮影取得条件、画像タイプ、画像サイズ等の各種の条件は特に限定されない。すなわち、「フラッシュ発光下で撮影取得された画像データ」及び「フラッシュ非発光下で撮影取得された画像データ」であれば、画像処理装置31(フラッシュ画像成分取得部40)に供給されるフラッシュ発光画像データD1及びフラッシュ非発光画像データD2は如何なる撮影条件下で撮影取得された画像データであっても構わない。例えば、フラッシュ発光画像データD1及びフラッシュ非発光画像データD2は、静止画データであってもよいし、動画データであってもよい。またフラッシュ非発光画像データD2として、ライブビュー用の画像データや、フラッシュ光の調光用の画像データのような高速動作時に撮影取得された画像データが使用されてもよい。   Further, various conditions such as shooting acquisition conditions, image types, and image sizes of the flash emission image data D1 and the flash non-emission image data D2 supplied to the image processing device 31 (flash image component acquisition unit 40) are not particularly limited. That is, in the case of “image data captured and acquired under flash emission” and “image data acquired and acquired under non-flash emission”, the flash emission supplied to the image processing device 31 (flash image component acquisition unit 40). The image data D1 and the flash non-light-emitting image data D2 may be image data captured and acquired under any shooting condition. For example, the flash light emission image data D1 and the flash non-light emission image data D2 may be still image data or moving image data. Further, as the flash non-light emitting image data D2, image data acquired during high-speed operation such as live view image data or flash light dimming image data may be used.

これらのフラッシュ発光画像データD1及びフラッシュ非発光画像データD2を画像処理装置31(フラッシュ画像成分取得部40)に供給するプロセスは、システム制御部25(図3参照)の制御下で適切に行われる。   The process of supplying the flash emission image data D1 and the flash non-emission image data D2 to the image processing device 31 (flash image component acquisition unit 40) is appropriately performed under the control of the system control unit 25 (see FIG. 3). .

なおフラッシュ画像成分データD3を取得するフラッシュ画像成分取得部40の構成例の詳細は、後述の第2実施形態において説明する。   Details of a configuration example of the flash image component acquisition unit 40 that acquires the flash image component data D3 will be described in a second embodiment to be described later.

図5のフラッシュ補正データ取得部42は、フラッシュ画像成分データD3に基づき、被写体の色に応じてもたらされるフラッシュ画像成分データD3の明度の相違を反映したフラッシュ補正データ(色別フラッシュ影響度マップ)D4を取得する。このフラッシュ補正データD4は、被写体の色に応じてもたらされる影響(明度の相違)を解消するための数値データ(例えばゲイン値)によって表現可能である。   The flash correction data acquisition unit 42 shown in FIG. 5 is based on the flash image component data D3, and flash correction data (flash impact map for each color) that reflects the difference in brightness of the flash image component data D3 brought about according to the color of the subject. D4 is acquired. The flash correction data D4 can be expressed by numerical data (for example, a gain value) for eliminating the influence (difference in brightness) caused according to the color of the subject.

フラッシュ明度補正部44は、フラッシュ画像成分データD3及びフラッシュ補正データD4に基づき、被写体の色に応じてもたらされるフラッシュ画像成分データD3の明度の相違が補償されたフラッシュ画像補正成分データ(合成フラッシュ影響度マップ)D5を取得する。このフラッシュ画像補正成分データD5は、フラッシュ画像成分データD3がフラッシュ補正データD4に基づいて調整され、被写体の色に応じた分光特性に基づく輝度の相違が補償された「フラッシュ光の影響を示す(画像)データ」である。   The flash brightness correction unit 44 is based on the flash image component data D3 and the flash correction data D4, and the flash image correction component data (the effect of the combined flash) is compensated for the difference in brightness of the flash image component data D3 brought about according to the color of the subject. Degree map) D5 is acquired. The flash image correction component data D5 indicates that the flash image component data D3 is adjusted based on the flash correction data D4 and the difference in luminance based on the spectral characteristics corresponding to the color of the subject is compensated. Image) data ".

これらのフラッシュ補正データ取得部42及びフラッシュ明度補正部44の構成例やフラッシュ補正データD4及びフラッシュ画像補正成分データD5の具体例の詳細は、後述の第2実施形態及び第3実施形態において説明する。   Details of configuration examples of the flash correction data acquisition unit 42 and flash brightness correction unit 44 and specific examples of the flash correction data D4 and flash image correction component data D5 will be described in second and third embodiments described later. .

ホワイトバランス処理部46は、フラッシュ画像補正成分データD5に基づいて、フラッシュ発光画像データ(第1の画像データ)D1のホワイトバランスを調整する。例えば、フラッシュ画像補正成分データD5から、フラッシュ発光画像データD1においてフラッシュ光の影響が強い領域及び弱い領域を推定することが可能である。したがってホワイトバランス処理部46は、フラッシュ画像補正成分データD5に基づいてフラッシュ発光画像データ(第1の画像データ)D1のうちフラッシュ光の影響が比較的強い領域を判別し、その「フラッシュ光の影響が比較的強い領域」の画像データ(フラッシュ発光画像データ(第1の画像データ)D1)に対してフラッシュ光用ホワイトバランスゲインを適用することができる。   The white balance processing unit 46 adjusts the white balance of the flash emission image data (first image data) D1 based on the flash image correction component data D5. For example, from the flash image correction component data D5, it is possible to estimate an area where the influence of flash light is strong and weak in the flash emission image data D1. Therefore, the white balance processing unit 46 determines an area where the influence of the flash light is relatively strong in the flash emission image data (first image data) D1 based on the flash image correction component data D5. The white balance gain for flash light can be applied to the image data (flash emission image data (first image data) D1) of “relatively strong area”.

なお、ホワイトバランス処理部46におけるホワイトバランス処理の具体的な手法は特に限定されない。例えばフラッシュ発光画像データD1におけるフラッシュ光の影響のみを解消するホワイトバランス処理が行われてもよいし、フラッシュ発光画像データD1におけるフラッシュ光及び環境光の各々の影響を解消するホワイトバランス処理が行われてもよい。より具体的には、フラッシュ発光画像データD1のうちフラッシュ光の影響が比較的強い領域に対し、フラッシュ光用のホワイトバランスゲインが適用されてもよい。この場合、その「フラッシュ光の影響が比較的強い領域」以外の領域に対しては、ホワイトバランスゲインが適用されなくてもよいし、環境光用のホワイトバランスゲインが適用されてもよい。またフラッシュ発光画像データD1の各領域に関し、フラッシュ光の影響と環境光の影響との割合を求めて、その割合に応じて、フラッシュ光用のホワイトバランスゲイン及び環境光用のホワイトバランスゲインの両者を適用してもよい。   The specific method of white balance processing in the white balance processing unit 46 is not particularly limited. For example, white balance processing for eliminating only the influence of flash light in the flash emission image data D1 may be performed, or white balance processing for eliminating the influence of each of flash light and ambient light in the flash emission image data D1 is performed. May be. More specifically, a white balance gain for flash light may be applied to an area where the influence of flash light is relatively strong in the flash emission image data D1. In this case, the white balance gain may not be applied to the region other than the “region where the influence of the flash light is relatively strong”, or the ambient light white balance gain may be applied. Further, with respect to each area of the flash emission image data D1, the ratio between the influence of the flash light and the influence of the environmental light is obtained, and both the white balance gain for the flash light and the white balance gain for the environmental light are determined according to the ratio. May be applied.

図6は、第1実施形態に係るホワイトバランス処理のフローチャートである。   FIG. 6 is a flowchart of white balance processing according to the first embodiment.

まずフラッシュ画像成分取得部40において、フラッシュ発光画像データD1及びフラッシュ非発光画像データD2が取得され(図6のS11)、これらのフラッシュ発光画像データD1及びフラッシュ非発光画像データD2からフラッシュ画像成分データ(RGBフラッシュ影響度マップ)D3が取得される(S12)。   First, the flash image component acquisition unit 40 acquires the flash emission image data D1 and the flash non-emission image data D2 (S11 in FIG. 6), and the flash image component data is obtained from the flash emission image data D1 and the flash non-emission image data D2. (RGB flash influence map) D3 is acquired (S12).

そしてフラッシュ補正データ取得部42において、フラッシュ画像成分データD3からフラッシュ補正データD4が取得される(S13)。またフラッシュ明度補正部44において、フラッシュ画像成分データD3及びフラッシュ補正データD4からフラッシュ画像補正成分データD5が取得される(S14)。   Then, the flash correction data acquisition unit 42 acquires the flash correction data D4 from the flash image component data D3 (S13). Further, the flash brightness correction unit 44 obtains flash image correction component data D5 from the flash image component data D3 and the flash correction data D4 (S14).

そしてホワイトバランス処理部46において、フラッシュ画像補正成分データD5に応じたホワイトバランス処理がフラッシュ発光画像データD1に対して行われる(S15)。   In the white balance processing unit 46, white balance processing corresponding to the flash image correction component data D5 is performed on the flash emission image data D1 (S15).

以上説明したように本実施形態の画像処理装置31及び画像処理方法によれば、被写体の色に応じてもたらされる輝度(明度)の相違などの影響を取り除くためのフラッシュ補正データが取得され、そのフラッシュ補正データが考慮されてフラッシュ光の影響度を示すフラッシュ画像補正成分データが取得される。そのようなフラッシュ画像補正成分データを用いることで、フラッシュ発光画像データD1に対して精度の高いホワイトバランス処理を行うことができる。   As described above, according to the image processing apparatus 31 and the image processing method of the present embodiment, flash correction data for removing the influence such as the difference in brightness (brightness) caused according to the color of the subject is acquired, Flash image correction component data indicating the degree of influence of flash light is acquired in consideration of the flash correction data. By using such flash image correction component data, highly accurate white balance processing can be performed on the flash emission image data D1.

<第2実施形態>
本実施形態において、上述の第1実施形態と同一又は類似の構成には同一の符号を付し、その詳細な説明を省略する。
Second Embodiment
In the present embodiment, the same or similar components as those in the first embodiment described above are denoted by the same reference numerals, and detailed description thereof is omitted.

本実施形態では無彩色(グレー)の被写体の分光特性(分光反射率)を基準にして被写体の撮影画像の明度(輝度)を調整することで、被写体の色に応じてもたらされる画像データの明度の相違を補償する処理が行われる。   In the present embodiment, the brightness of the image data provided according to the color of the subject is adjusted by adjusting the brightness (brightness) of the photographed image of the subject with reference to the spectral characteristics (spectral reflectance) of the achromatic (gray) subject. A process for compensating for the difference is performed.

本実施形態に係る画像処理装置31は、図5に示す第1実施形態の画像処理装置31と同様に、フラッシュ画像成分取得部40、フラッシュ補正データ取得部42、フラッシュ明度補正部44及びホワイトバランス処理部46を備えるが、とりわけフラッシュ画像成分取得部40及びフラッシュ補正データ取得部42が以下の具体的構成を有する。   Similar to the image processing apparatus 31 of the first embodiment shown in FIG. 5, the image processing apparatus 31 according to the present embodiment has a flash image component acquisition unit 40, a flash correction data acquisition unit 42, a flash brightness correction unit 44, and a white balance. Although the processing unit 46 is provided, the flash image component acquisition unit 40 and the flash correction data acquisition unit 42 have the following specific configurations.

まずフラッシュ画像成分取得部40の具体的構成の一態様について説明する。   First, an aspect of a specific configuration of the flash image component acquisition unit 40 will be described.

本実施形態のフラッシュ画像成分取得部40は、フラッシュ光の発光下で被写体を撮影することにより取得されたフラッシュ発光画像データ(第1の画像データ)D1と、フラッシュ光の非発光下で被写体を撮影することにより取得されたフラッシュ非発光画像データD2(第2の画像データ)との差分を表す第1の差分データから、フラッシュ画像成分データD3を取得する。特に本実施形態のフラッシュ画像成分取得部40は、その第1の差分データにフラッシュ光用ホワイトバランスゲインを適用することでフラッシュ画像成分データD3を取得する。   The flash image component acquisition unit 40 of this embodiment captures a subject under flash emission image data (first image data) D1 acquired by photographing the subject under flash light emission and a subject under non-flash light emission. Flash image component data D3 is acquired from first difference data representing a difference from flash non-emission image data D2 (second image data) acquired by photographing. In particular, the flash image component acquisition unit 40 of the present embodiment acquires the flash image component data D3 by applying a flash light white balance gain to the first difference data.

図7は、第2実施形態に係るフラッシュ画像成分取得部40の機能構成を示すブロック図である。本実施形態のフラッシュ画像成分取得部40は、第1の画像データ抽出部47及び第1の抽出データ調整部49を有する。第1の画像データ抽出部47は、フラッシュ発光画像データD1とフラッシュ非発光画像データD2との差分を表す第1の差分データを取得する。第1の抽出データ調整部49は、その第1の差分データにフラッシュ光用ホワイトバランスゲインを適用することでフラッシュ画像成分データD3を取得する。   FIG. 7 is a block diagram illustrating a functional configuration of the flash image component acquisition unit 40 according to the second embodiment. The flash image component acquisition unit 40 according to the present embodiment includes a first image data extraction unit 47 and a first extraction data adjustment unit 49. The first image data extraction unit 47 acquires first difference data representing a difference between the flash emission image data D1 and the flash non-emission image data D2. The first extraction data adjustment unit 49 obtains flash image component data D3 by applying a flash light white balance gain to the first difference data.

図8は、フラッシュ画像成分取得部40の第1の画像データ抽出部47の構成例を示すブロック図である。本実施形態の第1の画像データ抽出部47は減算器48を有する。減算器48は、フラッシュ発光画像データD1及びフラッシュ非発光画像データD2が入力され、「第1の差分データ(第1のRGBフラッシュ影響度マップ)D6=フラッシュ発光画像データD1−フラッシュ非発光画像データD2」で表される第1の差分データD6を算出する。減算器48で算出された第1の差分データD6は、第1の画像データ抽出部47から第1の抽出データ調整部49に送られる。   FIG. 8 is a block diagram illustrating a configuration example of the first image data extraction unit 47 of the flash image component acquisition unit 40. The first image data extraction unit 47 of this embodiment has a subtracter 48. The subtracter 48 receives the flash emission image data D1 and the flash non-emission image data D2, and receives the expression "first difference data (first RGB flash influence map) D6 = flash emission image data D1-flash non-emission image data". First difference data D6 represented by “D2” is calculated. The first difference data D6 calculated by the subtracter 48 is sent from the first image data extraction unit 47 to the first extraction data adjustment unit 49.

図9は、フラッシュ画像成分取得部40の第1の抽出データ調整部49の構成例を示すブロック図である。本実施形態の第1の抽出データ調整部49は、第1のホワイトバランス調整部50及びフラッシュ光用WBゲイン記憶部51を有する。第1のホワイトバランス調整部50は、フラッシュ光用WBゲイン記憶部51に保存されているフラッシュ光用ホワイトバランスゲインWB1を読み出し、第1の差分データD6にフラッシュ光用ホワイトバランスゲインWB1を適用することで、フラッシュ画像成分データ(第2のRGBフラッシュ影響度マップ)D3を取得する。   FIG. 9 is a block diagram illustrating a configuration example of the first extraction data adjustment unit 49 of the flash image component acquisition unit 40. The first extraction data adjustment unit 49 of the present embodiment includes a first white balance adjustment unit 50 and a flash light WB gain storage unit 51. The first white balance adjustment unit 50 reads the flash light white balance gain WB1 stored in the flash light WB gain storage unit 51, and applies the flash light white balance gain WB1 to the first difference data D6. Thus, the flash image component data (second RGB flash influence map) D3 is acquired.

このように第1の画像データ抽出部47及び第1の抽出データ調整部49を経て取得されるフラッシュ画像成分データD3は、フラッシュ光の分光特性に応じたホワイトバランスの補正が施された「フラッシュ光の影響を示す画像データ」となる。したがって、本実施形態のフラッシュ画像成分取得部40は、グレーバランスが調整されたフラッシュ画像成分データD3を出力する。   As described above, the flash image component data D3 obtained through the first image data extraction unit 47 and the first extraction data adjustment unit 49 is “flash” subjected to white balance correction according to the spectral characteristics of the flash light. The image data indicates the influence of light. Therefore, the flash image component acquisition unit 40 of the present embodiment outputs the flash image component data D3 with the gray balance adjusted.

なお、フラッシュ光用ホワイトバランスゲインWB1を取得してフラッシュ光用WBゲイン記憶部51に記憶する手法は特に限定されない。例えばフラッシュ発光部5(図1及び図3参照)がデジタルカメラ2(カメラ本体3)に内蔵されているタイプのフラッシュ装置である場合、フラッシュ光の分光特性は既知であるため、デジタルカメラ2(カメラ本体3)の製造時等において、フラッシュ光用ホワイトバランスゲインWB1を予め取得してフラッシュ光用WBゲイン記憶部51に記憶しておくことができる。またフラッシュ発光部5が外付けタイプのフラッシュ装置である場合、ユーザが例えばグレーカードをフラッシュ光の発光下で撮影し、その撮影画像データから適正なフラッシュ光用ホワイトバランスゲインWB1を予め取得し、そのフラッシュ光用ホワイトバランスゲインWB1をフラッシュ光用WBゲイン記憶部51に記憶しておくことができる。   The method of acquiring the flash light white balance gain WB1 and storing it in the flash light WB gain storage unit 51 is not particularly limited. For example, when the flash light emitting unit 5 (see FIGS. 1 and 3) is a flash device of the type incorporated in the digital camera 2 (camera body 3), the spectral characteristics of the flash light are known, so the digital camera 2 ( When manufacturing the camera body 3), the flash light white balance gain WB1 can be acquired in advance and stored in the flash light WB gain storage unit 51. Further, when the flash light emitting unit 5 is an external flash device, the user takes, for example, a gray card under flash light emission, and obtains an appropriate flash light white balance gain WB1 from the photographed image data in advance. The flash light white balance gain WB 1 can be stored in the flash light WB gain storage unit 51.

なお第1の画像データ抽出部47(フラッシュ画像成分取得部40)は、フラッシュ非発光画像データD2ではなくフラッシュ発光画像データを使用して、フラッシュ画像成分データD3を取得してもよい。すなわちフラッシュ画像成分取得部40は、第1の発光量のフラッシュ光の発光下で被写体を撮影することにより取得された第1の画像データ(フラッシュ発光画像データD1)と、第1の発光量とは異なる第2の発光量のフラッシュ光の発光下で被写体を撮影することにより取得された第2の画像データ(フラッシュ発光画像データ)との差分を表す第1の差分データから、フラッシュ画像成分データD3を取得してもよい。   The first image data extraction unit 47 (flash image component acquisition unit 40) may acquire the flash image component data D3 using the flash emission image data instead of the flash non-emission image data D2. That is, the flash image component acquisition unit 40 acquires the first image data (flash emission image data D1) acquired by photographing the subject under the emission of flash light having the first emission amount, the first emission amount, and the like. Is flash image component data from first difference data representing a difference from second image data (flash emission image data) acquired by photographing a subject under the emission of flash light having a different second emission amount. D3 may be acquired.

次に、フラッシュ補正データ取得部42(図5参照)におけるフラッシュ画像成分データD3の処理単位(処理ブロック)について説明する。   Next, a processing unit (processing block) of the flash image component data D3 in the flash correction data acquisition unit 42 (see FIG. 5) will be described.

図10は、撮像素子21を構成する複数の画素14の平面構造を示す概念図である。撮像素子21は、複数の画素14が2次元的に並べられて構成され、各画素14はカラーフィルタ及びイメージセンサを有する。撮像素子21によって撮影取得される画像データは、これらの画素14(イメージセンサ)の各々から出力される画素データ(画素値)の集合によって構成される。したがって、上述のフラッシュ発光画像データD1、フラッシュ非発光画像データD2、第1の差分データD6及びフラッシュ画像成分データD3の各々も、画素データの集合によって構成される。   FIG. 10 is a conceptual diagram showing a planar structure of a plurality of pixels 14 constituting the image sensor 21. The image sensor 21 is configured by two-dimensionally arranging a plurality of pixels 14, and each pixel 14 includes a color filter and an image sensor. Image data photographed and acquired by the image sensor 21 is constituted by a set of pixel data (pixel values) output from each of these pixels 14 (image sensors). Accordingly, each of the above-described flash emission image data D1, flash non-emission image data D2, first difference data D6, and flash image component data D3 is also configured by a set of pixel data.

本実施形態のフラッシュ補正データ取得部42は、フラッシュ画像成分データD3を複数の処理ブロックに区分して処理を行うが、これらの複数の処理ブロックの各々は、単一の画素によって構成されてもよいし、複数の画素によって構成されてもよい。各処理ブロックの構成画素を単一画素とする場合、フラッシュ補正データ取得部42等における下記の処理は画素毎に行われる。一方、各処理ブロックの構成画素を複数画素とする場合、フラッシュ補正データ取得部42等における下記の処理はその「処理ブロックを構成する複数画素」毎に行われる。   The flash correction data acquisition unit 42 of the present embodiment performs processing by dividing the flash image component data D3 into a plurality of processing blocks. Each of the plurality of processing blocks may be configured by a single pixel. It may be constituted by a plurality of pixels. When the constituent pixels of each processing block are single pixels, the following processing in the flash correction data acquisition unit 42 and the like is performed for each pixel. On the other hand, when the constituent pixels of each processing block are a plurality of pixels, the following processing in the flash correction data acquisition unit 42 or the like is performed for each “plural pixels constituting the processing block”.

なお複数の処理ブロックの各々を複数の画素によって構成する場合、複数の処理ブロックの各々を構成する複数の画素は、撮像素子21のカラーフィルタ16の基本配列を構成する画素14に対応することが好ましい。すなわち、フラッシュ発光画像データ(第1の画像データ)D1の撮影に使用された撮像素子21はRGB等の複数色のカラーフィルタを含む単板式の撮像素子であり、これらの複数色のカラーフィルタが、特定の色パターンの基本配列が繰り返し配置されることで構成される場合には、このカラーフィルタの基本配列に対応するように各処理ブロックが定められることが好ましい。   When each of the plurality of processing blocks is configured by a plurality of pixels, the plurality of pixels configuring each of the plurality of processing blocks may correspond to the pixels 14 configuring the basic array of the color filter 16 of the image sensor 21. preferable. That is, the image sensor 21 used for photographing the flash emission image data (first image data) D1 is a single-plate image sensor including a plurality of color filters such as RGB. When the basic arrangement of a specific color pattern is repeatedly arranged, each processing block is preferably determined so as to correspond to the basic arrangement of the color filter.

図11は、カラーフィルタ16の基本配列例を示す平面図であり、(a)はベイヤー配列の基本配列パターンを示し、(b)はX−Trans(登録商標)タイプの基本配列パターンを示す。なお図11(a)において「R」はR(赤)のカラーフィルタ16を示し、「B」はB(青)のカラーフィルタ16を示し、「G1」及び「G2」はG(緑)のカラーフィルタ16を示す。また図11(b)において「R1」〜「R8」はR(赤)のカラーフィルタ16を示し、「B1」〜「B8」はB(青)のカラーフィルタ16を示し、「G1」〜「G20」はG(緑)のカラーフィルタ16を示す。   FIG. 11 is a plan view showing an example of the basic arrangement of the color filter 16, where (a) shows the basic arrangement pattern of the Bayer arrangement, and (b) shows the X-Trans (registered trademark) type basic arrangement pattern. In FIG. 11A, “R” indicates the R (red) color filter 16, “B” indicates the B (blue) color filter 16, and “G1” and “G2” indicate G (green). The color filter 16 is shown. In FIG. 11B, “R1” to “R8” indicate the R (red) color filter 16, “B1” to “B8” indicate the B (blue) color filter 16, and “G1” to “G1”. “G20” indicates the G (green) color filter 16.

例えば撮像素子21がベイヤー配列のカラーフィルタ16を有する場合には、図11(a)に示すような2画素×2画素(計4画素)によって各処理ブロックを構成することが好ましい。一方、撮像素子21がX−Transタイプのカラーフィルタ16を有する場合には、図11(b)に示すような6画素×6画素(計36画素)によって各処理ブロックを構成することが好ましい。   For example, when the image sensor 21 has the color filter 16 with the Bayer arrangement, each processing block is preferably configured by 2 pixels × 2 pixels (a total of 4 pixels) as shown in FIG. On the other hand, when the image sensor 21 has the X-Trans type color filter 16, it is preferable that each processing block is composed of 6 pixels × 6 pixels (36 pixels in total) as shown in FIG.

なお、フラッシュ補正データ取得部42等の処理における各処理ブロックを構成する画素の単位と、後述のホワイトバランス処理部46におけるホワイトバランス処理における各処理ブロックを構成する画素の単位とを、同じに設定してもよい。すなわちホワイトバランス処理における各処理ブロックが単一画素によって構成される場合には、フラッシュ補正データ取得部42等の処理における各処理ブロックも単一画素によって構成することができる。またホワイトバランス処理における各処理ブロックがカラーフィルタ16の基本配列を構成する複数画素によって構成される場合には、フラッシュ補正データ取得部42等における各処理ブロックもカラーフィルタ16の基本配列を構成する複数画素によって構成することができる。   The unit of pixels constituting each processing block in the processing of the flash correction data acquisition unit 42 and the like and the unit of pixels constituting each processing block in the white balance processing in the white balance processing unit 46 described later are set to be the same. May be. That is, when each processing block in the white balance processing is configured by a single pixel, each processing block in the processing by the flash correction data acquisition unit 42 and the like can also be configured by a single pixel. Further, when each processing block in the white balance processing is configured by a plurality of pixels constituting the basic array of the color filter 16, each processing block in the flash correction data acquisition unit 42 or the like also includes a plurality of the basic array of the color filter 16. It can be composed of pixels.

以下の説明では、各処理ブロックが単一の画素によって構成される例について説明するが、各処理ブロックが複数の画素によって構成される場合にも基本的には同様の処理が行われる。したがって各処理ブロックが複数の画素によって構成される場合の処理については、「画素」を「複数の画素によって構成される領域」と呼ぶのがふさわしいケースもあるが、下記の説明では便宜上「画素」と呼ぶ。   In the following description, an example in which each processing block is configured by a single pixel will be described, but basically the same processing is performed when each processing block is configured by a plurality of pixels. Therefore, in the case where each processing block is constituted by a plurality of pixels, there are cases where it is appropriate to refer to “pixels” as “regions constituted by a plurality of pixels”. Call it.

次に、フラッシュ補正データ取得部42の具体的構成の一態様について説明する。   Next, an aspect of a specific configuration of the flash correction data acquisition unit 42 will be described.

本実施形態のフラッシュ補正データ取得部42は、被写体の分光特性(分光反射率)に基づく色に依存する影響を低減するために、処理ブロック毎に取得したフラッシュ画像成分データの色比データ(RGB比等)から明度指標データ(輝度データ)を取得し、この明度指標データから色間の明度(輝度)の相違を補償するためのフラッシュ補正データ(補正ゲイン)を取得する。   The flash correction data acquisition unit 42 of the present embodiment reduces the color-dependent data (RGB) of the flash image component data acquired for each processing block in order to reduce the color-dependent influence based on the spectral characteristics (spectral reflectance) of the subject. Brightness index data (luminance data) is acquired from the ratio etc., and flash correction data (correction gain) for compensating for differences in brightness (luminance) between colors is acquired from the brightness index data.

図12は、第2実施形態に係るフラッシュ補正データ取得部42の機能構成を示すブロック図である。   FIG. 12 is a block diagram illustrating a functional configuration of the flash correction data acquisition unit 42 according to the second embodiment.

本実施形態のフラッシュ補正データ取得部42は、第1の色比データ取得部53及び第1の補正データ算出部54を有する。第1の色比データ取得部53は、フラッシュ画像成分データD3から、複数の処理ブロックの各々におけるフラッシュ画像成分データD3の色成分比を表す色比データD7を取得する。第1の補正データ算出部54は、フラッシュ画像成分データD3の色比データD7に基づいて、被写体の色に応じてもたらされるフラッシュ画像成分データD3の複数の処理ブロック間における明度の相違を反映したフラッシュ補正データD4を取得する。   The flash correction data acquisition unit 42 according to the present embodiment includes a first color ratio data acquisition unit 53 and a first correction data calculation unit 54. The first color ratio data acquisition unit 53 acquires color ratio data D7 representing the color component ratio of the flash image component data D3 in each of the plurality of processing blocks from the flash image component data D3. Based on the color ratio data D7 of the flash image component data D3, the first correction data calculation unit 54 reflects the difference in lightness among the plurality of processing blocks of the flash image component data D3 that is generated according to the color of the subject. Flash correction data D4 is acquired.

図13は、第1の色比データ取得部53の機能構成を示すブロック図である。本例の第1の色比データ取得部53は、第1のデモザイク処理部56及び第1の色比算出部57を有する。   FIG. 13 is a block diagram illustrating a functional configuration of the first color ratio data acquisition unit 53. The first color ratio data acquisition unit 53 of this example includes a first demosaic processing unit 56 and a first color ratio calculation unit 57.

第1のデモザイク処理部56は、フラッシュ画像成分データD3のデモザイク処理(同時化処理)を行う。このデモザイク処理によって、フラッシュ画像成分データD3を構成する各画素に対し、撮像素子21のカラーフィルタ16を構成する色(RGB等)の各々に関する画素データが割り当てられた色成分データD8が取得される。   The first demosaic processing unit 56 performs demosaic processing (synchronization processing) on the flash image component data D3. By this demosaic processing, color component data D8 is obtained in which pixel data relating to each color (RGB, etc.) constituting the color filter 16 of the image sensor 21 is assigned to each pixel constituting the flash image component data D3. .

第1の色比算出部57は、この色成分データD8に基づいて、複数の処理ブロックの各々におけるフラッシュ画像成分データD3の色比データD7を取得する。この色比データD7は、フラッシュ画像成分データD3を構成する色成分データD8の色成分比率(RGB比等)を示し、処理ブロック毎に算出される。複数色(RGB等)のカラーフィルタ16を含む撮像素子21によって取得されるフラッシュ発光画像データ(第1の画像データ)D1から導き出されるフラッシュ画像成分データD3は、カラーフィルタ16を構成する複数色(RGB等)の各々に関する色成分データD8を含む。第1の色比データ取得部53(フラッシュ補正データ取得部42)の第1の色比算出部57は、この色成分データD8に基づいて、複数の処理ブロックの各々におけるフラッシュ画像成分データD3の色比データD7を取得する。   The first color ratio calculation unit 57 acquires the color ratio data D7 of the flash image component data D3 in each of the plurality of processing blocks based on the color component data D8. The color ratio data D7 indicates the color component ratio (RGB ratio, etc.) of the color component data D8 constituting the flash image component data D3, and is calculated for each processing block. The flash image component data D3 derived from the flash emission image data (first image data) D1 acquired by the imaging device 21 including the color filters 16 of a plurality of colors (RGB, etc.) RGB color component data D8. The first color ratio calculation unit 57 of the first color ratio data acquisition unit 53 (flash correction data acquisition unit 42), based on the color component data D8, stores the flash image component data D3 in each of the plurality of processing blocks. Color ratio data D7 is acquired.

なおフラッシュ画像成分データD3の色比データD7は、複数の処理ブロックの各々におけるフラッシュ画像成分データD3の複数色の色成分データD8の合計に対する、その複数色の各々に関するフラッシュ画像成分データD3の色成分データD8の比に基づいている。例えばフラッシュ画像成分データD3がRGBの色成分データD8によって構成され、各処理ブロックが単一画素によって構成され、第1のデモザイク処理部56におけるデモザイク処理によってフラッシュ画像成分データD3の各画素がRGBの各々の色成分データD8を持つ場合について考察する。この場合、フラッシュ画像成分データD3の「ある画素」におけるRGBの色成分データD8の値の比が例えば「R:G:B=1:2:3」であるケースでは、この画素に関する色比データD7は、「R:G:B=1/(1+2+3):2/(1+2+3):3/(1+2+3)」であり、これが直接的又は間接的に示すデータとなる。   The color ratio data D7 of the flash image component data D3 is the color of the flash image component data D3 for each of the plurality of colors with respect to the sum of the color component data D8 of the plurality of colors of the flash image component data D3 in each of the plurality of processing blocks. Based on the ratio of component data D8. For example, the flash image component data D3 is configured by RGB color component data D8, each processing block is configured by a single pixel, and each pixel of the flash image component data D3 is RGB by demosaic processing in the first demosaic processing unit 56. Consider the case of having each color component data D8. In this case, in the case where the ratio of the RGB color component data D8 in the “certain pixel” of the flash image component data D3 is, for example, “R: G: B = 1: 2: 3”, the color ratio data regarding this pixel. D7 is “R: G: B = 1 / (1 + 2 + 3): 2 / (1 + 2 + 3): 3 / (1 + 2 + 3)”, and this is data directly or indirectly.

なお上述の例では、第1のデモザイク処理部56によってフラッシュ画像成分データD3のデモザイク処理が行われるが、フラッシュ画像成分取得部40が「デモザイク処理されたフラッシュ発光画像データD1及びフラッシュ非発光画像データD2」を取得する構成としてもよい。すなわちフラッシュ画像成分取得部40に入力される前の段階でフラッシュ発光画像データD1とフラッシュ非発光画像データD2とがデモザイク処理されていてもよい。また上述の例では、第1のデモザイク処理部56によってフラッシュ画像成分データD3のデモザイク処理が行われるが、処理ブロックが複数画素によって構成される場合には第1のデモザイク処理部56(デモザイク処理)が省略されてもよい。第1のデモザイク処理部56が省略される場合には、各処理ブロックに含まれる複数の画素に関する色成分データD8から各処理ブロックにおける色比データD7が取得可能である。   In the above example, the demosaic process of the flash image component data D3 is performed by the first demosaic processing unit 56, but the flash image component acquisition unit 40 performs the “desiccated flash emission image data D1 and flash non-emission image data”. It is good also as a structure which acquires "D2". That is, the flash emission image data D1 and the flash non-emission image data D2 may be demosaiced before being input to the flash image component acquisition unit 40. In the above-described example, the demosaic process of the flash image component data D3 is performed by the first demosaic processing unit 56. However, when the processing block includes a plurality of pixels, the first demosaic processing unit 56 (demosaic processing) May be omitted. When the first demosaic processing unit 56 is omitted, the color ratio data D7 in each processing block can be acquired from the color component data D8 related to a plurality of pixels included in each processing block.

例えば各処理ブロックがベイヤー配列の基本配列パターンに対応する2画素×2画素によって構成される場合、図11(a)の「R」で表される画素のデータ(画素データ)を各処理ブロックのRの色成分データD8として扱い、図11(a)の「B」で表される画素のデータを各処理ブロックのBの色成分データD8として扱い、図11(a)の「G1」及び「G2」で表される2画素のデータから各処理ブロックのGの色成分データD8を取得してもよい。また処理ブロックがX−Transタイプの基本配列パターンに対応する6画素×6画素によって構成される場合、図11(b)の「R1」〜「R8」で表される8画素のデータから各処理ブロックのRの色成分データD8を取得し、図11(b)の「B1」〜「B8」で表される8画素のデータから各処理ブロックのBの色成分データD8を取得し、図11(b)の「G1」〜「G20」で表される20画素のデータから各処理ブロックのGの色成分データD8を取得してもよい。複数の画素のデータから各処理ブロックにおける単色の色成分データD8を求める手法は特に限定されず、例えば、その単色に関する複数の画素のデータの「平均値」を単色の色成分データD8として設定してもよい。したがって図11(a)に示す例では、「G1」及び「G2」で表される2画素のデータの平均値を、各処理ブロックのGの色成分データD8に設定してもよい。同様に図11(b)に示す例では、「R1」〜「R8」で表される8画素のデータの平均値を各処理ブロックのRの色成分データD8に設定し、「B1」〜「B8」で表される8画素のデータの平均値を各処理ブロックのBの色成分データD8に設定し、「G1」〜「G20」で表される20画素のデータの平均値を各処理ブロックのGの色成分データD8に設定してもよい。   For example, when each processing block is configured by 2 pixels × 2 pixels corresponding to the basic array pattern of the Bayer array, pixel data (pixel data) represented by “R” in FIG. Treated as R color component data D8, pixel data represented by “B” in FIG. 11A is treated as B color component data D8 in each processing block, and “G1” and “G1” in FIG. The G color component data D8 of each processing block may be acquired from the data of two pixels represented by “G2”. When the processing block is composed of 6 pixels × 6 pixels corresponding to the X-Trans type basic array pattern, each process is performed from the data of 8 pixels represented by “R1” to “R8” in FIG. The R color component data D8 of the block is acquired, and the B color component data D8 of each processing block is acquired from the 8 pixel data represented by “B1” to “B8” in FIG. The G color component data D8 of each processing block may be acquired from the 20-pixel data represented by “G1” to “G20” in (b). The method for obtaining the single color component data D8 in each processing block from the data of a plurality of pixels is not particularly limited. For example, the “average value” of the data of a plurality of pixels related to the single color is set as the single color component data D8. May be. Therefore, in the example shown in FIG. 11A, the average value of the data of two pixels represented by “G1” and “G2” may be set in the G color component data D8 of each processing block. Similarly, in the example shown in FIG. 11B, the average value of the data of 8 pixels represented by “R1” to “R8” is set in the R color component data D8 of each processing block, and “B1” to “B”. The average value of the 8-pixel data represented by “B8” is set in the B color component data D8 of each processing block, and the average value of the 20-pixel data represented by “G1” to “G20” is set for each processing block. The G color component data D8 may be set.

図14は、第1の補正データ算出部54の機能構成を示すブロック図である。本例の第1の補正データ算出部54は、第1の明度指標データ取得部59及び第1の補正データ演算処理部60を有する。   FIG. 14 is a block diagram illustrating a functional configuration of the first correction data calculation unit 54. The first correction data calculation unit 54 of this example includes a first brightness index data acquisition unit 59 and a first correction data calculation processing unit 60.

第1の明度指標データ取得部59は、色比データD7から明度指標データD9を取得する。すなわち第1の明度指標データ取得部59(フラッシュ補正データ取得部42)は、「被写体の色に応じたフラッシュ画像成分データD3の明度を示す明度指標データD9をフラッシュ画像成分データD3の色比データD7から導き出す演算処理」に基づいて、複数の処理ブロックの各々におけるフラッシュ画像成分データD3の色比データD7から、複数の処理ブロックの各々におけるフラッシュ画像成分データD3の明度指標データD9を取得する。   The first brightness index data acquisition unit 59 acquires brightness index data D9 from the color ratio data D7. That is, the first lightness index data acquisition unit 59 (flash correction data acquisition unit 42) “uses the lightness index data D9 indicating the lightness of the flash image component data D3 according to the color of the subject to the color ratio data of the flash image component data D3. Based on the “calculation process derived from D7”, the lightness index data D9 of the flash image component data D3 in each of the plurality of processing blocks is acquired from the color ratio data D7 of the flash image component data D3 in each of the plurality of processing blocks.

第1の補正データ演算処理部60は、明度指標データD9からフラッシュ補正データD4を取得する。特に本実施形態の第1の補正データ演算処理部60(フラッシュ補正データ取得部42)は、無彩色の色比データを基準に、複数の処理ブロックの各々に関するフラッシュ補正データD4を取得する。すなわち第1の補正データ演算処理部60(フラッシュ補正データ取得部42)は、複数の処理ブロックの各々における複数色の色成分データの合計に対する複数色の各々に関する色成分データの比が相互に等しい無彩色の色比データから、無彩色に関する明度指標データを演算処理に基づいて取得する。そして第1の補正データ演算処理部60(フラッシュ補正データ取得部42)は、無彩色に関する明度指標データに対する複数の処理ブロックの各々におけるフラッシュ画像成分データD3の明度指標データD9の比に基づいて、フラッシュ画像成分データD3の複数の処理ブロックの各々に関するフラッシュ補正データD4を取得する。   The first correction data calculation processing unit 60 acquires the flash correction data D4 from the lightness index data D9. In particular, the first correction data calculation processing unit 60 (flash correction data acquisition unit 42) of the present embodiment acquires flash correction data D4 related to each of a plurality of processing blocks based on achromatic color ratio data. That is, in the first correction data calculation processing unit 60 (flash correction data acquisition unit 42), the ratio of the color component data for each of the plurality of colors to the sum of the color component data of the plurality of colors in each of the plurality of processing blocks is mutually equal. Lightness index data related to the achromatic color is acquired from the color ratio data of the achromatic color based on the arithmetic processing. Then, the first correction data calculation processing unit 60 (flash correction data acquisition unit 42) is based on the ratio of the lightness index data D9 of the flash image component data D3 in each of the plurality of processing blocks to the lightness index data regarding the achromatic color. Flash correction data D4 relating to each of the plurality of processing blocks of the flash image component data D3 is acquired.

ここで明度指標データD9を取得するために使用される上記の「演算処理」は、明度を直接的又は間接的に示す明度指標データD9を導出する処理であれば特に限定されず、例えば「輝度値」の算出に使用される演算処理が用いられてもよい。したがって、「輝度値(Y)」の算出に用いられる例えば「Y=0.3*R+0.6*G+0.1*B」で表される式に基づいて、明度指標データD9が算出されてもよい。この式を用いて演算処理を行うと、例えばフラッシュ画像成分データD3の「ある処理ブロック」における色比データD7が「R:G:B=1/(1+2+3):2/(1+2+3):3/(1+2+3)(=1:2:3)」を示すデータの場合、その処理ブロックの明度指標データD9を例えば「D9=0.3*1/(1+2+3)+0.6*2/(1+2+3)+0.1*3/(1+2+3)=0.3/6+1.2/6+0.3/6=1.8/6=0.9/3」に設定することができる。この場合、無彩色の色比データは、RGBの各々に関する色成分データが相互に等しいことから、常に「R:G:B=1/3:1/3:1/3(=1:1:1)」を示すデータとなる。したがって上記の式を用いて求められる無彩色の明度指標データD9は「D9=0.3*1/3+0.6*1/3+0.1*1/3=0.3/3+0.6/3+0.1/3=1.0/3」となる。この場合、第1の補正データ演算処理部60で求められるフラッシュ補正データD4は、無彩色の明度指標データD9(=1.0/3)に対するその処理ブロックにおけるフラッシュ画像成分データD3の明度指標データD9(=0.9/3)の比(=(0.9/3)/(1.0/3))に基づいて取得され、例えばその比の逆数(=1.0/0.9)をフラッシュ補正データD4としうる。なお、明度指標データD9として、CIE XYZ表色系(色空間)でのY(輝度)やCIE L*a*b*表色系(色空間)でのL*(明度)を使うこともできる。   The “calculation process” used to acquire the brightness index data D9 is not particularly limited as long as it is a process for deriving the brightness index data D9 that directly or indirectly indicates the brightness. An arithmetic process used to calculate “value” may be used. Therefore, even if the lightness index data D9 is calculated based on an expression represented by, for example, “Y = 0.3 * R + 0.6 * G + 0.1 * B”, which is used for calculating “luminance value (Y)”. Good. When arithmetic processing is performed using this equation, for example, the color ratio data D7 in “a certain processing block” of the flash image component data D3 is “R: G: B = 1 / (1 + 2 + 3): 2 // (1 + 2 + 3): 3 / In the case of data indicating (1 + 2 + 3) (= 1: 2: 3), the brightness index data D9 of the processing block is, for example, “D9 = 0.3 * 1 / (1 + 2 + 3) + 0.6 * 2 / (1 + 2 + 3) +0 1 * 3 / (1 + 2 + 3) = 0.3 / 6 + 1.2 / 6 + 0.3 / 6 = 1.8 / 6 = 0.9 / 3 ”. In this case, the color ratio data of achromatic colors is always “R: G: B = 1/3: 1/3: 1/3” (= 1: 1: 1) because the color component data for each of RGB is equal to each other. 1) ". Therefore, the achromatic lightness index data D9 obtained using the above formula is “D9 = 0.3 * 1/3 + 0.6 * 1/3 + 0.1 * 1/3 = 0.3 / 3 + 0.6 / 3 + 0. 1/3 = 1.0 / 3 ”. In this case, the flash correction data D4 obtained by the first correction data calculation processing unit 60 is the lightness index data of the flash image component data D3 in the processing block for the achromatic color lightness index data D9 (= 1.0 / 3). Obtained based on the ratio of D9 (= 0.9 / 3) (= (0.9 / 3) / (1.0 / 3)), for example, the reciprocal of the ratio (= 1.0 / 0.9) Can be used as the flash correction data D4. Note that Y (luminance) in the CIE XYZ color system (color space) and L * (lightness) in the CIE L * a * b * color system (color space) can also be used as the lightness index data D9. .

フラッシュ明度補正部44(図5参照)は、上述のようにして取得される「フラッシュ画像成分取得部40(第1の抽出データ調整部49)から出力されるフラッシュ画像成分データD3」と「フラッシュ補正データ取得部42(第1の補正データ演算処理部60)から出力されるフラッシュ補正データD4」とに基づいて、フラッシュ画像補正成分データD5を取得する。なお、フラッシュ画像補正成分データD5の具体的な取得手法の詳細については、後述の第3実施形態において説明する。   The flash brightness correction unit 44 (see FIG. 5) acquires “flash image component data D3 output from the flash image component acquisition unit 40 (first extraction data adjustment unit 49)” and “flash” acquired as described above. The flash image correction component data D5 is acquired based on the flash correction data D4 output from the correction data acquisition unit 42 (first correction data calculation processing unit 60). Note that details of a specific method for acquiring the flash image correction component data D5 will be described in a third embodiment to be described later.

図15は、第2実施形態に係るホワイトバランス処理のフローチャートである。   FIG. 15 is a flowchart of white balance processing according to the second embodiment.

上述のように、本実施形態のホワイトバランス処理は第1実施形態のホワイトバランス処理の一態様である。したがって、図15に示すステップS21は第1実施形態に係る図6のステップS11に対応し、図15に示すステップS22及びステップS23は図6のステップS12に対応し、図15に示すステップS24〜ステップS26は図6のステップS13に対応し、図15に示すステップS27は図6のステップS14に対応し、図15に示すステップS28は図6のステップS15に対応する。   As described above, the white balance process of this embodiment is an aspect of the white balance process of the first embodiment. Therefore, step S21 shown in FIG. 15 corresponds to step S11 of FIG. 6 according to the first embodiment, step S22 and step S23 shown in FIG. 15 correspond to step S12 of FIG. 6, and steps S24 to S24 shown in FIG. Step S26 corresponds to step S13 in FIG. 6, step S27 shown in FIG. 15 corresponds to step S14 in FIG. 6, and step S28 shown in FIG. 15 corresponds to step S15 in FIG.

すなわち本実施形態では、フラッシュ画像成分取得部40の第1の画像データ抽出部47において、フラッシュ発光画像データD1及びフラッシュ非発光画像データD2が取得され(図15のS21)、これらのフラッシュ発光画像データD1及びフラッシュ非発光画像データD2に基づいて第1の差分データD6が取得される(S22)。   In other words, in the present embodiment, the first image data extraction unit 47 of the flash image component acquisition unit 40 acquires the flash emission image data D1 and the flash non-emission image data D2 (S21 in FIG. 15), and these flash emission images. First difference data D6 is acquired based on data D1 and flash non-light-emitting image data D2 (S22).

そしてフラッシュ画像成分取得部40の第1の抽出データ調整部49において、第1の差分データD6にフラッシュ光用ホワイトバランスゲインWB1が適用されてフラッシュ画像成分データD3が取得される(S23)。   Then, the first extracted data adjustment unit 49 of the flash image component acquisition unit 40 applies the flash light white balance gain WB1 to the first difference data D6 to acquire the flash image component data D3 (S23).

そしてフラッシュ補正データ取得部42の第1の色比データ取得部53において、第1のデモザイク処理部56によりフラッシュ画像成分データD3から各処理ブロックに関する色成分データD8が取得され、第1の色比算出部57により色成分データD8から各処理ブロックに関する色比データD7が取得される(S24)。   In the first color ratio data acquisition unit 53 of the flash correction data acquisition unit 42, the first demosaic processing unit 56 acquires the color component data D8 related to each processing block from the flash image component data D3, and the first color ratio. The calculation unit 57 acquires the color ratio data D7 relating to each processing block from the color component data D8 (S24).

そしてフラッシュ補正データ取得部42の第1の補正データ算出部54において、第1の明度指標データ取得部59により色比データD7から各処理ブロックに関する明度指標データD9が取得され(S25)、第1の補正データ演算処理部60により明度指標データD9から各処理ブロックに関するフラッシュ補正データD4が取得される(S26)。   Then, in the first correction data calculation unit 54 of the flash correction data acquisition unit 42, the first lightness index data acquisition unit 59 acquires the lightness index data D9 related to each processing block from the color ratio data D7 (S25). The correction data calculation processing unit 60 acquires the flash correction data D4 for each processing block from the brightness index data D9 (S26).

そしてフラッシュ明度補正部44において、フラッシュ画像成分データD3及びフラッシュ補正データD4からフラッシュ画像補正成分データD5が取得され(S27)、ホワイトバランス処理部46において、フラッシュ画像補正成分データD5に応じたホワイトバランス処理がフラッシュ発光画像データD1に対して行われる(S28)。   Then, the flash brightness correction unit 44 obtains flash image correction component data D5 from the flash image component data D3 and the flash correction data D4 (S27), and the white balance processing unit 46 performs white balance corresponding to the flash image correction component data D5. The process is performed on the flash emission image data D1 (S28).

以上説明したように本実施形態の画像処理装置31及び画像処理方法によれば、第1実施形態に係る画像処理装置31と同様に、被写体の色に応じてもたらされるフラッシュ画像成分データの明度(輝度)の相違を補償するためのフラッシュ補正データに基づいて、精度の高いホワイトバランス処理を実現することができる。   As described above, according to the image processing device 31 and the image processing method of the present embodiment, as with the image processing device 31 according to the first embodiment, the lightness of the flash image component data (corresponding to the color of the subject) ( A highly accurate white balance process can be realized based on the flash correction data for compensating for the difference in luminance.

<第3実施形態>
本実施形態において、上述の第2実施形態と同一又は類似の構成には同一の符号を付し、その詳細な説明を省略する。
<Third Embodiment>
In the present embodiment, the same or similar components as those in the second embodiment described above are denoted by the same reference numerals, and detailed description thereof is omitted.

本実施形態の画像処理装置31は、第2実施形態の画像処理装置31の一態様であり、フラッシュ画像成分データD3の明度(輝度)を示すデータに対してフラッシュ補正データD4が処理ブロック毎に適用されることでフラッシュ画像補正成分データD5が取得される。すなわち本実施形態に係る画像処理装置31は、図5に示す第1実施形態の画像処理装置31及び第2実施形態の画像処理装置31と同様に、フラッシュ画像成分取得部40、フラッシュ補正データ取得部42、フラッシュ明度補正部44及びホワイトバランス処理部46を備えるが、とりわけフラッシュ明度補正部44が以下の具体的構成を有する。   The image processing apparatus 31 according to the present embodiment is an aspect of the image processing apparatus 31 according to the second embodiment, and the flash correction data D4 is provided for each processing block with respect to data indicating the brightness (luminance) of the flash image component data D3. As a result, flash image correction component data D5 is acquired. That is, the image processing apparatus 31 according to the present embodiment is similar to the image processing apparatus 31 according to the first embodiment and the image processing apparatus 31 according to the second embodiment shown in FIG. Unit 42, flash brightness correction unit 44, and white balance processing unit 46. In particular, the flash brightness correction unit 44 has the following specific configuration.

図16は、第3実施形態に係るフラッシュ明度補正部44の機能構成を示すブロック図である。   FIG. 16 is a block diagram illustrating a functional configuration of the flash brightness correction unit 44 according to the third embodiment.

本実施形態のフラッシュ明度補正部44は、第1の明度データ取得部62及び第1の補正算出部63を有する。   The flash brightness correction unit 44 of the present embodiment includes a first brightness data acquisition unit 62 and a first correction calculation unit 63.

フラッシュ明度補正部44の第1の明度データ取得部62は、フラッシュ画像成分取得部40から送られるフラッシュ画像成分データD3に基づいて、複数の処理ブロックの各々における第1の明度データD10を取得する。本実施形態における第1の明度データD10は輝度を表すデータであり、任意の手法によって第1の明度データ(輝度フラッシュ影響度マップ)D10が求められてもよい。すなわち第1の明度データ取得部62は、フラッシュ画像成分データD3の色成分データ(RGBデータ等)を輝度に変換して第1の明度データD10を取得する。例えば図14に示す第1の明度指標データ取得部59(フラッシュ補正データ取得部42、第1の補正データ算出部54)において明度指標データD9を取得するために使用される「演算処理(例えば「Y=0.3*R+0.6*G+0.1*B」)」と同様にして、フラッシュ画像成分データD3から第1の明度データD10(輝度値(Y))を算出することができる。   The first brightness data acquisition unit 62 of the flash brightness correction unit 44 acquires the first brightness data D10 in each of the plurality of processing blocks based on the flash image component data D3 sent from the flash image component acquisition unit 40. . The first lightness data D10 in the present embodiment is data representing luminance, and the first lightness data (luminance flash influence map) D10 may be obtained by any method. That is, the first lightness data acquisition unit 62 converts the color component data (RGB data or the like) of the flash image component data D3 into luminance and acquires the first lightness data D10. For example, a “calculation process (for example,“ ”) used to acquire the brightness index data D9 in the first brightness index data acquisition unit 59 (flash correction data acquisition unit 42, first correction data calculation unit 54) shown in FIG. Y = 0.3 * R + 0.6 * G + 0.1 * B ")"), the first brightness data D10 (luminance value (Y)) can be calculated from the flash image component data D3.

フラッシュ明度補正部44の第1の補正算出部63は、複数の処理ブロックの各々に関して第1の明度データD10にフラッシュ補正データD4を適用することで、フラッシュ画像補正成分データD5を取得する。より具体的には、本実施形態のフラッシュ補正データ取得部42において取得されるフラッシュ補正データD4は、フラッシュ画像成分データD3の明度を示す第1の明度データD10に適用されることで、被写体の色に応じてもたらされるフラッシュ画像成分データD3(第1の明度データD10)の明度の相違を補償するデータである。フラッシュ補正データ取得部42は、フラッシュ画像成分データD3の複数の処理ブロックの各々に関し、そのようなフラッシュ補正データD4を取得する。   The first correction calculation unit 63 of the flash brightness correction unit 44 acquires the flash image correction component data D5 by applying the flash correction data D4 to the first brightness data D10 for each of the plurality of processing blocks. More specifically, the flash correction data D4 acquired by the flash correction data acquisition unit 42 of the present embodiment is applied to the first lightness data D10 indicating the lightness of the flash image component data D3. This is data for compensating for the difference in lightness of the flash image component data D3 (first lightness data D10) brought about according to the color. The flash correction data acquisition unit 42 acquires such flash correction data D4 for each of the plurality of processing blocks of the flash image component data D3.

例えば、処理ブロック毎に、第1の明度データD10にフラッシュ補正データD4を乗算することで、被写体の色に応じてもたらされる明度の相違が補償されたフラッシュ画像補正成分データD5が算出されるようにしてもよい。この場合、フラッシュ補正データ取得部42(第1の補正データ演算処理部60(図14参照))は、「無彩色の明度指標データD9に対するフラッシュ画像成分データD3の明度指標データD9の比の逆数」をフラッシュ補正データD4として取得することができる。例えば、上述のように無彩色の明度指標データD9が「D9=1.0/3」で表され、ある処理ブロックにおけるフラッシュ画像成分データD3の明度指標データD9が「D9=0.9/3」で表される場合、「無彩色の明度指標データD9に対するフラッシュ画像成分データD3の明度指標データD9の比」は「(0.9/3)/(1.0/3)=0.9」によって表されるため、フラッシュ補正データD4を「D4=1.0/0.9」とすることができる。この場合、フラッシュ画像補正成分データD5は、第1の明度データD10に「1.0/0.9」が乗算された値によって表されうる。   For example, by multiplying the first brightness data D10 by the flash correction data D4 for each processing block, the flash image correction component data D5 in which the difference in brightness caused by the color of the subject is compensated is calculated. It may be. In this case, the flash correction data acquisition unit 42 (the first correction data calculation processing unit 60 (see FIG. 14)) “reciprocal of the ratio of the lightness index data D9 of the flash image component data D3 to the lightness index data D9 of achromatic color. Can be acquired as the flash correction data D4. For example, as described above, the lightness index data D9 of the achromatic color is expressed by “D9 = 1.0 / 3”, and the lightness index data D9 of the flash image component data D3 in a certain processing block is “D9 = 0.9 / 3”. "The ratio of the lightness index data D9 of the flash image component data D3 to the achromatic color lightness index data D9" is "(0.9 / 3) / (1.0 / 3) = 0.9." The flash correction data D4 can be set to “D4 = 1.0 / 0.9”. In this case, the flash image correction component data D5 can be represented by a value obtained by multiplying the first brightness data D10 by “1.0 / 0.9”.

このように、フラッシュ画像成分データD3の輝度(明度)を示す第1の明度データD10にフラッシュ補正データD4を適用することで取得されるフラッシュ画像補正成分データD5は、被写体の色に応じてもたらされるフラッシュ画像成分データD3(第1の明度データD10)の輝度(明度)の相違が補償されたデータとなる。   As described above, the flash image correction component data D5 obtained by applying the flash correction data D4 to the first lightness data D10 indicating the luminance (lightness) of the flash image component data D3 is provided according to the color of the subject. The difference in luminance (lightness) of the flash image component data D3 (first lightness data D10) is compensated.

図17は、第3実施形態に係るホワイトバランス処理のフローチャートである。   FIG. 17 is a flowchart of white balance processing according to the third embodiment.

上述のように、本実施形態のホワイトバランス処理は第2実施形態のホワイトバランス処理の一態様である。例えば図17に示すステップS31〜S36は第2実施形態に係る図15のステップS21〜S26に対応し、図17に示すステップS37及びステップS38は図15のステップS27に対応し、図17に示すステップS39は図15のステップS28に対応する。   As described above, the white balance process of this embodiment is an aspect of the white balance process of the second embodiment. For example, steps S31 to S36 shown in FIG. 17 correspond to steps S21 to S26 of FIG. 15 according to the second embodiment, and steps S37 and S38 shown in FIG. 17 correspond to step S27 of FIG. Step S39 corresponds to step S28 in FIG.

すなわち本実施形態では、図15のステップS21〜ステップS26と同様にして、フラッシュ発光画像データD1及びフラッシュ非発光画像データD2が取得され(図17のS31)、第1の差分データD6が取得され(S32)、フラッシュ画像成分データD3が取得され(S33)、各処理ブロックに関する色比データD7が取得され(S34)、各処理ブロックに関する明度指標データD9が取得され(S35)、各処理ブロックに関するフラッシュ補正データD4が取得される(S36)。   That is, in the present embodiment, the flash emission image data D1 and the flash non-emission image data D2 are acquired (S31 in FIG. 17) and the first difference data D6 is acquired in the same manner as in steps S21 to S26 of FIG. (S32) Flash image component data D3 is acquired (S33), color ratio data D7 related to each processing block is acquired (S34), brightness index data D9 related to each processing block is acquired (S35), and each processing block is related. Flash correction data D4 is acquired (S36).

そしてフラッシュ明度補正部44の第1の明度データ取得部62において、フラッシュ画像成分取得部40が取得したフラッシュ画像成分データD3から、各処理ブロックに関する第1の明度データD10が取得される(S37)。そしてフラッシュ明度補正部44の第1の補正算出部63において、第1の明度データD10及びフラッシュ補正データD4から、フラッシュ画像補正成分データD5が取得される(S38)。   Then, in the first lightness data acquisition unit 62 of the flash lightness correction unit 44, the first lightness data D10 relating to each processing block is acquired from the flash image component data D3 acquired by the flash image component acquisition unit 40 (S37). . Then, in the first correction calculation unit 63 of the flash brightness correction unit 44, flash image correction component data D5 is acquired from the first brightness data D10 and the flash correction data D4 (S38).

そしてホワイトバランス処理部46において、フラッシュ画像補正成分データD5に応じたホワイトバランス処理がフラッシュ発光画像データD1に対して行われる(S39)。例えば「フラッシュ画像補正成分データD5が最大の階調値(最大画像データ値)に対して50%以上の値を示す領域」がフラッシュ領域と判定されてもよく、ホワイトバランス処理部46は、フラッシュ発光画像データD1におけるそのようなフラッシュ領域に対してフラッシュ光用ホワイトバランスゲインWB1を適用してホワイトバランス処理を行ってもよい。   In the white balance processing unit 46, white balance processing corresponding to the flash image correction component data D5 is performed on the flash emission image data D1 (S39). For example, “an area where the flash image correction component data D5 shows a value of 50% or more with respect to the maximum gradation value (maximum image data value)” may be determined as the flash area, and the white balance processing unit 46 may White balance processing may be performed by applying the flash light white balance gain WB1 to such a flash area in the light emission image data D1.

以上説明したように本実施形態の画像処理装置31及び画像処理方法によれば、被写体の色に応じてもたらされるフラッシュ画像成分データの明度(輝度)の相違を補償するためのフラッシュ補正データに基づいてフラッシュ画像補正成分データD5が取得される。このフラッシュ画像補正成分データD5を使うことで、精度の高いホワイトバランス処理を実現することができる。   As described above, according to the image processing apparatus 31 and the image processing method of the present embodiment, based on the flash correction data for compensating for the difference in the brightness (luminance) of the flash image component data caused according to the color of the subject. Thus, flash image correction component data D5 is acquired. By using the flash image correction component data D5, a highly accurate white balance process can be realized.

<第4実施形態>
本実施形態において、上述の第3実施形態と同一又は類似の構成には同一の符号を付し、その詳細な説明を省略する。
<Fourth embodiment>
In the present embodiment, the same reference numerals are given to the same or similar components as those in the third embodiment, and the detailed description thereof is omitted.

上述の第1実施形態〜第3実施形態は主としてフラッシュ光のホワイトバランス調整に関するものであるが、本実施形態はフラッシュ光に加えて環境光のホワイトバランス調整に関するものである。すなわち本実施形態の画像処理装置31は、フラッシュ発光画像データD1におけるフラッシュ光に関する色別の補正処理だけではなく、環境光に関する色別の補正処理を行う。   The first to third embodiments described above mainly relate to white balance adjustment of flash light, but this embodiment relates to white balance adjustment of ambient light in addition to flash light. That is, the image processing apparatus 31 according to the present embodiment performs not only the correction process for each color related to the flash light in the flash emission image data D1, but also the correction process for each color related to the ambient light.

一般に、画像データの撮影光源が不明な場合、画像にグレー(無彩色)の被写体が含まれていなかったり、画像中に含まれる無彩色の被写体の領域(位置)が不明であったりすると、適切なホワイトバランスゲインを取得することが難しい。   In general, if the shooting light source of image data is unknown, it is appropriate if the image does not contain a gray (achromatic) subject or if the region (position) of the achromatic subject contained in the image is unknown. It is difficult to get a good white balance gain.

しかしながら、例えば上述の第2実施形態及び第3実施形態の画像処理装置31における画像処理によれば、撮影時に使用されたフラッシュ光の影響をキャンセルするホワイトバランス処理が施されたフラッシュ画像成分データD3(図9参照)を取得することができる。このフラッシュ画像成分データD3は、フラッシュ光が照射された被写体の本来の色成分比を示すデータである。そのためフラッシュ画像成分データD3を基準(目標)として使用することで、フラッシュ光の影響を受けた画像領域に関しては、本来の被写体の色が無彩色か否かにかかわらず、環境光に関する適切なホワイトバランスゲインを取得することが可能である。   However, for example, according to the image processing in the image processing apparatus 31 of the second embodiment and the third embodiment described above, the flash image component data D3 subjected to the white balance processing for canceling the influence of the flash light used at the time of photographing is performed. (See FIG. 9) can be acquired. The flash image component data D3 is data indicating the original color component ratio of the subject irradiated with flash light. Therefore, by using the flash image component data D3 as a reference (target), for the image area affected by the flash light, an appropriate white light for the ambient light is used regardless of whether the original subject color is an achromatic color or not. It is possible to acquire a balance gain.

環境光用ホワイトバランスゲインを取得することができれば、上述の第2実施形態及び第3実施形態の画像処理装置31における処理と同様の処理によって、被写体の色に応じてもたらされる明度の相違が補償された「環境光の影響を示すデータ(後述の環境光画像補正成分データ)」を取得することも可能になる。このような環境光の影響を示すデータ(環境光画像補正成分データ)を、上述の第2実施形態〜第3実施形態において取得されるフラッシュ画像補正成分データD5と組み合わせて使用することで、フラッシュ発光画像データD1の各処理ブロックに関して環境光とフラッシュ光との影響の比率を求めることができる。この「フラッシュ発光画像データD1の処理ブロック毎の環境光とフラッシュ光との影響の比率」を使ってフラッシュ光用のホワイトバランス処理及び/又は環境光用のホワイトバランス処理を行うことで、高精度なホワイトバランス処理を行うことができる。   If the white balance gain for ambient light can be acquired, the brightness difference caused by the color of the subject is compensated by the same processing as the processing in the image processing apparatus 31 of the second and third embodiments described above. It is also possible to obtain “data indicating the influence of ambient light (environmental light image correction component data described later)”. By using such data indicating the influence of ambient light (environmental light image correction component data) in combination with the flash image correction component data D5 acquired in the second to third embodiments described above, a flash can be obtained. The ratio of the influence of the ambient light and the flash light can be obtained for each processing block of the luminescent image data D1. By using this “ratio of the influence of the ambient light and the flash light for each processing block of the flash emission image data D1”, the white balance processing for the flash light and / or the white balance processing for the environmental light is performed, thereby achieving high accuracy. White balance processing can be performed.

以下、第4実施形態に係る具体的な機能構成例について説明する。   Hereinafter, a specific functional configuration example according to the fourth embodiment will be described.

図18は、第4実施形態に係る画像処理装置31の機能構成を示すブロック図である。本実施形態の画像処理装置31は、上述のフラッシュ画像成分取得部40、フラッシュ補正データ取得部42、フラッシュ明度補正部44及びホワイトバランス処理部46に加え、環境光画像成分取得部66、環境光補正データ取得部68及び環境光明度補正部70を備える。   FIG. 18 is a block diagram illustrating a functional configuration of the image processing apparatus 31 according to the fourth embodiment. The image processing apparatus 31 according to the present embodiment includes an ambient light image component acquisition unit 66, an ambient light, in addition to the flash image component acquisition unit 40, the flash correction data acquisition unit 42, the flash brightness correction unit 44, and the white balance processing unit 46 described above. A correction data acquisition unit 68 and an ambient light brightness correction unit 70 are provided.

フラッシュ画像成分取得部40、フラッシュ補正データ取得部42及びフラッシュ明度補正部44は、上述の第3実施形態と同様の機能構成を有する。   The flash image component acquisition unit 40, the flash correction data acquisition unit 42, and the flash brightness correction unit 44 have the same functional configuration as that of the third embodiment.

環境光画像成分取得部66は、フラッシュ光の非発光下で被写体を撮影することにより取得された第2の画像データ(フラッシュ非発光画像データD2)を基礎データとして、環境光による被写体の画像成分を示す環境光画像成分データD11を取得する。ここで基礎データとは、環境光画像成分データD11を取得する場合に基となるデータであり、環境光による被写体の画像成分を示す環境光画像成分データD11が導出可能であれば特に限定されない。例えば環境光画像成分取得部66は、「第2の画像データ(フラッシュ非発光画像データD2)」自体を基礎データとして用いてもよく、また「第1の画像データ(フラッシュ発光画像データD1)」と、「この第1の画像データと第2の画像データ(フラッシュ非発光画像データD2)との差分を表す第1の差分データ」と、の差分を表す第2の差分データを基礎データとして用いてもよく、このような基礎データ(例えば「第2の画像データ」又は「第2の差分データ」)に基づいて環境光画像成分データD11を導出することができる。   The ambient light image component acquisition unit 66 uses the second image data (flash non-emission image data D2) acquired by photographing the subject under non-flash light as basic data, and the image component of the subject due to ambient light. Ambient light image component data D11 is obtained. Here, the basic data is data used as a basis when acquiring the ambient light image component data D11, and is not particularly limited as long as the ambient light image component data D11 indicating the image component of the subject by the ambient light can be derived. For example, the ambient light image component acquisition unit 66 may use “second image data (flash non-light emission image data D2)” itself as basic data, or “first image data (flash light emission image data D1)”. And “first difference data representing the difference between the first image data and the second image data (flash non-light-emitting image data D2)” and the second difference data representing the difference between the first image data and the second image data (flash non-light-emitting image data D2). Alternatively, the ambient light image component data D11 can be derived based on such basic data (for example, “second image data” or “second difference data”).

図19は、第4実施形態に係る環境光画像成分取得部66の機能構成を示すブロック図である。本実施形態の環境光画像成分取得部66は、第2の画像データ抽出部72及び第2の抽出データ調整部73を有する。   FIG. 19 is a block diagram illustrating a functional configuration of the ambient light image component acquisition unit 66 according to the fourth embodiment. The ambient light image component acquisition unit 66 according to the present embodiment includes a second image data extraction unit 72 and a second extraction data adjustment unit 73.

本例の第2の画像データ抽出部72は、環境光による被写体の画像成分を示す環境光画像成分データの基礎データD14を取得する処理部である。具体的には、例えばフラッシュ光を発光させずに撮影することで取得された「環境光の影響のみを受けたフラッシュ非発光画像データD2」を「環境光画像成分データの基礎データD14」として使用可能であるが、環境光画像成分データの基礎データD14の取得手法はこれに限定されない。   The second image data extraction unit 72 of this example is a processing unit that acquires basic data D14 of ambient light image component data indicating an image component of a subject by ambient light. Specifically, for example, “flash non-emission image data D2 only affected by ambient light” acquired by shooting without flash light is used as “basic data D14 of ambient light image component data”. Although possible, the acquisition method of the basic data D14 of the ambient light image component data is not limited to this.

例えば環境光画像成分取得部66の第2の画像データ抽出部72は、「フラッシュ発光画像データ(第1の画像データ)D1」と、「フラッシュ発光画像データD1とフラッシュ光の非発光下で被写体を撮影することにより取得されたフラッシュ非発光画像データD2(第2の画像データ)との差分を表す第1の差分データD6」と、の差分を表す第2の差分データを「環境光画像成分データの基礎データD14」として使用可能である。図20は、環境光画像成分取得部66の第2の画像データ抽出部72の構成例を示すブロック図である。本例の第2の画像データ抽出部72は、第1の減算器74及び第2の減算器75を有する。第1の減算器74は、フラッシュ発光画像データD1及びフラッシュ非発光画像データD2が入力され、「第1の差分データD6=フラッシュ発光画像データD1−フラッシュ非発光画像データD2」で表される第1の差分データD6を算出する。第2の減算器75は、フラッシュ発光画像データD1及び第1の差分データD6が入力され、「基礎データ(第1のRGB背景影響度マップ)D14=第2の差分データ=フラッシュ発光画像データD1−第1の差分データD6」で表される基礎データD14を算出する。第2の減算器75で算出された基礎データD14は、第2の画像データ抽出部72から第2の抽出データ調整部73に送られる。   For example, the second image data extraction unit 72 of the ambient light image component acquisition unit 66 executes “flash emission image data (first image data) D1” and “flash emission image data D1 and the subject under non-emission of flash light”. The first difference data D6 representing the difference from the flash non-emission image data D2 (second image data) acquired by photographing the image, and the second difference data representing the difference is referred to as “environment light image component” It can be used as basic data D14 ". FIG. 20 is a block diagram illustrating a configuration example of the second image data extraction unit 72 of the ambient light image component acquisition unit 66. The second image data extraction unit 72 of this example includes a first subtracter 74 and a second subtracter 75. The first subtracter 74 receives the flash light emission image data D1 and the flash non-light emission image data D2, and is represented by “first difference data D6 = flash light emission image data D1−flash non-light emission image data D2”. 1 difference data D6 is calculated. The second subtractor 75 is input with the flash emission image data D1 and the first difference data D6, and “basic data (first RGB background influence map) D14 = second difference data = flash emission image data D1. -Calculate basic data D14 represented by "first difference data D6". The basic data D14 calculated by the second subtractor 75 is sent from the second image data extraction unit 72 to the second extraction data adjustment unit 73.

図21は、環境光画像成分取得部66の第2の抽出データ調整部73の構成例を示すブロック図である。本実施形態の第2の抽出データ調整部73は、基礎データ色比取得部76、ホワイトバランスゲイン取得部77及び第2のホワイトバランス調整部78を有する。   FIG. 21 is a block diagram illustrating a configuration example of the second extraction data adjustment unit 73 of the ambient light image component acquisition unit 66. The second extracted data adjustment unit 73 of this embodiment includes a basic data color ratio acquisition unit 76, a white balance gain acquisition unit 77, and a second white balance adjustment unit 78.

基礎データ色比取得部76(環境光画像成分取得部66)は、複数の処理ブロックの各々における基礎データD14の色成分比を表す色比データD15を取得する。   The basic data color ratio acquisition unit 76 (ambient light image component acquisition unit 66) acquires color ratio data D15 representing the color component ratio of the basic data D14 in each of the plurality of processing blocks.

ホワイトバランスゲイン取得部77(環境光画像成分取得部66)は、複数の処理ブロックの各々におけるフラッシュ画像成分データD3の色比データD7と基礎データD14の色比データD15とに基づいて、環境光用ホワイトバランスゲインWB2を取得する。図21に示す例では、ホワイトバランスゲイン取得部77は、フラッシュ画像成分取得部40からフラッシュ画像成分データD3を取得し、上述の第1の色比データ取得部53(図12参照)と同様の処理を行うことで、複数の処理ブロックの各々におけるフラッシュ画像成分データD3の色比データD7を取得する。ただしホワイトバランスゲイン取得部77は、フラッシュ補正データ取得部42の第1の色比データ取得部53から、フラッシュ画像成分データD3の色比データD7を取得してもよい。   The white balance gain acquisition unit 77 (environmental light image component acquisition unit 66) is based on the color ratio data D7 of the flash image component data D3 and the color ratio data D15 of the basic data D14 in each of the plurality of processing blocks. A white balance gain WB2 is acquired. In the example shown in FIG. 21, the white balance gain acquisition unit 77 acquires the flash image component data D3 from the flash image component acquisition unit 40, and is the same as the first color ratio data acquisition unit 53 (see FIG. 12). By performing the processing, the color ratio data D7 of the flash image component data D3 in each of the plurality of processing blocks is acquired. However, the white balance gain acquisition unit 77 may acquire the color ratio data D7 of the flash image component data D3 from the first color ratio data acquisition unit 53 of the flash correction data acquisition unit 42.

フラッシュ画像成分データD3は、フラッシュ光用ホワイトバランスゲインWB1が適用されて被写体の本来の色調が再現されたデータであり、その「被写体の本来の色調」は、被写体にフラッシュ光が照射されて撮影される場合も、被写体に環境光のみが照射されて撮影される場合も変わらず同じである。したがって、ホワイトバランスゲイン取得部77は、同じ処理ブロックに関しては、基礎データD14の色比データD15に環境光用ホワイトバランスゲインWB2を適用して得られるデータが、フラッシュ画像成分データD3の色比データD7と等しくなるように、環境光用ホワイトバランスゲインWB2を取得する。   The flash image component data D3 is data in which the original color tone of the subject is reproduced by applying the white balance gain WB1 for flash light, and the “original color tone of the subject” is obtained by irradiating the subject with flash light. The same applies to the case where the subject is photographed with only the ambient light irradiated. Accordingly, for the same processing block, the white balance gain acquisition unit 77 applies the ambient light white balance gain WB2 to the color ratio data D15 of the basic data D14 to obtain the color ratio data of the flash image component data D3. The ambient light white balance gain WB2 is acquired so as to be equal to D7.

なお、フラッシュ画像成分データD3を構成する複数の処理ブロックのうち「フラッシュ光の影響を受けておらず環境光のみの影響を受けている処理ブロック」のデータは、「被写体の本来の色調」が再現されたデータではない。そのため、ホワイトバランスゲイン取得部77は、環境光用ホワイトバランスゲインWB2を取得する際には、フラッシュ画像成分データD3の色比データD7のうち「環境光のみの影響を受けている処理ブロック」のデータは使わず、「フラッシュ光の影響を受けている処理ブロック」のデータを使って環境光用ホワイトバランスゲインWB2を取得する。   Of the plurality of processing blocks constituting the flash image component data D3, the data of “processing block that is not affected by flash light but affected only by ambient light” has “original color tone of subject”. It is not reproduced data. Therefore, when the white balance gain acquisition unit 77 acquires the ambient light white balance gain WB2, among the color ratio data D7 of the flash image component data D3, the “processing block affected by only ambient light” is selected. The data is not used, and the ambient light white balance gain WB2 is acquired using the data of the “processing block affected by the flash light”.

このように「被写体の本来の色調」を表すフラッシュ画像成分データD3の色比データD7を目標データに設定して取得される環境光用ホワイトバランスゲインWB2は、複数の処理ブロックの各々における基礎データD14の色比データD15に適用されると、複数の処理ブロックの各々における環境光画像成分データD11の色比データが導き出される。そのため第2のホワイトバランス調整部78(環境光画像成分取得部66)は、基礎データD14に環境光用ホワイトバランスゲインWB2を適用することで環境光画像成分データ(第2のRGB背景影響度マップ)D11を取得する。   As described above, the ambient light white balance gain WB2 obtained by setting the color ratio data D7 of the flash image component data D3 representing the “original color tone of the subject” as the target data is the basic data in each of the plurality of processing blocks. When applied to the color ratio data D15 of D14, the color ratio data of the ambient light image component data D11 in each of the plurality of processing blocks is derived. Therefore, the second white balance adjustment unit 78 (environmental light image component acquisition unit 66) applies the environmental light white balance gain WB2 to the basic data D14 to thereby obtain the environmental light image component data (second RGB background influence map). ) Get D11.

なお、被写体によっては環境光画像成分データD11が多少ばらつくことがあるため、複数の処理ブロックに関して取得された環境光用ホワイトバランスゲインWB2の合計の平均値を、各処理ブロックに関する基礎データD14に適用する環境光用ホワイトバランスゲインWB2として用いてもよい。ただし、環境光が単一光源によっては構成されずに複数の光源がミックスされて構成されている場合や、被写体に動体が含まれている場合のように、処理ブロック毎(画素毎)に導き出される環境光用ホワイトバランスゲインWB2を、対応の処理ブロックの基礎データD14に対して適用した方が画質を向上させることができる場合もある。したがって、基礎データD14の処理ブロックの全てに対して、一律に、同一の環境光用ホワイトバランスゲインWB2を適用する必要はない。   Since the ambient light image component data D11 may vary somewhat depending on the subject, the total average value of the ambient light white balance gains WB2 obtained for a plurality of processing blocks is applied to the basic data D14 for each processing block. The ambient light white balance gain WB2 may be used. However, the ambient light is not composed of a single light source, but is derived for each processing block (for each pixel), such as when a plurality of light sources are mixed or when a moving object is included in the subject. If the ambient light white balance gain WB2 is applied to the basic data D14 of the corresponding processing block, the image quality may be improved. Therefore, it is not necessary to apply the same ambient light white balance gain WB2 uniformly to all the processing blocks of the basic data D14.

このようにして求められる環境光画像成分データD11は、フラッシュ光の影響を受けていない「環境光の影響を示す撮影画像データ」である。   The ambient light image component data D11 obtained in this way is “captured image data indicating the influence of ambient light” that is not affected by the flash light.

なお環境光画像成分取得部66(第2の画像データ抽出部72)は、フラッシュ非発光画像データD2ではなくフラッシュ発光画像データを使用して第1の差分データD6及び基礎データD14を取得してもよい。すなわち環境光画像成分取得部66は、「第1の発光量のフラッシュ光の発光下で被写体を撮影することにより取得された第1の画像データ(フラッシュ発光画像データD1)」と、「この第1の画像データと、第1の発光量とは異なる第2の発光量のフラッシュ光の発光下で被写体を撮影することにより取得された第2の画像データ(フラッシュ発光画像データ)と、の差分を表す第1の差分データD6」とに基づいて基礎データD14を導きだし、この基礎データD14に基づいて環境光画像成分データD11を取得してもよい。   The ambient light image component acquisition unit 66 (second image data extraction unit 72) acquires the first difference data D6 and the basic data D14 using the flash emission image data instead of the flash non-emission image data D2. Also good. In other words, the ambient light image component acquisition unit 66 “the first image data (flash emission image data D1) acquired by photographing the subject under the emission of the first emission amount of flash light” and “this first emission data”. The difference between the first image data and the second image data (flash emission image data) acquired by photographing the subject under the flash light emission of the second emission amount different from the first emission amount The basic data D14 may be derived based on the first difference data D6 "representing the ambient light image component data D11 based on the basic data D14.

図22は、環境光補正データ取得部68の機能構成を示すブロック図である。   FIG. 22 is a block diagram illustrating a functional configuration of the ambient light correction data acquisition unit 68.

環境光補正データ取得部68は、第2の色比データ取得部80及び第2の補正データ算出部81を有し、環境光画像成分データD11に基づき、被写体の色に応じてもたらされる環境光画像成分データD11の明度の相違を反映した環境光補正データ(色別環境光影響度マップ)D12を取得する。すなわち第2の色比データ取得部80は、環境光画像成分データD11から、複数の処理ブロックの各々における環境光画像成分データD11の色成分比を表す色比データD16を取得する。第2の補正データ算出部81は、環境光画像成分データD11の色比データD16に基づいて、被写体の色に応じてもたらされる環境光画像成分データD11の複数の処理ブロック間における明度の相違を反映した環境光補正データD12を取得する。   The ambient light correction data acquisition unit 68 includes a second color ratio data acquisition unit 80 and a second correction data calculation unit 81. Based on the ambient light image component data D11, the ambient light provided according to the color of the subject. Environmental light correction data (color-specific environmental light influence degree map) D12 reflecting the brightness difference of the image component data D11 is acquired. That is, the second color ratio data acquisition unit 80 acquires color ratio data D16 representing the color component ratio of the ambient light image component data D11 in each of the plurality of processing blocks from the ambient light image component data D11. Based on the color ratio data D16 of the ambient light image component data D11, the second correction data calculation unit 81 calculates the difference in brightness between the plurality of processing blocks of the ambient light image component data D11 that is provided according to the color of the subject. The reflected ambient light correction data D12 is acquired.

本実施形態の環境光補正データ取得部68は、被写体の分光特性(分光反射率)に基づく色に依存する影響を低減するために、処理ブロック毎に取得した環境光画像成分データD11の色比データ(RGB比等)から明度指標データ(輝度データ)を取得し、この明度指標データから色間の明度(輝度)の相違を補償するための環境光補正データD12(補正ゲイン)を取得する。   The ambient light correction data acquisition unit 68 of the present embodiment reduces the color-dependent influence based on the spectral characteristics (spectral reflectance) of the subject, and the color ratio of the ambient light image component data D11 acquired for each processing block. Brightness index data (luminance data) is acquired from the data (RGB ratio, etc.), and ambient light correction data D12 (correction gain) for compensating for the difference in brightness (luminance) between colors is acquired from the brightness index data.

図23は、第2の色比データ取得部80の機能構成を示すブロック図である。   FIG. 23 is a block diagram illustrating a functional configuration of the second color ratio data acquisition unit 80.

本例の第2の色比データ取得部80は、第2のデモザイク処理部82及び第2の色比算出部83を有する。   The second color ratio data acquisition unit 80 of this example includes a second demosaic processing unit 82 and a second color ratio calculation unit 83.

第2のデモザイク処理部82は、環境光画像成分データD11のデモザイク処理を行う。このデモザイク処理によって、環境光画像成分データD11を構成する各画素に対し、撮像素子21のカラーフィルタ16を構成する色(RGB等)の各々に関する画素データが割り当てられた色成分データD17が取得される。第2の色比算出部83は、色成分データD17に基づいて、複数の処理ブロックの各々における環境光画像成分データD11の色比データD16を取得する。この色比データD16は、環境光画像成分データD11を構成する色成分データD17の比率(RGB比等)を示し、処理ブロック毎に算出される。   The second demosaic processing unit 82 performs demosaic processing of the ambient light image component data D11. By this demosaic processing, color component data D17 is obtained in which pixel data relating to each color (RGB or the like) constituting the color filter 16 of the image sensor 21 is assigned to each pixel constituting the ambient light image component data D11. The The second color ratio calculation unit 83 acquires the color ratio data D16 of the ambient light image component data D11 in each of the plurality of processing blocks based on the color component data D17. The color ratio data D16 indicates a ratio (RGB ratio or the like) of the color component data D17 constituting the ambient light image component data D11, and is calculated for each processing block.

環境光画像成分データD11は、撮像素子21のカラーフィルタ16を構成する複数色(RGB等)の各々に関する色成分データを含む。第2の色比データ取得部80(環境光補正データ取得部68)は、この色成分データに基づいて、複数の処理ブロックの各々における環境光画像成分データD11の色比データD16を取得する。   The ambient light image component data D11 includes color component data relating to each of a plurality of colors (RGB, etc.) constituting the color filter 16 of the image sensor 21. The second color ratio data acquisition unit 80 (environment light correction data acquisition unit 68) acquires the color ratio data D16 of the environment light image component data D11 in each of the plurality of processing blocks based on the color component data.

なお環境光画像成分データD11の色比データD16は、複数の処理ブロックの各々における環境光画像成分データD11の複数色の色成分データD17の合計に対する、その複数色の各々に関する環境光画像成分データD11の色成分データD17の比に基づいている。   The color ratio data D16 of the ambient light image component data D11 is the ambient light image component data related to each of the plurality of colors with respect to the sum of the multiple color component data D17 of the ambient light image component data D11 in each of the plurality of processing blocks. This is based on the ratio of the color component data D17 of D11.

上述の例では、第2のデモザイク処理部82によって環境光画像成分データD11のデモザイク処理が行われるが、処理ブロックが複数画素によって構成される場合には第2のデモザイク処理部82(デモザイク処理)が省略されてもよい。第2のデモザイク処理部82が省略される場合には、各処理ブロックに含まれる複数の画素に関する色成分データD17から各処理ブロックにおける色比データD16が取得可能である。このように複数の画素のデータから各処理ブロックにおける単色の色成分データD17を求める手法は特に限定されず、例えばその単色に関する複数の画素のデータの「平均値」を単色の色成分データD17として設定してもよい。   In the above-described example, the demosaic processing of the ambient light image component data D11 is performed by the second demosaic processing unit 82. However, when the processing block includes a plurality of pixels, the second demosaic processing unit 82 (demosaic processing) May be omitted. When the second demosaic processing unit 82 is omitted, the color ratio data D16 in each processing block can be acquired from the color component data D17 related to a plurality of pixels included in each processing block. As described above, the method for obtaining the monochrome color component data D17 in each processing block from the data of a plurality of pixels is not particularly limited. For example, the “average value” of the data of a plurality of pixels related to the monochrome is used as the monochrome color component data D17. It may be set.

図24は、第2の補正データ算出部81の機能構成を示すブロック図である。本例の第2の補正データ算出部81は、第2の明度指標データ取得部84及び第2の補正データ演算処理部85を有する。   FIG. 24 is a block diagram showing a functional configuration of the second correction data calculation unit 81. The second correction data calculation unit 81 of this example includes a second brightness index data acquisition unit 84 and a second correction data calculation processing unit 85.

第2の明度指標データ取得部84は、色比データD16から明度指標データD18を取得する。すなわち第2の明度指標データ取得部84(環境光補正データ取得部68)は、「被写体の色に応じた環境光画像成分データD11の明度を示す明度指標データD18を環境光画像成分データD11の色比データD16から導き出す演算処理」に基づいて、複数の処理ブロックの各々における環境光画像成分データD11の色比データD16から、複数の処理ブロックの各々における環境光画像成分データD11の明度指標データD18を取得する。   The second brightness index data acquisition unit 84 acquires brightness index data D18 from the color ratio data D16. That is, the second lightness index data acquisition unit 84 (ambient light correction data acquisition unit 68) reads “the lightness index data D18 indicating the lightness of the environmental light image component data D11 according to the color of the subject. Based on the “calculation process derived from the color ratio data D16”, the lightness index data of the ambient light image component data D11 in each of the plurality of processing blocks is obtained from the color ratio data D16 of the ambient light image component data D11 in each of the plurality of processing blocks. D18 is acquired.

第2の補正データ演算処理部85は、明度指標データD18から環境光補正データD12を取得する。特に本実施形態の第2の補正データ演算処理部85(環境光補正データ取得部68)は、無彩色の色比データを基準に、複数の処理ブロックの各々に関する環境光補正データD12を取得する。すなわち第2の補正データ演算処理部85(環境光補正データ取得部68)は、複数の処理ブロックの各々における複数色の色成分データの合計に対する複数色の各々に関する色成分データの比が相互に等しい無彩色の色比データから、無彩色に関する明度指標データを演算処理に基づいて取得する。そして第2の補正データ演算処理部85(環境光補正データ取得部68)は、無彩色に関する明度指標データに対する複数の処理ブロックの各々における環境光画像成分データD11の明度指標データD18の比に基づいて、環境光画像成分データD11の複数の処理ブロックの各々に関する環境光補正データD12を取得する。   The second correction data calculation processing unit 85 acquires the ambient light correction data D12 from the brightness index data D18. In particular, the second correction data calculation processing unit 85 (environment light correction data acquisition unit 68) of the present embodiment acquires the environment light correction data D12 related to each of the plurality of processing blocks on the basis of the achromatic color ratio data. . That is, the second correction data calculation processing unit 85 (environment light correction data acquisition unit 68) has a ratio of the color component data for each of the plurality of colors to the sum of the color component data of the plurality of colors in each of the plurality of processing blocks. Lightness index data related to the achromatic color is acquired from the color ratio data of the same achromatic color based on the arithmetic processing. Then, the second correction data calculation processing unit 85 (environment light correction data acquisition unit 68) is based on the ratio of the lightness index data D18 of the environmental light image component data D11 in each of the plurality of processing blocks to the lightness index data regarding the achromatic color. Thus, the ambient light correction data D12 relating to each of the plurality of processing blocks of the ambient light image component data D11 is acquired.

ここで明度指標データD18を取得するために使用される上記の「演算処理」は、明度を直接的又は間接的に示す明度指標データD18を導出する処理であれば特に限定されず、例えば「輝度値」の算出に使用される演算処理が用いられてもよい。したがって、「輝度値(Y)」の算出に用いられる例えば「Y=0.3*R+0.6*G+0.1*B」で表される式に基づいて、明度指標データD18が算出されてもよい。この場合、第2の補正データ演算処理部85で求められる環境光補正データD12は、無彩色の明度指標データD18に対するその処理ブロックにおける環境光画像成分データD11の明度指標データD18の比に基づいて取得される。   The “calculation process” used to acquire the brightness index data D18 is not particularly limited as long as it is a process for deriving the brightness index data D18 indicating the brightness directly or indirectly. An arithmetic process used to calculate “value” may be used. Therefore, even if the lightness index data D18 is calculated based on an expression represented by, for example, “Y = 0.3 * R + 0.6 * G + 0.1 * B”, which is used for calculating “luminance value (Y)”. Good. In this case, the ambient light correction data D12 obtained by the second correction data calculation processing unit 85 is based on the ratio of the brightness index data D18 of the ambient light image component data D11 in the processing block to the achromatic color brightness index data D18. To be acquired.

図18に示す環境光明度補正部70は、上述のようにして取得される「環境光画像成分取得部66(第2の画像データ抽出部72)から出力される環境光画像成分データD11」及び「環境光補正データ取得部68(第2の補正データ演算処理部85)から出力される環境光補正データD12」に基づき、被写体の色に応じてもたらされる環境光画像成分データD11の明度の相違が補償された環境光画像補正成分データ(合成環境光影響度マップ)D13を取得する。   The ambient light brightness correction unit 70 shown in FIG. 18 obtains “the ambient light image component data D11 output from the ambient light image component acquisition unit 66 (second image data extraction unit 72)” acquired as described above, and Based on the “ambient light correction data D12 output from the environmental light correction data acquisition unit 68 (second correction data calculation processing unit 85)”, the difference in brightness of the environmental light image component data D11 brought about according to the color of the subject. To obtain the ambient light image correction component data (synthesized ambient light influence map) D13.

図25は、環境光明度補正部70の機能構成を示すブロック図である。   FIG. 25 is a block diagram illustrating a functional configuration of the ambient light brightness correction unit 70.

本実施形態の環境光明度補正部70は、第2の明度データ取得部86及び第2の補正算出部87を有する。   The ambient light brightness correction unit 70 of the present embodiment includes a second brightness data acquisition unit 86 and a second correction calculation unit 87.

環境光明度補正部70の第2の明度データ取得部86は、環境光画像成分データD11に基づいて、複数の処理ブロックの各々における第2の明度データ(輝度環境光影響度マップ)D19を取得する。本実施形態における第2の明度データD19は輝度を表すデータであり、任意の手法によって第2の明度データD19が求められてもよい。すなわち第2の明度データ取得部86は、環境光画像成分データD11の色成分データ(RGBデータ等)を輝度に変換して第2の明度データD19を取得する。例えば第2の明度指標データ取得部84(環境光補正データ取得部68、第2の補正データ算出部81)において明度指標データD18を取得するために使用される「演算処理」と同様にして、環境光画像成分データD11から第2の明度データD19(輝度値(Y))を算出することができる。   The second brightness data acquisition unit 86 of the ambient light brightness correction unit 70 acquires second brightness data (luminance ambient light influence map) D19 in each of the plurality of processing blocks based on the ambient light image component data D11. To do. The second lightness data D19 in the present embodiment is data representing luminance, and the second lightness data D19 may be obtained by any method. That is, the second lightness data acquisition unit 86 converts the color component data (RGB data or the like) of the ambient light image component data D11 into luminance and acquires the second lightness data D19. For example, in the same manner as the “calculation process” used to acquire the brightness index data D18 in the second brightness index data acquisition unit 84 (environment light correction data acquisition unit 68, second correction data calculation unit 81), Second brightness data D19 (luminance value (Y)) can be calculated from the ambient light image component data D11.

環境光明度補正部70の第2の補正算出部87は、複数の処理ブロックの各々に関して第2の明度データD19に環境光補正データD12を適用することで、環境光画像補正成分データD13を取得する。より具体的には、本実施形態の環境光補正データ取得部68において取得される環境光補正データD12は、環境光画像成分データD11の明度を示す第2の明度データD19に適用されることで、被写体の色に応じてもたらされる環境光画像成分データD11の明度の相違が補償されるデータである。環境光補正データ取得部68は、環境光画像成分データD11の複数の処理ブロックの各々に関してそのような環境光補正データD12を取得する。   The second correction calculation unit 87 of the ambient light brightness correction unit 70 obtains the ambient light image correction component data D13 by applying the ambient light correction data D12 to the second brightness data D19 for each of the plurality of processing blocks. To do. More specifically, the ambient light correction data D12 acquired by the ambient light correction data acquisition unit 68 of the present embodiment is applied to the second brightness data D19 indicating the brightness of the ambient light image component data D11. This is data that compensates for the difference in brightness of the ambient light image component data D11 caused according to the color of the subject. The ambient light correction data acquisition unit 68 acquires such ambient light correction data D12 for each of the plurality of processing blocks of the ambient light image component data D11.

したがって例えば、処理ブロック毎に、第2の明度データD19に環境光補正データD12を乗算することで、被写体の色に応じてもたらされる明度の相違が補償された環境光画像補正成分データD13が算出されるようにしてもよい。この場合、環境光補正データ取得部68(第2の補正データ演算処理部85(図24参照))は、「無彩色の明度指標データD18に対する環境光画像成分データD11の明度指標データD18の比の逆数」を環境光補正データD12として取得することができる。   Therefore, for example, by multiplying the second lightness data D19 by the ambient light correction data D12 for each processing block, the ambient light image correction component data D13 in which the difference in lightness caused according to the color of the subject is compensated is calculated. You may be made to do. In this case, the ambient light correction data acquisition unit 68 (second correction data calculation processing unit 85 (see FIG. 24)) reads “the ratio of the brightness index data D18 of the ambient light image component data D11 to the achromatic color brightness index data D18. Can be acquired as the ambient light correction data D12.

このように、環境光画像成分データD11の輝度(明度)を示す第2の明度データD19に環境光補正データD12を適用することで取得される環境光画像補正成分データD13は、被写体の色に応じてもたらされる環境光画像成分データD11の輝度(明度)の相違が補償されたデータとなる。   As described above, the ambient light image correction component data D13 obtained by applying the ambient light correction data D12 to the second brightness data D19 indicating the luminance (lightness) of the ambient light image component data D11 is the color of the subject. Accordingly, the difference in luminance (brightness) of the ambient light image component data D11 is compensated.

そして図18に示す本実施形態のホワイトバランス処理部46は、フラッシュ画像補正成分データD5及び環境光画像補正成分データD13に基づいて、フラッシュ発光画像データ(第1の画像データ)D1のホワイトバランスを調整する。すなわちホワイトバランス処理部46は、フラッシュ画像補正成分データD5及び環境光画像補正成分データD13に基づいて、フラッシュ発光画像データ(第1の画像データ)D1に、フラッシュ光用ホワイトバランスゲインWB1及び環境光用ホワイトバランスゲインWB2を適用する。   Then, the white balance processing unit 46 of the present embodiment shown in FIG. 18 performs the white balance of the flash emission image data (first image data) D1 based on the flash image correction component data D5 and the ambient light image correction component data D13. adjust. That is, the white balance processing unit 46 adds the flash light white balance gain WB1 and the ambient light to the flash emission image data (first image data) D1 based on the flash image correction component data D5 and the ambient light image correction component data D13. The white balance gain WB2 is applied.

図26は、第4実施形態に係るホワイトバランス処理部46の機能構成を示すブロック図である。   FIG. 26 is a block diagram illustrating a functional configuration of the white balance processing unit 46 according to the fourth embodiment.

本例のホワイトバランス処理部46は、光源比データ取得部88及びホワイトバランス演算処理部89を有する。光源比データ取得部88は、フラッシュ画像補正成分データD5及び環境光画像補正成分データD13から、処理ブロック毎に、フラッシュ光と環境光との比を示す光源比データ(総合フラッシュ影響度マップ)D20を取得する。   The white balance processing unit 46 of this example includes a light source ratio data acquisition unit 88 and a white balance calculation processing unit 89. The light source ratio data acquisition unit 88 uses the flash image correction component data D5 and the ambient light image correction component data D13 to provide light source ratio data (total flash influence map) D20 indicating the ratio of flash light to ambient light for each processing block. To get.

ホワイトバランス演算処理部89は、光源比データD20に基づいて、処理ブロック毎にフラッシュ光用ホワイトバランスゲインWB1及び環境光用ホワイトバランスゲインWB2の適用比を切り換えて、フラッシュ発光画像データD1に対するホワイトバランス処理を行う。   The white balance calculation processing unit 89 switches the application ratio of the flash light white balance gain WB1 and the ambient light white balance gain WB2 for each processing block based on the light source ratio data D20, and performs white balance on the flash emission image data D1. Process.

ホワイトバランス演算処理部89(ホワイトバランス処理部46)がフラッシュ発光画像データD1、フラッシュ光用ホワイトバランスゲインWB1及び環境光用ホワイトバランスゲインWB2を取得する手法は特に限定されない。例えばホワイトバランス演算処理部89は、フラッシュ画像成分取得部40又は環境光画像成分取得部66からフラッシュ発光画像データD1を取得してもよい。またホワイトバランス演算処理部89は、フラッシュ光用WBゲイン記憶部51(図9参照)からフラッシュ光用ホワイトバランスゲインWB1を取得してもよい。またホワイトバランス演算処理部89は、ホワイトバランスゲイン取得部77(図21参照)から環境光用ホワイトバランスゲインWB2を取得してもよい。   The method by which the white balance calculation processing unit 89 (white balance processing unit 46) acquires the flash emission image data D1, the flash light white balance gain WB1, and the ambient light white balance gain WB2 is not particularly limited. For example, the white balance calculation processing unit 89 may acquire the flash emission image data D1 from the flash image component acquisition unit 40 or the ambient light image component acquisition unit 66. Further, the white balance calculation processing unit 89 may acquire the flash light white balance gain WB1 from the flash light WB gain storage unit 51 (see FIG. 9). The white balance calculation processing unit 89 may acquire the ambient light white balance gain WB2 from the white balance gain acquisition unit 77 (see FIG. 21).

なおホワイトバランス演算処理部89で行われるホワイトバランス処理演算の具体的手法は特に限定されず、処理ブロック毎に、フラッシュ光用ホワイトバランスゲインWB1及び環境光用ホワイトバランスゲインWB2の両者がフラッシュ発光画像データD1に適用されてもよい。例えばフラッシュ発光画像データD1の「ある処理ブロック」におけるフラッシュ光と環境光との影響比率が「フラッシュ光:環境光=2:1」の場合、その処理ブロックにおけるフラッシュ発光画像データD1に対するホワイトバランスゲインの適用比を「フラッシュ光用ホワイトバランスゲインWB1:環境光用ホワイトバランスゲインWB2=2/(2+1):1/(2+1)」としてもよい。或いは、例えばフラッシュ発光画像データD1の「ある処理ブロック」において環境光よりもフラッシュ光の影響比率が大きい場合には、その処理ブロックに対してフラッシュ光用ホワイトバランスゲインWB1が適用され、一方、フラッシュ光よりも環境光の影響比率が大きい場合には、その処理ブロックに対して環境光用ホワイトバランスゲインWB2が適用されてもよい。   The specific method of the white balance processing calculation performed by the white balance calculation processing unit 89 is not particularly limited, and the flash light white balance gain WB1 and the ambient light white balance gain WB2 are both flash emission images for each processing block. It may be applied to the data D1. For example, when the influence ratio of flash light and ambient light in “a certain processing block” of the flash emission image data D1 is “flash light: environment light = 2: 1”, the white balance gain for the flash emission image data D1 in that processing block May be set as “white balance gain for flash light WB1: white balance gain for ambient light WB2 = 2 / (2 + 1): 1 / (2 + 1)”. Alternatively, for example, when the influence ratio of the flash light is larger than the ambient light in the “certain processing block” of the flash emission image data D1, the flash light white balance gain WB1 is applied to the processing block. When the influence ratio of the ambient light is larger than that of the light, the ambient light white balance gain WB2 may be applied to the processing block.

このように、フラッシュ発光画像データD1の各処理ブロックにおけるフラッシュ光の影響量と環境光の影響量との比率に応じて、フラッシュ光を光源とするホワイトバランス処理及び環境光を光源とするホワイトバランス処理を行うことで、フラッシュ発光画像データD1のうち「相対的にフラッシュ光の影響が大きい画像部分」及び「相対的に環境光の影響が大きい画像部分」のそれぞれに対し、適切なホワイトバランス処理を行うことができる。   As described above, the white balance processing using the flash light as the light source and the white balance using the environmental light as the light source according to the ratio between the influence amount of the flash light and the influence amount of the environmental light in each processing block of the flash emission image data D1. By performing the processing, appropriate white balance processing is performed for each of “image portion relatively affected by flash light” and “image portion relatively affected by ambient light” in the flash emission image data D1. It can be performed.

図27は、第4実施形態に係るホワイトバランス処理のフローチャートである。   FIG. 27 is a flowchart of white balance processing according to the fourth embodiment.

まずフラッシュ画像成分取得部40及び環境光画像成分取得部66において、フラッシュ発光画像データD1及びフラッシュ非発光画像データD2が取得される(図27のS41)。そしてフラッシュ画像成分取得部40、フラッシュ補正データ取得部42及びフラッシュ明度補正部44において、フラッシュ発光画像データD1及びフラッシュ非発光画像データD2に基づきフラッシュ画像補正成分データD5が取得される(S42)。また環境光画像成分取得部66、環境光補正データ取得部68及び環境光明度補正部70において、フラッシュ発光画像データD1及びフラッシュ非発光画像データD2に基づき環境光画像補正成分データD13が取得される(S43)。   First, the flash image component acquisition unit 40 and the ambient light image component acquisition unit 66 acquire the flash emission image data D1 and the flash non-emission image data D2 (S41 in FIG. 27). Then, the flash image component acquisition unit 40, the flash correction data acquisition unit 42, and the flash brightness correction unit 44 acquire the flash image correction component data D5 based on the flash emission image data D1 and the flash non-emission image data D2 (S42). The ambient light image component acquisition unit 66, the ambient light correction data acquisition unit 68, and the ambient light brightness correction unit 70 acquire the ambient light image correction component data D13 based on the flash emission image data D1 and the flash non-emission image data D2. (S43).

なおフラッシュ画像補正成分データD5を取得するステップS42のプロセスについては、図28を参照して後述する。また環境光画像補正成分データD13を取得するステップS43のプロセスについては、図29を参照して後述する。   The process of step S42 for acquiring the flash image correction component data D5 will be described later with reference to FIG. The process of step S43 for acquiring the ambient light image correction component data D13 will be described later with reference to FIG.

そしてホワイトバランス処理部46の光源比データ取得部88において、フラッシュ画像補正成分データD5及び環境光画像補正成分データD13に基づき光源比データD20が取得される(S44)。   Then, the light source ratio data acquisition unit 88 of the white balance processing unit 46 acquires the light source ratio data D20 based on the flash image correction component data D5 and the ambient light image correction component data D13 (S44).

そしてホワイトバランス処理部46のホワイトバランス演算処理部89において、この光源比データD20に応じたホワイトバランス処理が、フラッシュ発光画像データD1に対して行われる(S45)。例えば、光源比データD20に応じた、フラッシュ光用ホワイトバランスゲインWB1及び環境光用ホワイトバランスゲインWB2がフラッシュ発光画像データD1に適用される。   Then, in the white balance calculation processing unit 89 of the white balance processing unit 46, white balance processing corresponding to the light source ratio data D20 is performed on the flash emission image data D1 (S45). For example, the flash light white balance gain WB1 and the ambient light white balance gain WB2 corresponding to the light source ratio data D20 are applied to the flash emission image data D1.

図28は、第4実施形態においてフラッシュ画像補正成分データD5を取得するための処理フロー(図27のステップS42)の詳細を示すフローチャートである。なお図28に示すステップS51〜ステップS57は、それぞれ、第3実施形態に係る図17に示すステップS32〜ステップS38と同様の処理となる。   FIG. 28 is a flowchart showing details of a processing flow (step S42 in FIG. 27) for acquiring the flash image correction component data D5 in the fourth embodiment. Note that steps S51 to S57 shown in FIG. 28 are the same processes as steps S32 to S38 shown in FIG. 17 according to the third embodiment.

すなわちフラッシュ画像成分取得部40の第1の画像データ抽出部47(図7参照)において、フラッシュ発光画像データD1及びフラッシュ非発光画像データD2から第1の差分データD6が取得され(図28のS51)、第1の抽出データ調整部49においてフラッシュ画像成分データD3が取得される(S52)。   That is, the first image data extraction unit 47 (see FIG. 7) of the flash image component acquisition unit 40 acquires the first difference data D6 from the flash emission image data D1 and the flash non-emission image data D2 (S51 in FIG. 28). ), The first extracted data adjustment unit 49 obtains the flash image component data D3 (S52).

そしてフラッシュ補正データ取得部42の第1の色比データ取得部53(図12参照)において、フラッシュ画像成分データD3から各処理ブロックに関する色比データD7が取得される(S53)。そして、第1の補正データ算出部54の第1の明度指標データ取得部59(図14参照)において、この色比データD7から各処理ブロックに関する明度指標データD9が取得され(S54)、第1の補正データ演算処理部60において明度指標データD9から各処理ブロックに関するフラッシュ補正データ(色別フラッシュ影響度マップ)D4が取得される(S55)。   Then, in the first color ratio data acquisition unit 53 (see FIG. 12) of the flash correction data acquisition unit 42, the color ratio data D7 regarding each processing block is acquired from the flash image component data D3 (S53). Then, in the first lightness index data acquisition unit 59 (see FIG. 14) of the first correction data calculation unit 54, the lightness index data D9 relating to each processing block is acquired from the color ratio data D7 (S54). The correction data calculation processing unit 60 acquires flash correction data (color-specific flash influence map) D4 related to each processing block from the lightness index data D9 (S55).

そしてフラッシュ明度補正部44の第1の明度データ取得部62(図16参照)において、フラッシュ画像成分取得部40において取得されるフラッシュ画像成分データD3から各処理ブロックに関する第1の明度データD10が取得される(S56)。そしてフラッシュ明度補正部44の第1の補正算出部63において、第1の明度データD10及びフラッシュ補正データD4からフラッシュ画像補正成分データD5が取得される(S57)。   Then, in the first brightness data acquisition unit 62 (see FIG. 16) of the flash brightness correction unit 44, the first brightness data D10 relating to each processing block is acquired from the flash image component data D3 acquired by the flash image component acquisition unit 40. (S56). Then, in the first correction calculation unit 63 of the flash brightness correction unit 44, flash image correction component data D5 is acquired from the first brightness data D10 and the flash correction data D4 (S57).

図29は、第4実施形態において環境光画像補正成分データD13を取得するための処理フロー(図27のステップS43)の詳細を示すフローチャートである。   FIG. 29 is a flowchart showing details of a processing flow (step S43 in FIG. 27) for acquiring the ambient light image correction component data D13 in the fourth embodiment.

まず環境光画像成分取得部66の第2の画像データ抽出部72(図19参照)において、フラッシュ非発光画像データD2に基づいて基礎データD14が取得される(図29のS61)。   First, in the second image data extraction unit 72 (see FIG. 19) of the ambient light image component acquisition unit 66, basic data D14 is acquired based on the flash non-emission image data D2 (S61 in FIG. 29).

そして、基礎データ色比取得部76(図21参照)において基礎データD14から色比データD15が取得され(S62)、ホワイトバランスゲイン取得部77(図21参照)において、フラッシュ画像成分データD3の色比データD7と基礎データD14の色比データD15とから環境光用ホワイトバランスゲインWB2が取得される(S63)。   The basic data color ratio acquisition unit 76 (see FIG. 21) acquires the color ratio data D15 from the basic data D14 (S62), and the white balance gain acquisition unit 77 (see FIG. 21) acquires the color of the flash image component data D3. The ambient light white balance gain WB2 is acquired from the ratio data D7 and the color ratio data D15 of the basic data D14 (S63).

そして第2のホワイトバランス調整部78(図21参照)において、基礎データD14に環境光用ホワイトバランスゲインWB2が適用されて環境光画像成分データD11が取得される(S64)。そして環境光補正データ取得部68の第2の色比データ取得部80(図22参照)において、処理ブロック毎に環境光画像成分データD11の色比データD16が取得され(S65)、第2の補正データ算出部81の第2の明度指標データ取得部84(図24参照)において、環境光画像成分データD11の色比データD16から処理ブロック毎に明度指標データD18が取得される(S66)。そして第2の補正データ演算処理部85(図24参照)において、明度指標データD18から環境光補正データD12が取得される(S67)。   Then, in the second white balance adjustment unit 78 (see FIG. 21), the ambient light white balance gain WB2 is applied to the basic data D14 to obtain the ambient light image component data D11 (S64). Then, the second color ratio data acquisition unit 80 (see FIG. 22) of the ambient light correction data acquisition unit 68 acquires the color ratio data D16 of the ambient light image component data D11 for each processing block (S65). In the second brightness index data acquisition unit 84 (see FIG. 24) of the correction data calculation unit 81, brightness index data D18 is acquired for each processing block from the color ratio data D16 of the ambient light image component data D11 (S66). Then, in the second correction data calculation processing unit 85 (see FIG. 24), the ambient light correction data D12 is acquired from the lightness index data D18 (S67).

そして環境光明度補正部70の第2の明度データ取得部86(図25参照)において、環境光画像成分データD11から第2の明度データD19が取得され(S68)、第2の補正算出部87(図25参照)において、第2の明度データD19及び環境光補正データD12から環境光画像補正成分データD13が取得される(S69)。   Then, the second brightness data acquisition unit 86 (see FIG. 25) of the ambient light brightness correction unit 70 acquires the second brightness data D19 from the ambient light image component data D11 (S68), and the second correction calculation unit 87. In (see FIG. 25), ambient light image correction component data D13 is acquired from the second brightness data D19 and the ambient light correction data D12 (S69).

以上説明したように本実施形態の画像処理装置31及び画像処理方法によれば、フラッシュ光の影響度及び環境光の影響度をそれぞれ的確に求めることができ、正確なフラッシュ光の影響度及び環境光の影響度に基づいて、フラッシュ発光画像データD1に対して精度の高いホワイトバランス処理を行うことができる。   As described above, according to the image processing apparatus 31 and the image processing method of the present embodiment, the influence degree of the flash light and the influence degree of the environmental light can be accurately obtained, and the accurate influence degree and environment of the flash light can be obtained. Based on the degree of influence of light, highly accurate white balance processing can be performed on the flash emission image data D1.

フラッシュ光の発光下で撮影を行う場合には、被写体の一部又は全部にフラッシュ光が十分に届かない場合もあり、フラッシュ光の影響度のみを考慮したホワイトバランス処理では、被写体本来の色味に調整することが難しい場合がある。しかしながら本実施形態の画像処理装置31及び画像処理方法によれば、フラッシュ光の影響度とともに環境光の影響度も考慮されたホワイトバランス処理が行われるので、被写体本来の色味を適切に回復することが可能になる。   When shooting under flash light, there may be cases where the flash light does not reach all or part of the subject. It may be difficult to adjust to. However, according to the image processing apparatus 31 and the image processing method of the present embodiment, since the white balance processing is performed in consideration of the influence degree of the flash light and the influence degree of the ambient light, the original color of the subject is appropriately recovered. It becomes possible.

例えば、「フラッシュ光が十分に届いてフラッシュ光が支配的な影響を及ぼす画像部分」と「フラッシュ光が十分に届かずにフラッシュ光が支配的な影響を及ぼさない画像部分」とがフラッシュ発光画像データD1に混在する場合であっても、それぞれの画像部分に対して、被写体の色に応じてもたらされる明度の相違が補償された状態で、適切なホワイトバランス処理を行うことができる。   For example, “the image portion where the flash light reaches sufficiently and the flash light has a dominant influence” and “the image portion where the flash light does not reach sufficiently and the flash light does not have a dominant influence” are flash emission images Even when the data D1 is mixed, appropriate white balance processing can be performed for each image portion in a state where a difference in brightness caused by the color of the subject is compensated.

<他の変形例>
上述の実施形態及び変形例のうち任意の形態同士が組み合わされてもよい。また上述の実施形態は例示に過ぎず、他の構成に本発明を適用してもよい。
<Other variations>
Arbitrary forms may be combined among the above-described embodiments and modifications. The above-described embodiments are merely examples, and the present invention may be applied to other configurations.

また上述の第1実施形態から第4実施形態の各々では、フラッシュ画像補正成分データD5の取得処理及びフラッシュ画像補正成分データD5を用いた画像処理がカメラ本体3において実施される例について説明したが、これら処理の一部又は全てをカメラ本体3(デジタルカメラ2)とは別のコンピュータやサーバ等の他の装置が実施するようにしてもよい。例えば、コンピュータにおいて画像データを加工する際に、コンピュータに設けられる画像処理装置にフラッシュ発光画像D1及びフラッシュ非発光画像D2などのデータ類が入力されることで、フラッシュ画像補正成分データD5の取得処理及びフラッシュ画像補正成分データD5を用いた画像処理が行われてもよい。またサーバが画像処理装置を備える場合には、例えば、デジタルカメラ2(カメラ本体3)やコンピュータからサーバにフラッシュ発光画像D1及びフラッシュ非発光画像D2などのデータ類が送信され、サーバの画像処理装置で画像データに対してフラッシュ画像補正成分データD5の取得処理及びフラッシュ画像補正成分データD5を用いた画像処理が行われ、画像処理後の画像データが送信元に送信及び提供されるようにしてもよい。   In each of the first to fourth embodiments described above, the example in which the acquisition processing of the flash image correction component data D5 and the image processing using the flash image correction component data D5 are performed in the camera body 3 has been described. Some or all of these processes may be performed by another device such as a computer or server other than the camera body 3 (digital camera 2). For example, when processing image data in a computer, data such as a flash light emission image D1 and a flash non-light emission image D2 are input to an image processing device provided in the computer, so that the flash image correction component data D5 is acquired. In addition, image processing using the flash image correction component data D5 may be performed. When the server includes an image processing device, for example, data such as the flash light emission image D1 and the flash non-light emission image D2 are transmitted from the digital camera 2 (camera body 3) or the computer to the server, and the server image processing device. The image data is subjected to the flash image correction component data D5 acquisition processing and the image processing using the flash image correction component data D5, and the image data after the image processing is transmitted and provided to the transmission source. Good.

また上述の各機能構成は、任意のハードウェア、ソフトウェア、或いは両者の組み合わせによって実現可能である。例えば、上述の各装置及び処理部(画像処理装置31等)における画像処理方法(処理ステップ(処理手順))をコンピュータに実行させるプログラム、そのプログラムを記憶したコンピュータ読み取り可能な記憶媒体(非一時的記憶媒体)、或いはそのプログラムをインストール可能なコンピュータに対しても本発明を適用することができる。   Each functional configuration described above can be realized by arbitrary hardware, software, or a combination of both. For example, a program for causing a computer to execute an image processing method (processing step (processing procedure)) in each of the above-described apparatuses and processing units (image processing apparatus 31 and the like), and a computer-readable storage medium (non-temporary) storing the program The present invention can also be applied to a storage medium) or a computer in which the program can be installed.

また、本発明を適用可能な態様はデジタルカメラ及びコンピュータ(サーバ)には限定されず、撮像を主たる機能とするカメラ類の他に、撮像機能に加えて撮像以外の他の機能(通話機能、通信機能、その他のコンピュータ機能)を備えるモバイル機器類に対しても本発明を適用することが可能である。本発明を適用可能な他の態様としては、例えば、カメラ機能を有する携帯電話機やスマートフォン、PDA(Personal Digital Assistants)、携帯型ゲーム機が挙げられる。以下、本発明を適用可能なスマートフォンの一例について説明する。   In addition, the aspect to which the present invention can be applied is not limited to a digital camera and a computer (server). In addition to the cameras whose main function is imaging, functions other than imaging (call function, The present invention can be applied to mobile devices having a communication function and other computer functions. Other modes to which the present invention can be applied include, for example, a mobile phone having a camera function, a smartphone, a PDA (Personal Digital Assistants), and a portable game machine. Hereinafter, an example of a smartphone to which the present invention can be applied will be described.

<スマートフォンの構成>
図30は、スマートフォン101の外観を示す図である。図30に示すスマートフォン101は、平板状の筐体102を有し、筐体102の一方の面に表示部としての表示パネル121と、入力部としての操作パネル122とが一体となった表示入力部120を備える。また、かかる筐体102は、スピーカ131と、マイクロホン132、操作部140と、カメラ部141とを備える。なお、筐体102の構成はこれに限定されず、例えば、表示部と入力部とが独立した構成が採用されてもよいし、折り畳み構造やスライド機構を有する構成が採用されてもよい。
<Configuration of smartphone>
FIG. 30 is a diagram illustrating an appearance of the smartphone 101. A smartphone 101 illustrated in FIG. 30 includes a flat housing 102, and a display input in which a display panel 121 as a display unit and an operation panel 122 as an input unit are integrated on one surface of the housing 102. The unit 120 is provided. The housing 102 includes a speaker 131, a microphone 132, an operation unit 140, and a camera unit 141. Note that the configuration of the housing 102 is not limited to this, and for example, a configuration in which the display unit and the input unit are independent may be employed, or a configuration having a folding structure and a slide mechanism may be employed.

図31は、図30に示すスマートフォン101の構成を示すブロック図である。図31に示すように、スマートフォンの主たる構成要素として、無線通信部110と、表示入力部120と、通話部130と、操作部140と、カメラ部141と、記憶部150と、外部入出力部160と、GPS(Global Positioning System)受信部170と、モーションセンサ部180と、電源部190と、主制御部100とを備える。また、スマートフォン101の主たる機能として、基地局装置BSと移動通信網NWとを介した移動無線通信を行う無線通信機能を備える。   FIG. 31 is a block diagram showing the configuration of the smartphone 101 shown in FIG. As shown in FIG. 31, the main components of the smartphone include a wireless communication unit 110, a display input unit 120, a call unit 130, an operation unit 140, a camera unit 141, a storage unit 150, and an external input / output unit. 160, a GPS (Global Positioning System) receiving unit 170, a motion sensor unit 180, a power supply unit 190, and a main control unit 100. As a main function of the smartphone 101, a wireless communication function for performing mobile wireless communication via the base station apparatus BS and the mobile communication network NW is provided.

無線通信部110は、主制御部100の指示に従って、移動通信網NWに収容された基地局装置BSに対し無線通信を行うものである。かかる無線通信を使用して、音声データ、画像データ等の各種ファイルデータ、電子メールデータなどの送受信や、Webデータやストリーミングデータなどの受信を行う。   The radio communication unit 110 performs radio communication with the base station apparatus BS accommodated in the mobile communication network NW according to an instruction from the main control unit 100. Using such wireless communication, transmission / reception of various file data such as audio data and image data, e-mail data, and reception of Web data, streaming data, and the like are performed.

表示入力部120は、主制御部100の制御により、画像(静止画像及び動画像)や文字情報などを表示して視覚的にユーザに情報を伝達し、表示した情報に対するユーザ操作を検出する、いわゆるタッチパネルであって、表示パネル121と、操作パネル122とを備える。   The display input unit 120 displays images (still images and moving images), character information, and the like visually under the control of the main control unit 100, visually transmits information to the user, and detects user operations on the displayed information. This is a so-called touch panel, and includes a display panel 121 and an operation panel 122.

表示パネル121は、LCD(Liquid Crystal Display)、OELD(Organic Electro−Luminescence Display)などを表示デバイスとして用いたものである。操作パネル122は、表示パネル121の表示面上に表示される画像を視認可能に載置され、ユーザの指や尖筆によって操作される座標を検出するデバイスである。かかるデバイスをユーザの指や尖筆によって操作すると、操作に起因して発生する検出信号を主制御部100に出力する。次いで、主制御部100は、受信した検出信号に基づいて、表示パネル121上の操作位置(座標)を検出する。   The display panel 121 uses an LCD (Liquid Crystal Display), an OELD (Organic Electro-Luminescence Display), or the like as a display device. The operation panel 122 is a device that is placed so that an image displayed on the display surface of the display panel 121 is visible and detects coordinates operated by a user's finger or stylus. When such a device is operated with a user's finger or a stylus, a detection signal generated due to the operation is output to the main control unit 100. Next, the main control unit 100 detects an operation position (coordinates) on the display panel 121 based on the received detection signal.

図30に示すように、本発明の撮像装置の一実施形態として例示しているスマートフォン101の表示パネル121と操作パネル122とは一体となって表示入力部120を構成しているが、操作パネル122が表示パネル121を完全に覆うような配置となっている。かかる配置を採用した場合、操作パネル122は、表示パネル121外の領域についても、ユーザ操作を検出する機能を備えてもよい。換言すると、操作パネル122は、表示パネル121に重なる重畳部分についての検出領域(以下、「表示領域」と称する)と、それ以外の表示パネル121に重ならない外縁部分についての検出領域(以下、「非表示領域」と称する)とを備えていてもよい。   As shown in FIG. 30, the display panel 121 and the operation panel 122 of the smartphone 101 exemplified as an embodiment of the imaging apparatus of the present invention integrally constitute the display input unit 120. The arrangement 122 covers the display panel 121 completely. When such an arrangement is adopted, the operation panel 122 may have a function of detecting a user operation even in an area outside the display panel 121. In other words, the operation panel 122 includes a detection area (hereinafter referred to as “display area”) for the overlapping portion overlapping the display panel 121 and a detection area (hereinafter referred to as “display area”) for the other outer edge portion that does not overlap the display panel 121. (Referred to as “non-display area”).

なお、表示領域の大きさと表示パネル121の大きさとを完全に一致させてもよいが、両者を必ずしも一致させる必要はない。また、操作パネル122が、外縁部分と、それ以外の内側部分の2つの感応領域を備えていてもよい。さらに、外縁部分の幅は、筐体102の大きさなどに応じて適宜設計されるものである。更にまた、操作パネル122で採用される位置検出方式としては、マトリクススイッチ方式、抵抗膜方式、表面弾性波方式、赤外線方式、電磁誘導方式、静電容量方式などが挙げられ、いずれの方式を採用することもできる。   Note that the size of the display area and the size of the display panel 121 may be completely matched, but it is not always necessary to match the two. In addition, the operation panel 122 may include two sensitive regions of the outer edge portion and the other inner portion. Furthermore, the width of the outer edge portion is appropriately designed according to the size of the housing 102 and the like. Furthermore, examples of the position detection method employed in the operation panel 122 include a matrix switch method, a resistance film method, a surface acoustic wave method, an infrared method, an electromagnetic induction method, and a capacitance method. You can also

通話部130は、スピーカ131やマイクロホン132を備え、マイクロホン132を通じて入力されたユーザの音声を主制御部100にて処理可能な音声データに変換して主制御部100に出力し、無線通信部110或いは外部入出力部160により受信された音声データを復号してスピーカ131から出力するものである。また、図30に示すように、例えば、スピーカ131を表示入力部120が設けられた面と同じ面に搭載し、マイクロホン132を筐体102の側面に搭載することができる。   The call unit 130 includes a speaker 131 and a microphone 132, converts user's voice input through the microphone 132 into voice data that can be processed by the main control unit 100, and outputs the voice data to the main control unit 100. Alternatively, the audio data received by the external input / output unit 160 is decoded and output from the speaker 131. As shown in FIG. 30, for example, the speaker 131 can be mounted on the same surface as the surface on which the display input unit 120 is provided, and the microphone 132 can be mounted on the side surface of the housing 102.

操作部140は、キースイッチなどを用いたハードウェアキーであって、ユーザからの指示を受け付けるものである。例えば、図30に示すように、操作部140は、スマートフォン101の筐体102の側面に搭載され、指などで押下されるとオンとなり、指を離すとバネなどの復元力によってオフ状態となる押しボタン式のスイッチである。   The operation unit 140 is a hardware key using a key switch or the like, and receives an instruction from the user. For example, as illustrated in FIG. 30, the operation unit 140 is mounted on the side surface of the housing 102 of the smartphone 101 and is turned on when pressed with a finger or the like, and is turned off when a finger is released with a restoring force such as a spring. It is a push button type switch.

記憶部150は、主制御部100の制御プログラムや制御データ、アプリケーションソフトウェア、通信相手の名称や電話番号などを対応付けたアドレスデータ、送受信した電子メールのデータ、WebブラウジングによりダウンロードしたWebデータや、ダウンロードしたコンテンツデータを記憶し、またストリーミングデータなどを一時的に記憶するものである。また、記憶部150は、スマートフォン内蔵の内部記憶部151と着脱自在な外部メモリスロットを有する外部記憶部152により構成される。なお、記憶部150を構成するそれぞれの内部記憶部151と外部記憶部152は、フラッシュメモリタイプ(flash memory type)、ハードディスクタイプ(hard disk type)、マルチメディアカードマイクロタイプ(multimedia card micro type)、カードタイプのメモリ(例えば、MicroSD(登録商標)メモリ等)、RAM(Random Access Memory)、ROM(Read Only Memory)などの格納媒体を用いて実現される。   The storage unit 150 includes a control program and control data of the main control unit 100, application software, address data in association with the name and telephone number of a communication partner, transmitted / received e-mail data, Web data downloaded by Web browsing, The downloaded content data is stored, and streaming data and the like are temporarily stored. The storage unit 150 includes an internal storage unit 151 with a built-in smartphone and an external storage unit 152 having a removable external memory slot. Each of the internal storage unit 151 and the external storage unit 152 included in the storage unit 150 includes a flash memory type, a hard disk type, a multimedia card micro type, and a multimedia card micro type. It is realized using a storage medium such as a card type memory (for example, MicroSD (registered trademark) memory), a RAM (Random Access Memory), a ROM (Read Only Memory) or the like.

外部入出力部160は、スマートフォン101に連結されるすべての外部機器とのインタフェースの役割を果たすものであり、他の外部機器に通信等(例えば、ユニバーサルシリアルバス(USB)、IEEE1394など)又はネットワーク(例えば、インターネット、無線LAN、ブルートゥース(Bluetooth)(登録商標)、RFID(Radio Frequency Identification)、赤外線通信(Infrared Data Association:IrDA)(登録商標)、UWB(Ultra Wideband)(登録商標)、ジグビー(ZigBee)(登録商標)など)により直接的又は間接的に接続するためのものである。   The external input / output unit 160 serves as an interface with all external devices connected to the smartphone 101, and communicates with other external devices (for example, universal serial bus (USB), IEEE 1394, etc.) or a network. (For example, the Internet, wireless LAN, Bluetooth (registered trademark), RFID (Radio Frequency Identification), Infrared Data Association (IrDA) (registered trademark), UWB (Ultra Wideband) (registered trademark) ZigBee) (registered trademark, etc.) for direct or indirect connection.

スマートフォン101に連結される外部機器としては、例えば、有/無線ヘッドセット、有/無線外部充電器、有/無線データポート、カードソケットを介して接続されるメモリカード(Memory card)やSIM(Subscriber Identity Module Card)/UIM(User Identity Module Card)カード、オーディオ・ビデオI/O(Input/Output)端子を介して接続される外部オーディオ・ビデオ機器、無線接続される外部オーディオ・ビデオ機器、有/無線接続されるスマートフォン、有/無線接続されるパーソナルコンピュータ、有/無線接続されるPDA、有/無線接続されるイヤホンなどがある。外部入出力部は、このような外部機器から伝送を受けたデータをスマートフォン101の内部の各構成要素に伝達することや、スマートフォン101の内部のデータが外部機器に伝送されるようにしてもよい。   As an external device connected to the smartphone 101, for example, a wired / wireless headset, a wired / wireless external charger, a wired / wireless data port, a memory card (Memory card) or SIM (Subscriber) connected via a card socket, for example. Identity Module Card (UIM) / User Identity Module Card (UIM) card, external audio / video equipment connected via audio / video I / O (Input / Output) terminal, external audio / video equipment connected wirelessly, existence / non-existence There are wirelessly connected smart phones, wired / wireless connected personal computers, wired / wireless connected PDAs, wired / wireless earphones, and the like. The external input / output unit may transmit data received from such an external device to each component inside the smartphone 101 or may transmit data inside the smartphone 101 to the external device. .

GPS受信部170は、主制御部100の指示に従って、GPS衛星ST1〜STnから送信されるGPS信号を受信し、受信した複数のGPS信号に基づく測位演算処理を実行し、スマートフォン101の緯度、経度、高度からなる位置を検出する。GPS受信部170は、無線通信部110や外部入出力部160(例えば、無線LAN)から位置情報を取得できる場合には、その位置情報を用いて位置を検出することもできる。   The GPS receiving unit 170 receives GPS signals transmitted from the GPS satellites ST1 to STn in accordance with instructions from the main control unit 100, executes positioning calculation processing based on the received plurality of GPS signals, and calculates the latitude and longitude of the smartphone 101. , Detect the position consisting of altitude. If the GPS receiving unit 170 can acquire position information from the wireless communication unit 110 or the external input / output unit 160 (for example, a wireless LAN), the GPS receiving unit 170 can also detect the position using the position information.

モーションセンサ部180は、例えば、3軸の加速度センサなどを備え、主制御部100の指示に従って、スマートフォン101の物理的な動きを検出する。スマートフォン101の物理的な動きを検出することにより、スマートフォン101の動く方向や加速度が検出される。かかる検出結果は、主制御部100に出力されるものである。   The motion sensor unit 180 includes, for example, a three-axis acceleration sensor, and detects the physical movement of the smartphone 101 in accordance with an instruction from the main control unit 100. By detecting the physical movement of the smartphone 101, the moving direction and acceleration of the smartphone 101 are detected. The detection result is output to the main control unit 100.

電源部190は、主制御部100の指示に従って、スマートフォン101の各部に、バッテリ(図示しない)に蓄えられる電力を供給するものである。   The power supply unit 190 supplies power stored in a battery (not shown) to each unit of the smartphone 101 in accordance with an instruction from the main control unit 100.

主制御部100は、マイクロプロセッサを備え、記憶部150が記憶する制御プログラムや制御データに従って動作し、スマートフォン101の各部を統括して制御するものである。また、主制御部100は、無線通信部110を通じて、音声通信やデータ通信を行うために、通信系の各部を制御する移動通信制御機能と、アプリケーション処理機能を備える。   The main control unit 100 includes a microprocessor, operates according to a control program and control data stored in the storage unit 150, and controls each unit of the smartphone 101 in an integrated manner. In addition, the main control unit 100 includes a mobile communication control function for controlling each unit of the communication system and an application processing function in order to perform voice communication and data communication through the wireless communication unit 110.

アプリケーション処理機能は、記憶部150が記憶するアプリケーションソフトウェアに従って主制御部100が動作することにより実現するものである。アプリケーション処理機能としては、例えば、外部入出力部160を制御して対向機器とデータ通信を行う赤外線通信機能や、電子メールの送受信を行う電子メール機能、Webページを閲覧するWebブラウジング機能などがある。   The application processing function is realized by the main control unit 100 operating according to application software stored in the storage unit 150. Application processing functions include, for example, an infrared communication function that controls the external input / output unit 160 to perform data communication with the opposite device, an e-mail function that transmits and receives e-mails, and a web browsing function that browses web pages. .

また、主制御部100は、受信データやダウンロードしたストリーミングデータなどの画像データ(静止画像や動画像のデータ)に基づいて、映像を表示入力部120に表示する等の画像処理機能を備える。画像処理機能とは、主制御部100が、上記画像データを復号し、かかる復号結果に画像処理を施して、画像を表示入力部120に表示する機能のことをいう。   The main control unit 100 also has an image processing function such as displaying video on the display input unit 120 based on image data (still image or moving image data) such as received data or downloaded streaming data. The image processing function is a function in which the main control unit 100 decodes the image data, performs image processing on the decoding result, and displays an image on the display input unit 120.

さらに、主制御部100は、表示パネル121に対する表示制御と、操作部140、操作パネル122を通じたユーザ操作を検出する操作検出制御を実行する。   Further, the main control unit 100 executes display control for the display panel 121 and operation detection control for detecting a user operation through the operation unit 140 and the operation panel 122.

表示制御の実行により、主制御部100は、アプリケーションソフトウェアを起動するためのアイコンや、スクロールバーなどのソフトウェアキーを表示し、或いは電子メールを作成するためのウィンドウを表示する。なお、スクロールバーとは、表示パネル121の表示領域に収まりきれない大きな画像などについて、画像の表示部分を移動する指示を受け付けるためのソフトウェアキーのことをいう。   By executing the display control, the main control unit 100 displays an icon for starting application software, a software key such as a scroll bar, or a window for creating an e-mail. Note that the scroll bar refers to a software key for accepting an instruction to move the display portion of a large image that does not fit in the display area of the display panel 121.

また、操作検出制御の実行により、主制御部100は、操作部140を通じたユーザ操作を検出したり、操作パネル122を通じて、上記アイコンに対する操作や、上記ウィンドウの入力欄に対する文字列の入力を受け付けたり、或いは、スクロールバーを通じた表示画像のスクロール要求を受け付ける。   In addition, by executing the operation detection control, the main control unit 100 detects a user operation through the operation unit 140, or accepts an operation on the icon or an input of a character string in the input field of the window through the operation panel 122. Or a display image scroll request through a scroll bar.

さらに、操作検出制御の実行により主制御部100は、操作パネル122に対する操作位置が、表示パネル121に重なる重畳部分(表示領域)か、それ以外の表示パネル121に重ならない外縁部分(非表示領域)かを判定し、操作パネル122の感応領域や、ソフトウェアキーの表示位置を制御するタッチパネル制御機能を備える。   Further, by executing the operation detection control, the main control unit 100 causes the operation position with respect to the operation panel 122 to overlap with the display panel 121 (display area) or other outer edge part (non-display area) that does not overlap with the display panel 121. And a touch panel control function for controlling the sensitive area of the operation panel 122 and the display position of the software key.

また、主制御部100は、操作パネル122に対するジェスチャ操作を検出し、検出したジェスチャ操作に応じて、予め設定された機能を実行することもできる。ジェスチャ操作とは、従来の単純なタッチ操作ではなく、指などによって軌跡を描いたり、複数の位置を同時に指定したり、或いはこれらを組み合わせて、複数の位置から少なくとも1つについて軌跡を描く操作を意味する。   The main control unit 100 can also detect a gesture operation on the operation panel 122 and execute a preset function according to the detected gesture operation. Gesture operation is not a conventional simple touch operation, but an operation of drawing a trajectory with at least one position from a plurality of positions by drawing a trajectory with a finger or the like, or specifying a plurality of positions simultaneously. means.

カメラ部141は、CMOSなどの撮像素子を用いて電子撮影するデジタルカメラである。また、カメラ部141は、主制御部100の制御により、撮像によって得た画像データを例えばJPEGなどの圧縮した画像データに変換し、記憶部150に記憶し、外部入出力部160や無線通信部110を通じて出力することができる。図30に示すようにスマートフォン101において、カメラ部141は表示入力部120と同じ面に搭載されているが、カメラ部141の搭載位置はこれに限らず、表示入力部120の背面に搭載されてもよいし、或いは、複数のカメラ部141が搭載されてもよい。なお、複数のカメラ部141が搭載されている場合には、撮影に供するカメラ部141を切り換えて単独にて撮影してもよいし、或いは、複数のカメラ部141を同時に使用して撮影してもよい。   The camera unit 141 is a digital camera that performs electronic photography using an imaging device such as a CMOS. In addition, the camera unit 141 converts image data obtained by imaging into compressed image data such as JPEG under the control of the main control unit 100, stores the compressed image data in the storage unit 150, the external input / output unit 160, the wireless communication unit, and the like. 110 can be output. As shown in FIG. 30, in the smartphone 101, the camera unit 141 is mounted on the same surface as the display input unit 120, but the mounting position of the camera unit 141 is not limited to this, and is mounted on the back surface of the display input unit 120. Alternatively, a plurality of camera units 141 may be mounted. When a plurality of camera units 141 are installed, the camera unit 141 used for shooting may be switched to perform shooting alone, or a plurality of camera units 141 may be used for shooting simultaneously. Also good.

また、カメラ部141はスマートフォン101の各種機能に利用することができる。例えば、表示パネル121にカメラ部141で取得した画像を表示することや、操作パネル122の操作入力の1つとして、カメラ部141の画像を利用することができる。また、GPS受信部170が位置を検出する際に、カメラ部141からの画像を参照して位置を検出することもできる。さらには、カメラ部141からの画像を参照して、3軸の加速度センサを用いずに、或いは、3軸の加速度センサと併用して、スマートフォン101のカメラ部141の光軸方向を判断することや、現在の使用環境を判断することもできる。勿論、カメラ部141からの画像をアプリケーションソフトウェア内で利用することもできる。   The camera unit 141 can be used for various functions of the smartphone 101. For example, an image acquired by the camera unit 141 can be displayed on the display panel 121, or the image of the camera unit 141 can be used as one of operation inputs of the operation panel 122. Further, when the GPS receiving unit 170 detects the position, the position can also be detected with reference to an image from the camera unit 141. Furthermore, referring to the image from the camera unit 141, the optical axis direction of the camera unit 141 of the smartphone 101 is determined without using the triaxial acceleration sensor or in combination with the triaxial acceleration sensor. It is also possible to determine the current usage environment. Of course, the image from the camera unit 141 can also be used in the application software.

その他、静止画又は動画の画像データにGPS受信部170により取得した位置情報、マイクロホン132により取得した音声情報(主制御部等により、音声テキスト変換を行ってテキスト情報となっていてもよい)、モーションセンサ部180により取得した姿勢情報等などを付加して記憶部150に記憶し、外部入出力部160や無線通信部110を通じて出力することもできる。   In addition, the position information acquired by the GPS receiver 170 on the image data of the still image or the moving image, the voice information acquired by the microphone 132 (the voice text may be converted by the main control unit or the like to become text information), Posture information and the like acquired by the motion sensor unit 180 may be added and stored in the storage unit 150 and output through the external input / output unit 160 or the wireless communication unit 110.

上述の画像処理装置31は、例えば主制御部100によって実現可能である。   The above-described image processing apparatus 31 can be realized by the main control unit 100, for example.

2…デジタルカメラ、3…カメラ本体、4…レンズ鏡筒、5…フラッシュ発光部、6…シャッタボタン、7…電源スイッチ、8…表示部、9…操作部、10…メインメモリ、12…レンズ部、14…画素、16…カラーフィルタ、20…メカニカルシャッタ、21…撮像素子、22…プロセス処理部、23…AD変換部、24…バッファメモリ、25…システム制御部、26…シャッタ駆動部、27…レンズ駆動部、28…電源制御部、29…電源、30…制御メモリ、31…画像処理装置、32…圧縮伸張部、33…記憶制御部、34…クロックデバイス、35…表示制御部、36…ユーザインタフェース、40…フラッシュ画像成分取得部、42…フラッシュ補正データ取得部、44…フラッシュ明度補正部、46…ホワイトバランス処理部、47…第1の画像データ抽出部、48…減算器、49…第1の抽出データ調整部、50…第1のホワイトバランス調整部、51…フラッシュ光用WBゲイン記憶部、53…第1の色比データ取得部、54…第1の補正データ算出部、56…第1のデモザイク処理部、57…第1の色比算出部、59…第1の明度指標データ取得部、60…第1の補正データ演算処理部、62…第1の明度データ取得部、63…第1の補正算出部、66…環境光画像成分取得部、68…環境光補正データ取得部、70…環境光明度補正部、72…第2の画像データ抽出部、73…第2の抽出データ調整部、74…第1の減算器、75…第2の減算器、76…基礎データ色比取得部、77…ホワイトバランスゲイン取得部、78…第2のホワイトバランス調整部、80…第2の色比データ取得部、81…第2の補正データ算出部、82…第2のデモザイク処理部、83…第2の色比算出部、84…第2の明度指標データ取得部、85…第2の補正データ演算処理部、86…第2の明度データ取得部、87…第2の補正算出部、88…光源比データ取得部、89…ホワイトバランス演算処理部、100…主制御部、101…スマートフォン、102…筐体、110…無線通信部、120…表示入力部、121…表示パネル、122…操作パネル、130…通話部、131…スピーカ、132…マイクロホン、140…操作部、141…カメラ部、150…記憶部、151…内部記憶部、152…外部記憶部、160…外部入出力部、170…GPS受信部、180…モーションセンサ部、190…電源部   2 ... Digital camera, 3 ... Camera body, 4 ... Lens barrel, 5 ... Flash light emitting unit, 6 ... Shutter button, 7 ... Power switch, 8 ... Display unit, 9 ... Operation unit, 10 ... Main memory, 12 ... Lens Part, 14 pixels, 16 color filter, 20 mechanical shutter, 21 imaging device, 22 process processing unit, 23 AD conversion unit, 24 buffer memory, 25 system control unit, 26 shutter drive unit, DESCRIPTION OF SYMBOLS 27 ... Lens drive part, 28 ... Power supply control part, 29 ... Power supply, 30 ... Control memory, 31 ... Image processing apparatus, 32 ... Compression / decompression part, 33 ... Storage control part, 34 ... Clock device, 35 ... Display control part, 36 ... User interface, 40 ... Flash image component acquisition unit, 42 ... Flash correction data acquisition unit, 44 ... Flash brightness correction unit, 46 ... White balance processing , 47 ... first image data extraction unit, 48 ... subtractor, 49 ... first extraction data adjustment unit, 50 ... first white balance adjustment unit, 51 ... WB light storage unit for flash light, 53 ... first 1 color ratio data acquisition unit, 54 ... first correction data calculation unit, 56 ... first demosaic processing unit, 57 ... first color ratio calculation unit, 59 ... first lightness index data acquisition unit, 60 ... First correction data calculation processing unit, 62... First brightness data acquisition unit, 63... First correction calculation unit, 66 .. Ambient light image component acquisition unit, 68. Degree correction unit, 72 ... second image data extraction unit, 73 ... second extraction data adjustment unit, 74 ... first subtractor, 75 ... second subtractor, 76 ... basic data color ratio acquisition unit, 77 ... White balance gain acquisition unit, 78 ... Second white balance tone 80, second color ratio data acquisition unit, 81, second correction data calculation unit, 82, second demosaic processing unit, 83, second color ratio calculation unit, 84, second brightness index data. Acquisition unit, 85 ... second correction data calculation processing unit, 86 ... second brightness data acquisition unit, 87 ... second correction calculation unit, 88 ... light source ratio data acquisition unit, 89 ... white balance calculation processing unit, 100 DESCRIPTION OF SYMBOLS ... Main control part, 101 ... Smartphone, 102 ... Case, 110 ... Wireless communication part, 120 ... Display input part, 121 ... Display panel, 122 ... Operation panel, 130 ... Call part, 131 ... Speaker, 132 ... Microphone, 140 ... Operation unit 141 ... Camera unit 150 ... Storage unit 151 ... Internal storage unit 152 ... External storage unit 160 ... External input / output unit 170 ... GPS reception unit 180 ... Motion sensor unit 190 ... Power source Part

Claims (31)

フラッシュ光の発光下で被写体を撮影することにより取得された第1の画像データに基づき、前記フラッシュ光による前記被写体の画像成分を示すフラッシュ画像成分データを取得するフラッシュ画像成分取得部と、
前記フラッシュ画像成分データに基づき、前記被写体の色に応じてもたらされる前記フラッシュ画像成分データの明度の相違を反映したフラッシュ補正データを取得するフラッシュ補正データ取得部と、
前記フラッシュ画像成分データ及び前記フラッシュ補正データに基づき、前記被写体の色に応じてもたらされる前記フラッシュ画像成分データの明度の相違が補償されたフラッシュ画像補正成分データを取得するフラッシュ明度補正部と、を備える画像処理装置。
A flash image component acquisition unit that acquires flash image component data indicating an image component of the subject by the flash light based on the first image data acquired by photographing the subject under flash light emission;
Based on the flash image component data, a flash correction data acquisition unit that acquires flash correction data that reflects a difference in brightness of the flash image component data brought about according to the color of the subject;
A flash brightness correction unit that acquires flash image correction component data in which a difference in brightness of the flash image component data caused according to the color of the subject is compensated based on the flash image component data and the flash correction data; An image processing apparatus.
前記フラッシュ画像成分取得部は、前記第1の画像データと、フラッシュ光の非発光下で前記被写体を撮影することにより取得された第2の画像データとの差分を表す第1の差分データから、前記フラッシュ画像成分データを取得する請求項1に記載の画像処理装置。   The flash image component acquisition unit includes first difference data representing a difference between the first image data and second image data acquired by photographing the subject under non-flash light emission. The image processing apparatus according to claim 1, wherein the flash image component data is acquired. 前記フラッシュ画像成分取得部は、第1の発光量のフラッシュ光の発光下で前記被写体を撮影することにより取得された前記第1の画像データと、前記第1の発光量とは異なる第2の発光量のフラッシュ光の発光下で前記被写体を撮影することにより取得された第2の画像データとの差分を表す第1の差分データから、前記フラッシュ画像成分データを取得する請求項1に記載の画像処理装置。   The flash image component acquisition unit is different from the first image data acquired by photographing the subject under the emission of flash light having a first light emission amount and a second light emission amount different from the first light emission amount. 2. The flash image component data according to claim 1, wherein the flash image component data is acquired from first difference data representing a difference from second image data acquired by photographing the subject under the light emission amount of flash light. Image processing device. 前記フラッシュ画像成分取得部は、前記第1の差分データにフラッシュ光用ホワイトバランスゲインを適用することで前記フラッシュ画像成分データを取得する請求項2又は3に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the flash image component acquisition unit acquires the flash image component data by applying a flash light white balance gain to the first difference data. 前記フラッシュ補正データ取得部は、
複数の処理ブロックに区分された前記フラッシュ画像成分データの当該複数の処理ブロックの各々における前記フラッシュ画像成分データの色成分比を表す色比データを取得し、
前記フラッシュ画像成分データの前記色比データに基づいて、前記被写体の色に応じてもたらされる前記フラッシュ画像成分データの前記複数の処理ブロック間における明度の相違を反映した前記フラッシュ補正データを取得する請求項1〜4のいずれか一項に記載の画像処理装置。
The flash correction data acquisition unit
Obtaining color ratio data representing a color component ratio of the flash image component data in each of the plurality of processing blocks of the flash image component data divided into a plurality of processing blocks;
The flash correction data that reflects a difference in lightness among the plurality of processing blocks of the flash image component data that is produced according to the color of the subject is acquired based on the color ratio data of the flash image component data. Item 5. The image processing device according to any one of Items 1 to 4.
前記フラッシュ補正データは、前記フラッシュ画像成分データの明度を示す第1の明度データに適用されることで、前記被写体の色に応じてもたらされる前記フラッシュ画像成分データの明度の相違を補償するデータであり、
前記フラッシュ補正データ取得部は、前記フラッシュ画像成分データの前記複数の処理ブロックの各々に関して前記フラッシュ補正データを取得する請求項5に記載の画像処理装置。
The flash correction data is applied to the first brightness data indicating the brightness of the flash image component data, thereby compensating for the difference in brightness of the flash image component data caused according to the color of the subject. Yes,
The image processing apparatus according to claim 5, wherein the flash correction data acquisition unit acquires the flash correction data for each of the plurality of processing blocks of the flash image component data.
前記フラッシュ補正データ取得部は、無彩色の前記色比データを基準に、前記複数の処理ブロックの各々に関する前記フラッシュ補正データを取得する請求項5又は6に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein the flash correction data acquisition unit acquires the flash correction data relating to each of the plurality of processing blocks based on the color ratio data of an achromatic color. 前記第1の画像データは、複数色のカラーフィルタを含む撮像素子によって取得され、前記フラッシュ画像成分データは当該複数色の各々に関する色成分データを含み、
前記フラッシュ補正データ取得部は、前記色成分データに基づいて、前記複数の処理ブロックの各々における前記フラッシュ画像成分データの前記色比データを取得する請求項5〜7のいずれか一項に記載の画像処理装置。
The first image data is obtained by an image sensor including a plurality of color filters, and the flash image component data includes color component data for each of the plurality of colors,
The flash correction data acquisition unit according to any one of claims 5 to 7, wherein the flash correction data acquisition unit acquires the color ratio data of the flash image component data in each of the plurality of processing blocks based on the color component data. Image processing device.
前記フラッシュ画像成分データの前記色比データは、前記複数の処理ブロックの各々における前記フラッシュ画像成分データの前記複数色の前記色成分データの合計に対する、前記複数色の各々に関する前記フラッシュ画像成分データの前記色成分データの比に基づいている請求項8に記載の画像処理装置。   The color ratio data of the flash image component data includes the flash image component data of each of the plurality of colors with respect to a sum of the color component data of the plurality of colors of the flash image component data in each of the plurality of processing blocks. The image processing apparatus according to claim 8, wherein the image processing apparatus is based on a ratio of the color component data. 前記フラッシュ補正データ取得部は、
前記被写体の色に応じた前記フラッシュ画像成分データの明度を示す明度指標データを前記フラッシュ画像成分データの前記色比データから導き出す演算処理に基づいて、前記複数の処理ブロックの各々における前記フラッシュ画像成分データの前記色比データから、前記複数の処理ブロックの各々における前記フラッシュ画像成分データの前記明度指標データを取得し、
前記複数の処理ブロックの各々における前記複数色の前記色成分データの合計に対する前記複数色の各々に関する前記色成分データの比が相互に等しい無彩色の前記色比データから、当該無彩色に関する前記明度指標データを前記演算処理に基づいて取得し、
前記無彩色に関する前記明度指標データに対する前記複数の処理ブロックの各々における前記フラッシュ画像成分データの前記明度指標データの比に基づいて、前記フラッシュ画像成分データの前記複数の処理ブロックの各々に関する前記フラッシュ補正データを取得する請求項9に記載の画像処理装置。
The flash correction data acquisition unit
The flash image component in each of the plurality of processing blocks based on a calculation process for deriving lightness index data indicating the lightness of the flash image component data according to the color of the subject from the color ratio data of the flash image component data Obtaining the lightness index data of the flash image component data in each of the plurality of processing blocks from the color ratio data of the data;
From the color ratio data of the achromatic color in which the ratio of the color component data for each of the plurality of colors to the sum of the color component data of the plurality of colors in each of the plurality of processing blocks is equal, the lightness for the achromatic color Index data is acquired based on the calculation process,
The flash correction for each of the plurality of processing blocks of the flash image component data based on a ratio of the lightness index data of the flash image component data in each of the plurality of processing blocks to the lightness index data for the achromatic color. The image processing apparatus according to claim 9, which acquires data.
前記複数の処理ブロックの各々は、単一の画素によって構成される請求項5〜10のいずれか一項に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein each of the plurality of processing blocks is configured by a single pixel. 前記複数の処理ブロックの各々は、複数の画素によって構成される請求項5〜10のいずれか一項に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein each of the plurality of processing blocks includes a plurality of pixels. 前記第1の画像データの撮影に使用された撮像素子は複数色のカラーフィルタを含む単板式の撮像素子であり、当該複数色のカラーフィルタは、特定の色パターンの基本配列が繰り返し配置されることで構成され、
前記複数の処理ブロックの各々を構成する前記複数の画素は、前記基本配列を構成する画素に対応する請求項12に記載の画像処理装置。
The image sensor used for capturing the first image data is a single-plate image sensor including a plurality of color filters, and a basic arrangement of specific color patterns is repeatedly arranged in the plurality of color filters. Composed of
The image processing apparatus according to claim 12, wherein the plurality of pixels constituting each of the plurality of processing blocks correspond to pixels constituting the basic array.
環境光による前記被写体の画像成分を示す環境光画像成分データを取得する環境光画像成分取得部と、
前記環境光画像成分データに基づき、前記被写体の色に応じてもたらされる前記環境光画像成分データの明度の相違を反映した環境光補正データを取得する環境光補正データ取得部と、
前記環境光画像成分データ及び前記環境光補正データに基づき、前記被写体の色に応じてもたらされる前記環境光画像成分データの明度の相違が補償された環境光画像補正成分データを取得する環境光明度補正部と、を更に備える請求項5〜13のいずれか一項に記載の画像処理装置。
An ambient light image component acquisition unit for acquiring ambient light image component data indicating an image component of the subject by ambient light;
Based on the ambient light image component data, an ambient light correction data acquisition unit that acquires ambient light correction data that reflects a difference in brightness of the ambient light image component data brought about according to the color of the subject;
Based on the ambient light image component data and the ambient light correction data, ambient light brightness for obtaining ambient light image correction component data in which a difference in brightness of the ambient light image component data caused according to the color of the subject is compensated is obtained. The image processing apparatus according to claim 5, further comprising a correction unit.
前記環境光画像成分取得部は、フラッシュ光の非発光下で前記被写体を撮影することにより取得された第2の画像データを基礎データとして前記環境光画像成分データを取得する請求項14に記載の画像処理装置。   The ambient light image component acquisition unit acquires the ambient light image component data based on second image data acquired by capturing the subject under non-flash light emission as basic data. Image processing device. 前記環境光画像成分取得部は、前記第1の画像データと、前記第1の画像データとフラッシュ光の非発光下で前記被写体を撮影することにより取得された第2の画像データとの差分を表す第1の差分データと、の差分を表す第2の差分データを基礎データとして、前記環境光画像成分データを取得する請求項14に記載の画像処理装置。   The ambient light image component acquisition unit calculates a difference between the first image data, the first image data, and second image data acquired by photographing the subject under non-flash light emission. The image processing device according to claim 14, wherein the ambient light image component data is acquired using second difference data representing a difference between the first difference data to be represented as basic data. 前記環境光画像成分取得部は、
前記複数の処理ブロックの各々における前記基礎データの色成分比を表す色比データを取得し、
前記複数の処理ブロックの各々における前記フラッシュ画像成分データの前記色比データと前記基礎データの前記色比データとに基づいて環境光用ホワイトバランスゲインを取得し、
前記基礎データに前記環境光用ホワイトバランスゲインを適用することで前記環境光画像成分データを取得する請求項15又は16に記載の画像処理装置。
The ambient light image component acquisition unit
Obtaining color ratio data representing a color component ratio of the basic data in each of the plurality of processing blocks;
Obtaining a white balance gain for ambient light based on the color ratio data of the flash image component data and the color ratio data of the basic data in each of the plurality of processing blocks;
The image processing apparatus according to claim 15, wherein the ambient light image component data is acquired by applying the ambient light white balance gain to the basic data.
前記環境光用ホワイトバランスゲインは、前記複数の処理ブロックの各々における前記基礎データの前記色比データに適用されると、前記複数の処理ブロックの各々における前記環境光画像成分データの前記色比データが導き出される請求項17に記載の画像処理装置。   When the ambient light white balance gain is applied to the color ratio data of the basic data in each of the plurality of processing blocks, the color ratio data of the ambient light image component data in each of the plurality of processing blocks The image processing apparatus according to claim 17, wherein: 前記環境光補正データ取得部は、
前記複数の処理ブロックの各々における前記環境光画像成分データの色成分比を表す色比データを取得し、
前記環境光画像成分データの前記色比データに基づいて、前記被写体の色に応じてもたらされる前記環境光画像成分データの前記複数の処理ブロック間における明度の相違を反映した前記環境光補正データを取得する請求項14〜18のいずれか一項に記載の画像処理装置。
The ambient light correction data acquisition unit
Obtaining color ratio data representing a color component ratio of the ambient light image component data in each of the plurality of processing blocks;
Based on the color ratio data of the ambient light image component data, the ambient light correction data reflecting a difference in lightness among the plurality of processing blocks of the ambient light image component data caused according to the color of the subject. The image processing apparatus according to any one of claims 14 to 18, which is acquired.
前記環境光補正データは、前記環境光画像成分データの明度を示す第2の明度データに適用されることで、前記被写体の色に応じてもたらされる前記環境光画像成分データの明度の相違を補償するデータであり、
前記環境光補正データ取得部は、前記環境光画像成分データの前記複数の処理ブロックの各々に関して前記環境光補正データを取得する請求項19に記載の画像処理装置。
The ambient light correction data is applied to second brightness data indicating the brightness of the ambient light image component data, thereby compensating for a difference in brightness of the ambient light image component data caused according to the color of the subject. Data to be
The image processing apparatus according to claim 19, wherein the ambient light correction data acquisition unit acquires the ambient light correction data for each of the plurality of processing blocks of the ambient light image component data.
前記環境光補正データ取得部は、無彩色の前記色比データを基準に、前記複数の処理ブロックの各々に関する前記環境光補正データを取得する請求項19又は20に記載の画像処理装置。   21. The image processing apparatus according to claim 19, wherein the ambient light correction data acquisition unit acquires the ambient light correction data relating to each of the plurality of processing blocks based on the color ratio data of an achromatic color. 前記第1の画像データは、複数色のカラーフィルタを含む撮像素子によって撮影され、前記環境光画像成分データは当該複数色の各々に関する色成分データを含み、
前記環境光補正データ取得部は、前記色成分データに基づいて、前記複数の処理ブロックの各々における前記環境光画像成分データの前記色比データを取得する請求項19〜21のいずれか一項に記載の画像処理装置。
The first image data is captured by an image sensor including a plurality of color filters, and the ambient light image component data includes color component data for each of the plurality of colors,
The ambient light correction data acquisition unit acquires the color ratio data of the ambient light image component data in each of the plurality of processing blocks based on the color component data. The image processing apparatus described.
前記環境光画像成分データの前記色比データは、前記複数の処理ブロックの各々における前記環境光画像成分データの前記複数色の前記色成分データの合計に対する、前記複数色の各々に関する前記環境光画像成分データの前記色成分データの比に基づいている請求項22に記載の画像処理装置。   The color ratio data of the ambient light image component data is the ambient light image relating to each of the plurality of colors with respect to a sum of the color component data of the plurality of colors of the ambient light image component data in each of the plurality of processing blocks. The image processing apparatus according to claim 22, wherein the image processing apparatus is based on a ratio of the color component data of component data. 前記環境光補正データ取得部は、
前記被写体の色に応じた前記環境光画像成分データの明度を示す明度指標データを前記環境光画像成分データの前記色比データから導き出す演算処理に基づいて、前記複数の処理ブロックの各々における前記環境光画像成分データの前記色比データから、前記複数の処理ブロックの各々における前記環境光画像成分データの前記明度指標データを取得し、
前記複数の処理ブロックの各々における前記複数色の前記色成分データの合計に対する前記複数色の各々に関する前記色成分データの比が相互に等しい無彩色の前記色比データから、当該無彩色に関する前記明度指標データを前記演算処理に基づいて取得し、
前記無彩色に関する前記明度指標データに対する前記複数の処理ブロックの各々における前記環境光画像成分データの前記明度指標データの比に基づいて、前記環境光画像成分データの前記複数の処理ブロックの各々に関する前記環境光補正データを取得する請求項23に記載の画像処理装置。
The ambient light correction data acquisition unit
The environment in each of the plurality of processing blocks based on a calculation process for deriving lightness index data indicating the lightness of the ambient light image component data according to the color of the subject from the color ratio data of the ambient light image component data Obtaining the lightness index data of the ambient light image component data in each of the plurality of processing blocks from the color ratio data of the light image component data;
From the color ratio data of the achromatic color in which the ratio of the color component data for each of the plurality of colors to the sum of the color component data of the plurality of colors in each of the plurality of processing blocks is equal, the lightness for the achromatic color Index data is acquired based on the calculation process,
Based on a ratio of the lightness index data of the ambient light image component data in each of the plurality of processing blocks to the lightness index data relating to the achromatic color, the related to each of the plurality of processing blocks of the ambient light image component data The image processing apparatus according to claim 23, wherein ambient light correction data is acquired.
前記フラッシュ画像補正成分データに基づいて、前記第1の画像データのホワイトバランスを調整するホワイトバランス処理部を更に備える請求項1〜24のいずれか一項に記載の画像処理装置。   25. The image processing apparatus according to claim 1, further comprising a white balance processing unit that adjusts a white balance of the first image data based on the flash image correction component data. 前記フラッシュ画像補正成分データ及び前記環境光画像補正成分データに基づいて、前記第1の画像データのホワイトバランスを調整するホワイトバランス処理部を更に備える請求項14〜24のいずれか一項に記載の画像処理装置。   25. The white balance processing unit according to claim 14, further comprising a white balance processing unit that adjusts a white balance of the first image data based on the flash image correction component data and the ambient light image correction component data. Image processing device. 前記明度は輝度である請求項1〜26のいずれか一項に記載の画像処理装置。   27. The image processing apparatus according to claim 1, wherein the brightness is luminance. 撮像素子と、
請求項1〜27のいずれか一項に記載の画像処理装置と、を備える撮像装置。
An image sensor;
An image processing apparatus comprising: the image processing apparatus according to claim 1.
フラッシュ光の発光下で被写体を撮影することにより取得された第1の画像データから、前記フラッシュ光による前記被写体の画像成分を示すフラッシュ画像成分データを取得するステップと、
前記フラッシュ画像成分データに基づき、前記被写体の色に応じてもたらされる前記フラッシュ画像成分データの明度の相違を反映したフラッシュ補正データを取得するステップと、
前記フラッシュ画像成分データ及び前記フラッシュ補正データに基づき、前記被写体の色に応じてもたらされる前記フラッシュ画像成分データの明度の相違が補償されたフラッシュ画像補正成分データを取得するステップと、を備える画像処理方法。
Obtaining flash image component data indicating an image component of the subject by the flash light from first image data obtained by photographing the subject under light emission of flash light;
Obtaining flash correction data reflecting the difference in brightness of the flash image component data brought about according to the color of the subject based on the flash image component data;
Obtaining flash image correction component data in which a difference in brightness of the flash image component data caused according to the color of the subject is compensated based on the flash image component data and the flash correction data. Method.
フラッシュ光の発光下で被写体を撮影することにより取得された第1の画像データから、前記フラッシュ光による前記被写体の画像成分を示すフラッシュ画像成分データを取得する手順と、
前記フラッシュ画像成分データに基づき、前記被写体の色に応じてもたらされる前記フラッシュ画像成分データの明度の相違を反映したフラッシュ補正データを取得する手順と、
前記フラッシュ画像成分データ及び前記フラッシュ補正データに基づき、前記被写体の色に応じてもたらされる前記フラッシュ画像成分データの明度の相違が補償されたフラッシュ画像補正成分データを取得する手順と、をコンピュータに実行させるためのプログラム。
A procedure for acquiring flash image component data indicating an image component of the subject by the flash light from first image data acquired by photographing the subject under flash light emission; and
A procedure for acquiring flash correction data reflecting a difference in brightness of the flash image component data brought about according to the color of the subject based on the flash image component data;
A step of acquiring, in a computer, flash image correction component data in which a difference in brightness of the flash image component data caused according to the color of the subject is compensated based on the flash image component data and the flash correction data. Program to let you.
請求項30に記載のプログラムを記録したコンピュータ読み取り可能な非一時的記録媒体。   A non-transitory computer-readable recording medium on which the program according to claim 30 is recorded.
JP2016532469A 2014-07-08 2015-04-27 Image processing apparatus, imaging apparatus, image processing method, and program Active JP6302555B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2014140430 2014-07-08
JP2014140430 2014-07-08
PCT/JP2015/062696 WO2016006305A1 (en) 2014-07-08 2015-04-27 Image processing apparatus, image capturing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JPWO2016006305A1 JPWO2016006305A1 (en) 2017-04-27
JP6302555B2 true JP6302555B2 (en) 2018-03-28

Family

ID=55063950

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016532469A Active JP6302555B2 (en) 2014-07-08 2015-04-27 Image processing apparatus, imaging apparatus, image processing method, and program

Country Status (4)

Country Link
US (1) US10200663B2 (en)
JP (1) JP6302555B2 (en)
CN (1) CN106576155B (en)
WO (1) WO2016006305A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10129511B2 (en) * 2016-08-01 2018-11-13 Ricoh Company, Ltd. Image processing apparatus, image projection apparatus, and image processing method
JP6778602B2 (en) * 2016-12-14 2020-11-04 三星電子株式会社Samsung Electronics Co.,Ltd. Image pickup device, image data generation method and image data generation program
US11436858B2 (en) * 2017-07-09 2022-09-06 Ringo Ai, Inc. Characterizing reflectance, illuminance, and sensor response for electromagnetic radiation
TWI660633B (en) * 2018-04-13 2019-05-21 瑞昱半導體股份有限公司 White balance calibration method based on skin color data and image processing apparatus thereof
US10386701B1 (en) * 2018-05-29 2019-08-20 Nanning Fugui Precision Industrial Co., Ltd. Mobile device enabling collaboration with flashes of other devices and method thereof
US10447942B1 (en) 2018-06-07 2019-10-15 Qualcomm Incorporated Flash control for video capture
CN108965845B (en) * 2018-08-16 2019-10-01 Oppo广东移动通信有限公司 Image white balance calibration method, apparatus, storage medium and terminal
CN112673310B (en) 2018-09-11 2022-10-28 保富图公司 Computer-implemented method and system for coordinating taking a picture using a camera with a flash pulse that activates at least one flash device
EP3850424A4 (en) * 2018-09-11 2022-05-25 Profoto Aktiebolag A method, software product, camera device and system for determining artificial lighting and camera settings
US11863866B2 (en) 2019-02-01 2024-01-02 Profoto Aktiebolag Housing for an intermediate signal transmission unit and an intermediate signal transmission unit
JP7321772B2 (en) * 2019-05-22 2023-08-07 キヤノン株式会社 Image processing device, image processing method, and program
CN113259556B (en) * 2021-05-06 2023-04-18 深圳市中诺通讯有限公司 Method, device and equipment for eliminating brightness difference and color difference in different areas and storage medium

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003296720A (en) * 2002-04-02 2003-10-17 Nikon Corp Image processor and image processing method
JP4832899B2 (en) * 2006-01-05 2011-12-07 イーストマン コダック カンパニー Gain calculation device
US8248485B2 (en) * 2008-05-14 2012-08-21 Panasonic Corporation Imaging apparatus and imaging method
JP5225137B2 (en) 2009-02-16 2013-07-03 キヤノン株式会社 Imaging apparatus, image processing method, and program
JP5313037B2 (en) * 2009-05-11 2013-10-09 パナソニック株式会社 Electronic camera, image processing apparatus, and image processing method
US8717454B2 (en) * 2009-12-24 2014-05-06 Samsung Electronics Co., Ltd. Image pickup apparatus and image pickup method for adjusting white balance to account for flash and external light sources
JP2012019293A (en) 2010-07-06 2012-01-26 Sony Corp Image processing device, imaging method, imaging program, image processing method and image processing program
JP5687464B2 (en) * 2010-09-29 2015-03-18 オリンパスイメージング株式会社 Imaging apparatus and image processing method
JP4935925B1 (en) * 2010-11-04 2012-05-23 カシオ計算機株式会社 Imaging apparatus, white balance adjustment method, and white balance adjustment program
CN102469243B (en) * 2010-11-04 2014-12-17 卡西欧计算机株式会社 Image capturing apparatus capable of adjusting white balance
CN103167293B (en) * 2011-12-09 2015-07-22 夏普株式会社 Display system
WO2013140958A1 (en) * 2012-03-21 2013-09-26 富士フイルム株式会社 Image display device, photography device, image display system and method
JP6049343B2 (en) * 2012-08-01 2016-12-21 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP2014044345A (en) * 2012-08-28 2014-03-13 Ricoh Co Ltd Imaging apparatus

Also Published As

Publication number Publication date
US10200663B2 (en) 2019-02-05
CN106576155B (en) 2019-04-16
US20170094240A1 (en) 2017-03-30
WO2016006305A1 (en) 2016-01-14
JPWO2016006305A1 (en) 2017-04-27
CN106576155A (en) 2017-04-19

Similar Documents

Publication Publication Date Title
JP6302555B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
US10027938B2 (en) Image processing device, imaging device, image processing method, and image processing program
JP5683745B2 (en) Image display apparatus and method
JP6063092B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP6063093B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
US20160239946A1 (en) Image processing device, imaging apparatus, parameter generating method, image processing method, and program
JP6272486B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP6195633B2 (en) Image processing apparatus and image processing method
JP5768193B2 (en) Image processing apparatus, imaging apparatus, image processing method, and image processing program
JP6911135B2 (en) Imaging equipment, imaging methods, and programs
JP5897769B2 (en) Imaging apparatus, calibration system, and program
US11501412B2 (en) Image processing apparatus, imaging apparatus, image processing method, and image processing program
JPWO2019193889A1 (en) Image alignment aids, methods and programs and imaging devices

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161206

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180302

R150 Certificate of patent or registration of utility model

Ref document number: 6302555

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250