JP2014155167A - Image processing apparatus, method, and program, and recording medium - Google Patents

Image processing apparatus, method, and program, and recording medium Download PDF

Info

Publication number
JP2014155167A
JP2014155167A JP2013025600A JP2013025600A JP2014155167A JP 2014155167 A JP2014155167 A JP 2014155167A JP 2013025600 A JP2013025600 A JP 2013025600A JP 2013025600 A JP2013025600 A JP 2013025600A JP 2014155167 A JP2014155167 A JP 2014155167A
Authority
JP
Japan
Prior art keywords
image
correction unit
food
correction
color
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.)
Pending
Application number
JP2013025600A
Other languages
Japanese (ja)
Inventor
Michihiro Kobayashi
理弘 小林
Teppei Inomata
哲平 猪俣
Yoshiyuki Tsujita
良行 辻田
Tetsuya Hamada
哲也 浜田
Takashi 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.)
NTT Docomo Inc
Morpho Inc
Original Assignee
NTT Docomo Inc
Morpho Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NTT Docomo Inc, Morpho Inc filed Critical NTT Docomo Inc
Priority to JP2013025600A priority Critical patent/JP2014155167A/en
Publication of JP2014155167A publication Critical patent/JP2014155167A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an image processing apparatus capable of properly improving image quality.SOLUTION: An image processing apparatus comprises an input unit, a first color casting correction unit, a food determination unit, and a food correction unit. The input unit receives input of an image. The first color casting correction unit corrects color cast of the image. The food determination unit determines whether or not objects in the image corrected by the first color casting correction unit include food. When the food determination unit determines that food is included in the objects, the food correction unit corrects color components of the image corrected by the first color casting correction unit.

Description

本発明は、画像処理装置、画像処理方法、画像処理プログラム及び記録媒体に関するものである。   The present invention relates to an image processing apparatus, an image processing method, an image processing program, and a recording medium.

従来、画像処理装置として、入力画像に対して補正処理を行う装置が知られている(例えば、特許文献1参照。)。特許文献1記載の装置は、入力画像に対して、輝度・彩度補正処理、拡大処理及び色ノイズ低減処理を組み合わせて実行する。該装置では、色ノイズ低減処理を行った後に、輝度・彩度補正処理を行う。   2. Description of the Related Art Conventionally, as an image processing apparatus, an apparatus that performs correction processing on an input image is known (see, for example, Patent Document 1). The apparatus described in Patent Literature 1 executes a combination of luminance / saturation correction processing, enlargement processing, and color noise reduction processing on an input image. In this apparatus, after performing the color noise reduction process, the brightness / saturation correction process is performed.

特開2001−186366号公報JP 2001-186366 A

近年のデジタルカメラやカメラ付き携帯端末の普及に伴い、撮像画像等の画質に対する関心が高まっている。このため、取り直しをすることができない画像を適切に補正して、画質を向上することが望まれている。向上させるべき画質は、特許文献1に記載された輝度に関する画質、彩度に関する画質、エッジに関する画質及びノイズに関する画質のみならず、明度に関する画質及び色被りに関する画質等、多数存在する。そして、複数の画質について同時に向上させる場合、各補正処理を順次行う必要がある。   With the recent spread of digital cameras and camera-equipped mobile terminals, interest in image quality such as captured images has increased. For this reason, it is desired to improve the image quality by appropriately correcting an image that cannot be re-taken. There are many image quality to be improved, such as the image quality related to luminance, the image quality related to saturation, the image quality related to edge and the image quality related to noise described in Patent Document 1, as well as the image quality related to brightness and the image quality related to color covering. And when improving several image quality simultaneously, it is necessary to perform each correction process sequentially.

しかしながら、複数の画質を向上させようとした場合、前段の補正処理が後段の補正処理に悪影響を与え、結果として画質が低下するおそれがある。さらに、被写体によって人が感じる画質の良さには違いがあるため、被写体ごとに適切な補正処理が必要となる。このため、特許文献1記載の装置では十分に満足できる補正を行うことができないおそれがある。
そこで、本技術分野では、適切に画質を向上させることができる画像処理装置、画像処理方法、画像処理プログラム、及び当該プログラムを記録した記録媒体が望まれている。
However, when an attempt is made to improve a plurality of image quality, the preceding correction process adversely affects the subsequent correction process, and as a result, the image quality may be degraded. Furthermore, since the quality of the image felt by a person varies depending on the subject, an appropriate correction process is required for each subject. For this reason, the apparatus described in Patent Document 1 may not be able to perform a sufficiently satisfactory correction.
Therefore, in this technical field, an image processing apparatus, an image processing method, an image processing program, and a recording medium on which the program can be recorded that can appropriately improve image quality are desired.

すなわち本発明の一側面に係る画像処理装置は、画像を補正する装置である。該装置は、入力部、第1色被り補正部、食べ物判定部及び食べ物補正部を備える。入力部は、画像を入力する。第1色被り補正部は、画像の色被りを補正する。食べ物判定部は、第1色被り補正部により補正された後の画像の被写体に食べ物が含まれているか否かを判定する。食べ物補正部は、食べ物判定部により被写体に食べ物が含まれていると判定された場合には、第1色被り補正部により補正された後の画像の色成分を補正する。   That is, an image processing apparatus according to one aspect of the present invention is an apparatus that corrects an image. The apparatus includes an input unit, a first color covering correction unit, a food determination unit, and a food correction unit. The input unit inputs an image. The first color fog correction unit corrects the color fog of the image. The food determination unit determines whether food is included in the subject of the image after being corrected by the first color covering correction unit. The food correction unit corrects the color components of the image corrected by the first color covering correction unit when the food determination unit determines that the subject contains food.

この画像処理装置では、第1色被り補正部により、画像の色被りが補正され、食べ物判定部により、色被り補正後の画像の被写体に食べ物が含まれているか否かが判定され、被写体に食べ物が含まれていると判定された場合には、食べ物補正部により、色被り補正後の画像の色成分が補正される。このように、色被りに関する画質と食べ物に関する画質とを同時に向上させる場合には、被写体に食べ物が含まれているか否か判定する必要があるところ、食べ物に関しては色被りしているシーンが一般的に多いため、その判定の前に色被り補正を行うことで、食べ物判定の精度を向上させることができる。よって、食べ物補正をした後に色被り補正をする場合に比べて画質を向上させることが可能となる。   In this image processing apparatus, the first color covering correction unit corrects the color covering of the image, and the food determination unit determines whether food is included in the subject of the image after the color covering correction. When it is determined that food is included, the color component of the image after color covering correction is corrected by the food correction unit. In this way, when improving the image quality related to color covering and the image quality related to food at the same time, it is necessary to determine whether or not the subject contains food. Therefore, the accuracy of food determination can be improved by performing color coverage correction before the determination. Therefore, it is possible to improve the image quality as compared with the case where the color covering correction is performed after the food correction.

一実施形態では、食べ物判定部は、教師画像を用いた学習によって食べ物の特徴を予め取得し、第1色被り補正部により補正された後の画像の特徴と、学習により得られた食べ物の特徴とを比較することで、第1色被り補正部により補正された後の画像の被写体に食べ物が含まれているか否かを判定してもよい。このように、事前学習により食べ物を定義することで、食べ物か否かを判定することができる。   In one embodiment, the food determination unit obtains food features in advance by learning using a teacher image, the image features after being corrected by the first color covering correction unit, and the food features obtained by learning. , It may be determined whether or not food is included in the subject of the image after being corrected by the first color covering correction unit. Thus, by defining food by prior learning, it can be determined whether it is food.

一実施形態では、食べ物補正部は、各画素の明度を一定の比率で強調してもよい。また、一実施形態では、食べ物補正部は、暖色系の色相の画素の彩度が非暖色系の色相の画素の彩度よりも強調されるように重み付けして各画素の彩度を補正してもよい。このように補正することで、食べ物の見栄えを向上させることができる。   In one embodiment, the food correction unit may emphasize the brightness of each pixel at a certain ratio. In one embodiment, the food correction unit corrects the saturation of each pixel by weighting so that the saturation of the pixels of the warm hue hue is emphasized more than the saturation of the pixels of the non-warm hue hue. May be. By correcting in this way, the appearance of food can be improved.

一実施形態では、第1色被り補正部は、輝度値が所定値以上であり、かつ、当該輝度値に対する色差値の比率が所定値以下である画素の色が白であると判定して色被りの度合いを推定してもよい。このように構成することで、本来は白であった画素を適切に判定しつつ、色被り度合いを推定することができる。   In one embodiment, the first color covering correction unit determines that the color of a pixel whose luminance value is equal to or larger than a predetermined value and whose ratio of the color difference value to the luminance value is equal to or smaller than the predetermined value is white. The degree of covering may be estimated. With this configuration, it is possible to estimate the degree of color coverage while appropriately determining pixels that were originally white.

一実施形態では、画像処理装置は、入力部により入力された前記画像のノイズを補正する第1ノイズ補正部を更に備え、第1色被り補正部は、第1ノイズ補正部により補正された後の画像の色被りを補正してもよい。一実施形態では、第1ノイズ補正部は、入力部により入力された画像のノイズを補正した後に、各画素のビットを拡張してもよい。ビットを拡張させることで、以降の処理の演算精度を向上させることができる。   In one embodiment, the image processing apparatus further includes a first noise correction unit that corrects noise of the image input by the input unit, and the first color fog correction unit is corrected by the first noise correction unit. The color coverage of the image may be corrected. In one embodiment, the first noise correction unit may expand the bit of each pixel after correcting the noise of the image input by the input unit. By expanding the bits, the calculation accuracy of the subsequent processing can be improved.

一実施形態では、第1ノイズ補正部は、補正対象の画素の色成分と、当該補正対象の画素と隣接する画素の色成分との間の相関に基づいて、ノイズの補正強度を設定してもよい。このように構成することで、過度な補正を回避することができるので、適切に画質を向上させることが可能となる。   In one embodiment, the first noise correction unit sets a noise correction intensity based on a correlation between a color component of a correction target pixel and a color component of a pixel adjacent to the correction target pixel. Also good. With such a configuration, excessive correction can be avoided, so that the image quality can be appropriately improved.

一実施形態では、画像処理装置は、第1ノイズ補正部により補正された後の画像の明度又は彩度を補正する明度彩度補正部を更に備え、第1色被り補正部は、明度彩度補正部により補正された後の画像の色被りを補正してもよい。このように、明度彩度補正をした後に色被り補正をすることで、明るい色のグラデーション部分の画素が色被りしている画素であると誤判定することを回避することができるため、色被りに関する画質を向上させること可能となる。   In one embodiment, the image processing apparatus further includes a lightness and saturation correction unit that corrects the lightness or saturation of the image after being corrected by the first noise correction unit, and the first color covering correction unit includes the lightness and saturation. You may correct | amend the color coverage of the image after correct | amending by the correction | amendment part. In this way, by correcting the color coverage after correcting the lightness and saturation, it is possible to avoid erroneously determining that the pixel in the bright gradation portion is a color-covered pixel. It is possible to improve image quality.

あるいは、一実施形態では、画像処理装置は、食べ物判定部により被写体に食べ物が含まれていないと判定された場合には、第1ノイズ補正部により補正された後の画像の明度又は彩度を補正する明度彩度補正部と、明度彩度補正部により補正された後の画像の色被りを補正する第2色被り補正部と、を更に備えてもよい。明度彩度補正を行った後に食べ物の色を補正すると例えば明るさが強調され過ぎる場合がある。このため、食べ物に関しては明度彩度補正を不要とし、食べ物以外の被写体において明度彩度補正をすることで、食べ物の画像の画質を向上させつつ、食べ物以外の画像についても適切に画質を向上させることができる。この際、食べ物以外の画像の場合には、食べ物判定の精度向上を目的とした色被り補正の結果を用いるのではなく、ノイズ補正の結果を用いることにより、明度彩度補正をした後に色被り補正をすることができるため、明るい色のグラデーション部分の画素が色被りしている画素であると誤判定することを回避することが可能となる。   Alternatively, in one embodiment, when the food determination unit determines that the subject does not contain food, the image processing apparatus calculates the lightness or saturation of the image corrected by the first noise correction unit. You may further provide the lightness saturation correction part which correct | amends, and the 2nd color fog correction part which correct | amends the color cast of the image after being corrected by the lightness saturation correction part. If the color of the food is corrected after the lightness / saturation correction, for example, the brightness may be overemphasized. For this reason, no lightness saturation correction is required for food, and lightness saturation correction is performed on subjects other than food, thereby improving the image quality of food images and improving the image quality of non-food images appropriately. be able to. At this time, in the case of an image other than food, instead of using the result of color covering correction for the purpose of improving the accuracy of food determination, the color covering is performed after lightness saturation correction by using the result of noise correction. Since the correction can be performed, it is possible to avoid erroneously determining that the pixel of the bright gradation portion is a color-covered pixel.

一実施形態では、明度彩度補正部は、画像の色空間におけるヒストグラムを用いたトーンカーブに基づいて明度を補正してもよい。また、一実施形態では、明度彩度補正部は、明度の補正量を係数として彩度の補正を行ってもよい。また、一実施形態では、明度彩度補正部は、所定の基準値との差分基づいて彩度補正の強度を変更してもよい。このように補正することで、自動かつ適切に明度又は彩度を補正することができる。   In one embodiment, the lightness / saturation correction unit may correct the lightness based on a tone curve using a histogram in the color space of the image. In one embodiment, the lightness / saturation correction unit may perform saturation correction using the lightness correction amount as a coefficient. In one embodiment, the lightness saturation correction unit may change the intensity of saturation correction based on a difference from a predetermined reference value. By correcting in this way, brightness or saturation can be corrected automatically and appropriately.

一実施形態では、画像処理装置は、食べ物補正部により補正された後の画像のエッジを補正するエッジ補正部を更に備えてもよい。エッジを補正するとざらつきが増加した画像になり、色味の補正が適切にできない場合がある。このため、補正を全体の色味を調整した後にエッジ補正を行うことで、色味を調整しつつエッジを補正することが可能となる。したがって、バランスの良い補正を行うことができる。   In one embodiment, the image processing apparatus may further include an edge correction unit that corrects an edge of the image after being corrected by the food correction unit. When the edge is corrected, an image with increased roughness is obtained, and the color may not be corrected appropriately. For this reason, it is possible to correct the edge while adjusting the color by performing edge correction after adjusting the overall color. Therefore, a well-balanced correction can be performed.

一実施形態では、エッジ補正部は、補正対象の画素の輝度値と、当該補正対象の画素を含む所定領域に含まれる画素の輝度値との差に基づいて、エッジ強度を設定してもよい。また、一実施形態では、画像処理装置は、食べ物補正部により補正された後の画像のノイズを補正する第2ノイズ補正部を更に備え、エッジ補正部は、第2ノイズ補正部により補正された後の画像のエッジを補正してもよい。このように補正することで、自動かつ適切にエッジを補正することができる。   In one embodiment, the edge correction unit may set the edge strength based on the difference between the luminance value of the pixel to be corrected and the luminance value of a pixel included in a predetermined area including the pixel to be corrected. . In one embodiment, the image processing apparatus further includes a second noise correction unit that corrects noise of the image after correction by the food correction unit, and the edge correction unit is corrected by the second noise correction unit. You may correct | amend the edge of a subsequent image. By correcting in this way, the edge can be corrected automatically and appropriately.

また、本発明の他の側面に係る画像処理方法は、画像を補正する方法である。該方法は、入力ステップ、第1色被り補正ステップ、食べ物判定ステップ及び食べ物補正ステップを備える。入力ステップは、画像を入力する。第1色被り補正ステップは、画像の色被りを補正する。食べ物判定ステップは、第1色被り補正ステップにより補正された後の画像の被写体に食べ物が含まれているか否かを判定する。食べ物補正ステップは、食べ物判定ステップにより被写体に食べ物が含まれていると判定された場合には、第1色被り補正ステップにより補正された後の画像の色成分を補正する。   An image processing method according to another aspect of the present invention is a method for correcting an image. The method includes an input step, a first color covering correction step, a food determination step, and a food correction step. In the input step, an image is input. The first color covering correction step corrects the color covering of the image. The food determination step determines whether food is included in the subject of the image after being corrected by the first color covering correction step. In the food correction step, when it is determined in the food determination step that the subject contains food, the color component of the image corrected by the first color covering correction step is corrected.

また、本発明の他の側面に係る画像処理プログラムは、画像を補正するようにコンピュータを動作させるプログラムである。該プログラムは、コンピュータを、入力部、第1色被り補正部、食べ物判定部及び食べ物補正部として動作させる。入力部は、画像を入力する。第1色被り補正部は、画像の色被りを補正する。食べ物判定部は、第1色被り補正部により補正された後の画像の被写体に食べ物が含まれているか否かを判定する。食べ物補正部は、食べ物判定部により被写体に食べ物が含まれていると判定された場合には、第1色被り補正部により補正された後の画像の色成分を補正する。   An image processing program according to another aspect of the present invention is a program that causes a computer to operate so as to correct an image. The program causes the computer to operate as an input unit, a first color covering correction unit, a food determination unit, and a food correction unit. The input unit inputs an image. The first color fog correction unit corrects the color fog of the image. The food determination unit determines whether food is included in the subject of the image after being corrected by the first color covering correction unit. The food correction unit corrects the color components of the image corrected by the first color covering correction unit when the food determination unit determines that the subject contains food.

さらに、本発明の他の側面に係る記録媒体は、画像を補正するようにコンピュータを動作させる画像処理プログラムが記録されたコンピュータ読み取り可能な記録媒体である。該プログラムは、コンピュータを、入力部、第1色被り補正部、食べ物判定部及び食べ物補正部として動作させる。入力部は、画像を入力する。第1色被り補正部は、画像の色被りを補正する。食べ物判定部は、第1色被り補正部により補正された後の画像の被写体に食べ物が含まれているか否かを判定する。食べ物補正部は、食べ物判定部により被写体に食べ物が含まれていると判定された場合には、第1色被り補正部により補正された後の画像の色成分を補正する。   Furthermore, a recording medium according to another aspect of the present invention is a computer-readable recording medium on which an image processing program that causes a computer to operate so as to correct an image is recorded. The program causes the computer to operate as an input unit, a first color covering correction unit, a food determination unit, and a food correction unit. The input unit inputs an image. The first color fog correction unit corrects the color fog of the image. The food determination unit determines whether food is included in the subject of the image after being corrected by the first color covering correction unit. The food correction unit corrects the color components of the image corrected by the first color covering correction unit when the food determination unit determines that the subject contains food.

本発明に係る画像処理方法、画像処理プログラム及び画像処理ブログラムが記録された記録媒体によれば、上述した本発明に係る画像処理装置と同様の効果を奏する。   According to the image processing method, the image processing program, and the recording medium on which the image processing program according to the present invention is recorded, the same effects as those of the image processing apparatus according to the present invention described above can be obtained.

以上説明したように、本発明の種々の側面及び実施形態によれば、適切に画質を向上させることができる。   As described above, according to various aspects and embodiments of the present invention, image quality can be appropriately improved.

実施形態に係る画像処理装置を搭載した携帯端末の機能ブロック図である。It is a functional block diagram of the portable terminal carrying the image processing apparatus which concerns on embodiment. 図1中の画像処理装置が搭載される携帯端末のハードウェア構成図である。It is a hardware block diagram of the portable terminal in which the image processing apparatus in FIG. 1 is mounted. 明度の補正処理に用いるトーンカーブである。It is a tone curve used for lightness correction processing. 彩度の補正強度を説明するグラフである。It is a graph explaining the correction intensity | strength of saturation. エッジ強度の補正を説明するグラフである。It is a graph explaining correction | amendment of edge strength. 第1実施形態に係る画像処理装置の動作を説明するフローチャートである。4 is a flowchart for explaining the operation of the image processing apparatus according to the first embodiment. 第2実施形態に係る画像処理装置の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the image processing apparatus which concerns on 2nd Embodiment.

以下、添付図面を参照して本発明の実施形態について説明する。なお、図面の説明において同一の要素には同一の符号を付し、重複する説明を省略する。   Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the description of the drawings, the same elements are denoted by the same reference numerals, and redundant description is omitted.

(第1実施形態)
本実施形態に係る画像処理装置は、画像を補正する装置であって、例えば、携帯電話、デジタルカメラ、PDA(Personal Digital Assistant)又は通常のコンピュータシステム等に搭載されるものである。なお、以下では、説明理解の容易性を考慮し、本発明に係る画像処理装置の一例として、携帯端末に搭載される画像処理装置を説明する。
(First embodiment)
The image processing apparatus according to the present embodiment is an apparatus that corrects an image, and is mounted on, for example, a mobile phone, a digital camera, a PDA (Personal Digital Assistant), or a normal computer system. In the following, an image processing apparatus mounted on a portable terminal will be described as an example of the image processing apparatus according to the present invention in consideration of ease of understanding.

