JP2019169910A - Image processing apparatus, image processing method, and program - Google Patents
Image processing apparatus, image processing method, and program Download PDFInfo
- Publication number
- JP2019169910A JP2019169910A JP2018057934A JP2018057934A JP2019169910A JP 2019169910 A JP2019169910 A JP 2019169910A JP 2018057934 A JP2018057934 A JP 2018057934A JP 2018057934 A JP2018057934 A JP 2018057934A JP 2019169910 A JP2019169910 A JP 2019169910A
- Authority
- JP
- Japan
- Prior art keywords
- color difference
- value
- noise
- color
- reference value
- 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.)
- Granted
Links
Images
Landscapes
- Image Processing (AREA)
- Color Image Communication Systems (AREA)
Abstract
【課題】ノイズの影響を取り除いた信頼度の高い測色結果をユーザに提供する。【解決手段】測色用の装置であって、対象物の撮影画像を取得する取得手段と、輝度成分と色度成分を表す少なくとも一つの色信号値を、基準値として設定する基準値設定手段と、前記撮影画像を構成する画素の色信号値を、輝度成分と色度成分を表す色信号値へと変換する色変換手段と、前記変換によって得られた前記撮影画像を構成する画素の前記輝度成分と色度成分を表す色信号値に対して前記基準値からの色差を算出し、色差情報を生成する色差情報生成手段と、を備え、前記色差情報生成手段は、前記算出した色差が所定の閾値以下の場合、当該色差を一定値に置き換えることを特徴とする。【選択図】図3An object of the present invention is to provide a user with a highly reliable color measurement result from which the influence of noise has been removed. An apparatus for colorimetry, comprising: an acquisition unit for acquiring a captured image of an object; and a reference value setting unit for setting at least one color signal value representing a luminance component and a chromaticity component as a reference value. And color conversion means for converting a color signal value of a pixel constituting the captured image into a color signal value representing a luminance component and a chromaticity component; and Color difference information generation means for calculating a color difference from the reference value for a color signal value representing a luminance component and a chromaticity component, and generating color difference information, wherein the calculated color difference is When the difference is equal to or less than a predetermined threshold, the color difference is replaced with a constant value. [Selection diagram] FIG.
Description
本発明は、画像内の色差を評価する画像処理技術に関する。 The present invention relates to an image processing technique for evaluating a color difference in an image.
近年、デジタルスチルカメラやデジタルビデオカメラといったデジタル撮像装置を利用した対象物の計測が広く行われている。その一例としては製品の測色があり、例えば、デジタル撮像装置により対象物の色度を計測して塗装ムラなどの表面欠陥を検査する技術がある(特許文献1)。 In recent years, measurement of an object using a digital imaging device such as a digital still camera or a digital video camera has been widely performed. As an example, there is a color measurement of a product, for example, there is a technique of measuring surface chromaticity such as coating unevenness by measuring the chromaticity of an object with a digital imaging device (Patent Document 1).
上述のような測色技術において、対象物品を高解像度で測色したい場合、撮像素子の一画素当たりの受光面積が小さくなるため、測色値へのノイズの影響が大きくなる。また、撮影環境が暗い場合など、高いISO感度で撮影せざるを得ない状況においても、測色値がノイズの影響を強く受ける。これらの場合に得られる測色結果は被写体自体の特性とノイズとが混在したものとなるが、ユーザにはその判別が困難である。 In the colorimetry technique as described above, when it is desired to measure the target article with high resolution, the light receiving area per pixel of the image sensor becomes small, so the influence of noise on the colorimetric value increases. In addition, even in a situation where shooting is unavoidable, such as when the shooting environment is dark, the colorimetric values are strongly influenced by noise. The colorimetric results obtained in these cases are a mixture of the characteristics of the subject itself and noise, but it is difficult for the user to determine the result.
本発明に係る装置は、対象物の撮影画像を取得する取得手段と、輝度成分と色度成分を表す少なくとも一つの色信号値を、基準値として設定する基準値設定手段と、前記撮影画像を構成する画素の色信号値を、輝度成分と色度成分を表す色信号値へと変換する色変換手段と、前記変換によって得られた前記撮影画像を構成する画素の前記輝度成分と色度成分を表す色信号値に対して前記基準値からの色差を算出し、色差情報を生成する色差情報生成手段と、を備え、前記色差情報生成手段は、前記算出した色差が所定の閾値以下の場合、当該色差を規定値に置き換えることを特徴とする。 An apparatus according to the present invention includes an acquisition unit that acquires a captured image of an object, a reference value setting unit that sets at least one color signal value representing a luminance component and a chromaticity component as a reference value, and the captured image. Color conversion means for converting color signal values of the constituent pixels into color signal values representing luminance components and chromaticity components, and the luminance and chromaticity components of the pixels constituting the captured image obtained by the conversion A color difference information generating unit that calculates a color difference from the reference value with respect to a color signal value that represents color difference information, and the color difference information generating unit has the calculated color difference equal to or less than a predetermined threshold value. The color difference is replaced with a specified value.
本発明によれば、ノイズの影響を取り除いた信頼度の高い測色結果をユーザに提供することができる。 According to the present invention, it is possible to provide a user with a highly reliable color measurement result from which the influence of noise has been removed.
以下、本発明の実施形態について、図面を参照して説明する。なお、以下の実施形態は本発明を限定するものではなく、また、本実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。なお、同一の構成については、同じ符号を付して説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. The following embodiments do not limit the present invention, and all the combinations of features described in the present embodiment are not necessarily essential to the solution means of the present invention. In addition, about the same structure, the same code | symbol is attached | subjected and demonstrated.
図1は、本発明を適用可能なシステム構成の一例を示す図である。画像処理装置100は、例えば一般的なPC(パーソナル・コンピュータ)であり、デジタル撮像装置110から被写体としてのチャート120の撮影画像のデータをその撮影時のISO感度などの撮影パラメータと共に取得して、撮影画像内の色差を表す情報を生成する。
FIG. 1 is a diagram showing an example of a system configuration to which the present invention can be applied. The
図2は、画像処理装置100のハードウェア構成の一例を示す図である。画像処理装置100は、CPU101、RAM102、HDD103、汎用インタフェース(I/F)104、モニタ108、メインバス109を備える。汎用I/F104は、デジタル撮像装置110、マウスやキーボードなどの入力装置106、メモリカードなどの外部メモリ107をメインバス109に接続する。本実施形態では、ユーザが指定した一つの基準値に対する色差を、チャート120の撮影画像における画素毎に算出し、規定の閾値以下の色差を一定値に置き換えることで、ノイズの影響を排除した色差マップを生成する。図3は、そのような色差マップの生成を可能にする画像処理装置100のソフトウェア構成を示す機能ブロック図であり、画像入力部201、基準値設定部202、閾値設定部203、色差マップ生成部204、表示制御部206を備える。色差マップ生成部204は、さらに色変換部205、色差算出部206、色差置換部207で構成される。これら各部は、CPU101がHDD103に格納された所定のプログラムをRAM102に展開しこれを実行することで実現される。なお、以下に示す各実施形態では、測色対象の被写体として、モノクロの市松模様のチャート120を用いて説明を行なっている。しかし、市松模様のチャートは本実施形態を分かりやすく説明するための便宜的なものであり、実際の測色対象の被写体としては、立体的な形状を持つ物品(例えば自動車などの工業製品)が想定される。
FIG. 2 is a diagram illustrating an example of a hardware configuration of the
図4は、本実施形態に係る、色差情報生成処理の流れを示すフローチャートである。この色差情報生成処理は、例えば図5に示すUI画面を介したユーザ操作に基づき実行される。以下、図4のフロー に沿って説明する。なお、以下の説明における記号「S」はステップを表す。 FIG. 4 is a flowchart showing the flow of color difference information generation processing according to this embodiment. This color difference information generation processing is executed based on, for example, a user operation via the UI screen shown in FIG. Hereinafter, description will be made along the flow of FIG. In the following description, the symbol “S” represents a step.
S401では、被写体としてのチャート120の撮像画像のデータが取得される。ユーザが、図5に示すUI画面500内の「画像入力」ボタン501を押下すると、撮影画像データの格納場所のアドレス等を入力するサブウィンドウ(不図示)が表示され、ユーザは当該サブウィンドウで対象の撮影画像を指定して「OK」ボタン505を押下する。すると、処理対象の撮影画像のデータが読み込まれ、UI画面500内の画像表示エリア504に表示される。いま、画像表示エリア504には、市松模様のチャート120を撮影した画像が表示されている。なお、撮影画像データは、デジタル撮像装置110や外部メモリ107から読み込まれる。この際、入力された撮像画像データをHDD103などの記憶装置に一旦記憶しておき、それを読み出して取得してもよい。
In S401, captured image data of the
次に、S402では、S401で取得した撮影画像において色差を算出する際の基準となる色信号値、具体的には、輝度成分と色度成分とで特定される色信号値(以下、「基準値」と表記)が設定される。ユーザが、図5に示すUI画面500内の「基準値指定」ボタン502を押下した上で、画像表示エリア504内でポインタを移動させるなどして任意の位置を指定して「OK」ボタン505を押下すると、当該指定した位置の色信号値が基準値として設定される。一般に、デジタル撮像装置110で撮影された画像はRGB表色系のRGB値で表現されているため、これを例えばCIELAB表色系のLab値へ変換することで、輝度成分と色度成分とからなる基準値が設定されることになる。本実施形態では、ユーザが指定した位置の座標点におけるRGB値がLab値へ変換されて基準値が設定される。こうして設定された基準値の情報は、その座標点の情報と対応付けてRAM102等に保持される。図6は、基準値が指定される様子を示す図である。この例では、ユーザが指定した位置が×印で示されており、撮影画像上の当該×印の座標点(x0,y0)におけるLab値(L0,a0,b0)のデータがRAM102に保存される。
Next, in S402, a color signal value serving as a reference in calculating a color difference in the captured image acquired in S401, specifically, a color signal value (hereinafter referred to as “reference”, which is specified by a luminance component and a chromaticity component). Value)) is set. After the user presses the “reference value designation”
そして、S403では、S402で設定された基準値を基に色差マップの生成がなされる。ユーザが、図5に示すUI画面500内の「色差算出」ボタン503を押下すると、色差マップの生成が開始される。図7は、色差マップ生成処理の詳細を示すフローチャートである。以下、図7のフローに沿って詳しく説明する。
In S403, a color difference map is generated based on the reference value set in S402. When the user presses a “color difference calculation”
S701では、ノイズ成分を除去するための閾値thが設定される。本実施形態では、予め用意した所定値(例えば色差ΔE=1.0)をHDD103から読み出して、閾値thとして設定する。この際、S402で設定された基準値に応じて異なる閾値thが設定されるよう複数の値を用意しておいてもよい。例えば、基準値が黒のときは閾値を大きくし、基準値が白のときは閾値を小さくするといった具合である。
In S701, a threshold th for removing a noise component is set. In the present embodiment, a predetermined value (for example, color difference ΔE = 1.0) prepared in advance is read from the
S702では、S401で取得した撮影画像に対し色変換処理が実行される。本実施形態では、デジタル撮像装置110に依存したRGB色空間から均等色空間であるLab色空間へ変換行列によって変換する。取得した撮影画像における、左上から水平方向にx画素目、垂直方向にy画素目の各8bitのRGB値を、それぞれR(x,y)、G(x,y)、B(x,y)として、具体的な色変換処理について説明する。まず、各RGB値を0以上1以下の値に正規化した後、入力画像の撮影に使用したデジタル撮像装置105のγ特性をかけ、輝度リニアな色データR´、G´、B´を求める。R´、G´、B´はそれぞれ以下の式(1)〜式(3)で表される。
R´(x,y)={R(x,y)/255}^γ ・・・式(1)
G´(x,y)={G(x,y)/255}^γ ・・・式(2)
B´(x,y)={B(x,y)/255}^γ ・・・式(3)
In S702, a color conversion process is performed on the captured image acquired in S401. In the present embodiment, conversion is performed from a RGB color space depending on the
R ′ (x, y) = {R (x, y) / 255} ^ γ Expression (1)
G ′ (x, y) = {G (x, y) / 255} ^ γ Expression (2)
B ′ (x, y) = {B (x, y) / 255} ^ γ Expression (3)
次に、R´G´B´で示される色データをCIEXYZ表色系の三刺激値X、Y、Zへと変換する。CIEXYZ表色系の示すXYZ値は、撮像デバイスや撮影条件に非依存の色信号値であり、例えば、分光放射輝度計で測定された分光放射輝度の値と等色関数を畳み込み演算して求めることができる。R´G´B´/XYZ変換行列は、例えば3行3列の行列である。この3行3列の行列と、R´G´B´値に対応した3行1列の行列との行列積は、XYZ値に対応した3行1列の行列を示す。よって、行列積を計算することによって、R´G´B´値をXYZ値に変換できる。具体的には以下の式(4)〜式(6)によりX、Y、Zへ変換する。 Next, the color data indicated by R′G′B ′ is converted into tristimulus values X, Y, and Z of the CIEXYZ color system. The XYZ value indicated by the CIEXYZ color system is a color signal value that is independent of the imaging device and imaging conditions, and is obtained by, for example, convolving a color matching function with a spectral radiance value measured by a spectral radiance meter. be able to. The R′G′B ′ / XYZ conversion matrix is, for example, a 3 × 3 matrix. The matrix product of the 3 × 3 matrix and the 3 × 1 matrix corresponding to the R′G′B ′ value indicates a 3 × 1 matrix corresponding to the XYZ value. Therefore, R′G′B ′ values can be converted into XYZ values by calculating the matrix product. Specifically, it is converted into X, Y, and Z by the following formulas (4) to (6).
X(x,y)= m11×R´(x,y)+ m12×G´(x,y)+ m13×B´(x,y) ・・・式(4)
Y(x,y)= m21×R´(x,y)+ m22×G´(x,y)+ m23×B´(x,y) ・・・式(5)
Z(x,y)= m31×R´(x,y)+ m32×G´(x,y)+ m33×B´(x,y) ・・・式(6)
上記式(4)〜式(6)において、m11〜m33は、R´G´B´/XYZ変換行列Mの要素であり、例えば、ITU−T BT.709において規定される色変換行列Mは、以下の式(7)で表される。
X (x, y) = m11 × R ′ (x, y) + m12 × G ′ (x, y) + m13 × B ′ (x, y) (4)
Y (x, y) = m21 × R ′ (x, y) + m22 × G ′ (x, y) + m23 × B ′ (x, y) (5)
Z (x, y) = m31 × R ′ (x, y) + m32 × G ′ (x, y) + m33 × B ′ (x, y) (6)
In the above formulas (4) to (6), m11 to m33 are elements of the R′G′B ′ / XYZ conversion matrix M. For example, ITU-T BT. The color conversion matrix M defined in 709 is expressed by the following equation (7).
色変換行列Mを、上記式(7)の値に代えて、チャートの撮影結果からデジタル撮像装置110及び撮影条件毎に求めてもよい。さらに、以下の式(8)〜式(10)を用いて、XYZ値からLab値へと変換する。
L(x,y)=116(Y(x,y)/Yw)^(1/3)−16 ・・・式(8)
a(x,y)=500((X(x,y)/Xw)^(1/3)−(Y(x,y)/Yw)^(1/3)) ・・・式(9)
b(x,y)=200((Y(x,y)/Yw)^(1/3)−(Z(x,y)/Zw)^(1/3)) ・・・式(10)
The color conversion matrix M may be obtained for each
L (x, y) = 116 (Y (x, y) / Yw) ^ (1/3) -16 Expression (8)
a (x, y) = 500 ((X (x, y) / Xw) ^ (1/3)-(Y (x, y) / Yw) ^ (1/3)) (9)
b (x, y) = 200 ((Y (x, y) / Yw) ^ (1/3)-(Z (x, y) / Zw) ^ (1/3)) (10)
なお、上記式(8)〜式(10)において、Xw、Yw、Zwは、例えばCIE(国際照明員会)の定義では基準白色面の三刺激値であり、それぞれ以下の式(11)〜式(13)で表される。
Xw=95.039/100.0 ・・・式(11)
Yw=1.0 ・・・式(12)
Zw=108.880/100.0 ・・・式(13)
In addition, in said Formula (8)-Formula (10), Xw, Yw, Zw is a tristimulus value of a reference | standard white surface, for example in the definition of CIE (international lighting association), respectively, respectively the following formula | equation (11)- It is represented by Formula (13).
Xw = 95.039 / 100.0 Formula (11)
Yw = 1.0 Formula (12)
Zw = 108.880 / 100.0 Formula (13)
ここではRGB色空間からLab色空間への色変換を説明したが、Lab色空間以外の視覚均等色空間(例えば、YUVなど)に色変換してもよい。また、変換行列に代えて、例えば三次元LUTを用いて色変換を行ってもよい。 Although the color conversion from the RGB color space to the Lab color space has been described here, the color conversion may be performed to a visual uniform color space (for example, YUV) other than the Lab color space. Further, instead of the conversion matrix, color conversion may be performed using, for example, a three-dimensional LUT.
S703では、S401で取得した撮影画像の各画素における色差の算出がなされる。S402で設定された基準値としてのLab値を(L0,a0,b0)、撮影画像内の任意の画素位置(x,y)におけるLab値を(L(x,y),a(x,y),b(x,y))とすると、各画素位置における色差ΔEは、以下の式(14)にて表される。 In S703, a color difference is calculated for each pixel of the captured image acquired in S401. The Lab value as the reference value set in S402 is (L 0 , a 0 , b 0 ), and the Lab value at any pixel position (x, y) in the captured image is (L (x, y) , a ( x, y) , b (x, y) ), the color difference ΔE at each pixel position is expressed by the following equation (14).
S704では、S703で算出した画素毎の色差ΔE(x,y)の値を、S701で設定した閾値thを用いて置換する処理(色差置換処理)が実行される。具体的には、ΔE(x,y)の値が閾値th以下である場合に、ΔE(x,y)の値を規定値constに置き換える。ΔE(x,y)の値が閾値thよりも大きい場合は、当該画素の色差はそのままとなる。この場合において、規定値constは、前述の閾値th以下の任意の値であり、例えば閾値thの半分や0といった値である。また、規定値constは予め用意したものをHDD103から読み出して用いることを想定しているがこれに限定されない。例えば、図5に示すUI画面500内に「規定値指定」ボタン(不図示)を別途設け、当該ボタンの押下に応じて、規定値を入力可能なサブウィンドウを表示させるなどして、ユーザが任意の規定値constを指定できるようにしてもよい。撮影画像内の全画素に対して色差置換処理を終えると、当該置換後の色差値を可視化した色差マップが生成される。図8(a)は、図6で示すx0ライン上における色差置換処理を行なわない場合の色差を示した、従来の1次元の色差マップである。いま、市松模様の暗部において基準値が指定されているため、市松模様の暗部(黒マス)に相当する区間の色差は小さく、明部(白マス)に相当する区間の色差は大きくなっている。そして、ギザギザの部分は、ノイズの影響で色差値が一定になっていないことを示している。図9(a)は、このときの暗部(1つの黒マス)における色差を示した2次元の色差マップで、基準値からの色差が小さいほど黒に近く、大きいほど白に近く表現されている。つまり、黒の中でグレーに近い部分がノイズを表していることになる。これに対し、図8(b)は、図6で示すx0ライン上における色差置換処理を行った場合の色差を示した、本実施形態で生成される1次元の色差マップである。市松模様の暗部(黒マス)内の色差のうち閾値以下の部分が規定値const=0に置き換えられた結果、暗部に相当する区間ではギザギザがなくなり色差が一定になっている。図9(b)は、図9(a)に対応する色置換後の色差を示した2次元の色差マップであり、基準値からの色差のばらつきがないため、グレーの部分がない均一な黒になっている。こうして、撮影画像の各画素について色差置換処理を行った結果がモニタ108に表示される。例えば、被写体が市松模様のチャート120である場合、暗部(黒マス)部分については図9(b)に示すようなノイズのない画像となって表示されることになる。
In S704, a process of replacing the value of the color difference ΔE (x, y) for each pixel calculated in S703 using the threshold th set in S701 (color difference replacement process) is executed. Specifically, when the value of ΔE (x, y) is equal to or smaller than the threshold th, the value of ΔE (x, y) is replaced with a specified value const. When the value of ΔE (x, y) is larger than the threshold th, the color difference of the pixel remains unchanged. In this case, the specified value const is an arbitrary value that is equal to or smaller than the above-described threshold th, and is, for example, a value such as half of the threshold th or 0. In addition, it is assumed that the specified value const is read out from the
以上が、本実施形態に係る、色差情報生成処理の内容である。なお、本実施形態では撮影画像を用いて基準値を設定したがこれに限定されない。撮影画像に代えて、基準となる被写体を撮影した画像を用いてもよいし、さらには特定の色信号値をユーザが直接指定できるようにユーザインタフェースを構成してもよい。また、本実施形態では、色変換後の色空間としてLab色空間を、色差としてΔEを、それぞれ用いたがこれに限定されない。例えば、色変換後の色空間として色の物理値の差に着目する場合はXYZ色空間を用いてもよい。また、ΔEよりも視覚と整合性の高いΔE00を用いてもよい。 The above is the content of the color difference information generation process according to the present embodiment. In the present embodiment, the reference value is set using the captured image, but the present invention is not limited to this. Instead of the photographed image, an image obtained by photographing the reference subject may be used, or the user interface may be configured so that the user can directly specify a specific color signal value. In this embodiment, the Lab color space is used as the color space after color conversion, and ΔE is used as the color difference, but the present invention is not limited to this. For example, when paying attention to the difference between physical values of colors as a color space after color conversion, an XYZ color space may be used. Alternatively, ΔE00 having higher visual consistency than ΔE may be used.
以上のとおり本実施形態によれば、ノイズが除去された色差マップをユーザに提供できる。 As described above, according to the present embodiment, a color difference map from which noise is removed can be provided to the user.
実施形態1では、色差置換処理で適用する閾値を予め用意した固定値としていた。次に、撮影画像のノイズ特性に基づき、より適切な閾値を動的に設定する態様を、実施形態2として説明する。なお、色差マップ生成の基本的な流れは実施形態1の図4のフローと同じであるので、以下では相違点である閾値の設定処理を中心に説明することとする。 In the first embodiment, the threshold applied in the color difference replacement process is a fixed value prepared in advance. Next, a mode in which a more appropriate threshold value is dynamically set based on the noise characteristics of the captured image will be described as a second embodiment. Since the basic flow of color difference map generation is the same as the flow of FIG. 4 of the first embodiment, the following description will focus on threshold value setting processing that is a difference.
図10は、図4のフローにおけるS401に対応する、本実施形態の閾値設定処理の詳細を示すフローチャートである。以下、図4のフローを参照しつつ、図10のフローに沿って詳しく説明ずる。 FIG. 10 is a flowchart showing details of the threshold setting process of the present embodiment corresponding to S401 in the flow of FIG. Hereinafter, it will be described in detail along the flow of FIG. 10 with reference to the flow of FIG.
S1001では、S402で設定された基準値の情報、より詳細には、撮影画像においてユーザが指定した画素位置の色変換前のRGB値が取得される。以下、本ステップで取得したRGB値を、それぞれR0、B0、G0で表すこととする。 In S1001, information on the reference value set in S402, more specifically, the RGB value before color conversion at the pixel position specified by the user in the captured image is acquired. Hereinafter, the RGB values acquired in this step are represented by R 0 , B 0 , and G 0 , respectively.
S1002では、S401で取得された撮影画像のノイズ特性を示すデータ、具体的には、撮影時のノイズ量に関するデータが取得される。図11(a)は、ノイズ量データの一例としての、ISO感度とノイズの標準偏差とを対応付けたテーブルである。図11(a)に示すテーブルでは、ISO感度値に応じたノイズの標準偏差の値が、RGBのプレーン毎に格納されている。以下では、RGBそれぞれの標準偏差をSR、SG、SBと表記する。なお、本実施形態では、ノイズ量としてノイズの標準偏差を用いるがこれに限定されるものではなく、ノイズ量を特定可能な他の指標であってもよい。このようなノイズ量データを予め用意して例えばHDD103に格納しておき、それを読み込んで取得する。
In S1002, data indicating the noise characteristics of the captured image acquired in S401, specifically, data relating to the amount of noise during shooting is acquired. FIG. 11A is a table associating ISO sensitivity and noise standard deviation as an example of noise amount data. In the table shown in FIG. 11A, the standard deviation value of noise corresponding to the ISO sensitivity value is stored for each RGB plane. Hereinafter, the standard deviations of RGB are expressed as S R , S G , and S B. In the present embodiment, the noise standard deviation is used as the noise amount, but the present invention is not limited to this, and may be another index that can specify the noise amount. Such noise amount data is prepared in advance and stored in the
S1003では、S1001で取得した基準値(RGB値)とS1002で取得したノイズ量とに基づいて、閾値を算出する処理(閾値算出処理)が実行される。図12は、閾値算出処理の詳細を示すフローチャートである。以下、図12のフローに沿って説明する。 In S1003, based on the reference value (RGB value) acquired in S1001 and the noise amount acquired in S1002, a process for calculating a threshold (threshold calculation process) is executed. FIG. 12 is a flowchart showing details of the threshold value calculation process. Hereinafter, a description will be given along the flow of FIG.
S1201では、S1002で取得したノイズ量データを参照して、RGBのプレーン毎にノイズ区間が設定される。各プレーンにおけるノイズ区間は、以下の式(15)〜式(17)でそれぞれ表される。
Rのノイズ区間:[LR=R0−k×SR,UR=R0−k×SR] ・・・式(15)
Gのノイズ区間:[LG=G0−k×SG,UG=G0−k×SG] ・・・式(16)
Bのノイズ区間:[LB=B0−k×SB,UB=B0−k×SB] ・・・式(17)
In S1201, the noise interval is set for each RGB plane with reference to the noise amount data acquired in S1002. The noise section in each plane is expressed by the following equations (15) to (17).
R noise interval: [L R = R 0 −k × S R , U R = R 0 −k × S R ] (15)
Noise section of G: [L G = G 0 −k × S G , U G = G 0 −k × S G ] (16)
Noise section of B: [L B = B 0 −k × S B , U B = B 0 −k × S B ] Expression (17)
上記式(15)〜式(17)において、kはノイズ区間の大きさを設定する定数を示す。また、LR、LG、LBはそれぞれRGBのノイズ区間の下限値を表し、UR、UG、UBはそれぞれRGBのノイズ区間の上限値を表す。例えば定数k=2と設定した場合、ノイズの95パーセントを色差マップから除外することができる。 In the above formulas (15) to (17), k represents a constant that sets the size of the noise interval. L R , L G , and L B each represent a lower limit value of the RGB noise interval, and U R , U G , and U B each represent an upper limit value of the RGB noise interval. For example, when the constant k = 2 is set, 95% of the noise can be excluded from the color difference map.
S1202では、S1201で設定したRGB各プレーンのノイズ区間に対し、前述の図7のフローのS702で説明した色変換処理を施すことによって、Lab色空間におけるノイズ区間が求められる。いま、RGBのノイズ区間の下限値(LR, LG, LB)に対して色変換した結果を(LL,aL,bL)とし、RGBのノイズ区間の上限値(UR,UG,UB)に対して色変換した結果を(LU,aU,bU)とする。このとき、Lab色空間におけるノイズ区間は、以下の式(18)〜式(20)でそれぞれ表される。
Lのノイズ区間:[LL,LU] ・・・式(18)
aのノイズ区間:[aL,aU] ・・・式(19)
bのノイズ区間:[bL,bU] ・・・式(20)
In S1202, the noise section in the Lab color space is obtained by performing the color conversion processing described in S702 of the flow of FIG. 7 described above on the noise section of each RGB plane set in S1201. Now, let the result of color conversion for the lower limit values (L R , L G , L B ) of the RGB noise interval be (L L , a L , b L ), and the upper limit value (U R , The result of color conversion for U G , U B ) is defined as (L U , a U , b U ). At this time, the noise section in the Lab color space is expressed by the following equations (18) to (20).
L noise interval: [L L , L U ] (18)
Noise interval of a: [a L , a U ] (19)
Noise interval of b: [b L , b U ] (20)
S1203では、S1202で求めたLab色空間におけるノイズ区間に基づき、閾値が算出される。例えば、Lab色空間における下限値(LL,aL,bL)と基準値との色差ΔELと、Lab色空間における上限値(LU,aU,bU)と基準値との色差ΔEUのうち、大きい方の値を、閾値thとする。これを式で表すと、以下の式(21)となる。 In S1203, a threshold value is calculated based on the noise section in the Lab color space obtained in S1202. For example, the color difference ΔE L between the lower limit value (L L , a L , b L ) and the reference value in the Lab color space, and the color difference between the upper limit value (L U , a U , b U ) and the reference value in the Lab color space. The larger value of ΔE U is set as a threshold th. This is expressed by the following equation (21).
なお、ここではΔELとΔEUとの最大値をとって閾値thとしているが、これに限定されない。例えば、ΔELとΔEUとの平均値やこれらの線形和としてもよいし、最小値をとってもよい。以下に、デジタル撮像装置110のγ特性としてγ=2.2、上述の式(15)〜式(17)における定数k=2であって、基準値として(R,G、B)=(128,128,128)が設定されたという条件下で得られる閾値の具体例を、場合を分けて説明する。
Here, the maximum value of ΔE L and ΔE U is taken as the threshold value th, but is not limited to this. For example, an average value of ΔE L and ΔE U , a linear sum thereof, or a minimum value may be taken. In the following, γ = 2.2 as the γ characteristic of the
(ISO感度が100の場合)
この場合、図11(a)のテーブルより、ノイズの標準偏差(SR,SG,SB)=(1.0,1.3,1.2)である。そして、RGBのノイズ区間は、前述の式(15)〜式(17)より以下のようになる。
Rのノイズ区間:[126,130]
Gのノイズ区間:[125.4,130.6]
Bのノイズ区間:[125.6,130.4]
(When ISO sensitivity is 100)
In this case, the noise standard deviation (S R , S G , S B ) = (1.0, 1.3, 1.2) from the table of FIG. Then, the RGB noise interval is as follows from the above-described equations (15) to (17).
R noise interval: [126, 130]
G noise interval: [125.4, 130.6]
B noise interval: [125.6, 130.4]
これを色変換処理して得られるLabのノイズ区間は、上述の式(18)〜式(20)より以下のようになる。
Lのノイズ区間:[43.5,45.2]
aのノイズ区間:[−4.7,−5.3]
bのノイズ区間:[−8.6,−8.7]
そして、上述の式(21)より、閾値th=0.92が得られる。
The Lab noise interval obtained by color conversion processing is as follows from the above-described equations (18) to (20).
L noise interval: [43.5, 45.2]
Noise interval of a: [−4.7, −5.3]
Noise interval of b: [−8.6, −8.7]
Then, the threshold th = 0.92 is obtained from the above equation (21).
(ISO感度が25600の場合)
この場合、図11(a)のテーブルより、ノイズの標準偏差(SR,SG,SB)=(14.2,15.2,13.2)である。そして、RGBのノイズ区間は、前述の式(15)〜式(17)より以下のようになる。
Rのノイズ区間:[99.6,156.4]
Gのノイズ区間:[97.6,158.4]
Bのノイズ区間:[101.6,154.4]
(When ISO sensitivity is 25600)
In this case, from the table of FIG. 11A, the standard deviation of noise (S R , S G , S B ) = (14.2, 15.2, 13.2). Then, the RGB noise interval is as follows from the above-described equations (15) to (17).
R noise interval: [99.6, 156.4]
G noise interval: [97.6, 158.4]
Noise interval of B: [101.6, 154.4]
これを色変換処理して得られるLabのノイズ区間は、上述の式(18)〜式(20)より以下のようになる。
Lのノイズ区間:[33.7,54.3]
Gのノイズ区間:[−2.5,−7.4]
Bのノイズ区間:[−12.5,−5.4]
The Lab noise interval obtained by color conversion processing is as follows from the above-described equations (18) to (20).
L noise interval: [33.7, 54.3]
G noise interval: [−2.5, −7.4]
B noise interval: [-12.5, -5.4]
そして、上述の式(21)より、閾値th=11.6が得られる。このようにして決定された閾値thが、色差置換処理で使用する閾値thとして設定されることになる。 Then, the threshold th = 11.6 is obtained from the above equation (21). The threshold value th thus determined is set as the threshold value th used in the color difference replacement process.
以上が、本実施形態に係る、閾値設定処理の内容である。なお、本実施形態では、デバイス依存のRGB色空間におけるノイズ量データを保持しておき、それをLab色空間へと変換することで閾値を求めていたがこれに限定されない。例えば、Lab色空間でのノイズ量データを直接保持しておき、そのノイズ量データからLab色空間におけるノイズ区間を導出してもよい。この場合、色変換処理は不要となる。 The above is the content of the threshold setting process according to the present embodiment. In the present embodiment, the noise amount data in the device-dependent RGB color space is stored and converted into the Lab color space, and the threshold value is obtained. However, the present invention is not limited to this. For example, noise amount data in the Lab color space may be directly held, and a noise section in the Lab color space may be derived from the noise amount data. In this case, color conversion processing is not necessary.
<変形例>
上述の例では、ISO感度とノイズの標準偏差と対応付けたデータを、撮影画像のノイズ量を表すデータとして取得していた。しかしながら、ノイズ量には撮影条件だけでなく被写体の階調も影響する。そこで、図11(b)に示すような被写体の階調も考慮したテーブル(ノイズ量をISO感度と階調値との双方に対応付けたテーブル)を用意し、S1002ではこれを参照してノイズ量を取得してもよい。なお、ISO感度と階調値との一部の組合せに対応するノイズの標準偏差のみテーブルに記載しておき保存しており、基準値として設定されたRGB値に応じて例えば線形補間することでノイズ量を決定してもよい。これにより、カメラノイズの輝度依存性を考慮した閾値thとなるので、より好適な色差マップを得ることができる。
<Modification>
In the above-described example, the data associated with the ISO sensitivity and the noise standard deviation is acquired as data representing the noise amount of the captured image. However, the amount of noise affects not only the shooting conditions but also the gradation of the subject. Therefore, a table (table in which the amount of noise is associated with both the ISO sensitivity and the gradation value) taking into account the gradation of the subject as shown in FIG. 11B is prepared. An amount may be obtained. Note that only the standard deviation of noise corresponding to some combinations of ISO sensitivity and gradation value is stored in the table and stored, for example, by linear interpolation according to the RGB value set as the reference value. The amount of noise may be determined. As a result, the threshold th takes into account the luminance dependence of camera noise, and a more suitable color difference map can be obtained.
以上のとおり本実施形態によれば、撮影時のノイズ量に応じた閾値が設定されるので、ノイズに起因する色差を除外した、より好適な色差マップを得ることが可能となる。 As described above, according to the present embodiment, a threshold corresponding to the amount of noise at the time of shooting is set, so that it is possible to obtain a more suitable color difference map that excludes color differences caused by noise.
実施形態2では、撮影時のノイズ量に関するデータに基づき色差置換処理で適用する閾値を動的に決定する態様を説明した。次に、ノイズの分布が正規分布ではなくより複雑な形状をしている場合にも対応できるよう、撮影画像のノイズ分布状況を示すデータを参照して閾値を決定する態様について、実施形態3として説明する。なお、実施形態1及び2と共通する内容については説明を省略することとし、以下では、相違点である閾値の設定処理を中心に説明することとする。 In the second embodiment, the aspect in which the threshold value to be applied in the color difference replacement process is dynamically determined based on the data regarding the noise amount at the time of shooting has been described. Next, an embodiment in which the threshold value is determined with reference to data indicating the noise distribution status of the photographed image so as to cope with a case where the noise distribution is not a normal distribution but has a more complicated shape will be described as a third embodiment. explain. In addition, suppose that description about the content which is common in Embodiment 1 and 2 is abbreviate | omitted, and suppose that it sets centering on the setting process of the threshold value which is a difference below.
図13は、実施形態2の図10のフローに対応する、本実施形態の閾値設定処理の詳細を示すフローチャートである。以下、本実施形態にも共通する図4のフローを参照しつつ、図13のフローに沿って詳しく説明ずる。 FIG. 13 is a flowchart showing details of the threshold setting process of the present embodiment, corresponding to the flow of FIG. 10 of the second embodiment. Hereinafter, it will be described in detail along the flow of FIG. 13 with reference to the flow of FIG. 4 which is also common to the present embodiment.
S1301では、S402で設定された基準値の情報(撮影画像においてユーザが指定した画素位置の色変換前のRGB値)が取得される。続くS1302では、S1301で取得した基準値に基づいて、ノイズ分布データが取得される。図14(a)は、ノイズ分布量データの一例としての、Rプレーンにおけるノイズのヒストグラムであり、階調値毎のノイズの頻度が示されている。図14 (a)のヒストグラムの場合、基準値に対して左右非対称にノイズが分布していることになる。なお、ノイズの分布状況が分かればよいので、ヒストグラムに代えて、例えばノイズの分布を近似した数式をノイズ分布データとして用いてもよい。このようなノイズ分布データを予め用意して例えばHDD103に格納しておき、それを読み込んで取得する。
In S1301, information on the reference value set in S402 (RGB value before color conversion at the pixel position specified by the user in the captured image) is acquired. In subsequent S1302, noise distribution data is acquired based on the reference value acquired in S1301. FIG. 14A is a noise histogram in the R plane as an example of noise distribution amount data, and shows the frequency of noise for each gradation value. In the case of the histogram in FIG. 14A, noise is distributed asymmetrically with respect to the reference value. Since it is only necessary to know the noise distribution status, for example, a mathematical expression approximating the noise distribution may be used as the noise distribution data instead of the histogram. Such noise distribution data is prepared in advance and stored in the
S1303では、S1301で取得した基準値とS1302で取得したノイズ分布データとに基づいて、閾値算出処理が実行される。その流れは実施形態2における閾値算出処理と同じであるので、前述の図12のフローに沿って説明する。 In S1303, a threshold value calculation process is executed based on the reference value acquired in S1301 and the noise distribution data acquired in S1302. Since the flow is the same as the threshold value calculation process in the second embodiment, description will be made along the flow of FIG.
S1201では、S1302で取得したノイズ分布データを参照して、RGBのプレーン毎にノイズ区間が設定される。RGBそれぞれのノイズ区間[LR,UR]、[LG,UG]、[LB,UB]は、ノイズ区間内の頻度の総和が一定値となるように決定される。具体的には、それぞれ以下の式(22)にて求められる。 In S1201, the noise interval is set for each RGB plane with reference to the noise distribution data acquired in S1302. The noise intervals [L R , U R ], [L G , U G ], and [L B , U B ] for each of RGB are determined so that the sum of frequencies in the noise interval becomes a constant value. Specifically, it is obtained by the following equation (22).
上記式(22)において、cは区間の頻度を設定するための変数を表す。また、histR(t)、histG(t)、histB(t)は、階調tにおけるRGBそれぞれのノイズ分布を表し、以下の式(23)の関係を満たす。 In the above equation (22), c represents a variable for setting the frequency of the section. Furthermore, histR (t), histG (t), and histB (t) represent RGB noise distributions in the gradation t, and satisfy the relationship of the following equation (23).
図14(b)は、図14(a)に示すノイズ分布の状態で、上記式(22)におけるcの値が0.025の場合のRプレーンのノイズ区間[LR,UR]を示している。図14(b)において、LRは区間[0,LR]におけるノイズ頻度が全体の2.5%になるように、URは区間[UR,255]におけるノイズ頻度が全体の2.5%になるように設定されており、ノイズ全体の95%が存在する区間となっている。 FIG. 14B shows the noise section [L R , U R ] of the R plane when the value of c in the above equation (22) is 0.025 in the state of the noise distribution shown in FIG. ing. In FIG. 14 (b), L R is the interval [0, L R] as noise frequency is the entire 2.5% in, U R is the noise frequency in the interval [UR, 255] of the total 2.5 % Is set to be 95% of the entire noise.
以降のS1202及びS1203は、実施形態2で説明したとおりであるので説明を省く。なお、本実施形態では、デバイス依存のRGB色空間におけるノイズ分布データを保持しておき、それをLab色空間へと変換することで閾値を求めていたがこれに限定されない。例えば、Lab色空間でのノイズ分布データを直接保持しておき、そのノイズ分布データからLab色空間におけるノイズ区間を導出してもよい。この場合、色変換処理は不要となる。 Subsequent S1202 and S1203 are the same as those described in the second embodiment, and thus description thereof is omitted. In the present embodiment, the noise distribution data in the device-dependent RGB color space is held, and the threshold value is obtained by converting it into the Lab color space. However, the present invention is not limited to this. For example, noise distribution data in the Lab color space may be directly held, and a noise section in the Lab color space may be derived from the noise distribution data. In this case, color conversion processing is not necessary.
以上のとおり本実施形態によれば、ノイズの分布形状が複雑な場合でも、色差置換処理における適切な閾値thを動的に決定することができ、より好適な色差マップを得ることが可能となる。 As described above, according to the present embodiment, even when the noise distribution shape is complicated, it is possible to dynamically determine the appropriate threshold th in the color difference replacement process, and to obtain a more suitable color difference map. .
これまでの実施形態では、設定する基準値は1つであったが、各実施形態で設定可能な基準値の数は1つに限定されない。次に、実施形態1をベースとして複数の基準値を設定する態様について、実施形態4として説明する。なお、実施形態1と共通する部分については説明を省略ないしは簡略化し、以下では差異点を中心に説明するものとする。 In the embodiments so far, the reference value to be set is one, but the number of reference values that can be set in each embodiment is not limited to one. Next, an embodiment in which a plurality of reference values are set based on the first embodiment will be described as a fourth embodiment. In addition, description is abbreviate | omitted or simplified about the part which is common in Embodiment 1, and it shall demonstrate below centering on difference.
色差情報としての色差マップを生成する際の基本的な流れは実施形態1の図4のフローと同じであるので、以下、図4のフローに沿って説明する。 Since the basic flow when generating the color difference map as the color difference information is the same as the flow of FIG. 4 of the first embodiment, the following description will be made along the flow of FIG.
S401では、色差マップ生成処理の対象となる撮像画像のデータが取得される。続く、S402において、S401で取得した撮影画像における色差を算出する際の基準値が複数設定される。基準値の設定の仕方は実施形態1と基本的には同じである。例えば前述の図5のUI画面500でユーザが「基準値指定」ボタン502を押下した後に、設定しようとする基準値の数を指定するサブウィンドウをポップアップ表示させるなどして、複数の基準値が指定できるようにすればよい。ここでは2つの基準値を設定する場合を例に、以下説明を行うこととする。ユーザは、例えば図15に示すように、×印で表した2つの点を画像表示エリア504内でそれぞれ指定する。これにより、撮影画像上の当該2つの×印で示す、座標(x0,y0)の指定点1と座標(x0,y1)の指定点2に対応する2つのLab値((L0,a0,b0)と(L1,a1,b1))のデータがRAM102に保存される。
In S401, captured image data to be subjected to color difference map generation processing is acquired. In S402, a plurality of reference values for calculating the color difference in the captured image acquired in S401 are set. The method of setting the reference value is basically the same as in the first embodiment. For example, after the user presses the “reference value designation”
そして、S403では、指定された2つの基準値に基づき、色差マップが生成される。図16は、本実施形態に係る、複数の基準値が設定された場合の色差マップ生成処理の詳細を示すフローチャートである。このフローは、実施形態1の図7のフローに対応する。以下、図16のフローに沿って説明する。 In step S403, a color difference map is generated based on the two specified reference values. FIG. 16 is a flowchart showing details of the color difference map generation processing when a plurality of reference values are set according to the present embodiment. This flow corresponds to the flow of FIG. 7 of the first embodiment. Hereinafter, it demonstrates along the flow of FIG.
S1601では、S701と同様、ノイズ成分を除去するための閾値th(例えば色差ΔE=1.0)が設定される。続くステップ1602では、S702と同様、S401で取得した撮影画像に対し色変換処理が実行され、実施形態1と同様、RGB色空間からLab色空間へ変換される。 In S1601, similarly to S701, a threshold th (for example, color difference ΔE = 1.0) for removing a noise component is set. In the subsequent step 1602, similarly to S702, a color conversion process is performed on the captured image acquired in S401, and the RGB color space is converted to the Lab color space as in the first embodiment.
そして、S1603では、S402で設定された全基準値の中から、注目する基準値が1つ決定される。続くS1604では、S703と同様、前述の式(14)を用いて、S401で取得した撮影画像の各画素における色差ΔE(x,y)の算出がなされる。 In S1603, one reference value to be noticed is determined from all the reference values set in S402. In subsequent S1604, as in S703, the color difference ΔE (x, y) in each pixel of the captured image acquired in S401 is calculated using the above-described equation (14).
S1605では、S1604で算出した画素毎の、注目する基準値からの色差ΔE(x,y)の値を、S1601で設定した閾値thを用いて規定値constに置き換える色差置換処理が実行される。この際、規定値constの値は基準値毎に変えてもよいし、同一でもよい。本実施形態では、指定点1に対応する第1の基準値については規定値const=0とし、指定点2に対応する第2の基準値については第1の基準値と第2の基準値との差分値を規定値constとする。 In S1605, a color difference replacement process is executed in which the value of the color difference ΔE (x, y) from the reference value of interest calculated for each pixel calculated in S1604 is replaced with the specified value const using the threshold th set in S1601. At this time, the value of the specified value const may be changed for each reference value or may be the same. In the present embodiment, the first reference value corresponding to the designated point 1 is set to the specified value const = 0, and the second reference value corresponding to the designated point 2 is set to the first reference value and the second reference value. The difference value is defined as a specified value const.
S1606では、全ての基準値に対して色差置換処理が完了したかどうかが判定される。未処理の基準値があれば、S1603に戻って処理が続行される。一方、すべての基準値について色差置換処理が完了していれば、本処理を終了する。ここで、具体例を用いて説明する。図17(a)は、図15におけるx0ラインを横軸にとり、注目する基準値を第1の基準値とした場合の色差ΔE(x,y)を縦軸にとった1次元の色差マップである。また、図17(b)は、図15におけるx0ラインを横軸にとり、注目する基準値を第2の基準値とした場合の色差ΔE(x,y)を縦軸にとった1次元の色差マップである。そして、図17(c)は、第1の基準値からの色差に対して、色差の置換えを行った後の1次元の色差マップである。図17(a)における閾値th以下の画素(黒マスの画素)については規定値const(=0)に置き換えられ、図17(b)における閾値以下の画素(白マスの画素)については第1の基準値と第2の基準値との差分値で置き換えられている。これにより、ノイズが除去されて、市松模様の明部と暗部が共に平坦化された色差マップが得られる。実施形態1と比較すると、明部におけるノイズも除去できるため、より好適な色差マップとなる。 In S1606, it is determined whether or not the color difference replacement process has been completed for all the reference values. If there is an unprocessed reference value, the process returns to S1603 and the process is continued. On the other hand, if the color difference replacement process has been completed for all the reference values, this process ends. Here, it demonstrates using a specific example. FIG. 17A is a one-dimensional color difference map in which the horizontal axis is the x0 line in FIG. 15 and the vertical axis is the color difference ΔE (x, y) when the target reference value is the first reference value. is there. FIG. 17B is a one-dimensional color difference in which the x0 line in FIG. 15 is taken on the horizontal axis and the color difference ΔE (x, y) is taken on the vertical axis when the target reference value is the second reference value. It is a map. FIG. 17C is a one-dimensional color difference map after the color difference is replaced with respect to the color difference from the first reference value. In FIG. 17A, the pixels below the threshold th (black square pixels) are replaced with the specified value const (= 0), and the pixels below the threshold (white square pixels) in FIG. The difference value between the reference value and the second reference value is replaced. Thereby, noise is removed, and a color difference map in which both the bright and dark portions of the checkered pattern are flattened is obtained. Compared with the first embodiment, noise in the bright part can also be removed, so that a more suitable color difference map is obtained.
以上のとおり本実施形態によれば、カメラノイズが含まれた撮影結果に対して、複数の基準値に対してノイズ成分を除いた色差マップをユーザに提供できる。 As described above, according to the present embodiment, it is possible to provide a user with a color difference map obtained by removing noise components with respect to a plurality of reference values with respect to a photographing result including camera noise.
実施形態1〜4では、撮影画像を構成する全画素を対象として色差算出と色差置換の各処理を行って、2次元の色差マップを生成・表示することを前提としていた。次に、撮影画像内の特定のラインを対象として色差算出と色差置換の各処理を行って、色差情報として1次元のラインプロファイルを生成・表示する態様を、実施形態5として説明する。なお、他の実施形態と共通する部分については説明を省略ないしは簡略化し、以下では差異点を中心に説明するものとする。 In the first to fourth embodiments, it is assumed that a two-dimensional color difference map is generated and displayed by performing each of color difference calculation and color difference replacement for all pixels constituting a captured image. Next, an embodiment in which a color difference calculation process and a color difference replacement process are performed on a specific line in a captured image to generate and display a one-dimensional line profile as color difference information will be described as a fifth embodiment. In addition, description is abbreviate | omitted or simplified about the part which is common in other embodiment, and suppose that it demonstrates centering on difference below.
図18は、本実施形態でユーザが使用するUI画面の一例である。図19は、実施形態1の図4のフローに対応する、本実施形態に係るラインプロファイル生成処理の流れを示すフローチャートである。以下、図19のフローに沿って説明する。 FIG. 18 is an example of a UI screen used by the user in this embodiment. FIG. 19 is a flowchart showing the flow of line profile generation processing according to the present embodiment, corresponding to the flow of FIG. 4 of the first embodiment. Hereinafter, it demonstrates along the flow of FIG.
S1901では、S401と同様、ラインプロファイル生成処理の対象となる撮像画像のデータが取得される。ユーザが、図18に示すUI画面1800内の「画像入力」ボタン1801を押下すると、撮影画像データの格納場所を示すアドレス等を入力するサブウィンドウ(不図示)が表示され、ユーザは当該サブウィンドウで対象の撮影画像を指定して「OK」ボタン1806を押下する。すると、処理対象の撮影画像のデータが読み込まれ、UI画面1800内の画像表示エリア1805に表示される。
In S1901, similarly to S401, captured image data to be subjected to line profile generation processing is acquired. When the user presses an “image input”
次に、S1902では、S402と同様、S1901で取得した撮影画像において色差を算出する際の基準値が設定される。ユーザが、UI画面1800内の「基準値指定」ボタン1802を押下した上で、画像表示エリア1805内でポインタを移動させるなどして任意の位置を指定して「OK」ボタン1806を押下すると、当該指定した位置の色値が基準値として設定される。
Next, in S1902, a reference value for calculating a color difference in the captured image acquired in S1901 is set as in S402. When the user presses a “reference value designation”
そして、S1903では、S1901で取得した撮影画像内の特定のラインが、色差算出を行うラインとしてユーザ操作に基づき設定される。ユーザが、UI画面1800内の「色差算出ライン設定」ボタン1803を押下した上で、画像表示エリア1805内でマウス等で2つの点を指定し「OK」ボタン1806を押下すると、当該指定した2点を結ぶラインが色差算出の対象ラインとして設定される。画像表示エリア1805内の両方向矢印1810は、こうして設定された色差算出ラインを示している。なお、指定するラインは撮影画像に対して水平方向である必要はなく、垂直方向でも斜め方向でもよい。
In step S1903, the specific line in the captured image acquired in step S1901 is set based on a user operation as a line for calculating the color difference. When the user presses the “color difference calculation line setting”
S1904では、S1903で設定された色差算出ラインを対象として、S1902で設定された基準値を基に色差算出処理が実行される。ユーザが、図18に示すUI画面1800内の「色差算出」ボタン1804を押下すると、設定された色差算出ラインを対象としたラインプロファイルの生成が開始される。ここでの色差算出処理の内容は、基本的には実施形態1の図7のフローと同じである。ただし、その処理対象は、色差算出ラインに限定して実行される。こうして、撮影画像内の特定ライン上の色差を示す、前述の図8(b)に示すような1次元の色差マップ(=ラインプロファイル)が得られる。そして、当該ラインプロファイルが測色結果としてモニタ108に表示される。
In S1904, the color difference calculation process is executed based on the reference value set in S1902 for the color difference calculation line set in S1903. When the user presses a “color difference calculation”
以上が、本実施形態に係るラインプロファイル生成処理の内容である。このように、本発明の対象は撮影画像の全体でもその一部であってもよい。 The above is the content of the line profile generation process according to the present embodiment. As described above, the subject of the present invention may be the entire captured image or a part thereof.
(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
100 画像処理装置
201 基準値設定部
204 色差マップ生成部
205 色変換部
206 色差算出部
207 色差置換部
100
Claims (13)
輝度成分と色度成分を表す少なくとも一つの色信号値を、基準値として設定する基準値設定手段と、
前記撮影画像を構成する画素の色信号値を、輝度成分と色度成分を表す色信号値へと変換する色変換手段と、
前記変換によって得られた前記撮影画像を構成する画素の前記輝度成分と色度成分を表す色信号値に対して前記基準値からの色差を算出し、色差情報を生成する色差情報生成手段と、
を備え、
前記色差情報生成手段は、前記算出した色差が所定の閾値以下の場合、当該色差を規定値に置き換える
ことを特徴とする装置。 Acquisition means for acquiring a captured image of the object;
A reference value setting means for setting at least one color signal value representing a luminance component and a chromaticity component as a reference value;
Color conversion means for converting color signal values of pixels constituting the captured image into color signal values representing luminance components and chromaticity components;
Color difference information generating means for calculating a color difference from the reference value for a color signal value representing the luminance component and chromaticity component of the pixels constituting the captured image obtained by the conversion, and generating color difference information;
With
The color difference information generation unit replaces the color difference with a specified value when the calculated color difference is equal to or less than a predetermined threshold value.
前記ノイズ特性としてノイズ量を表すデータを取得する手段と、
取得したノイズ量データから所定のノイズ区間を設定する手段と、
前記所定のノイズ区間における下限値及び上限値と前記基準値との色差を表す値に基づき閾値を決定する手段と
を有することを特徴とする請求項3に記載の装置。 The threshold setting means includes
Means for obtaining data representing the amount of noise as the noise characteristics;
Means for setting a predetermined noise interval from the acquired noise amount data;
The apparatus according to claim 3, further comprising: means for determining a threshold value based on a value representing a color difference between a lower limit value and an upper limit value in the predetermined noise section and the reference value.
前記ノイズ特性としてノイズ分布を表すデータを取得する手段と、
取得したノイズ分布データから所定のノイズ区間を設定する手段と、
前記所定のノイズ区間における下限値及び上限値と前記基準値との色差を表す値に基づき閾値を決定する手段と
を有することを特徴とする請求項3に記載の装置。 The threshold setting means includes
Means for obtaining data representing a noise distribution as the noise characteristics;
Means for setting a predetermined noise interval from the acquired noise distribution data;
The apparatus according to claim 3, further comprising: means for determining a threshold value based on a value representing a color difference between a lower limit value and an upper limit value in the predetermined noise section and the reference value.
輝度成分と色度成分を表す少なくとも一つの色信号値を、基準値として設定するステップと、
前記撮影画像を構成する画素の色信号値を、輝度成分と色度成分を表す色信号値へと変換するステップと、
前記変換によって得られた前記撮影画像を構成する画素の前記輝度成分と色度成分を表す色信号値に対して前記基準値からの色差を算出し、色差情報を生成するステップと、
を含み、
前記色差情報を生成するステップでは、前記算出した色差が所定の閾値以下の場合、当該色差を一定値に置き換える
ことを特徴とする方法。 Obtaining a captured image of the object;
Setting at least one color signal value representing a luminance component and a chromaticity component as a reference value;
Converting color signal values of pixels constituting the captured image into color signal values representing luminance components and chromaticity components;
Calculating a color difference from the reference value for a color signal value representing the luminance component and chromaticity component of the pixels constituting the captured image obtained by the conversion, and generating color difference information;
Including
In the step of generating the color difference information, when the calculated color difference is equal to or less than a predetermined threshold, the color difference is replaced with a constant value.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018057934A JP7106318B2 (en) | 2018-03-26 | 2018-03-26 | Image processing device, image processing method and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018057934A JP7106318B2 (en) | 2018-03-26 | 2018-03-26 | Image processing device, image processing method and program |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JP2019169910A true JP2019169910A (en) | 2019-10-03 |
| JP2019169910A5 JP2019169910A5 (en) | 2021-04-22 |
| JP7106318B2 JP7106318B2 (en) | 2022-07-26 |
Family
ID=68107617
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2018057934A Active JP7106318B2 (en) | 2018-03-26 | 2018-03-26 | Image processing device, image processing method and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7106318B2 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2022012897A (en) * | 2020-07-02 | 2022-01-17 | キヤノン株式会社 | Image processing equipment, image processing methods and programs |
| JP2023100375A (en) * | 2022-01-06 | 2023-07-19 | キヤノン株式会社 | Information processing device, information processing method, and program |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005114531A (en) * | 2003-10-07 | 2005-04-28 | Olympus Corp | Image display device and image display method |
| JP2011075506A (en) * | 2009-10-01 | 2011-04-14 | Suzuki Motor Corp | Tooth contact face detector |
| JP2012169700A (en) * | 2011-02-09 | 2012-09-06 | Nikon Corp | Image processor, imaging apparatus, image processing program, and image processing method |
| JP2013207393A (en) * | 2012-03-27 | 2013-10-07 | Secom Co Ltd | Image monitoring device |
| WO2014013792A1 (en) * | 2012-07-19 | 2014-01-23 | ソニー株式会社 | Noise evaluation method, image processing device, imaging device, and program |
| WO2017151366A2 (en) * | 2016-03-04 | 2017-09-08 | 3M Innovative Properties Company | Device for measuring color difference, system, and recording medium |
-
2018
- 2018-03-26 JP JP2018057934A patent/JP7106318B2/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005114531A (en) * | 2003-10-07 | 2005-04-28 | Olympus Corp | Image display device and image display method |
| JP2011075506A (en) * | 2009-10-01 | 2011-04-14 | Suzuki Motor Corp | Tooth contact face detector |
| JP2012169700A (en) * | 2011-02-09 | 2012-09-06 | Nikon Corp | Image processor, imaging apparatus, image processing program, and image processing method |
| JP2013207393A (en) * | 2012-03-27 | 2013-10-07 | Secom Co Ltd | Image monitoring device |
| WO2014013792A1 (en) * | 2012-07-19 | 2014-01-23 | ソニー株式会社 | Noise evaluation method, image processing device, imaging device, and program |
| WO2017151366A2 (en) * | 2016-03-04 | 2017-09-08 | 3M Innovative Properties Company | Device for measuring color difference, system, and recording medium |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2022012897A (en) * | 2020-07-02 | 2022-01-17 | キヤノン株式会社 | Image processing equipment, image processing methods and programs |
| JP2023100375A (en) * | 2022-01-06 | 2023-07-19 | キヤノン株式会社 | Information processing device, information processing method, and program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP7106318B2 (en) | 2022-07-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10735627B2 (en) | Color conversion table creation apparatus and method, color conversion apparatus, and program | |
| EP1294177B1 (en) | Image processing method and apparatus | |
| US10602026B2 (en) | Image processing apparatus, image processing method, and non-transitory computer readable medium | |
| JP2004005694A (en) | Image processing method, digital image processor, digital camera, digital photograph finishing system, and program | |
| JP6929702B2 (en) | Information processing equipment, information processing methods and programs | |
| US8223396B2 (en) | Color conversion device for applying clipping to color values outside a color reproduction range and which satisfy a predetermined condition | |
| JP3990859B2 (en) | Color processing method and apparatus | |
| JP2019168930A (en) | Image processing device, image processing method and program | |
| JP7106318B2 (en) | Image processing device, image processing method and program | |
| JP5562005B2 (en) | Image processing apparatus and image processing method | |
| US20190073558A1 (en) | Information processing apparatus, information processing method, and computer program | |
| JP2019067365A (en) | IMAGE PROCESSING APPARATUS, IMAGE PROCESSING SYSTEM, IMAGE PROCESSING METHOD, AND PROGRAM | |
| JP4539964B2 (en) | Image segmentation | |
| JP2008177783A (en) | Color conversion device and program | |
| JP2012028973A (en) | Illumination light estimation device, illumination light estimation method, and illumination light estimation program | |
| JP2019165398A (en) | Image processing apparatus, image processing method and program | |
| JP6650975B2 (en) | Image processing apparatus and method | |
| JP2002131133A (en) | Method for specifying color of image, method for extracting color of image, and image processor | |
| JP2003016443A (en) | Method, device, and chart image for image quality evaluation | |
| JP2020088709A (en) | Image processing apparatus, image processing method and program | |
| JP4345027B2 (en) | Image processing program and image processing apparatus | |
| JP2020088800A (en) | Image processing device, image processing method, and program | |
| JP7604142B2 (en) | Image processing device, image processing method and program | |
| JP7366689B2 (en) | Image processing device, image processing method and program | |
| JP7321738B2 (en) | Image processing device, image processing method and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210310 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210310 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20211124 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20211130 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20220215 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220426 |
|
| C60 | Trial request (containing other claim documents, opposition documents) |
Free format text: JAPANESE INTERMEDIATE CODE: C60 Effective date: 20220426 |
|
| A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20220511 |
|
| C21 | Notice of transfer of a case for reconsideration by examiners before appeal proceedings |
Free format text: JAPANESE INTERMEDIATE CODE: C21 Effective date: 20220517 |
|
| 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: 20220614 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220713 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 7106318 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |