JP5125478B2 - Imaging apparatus and image effect providing program - Google Patents
Imaging apparatus and image effect providing program Download PDFInfo
- Publication number
- JP5125478B2 JP5125478B2 JP2007327699A JP2007327699A JP5125478B2 JP 5125478 B2 JP5125478 B2 JP 5125478B2 JP 2007327699 A JP2007327699 A JP 2007327699A JP 2007327699 A JP2007327699 A JP 2007327699A JP 5125478 B2 JP5125478 B2 JP 5125478B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- mask
- mask image
- image data
- reduced
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Studio Devices (AREA)
Description
本発明は、撮像された画像に対して画像効果を施す撮像装置、及び画像効果付与プログラムに関する。 The present invention relates to an imaging apparatus that applies an image effect to a captured image, and an image effect applying program.
従来、例えばクロスフィルタをデジタルカメラのレンズに取り付けて撮像する、或いは撮像により得られた画像に対して画像効果を付与することで、画像効果が付与された画像を取得することが一般に行われている。 Conventionally, for example, a cross filter is attached to a lens of a digital camera to capture an image, or an image effect is applied to an image obtained by imaging, and an image with an image effect is generally obtained. Yes.
例えば、撮像により得られた画像(以下、元画像)に対して画像効果を付与する場合、元画像に対して直接画像効果を付与すると、画像効果を付与する処理に時間がかかることから、元画像を縮小した縮小画像から画像効果として用いる画像(以下、マスク画像)を作成し、作成されたマスク画像を元画像と同一の画角になるように拡大した後、元画像に合成している(特許文献1参照)。
しかしながら、夜間や暗所など、背景が暗い環境下で撮像された元画像に対して画像効果を付与することは有効であるが、室内など、背景が明るい環境下で撮像された元画像に対して画像効果を付与した場合には、マスク画像のパターンに該当する画素の色が飽和してしまうことがあり、付与された画像効果が不自然なものとなりやすい。 However, it is effective to apply an image effect to an original image captured in an environment with a dark background, such as at night or in a dark place, but it can be applied to an original image captured in an environment with a bright background, such as indoors. When the image effect is applied, the color of the pixel corresponding to the mask image pattern may be saturated, and the applied image effect tends to be unnatural.
本発明は、上述した課題を解決するために発明されたものであり、明るい環境下で撮像された画像であっても、適切な画像効果を付与することができるようにした撮像装置、及び画像効果付与プログラムを提供することを目的とする。 The present invention has been invented in order to solve the above-described problems, and an imaging apparatus capable of imparting an appropriate image effect to an image captured in a bright environment, and an image The purpose is to provide an effect grant program.
第1の発明の撮像装置は、撮像時に得られた元画像を縮小する画像縮小手段と、前記画像縮小手段により生成された縮小画像を利用して、第1のマスク画像を生成する第1画像生成手段と、前記縮小画像における輝度を算出する算出手段と、前記算出手段に算出された輝度と予め設定された閾値とを比較する比較手段と、前記比較手段による比較結果に基づいて、前記第1のマスク画像と前記縮小画像とを差分した第2のマスク画像を生成する第2画像生成手段と、前記第2のマスク画像を拡大する画像拡大手段と、拡大された第2のマスク画像を前記元画像に合成する画像合成手段と、を備えたことを特徴とする。 An image pickup apparatus according to a first aspect of the invention uses an image reduction unit that reduces an original image obtained at the time of imaging, and a first image that generates a first mask image using the reduced image generated by the image reduction unit. Based on the comparison result by the generating means, the calculating means for calculating the brightness in the reduced image, the comparing means for comparing the brightness calculated by the calculating means with a preset threshold value, A second image generating means for generating a second mask image obtained by subtracting the first mask image and the reduced image, an image enlarging means for enlarging the second mask image, and an enlarged second mask image. Image synthesizing means for synthesizing the original image.
第2の発明は、第1の発明において、前記第1のマスク画像に対してフィルタ処理を実行するフィルタ処理手段を備え、前記第2画像生成手段は、前記フィルタ処理後の第1のマスク画像と、前記縮小画像とを用いて前記第2のマスク画像を作成することを特徴とする。 According to a second aspect of the present invention, in the first aspect of the invention, the image processing apparatus further includes a filter processing unit that performs a filter process on the first mask image, and the second image generation unit includes the first mask image after the filter process. And generating the second mask image using the reduced image.
第3の発明は、第1及び第2の発明において、前記縮小画像における注目領域を検出する領域検出手段を備え、前記第1画像生成手段は、検出された前記注目領域に対応した前記第1のマスク画像を作成することを特徴とする。 The third aspect of the invention, in the first and second aspects of the present invention, an area detection means for detecting a region of interest in the reduced image, the first stroke image generator, the corresponding to the detected the target regions the One mask image is created.
第4の発明は、第3の発明において、前記領域検出手段は、前記縮小画像の各画素における輝度を算出して、算出された各画素における輝度のうち、輝度が高い画素を前記注目領域として検出することを特徴とする。 A fourth invention, Te third invention smell, before Symbol area detection means calculates the luminance of each pixel of the reduced image, among the luminance of each pixel calculated, the target luminance is high pixel It is detected as a region.
第5の発明は、第3又は第4の発明において、前記領域検出手段により検出された前記注目領域の周縁部における色彩情報を取得する色彩情報取得手段をさらに備え、前記第1の画像生成手段は、前記注目領域の大きさと該注目領域の周縁部における色彩情報とに基づいて前記第1のマスク画像を生成することを特徴とする。 According to a fifth invention, in the third or fourth invention, further comprising color information acquisition means for acquiring color information in a peripheral portion of the region of interest detected by the area detection means, wherein the first image generation means Is characterized in that the first mask image is generated based on the size of the region of interest and the color information at the periphery of the region of interest.
第6の発明は、第1〜5発明のいずれかにおいて、前記第1のマスク画像は、前記縮小画像と同一の画像サイズで、かつ予め設定されたパターンが前記注目領域に対応する位置に形成された画像からなることを特徴とする。 In a sixth aspect based on any one of the first to fifth aspects, the first mask image has the same image size as the reduced image, and a preset pattern is formed at a position corresponding to the attention area. It consists of the image which was made.
第7の発明は、第6の発明において、前記パターンは、前記注目領域を基点にして複数のラインを放射状に延出させた形状からなることを特徴とする。 According to a seventh invention, in the sixth invention, the pattern has a shape in which a plurality of lines are radially extended from the region of interest as a base point.
第8の発明の画像効果付与プログラムは、撮像時に得られた元画像を縮小することで、縮小画像を取得するステップと、前記縮小画像に基づいて、第1のマスク画像を生成するステップと、前記縮小画像における輝度を算出するステップと、前記縮小画像における輝度と予め設定された閾値とを比較するステップと、前記比較に基づいて、前記第1のマスク画像と前記縮小画像とを差分した第2のマスク画像を生成するステップと、前記第2のマスク画像を拡大するステップと、拡大された第2のマスク画像を前記元画像に合成するステップと、をコンピュータに実行させることを特徴とする。 An image effect imparting program according to an eighth aspect of the present invention is a method of acquiring a reduced image by reducing an original image obtained at the time of imaging, and a step of generating a first mask image based on the reduced image; Calculating the luminance in the reduced image, comparing the luminance in the reduced image with a preset threshold value, and calculating a difference between the first mask image and the reduced image based on the comparison. Generating a second mask image, enlarging the second mask image, and synthesizing the enlarged second mask image with the original image. .
本発明によれば、明るい環境下で撮像された画像に画像効果を付与したときに生じる白飛びの発生を抑止することができる。この白飛びの発生を抑止することで、付与される画像効果に対して違和感を与えずに済む。 ADVANTAGE OF THE INVENTION According to this invention, generation | occurrence | production of the whiteout which arises when an image effect is provided to the image imaged in the bright environment can be suppressed. By suppressing the occurrence of this whiteout, it is not necessary to give an uncomfortable feeling to the applied image effect.
図1は、デジタルカメラ10の構成の一例を示す概略図である。このデジタルカメラ10は、CPU15によって統括制御される。このCPU15には操作部16やレリーズボタン17の操作信号が入力されることから、CPU15は、入力される操作信号に基づいてデジタルカメラ10の各部を制御する。
FIG. 1 is a schematic diagram illustrating an example of the configuration of the
撮像光学系20は、撮像レンズ21の他に、ズームレンズ22やフォーカスレンズ23を備えている。ズームレンズ22は、撮像時の撮像倍率を変更する際にレンズ駆動機構24によって光軸方向に沿って移動される。フォーカスレンズ23は、撮像時における焦点調節を行う際に、レンズ駆動機構24によって光軸方向に微小移動される。
The imaging
CCD25は、撮像光学系20を介して入射される被写体光を受光し、受光した光量に応じた信号電荷を蓄積することで、被写体光を光電変換する。なお、このCCD25における信号電荷の蓄積や蓄積された信号電荷の出力は、ドライバ26によって制御される。
The
CCD25によって蓄積された信号電荷は、アナログ画像信号としてAFE回路27に出力される。このAFE回路27は、図示しないAGC回路やCDS回路を含んで構成される。AFE回路27は、入力されたアナログ画像信号に対してゲインコントロール、雑音除去などのアナログ処理を施す。
The signal charge accumulated by the
DFE回路28は、AFE回路27によってアナログ処理が施されたアナログ画像信号をデジタル画像信号に変換する。変換されたデジタル画像信号は1コマ毎にまとめられ、デジタル画像データとしてバッファメモリ30に記憶される。なお、ドライバ26、AFE回路27及びDFE回路28は、それぞれタイミングジェネレータ(TG)31における作動タイミングに基づいて制御される。また、符号32はバスであり、このバス32を介してデジタルカメラ10の各部が電気的に接続される。
The
画像処理部35は、バッファメモリ30に記憶されたデジタル画像データに対して、輪郭補償、ガンマ補正、ホワイトバランス調整などの画像処理を施す。この画像処理が施されたデジタル画像データは例えばJPEG方式などの記憶方式で圧縮するためのフォーマット処理(画像後処理)が施された後、再度バッファメモリ30に記憶される。このバッファメモリ30に記憶されたデジタル画像データは、所定の圧縮方式に対応する圧縮率を用いて圧縮処理される。
The
例えばデジタルカメラ10に設けられたLCDモニタ36にスルー画像を表示する場合には、画像処理後のデジタル画像データに対して、LCDモニタ36の解像度に合わせた圧縮率を用いて圧縮処理を実行し、表示制御部37に出力する。
For example, when a through image is displayed on the LCD monitor 36 provided in the
一方、デジタル画像データを記憶する場合には、画像記憶用に合わせた圧縮率を用いた圧縮処理が施され、内蔵メモリ38に記憶される。この内蔵メモリ38に格納されたデジタル画像データは、メディアコントローラ39を介して、メモリカードや光学ディスクなどの記憶媒体40に書き込まれる。なお、画像記憶用に合わせた圧縮率としては、予めデジタルカメラ10において設定される画像記憶用の解像度に合わせた圧縮率の他、予めユーザが操作部16を操作することにより設定した解像度に合わせた圧縮率が挙げられる。
On the other hand, when storing digital image data, a compression process using a compression rate suitable for image storage is performed and stored in the built-in
ストロボ装置41は、例えば測光センサ43における被写体の輝度が所定値以下となる場合に、被写体に向けてストロボ光を発光する。このストロボ装置41におけるストロボ光の発光タイミングや発光量はストロボ制御部42によって制御される。
The
以下では、縮小処理される前の画像データを元画像データ、縮小処理された画像データを縮小画像データ、縮小画像データに基づいて作成される画像装飾用の画像データを一次マスク画像データもしくは二次マスク画像データと称して説明する。また、元画像データ、縮小画像データ、一次マスク画像データ及び二次マスク画像データを表示したものを、元画像、縮小画像、一次マスク画像及び二次マスク画像とそれぞれ称して説明する。 In the following, the image data before reduction processing is the original image data, the reduced image data is reduction image data, and the image decoration image data created based on the reduction image data is primary mask image data or secondary This will be described as mask image data. The display of the original image data, reduced image data, primary mask image data, and secondary mask image data will be referred to as an original image, a reduced image, a primary mask image, and a secondary mask image, respectively.
画像拡縮部50は、内蔵メモリ38に記憶された元画像データを所定の縮小率にて縮小処理する他に、後述するマスク画像データを所定の拡大率にて拡大する。なお、後述するマスク画像データを作成する際の処理を高速とするためには、上述した縮小率は大きくすれば良いことになるが、マスク画像を拡大するときの拡大率も大きくなることから、拡大した後のマスク画像における画質が低下してしまう。そこで、マスク画像データを作成するときの元画像データの縮小率は、処理速度とマスク画像の画質とを考慮して設定される。一方、拡大率は、マスク画像の大きさが元画像の大きさと同一になる拡大率である。なお、画像データを縮小、及び拡大する方法としては、周知のバイリニア法や、バイキュービック法が挙げられる。
In addition to reducing the original image data stored in the built-in
画像生成部51は、元画像データに合成するマスク画像データを生成する。このマスク画像データとしては、後述する領域検出部52によって検出された注目領域の大きさ(画素数)と、後述する色彩情報取得部53によって取得された色彩情報とから作成される一次マスク画像データと、一次マスク画像データと縮小画像データとを用いた差分処理を行うことで得られる二次マスク画像データとが挙げられる。
The
図2に示すように、一次マスク画像データを例えばLCDモニタ36に表示すると、縮小画像と同一の画角からなる一次マスク画像MI1が表示される。この一次マスク画像MI1は、例えば黒色となる背景(図2の点で示すハッチングの領域65)に対して、輝度の高い色彩のクロスパターン66、67などのパターンが配置された画像である。上述したクロスパターン66,67は、後述する注目領域の中心となる画素を基点とした複数のラインが、それぞれ放射状に延出された形状からなる。これらクロスパターン66,67のラインの長さや太さは、注目領域の大きさ(画素数)に基づいて決定される。なお、クロスパターンの太さや長さと、注目領域の大きさとが対応されたテーブルデータを予め記憶させておき、抽出された注目領域の大きさからクロスパターンの大きさや太さを決定すればよい。
As shown in FIG. 2, when the primary mask image data is displayed on the LCD monitor 36, for example, a primary mask image MI1 having the same angle of view as the reduced image is displayed. The primary mask image MI1 is an image in which patterns such as
また、クロスパターン66,67の色は、後述する色彩情報取得部53によって取得された色彩情報に基づいて決定される。つまり、クロスパターンの中心側から各ラインの先端に向けて輝度が低くなるように、各画素の階調値を決定していく。なお、上述したクロスパターンのライン数や、ラインの角度は、予めユーザが任意に選択できるようにしてもよいし、予め設定されたものであってもよい。また、クロスパターンは、全ての注目領域に対して配置しても良いし、注目領域の大きさによって、クロスパターンを配置する注目領域を選択できるようにしてもよい。
The colors of the
一方、二次マスク画像は、一次マスク画像と縮小画像との差分処理によって作成される画像である。例えば、図3(a)に示すように、一次マスク画像のクロスパターンを構成する画素における階調値は、その先端に向けて背景の色に近づくように変化している。一方、図3(b)に示すように、縮小画像においては、クロスパターンに対応する画素の階調値が不規則に変化している。このような一次マスク画像と縮小画像において差分処理を行うことで、二次マスク画像における画素の階調値は、なだらかに減少していく(図3(c)参照)。つまり、この差分処理を行うことで、二次マスク画像と縮小画像とを合成した場合に、クロスパターンに該当する画素の階調値が、一次なマスク画像のクロスパターンの階調値となる。なお、例えば一次マスク画像は背景が黒色となることから、この差分処理を行った場合には、一次マスク画像における背景に該当する画素の階調値は負の値になるが、階調値として負の値はないことから、黒色となる画素に対して差分処理を実行した場合には、二次マスク画像の画素の階調値(R,G,B)は(0,0,0)、つまり黒色となる。 On the other hand, the secondary mask image is an image created by a difference process between the primary mask image and the reduced image. For example, as shown in FIG. 3A, the gradation value in the pixels constituting the cross pattern of the primary mask image changes so as to approach the background color toward the tip. On the other hand, as shown in FIG. 3B, in the reduced image, the gradation value of the pixel corresponding to the cross pattern changes irregularly. By performing the difference processing between the primary mask image and the reduced image, the gradation value of the pixel in the secondary mask image gradually decreases (see FIG. 3C). That is, by performing this difference processing, when the secondary mask image and the reduced image are combined, the gradation value of the pixel corresponding to the cross pattern becomes the gradation value of the cross pattern of the primary mask image. For example, since the background of the primary mask image is black, when this difference processing is performed, the gradation value of the pixel corresponding to the background in the primary mask image becomes a negative value, Since there is no negative value, when the difference process is executed on the black pixel, the gradation value (R, G, B) of the pixel of the secondary mask image is (0, 0, 0), That is, it becomes black.
この画像生成部51は、領域検出部52と、色彩情報取得部53とを備えている。領域検出部52は、縮小画像内の注目領域を検出する。注目領域の検出としては、縮小画像において、輝度の高い画素を抽出し、抽出された画素のうち、複数の画素が略円形、又は略楕円形となるように隣接されている領域を注目領域とする。注目領域が検出されるときに、注目領域の中心となる画素も併せて求められる。
The
図4は、室内の展示物を撮像した画像の一例を示す図である。この画像の場合、展示物に対してスポット光が照射されることから、スポット光を照射するライトスタンドの発光部(図中、符号71)と、展示物の、スポット光が照射されている部分(図中、符号72)が、輝度の高い領域、つまり、注目領域となる。
FIG. 4 is a diagram illustrating an example of an image obtained by capturing an indoor exhibit. In the case of this image, since the spot light is irradiated to the exhibit, the light emitting part (
色彩情報取得部53は、領域検出部52によって検出された注目領域の周縁の画素のうち、輝度が略同一となる画素の階調値の平均値を色彩情報として取得する。
The color
フィルタ処理部54は、生成されたマスク画像データに対してローパスフィルタ(LPF)処理を行う。このLPF処理としては、3×3の計9個の画素71〜79のうち、中心にある画素75に対する重み付けを「2」とし、画素71〜74及び画素76〜79に対する重み付けを「1」としたコンボリューション演算を行う処理が挙げられる。図5に示すように、例えば3×3の計9個の画素71〜79について述べると、画素77が赤色、画素74、78がピンク色、画素71〜73、画素75,76及び画素79が白色からなる場合には、このLPF処理を行うことで、画素75が白色から薄いピンク色となる。この処理は、マスク画像を構成する全ての画素を用いて行われることから、マスク画像中のパターンと背景との境界がはっきりした画像を、パターンと背景との境界をぼかした画像に加工することができる。
The filter processing unit 54 performs low-pass filter (LPF) processing on the generated mask image data. In this LPF process, among the 9
画像合成部55は、画像生成部51にて生成されたマスク画像データと縮小画像データとを合成する、或いは、画像拡縮部50で拡大されたマスク画像データと元画像データとを合成する。画像合成部55によって合成された画像データは、内蔵メモリ38に記憶される。
The image composition unit 55 synthesizes the mask image data generated by the
輝度算出部56は、縮小画像データに用いて、縮小画像の輝度を算出する。詳細には、縮小画像の各画素における輝度を算出し、算出された各画素の輝度の平均値を算出する。
The
輝度判定部57は、輝度算出部56によって算出された輝度の平均値と、予め設定された閾値とを比較する。この比較において輝度の平均値が閾値よりも低くなる場合には、元画像データは暗い環境下で取得された画像データであると判定されたことになるので、マスク画像データとして一次マスク画像データが使用される。一方、輝度の平均値が閾値よりも高くなる場合には、元画像データは明るい環境下で取得されたデータであると判定されたことになるので、このような場合には、画像生成部51は、一次マスク画像データと縮小画像データとを差分処理して二次マスク画像データを作成する。この作成された二次マスク画像データがマスク画像データとして使用される。
The
次に、デジタルカメラ10において撮像された画像データに画像効果を付与する際の処理手順について、図6のフローチャートに基づいて説明する。なお、撮像された画像データに画像効果を付与するか否かを予めユーザが選択できるようにしてもよいし、全ての画像データに対して自動的に画像効果を付与するようにしてもよい。デジタルカメラ10によって撮像処理が実行されると、撮像により取得された画像データを元画像データとした上で、ステップS101に進む。
Next, a processing procedure for applying an image effect to image data captured by the
ステップS101は、元画像データから縮小画像データを作成する処理である。なお、このステップS101の処理により、元画像データとは別に縮小画像データが作成され、内蔵メモリ38に記憶される。
Step S101 is processing for creating reduced image data from original image data. Note that reduced image data is created separately from the original image data and stored in the built-in
ステップS102は、ステップS101において作成された縮小画像データを用いて、注目領域を検出する処理である。ステップS102においては、縮小画像を構成する画素のうち、輝度の高い画素を抽出し、抽出された画素のうち、複数の画素が、略円形、又は略楕円形となるように隣り合う領域を注目領域として検出する。この注目領域の検出時に、その中心となる画素が特定される。つまり、図4に示す、照明された展示物を撮像した場合、ライトスタンドの発光部71と、展示物のうち、ライトスタンドにより照明された領域72が注目領域として検出される。
Step S102 is processing for detecting a region of interest using the reduced image data created in step S101. In step S102, pixels with high luminance are extracted from the pixels constituting the reduced image, and attention is paid to adjacent areas so that a plurality of extracted pixels are substantially circular or elliptical. Detect as a region. At the time of detecting this attention area, the pixel serving as the center is specified. That is, when the illuminated exhibit shown in FIG. 4 is imaged, the light stand 71 of the light stand and the
ステップS103は、ステップS102によって抽出された注目領域の周縁における画素の色彩情報を検出する処理である。なお、ステップS103においては、注目領域の周縁の領域のうち、輝度が略同一となる画素を検出し、検出された画素の階調値を平均した値を色彩情報として取得する。 Step S103 is processing for detecting color information of pixels at the periphery of the attention area extracted in step S102. In step S103, pixels having substantially the same luminance are detected from the peripheral area of the attention area, and a value obtained by averaging the gradation values of the detected pixels is acquired as color information.
ステップS104は、一次マスク画像データの作成処理である。ステップS102において抽出された注目領域の大きさ(画素数)はわかっていることから、この注目領域の大きさから、一次マスク画像に配置されるパターンの大きさ、つまり、クロスパターンの各ラインの長さを示す画素数、及び太さを示す画素数がそれぞれ決定される。また、取得された色彩情報を用いて、クロスパターンの基点から各ラインの先端に向けて輝度が小さくなるように、クロスパターンの各画素の色(RGB値、又はYCrCb値)が決定される。これら決定により、注目領域の中心の画素を基点として、これら決定により、背景が黒色で、注目領域の中心に該当する画素を基点としたクロスパターンが設けられた一次マスク画像データが生成される。 Step S104 is processing for creating primary mask image data. Since the size (number of pixels) of the attention area extracted in step S102 is known, the size of the pattern arranged in the primary mask image, that is, each line of the cross pattern is determined from the size of the attention area. The number of pixels indicating the length and the number of pixels indicating the thickness are respectively determined. Also, using the acquired color information, the color (RGB value or YCrCb value) of each pixel of the cross pattern is determined so that the luminance decreases from the base point of the cross pattern toward the tip of each line. With these determinations, primary mask image data is generated with a pixel at the center of the region of interest as a base point and a black pattern on the background and a cross pattern with the pixel corresponding to the center of the region of interest as the base point.
ステップS105は、ステップS104にて作成された一次マスク画像パターンに対するLPF処理である。このLPF処理を行うことで、マスク画像がクロスパターンと背景との境界をぼかした画像となる。 Step S105 is an LPF process for the primary mask image pattern created in step S104. By performing this LPF process, the mask image becomes an image in which the boundary between the cross pattern and the background is blurred.
ステップ106は、縮小画像データから輝度を算出する処理である。詳細には、縮小画像の各画素の輝度を算出し、その算出された輝度の平均値を求める処理である。 Step 106 is a process of calculating luminance from the reduced image data. Specifically, it is a process of calculating the luminance of each pixel of the reduced image and obtaining the average value of the calculated luminance.
ステップS107は、算出された輝度の平均値と、閾値とを比較処理である。この比較により、輝度の平均値が閾値を超過する場合には、ステップS108に進む。一方、輝度の平均値が閾値以下となる場合には、ステップS110に進む。 Step S107 is a process of comparing the calculated average value of luminance and a threshold value. As a result of this comparison, if the average luminance value exceeds the threshold value, the process proceeds to step S108. On the other hand, if the average luminance value is equal to or less than the threshold value, the process proceeds to step S110.
ステップS108は、一次マスク画像データと縮小画像データとを用いた差分処理により二次マスク画像データを生成する処理である。ステップS107において、縮小画像データの輝度値の平均値が閾値を超えると判定された場合、元画像データは、明るい環境下で取得された画像データであると判断されていることから、元画像データに拡大した一次マスク画像データを合成する、又は縮小画像データに一次マスク画像データを合成すると、クロスパターンを構成する画素の階調値が飽和してしまう。従って、このステップS108の処理を行うことで、合成した画像におけるクロスパターンを構成する画素の階調値が、一次マスク画像データのクロスパターンを構成する画素の階調値となり、画像を合成したときの階調値の飽和を防止することができる。なお、このステップS108によって二次マスク画像データが生成されると、この生成された二次マスク画像データが、以降の処理に使用されるマスク画像データとなる。 Step S108 is processing for generating secondary mask image data by difference processing using primary mask image data and reduced image data. If it is determined in step S107 that the average luminance value of the reduced image data exceeds the threshold value, the original image data is determined to be image data acquired in a bright environment. When the primary mask image data enlarged to 1 is combined or the primary mask image data is combined with the reduced image data, the gradation values of the pixels constituting the cross pattern are saturated. Accordingly, by performing the processing of step S108, the gradation value of the pixels constituting the cross pattern in the synthesized image becomes the gradation value of the pixels constituting the cross pattern of the primary mask image data, and the image is synthesized. Can be prevented from being saturated. When the secondary mask image data is generated in step S108, the generated secondary mask image data becomes mask image data used for the subsequent processing.
ステップS109は、マスク画像データと縮小画像データとを合成する処理である。つまり、ステップS108において、二次マスク画像データが作成されていることから、このステップS109の処理では、二次マスク画像データと縮小画像データとが合成される。図7に示すように、例えば室内の展示物を撮像した画像にマスク画像が合成されると、ライトスタンドの発光部と、ライトスタンドにより照明される展示物に対してクロスパターンが付与された画像CIとなる。例えば、二次マスク画像データをマスク画像データとして使用した場合、この二次マスク画像データを縮小画像データに合成することで、クロスパターンを構成する各画素の階調値が飽和することなく、合成処理された画像におけるクロスパターンに対して違和感を与えることのない画像が取得される。 Step S109 is processing for combining the mask image data and the reduced image data. That is, since the secondary mask image data is created in step S108, the secondary mask image data and the reduced image data are combined in the process of step S109. As shown in FIG. 7, for example, when a mask image is combined with an image of an indoor exhibit, an image in which a cross pattern is given to the light emitting unit of the light stand and the exhibit illuminated by the light stand. CI. For example, when the secondary mask image data is used as the mask image data, the secondary mask image data is combined with the reduced image data, so that the gradation value of each pixel constituting the cross pattern is not saturated and combined. An image that does not give a sense of incongruity to the cross pattern in the processed image is acquired.
一方、ステップS107の処理によって算出された輝度の平均値が閾値以下となる場合には、ステップS110に進む。このステップS110では、画像生成部51で生成された一次マスク画像データをマスク画像データとすることで、マスク画像データと縮小画像データとを合成する処理である。
On the other hand, when the average value of the brightness calculated by the process of step S107 is equal to or less than the threshold value, the process proceeds to step S110. In step S110, the primary mask image data generated by the
ステップS109、又はステップS110の処理が終了すると、ステップS111に進む。このステップS111では、合成された画像をLCDモニタ38に表示する処理である。
When the process of step S109 or step S110 ends, the process proceeds to step S111. In this step S111, the synthesized image is displayed on the
ステップS112は、合成された画像を変更するか否かが選択される処理である。このステップS112により、合成された画像の変更を行わない場合には、ステップS113に進み、合成された画像の変更を行う場合には、ステップS102に戻る。なお、合成された画像を変更するとは、例えば合成するマスク画像のパターンを変更する、選択されているパターンがクロスパターンである場合には、クロスパターンのライン数を変更する、或いは、クロスパターンの傾斜角を変更することが挙げられる。 Step S112 is processing for selecting whether or not to change the synthesized image. If the synthesized image is not changed in step S112, the process proceeds to step S113. If the synthesized image is changed, the process returns to step S102. Note that changing the combined image means, for example, changing the pattern of the mask image to be combined, changing the number of lines of the cross pattern when the selected pattern is a cross pattern, or changing the pattern of the cross pattern. For example, changing the inclination angle.
ステップS113は、マスク画像データを拡大する処理である。ステップ105の処理を行うことで、マスク画像データは、背景とクロスパターンとの境界がぼけた画像からなることから、ステップS109によりマスク画像データを拡大しても、マスク画像データの画質を劣化させずに済む。 Step S113 is a process for enlarging the mask image data. By performing the processing in step 105, the mask image data is an image in which the boundary between the background and the cross pattern is blurred. Therefore, even if the mask image data is enlarged in step S109, the image quality of the mask image data is deteriorated. You do n’t have to.
ステップS114は、元画像データと拡大したマスク画像データとを合成する処理である。ステップS114によって拡大されたマスク画像データは、その画質は劣化していないことから、元画像に合成されるクロスパターンに対して違和感を与えることがない。また、例えば元画像が明るい環境下で取得された画像データの場合であっても、マスク画像データと元画像データとを合成したときに、クロスパターンを構成する画素の階調値が飽和することがない。これにより、例えばクロススクリーンフィルタを用いて撮像を行うことで得られる画像と同等の画像を、擬似的に、また、高速に作成することができる。なお、ステップS115は、作成された合成画像データを内蔵メモリに記憶する処理である。 Step S114 is a process of combining the original image data and the enlarged mask image data. Since the image quality of the mask image data enlarged in step S114 has not deteriorated, there is no sense of incongruity with the cross pattern synthesized with the original image. In addition, for example, even in the case of image data acquired in an environment where the original image is bright, when the mask image data and the original image data are combined, the gradation values of the pixels constituting the cross pattern are saturated. There is no. Thereby, for example, an image equivalent to an image obtained by imaging using a cross-screen filter can be created in a pseudo and high speed manner. Note that step S115 is processing for storing the created composite image data in the built-in memory.
本実施形態では、縮小画像とマスク画像とを合成した後、LCDモニタ36に表示させる内容としているが、これに限定される必要はなく、元画像と拡大したマスク画像との合成画像を縮小してLCDモニタ36に表示させるようにしてもよい。 In this embodiment, the reduced image and the mask image are combined and then displayed on the LCD monitor 36. However, the present invention is not limited to this, and the combined image of the original image and the enlarged mask image is reduced. It may be displayed on the LCD monitor 36.
本実施形態では、画像拡縮部50、画像生成部51、フィルタ処理部54、画像合成部55、輝度算出部56及び輝度判定部57を、画像処理部35及びCPU15とは別に構成した形態としているが、これに限定されるものではなく、これら各部の機能を画像処理部35又はCPU15が備えている形態であってもよい。
In the present embodiment, the image enlargement / reduction unit 50, the
本実施形態では、マスク画像のパターンとしてクロスパターンを挙げているが、これに限定する必要はなく、例えば、音符やハート等であってもよい。 In the present embodiment, a cross pattern is cited as a mask image pattern. However, the present invention is not limited to this. For example, a musical note or a heart may be used.
本実施形態では、輝度の高い領域を注目領域として検出し、検出された注目領域に対してクロスパターンを合成する実施形態としているが、例えば元画像、或いは縮小画像の背景の色彩情報と注目領域の色彩情報とを取得し、背景の色彩情報と同一系統の色彩情報からなる注目領域に対して、クロスパターンを付与することも可能である。また、この他に、背景の色彩情報を取得し、取得された背景の色彩情報に応じて、合成するマスク画像データのパターンの色を調整することも可能である。 In the present embodiment, an area with high luminance is detected as an attention area, and a cross pattern is synthesized with the detected attention area. For example, the background color information of the original image or the reduced image and the attention area It is also possible to acquire the color information and to add a cross pattern to the region of interest consisting of the same color information as the background color information. In addition, it is also possible to acquire background color information and adjust the color of the pattern of the mask image data to be synthesized in accordance with the acquired background color information.
本実施形態では、撮像した画像に対して画像効果を付与する機能を備えたデジタルカメラについて説明したが、これに限定されるものではなく、例えば、図6のフローチャートに示す手順を実行できる画像処理装置であってもよい。また、図6のフローチャートに示す手順をコンピュータに実行させることができるプログラム、及び該プログラムを記憶し、コンピュータで読み取ることができる記憶媒体であってもよい。 In the present embodiment, a digital camera having a function of giving an image effect to a captured image has been described. However, the present invention is not limited to this. For example, image processing that can execute the procedure shown in the flowchart of FIG. It may be a device. Moreover, the program which can make a computer perform the procedure shown in the flowchart of FIG. 6 and the storage medium which memorize | stores this program and can be read with a computer may be sufficient.
10…デジタルカメラ、38…内蔵メモリ、50…画像拡縮部、51…画像生成部、52…領域検出部、53…色彩情報取得部、54…フィルタ処理部、55…画像合成部、56…輝度算出部、57…輝度判定部、66,67…クロスパターン
DESCRIPTION OF
Claims (8)
前記画像縮小手段により生成された縮小画像を利用して、第1のマスク画像を生成する第1画像生成手段と、
前記縮小画像における輝度を検出する輝度検出手段と、
前記輝度検出手段により検出された輝度に基づいて、前記第1のマスク画像と前記縮小画像とを差分した第2のマスク画像を生成する第2画像生成手段と、
前記第2のマスク画像を拡大する画像拡大手段と、
拡大された第2のマスク画像を前記元画像に合成する画像合成手段と、
を備えたことを特徴とする撮像装置。 Image reduction means for reducing the original image obtained at the time of imaging;
First image generation means for generating a first mask image using the reduced image generated by the image reduction means;
Brightness detection means for detecting brightness in the reduced image;
Second image generation means for generating a second mask image obtained by subtracting the first mask image and the reduced image based on the brightness detected by the brightness detection means;
Image enlarging means for enlarging the second mask image;
Image synthesizing means for synthesizing the enlarged second mask image with the original image;
An imaging apparatus comprising:
前記第1のマスク画像に対してフィルタ処理を実行するフィルタ処理手段を備え、
前記第2画像生成手段は、前記フィルタ処理後の第1のマスク画像と、前記縮小画像とを用いて前記第2のマスク画像を作成することを特徴とする撮像装置。 The imaging device according to claim 1,
Filter processing means for performing filter processing on the first mask image;
The image pickup apparatus, wherein the second image generation unit creates the second mask image using the first mask image after the filtering process and the reduced image.
前記縮小画像における注目領域を検出する領域検出手段を備え、
前記第1画像生成手段は、検出された前記注目領域に対応した前記第1のマスク画像を作成することを特徴とする撮像装置。 The imaging device according to claim 1 or 2,
Comprising an area detecting means for detecting an attention area in the reduced image;
The first stroke image generator is an imaging apparatus characterized by creating said first mask image corresponding to the detected the target area.
前記領域検出手段は、前記縮小画像の各画素における輝度を算出して、算出された各画素における輝度のうち、輝度が高い画素を前記注目領域として検出することを特徴とする撮像装置。 The imaging device according to claim 3.
It said region detecting means calculates the luminance of each pixel of the previous SL reduced image of the luminance of each pixel calculated, an imaging device and detects the high brightness pixels as the region of interest.
前記領域検出手段により検出された前記注目領域の周縁部における色彩情報を取得する色彩情報取得手段をさらに備え、
前記第1画像生成手段は、前記注目領域の大きさと該注目領域の周縁部における色彩情報とに基づいて前記第1のマスク画像を生成することを特徴とする撮像装置。 In the imaging device according to claim 3 or 4,
Further comprising color information acquisition means for acquiring color information at a peripheral edge of the region of interest detected by the area detection means;
The imaging apparatus according to claim 1, wherein the first image generation unit generates the first mask image based on a size of the attention area and color information at a peripheral portion of the attention area.
前記第1のマスク画像は、前記縮小画像と同一の画像サイズで、かつ予め設定されたパターンが前記注目領域に対応する位置に形成された画像からなることを特徴とする撮像装置。 In the imaging device according to any one of claims 1 to 5,
The imaging apparatus according to claim 1, wherein the first mask image is an image having the same image size as the reduced image and having a preset pattern formed at a position corresponding to the region of interest.
前記パターンは、前記注目領域の中心を基点にして複数のラインを放射状に延出させた形状からなることを特徴とする撮像装置。 The imaging device according to claim 6,
The image pickup apparatus according to claim 1, wherein the pattern has a shape in which a plurality of lines are radially extended with a center of the attention area as a base point.
前記縮小画像に基づいて、第1のマスク画像を生成するステップと、
前記縮小画像における輝度を検出するステップと、
検出された輝度に基づいて、前記第1のマスク画像と前記縮小画像とを差分した第2のマスク画像を生成するステップと、
前記第2のマスク画像を拡大するステップと、
拡大された第2のマスク画像を前記元画像に合成するステップと、
をコンピュータに実行させることを特徴とする画像効果付与プログラム。 Obtaining a reduced image by reducing the original image obtained at the time of imaging;
Generating a first mask image based on the reduced image;
Detecting the luminance in the reduced image;
Generating a second mask image obtained by subtracting the first mask image and the reduced image based on the detected luminance;
Enlarging the second mask image;
Combining the enlarged second mask image with the original image;
An image effect providing program that causes a computer to execute the above.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007327699A JP5125478B2 (en) | 2007-12-19 | 2007-12-19 | Imaging apparatus and image effect providing program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007327699A JP5125478B2 (en) | 2007-12-19 | 2007-12-19 | Imaging apparatus and image effect providing program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2009152780A JP2009152780A (en) | 2009-07-09 |
| JP5125478B2 true JP5125478B2 (en) | 2013-01-23 |
Family
ID=40921421
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007327699A Expired - Fee Related JP5125478B2 (en) | 2007-12-19 | 2007-12-19 | Imaging apparatus and image effect providing program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5125478B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013048013A (en) * | 2009-12-17 | 2013-03-07 | Hitachi Vehicle Energy Ltd | Nonaqueous electrolyte secondary battery |
| CN109754374A (en) * | 2018-12-20 | 2019-05-14 | 深圳市资福医疗技术有限公司 | A kind of method and device removing brightness of image noise |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH11346303A (en) * | 1998-04-02 | 1999-12-14 | Fuji Photo Film Co Ltd | Image processing method |
| JP2001155149A (en) * | 1999-11-29 | 2001-06-08 | Fuji Photo Film Co Ltd | Method and device for correcting image, and computer- readable recording medium |
| JP2005117399A (en) * | 2003-10-08 | 2005-04-28 | Sanyo Electric Co Ltd | Image processor |
| JP4683190B2 (en) * | 2005-01-28 | 2011-05-11 | カシオ計算機株式会社 | Imaging apparatus, image effect applying method, and image effect applying program |
-
2007
- 2007-12-19 JP JP2007327699A patent/JP5125478B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2009152780A (en) | 2009-07-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5898466B2 (en) | Imaging device, control method thereof, and program | |
| KR101247647B1 (en) | Image synthesizing device, image synthesizing method, and recording medium | |
| JP5767485B2 (en) | Image processing apparatus and control method | |
| JP5968068B2 (en) | Imaging apparatus for controlling exposure, control method for imaging apparatus, program, and recording medium | |
| JP5672796B2 (en) | Image processing apparatus and image processing method | |
| JP6720881B2 (en) | Image processing apparatus and image processing method | |
| JP2012029014A (en) | Image processing device, and control method of the same | |
| JP2014017681A (en) | Imaging apparatus, method of controlling the same, program, and storage medium | |
| JP5861924B2 (en) | Imaging device | |
| JP4935665B2 (en) | Imaging apparatus and image effect providing program | |
| JP2010263423A (en) | Image processing method and image processing apparatus | |
| JP4523629B2 (en) | Imaging device | |
| JP5082884B2 (en) | Imaging apparatus and image effect addition program | |
| JP2010199727A (en) | Imager | |
| JP2009200743A (en) | Image processor, image processing method, image processing program and imaging apparatus | |
| JP6541501B2 (en) | IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, AND IMAGE PROCESSING METHOD | |
| JP2008099260A (en) | Image processing apparatus, electronic camera, and image processing program | |
| JP5125478B2 (en) | Imaging apparatus and image effect providing program | |
| JP2023111637A (en) | Image processing device and method and imaging apparatus | |
| JP5882644B2 (en) | Image processing apparatus, control method thereof, and program | |
| JP2008164758A (en) | Image restoration device | |
| JP4299753B2 (en) | Image signal processing apparatus and image signal processing method | |
| JP2009124309A (en) | Imaging device | |
| JP4389671B2 (en) | Image processing apparatus, image processing method, and computer program | |
| JP6823942B2 (en) | Image synthesizer, image synthesizer, image synthesizer program and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20101216 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110215 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120223 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120228 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120427 |
|
| 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: 20121002 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20121015 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 5125478 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20151109 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20151109 Year of fee payment: 3 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |