JP2012093904A - Image processing device, image processing method, imaging device, and image processing program - Google Patents

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

Info

Publication number
JP2012093904A
JP2012093904A JP2010239893A JP2010239893A JP2012093904A JP 2012093904 A JP2012093904 A JP 2012093904A JP 2010239893 A JP2010239893 A JP 2010239893A JP 2010239893 A JP2010239893 A JP 2010239893A JP 2012093904 A JP2012093904 A JP 2012093904A
Authority
JP
Japan
Prior art keywords
image data
image
processing
main part
peripheral
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2010239893A
Other languages
Japanese (ja)
Inventor
Seiichiro Suzuki
征一郎 鈴木
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.)
Olympus Corp
Original Assignee
Olympus 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 Olympus Corp filed Critical Olympus Corp
Priority to JP2010239893A priority Critical patent/JP2012093904A/en
Publication of JP2012093904A publication Critical patent/JP2012093904A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To generate an image in which a main subject present in an area of interest is more conspicuous.SOLUTION: An image processing device 100 includes an image data acquisition part 102 which acquires source image data as image data to be processed; an area setting part 104 which sets a main part as a partial area including the main subject in the source image data and a peripheral part as a partial area other than the main subject in the source image data; an image processing execution determination part 106 which determines whether the source image data needs to be corrected based upon information on the color saturation of the main part or/and information on the spatial frequency; and a corrected image data generation part 108 which performs reduction processing on an image of the peripheral part so that the image of the main part is relatively conspicuous when the image processing execution determination part 106 determines that the source image data needs to be corrected. Through the reduction processing, the image of the peripheral part is reduced in at least one of lightness, contrast, and color saturation.

Description

本発明は、画像処理の技術に関し、さらに詳しくは、撮影装置等の画像入力機器で生成された画像の見栄えを改善可能な画像処理の技術に関する。   The present invention relates to an image processing technique, and more particularly to an image processing technique that can improve the appearance of an image generated by an image input device such as a photographing apparatus.

撮影して得られた画像の見栄えを改善する方法として、彩度やコントラストを補正して、鮮鋭感のある画像を得る方法がある。特許文献1には、画像をいくつかの領域に分割し、その中で彩度レベルが最も大きい領域の彩度レベルを基に彩度補正を行う技術が開示される。   As a method of improving the appearance of an image obtained by photographing, there is a method of correcting a saturation and contrast to obtain a sharp image. Patent Document 1 discloses a technique for dividing an image into several regions and performing saturation correction based on the saturation level of the region having the highest saturation level.

特開2000−224607号公報JP 2000-224607 A

一般的には、撮影して得られた画像を観察する際、主要被写体を含む注目領域が際立っていることが好まれる。つまり、注目領域と、注目領域以外の、非注目領域とを対比した場合に、注目領域の画像特徴が、非注目領域の画像特徴よりも強い印象を与える画像が得られることが望ましい。   In general, when observing an image obtained by photographing, it is preferable that a region of interest including a main subject stands out. That is, it is desirable to obtain an image in which the image feature of the attention region gives a stronger impression than the image feature of the non-attention region when the attention region is compared with the non-attention region other than the attention region.

特許文献1に開示される技術は、ビルディングの壁等、彩度が本来あまり高くはない被写体が写っている領域の彩度が過度に高められることが無いようにすることを目的としている。このため、必ずしも注目領域の画像特徴が非注目領域の画像特徴よりも強い印象を与えるようには補正されない場合がある。その結果、注目領域以外の領域が際立ってしまう場合がある。   The technique disclosed in Patent Document 1 is intended to prevent the saturation of an area in which a subject whose saturation is not so high, such as a building wall, from being excessively increased. For this reason, the image feature of the attention area is not necessarily corrected so as to give a stronger impression than the image feature of the non- attention area. As a result, an area other than the attention area may stand out.

本発明は、上記の課題に鑑みてなされたものであり、画像中で注目領域に写る主要被写体がより際立って見える画像を生成可能とする技術を提供することを目的とする。   The present invention has been made in view of the above-described problems, and an object of the present invention is to provide a technique capable of generating an image in which a main subject appearing in a region of interest in an image can be seen more conspicuously.

本発明の第1の態様によれば、処理対象の画像データである元画像データを取得し、前記元画像データに補正処理を行う画像処理装置が、
前記元画像データを取得する画像データ取得部と、
前記元画像データを解析し、前記元画像データ中の主要被写体を含む部分領域である主要部と、前記元画像データ中の前記主要部以外の部分領域である周辺部とを設定する領域設定部と、
前記主要部における彩度の情報と空間周波数の情報のいずれか、または両方の情報に基づいて、前記元画像データの補正の要否を判定する画像処理実行判定部と、
前記画像処理実行判定部により前記元画像データの補正が必要であると判定された場合、前記主要部の画像が相対的に際立つように、前記周辺部の画像に対して低減処理をする補正画像データ生成部であって、前記周辺部の画像の明るさ、コントラスト、および彩度のうち、少なくともいずれかが低下するように前記低減処理をする、補正画像データ生成部とを備える。
According to the first aspect of the present invention, there is provided an image processing apparatus that acquires original image data that is image data to be processed and performs correction processing on the original image data.
An image data acquisition unit for acquiring the original image data;
An area setting unit that analyzes the original image data and sets a main part that is a partial area including a main subject in the original image data and a peripheral part that is a partial area other than the main part in the original image data. When,
An image processing execution determination unit that determines whether or not correction of the original image data is necessary based on either or both of saturation information and spatial frequency information in the main part,
When the image processing execution determination unit determines that the correction of the original image data is necessary, a corrected image that performs reduction processing on the peripheral image so that the image of the main part stands out relatively A data generation unit, comprising: a corrected image data generation unit that performs the reduction process so that at least one of brightness, contrast, and saturation of the peripheral image is decreased.

本発明の第2の態様によれば、処理対象の画像データである元画像データに補正処理を行う画像処理方法が、
前記元画像データを取得する画像データ取得手順と、
前記元画像データを解析し、前記元画像データ中の主要被写体を含む部分領域である主要部と、前記元画像データ中の前記主要部以外の部分領域である周辺部とを設定する領域設定手順と、
前記主要部における彩度の情報と空間周波数の情報のいずれか、または両方の情報に基づいて、前記元画像データの補正の要否を判定する画像処理実行判定手順と、
前記画像処理実行判定手順により前記元画像データの補正が必要であると判定された場合、前記主要部の画像が相対的に際立つように、前記周辺部の画像に対して低減処理をする補正画像データ生成手順であって、前記周辺部の画像の明るさ、コントラスト、および彩度のうち、少なくともいずれかが低下するように前記低減処理をする、補正画像データ生成手順と
を備える。
According to the second aspect of the present invention, there is provided an image processing method for performing correction processing on original image data that is image data to be processed.
An image data acquisition procedure for acquiring the original image data;
An area setting procedure for analyzing the original image data and setting a main part that is a partial area including a main subject in the original image data and a peripheral part that is a partial area other than the main part in the original image data When,
An image processing execution determination procedure for determining whether or not correction of the original image data is necessary based on either or both of saturation information and spatial frequency information in the main part,
When it is determined that the correction of the original image data is necessary by the image processing execution determination procedure, a corrected image that performs a reduction process on the peripheral image so that the image of the main part stands out relatively A data generation procedure, comprising: a corrected image data generation procedure for performing the reduction process so that at least one of brightness, contrast, and saturation of the peripheral image is reduced.

本発明の第3の態様によれば、撮影レンズによって形成された被写体像を光電変換して画像信号を出力可能な撮像素子を備える撮像装置が、
前記撮像素子から出力される前記画像信号から生成された画像データを元画像データとして取得する画像データ取得部と、
前記元画像データを解析し、前記元画像データ中の主要被写体を含む部分領域である主要部と、前記元画像データ中の前記主要部以外の部分領域である周辺部とを設定する領域設定部と、
前記主要部における彩度の情報と空間周波数の情報のいずれか、または両方の情報に基づいて、前記元画像データの補正の要否を判定する画像処理実行判定部と、
前記画像処理実行判定部により前記元画像データの補正が必要であると判定された場合、前記主要部の画像が相対的に際立つように、前記周辺部の画像に対して低減処理をする補正画像データ生成部であって、前記周辺部の画像の明るさ、コントラスト、および彩度のうち、少なくともいずれかが低下するように前記低減処理をする、補正画像データ生成部と
を備える。
According to the third aspect of the present invention, an imaging device including an imaging device capable of photoelectrically converting a subject image formed by a photographing lens and outputting an image signal,
An image data acquisition unit that acquires image data generated from the image signal output from the image sensor as original image data;
An area setting unit that analyzes the original image data and sets a main part that is a partial area including a main subject in the original image data and a peripheral part that is a partial area other than the main part in the original image data. When,
An image processing execution determination unit that determines whether or not correction of the original image data is necessary based on either or both of saturation information and spatial frequency information in the main part,
When the image processing execution determination unit determines that the correction of the original image data is necessary, a corrected image that performs reduction processing on the peripheral image so that the image of the main part stands out relatively A data generation unit, comprising: a corrected image data generation unit that performs the reduction process so that at least one of brightness, contrast, and saturation of the peripheral image is decreased.

本発明の第4の態様によれば、処理対象の画像データである元画像データを補正する処理をコンピュータに実行させるための画像処理プログラムが、
前記元画像データを取得する画像データ取得ステップと、
前記元画像データを解析し、前記元画像データ中の主要被写体を含む部分領域である主要部と、前記元画像データ中の前記主要部以外の部分領域である周辺部とを設定する領域設定ステップと、
前記主要部における彩度の情報と空間周波数の情報のいずれか、または両方の情報に基づいて、前記元画像データの補正の要否を判定する画像処理実行判定ステップと、
前記画像処理実行判定ステップにより前記元画像データの補正が必要であると判定された場合、前記主要部の画像が相対的に際立つように、前記周辺部の画像に対して低減処理をする補正画像データ生成ステップであって、前記周辺部の画像の明るさ、コントラスト、および彩度のうち、少なくともいずれかが低下するように前記低減処理をする、補正画像データ生成ステップと
を備える。
According to the fourth aspect of the present invention, there is provided an image processing program for causing a computer to execute processing for correcting original image data that is image data to be processed.
An image data acquisition step of acquiring the original image data;
A region setting step of analyzing the original image data and setting a main portion that is a partial region including a main subject in the original image data and a peripheral portion that is a partial region other than the main portion in the original image data. When,
An image processing execution determination step for determining whether or not correction of the original image data is necessary based on either or both of the saturation information and the spatial frequency information in the main part,
When it is determined in the image processing execution determination step that the correction of the original image data is necessary, a corrected image that performs reduction processing on the peripheral image so that the image of the main part stands out relatively A data generation step, comprising: a corrected image data generation step that performs the reduction process so that at least one of brightness, contrast, and saturation of the image in the peripheral portion decreases.

本発明によれば、画像中の主要部分が周辺部分に比べて際立って見えるようになり、それにより全体として見栄えのする画像を得ることが可能となる。   According to the present invention, a main part in an image can be seen more conspicuously than a peripheral part, whereby an image that looks good as a whole can be obtained.

画像処理装置の内部構成を概略的に説明するブロック図である。2 is a block diagram schematically illustrating an internal configuration of the image processing apparatus. FIG. 画像処理装置が撮像装置に組み込まれる例を説明するブロック図である。FIG. 25 is a block diagram illustrating an example in which an image processing device is incorporated in an imaging device. 画像処理プログラムを実行するコンピュータによって画像処理装置が実現される例を説明するブロック図である。And FIG. 20 is a block diagram illustrating an example in which an image processing apparatus is realized by a computer that executes an image processing program. 処理対象の画像の一例を示す図であり、主要被写体の写る部分を含む主要部と、主要部以外の部分である周辺部とが設定される様子を概念的に示す図である。It is a figure which shows an example of the image of a process target, and is a figure which shows notionally the mode that the main part including the part in which a main subject is reflected, and the peripheral part which is parts other than a main part are set. 第1の実施の形態の画像処理装置により実行される画像処理の手順を説明するフローチャートである。4 is a flowchart for describing a procedure of image processing executed by the image processing apparatus according to the first embodiment. 図5のフローチャートで示される処理中で行われる画像処理実行判定の処理手順をより詳細に説明するフローチャートである。6 is a flowchart for explaining in more detail a processing procedure of image processing execution determination performed during the processing shown in the flowchart of FIG. 5. 空間周波数のヒストグラムを生成して画像を解析する方法を概念的に説明する図である。It is a figure which illustrates notionally the method of producing | generating the histogram of a spatial frequency and analyzing an image. 周辺部の画像に対して低減処理を行う際の処理パラメータを、周辺部の彩度、周辺部の明るさ、周辺部のコントラストに基づいて設定する例を説明する図である。It is a figure explaining the example which sets the process parameter at the time of performing a reduction process with respect to the image of a peripheral part based on the saturation of a peripheral part, the brightness of a peripheral part, and the contrast of a peripheral part. 主要部からの距離に応じて主要度を設定する例を概念的に説明する図である。It is a figure which illustrates notionally the example which sets a principal degree according to the distance from a principal part. 周辺部の画像を解析した結果に基づいて主要度を増加させる例を説明する図である。It is a figure explaining the example which increases importance based on the result of having analyzed the image of the peripheral part. 元画像データと処理後一時画像データとを合成する際の画像混合比率を主要度に基づいて変化させる例を説明する図である。It is a figure explaining the example which changes the image mixture ratio at the time of synthesize | combining original image data and post-processing temporary image data based on a principal degree. 第1の実施の形態の画像処理装置により元画像データから補正画像データが生成される際の手順を概念的に説明する図である。FIG. 3 is a diagram conceptually illustrating a procedure when corrected image data is generated from original image data by the image processing apparatus according to the first embodiment. 第2の実施の形態の画像処理装置により実行される画像処理の手順を説明するフローチャートである。It is a flowchart explaining the procedure of the image processing performed by the image processing apparatus of 2nd Embodiment. 第2の実施の形態の画像処理装置により元画像データから補正画像データが生成される際の手順を概念的に説明する図である。It is a figure which illustrates notionally the procedure at the time of correction | amendment image data being produced | generated from the original image data by the image processing apparatus of 2nd Embodiment. 第3の実施の形態の画像処理装置により実行される画像処理の手順を説明するフローチャートである。14 is a flowchart for describing a procedure of image processing executed by the image processing apparatus according to the third embodiment. 第3の実施の形態の画像処理装置により元画像データから補正画像データが生成される際の手順を概念的に説明する図である。It is a figure which illustrates notionally the procedure at the time of the correction | amendment image data being produced | generated from the original image data by the image processing apparatus of 3rd Embodiment. 第4の実施の形態の画像処理装置により実行される画像処理の手順を説明するフローチャートである。15 is a flowchart for describing a procedure of image processing executed by the image processing apparatus according to the fourth embodiment. 第4の実施の形態の画像処理装置により元画像データから補正画像データが生成される際の手順を概念的に説明する図である。It is a figure which illustrates notionally the procedure at the time of the correction | amendment image data being produced | generated from the original image data by the image processing apparatus of 4th Embodiment. 様々なヒストグラムを有する画像に対して強調処理をする前、強調処理をした後のヒストグラムが変化する例を説明する図である。It is a figure explaining the example from which the histogram after performing an emphasis process changes before emphasis processing is performed to an image which has various histograms. 主要部の画像データに対して強調処理を行う際の処理パラメータを、主要部の画像データを解析した結果に基づいて設定する例を説明する図である。It is a figure explaining the example which sets the process parameter at the time of performing an emphasis process with respect to the image data of a principal part based on the result of having analyzed the image data of a principal part. 第1の実施の形態で説明した低減処理に加えて強調処理も行い、補正画像データを生成する際の処理手順を概念的に説明する図である。It is a figure which illustrates notionally the processing procedure at the time of performing an emphasis process in addition to the reduction process demonstrated in 1st Embodiment, and producing | generating correction | amendment image data. 第2の実施の形態で説明した低減処理に加えて強調処理も行い、補正画像データを生成する際の処理手順を概念的に説明する図である。It is a figure which illustrates not only the reduction process demonstrated in 2nd Embodiment but also the emphasis process, and conceptually shows the process sequence at the time of producing | generating correction | amendment image data. 第3の実施の形態で説明した低減処理に加えて強調処理も行い、補正画像データを生成する際の処理手順を概念的に説明する図である。It is a figure which illustrates not only the reduction process demonstrated in 3rd Embodiment but a process procedure at the time of also performing an emphasis process and producing | generating correction | amendment image data. 第4の実施の形態で説明した低減処理に加えて強調処理も行い、補正画像データを生成する際の処理手順を概念的に説明する図である。It is a figure which illustrates not only the reduction process demonstrated in 4th Embodiment but also the enhancement process, and the process sequence at the time of producing | generating correction | amendment image data notionally.

図1は、本発明の実施の形態に係る画像処理装置100の概略的構成を説明するブロック図である。画像処理装置100は、画像データ取得部102と、領域設定部104と、画像処理実行判定部106と、補正画像データ生成部108とを備える。   FIG. 1 is a block diagram illustrating a schematic configuration of an image processing apparatus 100 according to an embodiment of the present invention. The image processing apparatus 100 includes an image data acquisition unit 102, an area setting unit 104, an image processing execution determination unit 106, and a corrected image data generation unit 108.

画像データ取得部102は、画像処理装置100で処理される対象の画像データを取得する。この画像データは、静止画の画像データであっても、動画の画像データであってもよい。取得した画像データが静止画の画像データである場合、画像処理装置100は取得した一つのフレームの画像データに対して処理を行う。取得する画像データが一連の複数フレームからなる動画像データである場合、画像処理装置100は取得した一連の複数フレームの画像それぞれに対して処理を行う。   The image data acquisition unit 102 acquires target image data to be processed by the image processing apparatus 100. This image data may be still image data or moving image data. When the acquired image data is still image data, the image processing apparatus 100 performs processing on the acquired image data of one frame. When the image data to be acquired is moving image data including a series of a plurality of frames, the image processing apparatus 100 performs processing on each of the acquired series of images of the plurality of frames.

領域設定部104は、画像データ取得部102で取得した、処理対象の画像データ(以下ではこの画像データを元画像データと称する)を解析し、この元画像データ中で主要被写体が写っている部分を含む領域である主要部と、同じく元画像データ中の主要部以外の領域である周辺部とを設定する。   The area setting unit 104 analyzes the image data to be processed (hereinafter, this image data is referred to as original image data) acquired by the image data acquisition unit 102, and a portion in which the main subject is captured in the original image data And a peripheral part that is an area other than the main part in the original image data.

画像処理実行判定部106は、元画像データ中、主要部に対応する部分の画像データを解析し、この主要部に対応する部分の画像データの彩度の情報と空間周波数の情報のいずれか、または両方の情報に基づいて、元画像データの補正の要否を判定する。   The image processing execution determination unit 106 analyzes the image data of the part corresponding to the main part in the original image data, and either the saturation information or the spatial frequency information of the image data of the part corresponding to the main part, Alternatively, it is determined whether or not correction of the original image data is necessary based on both pieces of information.

補正画像データ生成部108は、画像処理実行判定部106において元画像データの補正が必要と判定された場合、元画像データ処理して補正画像データを生成する。このとき補正画像データ生成部108は、周辺部の画像に対して低減処理を行う。低減処理とは、周辺部の画像の明るさ、コントラスト、および彩度のうち、少なくともいずれかが低下するようにして、結果として主要部の画像が相対的に際立つようにする処理である。   When the image processing execution determination unit 106 determines that correction of the original image data is necessary, the corrected image data generation unit 108 processes the original image data to generate corrected image data. At this time, the corrected image data generation unit 108 performs a reduction process on the peripheral image. The reduction processing is processing in which at least one of the brightness, contrast, and saturation of the peripheral image is decreased, and as a result, the main image is relatively prominent.

