Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5202375B2 - Imaging apparatus, image processing method, and program - Google Patents
[go: Go Back, main page]

JP5202375B2 - Imaging apparatus, image processing method, and program - Google Patents

Imaging apparatus, image processing method, and program Download PDF

Info

Publication number
JP5202375B2
JP5202375B2 JP2009033056A JP2009033056A JP5202375B2 JP 5202375 B2 JP5202375 B2 JP 5202375B2 JP 2009033056 A JP2009033056 A JP 2009033056A JP 2009033056 A JP2009033056 A JP 2009033056A JP 5202375 B2 JP5202375 B2 JP 5202375B2
Authority
JP
Japan
Prior art keywords
image
scene
smear
blocks
block
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.)
Expired - Fee Related
Application number
JP2009033056A
Other languages
Japanese (ja)
Other versions
JP2010193006A (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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2009033056A priority Critical patent/JP5202375B2/en
Publication of JP2010193006A publication Critical patent/JP2010193006A/en
Application granted granted Critical
Publication of JP5202375B2 publication Critical patent/JP5202375B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Description

本発明は、特定のシーンを判別する撮像装置、画像処理装置、画像処理方法、プログラム及びコンピュータ読み取り可能な記憶媒体に関するものである。   The present invention relates to an imaging apparatus, an image processing apparatus, an image processing method, a program, and a computer-readable storage medium that determine a specific scene.

近年、手動でカメラの撮影設定をしなくても自動で撮影シーンを判別することが可能なシーン判別機能を有する撮像装置が普及してきている。シーン判別機能とは、画像内の輝度情報や色情報によって、撮影するシーンが「夜景」、「逆光」、「夕景」などの複数の特定のシーンのうちどのシーンなのかを判別することが可能な機能である。例えば、特定のシーンに対応する輝度情報や色情報の画像内における配置の傾向を考慮し、かつそれらの位置や面積割合の変動をも考慮してシーン判別を行う方法が知られている(特許文献1参照)。   2. Description of the Related Art In recent years, imaging apparatuses having a scene discrimination function that can automatically discriminate a shooting scene without manually setting camera shooting settings have become widespread. With the scene discrimination function, it is possible to discriminate which of the specific scenes, such as “Night Scene”, “Backlight”, “Evening Scene”, etc. Function. For example, a method is known in which scene determination is performed in consideration of a tendency of arrangement of luminance information and color information corresponding to a specific scene in an image, and also taking into account variations in their position and area ratio (patent) Reference 1).

特開2005−310123号公報JP-A-2005-310123

上記のような従来のシーン判別では、輝度情報や色情報をもとに判別を行っている。しかし、シーンによっては太陽などの高輝度被写体を画角内に入れて撮影することがあり、スミアが発生する可能性がある。そうすると、スミアの影響により、高輝度・無彩色領域が増えることがあり、特定のシーンとしての輝度情報、色情報の条件を満たすことができず、結果としてシーンを判別できなくなることがある。   In the conventional scene discrimination as described above, discrimination is performed based on luminance information and color information. However, depending on the scene, a high-intensity subject such as the sun may be taken within the angle of view, and smearing may occur. As a result, the area of high luminance and achromatic color may increase due to the effect of smear, and the conditions of luminance information and color information as a specific scene cannot be satisfied, and as a result, the scene cannot be identified.

本発明はこのような問題に鑑みてなされたものであり、スミアの発生を考慮して特定のシーンを判別することで、高精度なシーン判別を行うことが可能な撮像装置などの提供を目的とする。   The present invention has been made in view of such problems, and it is an object of the present invention to provide an imaging apparatus and the like that can perform high-precision scene determination by determining a specific scene in consideration of occurrence of smear. And

本発明の撮像装置は、画像を取得する撮像手段と、前記画像の輝度情報を取得する輝度情報取得手段と、前記画像の色情報を取得する色情報取得手段と、前記画像でスミアが発生しているスミア領域を検出するスミア領域検出手段と、複数のブロックに分割した前記画像に対するブロックごとの前記輝度情報および前記色情報を見て、所定の条件を満たすブロックの割合が所定の範囲内である場合に特定のシーンであると判別するシーン判別手段と、を有し、前記シーン判別手段が、前記検出されたスミア領域が大きいほど、前記所定の範囲を小さく設定することを特徴とする。
また、本発明の画像処理装置は、画像を取得する画像取得手段と、前記画像の輝度情報を取得する輝度情報取得手段と、前記画像の色情報を取得する色情報取得手段と、前記画像でスミアが発生しているスミア領域を検出するスミア領域検出手段と、複数のブロックに分割した前記画像に対するブロックごとの前記輝度情報および前記色情報を見て、所定の条件を満たすブロックの割合が所定の範囲内である場合に特定のシーンであると判別するシーン判別手段と、を有し、前記シーン判別手段が、前記検出されたスミア領域が大きいほど、前記所定の範囲を小さく設定することを特徴とする。
また、本発明の画像処理方法は、画像を取得する画像取得ステップと、前記画像の輝度情報を取得する輝度情報取得ステップと、前記画像の色情報を取得する色情報取得ステップと、前記画像でスミアが発生しているスミア領域を検出するスミア領域検出ステップと、複数のブロックに分割した前記画像に対するブロックごとの前記輝度情報および前記色情報を見て、所定の条件を満たすブロックの割合が所定の範囲内である場合に特定のシーンであると判別するシーン判別ステップと、を有し、前記シーン判別ステップにおいて、前記スミア領域検出ステップにより検出されたスミア領域が大きいほど、前記所定の範囲を小さく設定することを特徴とする。
また、本発明のプログラムは、画像を取得する画像取得ステップと、前記画像の輝度情報を取得する輝度情報取得ステップと、前記画像の色情報を取得する色情報取得ステップと、前記画像でスミアが発生しているスミア領域を検出するスミア領域検出ステップと、複数のブロックに分割した前記画像に対するブロックごとの前記輝度情報および前記色情報を見て、所定の条件を満たすブロックの割合が所定の範囲内である場合に特定のシーンであると判別するシーン判別ステップと、をコンピュータに実行させるためのプログラムであって、前記シーン判別ステップにおいて、前記スミア領域検出ステップにより検出されたスミア領域が大きいほど、前記所定の範囲を小さく設定することを特徴とする。
また、本発明のコンピュータ読み取り可能な記憶媒体は、上記に記載のプログラムを記憶したコンピュータ読み取り可能な記憶媒体である。
The imaging apparatus according to the present invention includes an imaging unit that acquires an image, a luminance information acquisition unit that acquires luminance information of the image, a color information acquisition unit that acquires color information of the image, and a smear that occurs in the image. The ratio of blocks satisfying a predetermined condition is within a predetermined range by looking at the smear region detecting means for detecting a smear region, and the luminance information and the color information for each block with respect to the image divided into a plurality of blocks. Scene discrimination means for discriminating that the scene is a specific scene in some cases, wherein the scene discrimination means sets the predetermined range smaller as the detected smear area is larger.
The image processing apparatus of the present invention includes an image acquisition unit that acquires an image, a luminance information acquisition unit that acquires luminance information of the image, a color information acquisition unit that acquires color information of the image, and the image. Smear area detection means for detecting a smear area where smear has occurred, and the luminance information and the color information for each block with respect to the image divided into a plurality of blocks, the ratio of blocks satisfying a predetermined condition is predetermined. A scene discriminating unit that discriminates that the scene is a specific scene when it is within the range, wherein the scene discriminating unit sets the predetermined range to be smaller as the detected smear region is larger. Features.
The image processing method of the present invention includes an image acquisition step of acquiring an image, a luminance information acquisition step of acquiring luminance information of the image, a color information acquisition step of acquiring color information of the image, and the image. A smear area detecting step for detecting a smear area where smear has occurred, and the luminance information and the color information for each block with respect to the image divided into a plurality of blocks, and the ratio of blocks satisfying a predetermined condition is predetermined. A scene discrimination step for discriminating that the scene is a specific scene when it is within the range of the range, and in the scene discrimination step, the larger the smear area detected by the smear area detection step, the greater the predetermined range. It is characterized by being set small.
The program of the present invention includes an image acquisition step of acquiring an image, a luminance information acquisition step of acquiring luminance information of the image, a color information acquisition step of acquiring color information of the image, and a smear in the image. A smear region detecting step for detecting a smear region that has occurred, and the luminance information and the color information for each block with respect to the image divided into a plurality of blocks, and the ratio of blocks satisfying a predetermined condition is within a predetermined range A program for causing a computer to execute a scene determination step for determining that the scene is a specific scene, and the larger the smear region detected by the smear region detection step in the scene determination step, The predetermined range is set to be small.
The computer-readable storage medium of the present invention is a computer-readable storage medium storing the program described above.

本発明によれば、スミアの発生している画像であっても、高精度なシーン判別が可能となる。   According to the present invention, it is possible to determine a scene with high accuracy even in an image having smear.

本発明の実施の形態に係るデジタルカメラの機能構成例を示すブロック図である。It is a block diagram which shows the function structural example of the digital camera which concerns on embodiment of this invention. 本発明の実施の形態に係るスミア領域を検出する処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process which detects the smear area | region which concerns on embodiment of this invention. 本発明の実施の形態に係るスミア領域を検出する処理の流れを模式的に示した図である。It is the figure which showed typically the flow of the process which detects the smear area | region which concerns on embodiment of this invention. 本発明の実施の形態に係るシーン判別を行う処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process which performs the scene discrimination | determination based on embodiment of this invention. 本発明の実施の形態に係るシーン判別を行う処理の際に使用する、画像内の各ブロックの関係を示した図である。It is the figure which showed the relationship of each block in an image used in the case of the process which performs the scene discrimination | determination concerning embodiment of this invention. 本発明の実施の形態に係るシーン判別を行う処理の際に使用する、空領域の重心位置の算出を模式的に説明するための図である。It is a figure for demonstrating typically the calculation of the gravity center position of a sky area | region used in the case of the process which performs the scene discrimination | determination concerning embodiment of this invention. 本発明の実施の形態に係るシーン判別を行う処理の際に使用する、彩度のヒストグラムの一例を示した図である。It is the figure which showed an example of the histogram of a saturation used in the case of the process which performs the scene discrimination | determination concerning embodiment of this invention. 本発明の実施の形態に係るシーン判別を行う処理の際に使用する、色相のヒストグラムの一例を示した図である。It is the figure which showed an example of the histogram of the hue used in the case of the process which performs the scene discrimination | determination concerning embodiment of this invention.

