JP6650975B2 - Image processing apparatus and method - Google Patents

Image processing apparatus and method Download PDF

Info

Publication number
JP6650975B2
JP6650975B2 JP2018154202A JP2018154202A JP6650975B2 JP 6650975 B2 JP6650975 B2 JP 6650975B2 JP 2018154202 A JP2018154202 A JP 2018154202A JP 2018154202 A JP2018154202 A JP 2018154202A JP 6650975 B2 JP6650975 B2 JP 6650975B2
Authority
JP
Japan
Prior art keywords
color
image data
extraction
image
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018154202A
Other languages
Japanese (ja)
Other versions
JP2018174596A (en
Inventor
利幸 石井
利幸 石井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2018154202A priority Critical patent/JP6650975B2/en
Publication of JP2018174596A publication Critical patent/JP2018174596A/en
Application granted granted Critical
Publication of JP6650975B2 publication Critical patent/JP6650975B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Color Image Communication Systems (AREA)

Description

本発明は、画像の撮影時の光源の違いを補正する画像処理に関する。   The present invention relates to image processing for correcting a difference in light source when capturing an image.

観察光源と異なる撮影光源の下で撮影された画像の色を、観察光源の下で撮影された画像の色とマッチさせる場合、撮影光源下の色データを観察光源下の色データに変換する光源変換処理を行う。光源変換処理を行うために色補正条件を算出するが、金属光沢のような光沢を含む被写体の色補正条件を算出する場合、次の問題がある。   A light source that converts color data under a shooting light source into color data under a viewing light source when matching the color of an image captured under a shooting light source different from the viewing light source with the color of an image captured under the viewing light source. Perform conversion processing. The color correction condition is calculated to perform the light source conversion process. However, when calculating the color correction condition of a subject having gloss such as metallic gloss, there is the following problem.

光沢部は撮影条件に依存して色の変化が大きく、光沢部の撮影データを用いて光源変換処理の色補正条件を算出すると高精度な色補正条件が得られない。   The glossy portion has a large color change depending on the photographing conditions, and if the color correction conditions for the light source conversion processing are calculated using the photographed data of the glossy portion, a highly accurate color correction condition cannot be obtained.

特許文献1は、光源の違いを補正するわけではないが、色空間変換用の色補正条件の算出方法を記載する。特許文献1の算出方法によれば、カラーチャートを撮影して得たRGB信号値と、カラーチャートの測色値から求めた目標RGB信号値を一致させるための色変換マトリクスが最小二乗法によって算出される。   Patent Document 1 describes a method for calculating a color correction condition for color space conversion, which does not necessarily correct the difference between light sources. According to the calculation method of Patent Document 1, a color conversion matrix for matching an RGB signal value obtained by photographing a color chart with a target RGB signal value obtained from colorimetric values of the color chart is calculated by the least square method. Is done.

また、特許文献2は、原稿に金属光沢部が含まれるか否かの判定方法を記載する。特許文献2の判定方法によれば、通常の状態で原稿をスキャンした画像と、金属光沢部の反射光を増加させた状態で原稿をスキャンした画像の二種類の画像を取得する。そして、それら画像間の差分を算出して閾値と比較することで、原稿に金属光沢部が含まれるか否かを判定する。   Patent Document 2 describes a method for determining whether or not a document contains a metallic glossy portion. According to the determination method of Patent Literature 2, two types of images are acquired: an image obtained by scanning a document in a normal state, and an image obtained by scanning a document in a state in which reflected light from a metallic gloss portion is increased. Then, by calculating the difference between the images and comparing the difference with a threshold value, it is determined whether or not the original includes a metallic glossy portion.

特許文献2の判定方法は、異なるスキャン条件によって取得した二種類の画像間の差分に基づく判別を行うが、光源の違いに依存して色が大きく変化する領域があると、本来検出すべきではない領域を金属光沢領域と誤判定する可能性がある。言い替えれば、二種類の画像間の差分を用いた閾値判定のみでは、高精度な光源変換処理の色補正条件に必要な色値を適切に抽出することができない。   The determination method of Patent Document 2 performs determination based on the difference between two types of images acquired under different scan conditions.However, if there is an area where the color greatly changes depending on the difference in light source, it should not be originally detected. There is a possibility that a non-existent area is erroneously determined as a metallic glossy area. In other words, it is not possible to properly extract the color values required for the color correction conditions of the high-precision light source conversion processing only by the threshold value determination using the difference between the two types of images.

特開2005-79834号公報JP 2005-79834 A 特許第4024737号公報Patent No. 4024737

本発明は、撮影画像に適した光源変換処理用の色補正条件を高精度に生成することを目的とする。   An object of the present invention is to generate a color correction condition for a light source conversion process suitable for a captured image with high accuracy.

本発明は、前記の目的を達成する一手段として、以下の構成を備える。   The present invention has the following configuration as one means for achieving the above object.

本願発明にかかる画像処理装置は、第一の照明条件で被写体を撮影した第一の画像データ、および、前記第一の照明条件と異なる第二の照明条件で前記被写体を撮影した第二の画像データを入力する入力手段と、前記第一の画像データの各領域から色データを抽出し、前記第一の画像データの各領域に対応する前記第二の画像データの各領域から色データを抽出する抽出手段と、前記第一の画像データの領域から抽出された色データと、前記第二の画像データの対応する領域から抽出された色データとの間の相関係数を算出し、前記相関係数が所定の第一の閾値を超える抽出対象領域から抽出された色データを前記第一の画像データの代表色および前記第二の画像データの代表色に設定する解析手段と、前記第一の画像データの代表色および前記第二の画像データの代表色を用いて前記第一の照明条件に依存する前記第一の画像データを前記第二の照明条件に依存する画像データに変換するための色補正条件を作成する作成手段と、前記色補正条件を用いて、前記第一の画像データに光源変換処理を施す変換手段と、を有する。 The image processing apparatus according to the present invention includes a first image data obtained by shooting an object under a first lighting condition, and a second image obtained by shooting the object under a second lighting condition different from the first lighting condition. Input means for inputting data; extracting color data from each area of the first image data; extracting color data from each area of the second image data corresponding to each area of the first image data Extracting means for calculating a correlation coefficient between the color data extracted from the area of the first image data and the color data extracted from the corresponding area of the second image data, Analyzing means for setting the color data extracted from the extraction target area whose relation number exceeds a predetermined first threshold value as the representative color of the first image data and the representative color of the second image data; and Representative color of the image data of Using the representative color of the second image data, create a color correction condition for converting the first image data depending on the first lighting condition into image data depending on the second lighting condition. It has a creation means, with reference to the color correction conditions, and converting means for performing a light source conversion process on the first image data.

本発明によれば、撮影画像に適した光源変換処理用の色補正条件を高精度に生成することができる。   According to the present invention, a color correction condition for a light source conversion process suitable for a captured image can be generated with high accuracy.

本発明にかかる画像処理装置を文化財や絵画の複製に適用した際の処理の概要を説明する図。The figure explaining the outline | summary of the process at the time of applying the image processing apparatus concerning this invention to reproduction of a cultural property or a painting. 撮影光源画像および観察光源画像の撮影の概要を説明する図。The figure explaining the outline | summary of imaging | photography of a photography light source image and an observation light source image. 実施例の画像処理装置の構成例を説明するブロック図。FIG. 1 is a block diagram illustrating a configuration example of an image processing apparatus according to an embodiment. 画像処理装置が実行する光源変換処理を説明するフローチャート。5 is a flowchart illustrating a light source conversion process performed by the image processing apparatus. UIの一例を示す図。The figure which shows an example of UI. 抽出色追加ウィンドウの一例を示す図。The figure which shows an example of an extraction color addition window. 色データの抽出処理を説明するフローチャート。9 is a flowchart for explaining color data extraction processing. 抽出位置の決定処理を説明するフローチャート。5 is a flowchart illustrating a process of determining an extraction position. 色抽出ファイルの更新を説明する図。The figure explaining the update of a color extraction file. 抽出範囲の決定処理を説明するフローチャート。9 is a flowchart illustrating a process of determining an extraction range. 抽出範囲が記録された色抽出ファイルを説明する図。The figure explaining the color extraction file in which the extraction range was recorded. 色データの抽出処理を説明するフローチャート。9 is a flowchart for explaining color data extraction processing. 相関の解析処理を説明するフローチャート。9 is a flowchart illustrating a correlation analysis process. 光源変換処理を説明するフローチャート。9 is a flowchart illustrating a light source conversion process. 実施例2における差分の解析処理を説明するフローチャート。9 is a flowchart illustrating a difference analysis process according to the second embodiment.

[光源変換処理の概要]
まず、光源変換処理の代表的な適用先である文化財複製の事例を説明する。一般に、文化財の複製は、文化財をディジタルカメラで撮影し、撮影画像をプリンタで出力することにより行われる。文化財の複製物は、当該文化財が展示されている観察光源下において本物と同等の色を再現することが要求されるため、撮影は観察光源下で行うことが望ましい。
[Outline of light source conversion processing]
First, a description will be given of a case of cultural property duplication, which is a typical application destination of the light source conversion processing. Generally, reproduction of cultural properties is performed by photographing cultural properties with a digital camera and outputting a photographed image with a printer. Since reproduction of a cultural property is required to reproduce the same color as the real thing under the observation light source where the cultural property is displayed, it is desirable to perform photographing under the observation light source.

しかし、観察光源では照度が不足することが多く、観察光源下でディジタルカメラにより文化財を撮影すると、撮影画像にノイズが発生することがあり、エレクトロニックフラッシュ(以下、フラッシュ)を発光させる撮影が行われる。そのため、撮影した画像(以下、撮影光源画像)の色を、観察光源の下で観察される画像(以下、観察光源画像)と同等の色に変換する光源変換処理が必要になる。従って、光源変換処理用のパラメータは、撮影光源画像を観察光源画像と同等の画像に変換するように作成される。   However, the illuminance is often insufficient with the observation light source, and when photographing cultural assets with a digital camera under the observation light source, noise may be generated in the photographed image. Will be Therefore, light source conversion processing for converting the color of a captured image (hereinafter referred to as a photographing light source image) into a color equivalent to an image observed under the observation light source (hereinafter referred to as an observation light source image) is required. Therefore, the parameters for the light source conversion process are created so as to convert the photographing light source image into an image equivalent to the observation light source image.

図1により本発明にかかる画像処理装置を文化財や絵画の複製に適用した際の処理の概要を説明する。   An outline of processing when the image processing apparatus according to the present invention is applied to reproduction of a cultural property or a painting will be described with reference to FIG.

画像処理装置101は、文化財や絵画の原作(以下、原作)をフラッシュ1011を発光させて撮影した撮影光源画像1001を入力する。そして、撮影光源画像1001に光源変換処理1014を施して、実際に複製品を観察する観察光源1012の下で原作を撮影した観察光源画像1002と同等の色を有する補正画像1003を出力する。   The image processing apparatus 101 inputs a photographing light source image 1001 obtained by photographing an original (hereinafter, an original) of a cultural property or a painting by emitting a flash 1011. Then, a light source conversion process 1014 is performed on the photographed light source image 1001 to output a corrected image 1003 having the same color as the observation light source image 1002 obtained by photographing the original under the observation light source 1012 for actually observing the duplicate.

補正画像1003にプリンタ用の色変換1016を施した色変換画像1004をプリント出力1017して複製品1005が生成される。複製品1005には、ノイズの少ない高精細な画像、かつ、原作が置かれている観察光源1012の下で原作と同じ色を再現することが要求されるため、光源変換処理1014が必要である。   A color conversion image 1004 obtained by applying a printer color conversion 1016 to the corrected image 1003 is printed out 1017 to generate a duplicate product 1005. The duplicate 1005 is required to have a high-definition image with little noise and to reproduce the same color as the original under the observation light source 1012 where the original is placed, so the light source conversion processing 1014 is required .

図2により撮影光源画像1001および観察光源画像1002の撮影の概要を説明する。   The outline of photographing of the photographing light source image 1001 and the observation light source image 1002 will be described with reference to FIG.

図2(A)に示すように、被写体である原作1021の周囲に複数のフラッシュ1011を配置して光量を充分に確保して撮影を行い、高精細な撮影光源画像1001が取得される。一方、図2(B)に示すように、原作1021とカメラ1016の位置関係を撮影光源画像1001の撮影時と同一にした上で、観察光源1012の下で撮影を行うことによって、観察光源画像1002が取得される。   As shown in FIG. 2 (A), a plurality of flashes 1011 are arranged around an original 1021, which is a subject, and a sufficient amount of light is secured for photographing, and a high-definition photographing light source image 1001 is obtained. On the other hand, as shown in FIG.2 (B), by making the positional relationship between the original 1021 and the camera 1016 the same as when the shooting light source image 1001 was shot, and shooting under the viewing light source 1012, 1002 is obtained.

そして、撮影光源画像1001と観察光源画像1002から色抽出1013が行われ、色補正係数算出1015によって得られる色補正条件を用いることで、高精度な光源変換処理1014が可能になる。その結果、観察光源1012の下で原作1021と同じ色を再現する複製品1005が得られる。   Then, color extraction 1013 is performed from the photographing light source image 1001 and the observation light source image 1002, and by using the color correction conditions obtained by the color correction coefficient calculation 1015, highly accurate light source conversion processing 1014 becomes possible. As a result, a reproduction 1005 that reproduces the same color as the original 1021 under the observation light source 1012 is obtained.

以下、本発明にかかる実施例の画像処理を図面を参照して詳細に説明する。なお、以下では、光源変換処理1014を高精度に行うために、詳細は後述するが、次のように色補正条件を作成する。撮影光源画像1001と観察光源画像1002を取得し、それら画像から、色抽出1013に関する処理によって代表的な色を抽出し、抽出した色の対応関係を解析し、解析結果に基づき色補正係数算出1015において色補正条件を作成する。   Hereinafter, image processing according to an embodiment of the present invention will be described in detail with reference to the drawings. In the following, in order to perform the light source conversion processing 1014 with high accuracy, color correction conditions are created as described below, as will be described later in detail. A photographing light source image 1001 and an observation light source image 1002 are obtained, a representative color is extracted from the images by a process related to color extraction 1013, the correspondence between the extracted colors is analyzed, and a color correction coefficient calculation 1015 is performed based on the analysis result. Creates a color correction condition.

図3のブロック図により実施例の画像処理装置101の構成例を説明する。   An example of the configuration of the image processing apparatus 101 according to the embodiment will be described with reference to the block diagram of FIG.

中央処理装置(CPU)112は、メモリ110をワークメモリとして、装置全体の制御を行うとともに、メモリ110に格納されたプログラムを実行して後述する画像処理を実現する。なお、メモリ110は、後述する画像処理のプログラムや各種データを格納するROMやハードディスクドライブ(HDD)やソリッドステートドライブ(SSD)などの不揮発性メモリ、および、ワークメモリとして使用されるRAMを備える。   A central processing unit (CPU) 112 uses the memory 110 as a work memory to control the entire apparatus, and executes a program stored in the memory 110 to implement image processing described later. The memory 110 includes a ROM for storing an image processing program and various data described later, a nonvolatile memory such as a hard disk drive (HDD) and a solid state drive (SSD), and a RAM used as a work memory.

CPU112は、例えばタッチパネルであるUI部109にユーザ指示を入力するためのユーザインタフェイス(UI)を提供する。そして、USBインタフェイスなどの入出力部103を制御して、例えばメモリカードのような記録媒体である画像データ保持部102から、ユーザ指示に従い照明条件が異なる二つの撮影画像の画像データを入力する。なお、二つの撮影画像の一方は撮影光源画像1001であり、他方は観察光源画像1002である。   The CPU 112 provides a user interface (UI) for inputting a user instruction to the UI unit 109, for example, a touch panel. Then, the input / output unit 103 such as a USB interface is controlled to input image data of two captured images having different illumination conditions according to a user instruction from the image data holding unit 102 which is a recording medium such as a memory card. . Note that one of the two captured images is a captured light source image 1001 and the other is an observation light source image 1002.

抽出位置決定部104は、撮影画像において、色データを抽出する画像位置を決定する。抽出範囲決定部105は、撮影画像から色データを抽出する際の撮影画像上の範囲を決定する。色抽出部106は、撮影画像の画像データから、決定された位置および範囲の色データを抽出する。相関解析部107は、撮影画像から抽出された色データに基づき、二つの撮影画像の間の相関を解析する。なお、CPU112は、抽出された色データの解析結果をUIに表示する。また、色補正部108は、撮影画像の画像データに色補正を施す。   The extraction position determination unit 104 determines an image position from which color data is extracted in the captured image. The extraction range determination unit 105 determines a range on a captured image when color data is extracted from the captured image. The color extraction unit 106 extracts color data of the determined position and range from the image data of the captured image. The correlation analysis unit 107 analyzes the correlation between the two captured images based on the color data extracted from the captured images. Note that the CPU 112 displays the analysis result of the extracted color data on the UI. Further, the color correction unit 108 performs color correction on the image data of the captured image.

上記の構成(抽出位置決定部104、抽出範囲決定部105、色抽出部106、相関解析部107、色補正部108)は、その機能を実現するプログラムをコンピュータ装置に供給し、CPU112が当該プログラムを実行することにより実現される。あるいは、上記の構成をハードウェアとして画像処理装置101に組み込み、CPU112がそれら構成の動作を制御することで後述する画像処理が実現されてもよい。   The above configuration (the extraction position determination unit 104, the extraction range determination unit 105, the color extraction unit 106, the correlation analysis unit 107, and the color correction unit 108) supplies a program that realizes its function to a computer device, and the CPU 112 Is implemented. Alternatively, the above-described configuration may be incorporated as hardware into the image processing apparatus 101, and the CPU 112 controls the operation of the configuration to realize image processing described later.

●光源変換処理
図4のフローチャートにより画像処理装置101が実行する光源変換処理を説明する。
Light Source Conversion Process The light source conversion process executed by the image processing apparatus 101 will be described with reference to the flowchart of FIG.

CPU112は、画像処理に必要な情報を示すユーザ指示を入力するためのUIをUI部109に表示する(S11)。   The CPU 112 displays a UI for inputting a user instruction indicating information necessary for image processing on the UI unit 109 (S11).

図5によりUIの一例を示す。入力部301は撮影光源画像1001の画像データを指示するための入力部、入力部303は観察光源画像1002の画像データを指示するための入力部である。画像表示部302は入力部301の指示に従い入力された撮影光源画像1001を表示し、画像表示部304は入力部303の指示に従い入力された観察光源画像1002を表示する。また、入力部308は、補正画像1003の画像データを保存する際のファイル名を指示するための入力部である。   FIG. 5 shows an example of the UI. The input unit 301 is an input unit for instructing image data of the photographing light source image 1001, and the input unit 303 is an input unit for instructing image data of the observation light source image 1002. The image display unit 302 displays the captured light source image 1001 input according to the instruction of the input unit 301, and the image display unit 304 displays the observation light source image 1002 input according to the instruction of the input unit 303. The input unit 308 is an input unit for specifying a file name when saving the image data of the corrected image 1003.

画像表示部302、304は、画像を複数の領域に分割した状態の画像を表示する。なお、図5には、画像を3×3の領域に分割した分割画像を表示するUI例を示すが、縦横の分割数は任意である。   The image display units 302 and 304 display images in a state where the image is divided into a plurality of regions. Although FIG. 5 shows an example of a UI for displaying a divided image obtained by dividing an image into 3 × 3 areas, the number of vertical and horizontal divisions is arbitrary.

UIには、抽出対象選択ボタン305、色抽出処理を指示する色抽出ボタン306、色補正係数作成ボタン307、色補正係数を用いる色補正処理の実行を指示する光源変換ボタン309などが備わる。なお、各ボタンが押された場合の処理の詳細は後述する。   The UI includes an extraction target selection button 305, a color extraction button 306 for instructing color extraction processing, a color correction coefficient creation button 307, a light source conversion button 309 for instructing execution of color correction processing using color correction coefficients, and the like. The details of the processing when each button is pressed will be described later.

入力部301、302にファイル名が入力されると、CPU112は、それらファイル名に基づき、入出力部103を介して画像データ保持部102から撮影光源画像1001の画像データと観察光源画像1002の画像データを取得する(S12)。なお、取得された画像データはメモリ110の所定領域に格納される。   When the file names are input to the input units 301 and 302, the CPU 112 outputs the image data of the photographing light source image 1001 and the image of the observation light source image 1002 from the image data holding unit 102 via the input / output unit 103 based on the file names. Data is acquired (S12). The acquired image data is stored in a predetermined area of the memory 110.

撮影光源画像1001と観察光源画像1002は、図2に示すように、原作1021とカメラ1016の位置関係を同一にして、フラッシュ1011を発光させる第一の照明条件と、観察光源1012による第二の照明条件で撮影された画像である。なお、観察光源1012は、例えば、天井や壁など所定の位置に固定された蛍光灯やスポットライトなどの光源である。なお、第一の照明条件は、第二の照明条件よりも大きな光量が得られればよく、第二の照明条件に、さらにフラッシュ1011の発光を加えて第一の照明条件としてもよい。つまり、図2(A)に示す第一の照明条件における撮影には、観察光源1012があってもよいし、なくても構わない。   As shown in FIG. 2, the photographing light source image 1001 and the observation light source image 1002 have the same positional relationship between the original 1021 and the camera 1016, and the first illumination condition for emitting the flash 1011 and the second illumination light source 1012 It is an image taken under lighting conditions. The observation light source 1012 is, for example, a light source such as a fluorescent lamp or a spotlight fixed at a predetermined position such as a ceiling or a wall. Note that the first lighting condition only needs to obtain a larger amount of light than the second lighting condition, and the first lighting condition may be obtained by further adding light emission of the flash 1011 to the second lighting condition. That is, the imaging under the first illumination condition shown in FIG. 2A may or may not include the observation light source 1012.

次に、CPU112は、詳細は後述するが、各分割画像に対応する撮影光源画像1001の領域と観察光源画像1002の領域から色データを抽出する(S13)。そして、抽出した色データに基づき、それら領域の間の相関を解析し、撮影光源画像1001の代表色と観察光源画像1002の代表色を設定する(S14)。   Next, although details will be described later, the CPU 112 extracts color data from the area of the photographing light source image 1001 and the area of the observation light source image 1002 corresponding to each divided image (S13). Then, based on the extracted color data, the correlation between these areas is analyzed, and the representative color of the photographing light source image 1001 and the representative color of the observation light source image 1002 are set (S14).

次に、CPU112は、相関の解析結果に基づき、分割画像に対応する各領域が代表色の抽出対象領域か否かを判定する(S15)。そして、抽出対象領域と判定した分割画像を提示する(S16)。例えば、抽出対象領域と判定された分割画像の提示は当該分割画像の近傍に配置されたチェックボックスにチェックマークを表示することで行われる。抽出対象領域ではないと判定された領域(以下、抽出非対象領域)に対応する分割画像の近傍に配置されたチェックボックスは空のままであり、ユーザは、抽出対象領域と判定された分割画像と抽出非対象領域と判定された分割画像を区分可能である。   Next, the CPU 112 determines whether each area corresponding to the divided image is a representative color extraction target area based on the analysis result of the correlation (S15). Then, the divided image determined as the extraction target area is presented (S16). For example, presentation of a divided image determined to be an extraction target area is performed by displaying a check mark in a check box arranged near the divided image. A check box arranged near a divided image corresponding to an area determined not to be an extraction target area (hereinafter, an extraction non-target area) remains empty, and the user can select a divided image determined to be an extraction target area. And the divided image determined to be the extraction non-target area.

抽出対象領域か否かの判定(S15)は、例えば、撮影光源画像1001と観察光源画像1002の対応する各領域について、色データの解析(S14)において後述する相関係数Rの算出を行い、相関係数Rが所定の閾値を超える領域を抽出対象領域と判定する。また、相関係数Rが所定の閾値以下の領域は抽出非対象領域である。   Determination of whether or not the extraction target region (S15), for example, for each corresponding region of the imaging light source image 1001 and the observation light source image 1002, perform the calculation of a correlation coefficient R described later in the analysis of color data (S14), An area where the correlation coefficient R exceeds a predetermined threshold is determined as an extraction target area. In addition, an area where the correlation coefficient R is equal to or less than a predetermined threshold is an extraction non-target area.

次に、CPU112は、抽出非対象領域があるか否かを判定し(S17)、抽出非対象領域がない場合は処理をステップS22に進める。また、抽出非対象領域がある場合、CPU112は、抽出非対象領域に特徴色があるか否かを判定し(S18)、特徴色がない場合は処理をステップS22に進める。また、抽出非対象領域に特徴色がある場合、CPU112は、抽出色追加ウィンドウをUIに表示する(S19)。   Next, the CPU 112 determines whether or not there is an extraction non-target area (S17). If there is no extraction non-target area, the process proceeds to step S22. If there is an extraction non-target area, the CPU 112 determines whether or not there is a characteristic color in the extraction non-target area (S18). If there is no characteristic color, the process proceeds to step S22. Further, when there is a characteristic color in the non-extraction area, the CPU 112 displays an extraction color addition window on the UI (S19).

特徴色があるか否かの判定(S18)は、ステップS13で抽出した色データを用いて、撮影光源画像1001の抽出対象領域の色データと抽出非対象領域の色データの間の色差を算出し、色差に基づき行われる。色差の算出には後述する式(1)が使用され、色差が所定の閾値(例えば5)を超える場合は抽出非対象領域に特徴色があると判定され、色差が所定の閾値以下であれば抽出非対象領域に特徴色がないと判定される。   The determination as to whether or not there is a characteristic color (S18) uses the color data extracted in step S13 to calculate the color difference between the color data of the extraction target area and the color data of the non-extraction area of the photographing light source image 1001. This is performed based on the color difference. Equation (1) described later is used to calculate the color difference. If the color difference exceeds a predetermined threshold (for example, 5), it is determined that there is a characteristic color in the extraction non-target area, and if the color difference is equal to or less than the predetermined threshold, It is determined that there is no characteristic color in the extraction non-target area.

図6により抽出色追加ウィンドウの一例を示す。抽出色追加ウィンドウの特徴色表示部311には検出された特徴色が表示され、画像表示部312には抽出非対象領域の画像が表示される。ユーザは、抽出色追加ウィンドウを参照して、抽出色の追加が必要と判断した場合、ポインタ313を操作して、画像表示部312に表示された画像において抽出色を指定し、抽出色追加ボタン314を押すかタッチする(以下「押す」と表現)。また、ユーザは、抽出色の追加が不要と判断した場合、または、抽出色の追加が終了したと判断した場合、OKボタン315を押す。   FIG. 6 shows an example of the extraction color addition window. The detected characteristic color is displayed on the characteristic color display section 311 of the extraction color addition window, and the image of the non-extraction target area is displayed on the image display section 312. When the user refers to the extraction color addition window and determines that addition of the extraction color is necessary, the user operates the pointer 313 to specify the extraction color in the image displayed on the image display unit 312, and click the extraction color addition button. Press or touch 314 (hereinafter referred to as "press"). The user presses the OK button 315 when it is determined that the addition of the extracted color is unnecessary or when it is determined that the addition of the extracted color is completed.

このように、ユーザは、特徴色表示部311に表示された特徴色を参照して、画像表示部312に表示された抽出非対象領域の画像から抽出色を指定することができる。抽出色の指定方法は、例えば、タップにより表示される矩形枠を抽出色に対応する領域に移動し、ピンチにより矩形枠の大きさを調整する方法を用いればよい。あるいは、ポインティングデバイスやキーボードによってポインタ313を移動して抽出色に対応する領域の一点を指定し、ポインタ313を移動して領域の他点を指定することで矩形領域を指定する方法を用いてもよい。勿論、抽出色の領域を効率的に指定可能な方法であればどのような方法を用いても構わない。   As described above, the user can specify the extraction color from the image of the non-extraction area displayed on the image display unit 312 with reference to the characteristic color displayed on the characteristic color display unit 311. As a method of specifying the extraction color, for example, a method of moving a rectangular frame displayed by tapping to an area corresponding to the extraction color and adjusting the size of the rectangular frame by pinching may be used. Alternatively, a method of specifying a rectangular area by moving the pointer 313 with a pointing device or a keyboard to specify one point of the area corresponding to the extracted color, and moving the pointer 313 to specify another point of the area may be used. Good. Of course, any method may be used as long as the method can efficiently specify the region of the extracted color.

CPU112は、抽出色追加ボタン314が押されたか、OKボタン315が押されたかを判定する(S20)。抽出色追加ボタン314が押された場合、詳細は後述するが、CPU112は、ユーザが指定した領域の色データを抽出色に追加し(S21)、処理をステップS20に戻す。また、OKボタン315が押された場合は処理をステップS22に進める。   The CPU 112 determines whether the extraction color addition button 314 has been pressed or the OK button 315 has been pressed (S20). When the extraction color addition button 314 is pressed, the details will be described later, but the CPU 112 adds the color data of the area designated by the user to the extraction color (S21), and returns the processing to step S20. If the OK button 315 has been pressed, the process proceeds to step S22.

次に、CPU112は、詳細は後述するが、ステップS14で設定された代表色の色データ(追加された抽出色の色データを含む)を用いて、撮影光源1011に依存する色を観察光源1012に依存する色に光源変換する色補正係数を作成する。そして、作成した色補正係数に基づく光源変換処理を撮影光源画像1001に施す(S22)。   Next, the CPU 112 uses the color data of the representative color (including the color data of the added extracted color) set in step S14 to determine a color that depends on the imaging light source 1011 using the observation light source 1012, as described in detail later. Creates a color correction coefficient for performing light source conversion to a color dependent on. Then, light source conversion processing based on the created color correction coefficient is performed on the captured light source image 1001 (S22).

●色データの抽出(S13)
図7のフローチャートにより色データの抽出処理(S13)を説明する。
● Extraction of color data (S13)
The color data extraction process (S13) will be described with reference to the flowchart of FIG.

CPU112は、撮影光源画像1001から例えばラスタ順に注目画素のRGB値と位置座標(x, y)を取得し(S131)、それらデータを抽出位置決定部104に供給し、抽出位置決定部104に抽出位置の決定処理を実行させる(S132)。抽出位置の決定処理の詳細は後述する。   The CPU 112 acquires the RGB values and the position coordinates (x, y) of the pixel of interest from the photographing light source image 1001, for example, in raster order (S131), supplies the data to the extraction position determination unit 104, and extracts the data to the extraction position determination unit 104 A position determination process is executed (S132). Details of the extraction position determination processing will be described later.

次に、撮影画像取得部103は、撮影光源画像1001のすべての画素について抽出位置の決定処理を実施したか否かを判定し(S133)、未実施の画素があれば処理をステップS131に戻す。   Next, the captured image acquisition unit 103 determines whether or not extraction position determination processing has been performed for all pixels of the captured light source image 1001 (S133), and if there are unexecuted pixels, returns the processing to step S131. .

抽出位置の決定処理が終了すると、CPU112は、抽出範囲決定部105に、決定された抽出位置の周囲の色データに基づく抽出範囲の決定処理を実施させる(S134)。抽出範囲の決定処理の詳細は後述する。   When the extraction position determination process is completed, the CPU 112 causes the extraction range determination unit 105 to perform an extraction range determination process based on the color data around the determined extraction position (S134). Details of the extraction range determination processing will be described later.

抽出範囲の決定処理が終了すると、CPU112は、色抽出部106に、決定された抽出位置と決定された抽出範囲に基づく色データの抽出処理を実施させる(S135)。色データの抽出処理の詳細は後述する。   When the extraction range determination processing is completed, the CPU 112 causes the color extraction unit 106 to execute color data extraction processing based on the determined extraction position and the determined extraction range (S135). Details of the color data extraction processing will be described later.

●抽出位置の決定処理(S132)
図8のフローチャートにより抽出位置の決定処理(S132)を説明する。
Determining the extraction position (S132)
The extraction position determination processing (S132) will be described with reference to the flowchart of FIG.

抽出位置決定部104は、注目画素のデータ(RGB値と位置座標(x, y))を入力すると(S1321)、色補正ファイル11が空か否かを判定し(S1322)、空の場合は入力データに基づき色補正ファイル11を更新する(S1329)。なお「色補正ファイル11が空」は、色補正ファイル11に抽出色が記録されていないことを意味する。   When the data of the target pixel (RGB value and position coordinates (x, y)) is input (S1321), the extraction position determination unit 104 determines whether the color correction file 11 is empty (S1322). The color correction file 11 is updated based on the input data (S1329). “The color correction file 11 is empty” means that no extracted color is recorded in the color correction file 11.

色補正ファイル11は、メモリ110に格納されていて、データとして抽出色の数を示す抽出数M、各抽出色のRGB値、各抽出色の位置座標(x, y)、度数fなどが記述されている。度数fは、後述する色差に基づき色空間の同じ領域に属すと判定された色の累積数である。   The color correction file 11 is stored in the memory 110 and describes, as data, an extraction number M indicating the number of extraction colors, an RGB value of each extraction color, position coordinates (x, y) of each extraction color, a frequency f, and the like. Have been. The frequency f is the cumulative number of colors determined to belong to the same region of the color space based on a color difference described later.

色補正ファイル11に抽出色の記録がある場合、抽出位置決定部104は、色抽出ファイル11から注目抽出色のRGB値を取得し(S1323)、注目画素の色と注目抽出色の間の色差ΔEを算出する(S1324)。   If the extracted color is recorded in the color correction file 11, the extraction position determination unit 104 obtains the RGB value of the target extraction color from the color extraction file 11 (S1323), and determines the color difference between the color of the target pixel and the target extraction color. ΔE is calculated (S1324).

色差ΔEは、注目画素のRGB値と注目抽出色のRGB値をそれぞれCIELab値などの色値に変換し、式(1)を用いて算出される。
ΔE = √{(L0-L1)2+(a0-a1)2+(b0-b1)2}; …(1)
ここで、L0a0b0は注目画素のLab値、
L1a1b1は注目抽出色のLab値。
The color difference ΔE is calculated using Expression (1) by converting the RGB value of the target pixel and the RGB value of the target extraction color into color values such as CIELab values.
ΔE = √ {(L 0 -L 1 ) 2 + (a 0 -a 1 ) 2 + (b 0 -b 1 ) 2 };… (1)
Here, L 0 a 0 b 0 is the Lab value of the pixel of interest,
L 1 a 1 b 1 is the Lab value of the target extraction color.

色値への変換は、画像データがAdobeRGB値であればAdobeRGB変換式とCIELab変換式を用い、画像データがsRGB値であればsRGB変換式とCIELab変換式を利用する。また、CIELab値などの色値の代わりに、CIECAM02などの変換式により得られるカラーアピアランス値を用いて色差を算出してもよい。   The conversion to the color value uses the AdobeRGB conversion formula and the CIELab conversion formula when the image data is the AdobeRGB value, and uses the sRGB conversion formula and the CIELab conversion formula when the image data is the sRGB value. Further, the color difference may be calculated using a color appearance value obtained by a conversion formula such as CIECAM02 instead of a color value such as a CIELab value.

次に、抽出位置決定部104は、色抽出ファイル11に記録されたすべての抽出色について、注目画素の色との間の色差ΔEを算出したか否かを判定し(S1325)、色差ΔEを未算出の抽出色があれば処理をステップS1323に戻す。   Next, the extraction position determination unit 104 determines whether the color difference ΔE between the color of the pixel of interest and all the extracted colors recorded in the color extraction file 11 has been calculated (S1325), and determines the color difference ΔE. If there is an uncalculated extracted color, the process returns to step S1323.

色抽出ファイル11に記録されたすべての抽出色について色差ΔEの算出が終了すると、抽出位置決定部104は、算出した色差ΔEの中で最小の色差ΔEminと所定の閾値Ethの大小関係を判定する(S1326)。最小の色差が閾値以上(ΔEmin≧Eth)の場合は、注目画素のデータを色抽出ファイル11に追加して(S1329)、注目画素に対する抽出位置の決定処理を終了する。なお、色差判定の閾値として例えばEth=5を用いるが、閾値Ethの値はこれに限定されない。   When the calculation of the color difference ΔE is completed for all the extracted colors recorded in the color extraction file 11, the extraction position determination unit 104 determines the magnitude relationship between the minimum color difference ΔEmin and the predetermined threshold value Eth among the calculated color differences ΔE. (S1326). If the minimum color difference is equal to or larger than the threshold (ΔEmin ≧ Eth), the data of the target pixel is added to the color extraction file 11 (S1329), and the process of determining the extraction position for the target pixel is completed. Note that, for example, Eth = 5 is used as the threshold for color difference determination, but the value of the threshold Eth is not limited to this.

図9により色抽出ファイル11の更新を説明する。図9(A)は注目画素のRGB値および位置座標(x, y)を示し、図9(B)は色抽出ファイル11の記録例を示す。最小の色差ΔEmin≧Ethの場合、図9(C)に示すように、ステップS1329において注目画素のデータが色抽出ファイル11に追加され、抽出数Mがインクリメントされ、度数f=1が設定される。   Update of the color extraction file 11 will be described with reference to FIG. FIG. 9A shows the RGB values and the position coordinates (x, y) of the pixel of interest, and FIG. 9B shows a recording example of the color extraction file 11. In the case of the minimum color difference ΔEmin ≧ Eth, as shown in FIG. 9C, in step S1329, the data of the target pixel is added to the color extraction file 11, the number of extractions M is incremented, and the frequency f = 1 is set. .

一方、最小の色差が閾値未満(ΔEmin<Eth)の場合、抽出位置決定部104は、最小の色差ΔEminに対応する抽出色(以下、色差最小抽出色)のデータを更新する(S1327)。この更新において、色差最小抽出色の度数fがインクリメントされ、色差最小抽出色の位置座標が注目画素の位置座標に更新される。さらに、抽出位置決定部104は、式(2)により、撮影光源画像1001の注目画素を中心とする所定の画素範囲(以下、局所範囲)のRGB値の標準偏差σを算出し、標準偏差σが最小になる画素値によって色差最小抽出色のRGB値を更新する。つまり、ステップS1328において色抽出ファイル11に記録されるRGB値は、度数fに対応するRGB代表値である。
Rm = ΣxΣyR(x, y)/N;
Gm = ΣxΣyG(x, y)/N;
Bm = ΣxΣyB(x, y)/N;
σR = √{Σi(Ri-Rm)2/(N-1)};
σG = √{Σi(Gi-Gm)2/(N-1)};
σB = √{Σi(Bi-Bm)2/(N-1)}; …(2)
ここで、RmGmBmは局所範囲の画素の平均RGB値、
RiGiBiは局所範囲の画素のRGB値、
Nは局所範囲の画素数(サンプル数)。
On the other hand, if the minimum color difference is less than the threshold (ΔEmin <Eth), the extraction position determination unit 104 updates the data of the extraction color (hereinafter, the minimum color difference extraction color) corresponding to the minimum color difference ΔEmin (S1327). In this update, the frequency f of the minimum color difference extraction color is incremented, and the position coordinates of the minimum color difference extraction color are updated to the position coordinates of the pixel of interest. Further, the extraction position determination unit 104 calculates a standard deviation σ of RGB values in a predetermined pixel range (hereinafter, a local range) around the target pixel of the photographing light source image 1001 according to Expression (2), and calculates the standard deviation σ The RGB value of the minimum color difference extraction color is updated according to the pixel value at which is minimized. That is, the RGB values recorded in the color extraction file 11 in step S1328 are RGB representative values corresponding to the frequency f.
Rm = Σ x Σ y R (x, y) / N;
Gm = Σ x Σ y G (x, y) / N;
Bm = Σ x Σ y B (x, y) / N;
σ R = √ {Σ i (Ri-Rm) 2 / (N-1)};
σ G = √ {Σ i (Gi-Gm) 2 / (N-1)};
σ B = √ {Σ i (Bi-Bm) 2 / (N-1)};… (2)
Where RmGmBm is the average RGB value of the pixels in the local range,
RiGiBi is the RGB value of the pixel in the local range,
N is the number of pixels (the number of samples) in the local range.

式(2)において、局所範囲は例えば五画素(X座標についてx±2、かつ、Y座標についてy±2)の範囲であるが、局所範囲はこれに限定されない。   In Equation (2), the local range is, for example, a range of five pixels (x ± 2 for the X coordinate and y ± 2 for the Y coordinate), but the local range is not limited to this.

図9(D)は注目画素のRGB値および位置座標(x, y)を示し、図9(E)は色抽出ファイル11の記録例を示す。注目画素の色値と色抽出ファイル11に記録された各抽出色の色値の間の最小の色差ΔEmin<Ethの場合、図9(F)に示すように、注目画素のデータに基づき色差最小抽出色のデータが更新され、度数fがインクリメントされる。   FIG. 9D shows the RGB value and the position coordinates (x, y) of the target pixel, and FIG. 9E shows a recording example of the color extraction file 11. If the minimum color difference ΔEmin <Eth between the color value of the pixel of interest and the color value of each extracted color recorded in the color extraction file 11, the color difference is minimized based on the data of the pixel of interest, as shown in FIG. The data of the extracted color is updated, and the frequency f is incremented.

次に、抽出位置決定部104は、ステップS1327で更新した度数fと所定の閾値Fthの大小関係を判定する(S1328)。更新後の度数が閾値以下(f≦Fth)の場合は注目画素に対する抽出位置の決定処理を終了する。また、更新後の度数が閾値を超える(f>Fth)場合は、注目画素のデータを色抽出ファイル11に追加し(S1329)、注目画素に対する抽出位置の決定処理を終了する。なお、度数判定の閾値として例えば撮影光源画像1001の総画素数の1%に相当する値を用いるが、閾値Fthの値はこれに限定されない。   Next, the extraction position determination unit 104 determines a magnitude relationship between the frequency f updated in step S1327 and a predetermined threshold Fth (S1328). If the updated frequency is equal to or less than the threshold value (f ≦ Fth), the process of determining the extraction position for the target pixel ends. If the updated frequency exceeds the threshold (f> Fth), the data of the pixel of interest is added to the color extraction file 11 (S1329), and the process of determining the extraction position for the pixel of interest ends. Note that, for example, a value corresponding to 1% of the total number of pixels of the captured light source image 1001 is used as the threshold for the frequency determination, but the value of the threshold Fth is not limited to this.

図9(G)は注目画素のRGB値および位置座標(x, y)を示し、図9(H)は色抽出ファイル11の記録例を示す。色差最小抽出色の更新後の度数f>Fthの場合、図9(I)に示すように、注目画素のデータが色抽出ファイル11に追加され、抽出数Mがインクリメントされ、度数f=1が設定される。なお、図9(I)において色差最小抽出色は三番目のデータであり、図9(I)は度数判定の閾値Fth=2000の例を示している。このように、色空間の同じ領域に属すデータであっても、度数fが閾値Fthを超える場合は注目画素のデータが色抽出ファイル11に追加される。   FIG. 9 (G) shows the RGB values and the position coordinates (x, y) of the pixel of interest, and FIG. 9 (H) shows a recording example of the color extraction file 11. If the frequency f> Fth after the update of the color difference minimum extraction color is updated, as shown in FIG. 9 (I), the data of the target pixel is added to the color extraction file 11, the extraction number M is incremented, and the frequency f = 1 Is set. Note that the minimum color difference extraction color in FIG. 9 (I) is the third data, and FIG. 9 (I) shows an example where the frequency determination threshold Fth = 2000. As described above, even if the data belongs to the same area of the color space, if the frequency f exceeds the threshold value Fth, the data of the target pixel is added to the color extraction file 11.

●抽出範囲の決定処理(S134)
図10のフローチャートにより抽出範囲の決定処理(S134)を説明する。
Determining the extraction range (S134)
The extraction range determination processing (S134) will be described with reference to the flowchart of FIG.

抽出範囲決定部105は、撮影光源画像1001から画素値を抽出する際に用いる抽出範囲の初期値を取得する(S1341)。抽出範囲の初期値として、例えば10×10画素の正方形範囲が設定されている。   The extraction range determination unit 105 acquires an initial value of an extraction range used when extracting a pixel value from the captured light source image 1001 (S1341). As an initial value of the extraction range, for example, a square range of 10 × 10 pixels is set.

次に、抽出範囲決定部105は、色抽出ファイル11から注目抽出色の位置座標(x, y)を取得する(S1342)。そして、注目抽出色の位置座標(x, y)および抽出範囲の初期値に基づき、撮影光源画像1001から抽出範囲の画素値を取得し、それら画素値の標準偏差Dsを算出する(S1343)。   Next, the extraction range determination unit 105 acquires the position coordinates (x, y) of the target extraction color from the color extraction file 11 (S1342). Then, based on the position coordinates (x, y) of the extracted color of interest and the initial value of the extraction range, pixel values of the extraction range are acquired from the captured light source image 1001, and the standard deviation Ds of those pixel values is calculated (S1343).

注目抽出色の位置座標(x, y)を略中心とする抽出範囲の画素値を取得すればよいが、位置座標(x, y)が画像の頂点や辺の近傍に位置する場合は、位置座標(x, y)を頂点または辺上とする抽出範囲の画素値を取得する。また、抽出範囲の色のばらつきを表す統計量に標準偏差を用いている例を説明するが、分散などの他の統計量を用いてもよい。   It is sufficient to obtain the pixel value of the extraction range about the position coordinates (x, y) of the target extraction color, but if the position coordinates (x, y) are located near the vertices or sides of the image, the position Obtain the pixel value of the extraction range with the coordinates (x, y) on the vertex or side. Also, an example will be described in which the standard deviation is used as a statistic representing the color variation of the extraction range, but another statistic such as variance may be used.

次に、抽出範囲決定部105は、所定の閾値Dthに基づき、算出した標準偏差Dsが判定条件(Ds<Dth)を満たすか否かを判定する(S1344)。標準偏差Dsが判定条件を満たさない場合(Ds≧Dth)、抽出範囲決定部105は、抽出範囲を一画素分狭め(例えば10×10を9×9にする)(S1345)、処理をステップS1343に戻して再び抽出範囲の画素値の標準偏差Dsを算出する。   Next, the extraction range determination unit 105 determines whether the calculated standard deviation Ds satisfies the determination condition (Ds <Dth) based on the predetermined threshold Dth (S1344). When the standard deviation Ds does not satisfy the determination condition (Ds ≧ Dth), the extraction range determination unit 105 narrows the extraction range by one pixel (for example, 10 × 10 is changed to 9 × 9) (S1345), and the process proceeds to step S1343. And the standard deviation Ds of the pixel values in the extraction range is calculated again.

標準偏差Dsが判定条件(Ds<Dth)を満たすと、抽出範囲決定部105は、判定条件を満たした抽出範囲を注目抽出色に関連付けて色抽出ファイル11に記録する(S1346)。図11により抽出範囲が記録された色抽出ファイル11を説明する。図11に示すように、色抽出ファイル11には抽出数M、各抽出色のRGB値、位置座標(x, y)、度数fに加えて、抽出範囲(画素数)が記録される。   When the standard deviation Ds satisfies the determination condition (Ds <Dth), the extraction range determining unit 105 records the extraction range satisfying the determination condition in the color extraction file 11 in association with the target extraction color (S1346). The color extraction file 11 in which the extraction range is recorded will be described with reference to FIG. As shown in FIG. 11, the extraction range (number of pixels) is recorded in the color extraction file 11 in addition to the number of extractions M, the RGB values of each extracted color, the position coordinates (x, y), and the frequency f.

次に、抽出範囲決定部105は、色抽出ファイル11に記録されたすべての抽出色について抽出範囲を決定したか否かを判定する(S1347)。そして、抽出範囲が未決の抽出色があれば処理をステップS1341に戻して、すべての抽出色について抽出範囲を決定するまでステップS1341からS1346の処理を繰り返す。   Next, the extraction range determination unit 105 determines whether or not the extraction range has been determined for all the extraction colors recorded in the color extraction file 11 (S1347). If there is an extraction color whose extraction range is undecided, the process returns to step S1341, and the processes of steps S1341 to S1346 are repeated until the extraction range is determined for all the extraction colors.

●色データの抽出処理(S135)
図12のフローチャートにより色データの抽出処理(S135)を説明する。
● Color data extraction processing (S135)
The color data extraction process (S135) will be described with reference to the flowchart of FIG.

色抽出部106は、色抽出ファイル11から注目抽出色の位置座標(x, y)および抽出範囲を取得する(S1351)。そして、位置座標(x, y)と抽出範囲に基づき、撮影光源画像1001と観察光源画像1002のそれぞれから抽出範囲内のRGB値を取得する(S1352)。   The color extraction unit 106 acquires the position coordinates (x, y) and the extraction range of the target extraction color from the color extraction file 11 (S1351). Then, based on the position coordinates (x, y) and the extraction range, RGB values within the extraction range are acquired from each of the photographing light source image 1001 and the observation light source image 1002 (S1352).

注目抽出色の位置座標(x, y)を略中心とする抽出範囲のRGB値を取得すればよいが、位置座標(x, y)が画像の頂点や辺の近傍に位置する場合は、位置座標(x, y)を頂点または辺上とする抽出範囲のRGB値を取得する。   What is necessary is just to obtain the RGB value of the extraction range whose center is approximately the position coordinates (x, y) of the target extraction color, but if the position coordinates (x, y) are located near the vertices or sides of the image, the position Get the RGB value of the extraction range with coordinates (x, y) on the vertex or side.

次に、色抽出部106は、撮影光源画像1001から抽出したRGB値の代表値(代表色)、および、観察光源画像1002から抽出したRGB値の代表値(代表色)を算出する(S1353)。代表色の算出には例えば式(3)を用いてRGB値の平均値を計算すればよいが、平均値の代わりに中心値などの他の統計量を代表色に用いてもよい。算出された代表色は、撮影光源画像1001、観察光源画像1002ごとに、位置座標(x, y)に関連付けられてメモリ110の抽出色ファイル12に格納される。
Rsr = ΣxΣyRs(x, y)/n;
Gsr = ΣxΣyGs(x, y)/n;
Bsr = ΣxΣyBs(x, y)/n;
Rvr = ΣxΣyRv(x, y)/n;
Gvr = ΣxΣyGv(x, y)/n;
Bvr = ΣxΣyBv(x, y)/n; …(3)
ここで、RsGsBsは撮影光源画像1001から抽出したRGB値、
RvGvBvは観察光源画像1002から抽出したRGB値、
RsrGsrBsrは撮影光源画像1001における代表色、
RvrGvrBvrは観察光源画像1002における代表色、
nは抽出範囲の画素数(サンプル数)。
Next, the color extraction unit 106 calculates a representative value (representative color) of RGB values extracted from the captured light source image 1001 and a representative value (representative color) of RGB values extracted from the observation light source image 1002 (S1353). . For example, the average value of the RGB values may be calculated using Equation (3) to calculate the representative color. However, another statistic such as a center value may be used for the representative color instead of the average value. The calculated representative color is stored in the extracted color file 12 of the memory 110 in association with the position coordinates (x, y) for each of the photographing light source image 1001 and the observation light source image 1002.
Rsr = Σ x Σ y Rs (x, y) / n;
Gsr = Σ x Σ y Gs (x, y) / n;
Bsr = Σ x Σ y Bs (x, y) / n;
Rvr = Σ x Σ y Rv (x, y) / n;
Gvr = Σ x Σ y Gv (x, y) / n;
Bvr = Σ x Σ y Bv (x, y) / n;… (3)
Here, RsGsBs is an RGB value extracted from the photographing light source image 1001,
RvGvBv is an RGB value extracted from the observation light source image 1002,
RsrGsrBsr is a representative color in the captured light source image 1001,
RvrGvrBvr is a representative color in the observation light source image 1002,
n is the number of pixels (the number of samples) in the extraction range.

次に、色抽出部106は、色抽出ファイル11に記録されたすべての抽出色について代表色の算出(色データの抽出)を実行したか否かを判定する(S1354)。色データの抽出が未了の抽出色がある場合は処理をステップS1351に戻し、すべての抽出色について色データの抽出が終了した場合は色データの抽出処理を終了する。   Next, the color extraction unit 106 determines whether or not the calculation of representative colors (extraction of color data) has been executed for all the extracted colors recorded in the color extraction file 11 (S1354). If there is an extraction color for which extraction of color data has not been completed, the process returns to step S1351. If extraction of color data has been completed for all extraction colors, the extraction processing of color data ends.

●相関の解析処理(S14)
図13のフローチャートにより相関の解析処理(S14)を説明する。
● Correlation analysis processing (S14)
The correlation analysis processing (S14) will be described with reference to the flowchart of FIG.

相関解析部107は、抽出色ファイル12に記録された代表色のデータを画像表示部302、304の分割画像に対応するデータ群に分類する(S141)。つまり、代表色に関連付けられた位置座標(x, y)に基づき、当該代表色のデータを分割画像それぞれに対応するデータ群に分類する。なお、データ群は相関解析の対象単位であるが、相関解析の対象単位は、分割画像単位にに限らず、画像単位でもよいし、画素単位にすることもできる。   The correlation analysis unit 107 classifies the representative color data recorded in the extracted color file 12 into a data group corresponding to the divided images of the image display units 302 and 304 (S141). That is, based on the position coordinates (x, y) associated with the representative color, the data of the representative color is classified into a data group corresponding to each of the divided images. The data group is a target unit of the correlation analysis. However, the target unit of the correlation analysis is not limited to the divided image unit, but may be an image unit or a pixel unit.

次に、相関解析部107は、撮影光源画像1001と観察光源画像1002の対応するデータ群の一つについて、相関係数Rを下式により算出する(S142)。
Gsm = ΣiGsri/m;
Gvm = ΣiGvri/m;
R = Σi(Gsri-Gsm)(Gvri-Gvm)/{√Σi(Gsri-Gsm)2√Σi(Gvri-Gvm)2}; …(4)
ここで、Gsrは撮影光源画像1001における代表色のG成分、
Gvrは観察光源画像1002における代表色のG成分、
mはデータ群に含まれる代表色の数。
Next, the correlation analysis unit 107 calculates a correlation coefficient R for one of the corresponding data groups of the captured light source image 1001 and the observation light source image 1002 by the following equation (S142).
Gsm = Σ i Gsr i / m;
Gvm = Σ i Gvr i / m;
R = Σ i (Gsr i -Gsm ) (Gvr i -Gvm) / {√Σ i (Gsr i -Gsm) 2 √Σ i (Gvr i -Gvm) 2}; ... (4)
Here, Gsr is a G component of a representative color in the captured light source image 1001,
Gvr is the G component of the representative color in the observation light source image 1002,
m is the number of representative colors included in the data group.

式(4)はG成分が輝度値を代表するとして相関係数Rを算出する例を示すが、代表色のRGB値から輝度値を算出して、算出した輝度値によって相関係数Rを算出してもよい。   Equation (4) shows an example of calculating the correlation coefficient R on the assumption that the G component represents the luminance value.The luminance value is calculated from the RGB values of the representative color, and the correlation coefficient R is calculated based on the calculated luminance value. May be.

次に、相関解析部107は、算出した相関係数Rと所定の閾値Rthの大小関係を判定する(S143)。相関係数が閾値を超える(R>Rth)場合、当該データ群に対応する分割画像の領域が前述した抽出対象領域であり、当該データ群をメモリ110の色補正ファイル13に格納する(S144)。なお、相関係数Rの判定用の閾値として例えばRth=0.95を用いるが、閾値Rthの値をこれに限らない。   Next, the correlation analysis unit 107 determines a magnitude relationship between the calculated correlation coefficient R and a predetermined threshold Rth (S143). If the correlation coefficient exceeds the threshold (R> Rth), the region of the divided image corresponding to the data group is the above-described extraction target region, and the data group is stored in the color correction file 13 of the memory 110 (S144). . Note that, for example, Rth = 0.95 is used as the threshold for determining the correlation coefficient R, but the value of the threshold Rth is not limited to this.

次に、相関解析部107は、すべてのデータ群について相関係数Rの算出と判定を実施したか否かを判定し(S145)、未実施のデータ群があれば処理をステップS142に戻して、すべてのデータ群について相関係数Rの算出と判定を繰り返す。   Next, the correlation analysis unit 107 determines whether the calculation and determination of the correlation coefficient R have been performed for all data groups (S145), and if there is a data group that has not been performed, the process returns to step S142. The calculation and determination of the correlation coefficient R are repeated for all data groups.

色データの解析処理(S14)が終了すると、色補正ファイル13には、抽出対象領域の分割画像ごとに色補正係数を作成するための抽出色の色データが記録されている。また、前述したように、抽出非対象領域に特徴色がある場合、ステップS21において、ユーザが指定する領域の色データが、抽出色の色データとして色補正ファイル13に追加される場合がある。   When the color data analysis process (S14) is completed, the color correction file 13 records color data of an extracted color for creating a color correction coefficient for each divided image of the extraction target area. Further, as described above, when there is a characteristic color in the non-extraction target area, in step S21, the color data of the area specified by the user may be added to the color correction file 13 as the color data of the extraction color.

相関の解析処理(S14)によれば、撮影光源画像1001の分割画像と観察光源画像1002の分割画像の間の色の関係性から光沢部を含む領域を抽出非対象領域に分類することができる。その結果、光沢部を含む領域の色を、色補正係数の算出に用いる代表色から除外することができる。   According to the correlation analysis process (S14), an area including a glossy portion can be classified as an extraction non-target area based on the color relationship between the divided image of the captured light source image 1001 and the divided image of the observation light source image 1002. . As a result, the color of the area including the glossy portion can be excluded from the representative colors used for calculating the color correction coefficient.

●光源変換処理(S22)
図14のフローチャートにより光源変換処理(S22)を説明する。
Light source conversion processing (S22)
The light source conversion processing (S22) will be described with reference to the flowchart of FIG.

色補正部108は、色補正ファイル13から代表色の色データ(追加された抽出色の色データを含む)を取得する(S221)。そして、撮影光源画像1001の代表色の色データと観察光源画像1002の代表色の色データから、下式に基づき、撮影光源1011に依存するRGB値を観察光源1012に依存するRGB値に変換するための色補正係数を算出する(S222)。
┌ ┐┌ ┐┌ ┐
│Rvi││m11 m12 m13 m14││Rsi
│Gvi││m21 m22 m23 m24││Gsi
│Bvi││m31 m32 m33 m34││Bsi
└ ┘└ ┘│ 1 │
└ ┘ …(5)
ここで、RsGsBsは撮影光源画像1001の代表色の色データ、
RvGvBvは観察光源画像1002の代表色の色データ。
The color correction unit 108 acquires the color data of the representative color (including the color data of the added extracted color) from the color correction file 13 (S221). Then, from the color data of the representative color of the photographing light source image 1001 and the color data of the representative color of the observation light source image 1002, the RGB value depending on the photographing light source 1011 is converted into the RGB value depending on the observation light source 1012 based on the following equation. A color correction coefficient is calculated (S222).
┌ ┐┌ ┐┌ ┐
│Rv i ││m 11 m 12 m 13 m 14 ││Rs i
│Gv i ││m 21 m 22 m 23 m 24 ││Gs i
│Bv i ││m 31 m 32 m 33 m 34 ││Bs i
└ ┘└ ┘│ 1 │
└ ┘… (5)
Here, RsGsBs is the color data of the representative color of the photographing light source image 1001,
RvGvBv is the color data of the representative color of the observation light source image 1002.

式(5)におけるマトリクス係数m11-m34が色補正係数に相当する。最適なマトリクス係数は、各代表色の色データを式(5)に適用し、最小二乗法などを用いて算出することができる。なお、式(5)にはマトリクス係数として3×4のマトリクスを用いる例を示すが、異なる次数のマトリクスを用いてもよい。 The matrix coefficient m 11 -m 34 in equation (5) corresponds to the color correction coefficient. The optimal matrix coefficient can be calculated by applying the color data of each representative color to the equation (5) and using the least squares method or the like. Equation (5) shows an example in which a 3 × 4 matrix is used as a matrix coefficient, but a matrix of a different order may be used.

次に、色補正部108は、変換元画像である撮影光源画像1001の画像データを入力し(S223)、撮影光源画像1001の画像データに色補正係数を用いる光源変換処理を施し、観察光源1012に依存する画像データを算出する(S224)。そして、光源変換によって得られた画像データを補正画像1003(観察光源1012に依存する撮影画像)の画像データとしてメモリ110に格納する(S225)。   Next, the color correction unit 108 receives image data of the shooting light source image 1001 as a conversion source image (S223), performs light source conversion processing using a color correction coefficient on the image data of the shooting light source image 1001, and Is calculated (S224). Then, the image data obtained by the light source conversion is stored in the memory 110 as image data of the corrected image 1003 (a captured image depending on the observation light source 1012) (S225).

このように、撮影画像から複数の代表色を抽出し、撮影光源1011に依存する撮影光源画像1001を観察光源1012に依存する撮影画像(補正画像1003)に変換するための色補正係数を算出して、光源変換に適した色補正条件を作成することができる。   As described above, a plurality of representative colors are extracted from the captured image, and a color correction coefficient for converting the captured light source image 1001 dependent on the capturing light source 1011 into a captured image (corrected image 1003) dependent on the observation light source 1012 is calculated. Thus, a color correction condition suitable for light source conversion can be created.

また、相関の解析処理(S14)によって撮影光源画像1001と観察光源画像1002の間の色の関係性を解析して、光沢部の色を、色補正係数の算出に用いる代表色から予め除外し、高精度な色補正条件を作成することができる。   In addition, by analyzing the correlation (S14), the color relationship between the photographing light source image 1001 and the observation light source image 1002 is analyzed, and the color of the glossy part is previously excluded from the representative colors used for calculating the color correction coefficient. Thus, highly accurate color correction conditions can be created.

さらに、ステップS17からS21の処理によって、抽出非対象領域に特徴色がある場合は、特徴色を提示して特徴色の抽出の要否をユーザに判断させることで、代表色の抽出漏れを防ぎ、色補正条件の精度低下を防ぐことができる。   Further, if there is a characteristic color in the non-extraction area by the processing of steps S17 to S21, the omission of the representative color is prevented by presenting the characteristic color and allowing the user to determine whether or not the characteristic color needs to be extracted. In addition, it is possible to prevent a decrease in the accuracy of the color correction conditions.

以下、本発明にかかる実施例2の画像処理を説明する。なお、実施例2において、実施例1と略同様の構成については、同一符号を付して、その詳細説明を省略する。   Hereinafter, image processing according to the second embodiment of the present invention will be described. In the second embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and the detailed description thereof will be omitted.

実施例1では、抽出色のデータに光沢部に起因するデータが含まれるか否かを撮影光源画像1001の分割画像と観察光源画像1002の分割画像の間の色の関係性から判定する方法を説明した。実施例2においては、同様の判定を撮影光源画像1001の代表色と観察光源画像1002の代表色の間の差分と相関に基づき判定する方法を説明する。   In the first embodiment, a method of determining whether data of an extracted color includes data due to a glossy portion based on the color relationship between the divided image of the photographing light source image 1001 and the divided image of the observation light source image 1002. explained. In the second embodiment, a method of making a similar determination based on the difference and correlation between the representative color of the captured light source image 1001 and the representative color of the observation light source image 1002 will be described.

●差分の解析処理
図15のフローチャートにより実施例2における差分の解析処理を説明する。なお、差分の解析処理は、図4に示す相関の解析処理(S14)の一部として実施される。
Difference Analysis Processing Difference analysis processing according to the second embodiment will be described with reference to the flowchart in FIG. The difference analysis process is performed as a part of the correlation analysis process (S14) shown in FIG.

相関解析部107は、抽出色ファイル12に記録された代表色のデータを画像表示部302、304の分割画像に対応するデータ群に分類する(S151)。つまり、代表色に関連付けられた位置座標(x, y)に基づき、当該代表色を分割画像それぞれに対応するデータ群に分類する。   The correlation analysis unit 107 classifies the representative color data recorded in the extracted color file 12 into a data group corresponding to the divided images of the image display units 302 and 304 (S151). That is, the representative color is classified into a data group corresponding to each of the divided images based on the position coordinates (x, y) associated with the representative color.

次に、相関解析部107は、撮影光源1011の基準白色と観察光源1012の基準白色を取得する(S152)。例えば、基準白色のデータとして、撮影画像のExif情報を参照して撮影時の色温度を取得する。また、撮影画像の画素値と色温度の対応関係を保持するテーブルを用意して、撮影画像のハイライト部から色温度を推定する方法を用いることもできる。   Next, the correlation analysis unit 107 acquires the reference white color of the imaging light source 1011 and the reference white color of the observation light source 1012 (S152). For example, as the reference white data, the color temperature at the time of shooting is acquired with reference to the Exif information of the shot image. Further, it is also possible to use a method of preparing a table for holding the correspondence between the pixel values of the captured image and the color temperature, and estimating the color temperature from the highlight portion of the captured image.

次に、相関解析部107は、取得した基準白色に基づき差分判定に用いる閾値Thを設定する(S153)。基準白色に基づき閾値thを設定する理由は、光源の違いによって撮影画像の間の画素値の差分が大きくなるため、差分判定用の閾値Thを光源の違いに応じて適切に設定し、光沢部から色データを抽出ることを防ぐためである。例えば、閾値Thの基準値に10を設定し、撮影光源1011の色温度と観察光源1012の色温度が500K異なるごとに閾値Thに5を加えて、閾値Thを増加させる。勿論、基準値、色温度のステップ、閾値のステップはこれら値に限定されない。   Next, the correlation analysis unit 107 sets a threshold Th used for difference determination based on the acquired reference white (S153). The reason for setting the threshold value th based on the reference white color is that the difference in pixel value between captured images increases due to the difference in light source. This is to prevent color data from being extracted from the. For example, the reference value of the threshold value Th is set to 10, and the threshold value Th is increased by adding 5 to the threshold value Th every time the color temperature of the imaging light source 1011 and the color temperature of the observation light source 1012 differ by 500K. Of course, the reference value, the color temperature step, and the threshold step are not limited to these values.

次に、相関解析部107は、一つのデータ群について、撮影光源画像1001と観察光源画像1002の対応する各代表色の間の差分diを算出し(S154)、算出した差分diそれぞれと閾値Thを比較する(S155)。そして、すべての差分が閾値未満(di<Th)の場合、当該データ群に対応する分割画像の領域が抽出対象領域であり、当該データ群を色補正ファイル13に格納する(S156)。また、閾値以上の差分diが一つでもある場合、当該データ群に対応する分割画像の領域は抽出非対象領域である。なお、差分diは、例えばRGB空間における代表色の間のユークリッド距離として算出すればよい。 Then, the correlation analysis unit 107, for one data group corresponding calculates the difference d i between each representative color (S154) of the imaging light source image 1001 and the observation light source image 1002, the calculated difference d i respectively The threshold Th is compared (S155). If all the differences are smaller than the threshold value (d i <Th), the area of the divided image corresponding to the data group is the extraction target area, and the data group is stored in the color correction file 13 (S156). Further, if the threshold or more difference d i is even one region of the divided image corresponding to the data group is extracted non-target region. Incidentally, the difference d i, for example, may be calculated as the Euclidean distance between the representative colors in the RGB space.

次に、相関解析部107は、すべてのデータ群について差分diの算出と差分判定を実施したか否かを判定し(S157)、未実施のデータ群があれば処理をステップS154に戻して、すべてのデータ群について差分diの算出と差分判定を繰り返す。 Then, the correlation analysis unit 107 determines whether or not performed is calculated and the difference determines the difference d i for all data groups (S157), the process if there is data group unexecuted returns to step S154 , it repeats the calculation and the difference determines the difference d i for all data groups.

実施例2の差分の解析処理によれば、撮影光源画像1001の分割画像と観察光源画像1002の分割画像の間の代表色の差分から光沢部を含む領域を判定することができる。その結果、光沢部を含む領域の色を、色補正係数の算出に用いる代表色から除外することができる。   According to the difference analysis processing of the second embodiment, the area including the glossy portion can be determined from the difference between the representative colors between the divided image of the captured light source image 1001 and the divided image of the observation light source image 1002. As a result, the color of the area including the glossy portion can be excluded from the representative colors used for calculating the color correction coefficient.

CPU112は、上記の差分の解析処理によって色補正ファイル13を作成し、相関の解析処理に基づき抽出対象領域と抽出非対象領域を判定し(S14、S15)、UIに抽出対象領域を提示する(S16)。そして、抽出非対象領域がない場合は処理をステップS22へ進める。つまり、実施例2においては、差分の解析処理により閾値Thよりも大きい差分diが一つでもあると判定された分割画像について、さらに相関の解析処理を行い、相関係数Rが閾値Rthよりも小さい分割画像を抽出非対象領域と判定する。 The CPU 112 creates the color correction file 13 by the above-described difference analysis processing, determines the extraction target area and the extraction non-target area based on the correlation analysis processing (S14, S15), and presents the extraction target area to the UI (S14, S15). S16). Then, when there is no extraction non-target area, the process proceeds to step S22. That is, in the second embodiment, the divided images large difference d i than the threshold value Th by analysis of the difference is determined to be even one further performs analysis processing of the correlation, from the correlation coefficient R is the threshold Rth Is determined to be a non-target region to be extracted.