図1は、本実施形態に係る画像処理装置1を備える携帯端末2の機能ブロック図である。図1に示す携帯端末2は、例えばユーザにより携帯される移動端末であり、図2に示すハードウェア構成を有する。図2は、携帯端末2のハードウェア構成図である。図2に示すように、携帯端末2は、物理的には、CPU(Central Processing Unit)100、ROM(Read Only Memory)101及びRAM(Random Access Memory)102等の主記憶装置、カメラ又はキーボード等の入力デバイス103、ディスプレイ等の出力デバイス104、ハードディスク等の補助記憶装置105などを含む通常のコンピュータシステムとして構成される。後述する携帯端末2及び画像処理装置1の各機能は、CPU100、ROM101、RAM102等のハードウェア上に所定のコンピュータソフトウェアを読み込ませることにより、CPU100の制御の元で入力デバイス103及び出力デバイス104を動作させるとともに、主記憶装置や補助記憶装置105におけるデータの読み出し及び書き込みを行うことで実現される。なお、上記の説明は携帯端末2のハードウェア構成として説明したが、画像処理装置1がCPU100、ROM101及びRAM102等の主記憶装置、入力デバイス103、出力デバイス104、補助記憶装置105などを含む通常のコンピュータシステムとして構成されてもよい。また、携帯端末2は、通信モジュール等を備えてもよい。   FIG. 1 is a functional block diagram of a mobile terminal 2 including an image processing apparatus 1 according to the present embodiment. A mobile terminal 2 shown in FIG. 1 is a mobile terminal carried by a user, for example, and has a hardware configuration shown in FIG. FIG. 2 is a hardware configuration diagram of the mobile terminal 2. As shown in FIG. 2, the portable terminal 2 physically includes a main storage device such as a CPU (Central Processing Unit) 100, a ROM (Read Only Memory) 101, and a RAM (Random Access Memory) 102, a camera, a keyboard, and the like. The input device 103, the output device 104 such as a display, the auxiliary storage device 105 such as a hard disk, and the like are configured as a normal computer system. Each function of the portable terminal 2 and the image processing apparatus 1 to be described later causes the input device 103 and the output device 104 to be controlled under the control of the CPU 100 by reading predetermined computer software on hardware such as the CPU 100, the ROM 101, and the RAM 102. This is realized by operating and reading and writing data in the main storage device and the auxiliary storage device 105. Although the above description has been given as a hardware configuration of the mobile terminal 2, the image processing apparatus 1 normally includes a CPU 100, a main storage device such as the ROM 101 and the RAM 102, an input device 103, an output device 104, an auxiliary storage device 105, and the like. It may be configured as a computer system. The mobile terminal 2 may include a communication module or the like.

図1に示すように、携帯端末2は、カメラ20、画像記録部21、画像処理装置1、一時画像記録部22、表示部23及び補正画像記録部24を備えている。   As shown in FIG. 1, the mobile terminal 2 includes a camera 20, an image recording unit 21, an image processing device 1, a temporary image recording unit 22, a display unit 23, and a corrected image recording unit 24.

カメラ20は、画像を撮像する機能を有している。カメラ20として、例えば撮像素子等が用いられる。カメラ20は、例えば撮像された画像を撮像の度に画像処理装置1へ出力する機能を有している。   The camera 20 has a function of capturing an image. For example, an image sensor or the like is used as the camera 20. For example, the camera 20 has a function of outputting a captured image to the image processing apparatus 1 every time it is captured.

画像記録部21は、画像を記録する機能を有している。画像記録部21に格納される画像は、カメラ20で撮像された画像であってもよいし、インターネット等の通信を介して取得された画像であってもよい。   The image recording unit 21 has a function of recording an image. The image stored in the image recording unit 21 may be an image captured by the camera 20 or an image acquired via communication such as the Internet.

画像処理装置1は、入力部10及び画像処理部11を備えている。入力部10は、補正対象となる画像を、カメラ20又は画像記録部21から入力する。入力された画像は、例えばRGB色空間で表現された画像である。そして、入力部10は、画像処理部11へ画像を出力する。   The image processing apparatus 1 includes an input unit 10 and an image processing unit 11. The input unit 10 inputs an image to be corrected from the camera 20 or the image recording unit 21. The input image is, for example, an image expressed in an RGB color space. Then, the input unit 10 outputs an image to the image processing unit 11.

画像処理部11は、明度・彩度補正部(明度彩度補正部)12、色被り補正部(第1色被り補正部)13、食べ物判定部14、食べ物補正部15、エッジ補正部16及びノイズ補正部(第1ノイズ補正部)17を備えている。画像処理部11は、これらの補正部及び判定部を適切に作動させ、かつ、組み合わせて機能させることで、入力部10により入力された画像を自動かつ適切に補正する。以下、各補正部及び判定部の詳細を説明する。   The image processing unit 11 includes a brightness / saturation correction unit (brightness / saturation correction unit) 12, a color fog correction unit (first color fog correction unit) 13, a food determination unit 14, a food correction unit 15, an edge correction unit 16, and A noise correction unit (first noise correction unit) 17 is provided. The image processor 11 automatically and appropriately corrects the image input by the input unit 10 by appropriately operating these correction units and determination units and causing them to function in combination. Hereinafter, details of each correction unit and determination unit will be described.

明度・彩度補正部12は、画像に含まれる画素の明度又は彩度を補正する。明度・彩度補正部12は、明度又は彩度を補正することで、適正露出からずれた状態となっている露出ミスを解消する。明度・彩度補正部12は、例えば、画像の白とび又は黒つぶれ(輝度レベルが著しく高い又は低い部分)といった適正露出からの顕著なずれのみならず、薄暗い・やや明るいような軽度なずれを解消して、画質を向上させる。また、明度・彩度補正部12は、「空」の青や「草」の緑を人が「空」や「草」として記憶している記憶色に近づけたりすることで、画質を向上させる。なお、記憶色とは、人が一般的にイメージとして記憶している色のことである。記憶色は、実際の色よりも鮮やかな色となる場合が多い。例えば、「空」の場合、実際の色は水色に近い薄めの青であるが、記憶色は真っ青である。このように、実際の色と人がイメージする色とが異なる場合があるため、所定の色に関しては記憶色に近づけることで、画質を向上させることができる。   The lightness / saturation correction unit 12 corrects the lightness or saturation of the pixels included in the image. The lightness / saturation correction unit 12 corrects the lightness or saturation to eliminate an exposure mistake that is in a state shifted from the appropriate exposure. The lightness / saturation correction unit 12 not only makes a noticeable shift from proper exposure such as overexposure or blackout (a part where the brightness level is extremely high or low), but also a slight shift such as dim / slightly bright. Eliminate and improve image quality. Further, the lightness / saturation correction unit 12 improves the image quality by bringing the blue of “sky” or the green of “grass” closer to the memory color that a person has stored as “sky” or “grass”. . The memory color is a color that is generally stored as an image by a person. In many cases, the memory color is a brighter color than the actual color. For example, in the case of “sky”, the actual color is light blue that is close to light blue, but the memory color is pure blue. As described above, since the actual color may be different from the color imaged by the person, the image quality can be improved by bringing the predetermined color closer to the memory color.

明度・彩度補正部12は、画像の露出ミスを解消するために、明度を調整する。なお、暗い画像を明るくするために明度補正の強度を上げ過ぎると、白とびや色ノイズが目立ってしまい、画質が低下するおそれがある。このため、明度・彩度補正部12は、露出ミスを解消させるためにトーンカーブによる明度の補正を行う。トーンカーブを用いることで、滑らかに輝度とコントラストの補正を行うことができる。トーンカーブは、色空間の色成分の累積ヒストグラムに基づいて生成する。すなわち、補正前の色成分の累積ヒストグラムを作成し、累積ヒストグラムの重心を白とび及び黒つぶれしない程度に中心に移動させるトーンカーブを生成する。また、明度・彩度補正部12は、画像をHSV色空間で取り扱う。HSV色空間は色相が独立しているため、HSV色空間を採用することで、色相を変化させることなく明度と彩度を補正することができる。このため、明度・彩度補正部12は、処理前の画像がRGB色空間等である場合には、該画像の色空間をHSV色空間へ変換する。   The lightness / saturation correction unit 12 adjusts the lightness in order to eliminate an image exposure error. If the intensity of lightness correction is increased too much in order to brighten a dark image, overexposure and color noise will become conspicuous and the image quality may be degraded. For this reason, the lightness / saturation correction unit 12 performs lightness correction using a tone curve in order to eliminate an exposure error. By using the tone curve, brightness and contrast can be corrected smoothly. The tone curve is generated based on a cumulative histogram of color components in the color space. In other words, a cumulative histogram of color components before correction is created, and a tone curve is generated that moves the center of the cumulative histogram to the center so that it is not overexposure and blackout. Further, the lightness / saturation correction unit 12 handles the image in the HSV color space. Since the hue of the HSV color space is independent, the brightness and the saturation can be corrected without changing the hue by adopting the HSV color space. Therefore, when the image before processing is an RGB color space or the like, the lightness / saturation correction unit 12 converts the color space of the image into an HSV color space.

図3は、明度・彩度補正部12によって生成されたトーンカーブの例である。図3の(A)は、白とびの画像を補正するためのトーンカーブである。図3の(B)は、黒つぶれの画像を補正するためのトーンカーブである。図3の(A),(B)の横軸は、入力する明度の値、縦軸は出力する明度の値(補正後の明度の値)であり、0〜255の範囲となる。図中のL1で示す直線が補正していない状態であり、図中のL2で示す曲線がトーンカーブである。図3の(A)に示すように、白とび画像の場合には、HVS累積ヒストグラムに基づいて、明度を下げるようにトーンカーブを生成する。一方、図3の(B)に示すように、黒つぶれ画像の場合には、HVS累積ヒストグラムに基づいて、明度を上げるようにトーンカーブを生成する。   FIG. 3 is an example of a tone curve generated by the lightness / saturation correction unit 12. FIG. 3A shows a tone curve for correcting an overexposed image. FIG. 3B is a tone curve for correcting a blackout image. 3A and 3B, the horizontal axis is the input brightness value, and the vertical axis is the output brightness value (corrected brightness value), which is in the range of 0-255. The straight line indicated by L1 in the figure is not corrected, and the curve indicated by L2 in the figure is the tone curve. As shown in FIG. 3A, in the case of an overexposed image, a tone curve is generated so as to lower the brightness based on the HVS cumulative histogram. On the other hand, as shown in FIG. 3B, in the case of a blackout image, a tone curve is generated so as to increase the brightness based on the HVS cumulative histogram.

なお、トーンカーブを用いて明度を補正した際に、明度を下げると人間の感覚では彩度が低く見えてしまうことがある。このため、明度・彩度補正部12は、明度を下げた場合には彩度を上げる。同様に、明度・彩度補正部12は、明度を上げた場合には彩度を下げる。このとき、トーンカーブによって補正する明度の変化量を係数として、彩度の補正を行う。係数は、例えば明度の変化量が大きいほど大きく設定される。例えば、彩度を所定値上げる場合には、該所定値に上記係数を乗算あるいは加算して彩度を上げる。同様に、彩度を所定値下げる場合には、該所定値に上記係数を乗算あるいは加算して彩度を下げる。このようにして、明度の変化量に応じて、彩度の上げ幅及び下げ幅を調整することで、露出ミスを適切に解消して画質のよい画像へと補正することができる。   Note that when the lightness is corrected using the tone curve, if the lightness is lowered, the saturation may appear low for human senses. For this reason, the lightness / saturation correction unit 12 increases the saturation when the lightness is lowered. Similarly, the lightness / saturation correction unit 12 decreases the saturation when the lightness is increased. At this time, the saturation is corrected using the change in brightness corrected by the tone curve as a coefficient. For example, the coefficient is set larger as the amount of change in brightness is larger. For example, when the saturation is increased by a predetermined value, the saturation is increased by multiplying or adding the predetermined value to the coefficient. Similarly, when the saturation is lowered by a predetermined value, the saturation is lowered by multiplying or adding the predetermined value to the coefficient. In this way, by adjusting the amount of increase and decrease in saturation according to the amount of change in lightness, it is possible to appropriately eliminate an exposure error and correct the image with good image quality.