<撮像装置の構成>
本実施形態では、実施形態に係る撮像装置の一例として、デジタルカメラ(以下、本デジタルカメラと称する)を用いた場合について説明する。図1は、本デジタルカメラの機能構成例を示すブロック図である。
<Configuration of imaging device>
In the present embodiment, a case where a digital camera (hereinafter referred to as the present digital camera) is used as an example of the imaging apparatus according to the embodiment will be described. FIG. 1 is a block diagram illustrating a functional configuration example of the digital camera.

操作部101は、本デジタルカメラの操作者が本デジタルカメラに対して各種の指示を入力するために操作するスイッチやボタンなどを含んで構成される。操作部101に含まれるものの一つとして、シャッタースイッチがある。このシャッタースイッチが半押しの場合には信号SW1が操作部101から制御部102に対して通知される。また、シャッタースイッチが全押しされている場合には信号SW2が操作部101から制御部102に対して通知される。   The operation unit 101 includes switches and buttons that are operated by an operator of the digital camera to input various instructions to the digital camera. One of the operations included in the operation unit 101 is a shutter switch. When the shutter switch is half-pressed, a signal SW1 is notified from the operation unit 101 to the control unit 102. When the shutter switch is fully pressed, the signal SW2 is notified from the operation unit 101 to the control unit 102.

制御部102は、同図に示す各部の動作を制御するものであり、操作部101などからの指示に応じて各部を制御する。制御部102が上述のように操作部101から信号SW1や信号SW2の通知を受けた場合には、これらに応じた処理を実行するよう各部を制御する。   The control unit 102 controls the operation of each unit shown in the figure, and controls each unit in response to an instruction from the operation unit 101 or the like. When the control unit 102 receives the notification of the signal SW1 and the signal SW2 from the operation unit 101 as described above, each unit is controlled to execute processing according to these notifications.

縦横位置検出部103は、本デジタルカメラの向きが縦撮影位置か横撮影位置かを検出するものである。   The vertical / horizontal position detecting unit 103 detects whether the orientation of the digital camera is a vertical shooting position or a horizontal shooting position.

CCD部104は、レンズ105、露出機構106を介して入射される光を受け、その光量に応じた電荷を蓄積し出力するものである。CCDに代えて、CMOSセンサーを用いても構わない。A/D変換部107は、CCD部104から出力されたアナログ画像信号に対して、サンプリング、ゲイン調整、A/D変換等を行い、デジタル画像信号として出力する。画像処理部108は、A/D変換部107から出力されたデジタル画像信号に対して各種の画像処理を行い、処理済みのデジタル画像信号を出力する。画像処理部108は、例えば、A/D変換部107から受けたデジタル画像信号を、YUV画像信号に変換して出力する。   The CCD unit 104 receives light incident through the lens 105 and the exposure mechanism 106, and accumulates and outputs charges corresponding to the amount of light. A CMOS sensor may be used instead of the CCD. The A / D conversion unit 107 performs sampling, gain adjustment, A / D conversion, and the like on the analog image signal output from the CCD unit 104 and outputs it as a digital image signal. The image processing unit 108 performs various types of image processing on the digital image signal output from the A / D conversion unit 107 and outputs a processed digital image signal. For example, the image processing unit 108 converts the digital image signal received from the A / D conversion unit 107 into a YUV image signal and outputs the YUV image signal.

シーン判別部109は、画像処理部108からデジタル画像信号を取得し(画像取得)このデジタル画像信号をもとに、撮影するシーンが「逆光」、「夕景」などの複数の特定のシーンのうちどのシーンなのかを判別する。シーン判別部109は、例えば画像処理部108から受けたYUV画像信号をもとにシーンを判別する。   The scene determination unit 109 acquires a digital image signal from the image processing unit 108 (image acquisition). Based on the digital image signal, the scene to be photographed is a plurality of specific scenes such as “backlight” and “evening scene”. Determine which scene it is. The scene discrimination unit 109 discriminates a scene based on, for example, a YUV image signal received from the image processing unit 108.

シーン判別部109において特定のシーンが判別されたならば、画像処理部108は、判別されたシーンを撮影するのに最適となるような画像処理を行う。例えば、「逆光」と判断されたのであれば画面中央付近に位置する被写体を、その周囲の領域よりも優先して輝度が適正値に近付くように露出制御したり、「夕景」と判断されたのであれば撮影した画像の赤味が鮮やかになるよう画像の色信号を調整したりする。また、「スポーツ」と判断されたのであれば、被写体像がブレないよう、他のシーンよりも露光時間が短くなるよう露出制御を行い、一度主被写体と判断した被写体を追尾して焦点調節を行うようにする。   If the scene determination unit 109 determines a specific scene, the image processing unit 108 performs image processing that is optimal for photographing the determined scene. For example, if it is determined to be “backlight”, the exposure of a subject located near the center of the screen is controlled so that the brightness approaches an appropriate value in preference to the surrounding area, or “sunset” is determined. If so, the color signal of the image is adjusted so that the reddish color of the photographed image becomes vivid. If it is determined to be “sport”, exposure control is performed so that the exposure time is shorter than in other scenes so that the subject image does not blur, and focus adjustment is performed by tracking the subject that has been determined as the main subject. To do.

スミア検出部110は、画像処理部108から受けたデジタル画像信号をもとにスミア発生の有無および発生している領域を検出し、検出結果をシーン判別部109に出力する。これに応じて、シーン判別部109は、シーン判別処理の態様を切り替えるが、この詳細については後述するものとする。   The smear detection unit 110 detects the presence / absence of smear and the area where the smear has occurred based on the digital image signal received from the image processing unit 108, and outputs the detection result to the scene determination unit 109. In response to this, the scene discriminating unit 109 switches the mode of the scene discrimination processing, and details thereof will be described later.

EF処理部111は、フラッシュ部112に対してフラッシュオンの指示をする。EF処理部111は、制御部102においてフラッシュが必要と判断された場合に、その指示を受け、フラッシュ部112を制御し、フラッシュ部112に発光させる。   The EF processing unit 111 instructs the flash unit 112 to flash on. When the control unit 102 determines that the flash is necessary, the EF processing unit 111 receives the instruction, controls the flash unit 112, and causes the flash unit 112 to emit light.

EVF表示部113は、小型液晶画面などにより構成されており、画像処理部108による処理済みの画像データに従った画像を表示する。フォーマット変換部114は、画像処理部108から出力されたデジタル画像信号(画像データ)のフォーマットをJPEGなどのフォーマットに変換し、画像記録部115に出力する。画像記録部115は、フォーマット変換部114から受けたフォーマット変換済みの画像データを、本デジタルカメラ内の不図示のメモリや、本デジタルカメラに挿入されている外部メモリなどに記録する処理を行う。   The EVF display unit 113 is configured by a small liquid crystal screen or the like, and displays an image according to the image data processed by the image processing unit 108. The format conversion unit 114 converts the format of the digital image signal (image data) output from the image processing unit 108 into a format such as JPEG, and outputs it to the image recording unit 115. The image recording unit 115 performs processing for recording the image data subjected to format conversion received from the format conversion unit 114 in a memory (not shown) in the digital camera, an external memory inserted in the digital camera, or the like.

外部接続部116は、本デジタルカメラをPC(パーソナルコンピュータ)やプリンタといった外部装置に接続するためのインターフェースとして機能する。   The external connection unit 116 functions as an interface for connecting the digital camera to an external device such as a PC (personal computer) or a printer.

AF処理部117は、被写体にピントを合わせるべくレンズ105を動作させ、AE処理部118は、画面が最適な露出になるように露出機構106を制御するものである。   The AF processing unit 117 operates the lens 105 to focus on the subject, and the AE processing unit 118 controls the exposure mechanism 106 so that the screen has an optimal exposure.

本デジタルカメラは、上述のようにして構成されるが、ここで本デジタルカメラを用いて撮像を行う場合の、本デジタルカメラの動作について説明する。   The digital camera is configured as described above. Here, the operation of the digital camera when imaging is performed using the digital camera will be described.

先ず、本デジタルカメラの操作者が、操作部101に含まれている電源スイッチをオンにすると、制御部102はこれを検知し、本デジタルカメラを構成する各部に電源を供給する。本デジタルカメラを構成する各部に電源が供給されると不図示のシャッターが開き、CCD部104に、レンズ105、露出機構106を介して光が入光することになる。CCD部104は、光の入光により溜まった電荷を読み出し、A/D変換部107にアナログ画像信号として出力する。   First, when an operator of the digital camera turns on a power switch included in the operation unit 101, the control unit 102 detects this and supplies power to each unit constituting the digital camera. When power is supplied to each unit constituting the digital camera, a shutter (not shown) is opened, and light enters the CCD unit 104 via the lens 105 and the exposure mechanism 106. The CCD unit 104 reads the electric charge accumulated by the incident light and outputs it to the A / D conversion unit 107 as an analog image signal.

A/D変換部107は、CCD部104から出力されたアナログ画像信号に対して、サンプリング、ゲイン調整、A/D変換などを行い、デジタル画像信号として出力する。このデジタル画像信号は画像処理部108に出力され、画像処理部108は、A/D変換部107から出力されたデジタル画像信号に対して各種画像処理を行い、処理済みのデジタル画像信号を出力する。   The A / D conversion unit 107 performs sampling, gain adjustment, A / D conversion, and the like on the analog image signal output from the CCD unit 104 and outputs it as a digital image signal. The digital image signal is output to the image processing unit 108. The image processing unit 108 performs various image processing on the digital image signal output from the A / D conversion unit 107, and outputs a processed digital image signal. .

シーン判別部109は、画像処理部108から出力されたデジタル画像信号をもとに、撮影するシーンが「逆光」、「夕景」などの複数の特定のシーンのうちどのシーンなのかを判別する。シーン判別部109において特定のシーンが判別されたならば、画像処理部108は、そのシーンを撮影するのに最適となるような画像処理を行うのは、上述した通りである。なお、シーン判別部109は、画像処理部108から出力されたデジタル画像信号から輝度情報および色情報(彩度情報、色相情報を含む)を取得し、これを用いてシーンの判別を行っている。ここで輝度情報および色情報を取得する処理は、本発明でいう輝度情報取得手段および色情報取得手段の処理に対応する。   Based on the digital image signal output from the image processing unit 108, the scene determination unit 109 determines which scene among a plurality of specific scenes such as “backlight” and “evening scene” is to be captured. As described above, when the scene determination unit 109 determines a specific scene, the image processing unit 108 performs image processing that is optimal for photographing the scene. The scene determination unit 109 acquires luminance information and color information (including saturation information and hue information) from the digital image signal output from the image processing unit 108, and uses this to determine the scene. . Here, the process of acquiring the luminance information and the color information corresponds to the process of the luminance information acquisition unit and the color information acquisition unit in the present invention.