このように、代表色の間の差分により撮影画像の領域に光沢部が含まれるか否かを判定し、光沢部を含むと判定された領域について、さらに、代表色の相関に基づき抽出非対象領域を判定する。これにより、色補正条件を高精度に作成するための色データを高精度に抽出することができる。   In this way, it is determined whether or not the region of the captured image includes a glossy portion based on the difference between the representative colors, and the region determined to include the glossy portion is further extracted and excluded based on the correlation of the representative color. Determine the area. This makes it possible to extract color data for creating color correction conditions with high accuracy.

本発明は、上述した各実施例の構成に限定されず、本発明の趣旨を逸脱しない範囲で種々の変形が可能である。   The present invention is not limited to the configuration of each embodiment described above, and various modifications can be made without departing from the spirit of the present invention.

[その他の実施例]
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記録媒体を介してシステム或いは装置に供給し、そのシステムあるいは装置のコンピュータ(又はCPUやMPU等)がプログラムを読み出して実行する処理である。
[Other Examples]
The present invention is also realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various recording media, and a computer (or CPU or MPU or the like) of the system or apparatus reads the program and reads the program. This is the process to be performed.

104 … 抽出位置決定部、105 … 抽出範囲決定部、106 … 色抽出部106、107 … 相関解析部、108 … 色補正部   104: extraction position determination unit, 105: extraction range determination unit, 106: color extraction unit 106, 107: correlation analysis unit, 108: color correction unit