補正画像データ生成部108での処理は、元画像データがどのような表色系のデータであるか等に応じて様々なものとすることが可能である。例えば、元画像データがRGBの色空間で規定されるものである場合、R、G、Bの各色座標値を補正する処理を行うことが可能である。また、元画像データがYCbCrの色空間で規定されるものである場合、輝度Yの色座標値のみを補正しても、色相および彩度を規定するCbおよびCrの色座標値のみを補正してもよい。元画像データがLabの色空間で規定されるものである場合も同様で、明度Lの色座標値のみを補正しても、色相および彩度を規定するaおよびbの色座標値のみを補正してもよい。   The processing in the corrected image data generation unit 108 can be various depending on what color system data the original image data is. For example, when the original image data is defined in the RGB color space, it is possible to perform processing for correcting the R, G, and B color coordinate values. Further, when the original image data is defined in the YCbCr color space, even if only the color coordinate value of luminance Y is corrected, only the color coordinate values of Cb and Cr that define the hue and saturation are corrected. May be. The same applies when the original image data is defined in the Lab color space. Even if only the color coordinate value of lightness L is corrected, only the color coordinate values of a and b that define hue and saturation are corrected. May be.

なお、画像データ中の各画素の明るさを定義するものとして輝度および明度がある。輝度は、人の比視感度を加味して(人の眼に知覚される明るさを尺度として)その値が定められる一方、明度は比視感度を加味しない、物理的強度を尺度としてその値が定められるのが一般的である。本明細書においては、これらの輝度および明度を区別する必要がない場合、「明るさ」、あるいは「輝度または明度」という表現を用いる。また、画像データ中の各画素の明るさ(輝度または明度)を規定する情報を本明細書では「明度情報」と称する。   Note that brightness and brightness are defined as the brightness of each pixel in the image data. Luminance is determined by taking into account the human's specific visual sensitivity (measured by the brightness perceived by the human eye), while brightness is taken from the physical intensity as a scale without taking into account the relative visual sensitivity. Is generally defined. In the present specification, the expression “brightness” or “brightness or brightness” is used when it is not necessary to distinguish between these brightness and brightness. Information defining the brightness (luminance or brightness) of each pixel in the image data is referred to as “lightness information” in this specification.

画像処理装置100には、画像記録部160や画像表示部150等が接続されていてもよい。その場合、補正画像データ生成部108で生成された補正画像データは、必要に応じて画像記録部160に記録することが可能となる。あるいは、補正画像データに基づく画像を画像表示部150に表示することも可能である。   An image recording unit 160, an image display unit 150, and the like may be connected to the image processing apparatus 100. In that case, the corrected image data generated by the corrected image data generation unit 108 can be recorded in the image recording unit 160 as necessary. Alternatively, an image based on the corrected image data can be displayed on the image display unit 150.

画像処理装置100は、デジタルスチルカメラ、デジタルムービーカメラ等の画像入力装置内に備えられたものとすることが可能である。あるいは、記録媒体に記録された画像処理プログラムと、この画像処理プログラムを実行するコンピュータとによって画像処理装置100としての機能を実装可能である。   The image processing apparatus 100 can be provided in an image input apparatus such as a digital still camera or a digital movie camera. Alternatively, the functions of the image processing apparatus 100 can be implemented by an image processing program recorded on a recording medium and a computer that executes the image processing program.

図2は、デジタルスチルカメラ、デジタルムービーカメラ等のデジタルカメラ200に画像処理装置100が実装される例を示すブロック図である。デジタルカメラ200は、撮影光学系210と、レンズ駆動部212と、撮像部220と、アナログ・フロントエンド(図2中では「AFE」と表記される)222と、画像記録媒体230と、操作部240と、表示部250と、記憶部260と、CPU270と、デジタル信号処理装置(以下、DSPと称する)290と、システムバス280とを備える。記憶部260は、ROM262とRAM264とを備える。本実施の形態において、画像処理装置100はDSP290に備えられる一つの機能として実装されるものとして説明をする。   FIG. 2 is a block diagram illustrating an example in which the image processing apparatus 100 is mounted on a digital camera 200 such as a digital still camera or a digital movie camera. The digital camera 200 includes a photographing optical system 210, a lens driving unit 212, an imaging unit 220, an analog front end (indicated as “AFE” in FIG. 2) 222, an image recording medium 230, an operation unit. 240, a display unit 250, a storage unit 260, a CPU 270, a digital signal processing device (hereinafter referred to as a DSP) 290, and a system bus 280. The storage unit 260 includes a ROM 262 and a RAM 264. In the present embodiment, the image processing apparatus 100 will be described as being implemented as one function provided in the DSP 290.

レンズ駆動部212、撮像部220、アナログ・フロントエンド222、画像記録媒体230、操作部240、表示部250、記憶部260、CPU270、画像処理装置100は、システムバス280を介して電気的に接続される。RAM264は、CPU270およびDSP290の双方からアクセス可能に構成される。   The lens driving unit 212, the imaging unit 220, the analog front end 222, the image recording medium 230, the operation unit 240, the display unit 250, the storage unit 260, the CPU 270, and the image processing apparatus 100 are electrically connected via the system bus 280. Is done. The RAM 264 is configured to be accessible from both the CPU 270 and the DSP 290.

撮影光学系210は、被写体像を撮像部220の受光エリア上に形成する。レンズ駆動部212は、撮影光学系210内の焦点調節用レンズを駆動する。また、撮影光学系210が可変焦点距離光学系である場合には、撮影光学系210内のレンズ(レンズ群)がレンズ駆動部212によって駆動されて焦点距離を変更することが可能に構成されていてもよい。   The imaging optical system 210 forms a subject image on the light receiving area of the imaging unit 220. The lens driving unit 212 drives a focus adjustment lens in the photographing optical system 210. Further, when the photographing optical system 210 is a variable focal length optical system, the lens (lens group) in the photographing optical system 210 is driven by the lens driving unit 212 so that the focal length can be changed. May be.

撮像部220は、受光エリア上に形成される被写体像を光電変換してアナログ画像信号を生成する。このアナログ画像信号はアナログ・フロントエンド222に入力される。アナログ・フロントエンド222は、撮像部220から入力した画像信号にノイズ低減、増幅、A/D変換等の処理をしてデジタル画像信号を生成する。このデジタル画像信号は、RAM264に一時的に記憶される。   The imaging unit 220 photoelectrically converts a subject image formed on the light receiving area to generate an analog image signal. This analog image signal is input to the analog front end 222. The analog front end 222 performs processing such as noise reduction, amplification, and A / D conversion on the image signal input from the imaging unit 220 to generate a digital image signal. This digital image signal is temporarily stored in the RAM 264.

DSP290は、RAM264に一時的に記憶されたデジタル画像信号に対してデモザイク、階調変換、色バランス補正、シェーディング補正、ノイズ低減等のさまざまなデジタル信号処理を施して画像データを生成する。この画像データは、必要に応じて画像記録媒体230に記録される。また、画像データに基づく画像が表示部250に表示される。画像処理装置100は、上記のように生成された画像データを元画像データとして、以上で概略的に説明した補正画像データを生成する処理を行う。   The DSP 290 performs various digital signal processing such as demosaicing, gradation conversion, color balance correction, shading correction, and noise reduction on the digital image signal temporarily stored in the RAM 264 to generate image data. This image data is recorded on the image recording medium 230 as necessary. An image based on the image data is displayed on the display unit 250. The image processing apparatus 100 performs processing for generating the corrected image data schematically described above using the image data generated as described above as original image data.

画像記録媒体230は、フラッシュメモリや磁気記録装置等で構成され、デジタルカメラ200に対して着脱可能に装着される。なお、画像記録媒体230はデジタルカメラ200に内蔵されていてもよい。その場合、ROM262内に画像データ記録のための領域を確保することが可能である。   The image recording medium 230 includes a flash memory, a magnetic recording device, and the like, and is detachably attached to the digital camera 200. The image recording medium 230 may be built in the digital camera 200. In that case, an area for recording image data can be secured in the ROM 262.

操作部240は、プッシュスイッチ、スライドスイッチ、ダイヤルスイッチ、タッチパネル等のうち、いずれか一種類または複数種類を備え、ユーザの操作を受け付け可能に構成される。表示部250は、TFT液晶表示パネルとバックライト装置、あるいは有機EL表示素子等の自発光式表示素子を備え、画像や文字等の情報を表示可能に構成される。なお、表示部250は表示インターフェースを備えていて、RAM264上に設けられるVRAM領域内に書き込まれる画像データを表示インターフェースが読み出して画像や文字等の情報を表示部250に表示するものとする。   The operation unit 240 includes any one type or a plurality of types of push switches, slide switches, dial switches, touch panels, and the like, and is configured to be able to accept user operations. The display unit 250 includes a TFT liquid crystal display panel and a backlight device, or a self-luminous display element such as an organic EL display element, and is configured to display information such as images and characters. Note that the display unit 250 includes a display interface, and the display interface reads image data written in a VRAM area provided on the RAM 264 and displays information such as images and characters on the display unit 250.

ROM262は、フラッシュメモリ等で構成され、CPU270により実行される制御プログラム(ファームウェア)や、調整パラメータ、あるいはデジタルカメラ200に電力が供給されない状態でも保持する必要のある情報等が記憶される。RAM264は、SDRAM等で構成され、比較的高速のアクセス速度を有する。CPU270は、ROM262からRAM264に転送されたファームウェアを解釈・実行してデジタルカメラ200の動作を統括的に制御する。   The ROM 262 is configured by a flash memory or the like, and stores a control program (firmware) executed by the CPU 270, adjustment parameters, information that needs to be held even when power is not supplied to the digital camera 200, and the like. The RAM 264 is configured by SDRAM or the like and has a relatively high access speed. The CPU 270 comprehensively controls the operation of the digital camera 200 by interpreting and executing the firmware transferred from the ROM 262 to the RAM 264.

デジタルカメラ200は静止画撮影モードで動作しても、動画像撮影モードで動作してもよい。デジタルカメラ200が静止画撮像モードで動作する場合、一回の撮影動作に応じて生成される一つの静止画像データに対応して画像処理装置100は補正画像データを生成する処理を行う。一方、デジタルカメラ200が動画像撮影モードで動作する場合、撮影動作中に生成される一連の複数フレームの動画像データそれぞれに対応して画像処理装置100は一連の複数フレームの補正画像データを生成する処理を行う。   The digital camera 200 may operate in the still image shooting mode or in the moving image shooting mode. When the digital camera 200 operates in the still image capturing mode, the image processing apparatus 100 performs processing for generating corrected image data corresponding to one still image data generated according to one shooting operation. On the other hand, when the digital camera 200 operates in the moving image shooting mode, the image processing apparatus 100 generates a series of corrected image data of a plurality of frames corresponding to each of a plurality of frames of moving image data generated during the shooting operation. Perform the process.

図3は、記録媒体に記録された画像処理プログラムがコンピュータのCPUにより読み出されて実行され、画像処理装置としての機能が実装される例を説明するブロック図である。コンピュータ300は、CPU310と、メモリ320と、補助記憶装置330とインターフェース340と、メモリカードインターフェース350と、光ディスクドライブ360と、ネットワークインターフェース370と、表示装置380とを備える。CPU310と、メモリカードインターフェース350と、光ディスクドライブ360と、ネットワークインターフェース370と、表示装置380とはインターフェース340を介して電気的に接続される。   FIG. 3 is a block diagram illustrating an example in which an image processing program recorded on a recording medium is read and executed by a CPU of a computer, and functions as an image processing apparatus are implemented. The computer 300 includes a CPU 310, a memory 320, an auxiliary storage device 330, an interface 340, a memory card interface 350, an optical disk drive 360, a network interface 370, and a display device 380. The CPU 310, the memory card interface 350, the optical disk drive 360, the network interface 370, and the display device 380 are electrically connected via the interface 340.

メモリ320は、DDR SDRAM等の、比較的高速のアクセス速度を有するメモリである。補助記憶装置330は、ハードディスクドライブ、あるいはソリッドステートドライブ(SSD)等で構成され、比較的大きな記憶容量を有する。   The memory 320 is a memory having a relatively high access speed, such as a DDR SDRAM. The auxiliary storage device 330 is configured by a hard disk drive, a solid state drive (SSD), or the like, and has a relatively large storage capacity.

メモリカードインターフェース350は、メモリカードMCを着脱自在に装着可能に構成される。デジタルカメラ等で撮影動作が行われて生成され、メモリカードMC内に記憶された画像データは、このメモリカードインターフェース350を介してコンピュータ300内に読み込むことができる。また、コンピュータ300内の画像データをメモリカードMCに書き込むこともできる。   The memory card interface 350 is configured so that the memory card MC can be detachably attached. Image data generated by performing a shooting operation with a digital camera or the like and stored in the memory card MC can be read into the computer 300 via the memory card interface 350. Also, the image data in the computer 300 can be written into the memory card MC.

光ディスクドライブ360は、光ディスクODからデータを読み取ることが可能に構成される。光ディスクドライブ360はまた、必要に応じて光ディスクODにデータを書き込むことが可能に構成されていてもよい。   The optical disk drive 360 is configured to be able to read data from the optical disk OD. The optical disk drive 360 may also be configured to write data to the optical disk OD as necessary.

ネットワークインターフェース370は、ネットワークNWを介して接続されるサーバ等の外部情報処理装置とコンピュータ300との間で情報を授受可能に構成される。   The network interface 370 is configured to exchange information between the computer 300 and an external information processing apparatus such as a server connected via the network NW.

画像処理装置100は、メモリ320上にロードされた画像処理プログラムをCPU310が解釈・実行することにより実現される。この画像処理プログラムは、メモリカードMCや光ディスクOD等の記録媒体に記録されてコンピュータ300のユーザに頒布される。あるいは、ネットワークNWを介して、サーバ等の外部情報処理装置から画像処理プログラムをダウンロードすることも可能である。この画像処理プログラムは、いわゆるフォトレタッチソフト中で呼び出される一つの機能として実現されてもよい。   The image processing apparatus 100 is realized by the CPU 310 interpreting and executing an image processing program loaded on the memory 320. This image processing program is recorded on a recording medium such as a memory card MC or an optical disc OD and distributed to users of the computer 300. Alternatively, an image processing program can be downloaded from an external information processing apparatus such as a server via the network NW. This image processing program may be realized as one function called in so-called photo retouching software.

コンピュータ300上では静止画像データを処理するプログラムが実行されていても、動画像データを処理するプログラムが実行されていてもよい。上記のいずれのプログラムが実行されている場合であっても、メモリカードMC、光ディスクOD、補助記憶装置330のいずれかから読み出された静止画像データまたは一連の複数フレームの動画像データに対応して画像処理装置100は一つの補正画像データまたは一連の複数フレームの補正画像データを生成する処理を行うことが可能である。   On the computer 300, a program for processing still image data may be executed, or a program for processing moving image data may be executed. Regardless of which of the above programs is executed, it corresponds to still image data read from any of the memory card MC, the optical disc OD, or the auxiliary storage device 330 or a series of moving image data of a plurality of frames. Thus, the image processing apparatus 100 can perform a process of generating a single corrected image data or a series of corrected image data of a plurality of frames.

以下では、取得した元画像データに対応して図1に示される画像処理装置100が補正画像データを生成する例について、いくつかの実施の形態で説明する。   Hereinafter, examples in which the image processing apparatus 100 illustrated in FIG. 1 generates corrected image data corresponding to the acquired original image data will be described in some embodiments.

− 第1の実施の形態 −
図4は、画像データ取得部102が取得した元画像データに基づく画像の一例を示す図である。領域設定部104は、元画像データを解析し、この元画像データ中で主要被写体が写っている部分を含む領域である主要部と、同じく元画像データ中の主要部以外の領域である周辺部とを設定する。図4に示される例では、画面左下部分に写っている木が主要被写体と判定されて、この木が写っている部分を含む領域が主要部として設定されるものとする。このとき、主要部以外の部分が周辺部として設定される。領域設定部104はまた、近傍領域を設定する。近傍領域は、主要部の近傍(所定の距離範囲内)に位置する領域であって、主要部を取り囲む周りの領域である。
− First embodiment −
FIG. 4 is a diagram illustrating an example of an image based on the original image data acquired by the image data acquisition unit 102. The area setting unit 104 analyzes the original image data, and a main part that is a part including a part in which the main subject is reflected in the original image data, and a peripheral part that is also an area other than the main part in the original image data. And set. In the example shown in FIG. 4, it is assumed that the tree shown in the lower left part of the screen is determined as the main subject, and the area including the part in which this tree is shown is set as the main part. At this time, a part other than the main part is set as the peripheral part. The region setting unit 104 also sets a neighborhood region. The neighborhood area is an area located in the vicinity (within a predetermined distance range) of the main part, and is an area around the main part.

図5は、画像処理装置100で実行される画像処理の手順を説明するフローチャートである。画像処理装置100は、S500において画像データを取得する。この処理が画像データ取得部102での処理に相当する。取得した画像データは元画像データである。   FIG. 5 is a flowchart for explaining a procedure of image processing executed by the image processing apparatus 100. The image processing apparatus 100 acquires image data in S500. This process corresponds to the process in the image data acquisition unit 102. The acquired image data is original image data.

S502において画像処理装置100は、元画像データを解析して主要部、周辺部を設定する処理をする。この処理が領域設定部104での処理に相当する。領域設定部104による処理は、既によく知られている様々な方法を用いて行うことが可能である。例えば、元画像データ中の各画素の色と位置とを解析し、それらの類似度を基に、判定対象領域、すなわち主要部であるか否かの判定を行う対象の領域をいくつか抽出し、それらの判定対象領域の中から、判定対象領域の大きさや彩度の高さ等に基づいて主要部を選択することが可能である。   In step S502, the image processing apparatus 100 performs processing for analyzing the original image data and setting the main part and the peripheral part. This process corresponds to the process in the area setting unit 104. The processing by the area setting unit 104 can be performed using various well-known methods. For example, the color and position of each pixel in the original image data are analyzed, and based on their similarity, several determination target regions, that is, target regions for determining whether or not they are main parts are extracted. From these determination target areas, it is possible to select a main part based on the size of the determination target area, the saturation level, or the like.

S504において画像処理装置100は、主要部の画像を解析し、補正画像データを生成する処理を行うか否かを判定する処理を行う。この処理が画像処理実行判定部106での処理に相当する。画像処理実行判定部106による処理は、例えば以下のように行われる。すなわち、主要部の画像を解析して、画像特徴量を導出し、この画像特徴量をもとに、主要部の画像が補正処理の十分な効果を得ることのできるものであるかを判定する。例えば、画像処理装置100は、画像特徴量として、主要部の色情報、空間周波数の情報、エッジ情報を抽出する。   In step S <b> 504, the image processing apparatus 100 performs processing to analyze the main part image and determine whether to perform processing for generating corrected image data. This process corresponds to the process in the image processing execution determination unit 106. The processing by the image processing execution determination unit 106 is performed as follows, for example. That is, an image of the main part is analyzed to derive an image feature amount, and it is determined based on the image feature amount whether the image of the main part can obtain a sufficient effect of the correction process. . For example, the image processing apparatus 100 extracts main part color information, spatial frequency information, and edge information as image feature amounts.