また、画像処理部108は、処理済みの画像データをEVF表示部113に出力するので、EVF表示部113は、この処理済みの画像データに従った画像を表示する。また、画像処理部108によって取得された画像データをもとに、AF処理部117は、被写体にピントを合わせるべくレンズ105を動作させ、また、AE処理部118は、画面が最適な露出になるように露出機構106を制御する。   Further, since the image processing unit 108 outputs the processed image data to the EVF display unit 113, the EVF display unit 113 displays an image according to the processed image data. Also, based on the image data acquired by the image processing unit 108, the AF processing unit 117 operates the lens 105 to focus on the subject, and the AE processing unit 118 provides an optimal exposure of the screen. Thus, the exposure mechanism 106 is controlled.

ここまでの処理が完了すると、制御部102は、操作部101に含まれるシャッタースイッチから信号SW1の通知(即ち、シャッタースイッチの半押しの通知)を受けていない限りは、上記処理を繰り返す。一方、制御部102が信号SW1の通知をシャッタースイッチから受けると、この時点における画像データを用いAF、AE処理を行い、撮影に最適なピントおよび露出設定条件を取得する。   When the processing so far is completed, the control unit 102 repeats the above processing as long as the signal SW1 is not notified from the shutter switch included in the operation unit 101 (that is, notification of half-pressing of the shutter switch). On the other hand, when the control unit 102 receives a notification of the signal SW1 from the shutter switch, AF and AE processes are performed using the image data at this time, and the optimum focus and exposure setting conditions are acquired.

そして、制御部102は、シャッタースイッチから信号SW2の通知(即ち、シャッタースイッチの全押しの通知)を受けていない限りは、処理を信号SW1前に戻し、上記処理を繰り返す。   Then, the control unit 102 returns the processing to the signal SW1 and repeats the above processing unless receiving the notification of the signal SW2 from the shutter switch (that is, the notification of full pressing of the shutter switch).

一方、制御部102が信号SW2の通知をシャッタースイッチから受けると、撮影処理に移行し、まずフラッシュを発光するか否かの判断を行う。フラッシュを発光するか否かは、操作部101を用いて予め設定しておき、その設定データを読み取ることで判断するようにしても良いし、また周囲の暗さを検知し自動的に判断するようにしても良い。   On the other hand, when the control unit 102 receives the notification of the signal SW2 from the shutter switch, the control unit 102 shifts to a photographing process and first determines whether or not to emit the flash. Whether or not to emit the flash may be determined in advance by using the operation unit 101 and may be determined by reading the setting data, or may be automatically determined by detecting the darkness of the surroundings. You may do it.

フラッシュを発光するか否かの判断の結果、フラッシュの発光を行う場合には、制御部102はEF処理部111を制御し、フラッシュ部112にプリ発光を行わせ、発光量の算出、EF枠の重み付けなどの処理を行う。そして、プリ発光により計算された発光量でフラッシュ部112を発光させ、画像撮影が行われる。フラッシュ非発光の場合には上記調光制御無しに以下の処理に移行する。   As a result of determining whether or not to emit the flash, when the flash is emitted, the control unit 102 controls the EF processing unit 111 to cause the flash unit 112 to perform pre-emission, calculate the emission amount, and calculate the EF frame. Processing such as weighting is performed. Then, the flash unit 112 is caused to emit light with the light emission amount calculated by the pre-light emission, and image shooting is performed. In the case of non-flash emission, the process proceeds to the following process without the above dimming control.

本撮影にて、外界からの光がレンズ105、露出機構106を介してCCD部104に入光するので、CCD部104を構成する光電変換素子には、入光した光の光量に応じた電荷が溜まる。CCD部104は、溜まった電荷を読み出し、A/D変換部107にアナログ画像信号として出力する。   In the actual photographing, light from the outside world enters the CCD unit 104 via the lens 105 and the exposure mechanism 106. Therefore, the photoelectric conversion element constituting the CCD unit 104 has a charge corresponding to the amount of the incident light. Accumulates. The CCD unit 104 reads the accumulated electric charge and outputs it as an analog image signal to the A / D conversion unit 107.

A/D変換部107は、CCD部104から出力されたアナログ画像信号に対して、サンプリング、ゲイン調整、A/D変換等を行い、デジタル画像信号として出力する。そして、画像処理部108は、A/D変換部107から出力されたデジタル画像信号に対して各種の画像処理を行い、処理済みのデジタル画像信号を出力する。フォーマット変換部114は、デジタル画像信号を出力され、画像処理部108から出力されたデジタル画像信号(画像データ)のフォーマットをJPEGなどのフォーマットに変換し、画像記録部115に出力する。画像記録部115は、フォーマット変換された画像データを所定のメモリに記録する処理を行う。   The A / D conversion unit 107 performs sampling, gain adjustment, A / D conversion, and the like on the analog image signal output from the CCD unit 104 and outputs it as a digital image signal. The image processing unit 108 performs various types of image processing on the digital image signal output from the A / D conversion unit 107, and outputs a processed digital image signal. The format conversion unit 114 outputs the digital image signal, converts the format of the digital image signal (image data) output from the image processing unit 108 into a format such as JPEG, and outputs the converted format to the image recording unit 115. The image recording unit 115 performs a process of recording the format-converted image data in a predetermined memory.

以上説明した処理により、本実施形態に係る本デジタルカメラは撮影処理を行う。ここで、本デジタルカメラは、撮影処理の中で、スミア領域も考慮してシーン判別を行うことで、高精度でシーン判別を行うことが可能となっている。以下、そのスミア領域も考慮し、シーン判別を行う処理の詳細を説明する。なお、スミアとは、CCD部104のある領域に強い光が照射された場合に、電荷が飽和状態となり、他の領域にまで影響を及ぼし、画像において真っ白な色飛び部分が帯状にあらわれてしまうような現象をいう。   Through the processing described above, the digital camera according to the present embodiment performs shooting processing. Here, the digital camera can perform scene determination with high accuracy by performing scene determination in consideration of a smear area during the photographing process. Hereinafter, details of the process for performing scene determination will be described in consideration of the smear region. Note that smear is a state where charges are saturated when a certain area of the CCD unit 104 is irradiated with light, which affects other areas, and a white-colored portion appears in a band shape in the image. Such a phenomenon.

<スミア領域の検出>
本デジタルカメラで行われる、画像内でスミア領域を検出する方法について説明する。図2は本実施形態に係るスミア領域を検出する処理を示すフローチャート、図3はフローチャートの流れを模式的に示した図である。なお、以下の検出に係る処理は、スミア検出部110が実行する。スミア検出部110は制御部102によって制御され処理を実行する。制御部102にはCPUなど含まれており、不図示のROMなどからプログラムを読出し、不図示のRAMなどを作業領域として処理を実行することで、スミア検出部110の処理が実現される。
<Detection of smear area>
A method for detecting a smear area in an image performed by the digital camera will be described. FIG. 2 is a flowchart showing a process for detecting a smear region according to this embodiment, and FIG. 3 is a diagram schematically showing the flow of the flowchart. In addition, the smear detection part 110 performs the process which concerns on the following detection. The smear detection unit 110 is controlled by the control unit 102 and executes processing. The control unit 102 includes a CPU and the like. The processing of the smear detection unit 110 is realized by reading a program from a ROM (not shown) and executing processing using a RAM (not shown) as a work area.

図2のフローチャートは以下のような流れである。
(ステップS201)
先ず、スミア検出部110は、画像内を複数のブロックに分割する。分割数は、例えば、画像内を横方向に15分割、縦方向に9分割の、計135分割としてもよい。図3は、画像を模式的に示したイメージ(301〜306)を示した図であるが、ここで示す例では、画像内を横方向に15分割、縦方向に9分割している。
The flowchart of FIG. 2 is as follows.
(Step S201)
First, the smear detection unit 110 divides the image into a plurality of blocks. The number of divisions may be a total of 135 divisions, for example, 15 divisions in the horizontal direction and 9 divisions in the vertical direction. FIG. 3 is a diagram showing images (301 to 306) schematically showing images. In the example shown here, the image is divided into 15 parts in the horizontal direction and 9 parts in the vertical direction.

(ステップS202)
次にスミア検出部110は、画像内の紙面左上のブロックから水平方向に走査していく(図3、301における矢印参照)。
(Step S202)
Next, the smear detection unit 110 scans in the horizontal direction from the upper left block of the paper in the image (see arrows in FIGS. 3 and 301).

(ステップS203)
次にスミア検出部110は、ブロック内の輝度の平均値を算出して、その値が閾値(TH_SmearY)以上ならばステップS204へ、TH_SmearY未満ならばステップS208へ移行する。
(Step S203)
Next, the smear detection unit 110 calculates the average value of the luminance in the block, and if the value is equal to or greater than the threshold value (TH_SmearY), the process proceeds to step S204, and if less than TH_SmearY, the process proceeds to step S208.

(ステップS204)
ブロックの輝度の平均値がTH_SmearY以上ならば(ステップS203)、スミア検出部110は、そのブロックから垂直方向に走査する(図3、302の矢印参照)。
(Step S204)
If the average value of the luminance of the block is equal to or higher than TH_SmearY (step S203), the smear detection unit 110 scans in the vertical direction from the block (see arrows in FIG. 3, 302).

(ステップS205)
次にスミア検出部110は、ステップS203と同様に、ブロック内の輝度の平均値を算出して、その値がTH_SmearY以上ならばステップS206へ、TH_SmearY未満ならばステップS208へ移行する。
(Step S205)
Next, as in step S203, the smear detection unit 110 calculates the average value of the luminance in the block, and if the value is equal to or greater than TH_SmearY, the process proceeds to step S206, and if less than TH_SmearY, proceeds to step S208.

(ステップS206)
ブロックの輝度の平均値がTH_SmearY以上ならば(ステップS205)、スミア検出部110は、垂直方向に走査していく。そして、画像内一番下のブロックまで走査していたらステップS207へ進み、まだ一番下まで走査していない場合はステップS204へ戻る。
(Step S206)
If the average luminance value of the block is equal to or higher than TH_SmearY (step S205), the smear detection unit 110 scans in the vertical direction. If the lowest block in the image has been scanned, the process proceeds to step S207. If the lowest block has not been scanned, the process returns to step S204.

(ステップS207)
ステップS206で一つの列の各ブロックの輝度の平均値がすべてTH_SmearY以上ならば、スミア検出部110は、その列をスミア領域とみなす(図3、303)。そして、スミア領域と判定した領域を記録し、ステップS208へ移行する。
(Step S207)
If the average values of the luminance values of the respective blocks in one column are all equal to or higher than TH_SmearY in step S206, the smear detection unit 110 regards the column as a smear region (FIG. 3, 303). Then, the area determined as the smear area is recorded, and the process proceeds to step S208.