Claims (11)

第一の照明条件で被写体を撮影した第一の画像データ、および、前記第一の照明条件と異なる第二の照明条件で前記被写体を撮影した第二の画像データを入力する入力手段と、
前記第一の画像データの各領域から色データを抽出し、前記第一の画像データの各領域に対応する前記第二の画像データの各領域から色データを抽出する抽出手段と、
前記第一の画像データの領域から抽出された色データと、前記第二の画像データの対応する領域から抽出された色データとの間の相関係数を算出し、前記相関係数が所定の第一の閾値を超える抽出対象領域から抽出された色データを前記第一の画像データの代表色および前記第二の画像データの代表色に設定する解析手段と、
前記第一の画像データの代表色および前記第二の画像データの代表色を用いて前記第一の照明条件に依存する前記第一の画像データを前記第二の照明条件に依存する画像データに変換するための色補正条件を作成する作成手段と、
前記色補正条件を用いて、前記第一の画像データに光源変換処理を施す変換手段と
有する画像処理装置。
First image data obtained by photographing the subject under the first lighting condition, and input means for inputting second image data obtained by photographing the subject under a second lighting condition different from the first lighting condition,
Extraction means for extracting color data from each area of the first image data, and extracting color data from each area of the second image data corresponding to each area of the first image data,
Calculating a correlation coefficient between the color data extracted from the area of the first image data and the color data extracted from the corresponding area of the second image data, wherein the correlation coefficient is a predetermined value; Analysis means for setting the color data extracted from the extraction target area exceeding the first threshold as the representative color of the first image data and the representative color of the second image data ,
Using the representative color of the first image data and the representative color of the second image data, the first image data that depends on the first lighting condition is converted into image data that depends on the second lighting condition. Creating means for creating color correction conditions for conversion;
A conversion unit that performs a light source conversion process on the first image data using the color correction condition ,
Image processing apparatus having a.
さらに、前記抽出対象領域と、前記相関係数が前記第一の閾値以下の抽出非対象領域を区分可能に提示するユーザインタフェイスを有する請求項1に記載された画像処理装置。   The image processing apparatus according to claim 1, further comprising a user interface that presents the extraction target area and the extraction non-target area in which the correlation coefficient is equal to or less than the first threshold so as to be distinguishable. 前記解析手段は、前記第一の照明条件の基準白色および前記第二の照明条件の基準白色に基づき第二の閾値を設定し、前記第一の画像データの代表色と前記第二の画像データの代表色との差分が前記第二の閾値未満の領域から抽出された色データを前記代表色の色データに設定する請求項1に記載された画像処理装置。 The analysis unit sets a second threshold based on the reference white under the first lighting condition and the reference white under the second lighting condition, and sets a representative color of the first image data and the second image data. The image processing apparatus according to claim 1, wherein color data extracted from an area whose difference from the representative color is smaller than the second threshold is set as color data of the representative color. 前記基準白色は色温度であり、前記解析手段は、前記第一の照明条件の色温度と前記第二の照明条件の色温度の差が大きいほど前記第二の閾値を増加させる請求項3に記載された画像処理装置。   The said reference white is a color temperature, The said analysis means increases the said 2nd threshold value, so that the difference of the color temperature of the said 1st lighting condition and the color temperature of a said 2nd lighting condition is large. The described image processing device. 前記解析手段は、前記抽出された色データに基づき、前記第一の画像データの領域と前記第二の画像データの対応する領域の間の相関係数を算出し、
さらに、前記相関係数が所定の第一の閾値を超える抽出対象領域と前記相関係数が前記第一の閾値以下の抽出非対象領域を区分可能に提示するユーザインタフェイスを有する請求項3または4に記載された画像処理装置。
The analyzing means calculates a correlation coefficient between the area of the first image data and the corresponding area of the second image data based on the extracted color data,
4. A user interface for presenting an extraction target area in which the correlation coefficient exceeds a predetermined first threshold and an extraction non-target area in which the correlation coefficient is equal to or less than the first threshold so as to be distinguishable. 4. The image processing device according to 4.
前記抽出非対象領域に特徴色があるか否かを判定し、前記特徴色がある場合、前記ユーザインタフェイスに前記特徴色を前記代表色に追加するためのウィンドウを提供する手段を有する請求項2または5に記載された画像処理装置。   Means for determining whether or not there is a characteristic color in the extraction non-target area, and providing a window for adding the characteristic color to the representative color on the user interface if the characteristic color is present, The image processing device according to 2 or 5. 前記第一の照明条件は、前記第二の照明条件よりも光量が大きい請求項1から6の何れか一項に記載された画像処理装置。   The image processing apparatus according to claim 1, wherein the first illumination condition has a larger light amount than the second illumination condition. 前記第一の照明条件は、前記第一の画像データの撮影におけるフラッシュの発光を含み、前記第二の照明条件は、前記被写体の観察光に対応する請求項1から7の何れか一項に記載された画像処理装置。   The light source according to any one of claims 1 to 7, wherein the first lighting condition includes emission of a flash in capturing the first image data, and the second lighting condition corresponds to observation light of the subject. The described image processing device. 第一の照明条件で被写体を撮影した第一の画像データ、および、前記第一の照明条件と異なる第二の照明条件で前記被写体を撮影した第二の画像データを入力することと、
前記第一の画像データの各領域から色データを抽出し、前記第一の画像データの各領域に対応する前記第二の画像データの各領域から色データを抽出することと、
前記第一の画像データの領域から抽出された色データと、前記第二の画像データの対応する領域から抽出された色データとの間の相関係数を算出し、前記相関係数が所定の第一の閾値を超える抽出対象領域から抽出された色データを前記第一の画像データの代表色および前記第二の画像データの代表色に設定することと、
前記第一の画像データの代表色および前記第二の画像データの代表色を用いて前記第一の照明条件に依存する前記第一の画像データを前記第二の照明条件に依存する画像データに変換するための色補正条件を作成することと、
前記色補正条件を用いて、前記第一の画像データに光源変換処理を施すことと
含む画像処理方法。
First image data obtained by shooting a subject under the first lighting condition, and inputting second image data obtained by shooting the subject under a second lighting condition different from the first lighting condition,
Extracting color data from each area of the first image data, extracting color data from each area of the second image data corresponding to each area of the first image data,
Calculating a correlation coefficient between the color data extracted from the area of the first image data and the color data extracted from the corresponding area of the second image data, wherein the correlation coefficient is a predetermined value; Setting the color data extracted from the extraction target area exceeding the first threshold as the representative color of the first image data and the representative color of the second image data ,
Using the representative color of the first image data and the representative color of the second image data, the first image data that depends on the first lighting condition is converted into image data that depends on the second lighting condition. Creating color correction conditions for conversion,
Using the color correction conditions, performing light source conversion processing on the first image data ,
Image processing methods, including.
コンピュータを請求項1から請求項8の何れか一項に記載された画像処理装置の各手段として機能させるためのプログラム。   A program for causing a computer to function as each unit of the image processing apparatus according to claim 1. 請求項10に記載されたプログラムが記録されたコンピュータが読み取り可能な記録媒体。   A computer-readable recording medium on which the program according to claim 10 is recorded.
JP2018154202A 2018-08-20 2018-08-20 Image processing apparatus and method Active JP6650975B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018154202A JP6650975B2 (en) 2018-08-20 2018-08-20 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018154202A JP6650975B2 (en) 2018-08-20 2018-08-20 Image processing apparatus and method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2014083993A Division JP6395428B2 (en) 2014-04-15 2014-04-15 Image processing apparatus and method