さらに、明度・彩度補正部12は、明度に応じた彩度補正の他に、「空」「草」「人の肌」等の色が記憶色に近づくように、追加的に彩度補正を行ってもよい。例えば「空」の青であれば、青色の彩度が高いほど記憶色に近づく。しかし、「空」の青を強調するために彩度を強調し過ぎると色ムラが発生するおそれがある。このため、明度・彩度補正部12は、色ムラが発生しない程度に彩度を強調する。図4は、彩度の補正強度を説明するグラフである。横軸は色相値であり、縦軸が彩度補正強度である。基準値D1は、記憶色である。図4に示すように、明度・彩度補正部12は、基準値D1(あるいは基準値D1を含む基準領域)からの色相空間上の距離に応じて彩度の補正の強度を変更する。例えば、基準値D1に近い色相値の画素ほど彩度の補正強度を強くし、基準値D1に遠い色相値の画素ほど彩度の補正強度を弱くする。このように彩度を補正することで、色ムラが生じることを回避して、記憶色に近い青を再現することができる。さらに、元から色鮮やかな色彩の空では青みが強くなり過ぎる場合もあるため、ガンマ曲線による補正をしてもよい。   Further, the lightness / saturation correction unit 12 additionally performs saturation correction so that colors such as “sky”, “grass”, and “human skin” approach the memory color in addition to saturation correction according to lightness. May be performed. For example, in the case of “sky” blue, the higher the blue saturation, the closer to the memory color. However, if the saturation is emphasized too much in order to emphasize the “sky” blue, color unevenness may occur. For this reason, the lightness / saturation correction unit 12 enhances the saturation to such an extent that no color unevenness occurs. FIG. 4 is a graph for explaining the saturation correction strength. The horizontal axis is the hue value, and the vertical axis is the saturation correction intensity. The reference value D1 is a memory color. As shown in FIG. 4, the lightness / saturation correction unit 12 changes the intensity of saturation correction according to the distance in the hue space from the reference value D1 (or a reference region including the reference value D1). For example, the saturation correction strength is increased as the pixel has a hue value closer to the reference value D1, and the saturation correction strength is decreased as the pixel has a hue value farther from the reference value D1. By correcting the saturation in this way, it is possible to avoid blue color unevenness and reproduce blue close to the memory color. Furthermore, since the bluish color may become too strong in the sky with vivid colors, correction by a gamma curve may be performed.

以上、明度・彩度補正部12は、明度に応じた彩度補正を画素ごとに行うとともに、所定の色ごとに領域を判別して彩度を追加的に強調する。なお、所定の色の領域の判別は、所定色のマップ画像を生成することで容易に判別することができる。   As described above, the lightness / saturation correction unit 12 performs saturation correction according to lightness for each pixel, and additionally distinguishes a region for each predetermined color to further enhance the saturation. Note that the predetermined color area can be easily determined by generating a map image of a predetermined color.

色被り補正部13は、画像の色被りを補正する。色被りとは、画像が照明や環境の影響等によって特定の色に偏っている状態のことである。色被り補正部13は、例えば画像全体の色味(R値,G値,B値)の補色を加減することで、ホワイトバランスを調整し、本来の色を再現するように補正し、画質を向上させる。例えば、色被り補正部13は、画像中において本来は白であると予想される画素を判断し、色被りがどの程度発生しているかを推定する。なお、色被り補正部13は、色被りの判定の際には、YUV色空間で表現された画像を用いる。このため、色被り補正部13は、処理前の画像がRGB色空間等である場合には、該画像の色空間をYUV色空間へ変換する。そして、色被り補正部13は、例えば、輝度値Yが所定値以上であり、かつ、輝度値Yに対する色差値(UV成分値)が所定値以下である画素の色が本来は白であると判定する。そして、色被り補正部13は、画像の色との差分から色被り度合いを推定する。そして、色被り補正部13は、白だと判定した画素をサンプリングして、当該画素の色が白となるように、かつ、モノトーンとならないようにホワイトバランスを調整する。   The color fog correction unit 13 corrects the color fog of the image. The color covering is a state in which the image is biased to a specific color due to the influence of illumination or the environment. The color fog correction unit 13 adjusts the white balance and corrects the image quality so as to reproduce the original color by adjusting, for example, the complementary colors of the entire image (R value, G value, B value). Improve. For example, the color fog correction unit 13 determines a pixel that is originally expected to be white in the image and estimates how much color fog is generated. The color fog correction unit 13 uses an image expressed in the YUV color space when determining color fog. For this reason, when the image before processing is an RGB color space or the like, the color fog correction unit 13 converts the color space of the image into a YUV color space. Then, for example, the color fog correction unit 13 determines that the color of a pixel whose luminance value Y is equal to or greater than a predetermined value and whose color difference value (UV component value) with respect to the luminance value Y is equal to or smaller than a predetermined value is originally white. judge. Then, the color fog correction unit 13 estimates the color fog degree from the difference from the color of the image. Then, the color covering correction unit 13 samples the pixel determined to be white and adjusts the white balance so that the color of the pixel becomes white and does not become monotone.

食べ物判定部14は、画像の被写体として食べ物が撮像されているか否かを判定する。ここで、「食べ物」とは、人間や動物が食用にするものであり、ここでは、画像補正前に予め学習によって定義されている。すなわち、食べ物判定部14は、教師画像を用いた学習によって食べ物の画像特徴を予め取得する。そして、食べ物判定部14は、画像特徴を用いた物体検出技術によって、被写体に食べ物が含まれているか否かを判定する。例えば、食べ物判定部14は、画像特徴を比較して被写体に食べ物が含まれているか否かを判定する。   The food determination unit 14 determines whether food is captured as the subject of the image. Here, “food” is edible by humans and animals, and is defined here by learning before image correction. That is, the food determination unit 14 acquires in advance an image feature of food through learning using a teacher image. Then, the food determination unit 14 determines whether or not the subject contains food by an object detection technique using image features. For example, the food determination unit 14 compares the image characteristics to determine whether the subject contains food.

食べ物補正部15は、画像に含まれる画素の色成分を変更する。食べ物補正部15は、例えば明度と彩度を変化させることで、食べ物の見栄えを向上させる。例えば、食べ物補正部15は、被写体に食べ物が含まれる場合には、各画素の明度を一様(一定)の比率で強調する補正を行う。さらに、食べ物補正部15は、暖色系の色相の画素の彩度が非暖色系の色相の画素の彩度よりも強調されるように重み付けして各画素の彩度を補正する。これにより、食べ物については、全体的に明るく赤味のある画像となる。なお、サラダ等の寒色系に分類される食べ物が画像の一部に含まれている場合には、赤味を帯びさせることによって画質が低下する場合がある。このため、食べ物補正部15は、暖色系でない領域については、彩度補正を行わないとしてもよい。このように、色領域ごとに異なる彩度補正を行うことで、例えば多種多様な食べ物が複数並んで撮像された場合であっても食べ物の見栄えを向上させることができる。なお、食べ物補正部15は、例えばHSV色空間で補正を行う。   The food correction unit 15 changes the color components of the pixels included in the image. The food correction unit 15 improves the appearance of the food, for example, by changing brightness and saturation. For example, when the subject includes food, the food correction unit 15 performs correction to emphasize the brightness of each pixel at a uniform (constant) ratio. Further, the food correction unit 15 corrects the saturation of each pixel by weighting so that the saturation of the pixel of the warm hue is emphasized more than the saturation of the pixel of the non-warm hue. As a result, the food is a bright and reddish image as a whole. In addition, when the food classified into the cold color type | system | groups, such as a salad, is contained in a part of image, image quality may fall by making it reddish. For this reason, the food correction unit 15 may not perform saturation correction for regions that are not warm colors. In this way, by performing different saturation correction for each color region, it is possible to improve the appearance of food even when, for example, a wide variety of foods are imaged side by side. Note that the food correction unit 15 performs correction in, for example, the HSV color space.

エッジ補正部16は、画像のエッジを強調する。エッジ補正部16は、例えば一般的なアンシャープマスクに対してエッジの強度を一律とするのではなく、適応的に変動させて補正を行うことで、輪郭のボケ等を適切に補正して、画像の解像感を向上させる。なお、エッジ補正部16は、例えばYUV色空間で補正を行う。エッジ補正部16は、例えば、補正対象の画素の輝度値と、当該補正対象の画素を含む所定領域に含まれる画素の輝度値との差に基づいて、エッジ強度を設定する。例えば、補正対象の画素及び当該画素の周囲を囲む8近傍を所定領域とする。補正対象の画素の画素値をa、8近傍の平均画素値をbとすると、補正対象の画素のコントラストcontは、cont=(a−b)・(a−b)となる。このcontの値に比例して、予め与えられた最小強度から最大強度までエッジ強度が変動させる。図5は、エッジ強度の補正を説明するグラフである。横軸が輝度差であり、縦軸がエッジ強度である。図中のK1はエッジ強度(すなわちエッジ補正量)の最小値であり、図中のK2はエッジ強度(すなわちエッジ補正量)の最大値である。このように、輝度差がS1より小さい場合には、エッジ強度を最小値K1とし、輝度差がS1より大きい場合には、エッジ強度を最大値K2とする。ここで、輝度差がS1以上かつS2以下の範囲では、エッジ強度を線形的に変動させる。このように、画素単位で輝度差を算出し、図5に示すグラフに基づいてエッジを設定して補正することで、強弱が適切なエッジが画素単位で設定されるため、輪郭のボケ等を適切に補正して、画像の解像感を向上させることができる。   The edge correction unit 16 enhances the edge of the image. For example, the edge correction unit 16 appropriately corrects the blurring of the outline, etc., by performing correction by adaptively changing the intensity of the edge with respect to a general unsharp mask, for example. Improve image resolution. The edge correction unit 16 performs correction in, for example, a YUV color space. For example, the edge correction unit 16 sets the edge strength based on the difference between the luminance value of the correction target pixel and the luminance value of the pixel included in the predetermined area including the correction target pixel. For example, a pixel to be corrected and eight neighborhoods surrounding the pixel are set as a predetermined region. If the pixel value of the correction target pixel is a and the average pixel value in the vicinity of 8 is b, the contrast cont of the correction target pixel is cont = (ab) · (ab). In proportion to the value of cont, the edge strength is varied from a predetermined minimum strength to a maximum strength. FIG. 5 is a graph illustrating correction of edge strength. The horizontal axis is the luminance difference, and the vertical axis is the edge strength. K1 in the figure is the minimum value of the edge strength (that is, edge correction amount), and K2 in the figure is the maximum value of the edge strength (that is, edge correction amount). Thus, when the luminance difference is smaller than S1, the edge strength is set to the minimum value K1, and when the luminance difference is larger than S1, the edge strength is set to the maximum value K2. Here, in the range where the luminance difference is not less than S1 and not more than S2, the edge intensity is linearly changed. In this way, the brightness difference is calculated in units of pixels, and the edges are set and corrected based on the graph shown in FIG. 5, so that appropriate edges are set in units of pixels. By appropriately correcting, it is possible to improve the resolution of the image.

ノイズ補正部17は、色ノイズ及び輝度ノイズを除去する。ノイズ補正部17は、補正の強度を例えば近傍画素の相関を用いて決定する。なお、ノイズ補正部17は、例えばRBG色空間で補正を行う。ノイズ補正部17は、例えば所定の画素のR値と、当該画素に隣接する画素のうちの1つの画素のG値との相関を利用して、ノイズの補正の強度を設定する。例えば、相関が高ければ補正強度は弱く設定し、相関が低ければ補正強度は強く設定する。そして、全体の平均値を算出する。この平均値に比例するように、ノイズフィルタのカーネルサイズを、設定された最小値から最大値まで変動させる。このようにノイズレベルに応じてノイズを除去することにより、過度なノイズ除去を回避して、適切なディテール感の画像とすることができる。   The noise correction unit 17 removes color noise and luminance noise. The noise correction unit 17 determines the correction strength using, for example, the correlation of neighboring pixels. Note that the noise correction unit 17 performs correction in, for example, an RBG color space. For example, the noise correction unit 17 sets the intensity of noise correction using the correlation between the R value of a predetermined pixel and the G value of one of the pixels adjacent to the pixel. For example, if the correlation is high, the correction strength is set to be weak, and if the correlation is low, the correction strength is set to be high. And the average value of the whole is calculated. The kernel size of the noise filter is changed from the set minimum value to the maximum value so as to be proportional to the average value. Thus, by removing noise according to the noise level, it is possible to avoid excessive noise removal and obtain an image with an appropriate detail feeling.

さらに、ノイズ補正部17は、結果データのビットを拡張する。ノイズ補正部17は、例えばノイズ除去した後の画像のビットを拡張する。例えば、ノイズ補正部17は、画素データを8ビットから16ビットに拡張する。これにより、ノイズ補正以降の処理において、量子化誤差を軽減させるこができる。   Furthermore, the noise correction unit 17 expands the bits of the result data. The noise correction unit 17 expands the bits of the image after removing noise, for example. For example, the noise correction unit 17 extends the pixel data from 8 bits to 16 bits. Thereby, it is possible to reduce the quantization error in the processing after the noise correction.

画像処理部11は、一時画像記録部22を書き込み可能かつ参照可能に構成されている。上記補正部及び判定部は、処理中の画像を一時画像記録部22に記録してもよい。そして、画像処理部11は、補正後の画像を表示部23へ出力してもよい。表示部23は、ディスプレイ等の表示装置である。あるいは、画像処理部11は、補正後の画像を補正画像記録部24へ出力して記録してもよい。   The image processing unit 11 is configured to be able to write and refer to the temporary image recording unit 22. The correction unit and the determination unit may record the image being processed in the temporary image recording unit 22. Then, the image processing unit 11 may output the corrected image to the display unit 23. The display unit 23 is a display device such as a display. Alternatively, the image processing unit 11 may output and record the corrected image to the corrected image recording unit 24.

次に、画像処理装置1の動作について説明する。図6は、画像処理装置1の動作を示すフローチャートである。図6に示す制御処理は、例えばユーザ操作によって開始ボタンがONされたタイミングで実行される。   Next, the operation of the image processing apparatus 1 will be described. FIG. 6 is a flowchart showing the operation of the image processing apparatus 1. The control process shown in FIG. 6 is executed, for example, when the start button is turned on by a user operation.

図6に示すように、最初に、画像入力処理から開始する(S10:入力ステップ)。S10の処理では、入力部10が画像を入力する。S10の処理が終了すると、ノイズレベル判定処理へ移行する(S12)。   As shown in FIG. 6, first, image input processing is started (S10: input step). In the process of S10, the input unit 10 inputs an image. When the process of S10 ends, the process proceeds to a noise level determination process (S12).

S12の処理では、ノイズ補正部17が、S10の処理で入力された画像のノイズのレベルを判定する。ノイズ補正部17は、補正の強度を例えば近傍画素の相関を用いて決定する。S12の処理が終了すると、ノイズ補正処理へ移行する(S14)。   In the process of S12, the noise correcting unit 17 determines the noise level of the image input in the process of S10. The noise correction unit 17 determines the correction strength using, for example, the correlation of neighboring pixels. When the process of S12 ends, the process proceeds to a noise correction process (S14).

S14の処理では、ノイズ補正部17がS10の処理で入力された画像のノイズの補正を行う。例えば、ノイズ補正部17は、S12の処理で決定されたノイズの強度に基づいて、S10の処理で入力された画像の画像を補正する。さらに、ノイズ補正部17は、画素データを8ビットから16ビットに拡張する。S14の処理が終了すると、明度・彩度補正処理へ移行する(S16)。   In the process of S14, the noise correction unit 17 corrects the noise of the image input in the process of S10. For example, the noise correction unit 17 corrects the image of the image input in the process of S10 based on the noise intensity determined in the process of S12. Furthermore, the noise correction unit 17 extends the pixel data from 8 bits to 16 bits. When the processing of S14 is completed, the routine proceeds to lightness / saturation correction processing (S16).

S16の処理では、明度・彩度補正部12が、S14の処理でノイズ補正された画像の明度及び彩度の補正を行う。例えば、明度・彩度補正部12は、トーンカーブを用いて明度を補正するとともに、明度の変化量に応じて、上げ幅及び下げ幅を調整しながら、彩度を補正する。さらに、特定色が記憶色に近づくように、追加的に彩度補正を行う。S16の処理が終了すると、色被り度合い判定処理へ移行する(S18)。   In the process of S16, the lightness / saturation correction unit 12 corrects the lightness and saturation of the image subjected to noise correction in the process of S14. For example, the lightness / saturation correction unit 12 corrects the lightness using the tone curve, and corrects the saturation while adjusting the increase and decrease widths according to the amount of change in lightness. Further, saturation correction is additionally performed so that the specific color approaches the memory color. When the process of S16 ends, the process proceeds to a color covering degree determination process (S18).

S18の処理では、色被り補正部13が、S16の処理で明度・彩度補正された画像の色被りの度合いを判定する。例えば、色被り補正部13は、S16の処理で明度・彩度補正された画像中において本来は白であると予想される画素を判断し、色被りがどの程度発生しているかを推定する。S18の処理が終了すると、色被り補正処理へ移行する(S20:第1色被り補正ステップ)。   In the process of S18, the color covering correction unit 13 determines the degree of color covering of the image that has been subjected to the lightness / saturation correction in the process of S16. For example, the color fog correction unit 13 determines a pixel that is originally expected to be white in the image that has been subjected to lightness / saturation correction in the process of S16, and estimates how much color fog occurs. When the process of S18 is completed, the process proceeds to a color fog correction process (S20: first color fog correction step).

S20の処理では、色被り補正部13が、S18の処理で判定された色被り度合いに基づいて、S16の処理で明度・彩度補正された画像の色被りを補正する。色被り補正部13は、白だと判定した画素をサンプリングして、当該画素の色が白となるように、かつ、モノトーンとならないようにホワイトバランスを調整する。S20の処理が終了すると、食べ物判定処理へ移行する(S22:食べ物判定ステップ)。   In the process of S20, the color covering correction unit 13 corrects the color covering of the image that has been lightness / saturated in the process of S16, based on the color covering degree determined in the process of S18. The color covering correction unit 13 samples a pixel determined to be white and adjusts the white balance so that the color of the pixel becomes white and does not become monotone. When the process of S20 ends, the process proceeds to a food determination process (S22: food determination step).

S22の処理では、食べ物判定部14が、S20の処理で色被り補正された画像を用いて、被写体に食べ物が含まれるか否かを判定する。食べ物判定部14は、画像特徴を用いた物体検出技術によって、被写体に食べ物が含まれているか否かを判定する。S22の処理において、被写体に食べ物が含まれていると判定された場合には、食べ物補正処理へ移行する(S24:食べ物補正ステップ)。   In the process of S22, the food determination unit 14 determines whether or not the subject includes food using the image subjected to the color covering correction in the process of S20. The food determination unit 14 determines whether food is included in the subject by an object detection technique using image features. If it is determined in step S22 that the subject contains food, the process proceeds to food correction processing (S24: food correction step).

S24の処理では、食べ物補正部15が、S20の処理で色被り補正された画像を補正する。食べ物補正部15は、S20の処理で色被り補正された画像の各画素の明度を一様(一定)の比率で強調する補正を行うとともに、暖色系の色相の画素の彩度が非暖色系の色相の画素の彩度よりも強調されるように重み付けして各画素の彩度を補正する。S24の処理が終了すると、エッジ強度判定処理へ移行する(S26)。   In the process of S24, the food correction unit 15 corrects the image subjected to the color covering correction in the process of S20. The food correction unit 15 performs correction to emphasize the lightness of each pixel of the image subjected to color covering correction in the process of S20 at a uniform (constant) ratio, and the saturation of pixels of a warm color hue is a non-warm color system. The saturation of each pixel is corrected by weighting so that it is more emphasized than the saturation of the pixel of the hue. When the processing of S24 is completed, the process proceeds to edge strength determination processing (S26).

S26の処理では、エッジ補正部16が、S24の処理で食べ物補正された画像のエッジ強度を判定する。エッジ補正部16は、例えば、S24の処理で食べ物補正された画像の画素の輝度値と、当該画素の8近傍の画素の輝度値との差に基づいて、エッジ強度を設定する。S26の処理が終了すると、エッジ強度補正処理へ移行する(S28)。   In the process of S26, the edge correction unit 16 determines the edge strength of the image subjected to the food correction in the process of S24. For example, the edge correction unit 16 sets the edge strength based on the difference between the luminance value of the pixel of the image that has been food-corrected in the process of S24 and the luminance value of the eight neighboring pixels of the pixel. When the processing of S26 ends, the process proceeds to edge strength correction processing (S28).

S28の処理では、エッジ補正部16が、S26の処理で算出されたエッジ強度に基づいて、S24の処理で食べ物補正された画像を補正する。S28の処理が終了すると、補正画像出力処理へ移行する(S30)。   In the process of S28, the edge correction unit 16 corrects the image subjected to the food correction in the process of S24, based on the edge strength calculated in the process of S26. When the process of S28 ends, the process proceeds to a corrected image output process (S30).

S30の処理では、画像処理部11が、S28の処理でエッジ補正された画像を出力する。例えば、画像処理部11が、S28の処理でエッジ補正された画像を補正画像記録部24へ記録する。S30の処理が終了すると、図6に示す制御処理を終了する。   In the process of S30, the image processing unit 11 outputs the image whose edge has been corrected in the process of S28. For example, the image processing unit 11 records the image whose edge has been corrected in the process of S28 in the corrected image recording unit 24. When the process of S30 ends, the control process shown in FIG. 6 ends.

一方、S22の処理において、被写体に食べ物が含まれていないと判定された場合には、エッジ強度判定処理へ移行する(S26)。   On the other hand, if it is determined in step S22 that the subject does not contain food, the process proceeds to edge strength determination processing (S26).

以上で図6に示す制御処理を終了する。図6に示す制御処理を実行することで、適切な補正を行った画像を自動的に得ることができる。例えば、エッジを強調した後にノイズ補正を行うと、強調されたエッジがノイズ補正により潰れてしまうおそれがある。このため、図6に示すように、ノイズ補正処理(S14)の後にエッジ補正処理(S28)を行うことで、適切な補正が行える。また、データが8ビットの場合、トーンカーブによる明度補正の際に、入力の明度の変化に対して出力の明度が急激に変化する、いわゆるトーンジャンプが発生しやすい。このため、図6に示すように、ノイズ補正処理(S14)で16ビットに拡張した後に、明度・彩度補正処理(S16)や、食べ物補正処理(S24)を行うことで、適切な補正が行える。また、空や花弁といった明るい色のグラデーション部分は誤って色被りしている画素であるとしてサンプリングされやすい。このため、図6に示すように、明度・彩度補正処理(S16)の後に、色被り補正処理(S20)を行うことで、適切な補正が行える。また、食べ物が撮像された画像は、室内照明等の影響により色被りしていることが多い。このため、図6に示すように、色被り補正処理(S20)の後に、食べ物判定処理(S22)を行うことで、適切な判定が行える。また、エッジ補正を行った後に色味の補正を行うと、ざらつきが増加した画像に対して明度や彩度を強調することになるため、トーンジャンプやノイズの増加が顕著になる場合がある。このため、図6に示すように、エッジ補正処理(S28)を全体の色味に関する補正が終わった後に局所的に行うことで、適切な補正が行える。   Thus, the control process shown in FIG. 6 is finished. By executing the control process shown in FIG. 6, it is possible to automatically obtain an image with appropriate correction. For example, if noise correction is performed after enhancing an edge, the enhanced edge may be crushed by noise correction. For this reason, as shown in FIG. 6, an appropriate correction can be performed by performing the edge correction process (S28) after the noise correction process (S14). When the data is 8 bits, so-called tone jump in which the output brightness changes rapidly with respect to the change in input brightness is likely to occur during brightness correction using the tone curve. For this reason, as shown in FIG. 6, after the noise correction process (S14) is expanded to 16 bits, the brightness / saturation correction process (S16) and the food correction process (S24) are performed, so that appropriate correction can be performed. Yes. Also, bright color gradations such as sky and petals are likely to be sampled as pixels that are accidentally colored. For this reason, as shown in FIG. 6, appropriate correction can be performed by performing color fog correction processing (S20) after lightness / saturation correction processing (S16). Also, food images are often covered with colors due to the effects of room lighting and the like. For this reason, as shown in FIG. 6, an appropriate determination can be performed by performing the food determination process (S22) after the color covering correction process (S20). Further, when the color correction is performed after the edge correction is performed, the brightness and the saturation are emphasized with respect to the image with the increased roughness, so that a tone jump and an increase in noise may be remarkable. For this reason, as shown in FIG. 6, the edge correction process (S28) is performed locally after the correction related to the entire color is completed, whereby appropriate correction can be performed.

次に、携帯端末2(コンピュータ)を画像処理装置1として機能させるための画像処理プログラムを説明する。   Next, an image processing program for causing the portable terminal 2 (computer) to function as the image processing apparatus 1 will be described.

画像処理プログラムは、メインモジュール、入力モジュール及び演算処理モジュールを備えている。メインモジュールは、画像処理を統括的に制御する部分である。入力モジュールは、入力画像を取得するように携帯端末2を動作させる。演算処理モジュールは、明度・彩度補正モジュール、色被り補正モジュール、食べ物判定モジュール、食べ物補正モジュール、エッジ補正モジュール及びノイズ補正モジュールを備えている。メインモジュール、入力モジュール及び演算処理モジュールを実行させることにより実現される機能は、上述した画像処理装置1の明度・彩度補正部12、色被り補正部13、食べ物判定部14、食べ物補正部15、エッジ補正部16及びノイズ補正部17の機能とそれぞれ同様である。   The image processing program includes a main module, an input module, and an arithmetic processing module. The main module is a part that comprehensively controls image processing. The input module operates the mobile terminal 2 so as to acquire an input image. The arithmetic processing module includes a lightness / saturation correction module, a color fog correction module, a food determination module, a food correction module, an edge correction module, and a noise correction module. Functions realized by executing the main module, the input module, and the arithmetic processing module are the lightness / saturation correction unit 12, the color fog correction unit 13, the food determination unit 14, and the food correction unit 15 of the image processing apparatus 1 described above. The functions of the edge correction unit 16 and the noise correction unit 17 are the same.

画像処理プログラムは、例えば、ROM等の記憶媒体または半導体メモリによって提供される。また、画像処理プログラムは、データ信号としてネットワークを介して提供されてもよい。   The image processing program is provided by a storage medium such as a ROM or a semiconductor memory, for example. The image processing program may be provided as a data signal via a network.

以上、第1実施形態に係る画像処理装置1によれば、色被り補正部13により、画像の色被りが補正され、食べ物判定部14により、色被り補正後の画像の被写体に食べ物が含まれているか否かが判定され、被写体に食べ物が含まれていると判定された場合には、食べ物補正部15により、色被り補正後の画像の色成分が補正される。このように、色被りに関する画質と食べ物に関する画質とを同時に向上させる場合には、被写体に食べ物が含まれているか否か判定する必要があるところ、食べ物に関しては色被りしているシーンが一般的に多いため、その判定の前に色被り補正を行うことで、食べ物判定の精度を向上させることができる。よって、食べ物補正をした後に色被り補正をする場合に比べて画質を向上させることが可能となる。   As described above, according to the image processing apparatus 1 according to the first embodiment, the color covering correction unit 13 corrects the color covering of the image, and the food determination unit 14 includes food in the image subject after the color covering correction. When it is determined that the subject contains food, the food correction unit 15 corrects the color component of the image after color covering correction. In this way, when improving the image quality related to color covering and the image quality related to food at the same time, it is necessary to determine whether or not the subject contains food. Therefore, the accuracy of food determination can be improved by performing color coverage correction before the determination. Therefore, it is possible to improve the image quality as compared with the case where the color covering correction is performed after the food correction.

(第2実施形態)
第2実施形態に係る画像処理装置1は、第1実施形態に係る画像処理装置と同様に構成されている。すなわち、図1に示すように、画像処理部11が、明度・彩度補正部(明度彩度補正部)12、色被り補正部(第1色被り補正部、第2色被り補正部)13、食べ物判定部14、食べ物補正部15、エッジ補正部16及びノイズ補正部(第1ノイズ補正部、第2ノイズ補正部)17を備えている。そして、第2実施形態においては、各補正部及び判定部の動作順のみが相違する。このため、以下では、第1実施形態との相違点を中心に説明し、重複する説明は省略する。
(Second Embodiment)
The image processing apparatus 1 according to the second embodiment is configured in the same manner as the image processing apparatus according to the first embodiment. That is, as shown in FIG. 1, the image processing unit 11 includes a lightness / saturation correction unit (lightness / saturation correction unit) 12, a color fog correction unit (first color fog correction unit, second color fog correction unit) 13. , Food determination unit 14, food correction unit 15, edge correction unit 16, and noise correction unit (first noise correction unit, second noise correction unit) 17. In the second embodiment, only the operation order of each correction unit and determination unit is different. For this reason, below, it demonstrates centering around difference with 1st Embodiment, and the overlapping description is abbreviate | omitted.

図7は、画像処理装置1の動作を示すフローチャートである。図7に示す制御処理は、例えばユーザ操作によって開始ボタンがONされたタイミングで実行される。   FIG. 7 is a flowchart showing the operation of the image processing apparatus 1. The control process shown in FIG. 7 is executed, for example, when the start button is turned on by a user operation.

図7に示すように、最初に、画像入力処理から開始する(S40)。S40の処理は、図6のS10の処理と同一である。S40の処理が終了すると、ノイズレベル判定処理へ移行する(S42)。   As shown in FIG. 7, first, image input processing is started (S40). The process of S40 is the same as the process of S10 of FIG. When the process of S40 ends, the process proceeds to a noise level determination process (S42).

S42の処理では、ノイズ補正部17が、S40の処理で入力された画像のノイズのレベルを判定する。S42の処理は、図6のS12の処理と同一である。S42の処理が終了すると、ノイズ補正処理へ移行する(S44)。   In the process of S42, the noise correcting unit 17 determines the noise level of the image input in the process of S40. The process of S42 is the same as the process of S12 of FIG. When the process of S42 ends, the process proceeds to a noise correction process (S44).

S44の処理では、ノイズ補正部17がS40の処理で入力された画像のノイズの補正を行う。S44の処理は、図6のS14の処理と同一である。S44の処理が終了すると、補正結果記録処理へ移行する(S46)。   In the process of S44, the noise correction unit 17 corrects the noise of the image input in the process of S40. The process of S44 is the same as the process of S14 of FIG. When the process of S44 is completed, the process proceeds to the correction result recording process (S46).

S46の処理では、ノイズ補正部17がS44の処理でノイズ補正された画像を一時画像記録部22に記録する。S46の処理が終了すると、色被り度合い判定処理へ移行する(S48)。   In the process of S46, the noise correction unit 17 records the image whose noise has been corrected in the process of S44 in the temporary image recording unit 22. When the process of S46 is completed, the process proceeds to a color covering degree determination process (S48).

S48の処理では、色被り補正部13が、S44の処理でノイズ補正された画像の色被りの度合いを判定する。この処理は、図6のS18の処理と同一である。S48の処理が終了すると、色被り補正処理へ移行する(S50)。   In the process of S48, the color fog correction unit 13 determines the degree of color fog of the image whose noise has been corrected in the process of S44. This process is the same as the process of S18 of FIG. When the processing of S48 is completed, the process proceeds to color fog correction processing (S50).

S50の処理では、色被り補正部13が、S48の処理で判定された色被り度合いに基づいて、S44の処理でノイズ補正された画像の色被りを補正する。この処理は、図6のS20の処理と同一である。S50の処理が終了すると、食べ物判定処理へ移行する(S52)。   In the process of S50, the color fog correction unit 13 corrects the color fog of the image whose noise has been corrected in the process of S44 based on the color fog degree determined in the process of S48. This process is the same as the process of S20 of FIG. When the process of S50 ends, the process proceeds to the food determination process (S52).

S52の処理では、食べ物判定部14が、S50の処理で色被り補正された画像を用いて、被写体に食べ物が含まれるか否かを判定する。S52の処理は、図6のS22の処理と同一である。S52の処理において、被写体に食べ物が含まれていると判定された場合には、食べ物補正処理へ移行する(S54)。   In the process of S52, the food determination unit 14 determines whether or not the subject includes food using the image subjected to the color covering correction in the process of S50. The process of S52 is the same as the process of S22 of FIG. If it is determined in step S52 that the subject contains food, the process proceeds to food correction processing (S54).

S54の処理では、食べ物補正部15が、S50の処理で色被り補正された画像を補正する。S54の処理は、図6のS24の処理と同一である。S54の処理が終了すると、ノイズレベル判定処理へ移行する(S56)。   In the process of S54, the food correction unit 15 corrects the image subjected to the color covering correction in the process of S50. The process of S54 is the same as the process of S24 of FIG. When the processing of S54 is completed, the routine proceeds to noise level determination processing (S56).

S56の処理では、ノイズ補正部17が、S54の処理で食べ物補正された画像のノイズのレベルを判定する。S56の処理は、S42の処理と同一である。S56の処理が終了すると、ノイズ補正処理へ移行する(S58)。   In the process of S56, the noise correcting unit 17 determines the noise level of the image that has been food-corrected in the process of S54. The process of S56 is the same as the process of S42. When the processing of S56 is completed, the routine proceeds to noise correction processing (S58).

S58の処理では、ノイズ補正部17がS54の処理で食べ物補正された画像のノイズの補正を行う。S58の処理は、S44の処理と同一である。S58の処理が終了すると、エッジ強度判定処理へ移行する(S60)。   In the process of S58, the noise correction unit 17 corrects the noise of the image subjected to the food correction in the process of S54. The process of S58 is the same as the process of S44. When the process of S58 is completed, the process proceeds to an edge strength determination process (S60).

S60の処理では、エッジ補正部16が、S58の処理でノイズ補正された画像のエッジ強度を判定する。この処理は、図6のS26の処理と同一である。S60の処理が終了すると、エッジ強度補正処理へ移行する(S62)。   In the process of S60, the edge correction unit 16 determines the edge strength of the image whose noise has been corrected in the process of S58. This process is the same as the process of S26 of FIG. When the processing of S60 is completed, the process proceeds to edge strength correction processing (S62).

S62の処理では、エッジ補正部16が、S60の処理で算出されたエッジ強度に基づいて、S58の処理でノイズ補正された画像を補正する。S62の処理が終了すると、補正画像出力処理へ移行する(S64)。   In the process of S62, the edge correction unit 16 corrects the image whose noise has been corrected in the process of S58, based on the edge intensity calculated in the process of S60. When the process of S62 ends, the process proceeds to a corrected image output process (S64).

S64の処理では、画像処理部11が、S62の処理でエッジ補正された画像を出力する。S64の処理が終了すると、図6に示す制御処理を終了する。   In the process of S64, the image processing unit 11 outputs the image whose edge has been corrected in the process of S62. When the process of S64 ends, the control process shown in FIG. 6 ends.

一方、S52の処理において、被写体に食べ物が含まれていないと判定された場合には、補正結果入力処理へ移行する(S66)。S66の処理では、画像処理部11が、一時画像記録部22を参照し、ノイズ補正された画像を取得する。S66の処理が終了すると、明度・彩度補正処理へ移行する(S68)。   On the other hand, if it is determined in step S52 that the subject does not contain food, the process proceeds to a correction result input process (S66). In the process of S66, the image processing unit 11 refers to the temporary image recording unit 22 and acquires a noise-corrected image. When the processing of S66 is completed, the routine proceeds to lightness / saturation correction processing (S68).

S68の処理では、明度・彩度補正部12が、S66の処理で入力された画像の明度及び彩度の補正を行う。この処理は、図6のS16の処理と同一である。S68の処理が終了すると、色被り度合い判定処理へ移行する(S70)。   In the process of S68, the lightness / saturation correction unit 12 corrects the lightness and saturation of the image input in the process of S66. This process is the same as the process of S16 of FIG. When the process of S68 ends, the process proceeds to a color covering degree determination process (S70).

S70の処理では、色被り補正部13が、S66の処理で入力された画像の色被りの度合いを判定する。この処理は、S48の処理と同一である。S70の処理が終了すると、色被り補正処理へ移行する(S72)。   In the process of S70, the color fog correction unit 13 determines the degree of color fog of the image input in the process of S66. This process is the same as the process of S48. When the processing of S70 is completed, the process proceeds to color fog correction processing (S72).

S72の処理では、色被り補正部13が、S70の処理で判定された色被り度合いに基づいて、S66の処理でノイズ補正された画像の色被りを補正する。この処理は、S50の処理と同一である。S72の処理が終了すると、図6に示す制御処理を終了する。   In the process of S72, the color fog correction unit 13 corrects the color fog of the image subjected to the noise correction in the process of S66 based on the color fog degree determined in the process of S70. This process is the same as the process of S50. When the process of S72 ends, the control process shown in FIG. 6 ends.

以上で図7に示す制御処理を終了する。図7に示す制御処理を実行することで、適切な補正を行った画像を自動的に得ることができる。例えば、被写体に食べ物が含まれる場合には、コントラストが上がることにより明るさが強調され過ぎる場合がある。このため、図7に示すように、食べ物補正処理(S52)をする場合には、明度・彩度補正処理(S68)を行わないようにすることで、食べ物のコントラストを過度に強調することを回避することができる。また、これに伴って、明度・彩度補正処理の後に、色被り補正処理を行うようにするために、食べ物以外の画像の場合に、食べ物判定の精度向上を目的とした色被り補正処理の結果画像は破棄し、ノイズ補正された画像を取得し(S66)、明度・彩度補正処理(S68)、色被り補正処理(S72)を順に行うことで、適切な補正が行える。さらに、色被り補正によって白くすると、元々あったノイズが目立つ場合がある。このため、図7に示すように、色被り補正処理(S50)の後に、ノイズ補正処理(S58)を再度行うことで、適切な補正が行える。   The control process shown in FIG. By executing the control process shown in FIG. 7, an image with appropriate correction can be automatically obtained. For example, when the subject contains food, the brightness may be overemphasized due to an increase in contrast. For this reason, as shown in FIG. 7, when performing the food correction process (S52), the contrast of food is excessively emphasized by not performing the lightness / saturation correction process (S68). It can be avoided. Along with this, in order to perform color fog correction processing after lightness / saturation correction processing, in the case of an image other than food, color fog correction processing for the purpose of improving the accuracy of food determination is performed. Appropriate correction can be performed by discarding the result image, obtaining a noise-corrected image (S66), and sequentially performing lightness / saturation correction processing (S68) and color fog correction processing (S72). Furthermore, when the color is whitened by the color covering correction, the original noise may be conspicuous. Therefore, as shown in FIG. 7, appropriate correction can be performed by performing the noise correction process (S58) again after the color fog correction process (S50).

以上、第2実施形態に係る画像処理装置1によれば、第1実施形態と同様の効果を奏するとともに、補正処理の順番を変更することで、食べ物補正処理や食べ物以外の被写体の補正処理を適切に行うとともに、ノイズを低減させることができる。   As described above, according to the image processing apparatus 1 according to the second embodiment, the same effects as those of the first embodiment can be obtained, and the correction processing order can be changed to perform food correction processing or correction processing for subjects other than food. It is possible to appropriately perform and reduce noise.

なお、上述した実施形態は本発明に係る画像処理装置、画像処理方法、画像処理プログラム及び記録媒体の一例を示すものであり、実施形態に係る装置、方法、プログラム及び記録媒体に限られるものではなく、変形し、又は他のものに適用したものであってもよい。   The above-described embodiment shows an example of the image processing apparatus, the image processing method, the image processing program, and the recording medium according to the present invention, and is not limited to the apparatus, the method, the program, and the recording medium according to the embodiment. However, it may be modified or applied to others.

1…画像処理装置、10…入力部、11…画像処理部、12…明度・彩度補正部(明度彩度補正部)、13…色被り補正部(第1色被り補正部、第2色被り補正部)、14…食べ物判定部、15…食べ物補正部、16…エッジ補正部、17…ノイズ補正部(第1ノイズ補正部、第2ノイズ補正部)。   DESCRIPTION OF SYMBOLS 1 ... Image processing apparatus, 10 ... Input part, 11 ... Image processing part, 12 ... Lightness / saturation correction part (lightness saturation correction part), 13 ... Color fog correction part (1st color fog correction part, 2nd color) (Covering correction unit), 14 ... food determination unit, 15 ... food correction unit, 16 ... edge correction unit, 17 ... noise correction unit (first noise correction unit, second noise correction unit).

Claims (19)

画像を補正する画像処理装置であって、
前記画像を入力する入力部と、
前記画像の色被りを補正する第1色被り補正部と、
前記第1色被り補正部により補正された後の前記画像の被写体に食べ物が含まれているか否かを判定する食べ物判定部と、
前記食べ物判定部により被写体に食べ物が含まれていると判定された場合には、前記第1色被り補正部により補正された後の前記画像の色成分を補正する食べ物補正部と、
を備える画像処理装置。
An image processing apparatus for correcting an image,
An input unit for inputting the image;
A first color covering correction unit for correcting the color covering of the image;
A food determination unit for determining whether food is included in the subject of the image after being corrected by the first color covering correction unit;
A food correction unit that corrects the color components of the image after correction by the first color covering correction unit when the food determination unit determines that the subject contains food;
An image processing apparatus comprising:
前記食べ物判定部は、教師画像を用いた学習によって食べ物の特徴を予め取得し、前記第1色被り補正部により補正された後の前記画像の特徴と、学習により得られた食べ物の特徴とを比較することで、前記第1色被り補正部により補正された後の前記画像の被写体に食べ物が含まれているか否かを判定する請求項1に記載の画像処理装置。   The food determination unit obtains food characteristics in advance by learning using a teacher image, the image characteristics after being corrected by the first color covering correction unit, and the food characteristics obtained by learning. The image processing apparatus according to claim 1, wherein the image processing apparatus determines whether food is included in the subject of the image after being corrected by the first color covering correction unit by comparing. 前記食べ物補正部は、各画素の明度を一定の比率で強調する請求項1又は2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the food correction unit emphasizes the brightness of each pixel at a certain ratio. 前記食べ物補正部は、暖色系の色相の画素の彩度が非暖色系の色相の画素の彩度よりも強調されるように重み付けして各画素の彩度を補正する請求項1〜3の何れか一項に記載の画像処理装置。   The food correction unit corrects the saturation of each pixel by weighting so that the saturation of a pixel having a warm hue is emphasized more than the saturation of a pixel having a non-warm hue. The image processing apparatus according to any one of the above. 前記第1色被り補正部は、輝度値が所定値以上であり、かつ、当該輝度値に対する色差値の比率が所定値以下である画素の色が白であると判定して色被りの度合いを推定する請求項1〜4の何れか一項に記載の画像処理装置。   The first color covering correction unit determines that the color of a pixel whose luminance value is equal to or greater than a predetermined value and whose ratio of the color difference value to the luminance value is equal to or smaller than the predetermined value is white, and determines the degree of color covering The image processing device according to claim 1, wherein the image processing device is estimated. 前記入力部により入力された前記画像のノイズを補正する第1ノイズ補正部を更に備え、
前記第1色被り補正部は、前記第1ノイズ補正部により補正された後の前記画像の色被りを補正する請求項1〜5の何れか一項に記載の画像処理装置。
A first noise correction unit that corrects noise of the image input by the input unit;
The image processing apparatus according to claim 1, wherein the first color fog correction unit corrects the color fog of the image after being corrected by the first noise correction unit.
前記第1ノイズ補正部は、前記入力部により入力された前記画像のノイズを補正した後に、各画素のビットを拡張する請求項6に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein the first noise correction unit expands a bit of each pixel after correcting the noise of the image input by the input unit. 前記第1ノイズ補正部は、補正対象の画素の色成分と、当該補正対象の画素と隣接する画素の色成分との間の相関に基づいて、ノイズの補正強度を設定する請求項6又は7に記載の画像処理装置。   The first noise correction unit sets a noise correction intensity based on a correlation between a color component of a correction target pixel and a color component of a pixel adjacent to the correction target pixel. An image processing apparatus according to 1. 前記第1ノイズ補正部により補正された後の前記画像の明度又は彩度を補正する明度彩度補正部を更に備え、
前記第1色被り補正部は、前記明度彩度補正部により補正された後の前記画像の色被りを補正する請求項6〜8の何れか一項に記載の画像処理装置。
A lightness / saturation correction unit that corrects the lightness or saturation of the image after being corrected by the first noise correction unit;
The image processing apparatus according to claim 6, wherein the first color covering correction unit corrects the color covering of the image after being corrected by the lightness / saturation correcting unit.
前記食べ物判定部により被写体に食べ物が含まれていないと判定された場合には、前記第1ノイズ補正部により補正された後の前記画像の明度又は彩度を補正する明度彩度補正部と、
前記明度彩度補正部により補正された後の前記画像の色被りを補正する第2色被り補正部と、
を更に備える請求項6〜8の何れか一項に記載の画像処理装置。
A brightness saturation correction unit that corrects the brightness or saturation of the image after being corrected by the first noise correction unit when the food determination unit determines that the subject does not contain food;
A second color fog correction unit that corrects the color fog of the image after being corrected by the lightness saturation correction unit;
The image processing apparatus according to any one of claims 6 to 8, further comprising:
前記明度彩度補正部は、前記画像の色空間におけるヒストグラムを用いたトーンカーブに基づいて明度を補正する請求項9又は10に記載の画像処理装置。   The image processing apparatus according to claim 9, wherein the lightness saturation correction unit corrects the lightness based on a tone curve using a histogram in a color space of the image. 前記明度彩度補正部は、明度の補正量を係数として彩度の補正を行う請求項11に記載の画像処理装置。   The image processing apparatus according to claim 11, wherein the lightness saturation correction unit performs saturation correction using a lightness correction amount as a coefficient. 前記明度彩度補正部は、所定の基準値との差分基づいて彩度補正の強度を変更する請求項9〜11の何れか一項に記載の画像処理装置。   The image processing apparatus according to claim 9, wherein the lightness saturation correction unit changes the intensity of saturation correction based on a difference from a predetermined reference value. 前記食べ物補正部により補正された後の前記画像のエッジを補正するエッジ補正部を更に備える請求項1〜13の何れか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, further comprising an edge correction unit that corrects an edge of the image after being corrected by the food correction unit. 前記エッジ補正部は、補正対象の画素の輝度値と、当該補正対象の画素を含む所定領域に含まれる画素の輝度値との差に基づいて、エッジ強度を設定する請求項14に記載の画像処理装置。   The image according to claim 14, wherein the edge correction unit sets the edge strength based on a difference between a luminance value of a pixel to be corrected and a luminance value of a pixel included in a predetermined area including the correction target pixel. Processing equipment. 前記食べ物補正部により補正された後の前記画像のノイズを補正する第2ノイズ補正部を更に備え、
前記エッジ補正部は、前記第2ノイズ補正部により補正された後の前記画像のエッジを補正する請求項14又は15に記載の画像処理装置。
A second noise correction unit for correcting noise of the image after correction by the food correction unit;
The image processing apparatus according to claim 14, wherein the edge correction unit corrects an edge of the image after being corrected by the second noise correction unit.
画像を補正する画像処理方法であって、
前記画像を入力する入力ステップと、
前記画像の色被りを補正する第1色被り補正ステップと、
前記第1色被り補正ステップにより補正された後の前記画像の被写体に食べ物が含まれているか否かを判定する食べ物判定ステップと、
前記食べ物判定ステップにより被写体に食べ物が含まれていると判定された場合には、前記第1色被り補正ステップにより補正された後の前記画像の色成分を補正する食べ物補正ステップと、
を備える画像処理方法。
An image processing method for correcting an image,
An input step for inputting the image;
A first color covering correction step for correcting the color covering of the image;
A food determination step of determining whether food is included in the subject of the image after being corrected by the first color covering correction step;
A food correction step of correcting the color component of the image after being corrected by the first color covering correction step when the food determination step determines that the subject contains food;
An image processing method comprising:
画像を補正するようにコンピュータを動作させる画像処理プログラムであって、
前記画像を入力する入力部、
前記画像の色被りを補正する第1色被り補正部、
前記第1色被り補正部により補正された後の前記画像の被写体に食べ物が含まれているか否かを判定する食べ物判定部、及び、
前記食べ物判定部により被写体に食べ物が含まれていると判定された場合には、前記第1色被り補正部により補正された後の前記画像の色成分を補正する食べ物補正部
として前記コンピュータを動作させる画像処理プログラム。
An image processing program for operating a computer to correct an image,
An input unit for inputting the image;
A first color covering correction unit for correcting the color covering of the image;
A food determination unit for determining whether food is included in the subject of the image after being corrected by the first color covering correction unit; and
When the food determination unit determines that the subject contains food, the computer is operated as a food correction unit that corrects the color component of the image after correction by the first color covering correction unit. An image processing program to be executed.
画像を補正するようにコンピュータを動作させる画像処理プログラムが記録されたコンピュータ読み取り可能な記録媒体であって、
前記画像を入力する入力部、
前記画像の色被りを補正する第1色被り補正部、
前記第1色被り補正部により補正された後の前記画像の被写体に食べ物が含まれているか否かを判定する食べ物判定部、及び、
前記食べ物判定部により被写体に食べ物が含まれていると判定された場合には、前記第1色被り補正部により補正された後の前記画像の色成分を補正する食べ物補正部
として前記コンピュータを動作させる画像処理プログラムが記録された記録媒体。
A computer-readable recording medium on which an image processing program for operating a computer to correct an image is recorded,
An input unit for inputting the image;
A first color covering correction unit for correcting the color covering of the image;
A food determination unit for determining whether food is included in the subject of the image after being corrected by the first color covering correction unit; and
When the food determination unit determines that the subject contains food, the computer is operated as a food correction unit that corrects the color component of the image after correction by the first color covering correction unit. A recording medium on which an image processing program to be recorded is recorded.
JP2013025600A 2013-02-13 2013-02-13 Image processing apparatus, method, and program, and recording medium Pending JP2014155167A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013025600A JP2014155167A (en) 2013-02-13 2013-02-13 Image processing apparatus, method, and program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013025600A JP2014155167A (en) 2013-02-13 2013-02-13 Image processing apparatus, method, and program, and recording medium

Publications (1)

Publication Number Publication Date
JP2014155167A true JP2014155167A (en) 2014-08-25

Family

ID=51576601

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013025600A Pending JP2014155167A (en) 2013-02-13 2013-02-13 Image processing apparatus, method, and program, and recording medium

Country Status (1)

Country Link
JP (1) JP2014155167A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170030334A (en) * 2015-09-09 2017-03-17 연세대학교 산학협력단 Apparatus and Method of Enhancing Visual Flavor of Food Image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170030334A (en) * 2015-09-09 2017-03-17 연세대학교 산학협력단 Apparatus and Method of Enhancing Visual Flavor of Food Image
KR101718085B1 (en) * 2015-09-09 2017-03-20 연세대학교 산학협력단 Apparatus and Method of Enhancing Visual Flavor of Food Image

Similar Documents

Publication Publication Date Title
JP5157753B2 (en) Image processing apparatus, image processing method, and image processing program
US9838658B2 (en) Image processing apparatus that performs tone correction, image processing method, and storage medium
US10382674B2 (en) Reference image selection for motion ghost filtering
US8731322B2 (en) Image brightness controlling apparatus and method thereof
JP5136665B2 (en) Image processing apparatus and program
KR100916073B1 (en) Apparatus and method of stretching histogram for enhancing contrast of image
JP6415062B2 (en) Image processing apparatus, image processing method, control program, and recording medium
US9240037B2 (en) Image processing apparatus and image processing method
JPWO2006137361A1 (en) Image processing apparatus, image processing method, image processing program product, and imaging apparatus
JP2008104009A (en) Imaging apparatus and method
JP4639037B2 (en) Image processing method and apparatus
KR20120016475A (en) Image processing method and image processing apparatus
JP2010130299A (en) Image signal processing apparatus and method, and program
US20170094242A1 (en) Image processing apparatus, image processing method, and storage medium
JP2006217277A (en) Imaging device
US9565412B2 (en) Image processing apparatus that develops photographed data, image processing method, and recording medium
US11810281B2 (en) Image processing apparatus, image processing method, and storage medium
JP5142833B2 (en) Image processing apparatus and image processing method
JP2017223823A (en) Image processor, image processing program, and image processing method
JP2008219289A (en) Video correction device, video display device, imaging apparatus and video correction program
JP2014155167A (en) Image processing apparatus, method, and program, and recording medium
JP5745482B2 (en) Image processing apparatus, image display apparatus, image imaging apparatus, image printing apparatus, gradation conversion method, and program
KR101872015B1 (en) Apparatus and method for generating infrared image
JP5535443B2 (en) Image processing device
JP2004235700A (en) Image processing apparatus, image processing method, and program therefor