色情報とは、主要部の画像を評価する際に参照される情報である。例えば、RGB画像データをYCbCr、Lab、あるいはHSL等の色空間の画像データに変換し、Cb、Crの値やa、bの値、あるいはSの値から抽出される彩度の情報を色情報とすることができる。ところで、色情報としては、彩度以外に、主要部の明るさを評価可能な情報を含んでいてもよい。その場合、上記YCbCr、LabあるいはHSL等の色空間の画像データからYの値やLの値を抽出することも可能である。このように、色情報としては彩度や明るさを評価可能な情報としてもよいが、以下では色情報が主要部の画像を彩度で評価するための情報であるものとして説明をする。   The color information is information that is referred to when an image of a main part is evaluated. For example, RGB image data is converted into image data in a color space such as YCbCr, Lab, or HSL, and saturation information extracted from Cb, Cr values, a, b values, or S values is used as color information. It can be. By the way, as color information, the information which can evaluate the brightness of a principal part other than saturation may be included. In that case, it is also possible to extract the Y value and the L value from the image data in the color space such as YCbCr, Lab or HSL. As described above, the color information may be information capable of evaluating saturation and brightness. However, in the following description, it is assumed that the color information is information for evaluating the main image by saturation.

空間周波数の情報とは、主要部の画像中に含まれる空間周波数成分に関連する情報である。つまり、主要部の画像が、どの程度細かいテクスチャを有しているかを評価する情報である。   The spatial frequency information is information related to the spatial frequency component included in the main image. That is, it is information for evaluating how fine the texture of the main part image is.

図6は、画像処理装置100により実行されるS504の処理を、より詳細に説明するフローチャートである。S600において画像処理装置100は、S502で設定された主要部の画像を抽出する。画像処理装置100はS602において、S600で抽出された画像を例えばYCbCrの色空間の画像データに変換し、CbおよびCrのデータ、すなわち彩度のデータを抽出する。そして、主要部の彩度が第1閾値未満であるか否かを判定する。S602の判定が肯定されるとS604に進む一方、否定されるとS606に進む。第1閾値は、デフォルト値として予め設定されていてもよいし、ユーザが適宜変更可能に構成されていてもよい。   FIG. 6 is a flowchart for explaining in more detail the processing of S504 executed by the image processing apparatus 100. In S600, the image processing apparatus 100 extracts the main part image set in S502. In step S <b> 602, the image processing apparatus 100 converts the image extracted in step S <b> 600 into, for example, image data in a color space of YCbCr, and extracts Cb and Cr data, that is, saturation data. Then, it is determined whether or not the saturation of the main part is less than the first threshold value. If the determination in S602 is affirmed, the process proceeds to S604. If the determination is negative, the process proceeds to S606. The first threshold value may be set in advance as a default value, or may be configured to be appropriately changed by the user.

S602での判定が否定された場合の分岐先であるS606において画像処理装置100は、S600で抽出された画像を解析して空間周波数評価値を導出する。この空間周波数評価値は、主要部の画像が全体としてどの程度細かいテクスチャを有しているかを評価するためのものである。図7は、主要部の画像を解析して、画像中に含まれる空間周波数成分をヒストグラム化した様子を概念的に示すグラフである。横軸には空間周波数が、縦軸には頻度がとられている。例えば、主要部の画像を比較的小さな矩形等の多角形でメッシュ分割し、分割された領域(分割領域)ごとに二次元フーリエ変換の処理を施すと、各分割領域に対応する空間周波数成分を求めることができる。求められたこれらの空間周波数成分をもとに、図7に例示されるようなヒストグラムを生成することができる。   In S606, which is a branch destination when the determination in S602 is negative, the image processing apparatus 100 analyzes the image extracted in S600 and derives a spatial frequency evaluation value. This spatial frequency evaluation value is for evaluating how fine the texture of the image of the main part as a whole has. FIG. 7 is a graph conceptually showing a state in which an image of a main part is analyzed and a spatial frequency component included in the image is histogrammed. The horizontal axis represents the spatial frequency, and the vertical axis represents the frequency. For example, if the image of the main part is mesh-divided with a polygon such as a relatively small rectangle, and the two-dimensional Fourier transform is performed for each divided area (divided area), the spatial frequency component corresponding to each divided area is obtained. Can be sought. Based on the obtained spatial frequency components, a histogram as illustrated in FIG. 7 can be generated.

上述した空間周波数のヒストグラムから、所定の空間周波数Uよりも高い空間周波数の領域R highの面積と、低い空間周波数の領域R lowの面積とを求める。これらR highおよびR lowの値を基に、(R high/(R high+R low))、あるいは(R high/R low)といった式を用いて空間周波数評価値を導出することが可能となる。主要部の画像中で、より細かいテクスチャの領域がより多く分布するほど、空間周波数評価値は大きくなる。画像処理装置100は、このようにして導出された空間周波数評価値が第2閾値以上であるか否かをS606で判定し、肯定されるとS604に進む一方、否定されるとS608に進む。第2閾値は、第1閾値と同様に、デフォルト値として予め設定されていてもよいし、ユーザが適宜変更可能に構成されていてもよい。   From the above-described histogram of the spatial frequency, the area of the region R high having a spatial frequency higher than the predetermined spatial frequency U and the area of the region R low having a low spatial frequency are obtained. Based on these R high and R low values, it is possible to derive a spatial frequency evaluation value using an equation such as (R high / (R high + R low)) or (R high / R low). As more finer texture regions are distributed in the main image, the spatial frequency evaluation value becomes larger. The image processing apparatus 100 determines whether or not the spatial frequency evaluation value derived in this way is greater than or equal to the second threshold value in S606, and proceeds to S604 if affirmed or proceeds to S608 if denied. Similar to the first threshold value, the second threshold value may be set in advance as a default value, or may be configured to be appropriately changed by the user.

S602またはS606での判定が肯定された場合の分岐先であるS604において画像処理装置100は、画像処理を行う決定をし、リターンする。一方、S602およびS606での判定が共に否定された場合の分岐先であるS608において画像処理装置100は、画像処理を行わない決定をしてリターンする。   In S604, which is a branch destination when the determination in S602 or S606 is affirmed, the image processing apparatus 100 determines to perform image processing and returns. On the other hand, in S608, which is a branch destination when the determinations in S602 and S606 are both denied, the image processing apparatus 100 determines not to perform image processing and returns.

再び図5を参照して説明すると、S504での上述した判定処理結果を受け、画像処理装置100はS506において、画像処理を行うか行わないかの判定をする。S506の判定が、肯定されるとS508に進み、否定されると画像処理は行わずに図5の処理を終える。   Referring to FIG. 5 again, in response to the determination processing result in S504, the image processing apparatus 100 determines whether or not to perform image processing in S506. If the determination in S506 is affirmative, the process proceeds to S508. If the determination is negative, the image processing is not performed and the process of FIG.

S506での判定が肯定されると、画像処理装置100はS508からS516までの処理を行う。第1の実施の形態において、これらS508からS516までの一連の処理が補正画像データ生成部108による処理に相当する。   If the determination in S506 is affirmed, the image processing apparatus 100 performs the processing from S508 to S516. In the first embodiment, a series of processing from S508 to S516 corresponds to processing by the corrected image data generation unit 108.

画像処理装置100はS508において、画像処理パラメータを設定する。この画像処理パラメータの設定方法について、図8を参照して説明する。図8は、先に説明した低減処理を行う際の画像処理パラメータとして彩度低減係数、明るさ低減係数、およびコントラスト低減係数が用いられる場合の例を示す図である。画像処理装置100は、周辺部の画像に対して低減処理をする際に、彩度低減、明るさ低減、およびコントラスト低減の各処理を行う。このとき、彩度、明るさ、およびコントラストを減じる際の低減量は一定ではなく、図8に示される条件に従って変化する。   In step S508, the image processing apparatus 100 sets image processing parameters. This image processing parameter setting method will be described with reference to FIG. FIG. 8 is a diagram illustrating an example in which a saturation reduction coefficient, a brightness reduction coefficient, and a contrast reduction coefficient are used as the image processing parameters when performing the reduction process described above. The image processing apparatus 100 performs saturation reduction, brightness reduction, and contrast reduction processing when performing reduction processing on the peripheral image. At this time, the amount of reduction when reducing the saturation, brightness, and contrast is not constant and changes according to the conditions shown in FIG.

周辺部の彩度の平均値が第3閾値以上であるとき、彩度低減係数は1.2に設定される。周辺部の彩度の平均値が第4閾値を上回り、かつ第3閾値を下回る場合には、彩度低減係数は1.0に設定される。また、周辺部の彩度の平均値が第4閾値以下であるとき、彩度低減係数は0.8に設定される。   When the average value of saturation in the peripheral portion is equal to or greater than the third threshold value, the saturation reduction coefficient is set to 1.2. When the average value of the saturation at the peripheral portion is higher than the fourth threshold and lower than the third threshold, the saturation reduction coefficient is set to 1.0. Further, when the average saturation value in the peripheral portion is equal to or smaller than the fourth threshold value, the saturation reduction coefficient is set to 0.8.

ここで、第3閾値および第4閾値の大小関係について説明すると、第3閾値は第4閾値よりも大きいものとする。つまり、周辺部の彩度の平均値が第3閾値以上である、ということは周辺部の彩度が比較的高いことを想定しており、その場合には彩度低減係数がデフォルトの値に対して20%増とされ、周辺部の彩度がより多目に低減される。周辺部の彩度の平均値が第4閾値を上回り、かつ第3閾値を下回る、ということは周辺部の彩度が中庸であることを想定しており、その場合には彩度低減係数がデフォルトの値(1.0)に設定される。そして、周辺部の彩度の平均値が第4閾値以下である、ということは周辺部の彩度が比較的低いことを想定しており、その場合には彩度低減係数がデフォルトの値に対して20%減に設定される。結果として、周辺部の彩度を減じる際の低減量がより少なめとなる。   Here, the magnitude relationship between the third threshold value and the fourth threshold value will be described. It is assumed that the third threshold value is larger than the fourth threshold value. In other words, the fact that the average value of the saturation in the peripheral portion is equal to or greater than the third threshold value assumes that the saturation in the peripheral portion is relatively high, and in that case, the saturation reduction coefficient is set to the default value. On the other hand, the saturation is increased by 20%, and the saturation of the peripheral portion is further reduced. The fact that the average value of the saturation in the peripheral portion is higher than the fourth threshold value and lower than the third threshold value assumes that the saturation in the peripheral portion is moderate. In that case, the saturation reduction coefficient is The default value (1.0) is set. The average value of the saturation in the peripheral portion is equal to or lower than the fourth threshold value assumes that the saturation in the peripheral portion is relatively low, and in that case, the saturation reduction coefficient is set to the default value. On the other hand, a reduction of 20% is set. As a result, the amount of reduction in reducing the saturation of the peripheral portion is smaller.

周辺部の明るさの平均値が第5閾値以上であるとき、明るさ低減係数は1.2に設定される。周辺部の明るさの平均値が第6閾値を上回り、かつ第5閾値を下回る場合には、明るさ低減係数は1.0に設定される。また、周辺部の明るさの平均値が第6閾値以下であるとき、明るさ低減係数は0.8に設定される。   When the average value of the brightness of the peripheral portion is the fifth threshold value or more, the brightness reduction coefficient is set to 1.2. When the average value of the brightness of the peripheral part is higher than the sixth threshold value and lower than the fifth threshold value, the brightness reduction coefficient is set to 1.0. Further, when the average brightness value of the peripheral portion is equal to or less than the sixth threshold value, the brightness reduction coefficient is set to 0.8.

ここで、第5閾値および第6閾値の大小関係について説明すると、第5閾値は第6閾値よりも大きいものとする。つまり、周辺部の明るさの平均値が第5閾値以上である、ということは周辺部が比較的明るいことを想定しており、その場合には明るさ低減係数がデフォルトの値に対して20%増とされ、周辺部の明るさがより多目に低減される。周辺部の明るさの平均値が第6閾値を上回り、かつ第5閾値を下回る、ということは周辺部の明るさが中庸であることを想定しており、その場合には明るさ低減係数がデフォルトの値(1.0)に設定される。そして、周辺部の明るさの平均値が第6閾値以下である、ということは周辺部が比較的暗いことを想定しており、その場合には明るさ低減係数がデフォルトの値に対して20%減に設定される。結果として、周辺部の明るさを減じる際の低減量がより少なめとなる。   Here, the magnitude relationship between the fifth threshold value and the sixth threshold value will be described. It is assumed that the fifth threshold value is larger than the sixth threshold value. In other words, the fact that the average value of the brightness of the peripheral portion is equal to or greater than the fifth threshold assumes that the peripheral portion is relatively bright, and in that case, the brightness reduction coefficient is 20 with respect to the default value. % Increase, and the brightness of the peripheral portion is further reduced. That the average value of the brightness of the peripheral part is higher than the sixth threshold value and lower than the fifth threshold value assumes that the peripheral brightness is moderate, in which case the brightness reduction coefficient is The default value (1.0) is set. The average value of the brightness of the peripheral portion is equal to or smaller than the sixth threshold value assumes that the peripheral portion is relatively dark, and in that case, the brightness reduction coefficient is 20 with respect to the default value. Set to% decrease. As a result, the amount of reduction when reducing the brightness of the peripheral portion becomes smaller.

周辺部のコントラストの平均値が第7閾値以上であるとき、コントラスト低減係数は1.2に設定される。周辺部のコントラストの平均値が第8閾値を上回り、かつ第7閾値を下回る場合には、コントラスト低減係数は1.0に設定される。また、周辺部のコントラストの平均値が第8閾値以下であるとき、コントラスト低減係数は0.8に設定される。   When the average value of the peripheral contrast is equal to or greater than the seventh threshold value, the contrast reduction coefficient is set to 1.2. When the average value of the contrast at the peripheral portion is higher than the eighth threshold value and lower than the seventh threshold value, the contrast reduction coefficient is set to 1.0. Further, when the average value of the contrast at the peripheral portion is equal to or less than the eighth threshold value, the contrast reduction coefficient is set to 0.8.

ここで、第7閾値および第8閾値の大小関係について説明すると、第7閾値は第8閾値よりも大きいものとする。つまり、周辺部のコントラストの平均値が第7閾値以上である、ということは周辺部のコントラストが比較的高いことを想定しており、その場合にはコントラスト低減係数がデフォルトの値に対して20%増とされ、周辺部のコントラストがより多目に低減される。周辺部のコントラストの平均値が第8閾値を上回り、かつ第7閾値を下回る、ということは周辺部のコントラストが中庸であることを想定しており、その場合にはコントラスト低減係数がデフォルトの値(1.0)に設定される。そして、周辺部のコントラストの平均値が第8閾値以下である、ということは周辺部のコントラストが比較的低いことを想定しており、その場合にはコントラスト低減係数がデフォルトの値に対して20%減に設定される。結果として、周辺部のコントラストを減じる際の低減量がより少なめとなる。   Here, the magnitude relationship between the seventh threshold value and the eighth threshold value will be described. It is assumed that the seventh threshold value is larger than the eighth threshold value. That is, the fact that the average value of the peripheral contrast is equal to or higher than the seventh threshold value assumes that the peripheral contrast is relatively high, and in this case, the contrast reduction coefficient is 20 with respect to the default value. % Increase, and the contrast in the peripheral portion is further reduced. That the average value of the contrast in the peripheral portion is higher than the eighth threshold value and lower than the seventh threshold value assumes that the peripheral contrast is moderate, and in that case, the contrast reduction coefficient is the default value. (1.0). The average value of the peripheral contrast is equal to or less than the eighth threshold value assumes that the peripheral contrast is relatively low. In this case, the contrast reduction coefficient is 20 with respect to the default value. Set to% decrease. As a result, the amount of reduction when reducing the contrast of the peripheral portion is smaller.

図8に示される条件およびそれに対応する低減処理の処理パラメータは一例であり、さらに細かい条件にしたがって処理パラメータが決定されるようにしてもよい。また、図8中の彩度低減係数、明るさ低減係数、コントラスト係数と云った係数を用いるのに代えて、彩度低減量、明るさ低減量、コントラスト低減量そのものが決定されて用いられるようにしてもよい。   The conditions shown in FIG. 8 and the processing parameters for the reduction processing corresponding to the conditions are merely examples, and the processing parameters may be determined according to more detailed conditions. Further, instead of using the coefficients such as the saturation reduction coefficient, the brightness reduction coefficient, and the contrast coefficient in FIG. 8, the saturation reduction amount, the brightness reduction amount, and the contrast reduction amount itself are determined and used. It may be.

S510において画像処理装置100は、元画像データから一時画像データを生成する。一時画像データは、元画像データを単純に複製したものとしてもよいし、元画像データとは異なる色空間の画像データを生成してもよい。   In S510, the image processing apparatus 100 generates temporary image data from the original image data. The temporary image data may be a simple copy of the original image data, or image data in a color space different from the original image data may be generated.

S512において画像処理装置100は、S508で設定された画像処理パラメータを一時画像データに対して一律に適用して画像処理(低減処理)を行い、処理後一時画像データを生成する。この画像処理によって、処理後一時画像データに基づく画像は、その全体、すなわち主要部に対応する部分および周辺部に対応する部分の彩度、明るさ、およびコントラストが低減される。なお、低減処理としては、上述した処理に限られるものではなく、彩度、明るさ、およびコントラストのうち、少なくともいずれかの低減処理が行われてもよい。さらに、上記の低減処理に加えて、あるいは代えて、色相等を調節する処理が行われてもよい。   In S512, the image processing apparatus 100 uniformly applies the image processing parameters set in S508 to the temporary image data, performs image processing (reduction processing), and generates post-processing temporary image data. With this image processing, the saturation, brightness, and contrast of the entire image, that is, the portion corresponding to the main portion and the portion corresponding to the peripheral portion are reduced. Note that the reduction process is not limited to the above-described process, and at least one of the reduction process of saturation, brightness, and contrast may be performed. Furthermore, in addition to or instead of the above reduction process, a process for adjusting the hue or the like may be performed.

S514において画像処理装置100は、主要度設定の処理を行う。主要度設定の処理に際しては、元画像データの画素ごとに、あるいは複数画素ごとに対応して、以下に説明する方法に従って主要度を導出し、主要度マップを生成する。主要度マップは、図12に概念図が示されるように、元画像データで形成される画像中における主要度の分布が記録されたデータテーブルである。この主要度マップのデータサイズ(主要度を規定するデータの数)は、元画像データの画素数と同じとしても、それよりも少なくしてもよい。つまり、主要度マップのデータサイズが元画像データの画素数と同じ場合、元画像データ中の各画素に対応して主要度の情報が付与される。主要度マップのデータサイズが元画像データの画素数よりも少ない場合、元画像データ中の複数画素、例えば縦・横に2画素×2画素、2画素×3画素、5画素×5画素といった小領域それぞれに対応して主要度が付与される。   In step S <b> 514, the image processing apparatus 100 performs a degree of importance setting process. In the process of setting the degree of importance, the degree of importance is derived according to the method described below for each pixel of the original image data or for each of a plurality of pixels, and a degree-of-importance map is generated. As shown in the conceptual diagram of FIG. 12, the importance map is a data table in which the distribution of the importance in the image formed from the original image data is recorded. The data size of the importance map (the number of data defining the importance) may be the same as or smaller than the number of pixels of the original image data. That is, when the data size of the importance map is the same as the number of pixels of the original image data, the importance information is assigned to each pixel in the original image data. When the data size of the importance map is smaller than the number of pixels of the original image data, a plurality of pixels in the original image data, for example, a small size such as 2 pixels × 2 pixels, 2 pixels × 3 pixels, 5 pixels × 5 pixels vertically and horizontally A degree of importance is assigned to each area.

また、主要度の高低に関しては、様々な表現形態が可能である。以下では、導出される主要度の値は0以上1以下の値をとり、主要度が最も高い場合に1と設定され、最も低い場合に0と設定されるものとして説明をするが、任意の範囲の値とすることが可能である。例えば0から255といった整数で表現することも可能であるし、正負の値が混在していてもよい。あるいはa、b、cといった符号で主要度がランク分けされるものであってもよい。   Moreover, various representation forms are possible regarding the level of importance. In the following description, the derived value of the degree of importance takes a value of 0 or more and 1 or less, and is described as being set to 1 when the degree of importance is the highest, and set to 0 when the degree of importance is the lowest. It can be a range value. For example, it can be expressed by an integer such as 0 to 255, and positive and negative values may be mixed. Alternatively, the degrees of importance may be ranked by codes such as a, b, and c.