Publications (2)

Publication Number Publication Date
JP2018174596A JP2018174596A (en) 2018-11-08
JP6650975B2 true JP6650975B2 (en) 2020-02-19

Family

ID=64107619

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018154202A Active JP6650975B2 (en) 2018-08-20 2018-08-20 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP6650975B2 (en)

Also Published As

Publication number Publication date
JP2018174596A (en) 2018-11-08

Similar Documents

Publication Publication Date Title
JP5032911B2 (en) Image processing apparatus and image processing method
JP5517685B2 (en) Image processing apparatus and method
KR101183343B1 (en) Radiometric calibration from a single image
KR100658998B1 (en) Image processing apparatus, image processing method and computer readable medium which records program thereof
JP5870598B2 (en) Image white balance processing method and apparatus
JP2004005694A (en) Image processing method, digital image processor, digital camera, digital photograph finishing system, and program
JP2001092956A (en) Device and method for automatically correcting color and recording medium stored with control program therefor
JP2015011585A (en) Image processing apparatus, image forming apparatus, image forming system, image processing method, and program
JP2008527852A (en) White balance correction of digital camera images
JP5457652B2 (en) Image processing apparatus and method
KR20050048460A (en) Image processing apparatus, image processing method, and program
JP6840957B2 (en) Image similarity calculation device, image processing device, image processing method, and recording medium
US20170329775A1 (en) Image processing apparatus, image processing method, search apparatus, search method, and non-transitory computer-readable storage medium
JP5367455B2 (en) Apparatus and method for color adjustment between a plurality of color cameras
JP2005197996A (en) Control method and controller of digital camera
JP6395428B2 (en) Image processing apparatus and method
JP6650975B2 (en) Image processing apparatus and method
JP2005346474A (en) Image processing method and image processor and program and storage medium
Fursov et al. Correction of distortions in color images based on parametric identification
JP2014192859A (en) Color correction method, program, and device
JP2009050035A (en) Image processing method, image processing system, and image processing program
JP2007243987A (en) Image processing method, image processing system, and image processing program
JP2020088709A (en) Image processing apparatus, image processing method and program
JP2008294969A (en) Video image conversion apparatus, method, and program
JPH06251147A (en) Video feature processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180820

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190930

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191127

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20191223

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200121

R151 Written notification of patent or utility model registration

Ref document number: 6650975

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151