JP2006053682A - Image composing device and method - Google Patents
Image composing device and method Download PDFInfo
- Publication number
- JP2006053682A JP2006053682A JP2004233682A JP2004233682A JP2006053682A JP 2006053682 A JP2006053682 A JP 2006053682A JP 2004233682 A JP2004233682 A JP 2004233682A JP 2004233682 A JP2004233682 A JP 2004233682A JP 2006053682 A JP2006053682 A JP 2006053682A
- Authority
- JP
- Japan
- Prior art keywords
- color
- image
- composite
- region
- area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Images
Landscapes
- Image Processing (AREA)
- Studio Circuits (AREA)
- Editing Of Facsimile Originals (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
Abstract
Description
本発明は、画像合成装置及び方法に関し、特に、撮影の日付や時刻などの撮影情報をカラー画像として撮影画像に合成する装置及び方法に関する。 The present invention relates to an image synthesizing apparatus and method, and more particularly to an apparatus and method for synthesizing shooting information such as shooting date and time as a color image into a shot image.
従来、デジタルカメラには、フィルムカメラと同様のデータ(日付、撮影情報などの文字情報)写し込み機能が付けられている。
例えば、特許文献1に開示されたデジタルカメラにおいては、元画像(撮影画像)が淡色系のときは、黒で文字情報を写し込む一方、元画像が濃色系のときは白で文字情報を写し込む。これによって、文字情報を背景から容易に識別することができる。
For example, in the digital camera disclosed in
最近、ユーザの多様な趣味感に応えるため、文字情報のカラー化が考えられている。
しかし、特許文献1では、文字情報をカラー化したとき、背景から容易に識別できるようにすることは開示されていない。
そこで、本発明は、撮影日付などの撮影情報をカラー化して元画像に写し込んだとき、元画像から明瞭に区別することができる画像合成装置及び方法を提供することを目的とする。
Recently, colorization of character information has been considered in order to respond to various tastes of users.
However,
SUMMARY OF THE INVENTION An object of the present invention is to provide an image composition apparatus and method that can clearly distinguish photographing information such as a photographing date from the original image when the photographing information is colored and copied to the original image.
上述した課題を解決するため、文字情報の色をあらかじめ指定してカラー文字情報を元画像中に合成する際、元画像中の合成領域の色に応じて合成画像(撮影情報)の色を補正する。
また、文字情報の色をあらかじめ指定しないときは、合成領域の色に応じて合成画像(撮影情報)の色を決定する。
In order to solve the above-described problems, when the color of character information is specified in advance and the color character information is synthesized in the original image, the color of the synthesized image (shooting information) is corrected according to the color of the synthesis area in the original image. To do.
When the color of the character information is not designated in advance, the color of the composite image (photographing information) is determined according to the color of the composite area.
ここに、元画像中の合成領域の色は、合成領域の1以上の画素の色を、2次元色座標上で定義された複数の色領域のいずれかに振り分けてヒストグラムを作成し、そのヒストグラムと所定閾値とに基づいて、決定される。
具体的には、請求項1に係る発明は、合成画像を元画像の合成領域中に合成する際、あらかじめ設定した合成画像の色を補正してから上記合成領域中に合成する画像合成装置において、2次元色座標を複数の色領域に分割し、上記合成領域の1以上の画素の色を上記色領域のいずれかに振り分けてヒストグラムを作成するヒストグラム作成手段と、上記ヒストグラム作成手段の出力に接続され、上記ヒストグラムと所定閾値とに基づいて、上記合成領域の色領域を決定する色領域決定手段と、上記色領域決定手段の出力に接続され、上記決定された色領域と上記合成画像の色領域との一致・不一致を判定する色一致判定手段と、上記色一致判定手段の出力に接続され、上記色領域の一致が判定されたとき、上記ヒストグラムと上記所定閾値とに基づいて、上記合成画像の色を補正する色補正手段とを備えることを特徴とする。
Here, the color of the composite area in the original image is created by assigning the color of one or more pixels in the composite area to one of a plurality of color areas defined on the two-dimensional color coordinates, and generating the histogram And a predetermined threshold.
Specifically, the invention according to
また、請求項2に係る発明は、請求項1記載の画像合成装置において、上記2次元色座標は、色差信号Cr及びCbによる直交座標であることを特徴とする。
また、請求項3に係る発明は、請求項1記載の画像合成装置において、上記色領域決定手段は、さらに、上記合成領域の1以上の画素の輝度信号Yに基づいて、上記合成領域の色領域を決定することを特徴とする。
According to a second aspect of the present invention, in the image composition device according to the first aspect, the two-dimensional color coordinates are orthogonal coordinates based on the color difference signals Cr and Cb.
According to a third aspect of the present invention, in the image synthesizing apparatus according to the first aspect, the color area determining means further includes a color of the synthesis area based on a luminance signal Y of one or more pixels of the synthesis area. A region is determined.
また、請求項4に係る発明は、請求項1記載の画像合成装置において、上記色補正手段は、上記ヒストグラムと所定閾値とに基づいて、上記合成画像の色差信号Cr及びCbを補正することを特徴とする。
また、請求項5に係る発明は、請求項4記載の画像合成装置において、上記色補正手段は、上記ヒストグラムと所定閾値とに基づき、且つ、上記合成画像の輝度信号Yaと上記合成領域の平均輝度信号Ybの差分に基づき、上記合成画像の輝度信号Yaを補正することを特徴とする。
According to a fourth aspect of the present invention, in the image synthesizing apparatus according to the first aspect, the color correcting unit corrects the color difference signals Cr and Cb of the synthesized image based on the histogram and a predetermined threshold value. Features.
According to a fifth aspect of the present invention, in the image synthesizing apparatus according to the fourth aspect, the color correction means is based on the histogram and a predetermined threshold value, and is an average of the luminance signal Ya of the synthesized image and the synthesized area. The luminance signal Ya of the composite image is corrected based on the difference of the luminance signal Yb.
また、請求項6に係る発明は、請求項1記載の画像合成装置を使用する画像合成方法において、2次元色座標を複数の色領域に分割し、上記合成領域の1以上の画素の色を上記色領域のいずれかに振り分けたヒストグラムを作成するヒストグラム作成ステップと、上記ヒストグラムと所定閾値とに基づいて、上記合成領域の色領域を決定する色領域決定ステップと、上記決定された色領域と上記合成画像の色との色領域の一致・不一致を、上記ヒストグラムと上記所定閾値とに基づいて、判定する色領域一致判定ステップと、上記色領域の一致が判定されたとき、上記ヒストグラムと上記所定閾値とに基づいて、上記合成画像の色を補正する色補正ステップとを備えることを特徴とする。
The invention according to
また、請求項7に係る発明は、請求項6記載の画像合成方法において、上記色領域決定ステップにおいて、上記2次元色座標は、色差信号Cr及びCbを直交座標であることを特徴とする。
また、請求項8に係る発明は、請求項7記載の画像合成方法において、上記色領域決定ステップにおいて、さらに、上記合成領域の1以上の画素の輝度信号Yに基づいて、上記合成領域の色領域を決定する。
According to a seventh aspect of the present invention, in the image synthesizing method according to the sixth aspect, in the color region determining step, the two-dimensional color coordinates are color difference signals Cr and Cb.
According to an eighth aspect of the present invention, in the image composition method according to the seventh aspect, in the color region determination step, the color of the composite region is further based on a luminance signal Y of one or more pixels of the composite region. Determine the area.
また、請求項9に係る発明は、請求項6記載の画像合成方法において、上記色補正ステップにおいて、上記ヒストグラムと所定閾値とに基づいて、上記合成画像の色差信号Cr及びCbを補正する。
また、請求項10に係る発明は、請求項6記載の画像合成方法において、上記色補正ステップにおいて、上記ヒストグラムと所定閾値とに基き、且つ、上記合成画像の輝度信号Yaと上記合成領域の平均輝度信号Ybの差分に基づき、上記合成画像の輝度信号Yaを補正することを特徴とする。
According to a ninth aspect of the present invention, in the image synthesizing method according to the sixth aspect, in the color correction step, the color difference signals Cr and Cb of the synthesized image are corrected based on the histogram and a predetermined threshold value.
According to a tenth aspect of the present invention, in the image synthesizing method according to the sixth aspect, in the color correction step, the luminance signal Ya of the synthesized image and the average of the synthesized area are based on the histogram and a predetermined threshold value. The luminance signal Ya of the composite image is corrected based on the difference of the luminance signal Yb.
また、請求項11に係る発明は、合成画像を元画像の合成領域中に合成する際、あらかじめ合成画像の色を設定することなく、上記合成領域の色に基づいて上記合成画像の色を決定する画像合成装置において、2次元色座標を複数の色領域に分割し、上記合成領域の1以上の画素の色を上記色領域のいずれかに振り分けてヒストグラムを作成するヒストグラム作成手段と、上記ヒストグラム作成手段の出力に接続され、上記ヒストグラムと所定閾値とに基づいて、上記合成画像の色を決定する合成画像色決定手段とを備えることを特徴とする。
The invention according to
また、請求項12に係る発明は、請求項11記載の画像合成装置において、上記2次元座標は、色差信号Cb及びCrによる直交座標であることを特徴とする。
また、請求項13に係る発明は、請求項11記載の画像合成装置において、上記色領域決定手段は、さらに、上記合成領域の1以上の画素の輝度信号Yに基づいて、上記合成領域の色領域を決定することを特徴とする。
According to a twelfth aspect of the present invention, in the image synthesizing apparatus according to the eleventh aspect, the two-dimensional coordinates are orthogonal coordinates based on the color difference signals Cb and Cr.
According to a thirteenth aspect of the present invention, in the image synthesizing apparatus according to the eleventh aspect, the color area determining means further includes a color of the synthesis area based on a luminance signal Y of one or more pixels of the synthesis area. A region is determined.
また、請求項14に係る発明は、請求項11記載の画像合成装置において、上記合成画像色決定手段は、上記ヒストグラムと所定閾値とに基づいて、上記合成画像の色差信号Cr及びCbを決定する。
また、請求項15に係る発明は、請求項11記載の画像合成装置において、上記合成画像色決定手段は、上記ヒストグラムと所定閾値とに基づき、且つ、上記合成画像の輝度信号Yaと上記合成領域の平均輝度信号Ybの差分に基づき、上記合成画像の輝度信号Yを補正することを特徴とする。
According to a fourteenth aspect of the present invention, in the image synthesizing apparatus according to the eleventh aspect, the synthesized image color determining means determines the color difference signals Cr and Cb of the synthesized image based on the histogram and a predetermined threshold value. .
According to a fifteenth aspect of the present invention, in the image synthesizing apparatus according to the eleventh aspect, the synthesized image color determining means is based on the histogram and a predetermined threshold, and the luminance signal Ya of the synthesized image and the synthesized region. The luminance signal Y of the composite image is corrected based on the difference of the average luminance signal Yb.
また、請求項16に係る発明は、請求項11記載の画像合成装置を使用する画像合成方法において、2次元色座標を複数の色領域に分割し、上記合成領域の1以上の画素の色を上記色領域のいずれかにに振り分けてヒストグラムを作成するヒストグラム作成ステップと、上記ヒストグラムと所定閾値とに基づいて、上記合成領域の色領域を決定する色領域決定ステップと、上記ヒストグラムと上記所定閾値とに基づいて、上記合成画像の色を決定する色決定ステップとを備えることを特徴とする。 According to a sixteenth aspect of the present invention, in the image synthesizing method using the image synthesizing device according to the eleventh aspect, the two-dimensional color coordinate is divided into a plurality of color areas, and the colors of one or more pixels in the synthetic area are obtained. A histogram creation step for creating a histogram by allocating to any of the color regions, a color region determination step for determining a color region of the composite region based on the histogram and a predetermined threshold, the histogram and the predetermined threshold And a color determining step for determining the color of the composite image based on the above.
また、請求項17に係る発明は、請求項16記載の画像合成方法において、上記色領域決定ステップにおいて、上記2次元色座標は、色差信号Cr及びCbを直交座標とする2次元色座標であることを特徴とする。
また、請求項18に係る発明は、請求項17記載の画像合成方法において、上記色領域決定ステップにおいて、さらに、上記合成領域の1以上の画素の輝度信号Yに基づいて、上記合成領域の色領域を決定することを特徴とする。
According to a seventeenth aspect of the present invention, in the image composition method according to the sixteenth aspect, in the color region determining step, the two-dimensional color coordinates are two-dimensional color coordinates having color difference signals Cr and Cb as orthogonal coordinates. It is characterized by that.
According to an eighteenth aspect of the present invention, in the image composition method according to the seventeenth aspect, in the color region determination step, the color of the composite region is further based on a luminance signal Y of one or more pixels of the composite region. A region is determined.
また、請求項19に係る発明は、請求項17記載の画像合成方法において、上記色決定ステップにおいて、上記ヒストグラムと所定閾値とに基づいて、上記合成画像の色差信号Cr及びCbを決定することを特徴とする。
また、請求項20に係る発明は、請求項19記載の画像合成方法において、上記色決定正ステップにおいて、上記ヒストグラムと所定閾値とに基づき、且つ、上記合成画像の輝度信号Yaと上記合成領域の平均輝度信号Ybの差分に基づき、上記合成画像の輝度信号Yaを決定することを特徴とする。
According to a nineteenth aspect of the present invention, in the image composition method according to the seventeenth aspect, in the color determination step, the color difference signals Cr and Cb of the composite image are determined based on the histogram and a predetermined threshold value. Features.
According to a twentieth aspect of the present invention, in the image composition method according to the nineteenth aspect, in the color determination step, the luminance signal Ya of the composite image and the composite region are determined based on the histogram and a predetermined threshold value. The luminance signal Ya of the composite image is determined based on the difference of the average luminance signal Yb.
本発明によれば、合成画像(撮影日時などの撮影情報)をカラー化して元画像(撮影画像)の合成領域に写し込んだとき、合成画像を合成領域から明瞭に識別することができる。 According to the present invention, when a composite image (photographing information such as a photographing date and time) is colorized and copied into a composite region of an original image (photographed image), the composite image can be clearly identified from the composite region.
以下、図面を参照して、本発明の実施形態について説明する。
[画像合成装置]
図1は、デジタルカメラなどのデジタル撮像機器に内蔵された画像合成装置のブロック図である。
図1に示すように、デジタル撮像機器内では、レンズ系1で被写体をCCD2に結像し、光電変換信号をA/D3(アナログデジタル変換器)でデジタル撮像信号へと変換し、そのデジタル撮像信号をフレームメモリ4に格納する。その後、階調補正やエッジ強調などの画像処理を画像処理部5で行い、さらに、圧縮処理部6で、JPEG(Joint Photographic Experts Group)規格などで画像圧縮する。
Embodiments of the present invention will be described below with reference to the drawings.
[Image composition device]
FIG. 1 is a block diagram of an image composition apparatus built in a digital imaging device such as a digital camera.
As shown in FIG. 1, in a digital imaging device, a subject is imaged on a
画像合成装置10は、圧縮処理手段6の出力に接続されており、カラー合成画像(例えば、撮影日付などの撮影情報)と圧縮処理手段6の出力であるデジタル画像(元画像)を合成して、不揮発性半導体メモリなどの記録手段7に出力する。
この画像合成時には、カラー合成画像が、元画像中の合成領域から明瞭に識別されるようにするため、必要な場合には、画像合成装置10の判断により、合成画像の色が補正される。なお、合成画像の色をあらかじめ指定しないときは、合成領域の色に基づいて、合成画像の色が決定される。
The
At the time of this image composition, the color composition image is corrected by the judgment of the
ここに、画像合成装置10は、撮影日時などの合成画像を生成する合成画像生成手段11と、元画像(撮像画像)中に合成画像(撮影情報)を合成するための領域を設定する合成領域設定手段12と、合成画像を合成領域に合成することができるか否かを判定する合成領域検出手段13と、合成画像の色を決定又は補正する合成画像色決定・補正手段14と、合成画像と元画像を合成する画像合成手段15と、画像合成が不可能であるときに警告を発する警告手段16とを備えている。
Here, the
なお、画像合成装置10は、演算回路、シフトレジスタ、メモリ、入出力回路等から構成された半導体電子回路を含み、プログラムにより、合成画像生成手段11、合成領域設定手段12、合成領域検出手段13、合成画像色決定・補正手段14、画像合成手段15として機能し、ブザー、ディスプレイ、バイブレータなどの警告手段16を駆動する。
そして、画像合成装置15から、合成画像が元画像とともに記録手段7(不揮発性半導体メモリなど)へ出力される。
The
Then, the composite image is output from the
図2は、合成画像色決定・補正手段14のブロック図である。
図2に示すように、合成画像色決定・補正手段14は、合成領域の画素を、2次元色座標上で定義された複数の色領域に振り分けたヒストグラムを作成するヒストグラム作成手段21と、そのヒストグラムと所定の閾値とに基づいて、合成領域の色を決定する色領域決定手段22と、あらかじめ指定された合成画像の色と合成領域の色とが一致するか否かを判定する色一致判定手段23と、両者の色が一致すると判定されたとき、合成画像の色を補正する合成画像色補正手段24とを備える。
FIG. 2 is a block diagram of the composite image color determination / correction means 14.
As shown in FIG. 2, the composite image color determining / correcting
なお、必ずしも、合成画像の色をあらかじめ指定する必要はなく、その場合は、制御手段30から、色指定がない旨の制御信号を切替手段31に出力し、色領域決定手段22の出力を、切替手段31を介して合成画像色決定手段25に入力させる。なお、あらかじめ合成画像の色が指定されたときは、制御手段30から、色指定がなされた旨の制御信号を切替手段31に出力し、色領域決定手段22の出力を、切替手段31を介して色一致判定手段23に入力させる。
Note that it is not always necessary to specify the color of the composite image in advance. In this case, the
こうして、合成画像色補正手段24又は合成画像色決定手段25の出力が画像合成手段15に入力され、合成画像と元画像とが合成される。
ここで、2次元色座標について説明する。
色を座標値で表す表色系は、CIE(国際照明委員会)によれば、赤(R)、緑(G)、青(B)の波長領域での3刺激値X、Y、Zに基づいたxy直交座標系があり、この座標系で色度座標(x、y)をプロットした平面図形をxy色度図と呼んでいる。ここに、x=X/(X+Y+Z)、y=Y/(X+Y+Z)である。
In this way, the output of the synthesized image
Here, the two-dimensional color coordinate will be described.
According to the CIE (International Commission on Illumination), the color system that expresses colors by coordinate values is tristimulus values X, Y, and Z in the red (R), green (G), and blue (B) wavelength regions. There is an xy orthogonal coordinate system based on this, and a plane figure in which chromaticity coordinates (x, y) are plotted in this coordinate system is called an xy chromaticity diagram. Here, x = X / (X + Y + Z) and y = Y / (X + Y + Z).
また、CIEのUCS色度図は、u’=4X /(X+15Y+3Z)、v’=9Y/(X+15Y+3Z)として、u’v’直交座標系上のプロットである。
を定め、これをUCS色度図と呼んでいる。
また、CIEのL*a*b* 表色系は、
L* = 116(Y/Yn)1/3 − 16
a* = 500((X/Xn)1/3 − (Y/Yn)1/3)
b* = 200((Y/Yn)1/3 − (Z/Zn)1/3)
で定義された3次元直交座標によるプロットである。ここに、Xn、Yn、Znは、特定の白色物体(完全拡散反射面)の3刺激値である。
The UCS chromaticity diagram of the CIE is a plot on the u′v ′ orthogonal coordinate system where u ′ = 4X / (X + 15Y + 3Z) and v ′ = 9Y / (X + 15Y + 3Z).
This is called the UCS chromaticity diagram.
The CIE L * a * b * color system is
L * = 116 (Y / Yn) 1 / 3-16
a * = 500 ((X / Xn) 1 /3-(Y / Yn) 1/3 )
b * = 200 ((Y / Yn) 1 /3-(Z / Zn) 1/3 )
Is a plot in three-dimensional Cartesian coordinates defined in Here, Xn, Yn, and Zn are tristimulus values of a specific white object (complete diffuse reflection surface).
CIEによるこれらの色度図(2次元直交座標系)が、2次元色座標に該当することはもちろんである。
しかし、本実施形態では、簡単のため、色差信号Cr及びCbによる2次元直交座標を例として説明する。
ここに、3原色信号を、R(赤)、G(緑)、B(青)とすると、
Y = 0.299*R + 0.587*G + 0.144*B
Cr= 0.50000*R−0.41869*G−0.08131*B+128
Cb=−0.16874*R−0.33126+*G+0.50000*B+128
で定義する。ただし、3原色信号を各色8ビットとして、Cr及びCbに”128”のオフセットを加えている。
It goes without saying that these chromaticity diagrams (two-dimensional orthogonal coordinate system) by CIE correspond to two-dimensional color coordinates.
However, in this embodiment, for the sake of simplicity, a description will be given by taking two-dimensional orthogonal coordinates based on the color difference signals Cr and Cb as an example.
Here, if the three primary color signals are R (red), G (green), and B (blue),
Y = 0.299 * R + 0.587 * G + 0.144 * B
Cr = 0.50000 * R−0.41869 * G−0.0811 * B + 128
Cb = −0.16874 * R−0.33126 + * G + 0.50000 * B + 128
Define in. However, an offset of “128” is added to Cr and Cb, assuming that the three primary color signals are 8 bits for each color.
次に、図3を参照して、CrCb2次元色座標上で定義される色領域について説明する。
図3に示すように、一例として、CrCb座標系が9つの色領域に分割されている。
色領域1から色領域8までは、半径128の円を8分割したものであり、各象限が2分割されている。また、色領域9は、座標原点を中心とし、彩度が低い色領域であり、色領域9の半径は、適宜に設定する。
Next, with reference to FIG. 3, the color area defined on the CrCb two-dimensional color coordinate will be described.
As shown in FIG. 3, as an example, the CrCb coordinate system is divided into nine color regions.
From the
次に、図4(A)、図4(B)、図4(C)を参照して、合成領域の画素のヒストグラムについて説明する。
各ヒストグラムは、合成領域の各画素がどの色領域に属するかを計数したものである。なお、必ずしもすべての画素を計数する必要はないが、ヒストグラムを安定させるため、ある程度多くの画素を計数するとよい。
Next, with reference to FIGS. 4A, 4 </ b> B, and 4 </ b> C, a histogram of pixels in the synthesis area will be described.
Each histogram is a count of which color region each pixel in the synthesis region belongs to. Note that it is not always necessary to count all the pixels, but a certain number of pixels may be counted to stabilize the histogram.
図4(A)では、色領域4の画素数が閾値より大きい。このように、閾値を超える色領域がただ1つである場合は、色領域決定手段22は、当該色領域の色を合成領域の色であると決定する。
図4(B)では、色領域4と色領域7の画素数が閾値より大きい。このように、閾値を超える色領域が2つ以上である場合は、色領域決定手段22は、閾値を超えたすべての色領域(この場合は、色領域4及び色領域7)の色を合成領域の色であると決定する。
In FIG. 4A, the number of pixels in the
In FIG. 4B, the number of pixels in the
なお、後述するように、図4(A)の場合と、図4(B)の場合では、合成画像の色の補正方法又は決定方法は異なる。
一方、図4(C)では、所定閾値を超える色領域が1つも存在しない。この場合には、合成領域は識別力のある色を有さないため、色領域決定手段22は、合成領域の色を決定しない。
As will be described later, the method for correcting or determining the color of the composite image differs between the case of FIG. 4A and the case of FIG. 4B.
On the other hand, in FIG. 4C, there is no color region exceeding the predetermined threshold. In this case, since the combined area does not have a discriminating color, the color
[画像合成方法]
図5は、画像合成方法を説明するためのフローチャートである。
まず、S1において、元画像(撮像画像)中の合成領域を検出し、合成画像(撮影日時などの撮影情報)を合成することができるかどうか判定する。
ここで、図6、図7を参照して、図5のS1をさらに説明する。
[Image composition method]
FIG. 5 is a flowchart for explaining the image composition method.
First, in S1, a composite area in the original image (captured image) is detected, and it is determined whether the composite image (capturing information such as the shooting date and time) can be combined.
Here, S1 of FIG. 5 will be further described with reference to FIGS.
図6は、合成画像領域を示す図である。
図6に示すように、元画像寸法は、デジタル撮像機器側の図示しない設定手段により設定されており、横W、縦Lの寸法を有し、元画像の左上端をxy座標の原点としている。また、合成領域は、合成領域設定手段12によって設定されており、横h、縦vの寸法を有し、合成領域の左上端の座標が(x、y)としている。
FIG. 6 is a diagram illustrating a composite image area.
As shown in FIG. 6, the original image dimensions are set by setting means (not shown) on the digital imaging device side, have horizontal W and vertical L dimensions, and the upper left corner of the original image is the origin of the xy coordinates. . The composite area is set by the composite area setting means 12, has dimensions of horizontal h and vertical v, and the coordinates of the upper left corner of the composite area are (x, y).
図7は、S1を詳細に説明するためのフローチャートである。
まず、S11において、合成領域検出手段13は、合成画像生成手段11により生成された合成画像寸法a×bを読み込む。
次に、S12において、合成領域検出手段13は、合成領域設定手段により設定された合成領域寸法h×vを読み込む。
FIG. 7 is a flowchart for explaining S1 in detail.
First, in S <b> 11, the composite
Next, in S12, the composite
次に、S13において、合成領域検出手段13は、デジタル撮像機器側から元画像寸法W×Lを読み込む。
次に、S14において、合成領域検出手段13は、画像合成は可能か否かを判定する。a<h、b<vであれば画像合成は可能である。
ここで、S14において、画像合成が可能であると判定されれば、図5のフローチャートのS2に進む。
Next, in S13, the composite
Next, in S <b> 14, the synthesis
If it is determined in S14 that image composition is possible, the process proceeds to S2 in the flowchart of FIG.
一方、S14において、画像合成は可能ではないと判定されたときは、S15に進み、合成領域検出手段13は、警告手段16に警告(表示、音声、振動などによる)を出させて、全処理を終了する。
次に、図5のフローチャートに戻り、図7のS14から図5のS2に進んだ後の処理について説明する。
On the other hand, if it is determined in S14 that image composition is not possible, the process proceeds to S15, where the composition
Next, returning to the flowchart of FIG. 5, the processing after proceeding from S <b> 14 of FIG. 7 to S <b> 2 of FIG. 5 will be described.
図5のS2において、ヒストグラム作成手段21は、図4(A)、図4(B)、図4(C)に例示したようなヒストグラムを作成する。
次に、S3において、制御手段30は、合成画像の色は指定されているか否かを判定する。
ここで、S3において、合成画像の色が指定されていないと判定されれば、制御手段30は切替手段31を介して、色領域決定手段22の出力を合成画像色決定手段25に入力させ、S5に進んで、合成画像色決定手段25が合成画像の色を決定した後、S8に進んで、画像合成手段15が画像合成を行う。
In S2 of FIG. 5, the histogram creation means 21 creates a histogram as illustrated in FIGS. 4A, 4B, and 4C.
Next, in S3, the control means 30 determines whether or not the color of the composite image is designated.
Here, if it is determined in S3 that the color of the composite image is not designated, the control means 30 causes the output of the color area determination means 22 to be input to the composite image color determination means 25 via the switching means 31, Proceeding to S5, the synthesized image
一方、S3において、合成画像の色が指定されていると判定されれば、S4に進み、色一致判定手段23が、合成画像と合成領域が属する色領域は一致するか否かを判定する。
ここで、S4において、合成画像と合成領域の色領域は一致すると判定されれば、S6に進んで合成画像の色を補正し、その後で、S8において、画像合成を行う。
一方、S4において、合成画像と合成領域の色領域は一致しないと判定されれば、S7に進んで合成画像の色を補正せず、S8に進んで、画像合成を行う。
On the other hand, if it is determined in S3 that the color of the composite image is designated, the process proceeds to S4, and the color matching determination unit 23 determines whether or not the composite image and the color region to which the composite region belongs match.
Here, if it is determined in S4 that the color area of the composite image matches the color area of the composite area, the process proceeds to S6 to correct the color of the composite image, and then the image is combined in S8.
On the other hand, if it is determined in S4 that the color area of the composite image and the composite area do not match, the process proceeds to S7, the color of the composite image is not corrected, and the process proceeds to S8 to perform image composition.
[色補正方法]
次に、図8を参照して、図5のフローチャートのS6における合成画像(撮影日時などの撮影情報)の色補正方法について説明する。
図8に示すように、合成画像の色補正は、元画像(撮像画像)中の合成領域の画素の色領域ごとに作成したヒストグラムと、所定の閾値とを比較した結果に基づいて行われる。
ここに、所定の閾値は、あまり小さいと合成領域の色を決定することが困難になるため、合成領域の色を決定するために十分な大きさの値が経験的に定められる。
[Color correction method]
Next, with reference to FIG. 8, the color correction method of the composite image (shooting information such as the shooting date and time) in S6 of the flowchart of FIG. 5 will be described.
As shown in FIG. 8, the color correction of the composite image is performed based on a result of comparing a histogram created for each color region of the pixel in the composite region in the original image (captured image) with a predetermined threshold value.
Here, if the predetermined threshold is too small, it is difficult to determine the color of the synthesis area, and thus a value large enough to determine the color of the synthesis area is determined empirically.
すなわち、閾値を超える合成領域の色領域が1つ以上あれば、閾値を超えたすべての色領域の色が合成領域の色であると決定され、その決定に基づいて合成画像の色補正(又は輝度補正)が行われる。なお、閾値を超える合成画像の色領域が1つだけである場合と、2つ以上である場合とで、補正方法を異ならしめている。
一方、閾値を超える合成画像の色領域が全く存在しない場合は、合成領域の色は明確でないため、色領域を決定する必要はなく、色補正(又は輝度補正)も行わない。
That is, if there is at least one color area of the composite area that exceeds the threshold, the colors of all the color areas that exceed the threshold are determined to be the colors of the composite area, and based on the determination, color correction of the composite image (or Brightness correction). Note that the correction method is different between the case where there is only one color region of the composite image exceeding the threshold and the case where there are two or more color regions.
On the other hand, when there is no color area of the composite image exceeding the threshold value, the color of the composite area is not clear, so it is not necessary to determine the color area and color correction (or luminance correction) is not performed.
以下、色補正方法について具体的に説明する。
まず、S60において、ヒストグラム作成手段21が作成したヒストグラムを使用して、色領域決定手段22は、閾値を超える合成領域の色領域が1つであるか否かを判定する。
ここで、S60において、閾値を超える合成領域の色領域が1つではないと判定されたときは、S70に進み、閾値を超える合成領域の色領域が2つ以上であるか否かを判定する。S70に続く処理は後述する。
The color correction method will be specifically described below.
First, in S60, using the histogram created by the histogram creating means 21, the color area determining means 22 determines whether or not there is one color area of the combined area exceeding the threshold.
Here, in S60, when it is determined that there is not one color area of the synthesis area exceeding the threshold value, the process proceeds to S70, and it is determined whether or not there are two or more color areas of the synthesis area exceeding the threshold value. . Processing subsequent to S70 will be described later.
一方、S60において、閾値を超える合成領域の色領域が1つであると判定されたときは、S61に進み、色領域決定手段22は、合成領域の色は、当該閾値を超えた色領域の色であると決定する。
次に、S62において、色一致判定手段23は、合成領域の色が属する色領域は合成画像の色が属する色領域と同じであるか否かを判定する。
On the other hand, when it is determined in S60 that there is one color area of the composite area that exceeds the threshold, the process proceeds to S61, and the color area determination means 22 determines that the color of the composite area exceeds the threshold. Determine color.
Next, in S62, the color matching determination unit 23 determines whether the color area to which the color of the composite area belongs is the same as the color area to which the color of the composite image belongs.
ここで、S62において、両者の色領域は同じではないと判定されたときは、合成画像の色補正は不必要であるので、S81に進み、合成画像の色補正を行わずに、全処理を終了する。
一方、S62において、両者の色領域は同じであると判定されたときは、合成画像の色補正が必要となる。そこで、S63に進み、色一致判定手段23は、合成領域の色が属する色領域は特定色領域(図3に示した色領域9(低彩度領域))であるか否かを判定する。
Here, if it is determined in S62 that the two color regions are not the same, the color correction of the composite image is unnecessary, so the process proceeds to S81 and the entire process is performed without performing the color correction of the composite image. finish.
On the other hand, if it is determined in S62 that both color regions are the same, color correction of the composite image is required. In step S63, the color matching determination unit 23 determines whether the color area to which the color of the synthesis area belongs is a specific color area (color area 9 (low saturation area) illustrated in FIG. 3).
ここで、S63において、合成領域の色領域が特定色領域であると判定されれば、合成領域と合成画像はともに低彩度であるため、両者の輝度を異ならせることが適切である。そこで、S64に進んで、合成画像の輝度信号補正を行う。
具体的には、S64において、合成画像色補正手段24は、合成領域の輝度信号の平均値Yavを求める。そして、合成画像の輝度信号Y1との差分S(=Yav−Y1)を求める。
Here, if it is determined in S63 that the color area of the composite area is the specific color area, the composite area and the composite image are both low-saturated, so it is appropriate to make the brightness of the two different. Accordingly, the process proceeds to S64, and the luminance signal correction of the composite image is performed.
Specifically, in S64, the composite image
そして、合成画像の補正された輝度Y2を、例えば、
Y2=Y1+k・Sとする。ここに、係数kは正とする。これにより、合成画像の設定輝度Y1が合成領域の平均輝度より低いときは、補正後の輝度信号Y2は合成領域の平均輝度信号Yavより高くなる一方、合成画像の設定輝度Y1が合成領域の平均輝度より高いときは、補正後の輝度信号Y2は合成領域の平均輝度信号Yavより低くなる。このように、合成画像の輝度信号は合成領域の平均輝度と異なるなるように補正され、合成画像の識別性が高まる。
Then, the corrected luminance Y2 of the composite image is, for example,
Y2 = Y1 + k · S. Here, the coefficient k is positive. Thereby, when the set brightness Y1 of the composite image is lower than the average brightness of the composite area, the corrected brightness signal Y2 is higher than the average brightness signal Yav of the composite area, while the set brightness Y1 of the composite image is the average of the composite area When the luminance is higher than the luminance, the corrected luminance signal Y2 is lower than the average luminance signal Yav in the synthesis area. In this way, the brightness signal of the composite image is corrected to be different from the average brightness of the composite area, and the distinguishability of the composite image is improved.
なお、合成画像の補正された輝度Y2を、
Y2=Yav+k・Sとしてもよい。これによっても上式を用いた場合と同じ補正結果が得られる。
また、合成画像の補正された輝度Y2を、例えば、
Y2=Y1−k・Sとする。ここに、係数kは正とする。これにより、合成画像の設定輝度Y1が合成領域の平均輝度より低いときは、補正後の輝度信号Y2は合成領域の平均輝度信号Yavよりさらに低くなる一方、合成画像の設定輝度Y1が合成領域の平均輝度より高いときは、補正後の輝度信号Y2は合成領域の平均輝度信号Yavよりさらに高くなりなる。このように、合成画像の輝度信号は合成領域の平均輝度と異なるなるように補正され、合成画像の識別性がより高まる。
Note that the corrected luminance Y2 of the composite image is
It is good also as Y2 = Yav + k * S. This also provides the same correction result as when the above equation is used.
Further, the corrected luminance Y2 of the composite image is, for example,
Y2 = Y1-k · S. Here, the coefficient k is positive. Thereby, when the set brightness Y1 of the composite image is lower than the average brightness of the composite area, the corrected brightness signal Y2 is further lower than the average brightness signal Yav of the composite area, while the set brightness Y1 of the composite image is that of the composite area. When the average luminance is higher than the average luminance, the corrected luminance signal Y2 becomes higher than the average luminance signal Yav in the synthesis area. In this way, the brightness signal of the composite image is corrected so as to be different from the average brightness of the composite area, and the distinguishability of the composite image is further increased.
なお、補正後の輝度信号Y2を、差分Sからのデータテーブル参照により、補正係数Kを取得して、
Y2=Yav+Kなどとしてもよい。
一方、S63において、合成領域の色領域が特定色領域ではないと判定されれば、色差信号Cr、Cbの極性反転を行う。その理由は、S62において、両者が同一色であると判定されたため、両者の色を、青色と黄色などのように補色の関係に立たせれば、合成画像が見易くなるからである。
The corrected luminance signal Y2 is obtained by referring to the data table from the difference S to obtain the correction coefficient K.
Y2 = Yav + K may be used.
On the other hand, if it is determined in S63 that the color area of the combined area is not the specific color area, the polarity of the color difference signals Cr and Cb is inverted. The reason is that since it is determined in S62 that both colors are the same color, if the two colors are in a complementary color relationship such as blue and yellow, the composite image is easy to see.
すなわち、色差信号Cr、Cbがそれぞれ例えば8ビットであるとしたとき、色差信号Cr、Cbが128より大きいときは、極性反転後の色差信号Cir,Cibを、
Cir=Cr−128、Cib=Cb−128とする。
一方、色差信号Cr、Cbが128より大きくないときは、極性反転後の色差信号Cir, Cibを、
Cir=Cr+128、Cib=Cb+128とする。
That is, assuming that the color difference signals Cr and Cb are each 8 bits, for example, if the color difference signals Cr and Cb are greater than 128, the color difference signals Cir and Cib after polarity inversion are
It is assumed that Cir = Cr−128 and Cib = Cb−128.
On the other hand, when the color difference signals Cr and Cb are not larger than 128, the color difference signals Cir and Cib after polarity inversion are
It is assumed that Cir = Cr + 128 and Cib = Cb + 128.
なお、上述した極性反転に限らず、係数k1とk2とをあらかじめ定めて、Cr、Cbが128より大きいときは、極性反転後の色差信号をCir, Cibを、
Cir=k1・(Cr−128)+k2、Cib=k1・(Cb−128)+k2
とする一方、色差信号Cr、Cbが128より大きくないときは、極性反転後の色差信号をCir, Cibを、
Cir=k1・(Cr+128)+k2、Cib=k1・(Cb+128)+k2
としても、両者の色を違えることができ、合成画像が見易くなる。
Not only the polarity inversion described above but also the coefficients k1 and k2 are determined in advance, and when Cr and Cb are greater than 128, the color difference signals after polarity inversion are represented by Cir and Cib,
Cir = k1 · (Cr−128) + k2, Cib = k1 · (Cb−128) + k2
On the other hand, when the color difference signals Cr and Cb are not larger than 128, the color difference signals after polarity inversion are represented as Cir and Cib.
Cir = k1 · (Cr + 128) + k2, Cib = k1 · (Cb + 128) + k2
However, both colors can be different, and the composite image can be easily viewed.
次に、S60からS70へ進んだ場合の処理について説明する。
S70は、閾値を超える合成領域の色領域が2つ以上であるか否かを判定する処理である。
S70において、色領域決定手段22が、閾値を超える合成領域の色領域が2つ以上ではない(閾値を超える合成領域の色領域が存在しない)と判定したときは、S80に進み、色領域決定手段22は、合成領域の色領域を決定することなくS81へと進み、合成画像の色補正を行うことなく、全処理を終了する。
Next, processing when the process proceeds from S60 to S70 will be described.
S70 is a process for determining whether or not there are two or more color regions in the composite region that exceed the threshold.
In S70, when the color
一方、S70において、色領域決定手段22が、閾値を超える合成領域の色領域が2つ以上であると判定したときは、S71に進み、色領域決定手段22は、閾値を超えた色領域すべてを合成領域の色領域と決定する。
次に、S72において、色一致判定手段23は、閾値を超えた合成領域の色領域の1つが合成画像の色が属する色領域と一致するか否かを判定する。
On the other hand, when the color
Next, in S <b> 72, the color matching determination unit 23 determines whether one of the color areas in the synthesis area that exceeds the threshold matches the color area to which the color of the synthesis image belongs.
ここで、S72において、閾値を超えた合成領域の色領域のいずれも合成画像の色が属する色領域とは一致しないと判定されれば、S81に進んで、合成画像の色補正を行うことなく全処理を終了する。
一方、S72において、閾値を超えた合成領域の色領域の1つが合成画像の色が属する色領域と一致すると判定されれば、S73に進んで、色一致判定手段23は、ヒストグラムの中から、閾値を超えず、且つ、最も度数の少ない色領域を選択する。図4(B)の例では、閾値を超えず最小度数の色領域は、色領域1又は色領域9である。そこで、この例では、色領域1及び色領域9を選択し、S74に進む。
Here, in S72, if it is determined that none of the color areas of the composite area exceeding the threshold value matches the color area to which the color of the composite image belongs, the process proceeds to S81, and the color correction of the composite image is not performed. End all processing.
On the other hand, if it is determined in S72 that one of the color regions of the composite region that exceeds the threshold matches the color region to which the color of the composite image belongs, the process proceeds to S73, and the color match determination unit 23 determines from the histogram. A color region that does not exceed the threshold and has the lowest frequency is selected. In the example of FIG. 4B, the color area having the minimum frequency that does not exceed the threshold is the
次に、S74において、色一致判定手段23は、選択した色領域は特定色領域(色領域9)であるか否かを判定する。
ここで、S74において、選択した色領域の1つが特定色領域(色領域9)であると判定されたときは、S75に進んで、合成画像の輝度信号を補正する。この輝度信号補正は、S64における輝度信号補正と同じである。
Next, in S74, the color matching determination unit 23 determines whether or not the selected color area is a specific color area (color area 9).
Here, in S74, when it is determined that one of the selected color areas is the specific color area (color area 9), the process proceeds to S75, and the luminance signal of the composite image is corrected. This luminance signal correction is the same as the luminance signal correction in S64.
一方、S74において、選択した色領域のいずれも特定色領域(色領域9の低彩度領域)ではないと判定されたときは、合成画像に設定されていた色を変更する必要がある。そこで、S76に進んで、合成画像の設定色を置換する補正を行う。
この色置換は、合成画像の設定色を、選択した色領域のいずれかの色に置換するものである。その理由は、選択した色領域は、必ず、閾値を超えた色領域と異なるからであり、これによって、合成画像と合成領域の色が異なるようにできるからである。
On the other hand, when it is determined in S74 that none of the selected color areas is the specific color area (the low saturation area of the color area 9), it is necessary to change the color set in the composite image. Accordingly, the process proceeds to S76 and correction for replacing the set color of the composite image is performed.
This color replacement replaces the set color of the composite image with any color in the selected color region. The reason is that the selected color area is always different from the color area exceeding the threshold value, so that the colors of the composite image and the composite area can be made different.
選択した色領域が複数あるときは、例えば、閾値を超えた色領域からの距離が最大であるような色領域を、選択した色領域の中から、選ぶとよい。なお、距離はCrCb直交座標上のユークリッド距離で定義してもよい。
また、選択した色領域が所定数以上存在し、合成画像の色補正が上記の基準では困難となることがある。この場合には、色領域1から色領域8の色の置換値を定めたデータテーブルを参照することとしてもよい。すなわち、合成画像の設定色と一致すると判定された色領域の色を上述したデータテーブルを参照して、置換すれば、合成画像と合成領域の色は異なったものになるからである。
When there are a plurality of selected color areas, for example, a color area having the maximum distance from the color area exceeding the threshold value may be selected from the selected color areas. The distance may be defined by the Euclidean distance on the CrCb orthogonal coordinates.
In addition, there may be a predetermined number or more of selected color regions, and color correction of the composite image may be difficult with the above-described criteria. In this case, it is possible to refer to a data table in which the color replacement values of the
以上、合成画像の色をあらかじめ指定した場合の、合成画像の色補正・輝度補正について説明した。
なお、S64及びS75においては、輝度信号補正を行ったが、これに限らず、S76の色置換を行ってもよい。これによっても、合成画像を合成領域から明瞭に識別させるという目的を達成することができる。
In the above, the color correction / luminance correction of the composite image when the color of the composite image is designated in advance has been described.
In S64 and S75, the luminance signal correction is performed. However, the present invention is not limited to this, and color replacement in S76 may be performed. This can also achieve the purpose of clearly identifying the composite image from the composite region.
[色決定方法]
次に、図9を参照して、図5のフローチャートのS5における合成画像の色を決定する方法について説明する。これは、合成画像の色を、あらかじめ指定することなく、合成画像色決定手段25が自動的に決定するための処理である。
図9に示す色決定方法は、図8の色補正方法とほとんど同じであるが、異なる部分もあるため、以下、具体的に説明する。
[Color determination method]
Next, the method for determining the color of the composite image in S5 of the flowchart of FIG. 5 will be described with reference to FIG. This is a process for the composite image color determination means 25 to automatically determine the color of the composite image without specifying it in advance.
The color determination method shown in FIG. 9 is almost the same as the color correction method of FIG. 8, but there are some differences, so that it will be specifically described below.
まず、S60において、ヒストグラム作成手段21が作成したヒストグラムに基づき、色領域決定手段22は、閾値を超える合成領域の色領域が1つか否かを判定する。
ここで、S60において、閾値を超える合成領域の色領域が1つではないと判定されたときは、S70に進み、閾値を超える合成領域の色領域が2つ以上か否かを判定する。S70に続く処理は後述する。
First, in S60, based on the histogram created by the histogram creation means 21, the color area determination means 22 determines whether there is one color area of the synthesis area that exceeds the threshold.
Here, in S60, when it is determined that there is not one color area of the synthesis area exceeding the threshold value, the process proceeds to S70, and it is determined whether or not there are two or more color areas of the synthesis area exceeding the threshold value. Processing subsequent to S70 will be described later.
一方、S60において、閾値を超える合成領域の色領域が1つであると判定されたときは、S63に進み、色領域決定手段22は、合成領域の当該色領域は特定色領域(色領域9の低彩度領域)か否かを判断する。
ここで、S63において、合成領域の当該色領域が特定色領域であると判定されれば、合成画像の色を、図8のS64で説明した輝度信号Y2を有する色と決定する。
On the other hand, when it is determined in S60 that there is one color area of the synthesis area exceeding the threshold, the process proceeds to S63, and the color area determination means 22 determines that the color area of the synthesis area is a specific color area (color area 9). In the low saturation region).
Here, if it is determined in S63 that the color area of the combined area is the specific color area, the color of the combined image is determined as the color having the luminance signal Y2 described in S64 of FIG.
ここに、合成画像の色差信号Cr及び又はCbはゼロとしてもよいし、合成領域の画素の平均値としてもよい。
一方、S63において、合成領域の当該色領域が特定色領域ではないと判定されれば、合成画像の色を、図8のS65で説明した色差信号Cir、Cibと決定する。
ここに、合成画像の輝度信号は、合成領域の画素の平均値としてもよいし、平均輝度より高く又は低くしてもよい。
Here, the color difference signals Cr and / or Cb of the composite image may be zero, or may be the average value of the pixels in the composite region.
On the other hand, if it is determined in S63 that the color area of the combined area is not the specific color area, the color of the combined image is determined as the color difference signals Cir and Cib described in S65 of FIG.
Here, the luminance signal of the synthesized image may be an average value of the pixels in the synthesized area, or may be higher or lower than the average luminance.
次に、S70に進んだ後の処理について説明する。
S70において、色領域決定手段22は、閾値を超える合成領域の色領域が2つ以上か否かを判定する。
ここで、閾値を超える合成領域の色領域が2つ以上ではない(閾値を超える合成領域の色領域が存在しない)と判定されれば、合成画像の色はどのようであっても、合成領域から明瞭に識別されるため、S90に進んで、合成画像色決定手段は、適宜に定めたデフォルト色を合成画像の色と決定する。
Next, the process after proceeding to S70 will be described.
In S <b> 70, the color
Here, if it is determined that there are not two or more color regions in the composite region that exceed the threshold (no color region in the composite region that exceeds the threshold exists), the composite region may be whatever the color of the composite image. Therefore, the process proceeds to S90, and the composite image color determination unit determines a default color determined as appropriate as the color of the composite image.
一方、閾値を超える合成領域の色領域が2つ以上であると判定されれば、S73に進んで、色一致判定手段23は、ヒストグラムの中から、閾値を超えず、且つ、最も度数の少ない色領域を選択する。図4(B)の例では、閾値を超えず最小度数の色領域は、色領域1又は色領域9である。そこで、この例では、色領域1及び色領域9を選択し、S74に進む。
On the other hand, if it is determined that there are two or more color regions in the composite region that exceed the threshold, the process proceeds to S73, and the color match determination unit 23 does not exceed the threshold from the histogram and has the lowest frequency. Select a color area. In the example of FIG. 4B, the color area of the minimum frequency that does not exceed the threshold is the
次に、S74において、色一致判定手段23は、選択した色領域は特定色領域か否かを判定する。
ここで、S74において、選択した色領域が特定色領域(色領域9の低彩度領域)であると判定されたときは、S75に進んで、合成画像の輝度信号を決定する。輝度信号は、図8のS64で説明した輝度信号Y2とする。また、合成画像の色差信号Cr、及び又はCbはゼロとしてもよいし、合成領域の画素の平均値としてもよい。
Next, in S74, the color matching determination unit 23 determines whether or not the selected color area is a specific color area.
Here, in S74, when it is determined that the selected color area is the specific color area (low saturation area of the color area 9), the process proceeds to S75, and the luminance signal of the composite image is determined. The luminance signal is the luminance signal Y2 described in S64 of FIG. Further, the color difference signals Cr and / or Cb of the composite image may be zero, or may be the average value of the pixels in the composite area.
一方、S74において、選択した色領域が特定色領域(色領域9の低彩度領域)ではないと判定されたときは、S76に進んで、図8のS76におけると同様、色信号置換処理を行い、置換された色を合成画像の色と決定する。このとき、輝度信号は、合成領域の平均輝度と同じでもよいし、それより高くても低くてよい。
以上、合成画像の色をあらかじめ指定しない場合の、合成画像の色決定について説明した。
On the other hand, when it is determined in S74 that the selected color area is not the specific color area (the low saturation area of the color area 9), the process proceeds to S76, and the color signal replacement process is performed as in S76 of FIG. The replacement color is determined as the color of the composite image. At this time, the luminance signal may be the same as the average luminance of the synthesis area, or may be higher or lower.
In the above, the color determination of the composite image when the color of the composite image is not designated in advance has been described.
なお、図9のS64及びS75においては、輝度信号決定を行ったが、これに限らず、図9のS76の色決定を行っても、合成画像を合成領域から明瞭に識別させるという目的を達成することができる。 In S64 and S75 in FIG. 9, the luminance signal is determined. However, the present invention is not limited to this, and even if the color determination in S76 in FIG. 9 is performed, the purpose of clearly identifying the composite image from the composite region is achieved. can do.
1 レンズ系
2 CCD
3 A/D
4 フレームメモリ
5 画像処理手段
6 圧縮処理手段
7 記録手段
10 画像合成手段
11 合成画像生成手段
12 合成領域設定手段
13 合成領域検出手段
14 合成画像色決定・補正手段
15 画像合成手段
16 警告手段
21 ヒストグラム作成手段
22 色領域決定手段
23 色一致判定手段
24 合成画像色補正手段
25 合成画像色決定手段
30 制御手段
31 切替手段
1
3 A / D
4
Claims (20)
2次元色座標を複数の色領域に分割し、前記合成領域の1以上の画素の色を前記色領域のいずれかに振り分けてヒストグラムを作成するヒストグラム作成手段と、
前記ヒストグラム作成手段の出力に接続され、前記ヒストグラムと所定閾値とに基づいて、前記合成領域の色領域を決定する色領域決定手段と、
前記色領域決定手段の出力に接続され、前記決定された色領域と前記合成画像の色領域との一致・不一致を判定する色一致判定手段と、
前記色一致判定手段の出力に接続され、前記色領域の一致が判定されたとき、前記ヒストグラムと前記所定閾値とに基づいて、前記合成画像の色を補正する色補正手段とを備えることを特徴とする画像合成装置。 When compositing a composite image in the composite region of the original image, an image composition device that corrects the color of the composite image set in advance and then composites the composite image in the composite region.
Histogram creation means for dividing a two-dimensional color coordinate into a plurality of color regions and assigning the color of one or more pixels in the composite region to any of the color regions;
A color region determination unit that is connected to an output of the histogram generation unit and determines a color region of the synthesis region based on the histogram and a predetermined threshold;
Connected to the output of the color area determination means, color match determination means for determining whether the determined color area matches the color area of the composite image; and
And a color correction unit that is connected to an output of the color match determination unit and corrects the color of the composite image based on the histogram and the predetermined threshold when the color region match is determined. An image composition device.
前記2次元色座標は、色差信号Cr及びCbによる直交座標であることを特徴とする画像合成装置。 The image synthesizing apparatus according to claim 1.
2. The image synthesizing apparatus according to claim 2, wherein the two-dimensional color coordinates are orthogonal coordinates based on color difference signals Cr and Cb.
前記色領域決定手段は、さらに、前記合成領域の1以上の画素の輝度信号Yに基づいて、前記合成領域の色領域を決定することを特徴とする画像合成装置。 The image synthesizing apparatus according to claim 1.
The image composition apparatus, wherein the color region determination means further determines a color region of the composite region based on a luminance signal Y of one or more pixels of the composite region.
前記色補正手段は、前記ヒストグラムと所定閾値とに基づいて、前記合成画像の色差信号Cr及びCbを補正することを特徴とする画像合成装置。 The image synthesizing apparatus according to claim 1.
The image correcting apparatus, wherein the color correcting unit corrects color difference signals Cr and Cb of the composite image based on the histogram and a predetermined threshold value.
前記色補正手段は、前記ヒストグラムと所定閾値とに基づき、且つ、前記合成画像の輝度信号Yaと前記合成領域の平均輝度信号Ybの差分に基づき、前記合成画像の輝度信号Yaを補正することを特徴とする画像合成装置。 The image composition device according to claim 4, wherein
The color correction unit corrects the luminance signal Ya of the composite image based on the histogram and a predetermined threshold, and based on the difference between the luminance signal Ya of the composite image and the average luminance signal Yb of the composite region. A featured image composition device.
2次元色座標を複数の色領域に分割し、前記合成領域の1以上の画素の色を前記色領域のいずれかに振り分けたヒストグラムを作成するヒストグラム作成ステップと、
前記ヒストグラムと所定閾値とに基づいて、前記合成領域の色領域を決定する色領域決定ステップと、
前記決定された色領域と前記合成画像の色との色領域の一致・不一致を、前記ヒストグラムと前記所定閾値とに基づいて、判定する色領域一致判定ステップと、
前記色領域の一致が判定されたとき、前記ヒストグラムと前記所定閾値とに基づいて、前記合成画像の色を補正する色補正ステップとを備えることを特徴とする画像合成方法。 In the image composition method using the image composition device according to claim 1,
A histogram creating step of dividing a two-dimensional color coordinate into a plurality of color regions and creating a histogram in which colors of one or more pixels of the composite region are assigned to any of the color regions;
A color region determining step for determining a color region of the composite region based on the histogram and a predetermined threshold;
A color region match determination step for determining whether or not the color region matches or does not match between the determined color region and the color of the composite image based on the histogram and the predetermined threshold;
An image synthesizing method comprising: a color correction step of correcting a color of the synthesized image based on the histogram and the predetermined threshold when matching of the color areas is determined.
前記色領域決定ステップにおいて、
前記2次元色座標は、色差信号Cr及びCbを直交座標であることを特徴とする画像合成方法。 The image composition method according to claim 6.
In the color region determination step,
2. The image composition method according to claim 2, wherein the two-dimensional color coordinates are orthogonal coordinates of the color difference signals Cr and Cb.
前記色領域決定ステップにおいて、
さらに、前記合成領域の1以上の画素の輝度信号Yに基づいて、前記合成領域の色領域を決定することを特徴とする画像合成方法。 The image composition method according to claim 7.
In the color region determination step,
Furthermore, the color composition area of the composition area is determined based on the luminance signal Y of one or more pixels in the composition area.
前記色補正ステップにおいて、
前記ヒストグラムと所定閾値とに基づいて、前記合成画像の色差信号Cr及びCbを補正することを特徴とする画像合成方法。 The image composition method according to claim 6.
In the color correction step,
An image composition method comprising correcting the color difference signals Cr and Cb of the composite image based on the histogram and a predetermined threshold value.
前記色補正ステップにおいて、
前記ヒストグラムと所定閾値とに基き、且つ、前記合成画像の輝度信号Yaと前記合成領域の平均輝度信号Ybの差分に基づき、前記合成画像の輝度信号Yaを補正することを特徴とする画像合成方法。 The image composition method according to claim 6.
In the color correction step,
An image composition method, comprising: correcting the brightness signal Ya of the composite image based on the histogram and a predetermined threshold and based on a difference between the brightness signal Ya of the composite image and the average brightness signal Yb of the composite area. .
2次元色座標を複数の色領域に分割し、前記合成領域の1以上の画素の色を前記色領域のいずれかに振り分けてヒストグラムを作成するヒストグラム作成手段と、
前記ヒストグラム作成手段の出力に接続され、前記ヒストグラムと所定閾値とに基づいて、前記合成画像の色を決定する合成画像色決定手段とを備えることを特徴とする画像合成装置。 In the image composition device for determining the color of the composite image based on the color of the composite area without setting the color of the composite image in advance when compositing the composite image in the composite area of the original image,
Histogram creation means for dividing a two-dimensional color coordinate into a plurality of color regions and assigning the color of one or more pixels in the composite region to any of the color regions;
An image synthesizing apparatus, comprising: a synthesized image color determining unit that is connected to an output of the histogram creating unit and determines a color of the synthesized image based on the histogram and a predetermined threshold value.
前記2次元座標は、色差信号Cb及びCrによる直交座標であることを特徴とする画像合成装置。 The image composition device according to claim 11.
2. The image synthesizing apparatus according to claim 2, wherein the two-dimensional coordinates are orthogonal coordinates based on color difference signals Cb and Cr.
前記色領域決定手段は、さらに、前記合成領域の1以上の画素の輝度信号Yに基づいて、前記合成領域の色領域を決定することを特徴とする画像合成装置。 The image composition device according to claim 11.
The image composition apparatus, wherein the color region determination means further determines a color region of the composite region based on a luminance signal Y of one or more pixels of the composite region.
前記合成画像色決定手段は、前記ヒストグラムと所定閾値とに基づいて、前記合成画像の色差信号Cr及びCbを決定することを特徴とする画像合成装置。 The image composition device according to claim 11.
The composite image color determining means determines the color difference signals Cr and Cb of the composite image based on the histogram and a predetermined threshold value.
前記合成画像色決定手段は、前記ヒストグラムと所定閾値とに基づき、且つ、前記合成画像の輝度信号Yaと前記合成領域の平均輝度信号Ybの差分に基づき、前記合成画像の輝度信号Yを補正することを特徴とする画像合成装置。 The image composition device according to claim 11.
The synthesized image color determining unit corrects the luminance signal Y of the synthesized image based on the histogram and a predetermined threshold, and based on a difference between the luminance signal Ya of the synthesized image and the average luminance signal Yb of the synthesized area. An image composition device characterized by the above.
2次元色座標を複数の色領域に分割し、前記合成領域の1以上の画素の色を前記色領域のいずれかにに振り分けてヒストグラムを作成するヒストグラム作成ステップと、
前記ヒストグラムと所定閾値とに基づいて、前記合成領域の色領域を決定する色領域決定ステップと、
前記ヒストグラムと前記所定閾値とに基づいて、前記合成画像の色を決定する色決定ステップとを備えることを特徴とする画像合成方法。 In the image composition method using the image composition device according to claim 11,
A histogram generation step of dividing a two-dimensional color coordinate into a plurality of color areas, and distributing a color of one or more pixels of the composite area to any of the color areas;
A color region determining step for determining a color region of the composite region based on the histogram and a predetermined threshold;
A color determining step for determining a color of the composite image based on the histogram and the predetermined threshold value.
前記色領域決定ステップにおいて、
前記2次元色座標は、色差信号Cr及びCbを直交座標とする2次元色座標であることを特徴とする画像合成方法。 The image composition method according to claim 16.
In the color region determination step,
2. The image composition method according to claim 2, wherein the two-dimensional color coordinates are two-dimensional color coordinates having color difference signals Cr and Cb as orthogonal coordinates.
前記色領域決定ステップにおいて、
さらに、前記合成領域の1以上の画素の輝度信号Yに基づいて、前記合成領域の色領域を決定することを特徴とする画像合成方法。 The image composition method according to claim 17.
In the color region determination step,
Furthermore, the color composition area of the composition area is determined based on the luminance signal Y of one or more pixels in the composition area.
前記色決定ステップにおいて、
前記ヒストグラムと所定閾値とに基づいて、前記合成画像の色差信号Cr及びCbを決定することを特徴とする画像合成方法。 The image composition method according to claim 17.
In the color determination step,
An image composition method, wherein color difference signals Cr and Cb of the composite image are determined based on the histogram and a predetermined threshold value.
前記色決定正ステップにおいて、
前記ヒストグラムと所定閾値とに基づき、且つ、前記合成画像の輝度信号Yaと前記合成領域の平均輝度信号Ybの差分に基づき、前記合成画像の輝度信号Yaを決定することを特徴とする画像合成方法。
The image composition method according to claim 19, wherein
In the color determination positive step,
An image composition method comprising: determining a brightness signal Ya of the composite image based on the histogram and a predetermined threshold, and based on a difference between the brightness signal Ya of the composite image and the average brightness signal Yb of the composite area. .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004233682A JP2006053682A (en) | 2004-08-10 | 2004-08-10 | Image composing device and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004233682A JP2006053682A (en) | 2004-08-10 | 2004-08-10 | Image composing device and method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006053682A true JP2006053682A (en) | 2006-02-23 |
Family
ID=36031136
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004233682A Withdrawn JP2006053682A (en) | 2004-08-10 | 2004-08-10 | Image composing device and method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006053682A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1976263A1 (en) | 2007-03-26 | 2008-10-01 | Murata Machinery, Ltd. | Image processing apparatus and method for detcting a background color |
JP2010206647A (en) * | 2009-03-04 | 2010-09-16 | Casio Computer Co Ltd | Tape printer, method of producing composite label synthesizing image and document, and storage medium memorizing composite label producing program |
-
2004
- 2004-08-10 JP JP2004233682A patent/JP2006053682A/en not_active Withdrawn
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1976263A1 (en) | 2007-03-26 | 2008-10-01 | Murata Machinery, Ltd. | Image processing apparatus and method for detcting a background color |
US8009902B2 (en) | 2007-03-26 | 2011-08-30 | Murata Machinery, Ltd. | Image processing apparatus and method for detecting a background color based on data chrominance distribution |
JP2010206647A (en) * | 2009-03-04 | 2010-09-16 | Casio Computer Co Ltd | Tape printer, method of producing composite label synthesizing image and document, and storage medium memorizing composite label producing program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100791375B1 (en) | Apparatus and method for color correction | |
JP5761946B2 (en) | Image processing apparatus, image processing method, and storage medium | |
JP5677113B2 (en) | Image processing device | |
JP5665436B2 (en) | Image processing apparatus, image processing method, and program | |
JP2006108873A (en) | Dynamic image processor and method | |
US20070280529A1 (en) | External-Appearance Inspection Apparatus | |
KR20060120643A (en) | Image processing apparatus, image processing method, and image processing program | |
JPH07222016A (en) | Method and system for correction of color shift | |
JP2008527852A (en) | White balance correction of digital camera images | |
JP2004200902A (en) | Image processor, electronic camera, and image processing program | |
CN107680142B (en) | Method for improving out-of-gamut color overlay mapping | |
JP2013243639A (en) | Image processing apparatus, image processing method, and program | |
JP2004032060A (en) | Color picture signal processing method and color image output arrangement as well as photographing equipment | |
JP5950756B2 (en) | Image processing apparatus and image processing method | |
JPH09200554A (en) | Image processor | |
JP7207876B2 (en) | Image processing device, image processing method, and program | |
JP2002109523A (en) | Image pickup device, optical filter group, and image data converter | |
US6781715B1 (en) | Image processing method and system | |
JP2006053682A (en) | Image composing device and method | |
US8804025B2 (en) | Signal processing device and imaging device | |
JP4784097B2 (en) | Signal processing method, signal processing apparatus, and storage medium storing signal processing procedure | |
JP2005130281A (en) | Image processing system, image processing method, and program | |
JP5818515B2 (en) | Image processing apparatus, image processing method and program thereof | |
JP2756047B2 (en) | Color image color adjustment method and apparatus, and image synthesis method | |
JP2017135600A (en) | Image processing device and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20071106 |