まず、主要部に対応する領域内の各画素あるいは各複数画素の主要度が最も高い値、すなわち1に設定される。そして、周辺部に対応する領域内の各画素あるいは各複数画素に対しては、主要部からの距離が増すのにつれて主要度が減じられる(1よりも小さい値に設定される)。この様子が図9に示されている。図9に例示される特性は、デフォルト特性として予め設定されるものであっても、例えばフォトレタッチソフトのトーンカーブの特性が変更可能であるのと同様に、ユーザの好みに応じて線形あるいは非線形に設定変更可能に構成されるものであってもよい。   First, the highest degree of importance of each pixel or each of a plurality of pixels in the region corresponding to the main part is set to 1, that is, 1. For each pixel or each of the plurality of pixels in the region corresponding to the peripheral part, the degree of importance is reduced as the distance from the principal part increases (set to a value smaller than 1). This is shown in FIG. Even if the characteristics illustrated in FIG. 9 are preset as the default characteristics, for example, the characteristics of the tone curve of the photo retouching software can be changed. It may be configured so that the setting can be changed.

主要度を、上記のように主要部からの距離に応じて設定するのに加えて、以下に説明する設定も行われる。図10は、図9に示される特性に基づいて導出される主要度に対して補正をする際の条件と補正量との関係の一例を示す図である。図10に示される例では、周辺部内に第9閾値以上の太さを有するエッジ成分で囲われている領域があれば、その領域内の各画素あるいは複数画素の主要度は、上記図9に示す条件で設定された主要度に0.75の値を加える処理が行われる。ただし、主要度が1より大きくなることがないようにクリッピングする(主要度の導出結果が1を越すときには1にする)処理が行われる。   In addition to setting the importance according to the distance from the main part as described above, the setting described below is also performed. FIG. 10 is a diagram illustrating an example of a relationship between a condition and a correction amount when correcting the degree of importance derived based on the characteristics illustrated in FIG. In the example shown in FIG. 10, if there is a region surrounded by an edge component having a thickness greater than or equal to the ninth threshold in the peripheral portion, the importance of each pixel or a plurality of pixels in the region is shown in FIG. Processing for adding a value of 0.75 to the degree of importance set under the conditions shown is performed. However, clipping is performed so that the degree of importance does not become greater than 1 (when the result of derivation of degree of importance exceeds 1, it is set to 1).

また、周辺部内に空間周波数が第10閾値以上の領域があれば、その領域内の各画素あるいは各複数画素の主要度は高めに設定される。例えば、上記図9に示す条件で設定された主要度に0.75の値を加える処理が行われる。この場合も、主要度が1より大きくなることがないようにクリッピングする処理が行われる。   Further, if there is a region having a spatial frequency equal to or higher than the tenth threshold in the peripheral portion, the degree of importance of each pixel or each of the plurality of pixels in the region is set higher. For example, a process of adding a value of 0.75 to the degree of importance set under the conditions shown in FIG. Also in this case, a clipping process is performed so that the degree of importance does not exceed 1.

このように、周辺部内の各画素あるいは各複数画素においても必要に応じて主要度を増す処理をすることにより、主要部から比較的遠くに離れている部分に写っている被写体であっても、低減処理の強度を弱めた方がより好ましい結果を期待できる部分については主要度を増すことが可能となる。図10に例示される第9閾値、第10閾値および主要度の上昇量は、デフォルト値として予め設定されていてもよいし、ユーザが適宜変更可能に構成されていてもよい。以上に説明したS514の処理により、主要度マップが生成される。   In this way, by subjecting each pixel in the peripheral part or each of the plurality of pixels to increase the importance as necessary, even if the subject is reflected in a part that is relatively far away from the main part, It becomes possible to increase the degree of importance for a portion where a more favorable result can be expected if the strength of the reduction process is weakened. The ninth threshold value, the tenth threshold value, and the amount of increase in the degree of importance illustrated in FIG. 10 may be set in advance as default values, or may be configured to be appropriately changed by the user. The importance map is generated by the process of S514 described above.

S516において画像処理装置100は、元画像データと、S512で生成された処理後一時画像データとを合成して補正画像データを生成する処理を行う。なお、処理後一時画像データおよび元画像データが互いに異なる色空間で規定される画像データとなっている場合には、処理後一時画像データの色空間と同じ色空間の画像データに元画像データを変換する。処理後一時画像および元画像を合成して補正画像データを生成する処理を行う際には、以下のアルゴリズムに従う。   In S516, the image processing apparatus 100 performs a process of generating corrected image data by combining the original image data and the post-processing temporary image data generated in S512. If the post-processing temporary image data and the original image data are image data defined in different color spaces, the original image data is added to the image data in the same color space as the post-processing temporary image data. Convert. When performing the process of generating corrected image data by synthesizing the post-processing temporary image and the original image, the following algorithm is followed.

S514で生成された主要度マップを参照し、主要度の高い画素あるいは複数画素に対応して処理後一時画像データの混合比率を減じる。つまり、主要度が1に設定される画素あるいは複数画素に対応して混合される処理後一時画像データと元画像データとの混合比率は、
[処理後一時画像データ]:[元画像データ]=0:1に設定される。
With reference to the importance map generated in S514, the mixing ratio of the post-processing temporary image data is reduced corresponding to the pixel or the plurality of pixels having a high importance. That is, the mixing ratio of the post-processing temporary image data and the original image data that are mixed corresponding to the pixels with the priority set to 1 or a plurality of pixels is:
[Temporary image data after processing]: [Original image data] = 0: 1.

また、主要度が0に設定される画素あるいは複数画素に対応して混合される処理後一時画像データと元画像データとの混合比率は、
[処理後一時画像データ]:[元画像データ]=1:0に設定される。
In addition, the mixing ratio of the post-processing temporary image data and the original image data that are mixed corresponding to the pixels whose priority is set to 0 or a plurality of pixels is
[Post-processing temporary image data]: [original image data] = 1: 0.

主要度が、0より大きく、1より小さい値に設定される画素あるいは複数画素に対応して混合される処理後一時画像データと元画像データとの混合比率は、図11のグラフに例示されるようなものとすることが可能である。図11に例示される画像混合比率の特性もまた、ユーザが変更できるように構成されていてもよい。なお、図11に例示されるグラフでは、
[処理後一時画像データ]:[元画像データ]=1:0 に対応して混合比率が100%として示されている。つまり、画像混合比率が高まるほど、処理後一時画像データの比率が高まるように処理後一時画像データと元画像データとが混合される様子が示されている。
The mixing ratio of the post-processing temporary image data and the original image data mixed corresponding to a pixel or a plurality of pixels whose degree of importance is greater than 0 and less than 1 is illustrated in the graph of FIG. It is possible to The characteristics of the image mixing ratio exemplified in FIG. 11 may also be configured to be changed by the user. In the graph illustrated in FIG.
Corresponding to [Temporary image data after processing]: [Original image data] = 1: 0, the mixing ratio is shown as 100%. That is, it is shown that the post-processing temporary image data and the original image data are mixed such that the higher the image mixing ratio, the higher the post-processing temporary image data ratio.

処理後一時画像データと元画像データとを混合する処理に際しては、様々な方法を利用可能であり、両画像データの明度情報、画素値、彩度情報のいずれかの情報を合成することが可能である。例えば、処理後一時画像データおよび元画像データの双方がRGB色空間で規定されるものである場合、R、G、Bの各色の成分ごとに、上記の混合比率で混合することが可能である。この場合、補正画像データは、RGB色空間のR、G、B各色の色座標値が補正されたものとなる。   Various methods can be used in the process of mixing the post-processing temporary image data and the original image data, and any of the lightness information, pixel value, and saturation information of both image data can be combined. It is. For example, when both the post-processing temporary image data and the original image data are defined in the RGB color space, it is possible to mix the components of each color of R, G, and B at the above mixing ratio. . In this case, the corrected image data is obtained by correcting the color coordinate values of the R, G, and B colors in the RGB color space.

あるいは、処理後一時画像データおよび元画像データの双方がLab色空間やYCbCr色空間で規定されるものである場合、L、a、bあるいはY、Cb、Crそれぞれの成分ごとに上記の混合比率で混合可能なのはもちろんのこと、L成分あるいはY成分だけで混合、もしくはa成分およびb成分あるいはCb成分およびCr成分をそれぞれの成分ごとに混合することも可能である。   Alternatively, when both the post-processing temporary image data and the original image data are defined in the Lab color space or the YCbCr color space, the above mixing ratio for each component of L, a, b or Y, Cb, Cr Of course, it is possible to mix only the L component or the Y component, or the a component and the b component, or the Cb component and the Cr component can be mixed for each component.

L成分のみで混合した場合、明度情報のみの混合となる。すなわち、Lab色空間のLチャンネルの色座標値が補正されたものとなる。Y成分のみで混合した場合、輝度情報のみの混合となる。すなわち、YCbCr色空間のYチャンネルの色座標値が補正されたものとなる。a成分およびb成分、あるいはCb成分およびCr成分をそれぞれの成分ごとに混合すると、彩度情報のみの混合となる。この場合、Lab色空間のaおよびbの各チャンネルの色座標値、あるいはYCbCr色空間のCbおよびCrの各チャンネルの色座標値が補正されたものとなる。   When only the L component is mixed, only the brightness information is mixed. That is, the color coordinate value of the L channel in the Lab color space is corrected. When mixing with only the Y component, only luminance information is mixed. That is, the color coordinate value of the Y channel in the YCbCr color space is corrected. When the a component and the b component, or the Cb component and the Cr component are mixed for each component, only saturation information is mixed. In this case, the color coordinate values of the channels a and b in the Lab color space or the color coordinate values of the channels Cb and Cr in the YCbCr color space are corrected.

なお、L成分のみ、あるいはY成分のみでの混合が行われた場合はもちろんのこと、彩度情報のみの混合が行われた場合であっても、処理後一時画像データと元画像データとが混合されて生成された補正画像データ中、主要度が低めに設定される部分の画像のコントラストはより低くなる。   It should be noted that not only when the L component alone or the Y component alone is mixed, but also when the saturation information alone is mixed, the post-processing temporary image data and the original image data are In the corrected image data generated by mixing, the contrast of the image of the portion where the degree of importance is set lower is lower.

図12は、図5のフローチャートを参照して以上に説明した処理手順を概念的に示す図である。第1の実施の形態によれば、図12に示されるように、元画像データから生成された一時画像データに対して、S508で設定された画像処理パラメータが一律に適用されて低減処理が施された処理後一時画像データが生成される。元画像データと処理後一時画像データとは、S514の主要度設定処理で生成された主要度マップに基づく混合比率で合成され、補正画像データが生成される。合成に際して、画素ごとあるいは複数画素ごとに、主要度マップで規定される主要度に応じた混合比率で混合されて補正画像データが生成される。結果として、主要度のより低い領域に対応する画像の彩度、明るさ、およびコントラストのうちの少なくともいずれかが低減されるので、主要度のより高い領域に対応する画像は、他の領域の画像よりも際立って見えるようになり、見栄えのする画像を得ることが可能となる。   FIG. 12 is a diagram conceptually showing the processing procedure described above with reference to the flowchart of FIG. According to the first embodiment, as shown in FIG. 12, the image processing parameters set in S508 are uniformly applied to the temporary image data generated from the original image data to perform the reduction process. The processed temporary image data is generated. The original image data and the post-processing temporary image data are combined at a mixing ratio based on the degree of importance map generated in the degree of importance setting process in S514, and corrected image data is generated. At the time of synthesis, corrected image data is generated by mixing each pixel or a plurality of pixels at a mixing ratio corresponding to the degree of importance defined by the degree of importance map. As a result, the image corresponding to the higher-priority area is reduced in at least one of the saturation, brightness, and / or contrast of the image corresponding to the lower-priority area. An image that looks more prominent than an image and looks good can be obtained.

− 第2の実施の形態 −
図13は、画像処理装置100で実行される画像処理の手順を説明するフローチャートである。図13のフローチャートにおいて、第1の実施の形態における図5のフローチャート中の処理と同じ内容の処理ステップについては説明を適宜簡略化して第1の実施の形態との差異を中心に説明をする。
− Second Embodiment −
FIG. 13 is a flowchart illustrating a procedure of image processing executed by the image processing apparatus 100. In the flowchart of FIG. 13, processing steps having the same contents as the processing in the flowchart of FIG. 5 in the first embodiment will be simplified as appropriate and will be described focusing on differences from the first embodiment.

S1300では、元画像データを取得する処理が行われる。S1300の処理は、第1の実施の形態で図5を参照して説明したS500での処理と同様のものとすることが可能である。S1302において画像処理装置100は元画像データを解析し、1または複数の主要部と、周辺部とを設定する処理をする。この処理が領域設定部104での処理に相当する。S1302において設定される主要部の数は、取得した元画像によって、一つだけではなく、複数となる場合がある。S1302における主要部の設定に際しては、第1の実施の形態で説明したのと同様の方法が利用可能である。すなわち、元画像データ中の各画素の色と位置とを解析し、それらの類似度を基に、判定対象領域、すなわち主要部であるか否かの判定を行う対象の領域をいくつか抽出し、それらの判定対象領域の中から、判定対象領域の大きさや彩度の高さ等に基づいて主要部として選択することが可能である。画像処理装置100はまた、以下の条件を満たす領域があれば、その領域を主要部として設定する。
条件1: 領域が比較的太いエッジ成分で囲われている。
条件2: 領域内の画像が、比較的高い空間周波数成分を含んでいる。
In S1300, processing for acquiring original image data is performed. The processing in S1300 can be the same as the processing in S500 described with reference to FIG. 5 in the first embodiment. In step S <b> 1302, the image processing apparatus 100 analyzes the original image data and performs processing for setting one or more main parts and peripheral parts. This process corresponds to the process in the area setting unit 104. Depending on the acquired original image, the number of main parts set in S1302 may be more than one. In setting the main part in S1302, the same method as described in the first embodiment can be used. In other words, the color and position of each pixel in the original image data are analyzed, and based on their similarity, several areas to be judged, that is, areas to be judged whether or not they are main parts are extracted. From these determination target areas, it is possible to select the main part based on the size of the determination target area, the height of saturation, and the like. In addition, if there is an area that satisfies the following conditions, the image processing apparatus 100 sets the area as a main part.
Condition 1: The region is surrounded by a relatively thick edge component.
Condition 2: The image in the region includes a relatively high spatial frequency component.

S1304において画像処理装置100は、画像処理実行判定処理、すなわち、主要部の画像を解析し、補正画像データを生成する処理を行うか否かを判定する処理を行う。このとき、画像処理装置100は、S1302の処理で複数の主要部が設定された場合、それら複数に主要部それぞれに対して画像処理実行判定を行う。画像処理実行判定の詳細は、第1の実施の形態で図6のフローチャートを参照して説明したのと同様である。   In step S <b> 1304, the image processing apparatus 100 performs an image processing execution determination process, that is, a process of determining whether to perform a process of analyzing the main part image and generating corrected image data. At this time, when a plurality of main parts are set in the process of S1302, the image processing apparatus 100 performs image processing execution determination for each of the main parts. The details of the image processing execution determination are the same as those described with reference to the flowchart of FIG. 6 in the first embodiment.

S1304での上述した判定処理結果を受け、画像処理装置100はS1306において、画像処理を行うか行わないかの判定をし、肯定されるとS1308に進み、否定されると画像処理は行わずに図13の処理を終える。   In response to the determination processing result in S1304, the image processing apparatus 100 determines whether or not to perform image processing in S1306. If the result is affirmative, the process proceeds to S1308. If the result is negative, the image processing is not performed. The process of FIG. 13 is finished.

S1306での判定が肯定されると、画像処理装置100はS1308、S1310、S1312、S1314の処理を行う。第2の実施の形態において、これらS1308、S1310、S1312、S1314での一連の処理が補正画像データ生成部108による処理に相当する。   If the determination in S1306 is affirmed, the image processing apparatus 100 performs the processes of S1308, S1310, S1312, and S1314. In the second embodiment, a series of processing in S1308, S1310, S1312, and S1314 corresponds to processing by the corrected image data generation unit 108.

S1308では画像処理パラメータを設定する処理が行われ、S1310では元画像データから一時画像データを生成する処理が行われる。そしてS1312では、S1310で生成された一時画像データに対し、S1308で設定された画像処理パラメータに基づいて低減処理が行われて処理後一時画像データが生成される。以上、S1308からS1312までの処理は、第1の実施の形態で説明したS508からS512までの処理と同様とすることが可能である。   In S1308, processing for setting image processing parameters is performed, and in S1310, processing for generating temporary image data from original image data is performed. In step S1312, the temporary image data generated in step S1310 is subjected to reduction processing based on the image processing parameters set in step S1308 to generate post-processing temporary image data. As described above, the processing from S1308 to S1312 can be the same as the processing from S508 to S512 described in the first embodiment.

S1314において画像処理装置100は、処理後一時画像データ中の部分画像データを、元画像データ中の対応する位置の画像データと合成して補正画像データを生成する処理を行う。上記の部分画像データは、処理後一時画像データ中の、周辺部に対応する領域の画像データである。本明細書において、周辺部に対応する領域の部分画像データを周辺画像データと称する。S1302で一または複数の主要部が設定されることについて先に説明したが、この一または複数の主要部に対応する部分以外の領域の画像データが周辺画像データである。処理後一時画像データ中の周辺画像データと、元画像データ中の対応する位置の画像データとを合成する場合、単純に、元画像データ中の周辺部に対応する画像データを処理後一時画像データ中の周辺画像データで置き換えることが可能である。あるいは、予め定められた混合比率で上記周辺画像データと元画像データとを混合することも可能である。このとき、混合比率は、画像全体に対して一様の混合比率が設定されていてもよいし、画像内の異なる位置ごとに異なる混合比率が設定されていてもよい。   In step S <b> 1314, the image processing apparatus 100 performs processing for generating the corrected image data by combining the partial image data in the post-processing temporary image data with the image data at the corresponding position in the original image data. The partial image data is image data of an area corresponding to the peripheral portion in the post-processing temporary image data. In this specification, the partial image data of the area corresponding to the peripheral part is referred to as peripheral image data. Although it has been described above that one or more main parts are set in S1302, the image data of an area other than the part corresponding to the one or more main parts is the peripheral image data. When combining the peripheral image data in the post-processing temporary image data and the image data at the corresponding position in the original image data, simply processing the image data corresponding to the peripheral portion in the original image data after the processing It is possible to replace it with the surrounding image data. Alternatively, it is possible to mix the peripheral image data and the original image data at a predetermined mixing ratio. At this time, as the mixing ratio, a uniform mixing ratio may be set for the entire image, or a different mixing ratio may be set for each different position in the image.

予め定められた混合比率で周辺画像データと元画像データとを混合処理して合成する際には、第1の実施の形態で説明した複数の方法のうち、いずれかの方法を利用可能である。すなわち、ある混合比率で周辺画像データと元画像データとを混合処理する際には、R、G、Bの各色の成分ごとに混合しても、輝度情報や明度の情報を用いて混合しても、あるいは彩度情報のみを用いて混合してもよい。また、第1の実施の形態で説明したのと同様に、処理後一時画像データおよび元画像データが互いに異なる色空間の画像データとなっている場合には、処理後一時画像データの色空間と同じ色空間の画像データに元画像データを変換する。あるいは、処理後一時画像データを変換して元画像データの色空間と同じ色空間になるようにしてもよい。   When the surrounding image data and the original image data are mixed and synthesized at a predetermined mixing ratio, any one of the plurality of methods described in the first embodiment can be used. . That is, when the peripheral image data and the original image data are mixed at a certain mixing ratio, even if they are mixed for each color component of R, G, and B, they are mixed using luminance information and lightness information. Alternatively, mixing may be performed using only the saturation information. As described in the first embodiment, when the post-processing temporary image data and the original image data are image data of different color spaces, the color space of the post-processing temporary image data The original image data is converted into image data in the same color space. Alternatively, the post-processing temporary image data may be converted so as to have the same color space as that of the original image data.

一方、S1304での画像処理実行判定において画像処理は行わないと判定された場合、図13のフローチャートにおいてS1306の判定が否定されるので、上記のS1308からS1314の処理はスキップされる。すなわち、図6のS602およびS606での判定が否定されるということは、主要部の彩度がもともと高めであり、かつ、主要部には比較的細かいテクスチャを有する領域がさほど多くは存在しない、という状況に対応する。この場合、周辺部の低減処理をしなくても主要部は十分に際立っていて、自然な画像を得ることができる。   On the other hand, if it is determined in the image processing execution determination in S1304 that the image processing is not performed, the determination in S1306 is denied in the flowchart of FIG. 13, and thus the processing from S1308 to S1314 is skipped. That is, the determinations in S602 and S606 in FIG. 6 are denied, the saturation of the main part is originally high, and there are not so many regions having a relatively fine texture in the main part. Corresponds to the situation. In this case, the main part is sufficiently conspicuous without performing the reduction processing of the peripheral part, and a natural image can be obtained.

図14は、図13のフローチャートを参照して以上に説明した処理手順を概念的に示す図である。第2の実施の形態によれば、元画像データから生成された一時画像データに対して、S508で設定された画像処理パラメータが一律に適用され、処理後一時画像データが生成される。そして処理後一時画像データ中、1または複数の主要部に対応する部分以外の画像データ(周辺部に対応する部分の画像データ)である部分画像データすなわち周辺画像データと、元画像データとが合成されて補正画像データが生成される。   FIG. 14 is a diagram conceptually showing the processing procedure described above with reference to the flowchart of FIG. According to the second embodiment, the image processing parameters set in S508 are uniformly applied to the temporary image data generated from the original image data, and the processed temporary image data is generated. In the post-processing temporary image data, the partial image data that is image data other than the portion corresponding to one or a plurality of main portions (image data of the portion corresponding to the peripheral portion), that is, the peripheral image data, and the original image data are combined. Thus, corrected image data is generated.

上述のようにして生成された補正画像データに基づく画像は、周辺部の領域に対応する画像の彩度、明るさ、およびコントラストのうちの少なくともいずれかが低減されたものとなる。結果として、主要部に対応する領域の画像が他の領域の画像よりも相対的に際立って見えるようになり、見栄えのする画像を得ることが可能となる。   The image based on the corrected image data generated as described above is one in which at least one of the saturation, brightness, and contrast of the image corresponding to the peripheral region is reduced. As a result, the image of the region corresponding to the main part can be seen more conspicuously than the image of the other region, and an image that looks good can be obtained.

− 第3の実施の形態 −
図15は、画像処理装置100で実行される画像処理の手順を説明するフローチャートである。S1500において画像処理装置100は元画像データを取得する。この処理は、第1の実施の形態で図5を参照して説明したS500の処理と同様のものとすることが可能である。S1502において画像処理装置100は元画像データを解析し、1または複数の主要部と、周辺部とを設定する処理をする。この処理が領域設定部104における処理に相当する。この処理は、第2の実施の形態で図13を参照して説明したS1302における処理と同様であり、S1502において設定される主要部の数は、取得した元画像によって、一つだけではなく、複数となる場合がある。
− Third embodiment −
FIG. 15 is a flowchart illustrating a procedure of image processing executed by the image processing apparatus 100. In step S1500, the image processing apparatus 100 acquires original image data. This process can be the same as the process of S500 described with reference to FIG. 5 in the first embodiment. In step S <b> 1502, the image processing apparatus 100 analyzes the original image data and performs processing for setting one or more main parts and peripheral parts. This process corresponds to the process in the area setting unit 104. This process is the same as the process in S1302 described with reference to FIG. 13 in the second embodiment, and the number of main parts set in S1502 is not limited to one, depending on the acquired original image. There may be multiple.

S1504において画像処理装置100は、画像処理実行判定処理、すなわち、主要部の画像を解析し、補正画像データを生成する処理を行うか否かを判定する処理を行う。このとき、画像処理装置100は、S1502の処理において複数の主要部が設定された場合、それら複数の主要部それぞれに対して画像処理実行判定を行う。画像処理実行判定の詳細は、第1の実施の形態で図6のフローチャートを参照して説明したのと同様である。   In step S <b> 1504, the image processing apparatus 100 performs an image processing execution determination process, that is, a process of determining whether to perform a process of analyzing a main part image and generating corrected image data. At this time, when a plurality of main parts are set in the process of S1502, the image processing apparatus 100 performs image processing execution determination for each of the plurality of main parts. The details of the image processing execution determination are the same as those described with reference to the flowchart of FIG. 6 in the first embodiment.

S1504での上述した判定処理結果を受け、画像処理装置100はS1506において、画像処理を行うか行わないかの判定をし、肯定されるとS1508に進み、否定されると画像処理は行わずに図15の処理を終える。   In response to the determination processing result in S1504, the image processing apparatus 100 determines whether or not to perform image processing in S1506. If the result is affirmative, the process proceeds to S1508. If the result is negative, the image processing is not performed. The process of FIG. 15 is finished.

S1506での判定が肯定されると、画像処理装置100はS1508からS1514の処理を行う。第3の実施の形態において、これらS1508からS1514における一連の処理が補正画像データ生成部108による処理に相当する。   If the determination in S1506 is affirmed, the image processing apparatus 100 performs the processing from S1508 to S1514. In the third embodiment, a series of processing from S1508 to S1514 corresponds to processing by the corrected image data generation unit.

S1508では画像処理パラメータを設定する処理が行われ、S1510では元画像データから一時画像データを生成する処理が行われる。S1508およびS1510の処理は、第1の実施の形態で説明したS508およびS510の処理と同様とすることが可能である。   In S1508, processing for setting image processing parameters is performed, and in S1510, processing for generating temporary image data from the original image data is performed. The processing in S1508 and S1510 can be the same as the processing in S508 and S510 described in the first embodiment.

S1512において画像処理装置100は、一時画像データ中の部分画像データに低減処理を施して処理後一時画像データを生成する。この部分画像データは、一時画像データ中、周辺部に対応する領域の画像データである。つまり、S1502で一または複数の主要部が設定されることについて先に説明したが、この一または複数の主要部に対応する部分以外の領域の画像データ、すなわち周辺画像データである。   In step S <b> 1512, the image processing apparatus 100 performs reduction processing on the partial image data in the temporary image data to generate post-processing temporary image data. This partial image data is image data of an area corresponding to the peripheral portion in the temporary image data. That is, although one or more main parts are set in S1502, the image data of a region other than the part corresponding to the one or more main parts, that is, peripheral image data.

S1514において画像処理装置100は、処理後一時画像データ中の周辺画像データと、元画像データ中の対応する位置の画像データとを合成し、補正画像データを生成する。S1514における合成の処理に際しては、単純に、元画像データ中の周辺部に対応する画像データを周辺画像データで置き換えることが可能である。あるいは、予め定められた混合比率で周辺画像データと元画像データとを混合することも可能である。このとき、混合比率は、画像全体に対して一様の混合比率が設定されていてもよいし、画像内の異なる位置ごとに異なる混合比率が設定されていてもよい。   In step S1514, the image processing apparatus 100 combines the peripheral image data in the post-processing temporary image data and the image data at the corresponding position in the original image data to generate corrected image data. In the combining process in S1514, it is possible to simply replace the image data corresponding to the peripheral portion in the original image data with the peripheral image data. Alternatively, the surrounding image data and the original image data can be mixed at a predetermined mixing ratio. At this time, as the mixing ratio, a uniform mixing ratio may be set for the entire image, or a different mixing ratio may be set for each different position in the image.

予め定められた混合比率で周辺画像データと元画像データとを混合処理して合成する際には、第1の実施の形態で説明した複数の方法のうち、いずれかの方法を利用可能である。すなわち、ある混合比率で周辺画像データと元画像データとを混合処理する際には、R、G、Bの各色の成分ごとに混合しても、輝度情報や明度の情報を用いて混合しても、あるいは彩度情報のみを用いて混合してもよい。また、第1の実施の形態で説明したのと同様に、処理後一時画像データおよび元画像データが互いに異なる色空間の画像データとなっている場合には、処理後一時画像データの色空間と同じ色空間の画像データに元画像データを変換する。あるいは、処理後一時画像データを変換して元画像データの色空間と同じ色空間になるようにしてもよい。   When the surrounding image data and the original image data are mixed and synthesized at a predetermined mixing ratio, any one of the plurality of methods described in the first embodiment can be used. . That is, when the peripheral image data and the original image data are mixed at a certain mixing ratio, even if they are mixed for each color component of R, G, and B, they are mixed using luminance information and lightness information. Alternatively, mixing may be performed using only the saturation information. As described in the first embodiment, when the post-processing temporary image data and the original image data are image data of different color spaces, the color space of the post-processing temporary image data The original image data is converted into image data in the same color space. Alternatively, the post-processing temporary image data may be converted so as to have the same color space as that of the original image data.

一方、S1504での画像処理実行判定において画像処理は行わないと判定された場合、図15のフローチャートにおいてS1506の判定が否定されるので、上記のS1508からS1514の処理はスキップされる。すなわち、第2の実施の形態でも説明したように、図6のS602およびS606での判定が否定されるということは、主要部の彩度がもともと高めであり、かつ、主要部には比較的細かいテクスチャを有する領域がさほど多くは存在しない、という状況に対応する。この場合、周辺部の低減処理をしなくても主要部は十分に際立っていて、自然な画像を得ることができる。   On the other hand, if it is determined in the image processing execution determination in S1504 that the image processing is not performed, the determination in S1506 is denied in the flowchart of FIG. 15, and thus the processing from S1508 to S1514 is skipped. That is, as described in the second embodiment, the negative determination in S602 and S606 in FIG. 6 means that the saturation of the main part is originally high and the main part is relatively This corresponds to a situation where there are not so many regions having fine textures. In this case, the main part is sufficiently conspicuous without performing the reduction processing of the peripheral part, and a natural image can be obtained.

図16は、図15のフローチャートを参照して以上に説明した処理手順を概念的に示す図である。第3の実施の形態によれば、元画像データから生成された一時画像データ中の、周辺部に対応する周辺画像データに低減処理が施されて処理後一時画像データが生成される。この処理後一時画像データと、元画像データとが合成されて補正画像データが生成される。   FIG. 16 is a diagram conceptually showing the processing procedure described above with reference to the flowchart of FIG. According to the third embodiment, the temporary image data after processing is generated by performing reduction processing on the peripheral image data corresponding to the peripheral portion in the temporary image data generated from the original image data. The post-processing temporary image data and the original image data are combined to generate corrected image data.

上述のようにして生成された補正画像データに基づく画像は、周辺部の領域に対応する画像の彩度、明るさ、およびコントラストのうちの少なくともいずれかが低減されたものとなる。結果として、主要部に対応する領域の画像が他の領域の画像よりも相対的に際立って見えるようになり、見栄えのする画像を得ることが可能となる。第3の実施の形態においては、一時画像データ中の周辺画像データのみに対して低減処理が行われるので、主要部の領域が広めである(周辺部の領域が狭めで周辺画像データのデータサイズが小さめの)とき、処理時間を短縮することが可能となる。   The image based on the corrected image data generated as described above is one in which at least one of the saturation, brightness, and contrast of the image corresponding to the peripheral region is reduced. As a result, the image of the region corresponding to the main part can be seen more conspicuously than the image of the other region, and an image that looks good can be obtained. In the third embodiment, since the reduction process is performed only on the peripheral image data in the temporary image data, the main area is wider (the peripheral area is narrower and the data size of the peripheral image data is smaller). When it is small), the processing time can be shortened.

− 第4の実施の形態 −
図17は、第4の実施の形態に係る画像処理装置100で実行される画像処理の手順を説明するフローチャートである。画像処理装置100は、S1700で画像データを取得する。この処理が画像データ取得部102での処理に相当する。取得した画像データは元画像データである。S1700の処理は、第1の実施の形態で図5を参照して説明したS500の処理と同様である。
-Fourth embodiment-
FIG. 17 is a flowchart illustrating the procedure of image processing executed by the image processing apparatus 100 according to the fourth embodiment. In step S1700, the image processing apparatus 100 acquires image data. This process corresponds to the process in the image data acquisition unit 102. The acquired image data is original image data. The processing in S1700 is the same as the processing in S500 described with reference to FIG. 5 in the first embodiment.

S1702において画像処理装置100は、元画像データを解析して主要部、周辺部を設定する処理をする。この処理が領域設定部104での処理に相当する。S1702での処理は、第1の実施の形態で図5を参照して説明したS502の処理と同様のものとすることが可能である。   In step S <b> 1702, the image processing apparatus 100 performs processing for analyzing the original image data and setting the main part and the peripheral part. This process corresponds to the process in the area setting unit 104. The processing in S1702 can be the same as the processing in S502 described with reference to FIG. 5 in the first embodiment.

S1704において画像処理装置100は、主要部の画像を解析し、補正画像データを生成する処理を行うか否かを判定する処理を行う。この処理が画像処理実行判定部106での処理に相当する。S1704において行われる処理は、第1の実施の形態で図6を参照して説明したものと同様のものとすることが可能である。   In step S <b> 1704, the image processing apparatus 100 analyzes the main part image and performs a process of determining whether to perform a process of generating corrected image data. This process corresponds to the process in the image processing execution determination unit 106. The processing performed in S1704 can be the same as that described with reference to FIG. 6 in the first embodiment.

S1704での判定処理結果を受け、画像処理装置100はS1706において、画像処理を行うか行わないかの判定をする。S1706での判定が、肯定されるとS1708に進み、否定されると画像処理を行うことなく、図17の処理を終える。   In response to the determination processing result in S1704, the image processing apparatus 100 determines whether or not to perform image processing in S1706. If the determination in S1706 is affirmative, the process proceeds to S1708, and if negative, the process of FIG. 17 is terminated without performing image processing.

S1706での判定が肯定されると、画像処理装置100はS1708、S1710、およびS1712の処理を行う。第4の実施の形態において、これらS1708、S1710、およびS1712の処理が補正画像データ生成部108による処理に相当する。   If the determination in S1706 is affirmed, the image processing apparatus 100 performs the processes of S1708, S1710, and S1712. In the fourth embodiment, the processing of S1708, S1710, and S1712 corresponds to the processing by the corrected image data generation unit.

S1708において画像処理装置100は、元画像データを解析して、画素ごと、あるいは複数画素ごとに主要度を導出し、主要度マップを生成する。主要度の導出方法については、第1の実施の形態で説明したのと同様のものとすることが可能である。主要度マップは、図18に概念図が示されるように、元画像データにより形成される画像中における主要度の分布が記録されたデータテーブルである。この主要度マップのデータサイズや値の定め方に関しても、第1の実施の形態で説明したのと同様のものとすることが可能である。   In step S1708, the image processing apparatus 100 analyzes the original image data, derives the degree of importance for each pixel or for each of a plurality of pixels, and generates a degree-of-importance map. The method for deriving the degree of importance can be the same as that described in the first embodiment. As shown in the conceptual diagram of FIG. 18, the importance map is a data table in which the distribution of the importance in the image formed by the original image data is recorded. The method of determining the data size and value of the importance map can be the same as that described in the first embodiment.

S1710において画像処理装置100は、S1708で作成された主要度マップに基づいて、画素ごとまたは複数画素ごとに処理パラメータを設定する。処理パラメータの設定に際しては、第1の実施の形態で図8、図9等を参照して説明したのと同様の方法を用いることが可能である。   In step S <b> 1710, the image processing apparatus 100 sets a processing parameter for each pixel or for each of a plurality of pixels based on the importance map created in step S <b> 1708. When setting the processing parameters, it is possible to use the same method as described with reference to FIGS. 8 and 9 in the first embodiment.

S1712において画像処理装置100は、S1710で設定された処理パラメータに基づき、低減処理を行う。低減処理を行う対象は、第1〜第3の実施の形態と異なり、元画像データである。低減処理は、主要度が低いほど、その強度が高められる。低減処理により、明るさ、コントラスト、および彩度のうち、少なくともいずれかが減じられる。なお、明るさおよび彩度については画素単位での低減処理が可能であるが、コントラスト低減の処理に関しては複数画素単位での処理となる。理由は、コントラストが複数の画素間の明暗の差、あるいは彩度の差に基づくものであるからである。   In S1712, the image processing apparatus 100 performs a reduction process based on the processing parameters set in S1710. Unlike the first to third embodiments, the target to be reduced is original image data. The strength of the reduction process increases as the degree of importance decreases. At least one of brightness, contrast, and saturation is reduced by the reduction process. Note that the brightness and saturation can be reduced in units of pixels, but the contrast reduction processing is performed in units of a plurality of pixels. The reason is that the contrast is based on a difference in brightness between a plurality of pixels or a difference in saturation.

第4の実施の形態においてコントラスト低減の処理を行う場合、例えば以下のような方法を実行することが可能である。すなわち、S1708で作成された主要度マップ中、所定の階級幅に収まる画素からなる領域を一つの領域とするようにして複数の領域を区画し、各領域の主要度の高低に応じて処理パラメータを設定する。そして、区画された領域ごとに、主要度の高低に応じてコントラスト低減の処理を行うことが可能となる。   When the contrast reduction process is performed in the fourth embodiment, for example, the following method can be executed. That is, in the importance map created in S1708, a plurality of areas are partitioned so that an area composed of pixels that fall within a predetermined class width is defined as one area, and processing parameters are set according to the level of importance of each area. Set. Then, it is possible to perform contrast reduction processing according to the level of importance for each partitioned area.

図18は、図17のフローチャートを参照して以上に説明した処理を概念的に示す図である。先にも説明したように、第4の実施の形態においては、一時画像データが生成されず、元画像データに対して画像処理(低減処理)が行われる。低減処理に際しての処理パラメータは、元画像データを解析して生成された主要度マップに基づいて元画像データの画素ごとあるいは複数画素ごとに決定される。   FIG. 18 is a diagram conceptually showing the processing described above with reference to the flowchart of FIG. As described above, in the fourth embodiment, temporary image data is not generated, and image processing (reduction processing) is performed on the original image data. The processing parameters for the reduction process are determined for each pixel or a plurality of pixels of the original image data based on the importance map generated by analyzing the original image data.

以上に説明したように、第4の実施の形態によれば、画素ごとまたは複数画素ごとに導出された主要度に基づいて主要度マップが生成され、主要度マップに基づいて処理パラメータが設定されて低減処理が行われる。その結果、周辺部全体に対して一つの処理パラメータで低減処理が行われるのに比べ、よりきめ細かく処理パラメータを設定することが可能となり、より自然な画像を得ることが可能となる。   As described above, according to the fourth embodiment, the degree of importance map is generated based on the degree of importance derived for each pixel or every plurality of pixels, and the processing parameter is set based on the degree of importance map. The reduction process is performed. As a result, it is possible to set the processing parameters more finely and obtain a more natural image as compared with the case where the reduction processing is performed on the entire peripheral portion with one processing parameter.

− 主要部あるいは主要度の高い領域の画像に対する強調処理 −
以上、第1〜第4の実施の形態では、画像内で主要度のより低い領域に対して低減処理が行われる例について説明した。以下では、上述した低減処理に加えて、主要度のより高い領域の画像が他の領域の画像よりも際立つようにする処理も行われる例について説明する。以下では先ず、主要度のより高い領域の画像が他の領域の画像よりも際立つようにする処理(以下ではこれを強調処理と称する)の具体例について説明し、その後、上記第1〜第4の実施の形態で説明した低減処理とともに強調処理が行われる例について説明する。
− Emphasis processing for images of main areas or areas of high importance −
As described above, in the first to fourth embodiments, the example in which the reduction process is performed on the less important area in the image has been described. In the following, an example will be described in which, in addition to the reduction process described above, a process of making an image of a higher-priority area stand out than an image of another area is also performed. In the following, first, a specific example of processing (hereinafter, referred to as emphasis processing) that makes an image of a higher-priority area stand out than images of other areas will be described, and then the first to fourth processes described above. An example in which the enhancement process is performed together with the reduction process described in the embodiment will be described.