(ステップS208)
そして、スミア検出部110は、画像内の紙面左上のブロックから紙面一番右上のブロックまで水平方向に走査したかどうかを判断する。ブロック内の輝度の平均値がTH_SmearY未満と判断され、画像の紙面一番右のブロックまで走査し終えたらステップS209へ移行する。または、スミア領域があると判断し、紙面一番右上のブロックまで走査し終えたらステップS209へ移行する。まだ紙面一番右のブロックまで走査していない場合はステップS202へ戻り、再び一番上の行を水平方向に走査していく(図3、304の矢印参照)。
(Step S208)
Then, the smear detection unit 110 determines whether or not scanning has been performed in the horizontal direction from the upper left block in the image to the upper right block in the paper. When it is determined that the average value of the luminance in the block is less than TH_SmearY and the scanning to the rightmost block of the image is completed, the process proceeds to step S209. Alternatively, when it is determined that there is a smear area and scanning is completed up to the upper right block on the page, the process proceeds to step S209. If the rightmost block on the page has not been scanned yet, the process returns to step S202, and the top row is scanned again in the horizontal direction (see the arrow in FIG. 3, 304).

(ステップS209)
画像内の紙面一番上の行のブロックをすべて走査したら、スミア検出部110は各スミア領域の幅を算出する(図3、305の両端矢印参照)。算出を終えたらステップS210へ移行する。
(Step S209)
When all the blocks in the top row of the paper in the image are scanned, the smear detection unit 110 calculates the width of each smear region (see double-ended arrows in FIG. 3 and 305). When the calculation is completed, the process proceeds to step S210.

(ステップS210)
次に、スミア検出部110は、スミア発生位置周辺には偽色が生じている可能性があるため、その周辺領域を偽色領域とみなす。偽色領域は、例えば各スミア領域の左右に設定し、左右の幅はスミア領域と同じ幅であるとしてもよい(図3、306、両端矢印A:スミア領域,両端矢印B,C:偽色領域)。
(Step S210)
Next, the smear detection unit 110 regards the peripheral area as a false color area because there is a possibility that a false color is generated around the smear occurrence position. The false color area may be set to the left and right of each smear area, for example, and the left and right widths may be the same width as the smear area (FIG. 3, 306, double-ended arrow A: smear area, double-ended arrows B, C: false color) region).

以上の処理により、スミアの発生している領域を検出することが可能となる。なお、スミアの検出の方法として、CCD部104の有効画素領域外の遮光された垂直オプティカルブラック部の出力レベルをスミアのみの出力信号とみなし、スミア領域を検出する、といったものでもよい。また、ここで説明した処理は、本発明でいうスミア領域検出手段の一処理例に対応するものである。   Through the above processing, it is possible to detect a smeared region. As a smear detection method, the output level of the shielded vertical optical black portion outside the effective pixel region of the CCD unit 104 may be regarded as a smear-only output signal, and the smear region may be detected. The processing described here corresponds to a processing example of a smear region detecting means in the present invention.

<シーン判別>
次に、本デジタルカメラに係る画像から特定のシーンの判別を行う処理を説明する。ここでは、一例として夕景を判別する方法について説明する。図4は、本実施形態に係る夕景を判別する処理を示すフローチャートである。なお、以下の判別に係る処理は、シーン判別部109が実行する。シーン判別部109は制御部102によって制御され処理を実行する。制御部102の処理により、シーン判別部109の処理が実現されることは、上述したスミア検出部110と同様である。
<Scene discrimination>
Next, processing for determining a specific scene from an image related to the digital camera will be described. Here, as an example, a method for determining a sunset scene will be described. FIG. 4 is a flowchart showing processing for determining an evening scene according to the present embodiment. It should be noted that the scene determination unit 109 executes the processes related to the following determination. The scene determination unit 109 is controlled by the control unit 102 and executes processing. The processing of the scene determination unit 109 is realized by the processing of the control unit 102, similarly to the smear detection unit 110 described above.

(ステップS401)
まず、シーン判別部109は、画像内の各画素の被写体輝度値(Bv値)、及び画像の全体の平均輝度値を算出する。また、画像内を複数領域に分割してそれぞれの領域における被写体距離(距離情報)を算出する。そして、これらがすべて夕景判別へと進むための条件を満たすか否かを判定する。ここで条件を満たすか否かについては、予め所定の閾値が設定されているものとする。満たさない場合は夕景判別を中止し、不図示の別のシーンの判別へと処理を進める。
(Step S401)
First, the scene determination unit 109 calculates the subject luminance value (Bv value) of each pixel in the image and the average luminance value of the entire image. Further, the image is divided into a plurality of regions, and the subject distance (distance information) in each region is calculated. Then, it is determined whether or not all of these satisfy the conditions for proceeding to evening scene discrimination. Here, it is assumed that a predetermined threshold is set in advance as to whether or not the condition is satisfied. If not satisfied, evening scene discrimination is stopped and the process proceeds to discrimination of another scene (not shown).

(ステップS402)
次にシーン判別部109は、画像内を複数のブロックに分割する。分割数は、例えば、上述のスミア領域の検出と同様に、画像内を横方向に15分割、縦方向に9分割の、計135分割としてもよい。
(Step S402)
Next, the scene determination unit 109 divides the image into a plurality of blocks. The number of divisions may be, for example, a total of 135 divisions, 15 divisions in the horizontal direction and 9 divisions in the vertical direction, similar to the detection of the smear region described above.

(ステップS403)
次にシーン判別部109は、ステップS402で得られた各ブロックについて、輝度、彩度並びに色相(輝度情報、色情報)の平均値を計算する。本実施形態では、各ブロックの輝度、彩度、色相の情報から「夕日色ブロック」、「空色ブロック」、「中間色ブロック」、「その他の色ブロック」の4つに分ける。例えば、夕日色ブロックは赤色から黄色に属する色相で彩度が一定範囲内のもの、空色ブロックは青色に属する色相で彩度が一定範囲内のもの、中間色ブロックは赤色から黄色に属する色相だが彩度が夕日色ブロックを満たしていないもの、とする。また、その他の色ブロックは、夕日色ブロック、空色ブロック、中間色ブロックのいずれにもあてはまらないものとしてもよい。さらに、輝度値に応じて各ブロックを満たす条件の閾値を決定してもよい。
(Step S403)
Next, the scene determination unit 109 calculates an average value of luminance, saturation, and hue (luminance information, color information) for each block obtained in step S402. In the present embodiment, information on luminance, saturation, and hue of each block is divided into “sunset color block”, “sky blue block”, “intermediate color block”, and “other color blocks”. For example, a sunset color block is a hue belonging to red to yellow and has a saturation in a certain range, a sky blue block is a hue belonging to blue and having a saturation in a certain range, and an intermediate color block is a hue belonging to red to yellow but having a saturation. Suppose that the degree does not satisfy the sunset color block. The other color blocks may not be applied to any of the sunset color block, sky blue block, and intermediate color block. Further, a threshold value for satisfying each block may be determined according to the luminance value.

(ステップS404)
次にシーン判別部109は、スミア領域と偽色領域の判別を行う。スミア領域を検出したか否かについては、図2に示した方法により判別する。
(Step S404)
Next, the scene determination unit 109 determines a smear area and a false color area. Whether or not the smear region is detected is determined by the method shown in FIG.

(ステップS405)
次に、スミアの有無、及び、発生している領域を判別したら、シーン判別部109は、画像内を分割した各ブロックについて、その情報を夕景判別で使用するかどうかを判定する。例えば、夕景判別で使用しないブロックは、低輝度ブロック、高輝度ブロック、白色ブロック、スミア領域ブロック、偽色ブロック、顔領域ブロックとしてもよい。低輝度、高輝度、白色ブロックはそれぞれ各ブロックの輝度値や彩度、色相をもとに決定する。また、被写体の一部である顔部分を検出する顔検出機能を備えていて、その機能により顔が検出されたならば、その領域も使用しないことにしてもよい。これら夕景判別で使用しないブロックは、基本的には、ステップS403において「夕日色ブロック」、「空色ブロック」および「中間色ブロック」のいずれの条件も満たしていないと判断されており、「その他の色ブロック」に分類されていることになる。これにより、スミア領域など夕景判別に影響を与える可能性のある情報を使用せずにシーンの判別を行うことが可能となり、特定のシーンを高精度で判別できることになる。なお、以降では夕景判別で使用するブロックを「サーチ可能ブロック」と呼ぶことにする。
(Step S405)
Next, when the presence / absence of smear and the area where the smear has occurred are determined, the scene determination unit 109 determines whether or not to use the information for sunset scene determination for each block divided in the image. For example, blocks that are not used in evening scene discrimination may be low luminance blocks, high luminance blocks, white blocks, smear area blocks, false color blocks, and face area blocks. The low luminance, high luminance, and white blocks are determined based on the luminance value, saturation, and hue of each block. Further, if a face detection function for detecting a face portion that is a part of the subject is provided, and the face is detected by this function, the area may not be used. Blocks that are not used in the sunset scene determination are basically determined in step S403 that none of the conditions of “sunset color block”, “sky blue block”, and “intermediate color block” is satisfied. It is classified as “Block”. As a result, it is possible to discriminate a scene without using information that may affect evening scene discrimination such as a smear region, and a specific scene can be discriminated with high accuracy. Hereinafter, a block used for evening scene discrimination will be referred to as a “searchable block”.

ここで図5は、本実施形態における夕景判別を行う際に使用する、画像内の各ブロックの関係を示した図である。   Here, FIG. 5 is a diagram showing the relationship of each block in the image used when performing evening scene discrimination in the present embodiment.

図5に参照されるように、まず、画像内すべてのブロックを夕日色ブロック、中間色ブロック、空色ブロック、その他の色ブロック、の計4種類に分ける。空色ブロックの中でも彩度に応じて高彩度空色ブロック、低彩度空色ブロックに分ける。そして、その他の色ブロックの中から、低輝度ブロック、高輝度ブロック、白色ブロック、スミア領域ブロック、偽色ブロック、顔領域ブロックを抽出し、それらを「サーチ不可能ブロック」とする。   As shown in FIG. 5, first, all blocks in the image are divided into a total of four types: sunset color blocks, intermediate color blocks, sky blue blocks, and other color blocks. The sky blue block is divided into a high saturation sky blue block and a low saturation sky blue block according to the saturation. Then, a low luminance block, a high luminance block, a white block, a smear area block, a false color block, and a face area block are extracted from the other color blocks, and set as “unsearchable blocks”.

また、サーチ不可能ブロック以外を「サーチ可能ブロック」とする。さらに、その他のブロックの中で「サーチ不可能ブロック」と判定されないものを彩度に応じて高彩度ブロック、低彩度ブロックに分ける。なお、上記の空色ブロックの高彩度か低彩度かを判定する閾値と、その他のブロックで高彩度か低彩度かを判定する閾値は、異なる値でもよい。上記の夕日色ブロック、中間色ブロック、空色ブロックおよび低彩度ブロックを「有効ブロック」とする(点線で覆われたもの)。本実施形態では、これらのブロックを適宜選択して夕景判別を実行する。   In addition, blocks other than non-searchable blocks are referred to as “searchable blocks”. Further, among the other blocks, those that are not determined as “unsearchable blocks” are divided into high saturation blocks and low saturation blocks according to the saturation. Note that the threshold value for determining whether the sky blue block has high saturation or low saturation may be different from the threshold value for determining whether the other blocks have high saturation or low saturation. The above sunset color block, intermediate color block, sky blue block, and low saturation block are defined as “effective blocks” (covered with dotted lines). In the present embodiment, these blocks are appropriately selected to execute evening scene discrimination.

(ステップS406)
次にシーン判別部109は、ステップS406以降は、画像内の各ブロックの輝度情報、彩度情報、色相情報を使用する。ここでは、すべてのブロックのうち一定割合以上が一様な情報をもつブロックならば夕景判別の条件を満たさないとみなす。一様な情報とは、各ブロックの輝度情報、彩度情報、色相情報がそれぞれ似たものであることを指す。例えば、一面が赤色の壁を撮影した場合などは、各ブロックが夕日色ブロックの条件を満たしていても、一様な情報を持っているブロックが多く存在すれば夕景として判別しづらくなるといったことが起こりうるからである。
(Step S406)
Next, the scene determination unit 109 uses the luminance information, saturation information, and hue information of each block in the image after step S406. Here, it is regarded that the sunset scene determination condition is not satisfied if a certain percentage or more of all the blocks have uniform information. Uniform information indicates that the luminance information, saturation information, and hue information of each block are similar to each other. For example, when shooting a red wall on one side, even if each block satisfies the sunset color block condition, it will be difficult to distinguish it as an evening scene if there are many blocks with uniform information. This is because it can happen.

(ステップS407)
次にシーン判別部109は、ステップS407で、白色の領域がどの程度あるかを算出する。この領域はステップS405で選択された白色ブロックとする。すべてのブロックのうち一定割合以上が白色ブロックの条件を満たすブロックならば夕景判別の条件を満たさないとみなす。ここで、この判定基準となる割合が示す値は、ステップS404にて判定されたスミア領域および偽色領域が占める幅に応じて変化する。スミア領域および偽色領域を除いた領域では、その領域を占める被写体に応じた輝度情報、彩度情報、色相情報が得られる。これに対して、スミア領域および偽色領域には、スミアの原因となる高輝度被写体が存在する領域だけでなく、その上下の領域も含まれてしまう。すなわち、スミアの原因となる高輝度被写体が存在する上下の領域を占める被写体が、スミアが生じなければ夕日ブロックや空色ブロックの条件を満たすものであったとしても、その列に高輝度被写体が存在したがために、スミア領域または偽色領域となってしまう。このように、スミアが発生することによって、判定対象となるブロック(ここでは白色ブロック)の割合が、スミアが生じない場合に比較して小さくなる可能性があるため、スミア領域の幅が大きくなるほど、上述した判定基準の割合の値を小さくする。勿論、判定対象となるブロックの割合に代えて、判定対象となるブロックの絶対数を判定基準とし、スミア領域の幅が大きくなるほど、判定基準の絶対数の値を小さくするようにしても構わない。このようにすることで、本実施形態では、特定のシーンを一層高精度で判別できるようにしている。
(Step S407)
Next, in step S407, the scene determination unit 109 calculates how much white area is present. This area is the white block selected in step S405. If a certain percentage or more of all the blocks satisfy the condition of the white block, it is regarded that the sunset scene determination condition is not satisfied. Here, the value indicated by the ratio serving as the determination criterion changes according to the width occupied by the smear region and the false color region determined in step S404. In the area excluding the smear area and the false color area, luminance information, saturation information, and hue information corresponding to the subject occupying the area are obtained. On the other hand, the smear region and the false color region include not only the region where the high-luminance subject causing the smear exists but also the upper and lower regions thereof. In other words, even if the subject that occupies the upper and lower areas where the high-brightness subject that causes smear exists satisfies the conditions of the sunset block and sky blue block if there is no smear, there is a high-brightness subject in that row Therefore, it becomes a smear area or a false color area. As described above, since smear is generated, the ratio of blocks to be determined (here, white blocks) may be smaller than when smear does not occur. Therefore, as the width of the smear region increases, The ratio value of the above-described determination criterion is reduced. Of course, instead of the ratio of blocks to be determined, the absolute number of blocks to be determined may be used as a criterion, and the absolute number of the criterion may be reduced as the width of the smear region increases. . In this way, in this embodiment, a specific scene can be discriminated with higher accuracy.

(ステップS408)
次にシーン判別部109は、ステップS408で、低彩度の領域がどの程度あるかを算出する。この領域はステップS405で選択されたその他の色ブロックのうち、サーチ不可能ブロックを満たさず、かつ、彩度が低いブロックとする。サーチ可能ブロックのうち一定割合以上が低彩度ブロックの条件を満たすブロックならば夕景判別の条件を満たさないとみなす。
(Step S408)
Next, in step S408, the scene determination unit 109 calculates how much low saturation is present. This region is a block that does not satisfy the non-searchable block and has low saturation among the other color blocks selected in step S405. If a certain percentage or more of the searchable blocks satisfy the condition of the low saturation block, it is regarded that the sunset scene determination condition is not satisfied.

(ステップS409)
次にシーン判別部109は、ステップS409で、中間色の領域がどの程度あるかを算出する。この領域はステップS405で選択された中間色ブロックとする。有効ブロックのうち一定割合以上が中間色ブロックの条件を満たすブロックならば夕景判別の条件を満たさないとみなす。
(Step S409)
Next, in step S409, the scene determination unit 109 calculates how many intermediate color regions are present. This area is the intermediate color block selected in step S405. If a certain proportion or more of the effective blocks satisfy the condition of the intermediate color block, it is regarded that the sunset scene determination condition is not satisfied.

(ステップS410)
次にシーン判別部109は、ステップS410で、高彩度の空色の領域がどの程度あるかを算出する。この領域はステップS405で選択された空色ブロックのうち、彩度が高いブロックとする。有効ブロックのうち一定割合以上が高彩度の空色ブロックの条件を満たすブロックならば夕景判別の条件を満たさないとみなす。
(Step S410)
Next, in step S410, the scene determination unit 109 calculates how many sky blue regions have high saturation. This region is a block having high saturation among the sky blue blocks selected in step S405. If a certain proportion or more of the effective blocks satisfy the condition of a sky blue block with high saturation, it is considered that the sunset scene determination condition is not satisfied.

(ステップS411)
次にシーン判別部109は、ステップS411で、一定の条件を満たす高彩度の領域がどの程度あるかを算出する。この領域はステップS405で選択されたサーチ可能ブロックのうち、有効ブロックを満たさないブロックとする。サーチ可能ブロック内の一定以上の彩度をもつブロックのうち一定割合以上がその他の色ブロックの条件を満たすブロックならば夕景判別の条件を満たさないとみなす。
(Step S411)
Next, in step S411, the scene determination unit 109 calculates how many high-saturation areas satisfying certain conditions. This area is a block that does not satisfy the valid block among the searchable blocks selected in step S405. If a certain percentage or more of the blocks having a certain saturation in the searchable block satisfy the conditions of the other color blocks, it is regarded that the sunset scene determination condition is not satisfied.

(ステップS412)
次にシーン判別部109は、ステップS412で、空領域の重心位置を算出する。本実施形態では空色であるとみなすブロックの数、及び、配置をもとに、重心位置を算出する。図6は、空領域の重心位置の算出を模式的に説明するための図である。ここでは、まず、図6に示すように空色条件を満たすブロックを計算する(図中、色の異なるブロック)。そして、空色条件を満たすブロック数を各行ごとに求める。各行のブロック数に対して行番号を乗算し、すべての行で足し合わせたものが、重心位置の評価値となる。例えば行番号を画像内下から数えることにすると、評価値が高いほど空領域の重心位置は画像内で上の方になる。なお、縦横位置検出部103により、縦撮影位置であると判断した場合は、各行ではなく各列ごとに空色条件を満たすブロックを足し合わせて重心位置を算出してもよい。ここでは、もし、計算した重心位置が画像上部から一定割合以内ならば夕景判別の条件を満たし、画像下部に近い場合は夕景判別の条件を満たさないとみなす。なお図6には、評価値の計算方法の一例を記載している。
(Step S412)
Next, the scene determination unit 109 calculates the gravity center position of the sky region in step S412. In the present embodiment, the position of the center of gravity is calculated based on the number and arrangement of blocks that are considered to be sky blue. FIG. 6 is a diagram for schematically explaining the calculation of the gravity center position of the sky region. Here, first, as shown in FIG. 6, blocks satisfying the sky blue condition are calculated (blocks having different colors in the figure). Then, the number of blocks satisfying the sky blue condition is obtained for each row. The evaluation value of the barycentric position is obtained by multiplying the number of blocks in each row by the row number and adding up all the rows. For example, if the row numbers are counted from the bottom in the image, the higher the evaluation value, the higher the center of gravity position of the sky region is in the image. When the vertical / horizontal position detection unit 103 determines that the position is the vertical shooting position, the center-of-gravity position may be calculated by adding blocks satisfying the sky blue condition for each column instead of each row. Here, if the calculated position of the center of gravity is within a certain ratio from the upper part of the image, the condition for determining the evening scene is satisfied, and if it is close to the lower part of the image, the condition for determining the evening scene is not satisfied. FIG. 6 shows an example of an evaluation value calculation method.