図19は、様々な画像のヒストグラムの例を示す図であり、横軸には明るさが、縦軸には度数がとられている。図19(a)から図19(f)のそれぞれにおいて、実線および破線のヒストグラムが示されているが、破線は強調処理をする前の画像のヒストグラムを、実線は強調処理をした後の画像のヒストグラムを示している。この図19を参照し、強調処理として明るさやコントラストを補正する処理が行われる場合の具体例について説明する。なお、図19に例示されるヒストグラムはいずれも、元画像全体の画像データから導出されたものではなく、主要部の画像データから導出されたものであるものとする。   FIG. 19 is a diagram illustrating examples of histograms of various images, where the horizontal axis represents brightness and the vertical axis represents frequency. In each of FIGS. 19 (a) to 19 (f), a solid line and a broken line histogram are shown. The broken line is a histogram of the image before the enhancement process, and the solid line is the image of the image after the enhancement process. A histogram is shown. With reference to FIG. 19, a specific example in the case where processing for correcting brightness and contrast is performed as enhancement processing will be described. Note that all the histograms illustrated in FIG. 19 are not derived from the image data of the entire original image, but are derived from the image data of the main part.

図19(a)は、ヒストグラムが暗側へ極端に偏っている例を示す。例えば、室内で窓際に立っている人物を撮影し、窓の外は日中の晴天である場合等にこのようなヒストグラムとなる。つまり、背景が明るいために露出が切りつめられ、主要部に写る人物の像が黒くつぶれている状況である。このような場合、強調処理としては、明るさを増し、かつコントラストを増す処理が行われる。その結果、処理後のヒストグラムにおいて最頻値(分布の山のピーク位置)はより明るい側に移動し、かつ分布の山の幅が増している。   FIG. 19A shows an example in which the histogram is extremely biased to the dark side. For example, such a histogram is obtained when a person standing at the window in the room is photographed and the outside of the window is sunny in the daytime. In other words, because the background is bright, the exposure is cut off, and the image of the person in the main part is crushed in black. In such a case, as enhancement processing, processing for increasing brightness and increasing contrast is performed. As a result, the mode value (peak position of the distribution peak) in the histogram after processing moves to a brighter side, and the width of the distribution peak increases.

図19(b)は、ヒストグラムが暗側に偏り気味である例を示す。この例も、主要部に写る被写体が逆光気味の照明条件のもとで撮影されたものであるときに見られるものである。また、夜間や暗めの室内でフラッシュ撮影をしたときに、フラッシュの光量が不足気味であるときにも、このようなヒストグラムとなる。このような場合にも、強調処理として、明るさを増し、かつコントラストを増す処理が行われる。その結果、処理後のヒストグラムにおいて最頻値はより明るい側に移動し、かつ分布の山の幅が増している。   FIG. 19B shows an example in which the histogram is biased toward the dark side. This example is also seen when the subject shown in the main part is taken under a lighting condition with a slight backlight. In addition, such a histogram is also obtained when flash photography is performed at night or in a dark room and the amount of flash light is insufficient. Even in such a case, as enhancement processing, processing for increasing brightness and increasing contrast is performed. As a result, in the histogram after processing, the mode value moves to the brighter side, and the width of the distribution peak increases.

図19(c)は、図19(b)に示されるのと同様、ヒストグラムが暗側に偏り気味である例を示す。図19(b)を参照して説明したのと同様の撮影状況で見られるヒストグラムであるが、ここでは撮影者が意図的に露出を切り詰めてローキーの画像を得ようとしたものとする。例えば、主要部の画像だけでなく、周辺部の画像の明るさも暗めのときに、コントラストを増す一方で明るさは減じる処理が行われる場合もある。強調処理としてこのような処理が行われた結果、処理後のヒストグラムにおいて最頻値はより暗い側に移動し、かつ分布の山の幅が増している。   FIG. 19C shows an example in which the histogram is biased toward the dark side, as shown in FIG. 19B. This is a histogram that can be seen in the same shooting situation as described with reference to FIG. 19B. Here, it is assumed that the photographer intentionally cuts the exposure to obtain a low-key image. For example, when the brightness of not only the main part image but also the peripheral part image is dark, a process of increasing the contrast while decreasing the brightness may be performed. As a result of such processing as enhancement processing, the mode value moves to a darker side in the histogram after processing, and the width of the distribution peak increases.

図19(d)は、明るさの分布が中間域に集中している例を示す。この例は、輝度範囲の比較的広い(明るい部分も暗い部分も存在する)背景中に中庸の輝度を有する被写体が主要部に写っている状況で見られるものである。主要部の被写体に対する露出レベルそのものは適切ではあるものの、周辺部には低輝度から高輝度にわたる比較的広い輝度範囲の被写体が写っているため、主要部に写る中間輝度域の被写体の画像に割り当てられた階調の幅が比較的狭くなっている。結果として、主要部に写る被写体のコントラストは低めとなる。このような場合、強調処理としては、明るさを増すとともにコントラストを増す処理が行われる。その結果、処理後のヒストグラムにおいて分布の山の幅が増している。また、主要部の平均的な明るさが増しているので、主要部の画像が周辺部の画像に対して際立つ。このとき、主要部の画像に対してのみ強調処理が行われるので、処理後の画像データにおいて周辺部の画像中の暗部が黒くつぶれてしまったり、明部が白く飛んでしまったりすることを抑制可能となる。   FIG. 19D shows an example in which the brightness distribution is concentrated in the intermediate region. This example can be seen in a situation in which a subject having moderate brightness is reflected in the main part in a background with a relatively wide brightness range (both bright and dark parts are present). Although the exposure level for the main subject itself is appropriate, a subject with a relatively wide luminance range from low to high brightness is shown in the peripheral area, so it is assigned to the image of the subject in the intermediate luminance range that appears in the main portion. The width of the gradation to be produced is relatively narrow. As a result, the contrast of the subject shown in the main part is low. In such a case, as the enhancement process, a process of increasing the brightness and the contrast is performed. As a result, the width of the distribution peak increases in the processed histogram. Further, since the average brightness of the main part is increased, the image of the main part stands out from the image of the peripheral part. At this time, since the enhancement process is performed only on the main image, it is possible to prevent the dark portion in the peripheral image from being crushed in black or the bright portion from being white in the processed image data. It becomes possible.

図19(e)は、明るさの分布が暗部から明部にかけてほぼ満遍なく分布している例を示す。この例は、曇天等の比較的フラットな照明条件のもとで明部、暗部、中間部が適度に存在する被写体を撮影するような状況で見られるヒストグラムである。このようなヒストグラムが得られる画像は、そのままでも適度なメリハリのあるものである可能性は高い。しかし、主要部の画像がさらに際立つようにするために、以下のような処理を行う。すなわち、ヒストグラムを暗部、明部に分けて見たときに、処理後の明度分布の重心が、暗部ではより暗い側に移動し、明部ではより明るい側に移動するように補正をする。このようにすることにより、主要部の画像のコントラストを高めて際立たせることが可能となる。   FIG. 19E shows an example in which the brightness distribution is almost evenly distributed from the dark part to the bright part. This example is a histogram that can be seen in a situation where a subject with moderately bright parts, dark parts, and intermediate parts is photographed under relatively flat illumination conditions such as cloudy weather. An image from which such a histogram can be obtained is likely to be moderately sharp even as it is. However, in order to make the image of the main part stand out further, the following processing is performed. That is, when the histogram is divided into a dark part and a bright part, the center of gravity of the lightness distribution after processing is corrected so as to move to a darker side in the dark part and to a brighter side in the bright part. By doing so, it becomes possible to enhance the contrast of the image of the main part and make it stand out.

図19(f)は、ヒストグラムが明側に偏り気味である例を示す。ここでは撮影者が意図的に露出を過剰気味に設定し、ハイキーの画像を得ようとしたものとする。例えば、主要部の画像だけでなく、周辺部の画像の明るさも明るめのときに、コントラストを増しつつ、明るさを増す処理が行われる場合もある。強調処理としてこのような処理が行われた結果、処理後のヒストグラムにおいて最頻値はより明るい側に移動し、かつ分布の山の幅が増している。   FIG. 19F shows an example in which the histogram is biased toward the bright side. Here, it is assumed that the photographer intentionally sets the exposure excessively and tries to obtain a high key image. For example, when the brightness of not only the main image but also the peripheral image is bright, a process of increasing the brightness while increasing the contrast may be performed. As a result of such processing as enhancement processing, the mode value moves to a brighter side in the histogram after processing, and the width of the distribution peak increases.

図19(g)もまた、図19(f)の例と同様に、ヒストグラムが明側に偏り気味である例を示す。この例は、周辺部に写る被写体の反射率に比して主要部に写る被写体の反射率が高めの(白っぽい)ときに見られるものである。このような場合、強調処理として、明るさを減少させ、かつコントラストを増す処理が行われる。その結果、処理後のヒストグラムにおいて最頻値はより暗い側に移動し、かつ分布の山の幅が増している。   FIG. 19 (g) also shows an example in which the histogram is biased toward the bright side as in the example of FIG. 19 (f). This example is seen when the reflectance of the subject shown in the main part is higher (whiter) than the reflectance of the subject shown in the peripheral part. In such a case, as the enhancement process, a process of reducing the brightness and increasing the contrast is performed. As a result, the mode value moves to a darker side in the processed histogram, and the width of the distribution peak increases.

図19(h)は、ヒストグラムが明側へ極端に偏っている例を示す。この例は、主要部に写る被写体が、図19(g)で説明したものよりもさらに反射率が高い場合に見られるものである。このような状態となるものとしては、主要被写体が順光条件下の雪山や白壁の建築物等で、主要被写体の周囲の比較的広い領域に比較的低輝度の被写体が写っているような状況がある。このような場合、強調処理としては、明るさを減じ、かつコントラストを増す処理が行うことが可能である。その結果、処理後のヒストグラムにおいて最頻値(分布の山のピーク位置)はより暗い側に移動し、かつ分布の山の幅が増している。このように補正をすることにより、被写体表面のテクスチャを再現することが可能となる。   FIG. 19H shows an example in which the histogram is extremely biased toward the bright side. This example is seen when the subject shown in the main part has a higher reflectance than that described with reference to FIG. This can happen when the main subject is a snowy mountain or white-walled building under direct light conditions, and a relatively low-luminance subject appears in a relatively large area around the main subject. There is. In such a case, as the enhancement process, a process of reducing the brightness and increasing the contrast can be performed. As a result, the mode value (peak position of the distribution peak) in the histogram after processing moves to a darker side, and the width of the distribution peak increases. By correcting in this way, the texture of the subject surface can be reproduced.

図19を参照して説明した処理を行う際には、例えばLabやYCbCr、あるいはHSLといった色空間で規定される画像データ中のLチャンネル、Yチャンネルの色座標値を補正することが可能である。あるいは、RGBやYCM等の色空間で規定される画像データに対しては、RGB、YCMのそれぞれの色座標値に同じ係数を乗じるようにしてもよい。ところで、上記Lチャンネル、Yチャンネルの色座標値は、各画素の明るさ、つまり輝度または明度を規定する情報であり、本明細書中では明度情報と称する。また、主要部あるいは主要度の高い領域の画像を構成する画素それぞれの明度情報を主要部明度情報と称する。   When the processing described with reference to FIG. 19 is performed, it is possible to correct the color coordinate values of the L channel and the Y channel in the image data defined by a color space such as Lab, YCbCr, or HSL. . Alternatively, image data defined in a color space such as RGB or YCM may be multiplied by the same coefficient for each color coordinate value of RGB and YCM. By the way, the color coordinate values of the L channel and the Y channel are information that defines the brightness of each pixel, that is, the luminance or the brightness, and are referred to as brightness information in this specification. In addition, lightness information of each pixel constituting an image of a main part or an area of high importance is referred to as main part lightness information.

図19に示されるもの以外のコントラスト増加の処理として、ヒストグラム平滑化の処理を行うことも可能である。ヒストグラム平滑化の処理は、画像データを解析した結果に基づいて導出された階調変換特性をその画像データに適用し、階調変換処理後の画像データのヒストグラムのプロファイルが、明るさによらずほぼフラットないしはより緩やかになるようにする処理である。ヒストグラム平滑化の処理手順としては、一例として以下に説明するものがある。   As a contrast increase process other than that shown in FIG. 19, a histogram smoothing process may be performed. In the histogram smoothing process, the tone conversion characteristics derived based on the result of analyzing the image data are applied to the image data, and the histogram profile of the image data after the tone conversion processing is independent of the brightness. This is a process that makes the surface almost flat or more gradual. An example of the histogram smoothing procedure is described below.

1.明度情報をソート:
画像データ中の明度情報をソートする処理を行う。画像データがRGB色空間で規定される画像データである場合、画素ごとにR、G、Bの各色座標値を単純に加算した値、あるいは人の眼の視覚特性に合うように、R、G、Bの各色座標値に重み付けをして加算した値を明度情報として、この明度情報に基づいてソートをする。このとき、上記のように加算した値から平均値(単純平均値または加重平均値)を画素毎に求めたものを階調値としてソートをしてもよい。画像データがLabやYCbCr、あるいはHSL等の色空間で規定されるものである場合、Lチャンネル、Yチャンネルの値を明度情報としてソートする。
1. Sort brightness information:
A process for sorting brightness information in the image data is performed. When the image data is image data defined in the RGB color space, a value obtained by simply adding R, G, and B color coordinate values for each pixel, or R, G so as to match the visual characteristics of the human eye A value obtained by weighting and adding to each color coordinate value of B is used as brightness information, and sorting is performed based on the brightness information. At this time, an average value (simple average value or weighted average value) obtained for each pixel from the values added as described above may be sorted as gradation values. When the image data is defined by a color space such as Lab, YCbCr, or HSL, the L channel and Y channel values are sorted as lightness information.

2.累積頻度を導出:
明度情報が整数値であるものとして説明すると、明度情報が0から1までの値をとる画素の数、0から2までの値をとる画素の数、…、0から最大値までの値をとる画素の数を求める。すなわち、累積頻度特性を求める。このようにして求められた累積頻度特性をもとに、横軸に明度情報、縦軸に累積頻度をとってグラフにプロットすると、明度情報の値を変数とする累積頻度特性の曲線を描くことができる。
2. Deriving cumulative frequency:
If the brightness information is assumed to be an integer value, the brightness information takes the number of pixels having a value from 0 to 1, the number of pixels having a value from 0 to 2, ..., the value from 0 to the maximum value. Find the number of pixels. That is, the cumulative frequency characteristic is obtained. Based on the cumulative frequency characteristics obtained in this way, plotting the graph with the brightness information on the horizontal axis and the cumulative frequency on the vertical axis, plotting the value of the brightness information as a variable Can do.

3.階調変換の処理:
上述した累積頻度特性の曲線のプロファイルをそのまま階調変換特性曲線のプロファイルとなるようにして階調変換特性を導出する。この階調変換特性を用いて画像データに階調変換の処理を施すことにより、ヒストグラムは平滑化される。例えば、階調変換前の画像データのヒストグラムが、狭い階調域に集中して分布しているような特性を有するものである場合、ヒストグラム中にピーク状のプロファイルが現れる。上記の階調変換の処理を行うことにより、いわば密集して分布していてヒストグラムのピークが現れる階調域に対してより広い階調幅が与えられるようになる(ピークの高さは低められ、ピークの幅は増加する)。逆に、頻度の比較的少ない階調域においては、上記の階調変換の処理を行うことにより、階調幅が狭められる。結果として階調変換処理後のヒストグラムは、より緩やかなものとなり、画像のコントラストを増すことが可能となる。
3. Tone conversion processing:
The gradation conversion characteristic is derived by making the profile of the curve of the cumulative frequency characteristic described above directly the profile of the gradation conversion characteristic curve. By applying gradation conversion processing to the image data using the gradation conversion characteristics, the histogram is smoothed. For example, when the histogram of the image data before gradation conversion has such characteristics that it is concentrated and distributed in a narrow gradation region, a peak profile appears in the histogram. By performing the above-described gradation conversion processing, a broader gradation width can be given to a gradation region where the peaks of the histogram appear to be densely distributed and appear (the peak height is reduced, The peak width increases). On the other hand, in the gradation region with a relatively low frequency, the gradation width is narrowed by performing the gradation conversion process described above. As a result, the histogram after gradation conversion processing becomes more gradual, and the contrast of the image can be increased.

補正画像データ生成部108で行われる強調処理は、図19を参照して以上に説明した例およびヒストグラム平滑化の処理のうち、一部の方法に従って行われてもよいし、すべての方法に従って行われてもよい。また、上述したもの以外の方法で強調処理が行われてもよい。すなわち、以上では強調処理として画像データの明るさを調整する例のみを説明しているが、彩度や色相などを調整して強調処理が行われるものであってもよい。つまり、上述したLab、YCbCr、HSL等の色空間で規定される画像データ中、強調処理に際して、a、bの色座標値、Cb、Crの色座標値、H、Sの色座標値を補正してもよい。   The enhancement processing performed in the corrected image data generation unit 108 may be performed according to some methods of the example described above with reference to FIG. 19 and the histogram smoothing processing, or may be performed according to all methods. It may be broken. Further, the emphasis processing may be performed by a method other than that described above. That is, only the example of adjusting the brightness of the image data as the enhancement process has been described above, but the enhancement process may be performed by adjusting the saturation, hue, or the like. That is, in the image data defined in the color space such as Lab, YCbCr, HSL, etc., the color coordinate values of a, b, Cb, Cr, and H, S are corrected during the enhancement process. May be.

第1〜第4の実施の形態では、画像処理パラメータを設定する処理ステップにおいて、低減処理を行う際の画像処理パラメータを設定する例について説明した。主要部、あるいは主要度の比較的高い領域の画像に強調処理を施す場合には、上述した画像処理パラメータを設定する処理ステップ(図5中のS508、図13中のS1308、図15中のS1508の各処理ステップ、および図17中のS1710の処理ステップ)において、低減処理を行う際の画像処理パラメータに加えて、強調処理を行う際の画像処理パラメータが設定される。強調処理を行う際の画像処理パラメータの設定方法について、以下で図20を参照して説明する。   In the first to fourth embodiments, the example of setting the image processing parameter when performing the reduction processing in the processing step of setting the image processing parameter has been described. When emphasizing processing is performed on an image of a main part or a region having a relatively high degree of importance, processing steps for setting the above-described image processing parameters (S508 in FIG. 5, S1308 in FIG. 13, S1508 in FIG. 15). In addition to the image processing parameters for performing the reduction processing, the image processing parameters for performing the enhancement processing are set in each processing step and the processing step of S1710 in FIG. A method for setting image processing parameters when performing enhancement processing will be described below with reference to FIG.

図20は、先に図19を参照して説明した強調処理を行う際の画像処理パラメータとして明るさ増加量補正係数が用いられる場合の例を示す図である。画像処理装置100は、強調処理をする際に、主要部の画像の明るさを増す処理(明るさ増加処理)を行って主要部の画像のコントラストを高める。このとき、主要部の画像の明るさを増す際の増加量は一定ではなく、図20に示される条件に従って変化する。すなわち、主要部の明るさ(輝度または明度)の平均値が第11閾値以上であるとき、明るさ(輝度または明度)増加量補正係数は0.5に設定される。主要部の明るさの平均値が第12閾値を上回り、かつ、第11閾値を下回る場合には明るさ増加量補正係数は1に設定される。主要部の明るさの平均値が第12閾値以下である場合、明るさ増加量補正係数は1.5に設定される。つまり、明るさ増加量補正係数は、明るさ増加処理を行う際の増加量を調節するための係数である。   FIG. 20 is a diagram illustrating an example in which a brightness increase amount correction coefficient is used as an image processing parameter when performing the enhancement processing described above with reference to FIG. When performing the enhancement process, the image processing apparatus 100 performs a process of increasing the brightness of the main part image (brightness increasing process) to increase the contrast of the main part image. At this time, the amount of increase when increasing the brightness of the image of the main part is not constant, and changes according to the conditions shown in FIG. That is, when the average value of the brightness (luminance or brightness) of the main part is equal to or greater than the eleventh threshold, the brightness (luminance or brightness) increase correction coefficient is set to 0.5. When the average brightness value of the main part exceeds the twelfth threshold and falls below the eleventh threshold, the brightness increase correction coefficient is set to 1. When the average value of the brightness of the main part is equal to or less than the twelfth threshold, the brightness increase amount correction coefficient is set to 1.5. That is, the brightness increase amount correction coefficient is a coefficient for adjusting the increase amount when performing the brightness increase process.

ここで、第11閾値および第12閾値の大小関係について説明すると、第11閾値が第12閾値よりも大きいものとする。つまり、主要部の明るさの平均値が第11閾値以上である、ということは主要部が比較的明るいことを想定しており、その場合には明るさ増加量がデフォルトの値に対して50%減とされ、主要部が過度に明るくならないように設定される(明るさ増加量補正係数=0.5)。主要部の明るさの平均値が第12閾値を上回り、かつ第11閾値を下回る、ということは主要部が中庸の明るさであることを想定しており、その場合には明るさ増加量がデフォルトの値に設定される(明るさ増加量補正係数=1.0)。そして、主要部の明るさの平均値が第12閾値以下である、ということは主要部が比較的暗いことを想定しており、その場合には明るさ増加量がデフォルトの値に対して50%増に設定される(明るさ増加量補正係数=1.5)。   Here, the magnitude relationship between the eleventh threshold and the twelfth threshold will be described. It is assumed that the eleventh threshold is larger than the twelfth threshold. That is, the average value of the brightness of the main part is equal to or greater than the eleventh threshold value assumes that the main part is relatively bright. In this case, the brightness increase amount is 50% of the default value. % Is set so that the main part does not become excessively bright (brightness increase correction coefficient = 0.5). The average value of the brightness of the main part is above the twelfth threshold value and below the eleventh threshold value, assuming that the main part has moderate brightness. In that case, the brightness increase amount is It is set to a default value (brightness increase correction coefficient = 1.0). The average value of the brightness of the main part is equal to or less than the twelfth threshold value assumes that the main part is relatively dark. In this case, the brightness increase amount is 50% of the default value. % Increase (brightness increase correction coefficient = 1.5).

さらに、主要部の近傍領域(図4参照)に第13閾値以上の明るさの領域が第14閾値以上の面積(画素数を面積として考えることが可能である)で存在する場合、明るさ増加量補正係数は1.5に設定される。つまり、主要部の近傍領域に比較的明るく、或る程度の面積を有する領域、すなわち目立つ領域が存在する場合には、その近傍領域の画像に埋もれてしまうことの無いように、主要部の明るさ増加量が50%増に設定される。第13閾値は、デフォルト設定された固定値としてもよいが、主要部の明るさの平均値に所定の大きさの値を加えた値とし、第13閾値は主要部の明るさに応じて変化するものとすることが望ましい。   Further, when the region having the brightness of the thirteenth threshold or more exists in the vicinity of the main part (see FIG. 4) with an area of the fourteenth threshold or more (the number of pixels can be considered as an area), the brightness increases. The amount correction coefficient is set to 1.5. In other words, if there is a relatively bright area in the vicinity of the main part and a certain area, that is, a conspicuous area, the brightness of the main part is prevented from being buried in the image of the vicinity. The amount of increase is set to 50% increase. The thirteenth threshold value may be a fixed value set as a default. However, the thirteenth threshold value is a value obtained by adding a predetermined value to the average brightness value of the main part, and the thirteenth threshold value varies depending on the brightness of the main part. It is desirable to do.

第13閾値だけでなく、第14閾値も設定することにより、以下の効果を得ることが可能となる。すなわち、画像中に輝点ノイズ等が存在する場合に、そのノイズに影響を受けて画像処理の内容が変化してしまうのは望ましいことではない。この点、上記のように第14閾値を設定することにより、近傍領域中に存在する明るい部分がノイズ等の影響で生じたものである場合、その明るい部分の存在を無視することが可能となる。何故なら、ノイズは画像内で離散的に生じるものなので、第14閾値を適切に設定することにより、ノイズの影響かそうでないかを弁別することが可能となるからである。   By setting not only the thirteenth threshold value but also the fourteenth threshold value, the following effects can be obtained. That is, when bright spot noise or the like is present in an image, it is not desirable that the contents of image processing change due to the noise. In this regard, by setting the fourteenth threshold value as described above, when a bright portion existing in the vicinity region is generated due to the influence of noise or the like, the presence of the bright portion can be ignored. . This is because noise is generated discretely in the image, so that it is possible to discriminate whether or not the influence of noise is caused by appropriately setting the 14th threshold value.

図20に示される条件およびそれに対応する明るさ増加量補正係数は一例であり、さらに細かい条件にしたがって明るさ増加量補正係数が決定されるようにしてもよいし、補正係数ではなく、補正量そのものが決定されるようにしてもよい。   The conditions shown in FIG. 20 and the brightness increase amount correction coefficient corresponding thereto are examples, and the brightness increase amount correction coefficient may be determined according to more detailed conditions. It may be determined itself.

− 第1の実施の形態の低減処理とともに行われる強調処理 −
図21は、第1の実施の形態で説明した低減処理に加えて強調処理も行う場合の処理手順例を概念的に示す図である。図21に示されるように、元画像データから生成された一時画像データに対して、S508(図5)で設定された画像処理パラメータ(低減処理用の画像処理パラメータ)が一律に適用されて低減処理が施された処理後一時画像データが生成される。S508では、低減処理用の画像処理パラメータとともに、強調処理用の画像処理パラメータも設定される。強調処理用の画像処理パラメータは、例えば図20を参照して説明した条件に基づいて設定することが可能である。
− Emphasis processing performed together with reduction processing of the first embodiment −
FIG. 21 is a diagram conceptually illustrating an example of a processing procedure when an enhancement process is performed in addition to the reduction process described in the first embodiment. As shown in FIG. 21, the image processing parameters (image processing parameters for reduction processing) set in S508 (FIG. 5) are uniformly applied to the temporary image data generated from the original image data and reduced. After the processing, temporary image data is generated. In S508, an image processing parameter for enhancement processing is set together with an image processing parameter for reduction processing. Image processing parameters for enhancement processing can be set based on the conditions described with reference to FIG. 20, for example.

一時画像データおよび主要度マップが生成された後、元画像データに対して強調処理用の画像処理パラメータが適用されて強調処理が行われ、処理後元画像データが生成される。処理後元画像データと処理後一時画像データとは、S514の主要度設定処理で生成された主要度マップに基づく混合比率で合成され、補正画像データが生成される。合成に際して、画素ごとあるいは複数画素ごとに、主要度マップで規定される主要度に応じた混合比率で混合されて補正画像データが生成される。結果として、主要度のより低い領域に対応する画像の彩度、明るさ、およびコントラストのうちの少なくともいずれかが低減される。一方、主要度の高い領域においては処理後元画像データの混合比率が相対的に高まるので、主要度のより高い領域に対応する画像は、他の領域の画像よりもさらに際立って見えるようになり、見栄えのする画像を得ることが可能となる。   After the temporary image data and the importance map are generated, image processing parameters for enhancement processing are applied to the original image data to perform enhancement processing, and post-processing original image data is generated. The post-processing original image data and the post-processing temporary image data are combined at a mixing ratio based on the degree-of-importance map generated in the degree-of-importance setting process of S514, and corrected image data is generated. At the time of synthesis, corrected image data is generated by mixing each pixel or a plurality of pixels at a mixing ratio corresponding to the degree of importance defined by the degree of importance map. As a result, at least one of the saturation, brightness, and contrast of the image corresponding to the region of lower importance is reduced. On the other hand, since the mixing ratio of the original image data after processing is relatively increased in the high-priority area, the image corresponding to the higher-priority area becomes more noticeable than the image in the other areas. It is possible to obtain an image that looks good.

以上では、元画像データに強調処理をして生成された処理後元画像データと、一時画像データに低減処理をして生成された処理後一時画像データとが合成される例について説明した。上述した処理に代えて、元画像データに強調処理をすることは行わずに、第1の実施の形態で説明した手順によって補正画像データを得た後、この補正画像データ中の主要部の画像データに対して強調処理をするようにしてもよい。   In the above, the example in which the processed original image data generated by performing the enhancement process on the original image data and the processed temporary image data generated by performing the reduction process on the temporary image data has been described. Instead of performing the above-described processing, the original image data is not subjected to the enhancement processing, and after obtaining the corrected image data by the procedure described in the first embodiment, the main image in the corrected image data is obtained. Emphasis processing may be performed on the data.

− 第2の実施の形態の低減処理とともに行われる強調処理 −
図22は、第2の実施の形態で説明した低減処理に加えて強調処理も行う場合の処理手順例を概念的に示す図である。図22に示されるように、元画像データから生成された一時画像データに対して、S1308(図13)で設定された画像処理パラメータ(低減処理用の画像処理パラメータ)が一律に適用されて低減処理が施され、処理後一時画像データが生成される。S1308では、低減処理用の画像処理パラメータとともに、強調処理用の画像処理パラメータも設定される。強調処理用の画像処理パラメータは、例えば図20を参照して説明した条件に基づいて設定することが可能である。
− Emphasis processing performed together with the reduction processing of the second embodiment −
FIG. 22 is a diagram conceptually illustrating an example of a processing procedure when emphasis processing is performed in addition to the reduction processing described in the second embodiment. As shown in FIG. 22, the image processing parameters (image processing parameters for reduction processing) set in S1308 (FIG. 13) are uniformly applied to the temporary image data generated from the original image data and reduced. Processing is performed, and post-processing temporary image data is generated. In S1308, an image processing parameter for enhancement processing is set together with an image processing parameter for reduction processing. Image processing parameters for enhancement processing can be set based on the conditions described with reference to FIG. 20, for example.

一時画像データが生成された後、元画像データに対して強調処理用の画像処理パラメータが一律に適用されて強調処理が行われ、処理後元画像データが生成される。処理後一時画像データ中の周辺画像データと、処理後元画像データ中の主要部に対応する部分の部分画像データとが合成されて補正画像データが生成される。周辺部の画像は低減処理が施され、彩度、明るさ、およびコントラストのうちの少なくともいずれかが低減される。一方、主要部の画像は、強調処理が施されているので、さらに際立って見えるようになり、見栄えのする画像を得ることが可能となる。   After the temporary image data is generated, image processing parameters for enhancement processing are uniformly applied to the original image data to perform enhancement processing, and the processed original image data is generated. The peripheral image data in the post-processing temporary image data and the partial image data corresponding to the main part in the post-processing original image data are combined to generate corrected image data. The peripheral image is subjected to reduction processing, and at least one of saturation, brightness, and contrast is reduced. On the other hand, since the image of the main part has been subjected to an emphasis process, it becomes more conspicuous and an image that looks good can be obtained.

以上では、一時画像データに低減処理をして生成された処理後一時画像データ中の周辺画像データと、元画像データに強調処理をして生成された処理後元画像データ中の部分画像データとが合成される例について説明した。上述した処理に代えて、元画像データに強調処理をすることは行わず、第2の実施の形態で説明した手順によって補正画像データを得た後、この補正画像データ中の主要部の画像データに対して強調処理をするようにしてもよい。   In the above, the peripheral image data in the post-processing temporary image data generated by performing the reduction process on the temporary image data, and the partial image data in the post-processing original image data generated by performing the enhancement process on the original image data An example in which is synthesized has been described. Instead of performing the above-described processing, the original image data is not subjected to enhancement processing, and after obtaining corrected image data according to the procedure described in the second embodiment, main image data in the corrected image data is obtained. Emphasis processing may be performed on the above.

− 第3の実施の形態の低減処理とともに行われる強調処理 −
図23は、第3の実施の形態で説明した低減処理に加えて強調処理も行う場合の手順例を概念的に示す図である。図23に示されるように、元画像データから一時画像データが生成され、その一時画像データ中の周辺画像データに対して、S1508(図15)で設定された画像処理パラメータ(低減処理用の画像処理パラメータ)が適用されて低減処理が施され、処理後一時画像データが生成される。S1508では、低減処理用の画像処理パラメータとともに、強調処理用の画像処理パラメータも設定される。強調処理用の画像処理パラメータは、例えば図20を参照して説明した条件に基づいて設定することが可能である。
− Emphasis processing performed together with the reduction processing of the third embodiment −
FIG. 23 is a diagram conceptually illustrating a procedure example when the enhancement process is performed in addition to the reduction process described in the third embodiment. As shown in FIG. 23, temporary image data is generated from the original image data, and the image processing parameters (the image for reduction processing) set in S1508 (FIG. 15) for the peripheral image data in the temporary image data. Processing parameters) are applied, reduction processing is performed, and post-processing temporary image data is generated. In S1508, an image processing parameter for enhancement processing is set together with an image processing parameter for reduction processing. Image processing parameters for enhancement processing can be set based on the conditions described with reference to FIG. 20, for example.

一時画像データが生成された後、元画像データ中の主要部に対応する部分の画像データ、すなわち部分画像データに対して強調処理用の画像処理パラメータが適用されて強調処理が行われ、処理後部分画像データが生成される。このとき、主要部が複数設定されている場合に、それぞれの主要部に対して一律の主要度(例えば主要度=1)が設定されて、同一の強調処理が各主要部に施されるようにすることが可能である。あるいは、主要部ごとに異なる主要度が設定され、設定された主要度の高さに応じて異なる強度の強調処理が各主要部に対して施されるようにすることも可能である。処理後一時画像データ中の周辺画像データと処理後部分画像データとが合成されて補正画像データが生成される。周辺部の画像には低減処理が施され、彩度、明るさ、およびコントラストのうちの少なくともいずれかが低減される。一方、主要部の画像には強調処理が施されているので、さらに際立って見えるようになり、見栄えのする画像を得ることが可能となる。   After the temporary image data is generated, image processing parameters for enhancement processing are applied to the image data corresponding to the main part of the original image data, that is, the partial image data, and the enhancement processing is performed. Partial image data is generated. At this time, when a plurality of main parts are set, a uniform main degree (for example, main degree = 1) is set for each main part, and the same emphasis processing is performed on each main part. It is possible to Alternatively, it is possible to set a different degree of importance for each main part, and to apply an emphasis process with different strengths to each main part according to the set level of the main degree. The peripheral image data in the temporary image data after processing and the partial image data after processing are combined to generate corrected image data. The peripheral image is subjected to reduction processing, and at least one of saturation, brightness, and contrast is reduced. On the other hand, since the image of the main part is subjected to an emphasis process, the image becomes more conspicuous and an image that looks good can be obtained.

以上では、一時画像データ中の周辺画像データに低減処理をして生成された処理後一時画像データと、元画像データ中の部分画像データに強調処理をして生成された処理後部分画像データとが合成される例について説明した。上述した処理に代えて、元画像データに強調処理をすることは行わず、第3の実施の形態で説明した手順によって補正画像データを得た後、この補正画像データ中の主要部の画像データに対して強調処理をするようにしてもよい。   In the above, the post-processing temporary image data generated by performing the reduction process on the peripheral image data in the temporary image data, and the post-processing partial image data generated by performing the enhancement process on the partial image data in the original image data, An example in which is synthesized has been described. Instead of performing the above-described processing, the original image data is not subjected to enhancement processing, and after obtaining corrected image data according to the procedure described in the third embodiment, the main image data in the corrected image data is obtained. Emphasis processing may be performed on the above.

− 第4の実施の形態の低減処理とともに行われる強調処理 −
図24は、第4の実施の形態で説明した低減処理に加えて強調処理も行う場合の処理手順例を概念的に示す図である。図24に示されるように、S1708(図17)で導出された主要度マップに基づいてS1710で設定された処理パラメータが適用されて元画像データが処理され、補正画像データが生成される。このとき、主要度の比較的高い部分に対応して強調処理用の画像処理パラメータが適用される一方、主要度の比較的低い部分に対応して低減処理用の画像処理パラメータが適用される。強調処理用の画像処理パラメータは、例えば図20を参照して説明した条件に基づいて設定することが可能である。
− Emphasis processing performed together with reduction processing of the fourth embodiment −
FIG. 24 is a diagram conceptually illustrating an example of a processing procedure when emphasis processing is performed in addition to the reduction processing described in the fourth embodiment. As shown in FIG. 24, the original image data is processed by applying the processing parameters set in S1710 based on the importance map derived in S1708 (FIG. 17), and corrected image data is generated. At this time, the image processing parameter for enhancement processing is applied corresponding to the portion with relatively high importance, while the image processing parameter for reduction processing is applied to the portion with relatively low importance. Image processing parameters for enhancement processing can be set based on the conditions described with reference to FIG. 20, for example.

以上に説明した処理により、周辺部の画像は低減処理が施され、彩度、明るさ、およびコントラストのうちの少なくともいずれかが低減される。一方、主要部の画像は、強調処理が施されて、さらに際立って見えるようになり、見栄えのする画像を得ることが可能となる。   Through the processing described above, the peripheral image is subjected to reduction processing, and at least one of saturation, brightness, and contrast is reduced. On the other hand, the image of the main part is subjected to an emphasis process so that it becomes more conspicuous and an image that looks good can be obtained.

以上に説明した各実施の形態の画像処理装置は、冒頭にも説明したように、撮像装置に内蔵されるものであっても、画像処理プログラムが汎用コンピュータによって実行されることにより、上記の画像処理装置が実現されるものであってもよい。   As described above, the image processing apparatus according to each embodiment described above can be incorporated in the imaging apparatus, and the image processing program can be executed by a general-purpose computer. A processing apparatus may be realized.

本発明に係る画像処理の技術は、デジタルスチルカメラ、デジタルムービーカメラなどに適用することが可能である。さらには、ビデオレコーダやコンピュータなどに適用することが可能である。   The image processing technique according to the present invention can be applied to a digital still camera, a digital movie camera, and the like. Furthermore, the present invention can be applied to a video recorder or a computer.

100 画像処理装置
102 画像データ取得部
104 領域設定部
106 画像処理実行判定部
108 補正画像データ生成部
150 画像表示部
160 画像記録部
200 デジタルカメラ
210 撮影光学系
212 レンズ駆動部
220 撮像部
230 画像記録媒体
240 操作部
250 表示部
262 ROM
264 RAM
270、310 CPU
300 コンピュータ
320 メモリ
330 補助記憶装置
340 インターフェース
350 メモリカードインターフェース
360 光ディスクドライブ
370 ネットワークインターフェース
380 表示装置
DESCRIPTION OF SYMBOLS 100 Image processing apparatus 102 Image data acquisition part 104 Area | region setting part 106 Image processing execution determination part 108 Correction | amendment image data generation part 150 Image display part 160 Image recording part 200 Digital camera 210 Shooting optical system 212 Lens drive part 220 Imaging part 230 Image recording Medium 240 Operation unit 250 Display unit 262 ROM
H.264 RAM
270, 310 CPU
300 Computer 320 Memory 330 Auxiliary Storage Device 340 Interface 350 Memory Card Interface 360 Optical Disk Drive 370 Network Interface 380 Display Device

Claims (21)

処理対象の画像データである元画像データを取得し、前記元画像データに補正処理を行う画像処理装置であって、
前記元画像データを取得する画像データ取得部と、
前記元画像データを解析し、前記元画像データ中の主要被写体を含む部分領域である主要部と、前記元画像データ中の前記主要部以外の部分領域である周辺部とを設定する領域設定部と、
前記主要部における彩度の情報と空間周波数の情報のいずれか、または両方の情報に基づいて、前記元画像データの補正の要否を判定する画像処理実行判定部と、
前記画像処理実行判定部により前記元画像データの補正が必要であると判定された場合、前記主要部の画像が相対的に際立つように、前記周辺部の画像に対して低減処理をする補正画像データ生成部であって、前記周辺部の画像の明るさ、コントラスト、および彩度のうち、少なくともいずれかが低下するように前記低減処理をする、補正画像データ生成部と
を備えることを特徴とする画像処理装置。
An image processing apparatus that acquires original image data that is image data to be processed and performs correction processing on the original image data,
An image data acquisition unit for acquiring the original image data;
An area setting unit that analyzes the original image data and sets a main part that is a partial area including a main subject in the original image data and a peripheral part that is a partial area other than the main part in the original image data. When,
An image processing execution determination unit that determines whether or not correction of the original image data is necessary based on either or both of saturation information and spatial frequency information in the main part,
When the image processing execution determination unit determines that the correction of the original image data is necessary, a corrected image that performs reduction processing on the peripheral image so that the image of the main part stands out relatively A data generation unit, comprising: a corrected image data generation unit that performs the reduction process so that at least one of brightness, contrast, and saturation of the peripheral image is decreased. An image processing apparatus.
前記補正画像データ生成部は、前記周辺部の画像の彩度が所定の値よりも高いとき、前記周辺部の画像の彩度がより大きく低下するように前記低減処理を行うことを特徴とする請求項1に記載の画像処理装置。   The corrected image data generation unit performs the reduction process so that the saturation of the image in the peripheral part is further reduced when the saturation of the image in the peripheral part is higher than a predetermined value. The image processing apparatus according to claim 1. 前記補正画像データ生成部は、前記周辺部の画像の明るさが所定の値よりも大きいとき、前記周辺部の画像の明るさがより大きく低下するように前記低減処理を行うことを特徴とする請求項1または2に記載の画像処理装置。   The corrected image data generation unit performs the reduction process so that the brightness of the peripheral image is greatly reduced when the brightness of the peripheral image is larger than a predetermined value. The image processing apparatus according to claim 1. 前記補正画像データ生成部は、前記周辺部の画像のコントラストが所定の値よりも高いとき、前記周辺部の画像のコントラストがより大きく低下するように前記低減処理を行うことを特徴とする請求項1から3のいずれか一つに記載の画像処理装置。   The correction image data generation unit performs the reduction processing so that the contrast of the peripheral image is greatly decreased when the contrast of the peripheral image is higher than a predetermined value. The image processing apparatus according to any one of 1 to 3. 前記補正画像データ生成部は、
前記元画像データから一時画像データを生成し、前記一時画像データに対して処理を施して処理後一時画像データを生成する、処理後一時画像データ生成部と、
前記元画像データと前記処理後一時画像データとを画素単位または複数画素単位で合成する処理をする画像合成処理部と
を備えることを特徴とする請求項1から4のいずれか一つに記載の画像処理装置。
The corrected image data generation unit
A post-processing temporary image data generating unit that generates temporary image data from the original image data, performs processing on the temporary image data, and generates post-processing temporary image data;
5. The image composition processing unit according to claim 1, further comprising: an image composition processing unit that performs a process of compositing the original image data and the post-processing temporary image data in units of pixels or in units of a plurality of pixels. Image processing device.
前記画像合成処理部は、前記合成する処理をする際に、前記元画像データ、および前記処理後一時画像データの、明度情報、画素値、彩度情報のいずれかの情報を合成処理することを特徴とする請求項5に記載の画像処理装置。   The image composition processing unit performs composition processing on any one of lightness information, pixel value, and saturation information of the original image data and the post-processing temporary image data when performing the composition processing. The image processing apparatus according to claim 5, wherein: 前記元画像データを解析した結果に基づき、前記元画像データの画素ごとまたは複数画素ごとに主要度を設定する主要度設定部であって、前記主要部内に存在する前記画素または前記複数画素の主要度が最大となるように前記主要度を設定する主要度設定部をさらに備え、
前記画像合成処理部は、前記主要度設定部で前記画素ごとまたは複数画素ごとに設定された主要度の高さに応じて前記処理後一時画像データの混合比率を変えながら混合する処理をすることを特徴とする請求項5または6に記載の画像処理装置。
A degree-of-importance setting unit that sets a degree of importance for each pixel or a plurality of pixels of the original image data based on a result of analyzing the original image data, wherein the pixels existing in the main part or the main of the plurality of pixels A degree-of-majority setting unit for setting the degree of importance so that the degree becomes maximum;
The image composition processing unit performs a process of mixing while changing a mixing ratio of the post-processing temporary image data according to the level of the degree of importance set for each pixel or each of a plurality of pixels by the degree of importance setting unit. The image processing apparatus according to claim 5 or 6.
前記画像合成処理部は、前記主要度設定部で設定された主要度がより低い前記画素または複数画素に対応して前記処理後一時画像データの混合比率が高められるように混合処理をすることを特徴とする請求項7に記載の画像処理装置。   The image composition processing unit performs a mixing process so that a mixing ratio of the post-processing temporary image data is increased corresponding to the pixel or the plurality of pixels having a lower importance set by the importance setting unit. The image processing apparatus according to claim 7, wherein the apparatus is an image processing apparatus. 前記補正画像データ生成部は、前記処理後一時画像データ中、前記周辺部に対応する部分の画像データである周辺画像データと、前記元画像データとを合成する処理をする、画像合成処理部を備え、
前記画像合成処理部は、前記元画像データ中の前記前記周辺部に対応する部分の画像データを、前記処理後一時画像データ中の前記周辺画像データで置き換える処理、または前記元画像データ中の前記周辺部に対応する部分の画像データと、前記処理後一時画像データ中の前記周辺画像データとを混合する処理を行う
ことを特徴とする請求項5に記載の画像処理装置。
The corrected image data generation unit includes an image synthesis processing unit that performs a process of synthesizing the original image data with peripheral image data that is a part of image data corresponding to the peripheral part in the post-processing temporary image data. Prepared,
The image composition processing unit replaces image data of a portion corresponding to the peripheral portion in the original image data with the peripheral image data in the post-processing temporary image data, or the image data in the original image data. The image processing apparatus according to claim 5, wherein a process of mixing image data of a part corresponding to a peripheral part and the peripheral image data in the post-processing temporary image data is performed.
前記補正画像データ生成部は、前記元画像データから生成した前記一時画像データ中の、前記周辺部に対応する部分の画像データである周辺画像データに対して前記低減処理をして処理後一時画像データを生成し、当該の処理後一時画像データと前記元画像データとを合成する処理をする、画像合成処理部を備え、
前記画像合成処理部は、前記元画像データ中の前記前記周辺部に対応する部分の画像データを前記処理後一時画像データ中の前記周辺画像データで置き換える処理、または前記元画像データ中の前記周辺部に対応する部分の画像データと、前記処理後一時画像データ中の前記周辺画像データとを混合する処理を行う
ことを特徴とする請求項5に記載の画像処理装置。
The corrected image data generation unit performs the reduction process on peripheral image data, which is image data of a portion corresponding to the peripheral portion, in the temporary image data generated from the original image data, and a post-processing temporary image An image synthesis processing unit that generates data and performs a process of synthesizing the post-processing temporary image data and the original image data;
The image composition processing unit replaces the image data of the part corresponding to the peripheral part in the original image data with the peripheral image data in the post-processing temporary image data, or the peripheral part in the original image data 6. The image processing apparatus according to claim 5, wherein a process of mixing image data of a part corresponding to a part and the peripheral image data in the post-processing temporary image data is performed.
前記元画像データを解析した結果に基づき、前記元画像データの画素ごとまたは複数画素ごとに主要度を設定する主要度設定部であって、前記主要部内に存在する前記画素または前記複数画素の主要度が最大となるように前記主要度を設定する主要度設定部をさらに備え、
前記補正画像データ生成部は、前記主要度設定部で設定された主要度の高さが低い画素または複数画素ほど前記低減処理の強度を高める
ことを特徴とする請求項1に記載の画像処理装置。
A degree-of-importance setting unit that sets a degree of importance for each pixel or a plurality of pixels of the original image data based on a result of analyzing the original image data, wherein the pixels existing in the main part or the main of the plurality of pixels A degree-of-majority setting unit for setting the degree of importance so that the degree becomes maximum;
The image processing apparatus according to claim 1, wherein the corrected image data generation unit increases the intensity of the reduction process for a pixel or a plurality of pixels having a lower level of importance set by the importance setting unit. .
前記補正画像データ生成部はさらに、前記画像処理実行判定部により前記元画像データの補正が必要であると判定された場合、前記主要部の画像が際立つよう、所定の色空間で規定される前記主要部の画像データ中の色座標値を補正することを特徴とする請求項1から11のいずれか一つに記載の画像処理装置。   The corrected image data generation unit is further defined in a predetermined color space so that an image of the main part stands out when the image processing execution determination unit determines that the correction of the original image data is necessary. The image processing apparatus according to claim 1, wherein color coordinate values in image data of a main part are corrected. 前記補正画像データ生成部は、前記主要部の画像データ中の画素それぞれの輝度または明度を規定する情報である主要部明度情報を補正することを特徴とする請求項12に記載の画像処理装置。   The image processing apparatus according to claim 12, wherein the corrected image data generation unit corrects main part lightness information, which is information defining brightness or lightness of each pixel in the image data of the main part. 前記主要部明度情報の補正は、前記主要部の画像のコントラストを増す補正を含むことを特徴とする請求項13に記載の画像処理装置。   The image processing apparatus according to claim 13, wherein the correction of the main part lightness information includes correction for increasing a contrast of an image of the main part. 前記補正画像データ生成部は、前記主要部明度情報を補正する際に、前記主要部の画像の明るさに応じて前記主要部明度情報の補正量を変化させることを特徴とする請求項13に記載の画像処理装置。   The correction image data generation unit, when correcting the main part lightness information, changes a correction amount of the main part lightness information according to the brightness of the image of the main part. The image processing apparatus described. 前記補正画像データ生成部は、前記主要部明度情報を補正する際に前記主要部明度情報の値を増加して画像が明るくなるように補正をし、このとき、前記主要部の画像の明るさが所定の値よりも大きいときの増加量よりも前記主要部の画像の明るさが前記所定の値以下であるときの増加量が上回るように前記主要部明度情報を補正することを特徴とする請求項13に記載の画像処理装置。   The corrected image data generation unit corrects the main part lightness information to increase the value of the main part lightness information when correcting the main part lightness information, and corrects the brightness of the image of the main part at this time. The lightness information of the main part is corrected so that the amount of increase when the brightness of the image of the main part is less than or equal to the predetermined value is greater than the amount of increase when the value is greater than a predetermined value. The image processing apparatus according to claim 13. 前記補正画像データ生成部は、前記主要部明度情報を補正する際に前記主要部明度情報の値を増加して画像が明るくなるように補正をし、このとき、前記主要部の画像の明るさを上回る明るさの領域が前記主要部の近傍に存在する場合に、前記増加する際の増加量が増すように補正することを特徴とする請求項13から16のいずれか一つに記載の画像処理装置。   The corrected image data generation unit corrects the main part lightness information to increase the value of the main part lightness information when correcting the main part lightness information, and corrects the brightness of the image of the main part at this time. The image according to any one of claims 13 to 16, wherein when an area having a brightness exceeding 1 is present in the vicinity of the main part, correction is performed so that the amount of increase when the area increases is increased. Processing equipment. 前記補正画像データ生成部は、前記主要部明度情報のヒストグラムを解析して導出された階調変換特性に基づいて階調変換処理を行うことにより前記主要部明度情報を補正し、補正後の前記主要部明度情報のヒストグラムの階調幅が増すようにすることを特徴とする請求項15に記載の画像処理装置。   The corrected image data generation unit corrects the main part lightness information by performing a gradation conversion process based on a gradation conversion characteristic derived by analyzing a histogram of the main part lightness information, and 16. The image processing apparatus according to claim 15, wherein the gradation width of the histogram of the main part brightness information is increased. 処理対象の画像データである元画像データに補正処理を行う画像処理方法であって、
前記元画像データを取得する画像データ取得手順と、
前記元画像データを解析し、前記元画像データ中の主要被写体を含む部分領域である主要部と、前記元画像データ中の前記主要部以外の部分領域である周辺部とを設定する領域設定手順と、
前記主要部における彩度の情報と空間周波数の情報のいずれか、または両方の情報に基づいて、前記元画像データの補正の要否を判定する画像処理実行判定手順と、
前記画像処理実行判定手順により前記元画像データの補正が必要であると判定された場合、前記主要部の画像が相対的に際立つように、前記周辺部の画像に対して低減処理をする補正画像データ生成手順であって、前記周辺部の画像の明るさ、コントラスト、および彩度のうち、少なくともいずれかが低下するように前記低減処理をする、補正画像データ生成手順と
を備えることを特徴とする画像処理方法。
An image processing method for performing correction processing on original image data, which is image data to be processed,
An image data acquisition procedure for acquiring the original image data;
An area setting procedure for analyzing the original image data and setting a main part that is a partial area including a main subject in the original image data and a peripheral part that is a partial area other than the main part in the original image data When,
An image processing execution determination procedure for determining whether or not correction of the original image data is necessary based on either or both of saturation information and spatial frequency information in the main part,
When it is determined that the correction of the original image data is necessary by the image processing execution determination procedure, a corrected image that performs a reduction process on the peripheral image so that the image of the main part stands out relatively A data generation procedure, comprising: a corrected image data generation procedure that performs the reduction process so that at least one of brightness, contrast, and saturation of the peripheral image is reduced. Image processing method.
撮影レンズによって形成された被写体像を光電変換して画像信号を出力可能な撮像素子を備える撮像装置であって、
前記撮像素子から出力される前記画像信号から生成された画像データを元画像データとして取得する画像データ取得部と、
前記元画像データを解析し、前記元画像データ中の主要被写体を含む部分領域である主要部と、前記元画像データ中の前記主要部以外の部分領域である周辺部とを設定する領域設定部と、
前記主要部における彩度の情報と空間周波数の情報のいずれか、または両方の情報に基づいて、前記元画像データの補正の要否を判定する画像処理実行判定部と、
前記画像処理実行判定部により前記元画像データの補正が必要であると判定された場合、前記主要部の画像が相対的に際立つように、前記周辺部の画像に対して低減処理をする補正画像データ生成部であって、前記周辺部の画像の明るさ、コントラスト、および彩度のうち、少なくともいずれかが低下するように前記低減処理をする、補正画像データ生成部と
を備えることを特徴とする撮像装置。
An imaging apparatus including an imaging element capable of photoelectrically converting a subject image formed by a photographing lens and outputting an image signal,
An image data acquisition unit that acquires image data generated from the image signal output from the image sensor as original image data;
An area setting unit that analyzes the original image data and sets a main part that is a partial area including a main subject in the original image data and a peripheral part that is a partial area other than the main part in the original image data. When,
An image processing execution determination unit that determines whether or not correction of the original image data is necessary based on either or both of saturation information and spatial frequency information in the main part,
When the image processing execution determination unit determines that the correction of the original image data is necessary, a corrected image that performs reduction processing on the peripheral image so that the image of the main part stands out relatively A data generation unit, comprising: a corrected image data generation unit that performs the reduction process so that at least one of brightness, contrast, and saturation of the peripheral image is decreased. An imaging device.
処理対象の画像データである元画像データを補正する処理をコンピュータに実行させるための画像処理プログラムであって、
前記元画像データを取得する画像データ取得ステップと、
前記元画像データを解析し、前記元画像データ中の主要被写体を含む部分領域である主要部と、前記元画像データ中の前記主要部以外の部分領域である周辺部とを設定する領域設定ステップと、
前記主要部における彩度の情報と空間周波数の情報のいずれか、または両方の情報に基づいて、前記元画像データの補正の要否を判定する画像処理実行判定ステップと、
前記画像処理実行判定ステップにより前記元画像データの補正が必要であると判定された場合、前記主要部の画像が相対的に際立つように、前記周辺部の画像に対して低減処理をする補正画像データ生成ステップであって、前記周辺部の画像の明るさ、コントラスト、および彩度のうち、少なくともいずれかが低下するように前記低減処理をする、補正画像データ生成ステップと
を備えることを特徴とする画像処理プログラム。
An image processing program for causing a computer to execute processing for correcting original image data which is image data to be processed,
An image data acquisition step of acquiring the original image data;
A region setting step of analyzing the original image data and setting a main portion that is a partial region including a main subject in the original image data and a peripheral portion that is a partial region other than the main portion in the original image data. When,
An image processing execution determination step for determining whether or not correction of the original image data is necessary based on either or both of the saturation information and the spatial frequency information in the main part,
When it is determined in the image processing execution determination step that the correction of the original image data is necessary, a corrected image that performs reduction processing on the peripheral image so that the image of the main part stands out relatively A data generation step, comprising: a corrected image data generation step that performs the reduction process so that at least one of brightness, contrast, and saturation of the peripheral image is reduced. Image processing program.
JP2010239893A 2010-10-26 2010-10-26 Image processing device, image processing method, imaging device, and image processing program Withdrawn JP2012093904A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010239893A JP2012093904A (en) 2010-10-26 2010-10-26 Image processing device, image processing method, imaging device, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010239893A JP2012093904A (en) 2010-10-26 2010-10-26 Image processing device, image processing method, imaging device, and image processing program

Publications (1)

Publication Number Publication Date
JP2012093904A true JP2012093904A (en) 2012-05-17

Family

ID=46387171

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010239893A Withdrawn JP2012093904A (en) 2010-10-26 2010-10-26 Image processing device, image processing method, imaging device, and image processing program

Country Status (1)

Country Link
JP (1) JP2012093904A (en)

Similar Documents

Publication Publication Date Title
JP5615973B2 (en) Device operation for capturing high dynamic range images
CN105144233B (en) Reference picture selection for moving ghost image filtering
EP2624204B1 (en) Image processing apparatus and method of controlling the same
JP5762756B2 (en) Image processing apparatus, image processing method, image processing program, and photographing apparatus
JP5672796B2 (en) Image processing apparatus and image processing method
KR20120005966A (en) Image combining apparatus, image combining method and program product
KR20090091207A (en) Apparatus and methods for boosting dynamic range in digital images
US9177396B2 (en) Image processing apparatus and image processing method
Kao High dynamic range imaging by fusing multiple raw images and tone reproduction
US20180025476A1 (en) Apparatus and method for processing image, and storage medium
US9294685B2 (en) Image processing apparatus, electronic camera, and medium storing image processing program
CN111416966A (en) Information processing apparatus, information processing method, and computer readable medium
JP2012083848A (en) Image processing device, image processing method, imaging device, and image processing program
US20150312487A1 (en) Image processor and method for controlling the same
JP2002369075A (en) Image pickup unit, picture processor, image pickup program and picture processing program
CN112822413A (en) Shooting preview method, device, terminal and computer readable storage medium
JP5202190B2 (en) Image processing method and image processing apparatus
JP4359662B2 (en) Color image exposure compensation method
CN111510697B (en) Image processing apparatus, image processing method, and storage medium
JP2012093904A (en) Image processing device, image processing method, imaging device, and image processing program
JP5050141B2 (en) Color image exposure evaluation method
Qian et al. A local tone mapping operator for high dynamic range images
JP5881350B2 (en) Image processing apparatus, image processing method, and image processing program
JP2016170637A (en) Image processing device and image processing method
JP2024039874A (en) Image processing device, control method and program for the image processing device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140107