(ステップS413)
次にシーン判別部109は、ステップS413で、ステップS403で算出された夕日色ブロックを満たすブロックについての彩度情報から彩度のヒストグラムを判定する。図7は、彩度のヒストグラムの一例(701〜705)を示した図である。図7に示す例では、ヒストグラムの横軸が彩度であり、例えば0から100まで5刻みとしてもよい。ヒストグラムの縦軸は有効ブロックに対する夕日色ブロックを満たすブロック数に対する各彩度のブロック数の割合である。
ここでは、702に示すようにヒストグラムの一部が途切れている場合、703に示すようにヒストグラムの幅が一定範囲以内に限られる場合、夕景判別を満たさないとする。さらに、704に示すようにヒストグラムの最大値が一定値以上である場合、705に示すように、ヒストグラムの最大値部分から左右に走査して、単純減少となっていない部分の領域が一定値以上である場合、夕景判別を満たさないとする。つまり、これらの計4つの判定のうち1つでも当てはまれば夕景判別を満たさないとし、例えば701のような所定の形状と判断されるものについては夕景判別を満たすものとする。
(Step S413)
Next, in step S413, the scene determination unit 109 determines a saturation histogram from the saturation information for the block that satisfies the sunset color block calculated in step S403. FIG. 7 is a diagram showing an example (701 to 705) of a saturation histogram. In the example illustrated in FIG. 7, the horizontal axis of the histogram is saturation, and may be, for example, 0 to 100 in increments of 5. The vertical axis of the histogram represents the ratio of the number of blocks of each saturation to the number of blocks satisfying the sunset color block with respect to the effective block.
Here, when a part of the histogram is interrupted as indicated by 702, or when the width of the histogram is limited within a certain range as indicated by 703, it is assumed that the sunset scene determination is not satisfied. Further, when the maximum value of the histogram is equal to or greater than a certain value as indicated by 704, the region of the portion that is not simply decreased is scanned from the maximum value portion of the histogram to the left and right as indicated by 705, and is not less than a certain value. , It is assumed that the evening scene discrimination is not satisfied. That is, if any one of these four determinations is true, the sunset scene determination is not satisfied, and for example, a scene determined to have a predetermined shape such as 701 satisfies the sunset scene determination.

(ステップS414)
次にシーン判別部109は、ステップS414で、特定の条件を満たすブロックについての色相情報から色相のヒストグラムを判定する。ここで、この特定の条件とは、例えば、赤色から黄色に属する色相、低輝度、高輝度、白色、の計4種類の条件のうち一つ以上を満たすもの、としてもよい。図8は、色相のヒストグラムの一例(801〜803)を示した図である。図8に示す例では、ヒストグラムの横軸は色相であり、例えば100から200まで5刻みとしてもよい。ヒストグラムの縦軸は特定の条件を満たすブロック数に対する各色相のブロック数の割合である。また、特定の条件については、例えば、サーチ可能ブロック、低輝度ブロック、高輝度ブロック、白色ブロックのうちいずれかを満たすブロックとしてもよい。
ここでは、802に示すようにヒストグラムの最大値が一定値以上である場合、803に示すように、ヒストグラムの最大値部分から左右に走査して、単純減少となっていない部分の領域が一定値以上ある場合、夕景判別を満たさないとする。つまり、これらの計2つの判定のうち1つでも当てはまれば夕景判別を満たさないとし、例えば801のような所定の形状と判断されるものについては夕景判別を満たすものとする。
(Step S414)
Next, in step S414, the scene determination unit 109 determines a hue histogram from the hue information for a block that satisfies a specific condition. Here, the specific condition may be, for example, a condition that satisfies one or more of four kinds of conditions of hues belonging to red to yellow, low luminance, high luminance, and white. FIG. 8 is a diagram showing an example of a hue histogram (801 to 803). In the example shown in FIG. 8, the horizontal axis of the histogram is the hue, and may be, for example, 100 to 200 in increments of 5. The vertical axis of the histogram is the ratio of the number of blocks of each hue to the number of blocks that satisfy a specific condition. Further, the specific condition may be, for example, a block that satisfies any one of a searchable block, a low luminance block, a high luminance block, and a white block.
Here, when the maximum value of the histogram is equal to or greater than a certain value as indicated by 802, the region of the portion that is not simply decreased is scanned from the maximum value portion of the histogram to the left and right as indicated by 803. In the case where there is the above, it is assumed that the evening scene discrimination is not satisfied. That is, if any one of these two determinations is true, the sunset scene determination is not satisfied, and for example, a scene determined to have a predetermined shape such as 801 satisfies the sunset scene determination.

(ステップS415)
次にシーン判別部109は、ステップS415で、画像内の各ブロックを水平方向に走査し、各ラインにおいて占める割合の多い明るさや色を判別する。本実施形態では、1ラインごとに、低輝度ライン、高輝度ライン、低彩度ライン、空色ライン、夕日色ライン、中間色ライン、その他の色ライン、対象外ラインの計8種類に分類する。分類方法としては、まず各ラインの中で各ブロックを、輝度情報および色情報から複数の種類に分ける。
各ブロックが属する種類には、ステップS405で指定した低輝度ブロック、高輝度ブロック、空色ブロック、夕日色ブロック、中間色ブロック、ステップS408で指定した低彩度ブロック、および、それら以外のその他の色ブロックがある。以上7種類にブロックを分けたら、そこから1ライン内の各分類の割合および一番割合が多い分類を算出し、その結果により各ラインを明るさおよび色に応じて分類する。各ラインの分類方法として、例えば、低輝度ブロックが1ライン内で一定割合以上であり他のどの分類よりも割合が多い場合は、そのラインを低輝度ラインとする。同様に高輝度ライン、低彩度ライン、空色ライン、夕日色ライン、中間色ライン、その他の色ラインでも同様の条件を設定する。条件にある一定割合については、それぞれの分類により異なる閾値にしてもよい。この一定割合についても、ステップS404にて判定されたスミア領域の幅が大きくなるほど、その値を小さくする。どのラインにも属さないものを対象外ラインと分類する。なお、縦横位置検出部103からの位置情報により、本デジタルカメラが縦撮影位置であると判断した場合は、水平方向ではなく垂直方向に変更して画像内の各ブロックを走査し、各ラインを分類するようにする。
(Step S415)
Next, in step S415, the scene discrimination unit 109 scans each block in the image in the horizontal direction, and discriminates brightness and color having a large proportion of each line. In this embodiment, each line is classified into a total of eight types: a low luminance line, a high luminance line, a low saturation line, a sky blue line, a sunset color line, an intermediate color line, other color lines, and a non-target line. As a classification method, first, each block in each line is divided into a plurality of types based on luminance information and color information.
The types to which each block belongs include the low luminance block, high luminance block, sky blue block, sunset color block, intermediate color block specified in step S405, low saturation block specified in step S408, and other color blocks other than these. There is. When the blocks are divided into the above seven types, the ratio of each classification in one line and the classification with the highest ratio are calculated, and each line is classified according to the brightness and color based on the result. As a method of classifying each line, for example, when a low-luminance block has a certain ratio or more in one line and the ratio is larger than any other classification, the line is set as a low-luminance line. Similarly, similar conditions are set for a high luminance line, a low saturation line, a sky blue line, a sunset color line, an intermediate color line, and other color lines. The certain ratio in the condition may be set to a different threshold depending on each classification. Also for this fixed ratio, the value decreases as the width of the smear region determined in step S404 increases. Those that do not belong to any line are classified as excluded lines. If it is determined from the position information from the vertical / horizontal position detection unit 103 that the digital camera is in the vertical shooting position, it is changed to the vertical direction instead of the horizontal direction, and each block in the image is scanned to scan each line. Try to classify.

(ステップS416〜ステップS419)
次にシーン判別部109は、ステップS416〜ステップS419で、それぞれ画像内の高輝度ライン(S416)、空色ライン(S417)、低彩度ライン(S418)、その他の色ライン(S419)がどの程度あるかを算出する。画像内の水平ラインのうち一定割合以上がそれぞれの条件を満たすラインならば夕景判別の条件を満たさないとみなす。この一定割合については、高輝度ライン、空色ラインなどそれぞれに異なる値を設定してもよい。
(Steps S416 to S419)
Next, in steps S416 to S419, the scene determination unit 109 determines the extent of the high luminance line (S416), sky blue line (S417), low saturation line (S418), and other color lines (S419) in the image. Calculate if there is. If a certain percentage or more of the horizontal lines in the image satisfy the respective conditions, it is regarded that the sunset scene determination condition is not satisfied. About this fixed ratio, you may set a different value to each, such as a high-intensity line and a sky blue line.

(ステップS420)
次に、ステップS420では夕日色ブロックの平均彩度および平均色相を算出する。夕日色ブロックを満たすブロックの平均彩度、平均色相を算出し、それらの値が一定範囲内に収まっていなければ夕景判別の条件を満たさないとみなす。
(Step S420)
Next, in step S420, the average saturation and average hue of the sunset color block are calculated. The average saturation and average hue of the block satisfying the sunset color block are calculated, and if the values do not fall within a certain range, it is regarded that the sunset scene determination condition is not satisfied.

(ステップS421)
次にシーン判別部109は、ステップS421で、夕日色ブロック数がどの程度あるかを算出する。有効ブロックのうち一定割合以下が夕日色条件を満たすブロックならば夕景判別の条件を満たさないとみなす。
(Step S421)
Next, in step S421, the scene determination unit 109 calculates how many sunset color blocks are present. If blocks that satisfy the sunset color condition are below a certain percentage of the effective blocks, it is considered that the sunset scene determination condition is not satisfied.

(ステップS422)
ステップS401、ステップS406〜ステップS421では夕景判別の条件を満たすか否かを計算した。ステップS422では、シーン判別部109は、これまでのすべての夕景判別の条件を満たしたかどうかにより夕景判別結果を決定する。すべての判別条件を満たしていればステップS423へ、一つでも判別条件を満たしていなければステップS424へ移行する。
(Step S422)
In step S401 and step S406 to step S421, it is calculated whether or not the sunset scene determination condition is satisfied. In step S422, the scene determination unit 109 determines the sunset scene determination result based on whether all the previous sunset scene determination conditions are satisfied. If all the determination conditions are satisfied, the process proceeds to step S423. If even one of the determination conditions is not satisfied, the process proceeds to step S424.

(ステップS423、ステップS424)
そしてシーン判別部109は、すべての夕景判別条件を満たしている場合にはそのシーンを夕景と判別する。一方、一つでも夕景判別条件を満たしていなければそのシーンは夕景でないと判別する。
(Step S423, Step S424)
The scene discrimination unit 109 discriminates that scene as an evening scene when all the evening scene discrimination conditions are satisfied. On the other hand, if even one of the scenes does not satisfy the sunset scene determination condition, it is determined that the scene is not a sunset scene.

以上のように夕景を判別する方法について述べたが、それぞれの判別条件に用いられる閾値は撮影時の状況により決定してもよい。また、判別する条件を指定することで夕景以外にも青空、夜景、逆光などを判別するようにしてもよい。さらに、判別するシーンの種類によっては画像内の輝度情報や色情報に限らなくてもよい。青空などのシーン以外にも、被写体距離に応じて接写用のモードであるマクロモードや、画像内に人物の顔が検出された場合には人物モードを設定し、シーン「青空+マクロ」、「夜景+人物」というような複数のシーンの組み合わせとして判別することも可能である。   Although the method for discriminating the sunset scene has been described above, the threshold used for each discrimination condition may be determined according to the situation at the time of shooting. In addition to the evening scene, a blue sky, a night scene, a backlight, or the like may be determined by designating a determination condition. Furthermore, depending on the type of scene to be determined, the information is not limited to luminance information and color information in the image. In addition to scenes such as blue sky, macro mode, which is a close-up mode according to the subject distance, and person mode is set when a person's face is detected in the image, and scenes "blue sky + macro", " It can also be determined as a combination of a plurality of scenes such as “night view + person”.

青空判別の条件としては、例えば、画像内のBv値、被写体と撮像装置の距離、また輝度、彩度、色相情報から算出された青色に属するブロック割合の画像内の分布、加えて色温度を計算した結果を使用しても判別することが可能となる。夜景判別の条件としては、例えば、画像内のBv値、被写体と撮像装置の距離、平均輝度、また輝度、彩度、色相情報から算出された黒色に属するブロック割合の画像内の分布を使用しても判別することが可能となる。さらに、撮像装置の動きや被写体の動きを検出する機能を備えている撮像装置ならば、動き情報をシーン判別条件に加えてもよい。もちろん、青空判別や夜景判別においても高輝度被写体を画角内に入れて撮影することもあるため、スミアの有無に応じて判別方法を切り替えてもよい。   The conditions for determining the blue sky include, for example, the Bv value in the image, the distance between the subject and the imaging device, the distribution in the image of the block ratio belonging to blue calculated from the luminance, saturation, and hue information, and the color temperature. It is also possible to discriminate using the calculated result. As the night scene discrimination conditions, for example, the Bv value in the image, the distance between the subject and the imaging device, the average luminance, and the distribution in the image of the block ratio belonging to black calculated from the luminance, saturation, and hue information are used. It is possible to discriminate even. Further, if the imaging apparatus has a function of detecting the movement of the imaging apparatus and the movement of the subject, the movement information may be added to the scene determination condition. Of course, in the blue sky determination and the night scene determination, a high-luminance subject may be shot within the angle of view, so the determination method may be switched depending on the presence or absence of smear.

<シーン判別時の画像処理>
次に、本デジタルカメラに係るシーン判別時の画像処理の方法について説明する。
<Image processing during scene discrimination>
Next, an image processing method for scene determination according to the digital camera will be described.

本実施形態では、判別されたシーンによって、露出補正、色補正、ガンマ補正、画像内の暗部の補正、のうち、一つ以上を設定する。撮影シーンが夕景であると判別された場合には、露出をややアンダーにし、彩度をやや強くし、ガンマ補正および暗部補正を行う。赤色から黄色に属する領域の彩度をより強調するとともに、露出をややアンダーとすることで、夕日シーンを引き立てることが可能となる。さらに、コントラスト比が低いシーンでは、ガンマ補正により階調を細かく調整することで、コントラストの改善も可能となる。また、露出をややアンダーにすることで発生した画像内の暗い領域についても、暗部補正により改善する効果が期待できる。このように露出や色味などをコントロールした画像処理により、撮像装置での撮影時に、夕景に適した画像処理を行うことが可能となる。   In the present embodiment, one or more of exposure correction, color correction, gamma correction, and dark area correction in the image is set according to the determined scene. If it is determined that the shooting scene is a sunset scene, the exposure is slightly under-exposed, the saturation is slightly increased, and gamma correction and dark part correction are performed. It is possible to enhance the sunset scene by further enhancing the saturation of the region belonging to red to yellow and slightly underexposure. Furthermore, in a scene with a low contrast ratio, it is possible to improve contrast by finely adjusting the gradation by gamma correction. In addition, for dark areas in an image generated by slightly underexposure, it is possible to expect an improvement effect by dark part correction. By performing image processing with exposure and color control in this way, it is possible to perform image processing suitable for a sunset scene when shooting with an imaging device.

以上のように夕景と判別した場合の画像処理の方法について述べたが、夕景以外にも判別する条件を指定することで、そのシーンに応じた画像処理を行ってもよい。例えば、青空シーンを判別した場合には、青色の彩度を強くするなど、シーンに適した画像処理を行うことも可能である。また、夜景シーンを判別した場合には、暗い部分の階調をより下げることで、黒を引き締めるような画像処理をしてもよい。さらに、撮像装置の動きや被写体の動きの情報が夜景の判別の一つとなっていれば、動きのない夜景シーンではスローシャッターに設定してISO感度を低く抑えることで、夜景に適してかつノイズを抑えた画像処理を行うことも可能となる。本実施形態では、露出補正、色補正、ガンマ補正、暗部補正を判別したシーンに応じて行うと記したが、画像処理方法はこれらに限らなくてもよい。   As described above, the image processing method when the scene is determined to be an evening scene has been described. However, the image processing according to the scene may be performed by specifying a condition for determining other than the evening scene. For example, when a blue sky scene is determined, image processing suitable for the scene, such as increasing the saturation of blue, can be performed. Further, when a night scene is determined, image processing may be performed such that black is tightened by lowering the gradation of the dark part. Furthermore, if the information on the movement of the imaging device and the movement of the subject is one of the night scene discriminations, it is suitable for night scenes by setting a slow shutter to keep the ISO sensitivity low in night scenes without movement. It is also possible to perform image processing with reduced image quality. In the present embodiment, it is described that exposure correction, color correction, gamma correction, and dark part correction are performed according to the determined scene, but the image processing method is not limited to these.

以上のように本実施形態に係るデジタルカメラでは、スミア領域の発生を考慮して、特定のシーンを判別するようにした。より詳しくは、所定の輝度情報および色情報を満たす領域が占める割合が所定の範囲内である場合に、夕日判別の条件を満たすと判断するものであって、発生したスミア領域の大きさに応じて、この所定の範囲の大きさを変更するようにした。このようにすることで、本実施形態に係るデジタルカメラでは、高精度なシーン判別を行うことが可能となる。   As described above, in the digital camera according to the present embodiment, a specific scene is determined in consideration of the occurrence of a smear region. More specifically, when the ratio of the area satisfying the predetermined luminance information and color information is within the predetermined range, it is determined that the sunset determination condition is satisfied, and is determined according to the size of the generated smear area. Thus, the size of the predetermined range is changed. By doing so, the digital camera according to the present embodiment can perform scene discrimination with high accuracy.

なお、本発明についての具体的な構成は、上述した実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。   In addition, the specific structure about this invention is not restricted to embodiment mentioned above, The design etc. of the range which does not deviate from the summary of this invention are included.

また、この実施形態の処理は、各機能を具現化したソフトウェアのプログラムコードを記憶した記憶媒体をシステム或は装置に提供してもよい。そして、そのシステム或は装置のコンピュータ(又はCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによって、前述した実施形態の機能を実現することができる。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。このようなプログラムコードを供給するための記憶媒体としては、例えば、フロッピィ(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスクなどを用いることができる。或いは、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROMなどを用いることもできる。   In the processing of this embodiment, a storage medium storing software program codes embodying each function may be provided to the system or apparatus. The functions of the above-described embodiments can be realized by the computer (or CPU or MPU) of the system or apparatus reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. As a storage medium for supplying such a program code, for example, a floppy (registered trademark) disk, a hard disk, an optical disk, a magneto-optical disk, or the like can be used. Alternatively, a CD-ROM, CD-R, magnetic tape, nonvolatile memory card, ROM, or the like can be used.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した各実施形態の機能が実現されるだけではない。そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)などが実際の処理の一部又は全部を行い、その処理によって前述した各実施の形態の機能が実現される場合も含まれている。   The functions of the above-described embodiments are not only realized by executing the program code read by the computer. In some cases, an OS (operating system) running on the computer performs part or all of the actual processing based on the instruction of the program code, and the functions of the above-described embodiments are realized by the processing. include.

更に、コンピュータ読み取り可能な記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書きこまれてもよい。その後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部又は全部を行い、その処理によって前述した各実施の形態の機能が実現される場合も含むものである。   Further, the program code read from the computer-readable storage medium may be written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. After that, the CPU of the function expansion board or function expansion unit performs part or all of the actual processing based on the instruction of the program code, and the functions of the above-described embodiments are realized by the processing. Is also included.

101 操作部
102 制御部
103 縦横位置検出部
104 CCD部
105 レンズ
106 露出機構
107 A/D変換部
108 画像処理部
109 シーン判別部
110 スミア検出部
111 EF処理部
112 フラッシュ部
113 EVF表示部
114 フォーマット変換部
115 画像記録部
116 外部接続部
117 AF処理部
118 AE処理部
101 Operation unit 102 Control unit 103 Vertical / horizontal position detection unit 104 CCD unit 105 Lens 106 Exposure mechanism 107 A / D conversion unit 108 Image processing unit 109 Scene determination unit 110 Smear detection unit 111 EF processing unit 112 Flash unit 113 EVF display unit 114 Format Conversion unit 115 Image recording unit 116 External connection unit 117 AF processing unit 118 AE processing unit

Claims (11)

画像を取得する撮像手段と、
前記画像の輝度情報を取得する輝度情報取得手段と、
前記画像の色情報を取得する色情報取得手段と、
前記画像でスミアが発生しているスミア領域を検出するスミア領域検出手段と、
複数のブロックに分割した前記画像に対するブロックごとの前記輝度情報および前記色情報を見て、所定の条件を満たすブロックの割合が所定の範囲内である場合に特定のシーンであると判別するシーン判別手段と、を有し、
前記シーン判別手段が、前記検出されたスミア領域が大きいほど、前記所定の範囲を小さく設定することを特徴とする撮像装置。
Imaging means for acquiring an image;
Luminance information acquisition means for acquiring luminance information of the image;
Color information acquisition means for acquiring color information of the image;
Smear region detecting means for detecting a smear region where smear is generated in the image;
A scene determination that determines a specific scene when the ratio of blocks that satisfy a predetermined condition is within a predetermined range by looking at the luminance information and the color information for each block with respect to the image divided into a plurality of blocks Means,
The imaging apparatus, wherein the scene determination unit sets the predetermined range to be smaller as the detected smear region is larger.
前記色情報には彩度情報が含まれ、
前記シーン判別手段は、前記所定の条件を満たすブロックの割合が前記所定の範囲内であって、かつ、前記画像に対するブロックごとの彩度についてのヒストグラムが所定の条件を満たす場合に、前記特定のシーンであると判別することを特徴とする請求項1に記載の撮像装置。
The color information includes saturation information,
The scene discriminating means, when the ratio of blocks satisfying the predetermined condition is within the predetermined range and the histogram for the saturation for each block for the image satisfies the predetermined condition, The imaging apparatus according to claim 1, wherein the imaging apparatus is determined to be a scene.
前記色情報には色相情報が含まれ、
前記シーン判別手段は、前記所定の条件を満たすブロックの割合が前記所定の範囲内であって、かつ、前記画像に対するブロックごとの色相についてのヒストグラムが所定の条件を満たす場合に、前記特定のシーンであると判別することを特徴とする請求項1又は2に記載の撮像装置。
The color information includes hue information,
The scene discriminating unit is configured to detect the specific scene when a ratio of blocks satisfying the predetermined condition is within the predetermined range and a histogram of hue for each block with respect to the image satisfies a predetermined condition. The image pickup apparatus according to claim 1, wherein the image pickup apparatus is discriminated as being.
前記シーン判別手段は、前記所定の条件を満たすブロックの割合が前記所定の範囲内であって、かつ、前記画像のブロックを水平に走査して、各ラインに占める割合の多い明るさおよび色を前記輝度情報および前記色情報から導き、明るさおよび色について所定の条件を満たすラインの数が所定の範囲内である場合に、前記特定のシーンであると判別することを特徴とする請求項1〜3のいずれか1項に記載の撮像装置。   The scene discriminating unit scans the blocks of the image horizontally so that the ratio of the blocks satisfying the predetermined condition is within the predetermined range, and obtains brightness and color having a large ratio in each line. 2. The specific scene is determined when the number of lines that satisfy a predetermined condition with respect to brightness and color is within a predetermined range derived from the luminance information and the color information. The imaging apparatus of any one of -3. 縦撮影位置か横撮影位置かを検出する縦横位置検出部を有し、
前記シーン判別手段は、前記縦横位置検出部から出力される位置情報をもとに、前記水平に走査する方向を変更することを特徴とする請求項4に記載の撮像装置。
It has a vertical and horizontal position detector that detects whether it is a vertical or horizontal shooting position.
The imaging apparatus according to claim 4, wherein the scene determination unit changes the horizontal scanning direction based on position information output from the vertical / horizontal position detection unit.
当該撮像装置は、前記シーン判別手段により判別された前記特定のシーンに応じて撮影時の画像処理の方法を切り替えることを特徴とする請求項1〜5のいずれか1項に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the imaging apparatus switches an image processing method at the time of shooting according to the specific scene determined by the scene determination unit. 前記スミア領域検出手段は、前記画像を複数のブロックに分割しブロックごとの輝度情報、色情報、及びブロックの配置を見て、スミア領域を検出することを特徴とする請求項1〜6のいずれか1項に記載の撮像装置。   7. The smear region detecting means divides the image into a plurality of blocks, detects luminance information, color information, and block arrangement for each block, and detects a smear region. The imaging apparatus of Claim 1. 画像を取得する画像取得手段と、
前記画像の輝度情報を取得する輝度情報取得手段と、
前記画像の色情報を取得する色情報取得手段と、
前記画像でスミアが発生しているスミア領域を検出するスミア領域検出手段と、
複数のブロックに分割した前記画像に対するブロックごとの前記輝度情報および前記色情報を見て、所定の条件を満たすブロックの割合が所定の範囲内である場合に特定のシーンであると判別するシーン判別手段と、を有し、
前記シーン判別手段が、前記検出されたスミア領域が大きいほど、前記所定の範囲を小さく設定することを特徴とする画像処理装置。
Image acquisition means for acquiring images;
Luminance information acquisition means for acquiring luminance information of the image;
Color information acquisition means for acquiring color information of the image;
Smear region detecting means for detecting a smear region where smear is generated in the image;
A scene determination that determines a specific scene when the ratio of blocks that satisfy a predetermined condition is within a predetermined range by looking at the luminance information and the color information for each block with respect to the image divided into a plurality of blocks Means,
The image processing apparatus, wherein the scene determination unit sets the predetermined range to be smaller as the detected smear region is larger.
画像を取得する画像取得ステップと、
前記画像の輝度情報を取得する輝度情報取得ステップと、
前記画像の色情報を取得する色情報取得ステップと、
前記画像でスミアが発生しているスミア領域を検出するスミア領域検出ステップと、
複数のブロックに分割した前記画像に対するブロックごとの前記輝度情報および前記色情報を見て、所定の条件を満たすブロックの割合が所定の範囲内である場合に特定のシーンであると判別するシーン判別ステップと、を有し、
前記シーン判別ステップにおいて、前記スミア領域検出ステップにより検出されたスミア領域が大きいほど、前記所定の範囲を小さく設定することを特徴とする画像処理方法。
An image acquisition step of acquiring an image;
A luminance information acquisition step of acquiring luminance information of the image;
A color information acquisition step of acquiring color information of the image;
A smear region detecting step for detecting a smear region in which smear is generated in the image;
A scene determination that determines a specific scene when the ratio of blocks that satisfy a predetermined condition is within a predetermined range by looking at the luminance information and the color information for each block with respect to the image divided into a plurality of blocks And having steps,
In the scene determination step, the predetermined range is set to be smaller as the smear region detected in the smear region detection step is larger.
画像を取得する画像取得ステップと、
前記画像の輝度情報を取得する輝度情報取得ステップと、
前記画像の色情報を取得する色情報取得ステップと、
前記画像でスミアが発生しているスミア領域を検出するスミア領域検出ステップと、
複数のブロックに分割した前記画像に対するブロックごとの前記輝度情報および前記色情報を見て、所定の条件を満たすブロックの割合が所定の範囲内である場合に特定のシーンであると判別するシーン判別ステップと、をコンピュータに実行させるためのプログラムであって、
前記シーン判別ステップにおいて、前記スミア領域検出ステップにより検出されたスミア領域が大きいほど、前記所定の範囲を小さく設定することを特徴とするプログラム。
An image acquisition step of acquiring an image;
A luminance information acquisition step of acquiring luminance information of the image;
A color information acquisition step of acquiring color information of the image;
A smear region detecting step for detecting a smear region in which smear is generated in the image;
A scene determination that determines a specific scene when the ratio of blocks that satisfy a predetermined condition is within a predetermined range by looking at the luminance information and the color information for each block with respect to the image divided into a plurality of blocks A program for causing a computer to execute steps,
In the scene discrimination step, the predetermined range is set to be smaller as the smear region detected in the smear region detection step is larger.
請求項10に記載のプログラムを記憶したコンピュータ読み取り可能な記憶媒体。   A computer-readable storage medium storing the program according to claim 10.
JP2009033056A 2009-02-16 2009-02-16 Imaging apparatus, image processing method, and program Expired - Fee Related JP5202375B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009033056A JP5202375B2 (en) 2009-02-16 2009-02-16 Imaging apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009033056A JP5202375B2 (en) 2009-02-16 2009-02-16 Imaging apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2010193006A JP2010193006A (en) 2010-09-02
JP5202375B2 true JP5202375B2 (en) 2013-06-05

Family

ID=42818610

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009033056A Expired - Fee Related JP5202375B2 (en) 2009-02-16 2009-02-16 Imaging apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP5202375B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5390943B2 (en) * 2008-07-16 2014-01-15 キヤノン株式会社 Image processing apparatus and image processing method
JP5484021B2 (en) * 2009-12-15 2014-05-07 キヤノン株式会社 Image processing apparatus, imaging apparatus, image processing method, image processing program, and recording medium
JP5794413B2 (en) * 2011-02-22 2015-10-14 カシオ計算機株式会社 Image processing apparatus, image processing method, and program
JP6420620B2 (en) * 2014-10-03 2018-11-07 キヤノン株式会社 Image processing apparatus and method, and imaging apparatus

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11298736A (en) * 1998-04-14 1999-10-29 Minolta Co Ltd Image processing method, readable recording medium with image processing program recorded therein and image processor thereof
JP4154847B2 (en) * 2000-09-26 2008-09-24 コニカミノルタビジネステクノロジーズ株式会社 Image processing apparatus, image processing method, and computer-readable recording medium storing image processing program
JP2002271802A (en) * 2001-03-14 2002-09-20 Sony Corp Image processing method and imaging device
JP2005310213A (en) * 2004-04-16 2005-11-04 Mitsubishi Electric Corp Disk unit
JP2008042617A (en) * 2006-08-08 2008-02-21 Eastman Kodak Co Digital camera

Also Published As

Publication number Publication date
JP2010193006A (en) 2010-09-02

Similar Documents

Publication Publication Date Title
JP4217698B2 (en) Imaging apparatus and image processing method
CA2812540C (en) High dynamic range transition
CN101489051B (en) Image processing apparatus and image processing method and image capturing apparatus
JP4657052B2 (en) Digital camera, shooting method, and shooting control program.
US20120133797A1 (en) Imaging apparatus, imaging method and computer program
JP2011139171A (en) Video processing apparatus, and video processing method
JP6210775B2 (en) Imaging apparatus, imaging method, and imaging program
CN111434104B (en) Image processing apparatus, image capturing apparatus, image processing method, and recording medium
JP2014007528A (en) Image processing apparatus and control method thereof
US9122125B2 (en) Image-capturing apparatus and method of controlling the same
JP5202375B2 (en) Imaging apparatus, image processing method, and program
JP4726251B2 (en) Imaging apparatus and image processing method
US7397968B2 (en) System and method for tone composition
JP2005217618A (en) Image processing method, image processing apparatus, and image processing program
JP2007312294A (en) Imaging apparatus, image processing apparatus, image processing method, and image processing program
JP2007221678A (en) Imaging apparatus, image processing apparatus, image processing method, and image processing program
JP2007311895A (en) Imaging apparatus, image processor, image processing method and image processing program
JP4761039B2 (en) Imaging device
JP2007293686A (en) Imaging apparatus, image processing apparatus, image processing method, and image processing program
JP2014068279A (en) Imaging apparatus
JP2013132065A (en) Imaging apparatus and flash control method
JP6561432B2 (en) Exposure calculation device, exposure control device, and camera
JP2014130442A (en) Image processing device, imaging device, and image processing program
JP6011146B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP6601062B2 (en) Imaging control apparatus, imaging control method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130109

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130212

R151 Written notification of patent or utility model registration

Ref document number: 5202375

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20160222

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees