JP5740888B2 - Image processing apparatus, electronic camera, and program - Google Patents
Image processing apparatus, electronic camera, and program Download PDFInfo
- Publication number
- JP5740888B2 JP5740888B2 JP2010216695A JP2010216695A JP5740888B2 JP 5740888 B2 JP5740888 B2 JP 5740888B2 JP 2010216695 A JP2010216695 A JP 2010216695A JP 2010216695 A JP2010216695 A JP 2010216695A JP 5740888 B2 JP5740888 B2 JP 5740888B2
- Authority
- JP
- Japan
- Prior art keywords
- color
- image
- contrast
- predetermined area
- hue
- 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
- 238000012545 processing Methods 0.000 title claims description 42
- 238000001514 detection method Methods 0.000 claims description 50
- 238000000034 method Methods 0.000 claims description 34
- 230000008569 process Effects 0.000 claims description 27
- 230000000295 complement effect Effects 0.000 claims description 16
- 238000003384 imaging method Methods 0.000 claims description 15
- 238000011156 evaluation Methods 0.000 claims description 12
- 238000012937 correction Methods 0.000 description 26
- 238000010586 diagram Methods 0.000 description 16
- 230000015654 memory Effects 0.000 description 13
- 241001422033 Thestylus Species 0.000 description 8
- 238000006243 chemical reaction Methods 0.000 description 6
- 239000003086 colorant Substances 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 5
- 239000006185 dispersion Substances 0.000 description 5
- 230000009466 transformation Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- PCTMTFRHKVHKIS-BMFZQQSSSA-N (1s,3r,4e,6e,8e,10e,12e,14e,16e,18s,19r,20r,21s,25r,27r,30r,31r,33s,35r,37s,38r)-3-[(2r,3s,4s,5s,6r)-4-amino-3,5-dihydroxy-6-methyloxan-2-yl]oxy-19,25,27,30,31,33,35,37-octahydroxy-18,20,21-trimethyl-23-oxo-22,39-dioxabicyclo[33.3.1]nonatriaconta-4,6,8,10 Chemical compound C1C=C2C[C@@H](OS(O)(=O)=O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@H]([C@H](C)CCCC(C)C)[C@@]1(C)CC2.O[C@H]1[C@@H](N)[C@H](O)[C@@H](C)O[C@H]1O[C@H]1/C=C/C=C/C=C/C=C/C=C/C=C/C=C/[C@H](C)[C@@H](O)[C@@H](C)[C@H](C)OC(=O)C[C@H](O)C[C@H](O)CC[C@@H](O)[C@H](O)C[C@H](O)C[C@](O)(C[C@H](O)[C@H]2C(O)=O)O[C@H]2C1 PCTMTFRHKVHKIS-BMFZQQSSSA-N 0.000 description 3
- 238000002834 transmittance Methods 0.000 description 3
- 238000012935 Averaging Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Landscapes
- Studio Circuits (AREA)
- Studio Devices (AREA)
Description
本発明は、画像処理装置、電子カメラ及びプログラムに関する。 The present invention relates to an image processing apparatus, an electronic camera, and a program.
近年、撮像素子で撮影した画像をデジタルデータとして記録する電子カメラにおいて、表示画面にタッチパネルを採用する機種が知られている。そして、画像再生時に文字を例えばポインティングデバイス(スタイラス)により入力する技術が知られている(例えば、特許文献1参照)。 2. Description of the Related Art In recent years, a model that uses a touch panel as a display screen is known in an electronic camera that records an image captured by an image sensor as digital data. A technique is known in which characters are input by, for example, a pointing device (stylus) during image reproduction (see, for example, Patent Document 1).
しかし、上記の技術では、例えば、入力した文字を画像に重畳表示させた場合、背景の画像との関係によっては、見づらくなるおそれがある。 However, with the above technique, for example, when an input character is superimposed on an image, it may be difficult to see depending on the relationship with the background image.
そこで、本発明は、上記事情に鑑み、文字等を画像に重畳表示させた場合、視認性を向上させる手段を提供することを目的とする。 In view of the above circumstances, an object of the present invention is to provide means for improving visibility when characters or the like are superimposed on an image.
第1の発明に係る画像処理装置は、コントラスト検出部と、受付部と、設定部とを備える。コントラスト検出部は、画像表示装置に表示される画像の所定領域の画像データに基づいて、所定領域内に含まれる画像のコントラストを検出する。受付部は、所定領域に表示する表示体の入力を受け付ける。設定部は、コントラストに応じて、所定領域を表示する色と表示体を表示する色とを設定する。 The image processing apparatus according to the first invention comprises a Contrast detector, and a receiving unit, and a setting unit. Contrast detection unit, based on the image data of a predetermined area of the image displayed on the image display device, detects a contrast of an image included in a predetermined area. The reception unit receives an input of a display body to be displayed in a predetermined area. Setting unit, in accordance with the Contrast, setting the color to display color and display member for displaying a predetermined area.
第2の発明は、第1の発明において、コントラスト検出部は、所定領域の画像データの階調分布を表すヒストグラムを算出し、ヒストグラムの分散を示す値に基づいて、コントラストを検出する。 In a second aspect based on the first aspect, the contrast detection unit calculates a histogram representing the gradation distribution of the image data in the predetermined area, and detects the contrast based on a value indicating the variance of the histogram.
第3の発明は、第1又は第2の発明において、色相検出部をさらに備える。色相検出部は、所定領域の画像データに基づいて、所定領域の色相を検出する。コントラスト検出部は、所定領域の画像データに基づいて、コントラストの度合いを示す評価値を算出する。設定部は、評価値が閾値より高い場合には、所定領域を表示する色を色相検出部が検出した色相の類似色に設定すると共に、表示体を表示する色を類似色の補色に設定する。また、設定部は、評価値が閾値以下の場合には、所定領域を表示する色を設定せず、表示体を表示する色を色相検出部が検出した色相の補色に設定する。 According to a third invention, in the first or second invention, a hue detection unit is further provided. The hue detection unit detects the hue of the predetermined area based on the image data of the predetermined area. The contrast detection unit calculates an evaluation value indicating the degree of contrast based on the image data of the predetermined area. Setting unit, when the evaluation value is higher than the threshold value, and sets the hue of similar color hue detection unit detects a color for displaying a predetermined area, sets the color for displaying the display body complementary colors similar colors . The setting unit, when the evaluation value is below the threshold, without setting the color for displaying a predetermined area, the hue detecting unit colors for displaying a display body is set to complementary hue detected.
第4の発明に係る電子カメラは、被写体の像を撮像し画像データを生成する撮像部と、第1から第3の発明の何れかに係る画像処理装置とを備える。 An electronic camera according to a fourth aspect of the invention includes an image pickup unit that picks up an image of a subject and generates image data, and an image processing device according to any one of the first to third aspects of the invention .
第5の発明に係るプログラムは、コントラスト検出処理と、受付処理と、設定処理とをコンピュータに実行させる。コントラスト検出処理は、画像表示装置に表示される画像の所定領域の画像データに基づいて、所定領域内に含まれる画像のコントラストを検出する。受付処理は、所定領域に表示する表示体の入力を受け付ける。設定処理は、コントラストに応じて、所定領域を表示する色と表示体を表示する色とを設定する。 A program according to the fifth invention, and contrast detection process, a reception process to execute the setting processing in the computer. Contrast detection processing based on the image data of a predetermined area of the image displayed on the image display device, it detects a contrast of an image included in a predetermined area. In the reception process, an input of a display body displayed in a predetermined area is received. Setting process, in accordance with the Contrast, setting the color to display color and display member for displaying a predetermined area.
本発明は、文字等を画像に重畳表示させた場合、視認性を向上させる手段を提供できる。 The present invention can provide means for improving visibility when characters or the like are superimposed on an image.
以下、図面に基づいて本発明の実施の形態を詳細に説明する。図1は、電子カメラ1の構成を説明するブロック図である。本発明の一実施形態の電子カメラ1は、例えば、撮像により生成した本画像内にユーザ入力による表示体を重畳表示させる表示体入力モードを有する。なお、表示体は、文字、記号、図形(イラスト)のうち少なくとも何れか1つを含む。また、本実施形態では、表示体入力モードにおいて、わかりやすくするため、文字を入力する場合について例示する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram illustrating the configuration of the
電子カメラ1は、図1に示す通り撮像光学系10と、撮像部11と、RAM(Random Access Memory)12と、画像処理部13と、フラッシュメモリ14と、表示モニタ15と、記録インターフェース部(以下「記録I/F部」という)16と、レリーズ釦17と、操作部18と、タッチパネル19と、CPU(Central Processing Unit)20と、データバス21とを備える。
As shown in FIG. 1, the
このうち、撮像部11、RAM12、画像処理部13、フラッシュメモリ14、表示モニタ15、記録I/F部16及びCPU20は、データバス21を介して互いに接続されている。また、レリーズ釦17、操作部18及びタッチパネル19は、CPU20に接続されている。
Among these, the imaging unit 11, the
撮像光学系10は、ズームレンズとフォーカスレンズとを含む複数のレンズ群で構成されている。なお、簡単のため、図1では、撮像光学系10を1枚のレンズとして図示する。撮像部11は、被写体の像を撮像して画像データを生成する。撮像部11は、例えば、撮像素子と、アナログフロントエンド(AFE)回路と、A/D変換部とを有している。撮像素子は、例えばCCD(Charge Coupled Device)型のイメージセンサである。また、撮像素子の撮像面には、被写体の像をカラー検出するために、赤色(R)、緑色(G)、青色(B)の3種類のカラーフィルタが、一例としてベイヤー配列で配置されている。なお、撮像素子は、CMOS(Complementary Metal−Oxide Semiconductor)型のイメージセンサであっても良い。
The imaging
AFE回路は、撮像素子が出力する画像信号に対してアナログ信号処理を施す。A/D変換部は、アナログの画像信号をデジタルの画像信号に変換する。なお、撮像部11が出力する画像信号は、画像データとしてRAM12に一時的に記録される。RAM12は、画像データを一時的に記録するバッファメモリの領域を有する。
The AFE circuit performs analog signal processing on the image signal output from the image sensor. The A / D converter converts an analog image signal into a digital image signal. The image signal output from the imaging unit 11 is temporarily recorded in the
画像処理部13は、RAM12に記録されている画像データを読み出し、必要に応じて各種の画像処理(例えば、色補間処理、ホワイトバランス等)を施す。また、画像処理部13は、後述する指定領域の画像データの各画素の値(RGB値)に対して、RGB色座標からHSI色座標に変換するHSI変換を行い、色相(Hue)、彩度(Saturation)、輝度(Intensity)のデータを生成する。なお、画像処理部13は、RGB色座標からHSV色座標に変換するHSV変換を行い、色相(Hue)、彩度(Saturation)、明度(Value)のデータを生成しても良い。
The
フラッシュメモリ14は、不揮発性のメモリであって、例えば、電子カメラ1の制御を行うプログラムを予め記憶している。表示モニタ15は、例えば液晶のモニタである。表示モニタ15は、CPU20の指示に応じて画像や電子カメラ1の操作メニューを表示する。
The
記録I/F部16は、データの書き込みや読み出しのインターフェースを提供する。記録I/F部16には、着脱自在の記録媒体30を接続するためのコネクタ(不図示)が形成されている。そして、記録I/F部16は、例えば、そのコネクタに接続された記録媒体30にアクセスして画像の記録処理を行う。記録媒体30は、一例として、不揮発性のメモリカードである。図1では、コネクタに接続された後の記録媒体30を示している。
The recording I / F unit 16 provides an interface for writing and reading data. The recording I / F unit 16 is formed with a connector (not shown) for connecting a
レリーズ釦17は、半押し操作の指示入力と全押し操作(撮像動作開始)との指示入力とを受け付ける。操作部18は、電源釦、広角ズーム釦と、望遠ズーム釦等のユーザからの操作を受け付ける複数の釦(不図示)を有している。
The
タッチパネル19は、タッチパネル表面に接触した物体の位置情報を電気信号に変換して検出する。なお、タッチパネル表面に接触するとは、例えば、指先が物理的にタッチパネル表面に接触する場合に限られず、指先とタッチパネル表面とが間隔を隔てて電気的に接触している場合も含む。
The
タッチパネル19は、表示モニタ15と同等の大きさを有する透明なパネルで構成されており、表示モニタ15の表示画面上に配置される。例えば、タッチパネル19は、圧力による電圧の変化を検出する抵抗膜式のパネルが採用されている。ここで、タッチパネル19は、抵抗膜式のパネルに限られず、静電気による電気信号を感知する静電容量式のパネルであっても良い。
The
タッチパネル19は、検出した電気信号をCPU20に出力することでユーザからの入力を受け付ける。以下の説明では、ユーザはスタイラス(不図示)を用いてタッチパネルの操作を行うこととする。
The
CPU20は、各種演算及び電子カメラ1の制御を行うプロセッサである。CPU20は、フラッシュメモリ14に予め格納されたシーケンスプログラムを実行することにより、電子カメラ1の各部の制御等を行う。
The
また、CPU20は、フラッシュメモリ14に予め格納された本発明の一実施形態のプログラムを実行することにより、位置情報検出部20aと、設定部20bと、コントラスト検出部20cと、受付部20dと、色相検出部20eと、補正部20fとしても機能する。なお、電子カメラ1は、記録媒体30に記録された本発明の一実施形態のプログラムをフラッシュメモリ14に記録しても良い。これにより、新たな機能を追加するファームウエアとして機能させることができる。
Further, the
位置情報検出部20aは、タッチパネル19に接触するスタイラスの位置情報を検出する。具体的には、位置情報検出部20aは、タッチパネル19からの電気信号に基づいて、スタイラスの接触点の座標データを算出する。これにより、位置情報検出部20aは、表示モニタ15の表示画面に接触するスタイラスの位置情報(座標データ)を画像内の位置に対応させて検出する。
The position information detection unit 20 a detects position information of the stylus that contacts the
設定部20bは、位置情報に基づいて、表示モニタ15に表示される画像内の指定領域を設定する。具体的には、設定部20bは、スタイラスの入力による位置情報に基づいて、画像内の指定領域を設定する。
The
コントラスト検出部20cは、指定領域の画像データに基づいて、指定領域のコントラストを検出する。具体的には、コントラスト検出部20cは、指定領域の画像データの階調分布を表すヒストグラムを算出し、ヒストグラムの分散を示す値(例えば標準偏差の値)に基づいて、コントラストを検出する。これにより、コントラストの検出が容易になる。なお、本実施形態では、標準偏差の値をコントラストの度合いを示す評価値とする。
The
受付部20dは、指定領域に表示する文字の入力を位置情報検出部20aを介して受け付ける。具体的には、位置情報検出部20aは、スタイラスの移動軌跡に基づく位置情報を文字データとして検出する。受付部20dは、文字データを指定領域に表示する文字の入力として受け付けると共に、文字データをRAM12に記録する。
The accepting
色相検出部20eは、指定領域の画像データに基づいて、指定領域の色相を検出する。具体的には、色相検出部20eは、一例として指定領域の画像データを画像処理部13にHSI変換させることにより、指定領域の色相を検出する。
The hue detection unit 20e detects the hue of the designated area based on the image data of the designated area. Specifically, the hue detection unit 20e detects the hue of the designated region by causing the
補正部20fは、コントラストの度合いに応じて、文字が表示される指定領域内の表示態様を補正する。具体的には、コントラスト検出部20cは、指定領域の画像データに基づいて、コントラストの度合いを示す評価値(標準偏差の値)を算出する。補正部20fは、評価値が閾値より高い場合には、指定領域の色相の色を類似色(例えば、色相環上で隣接する色相の何れか一方)に補正すると共に、文字の色を類似色の補色に補正する。また、補正部20fは、評価値が閾値以下の場合には、文字の色を色相の補色に補正する。したがって、補正部20fは、評価値に応じて、指定領域内に表示される文字の視認性を向上させることができる。
The
次に、表示体入力モードにおける電子カメラ1の動作の一例を説明する。ここで、電子カメラ1で本画像の撮影後、図1に示す操作部18が表示体入力モードの指示入力を受け付けると、CPU20は、図2に示すフローの処理を開始させる。図2は、表示体入力モードにおける電子カメラ1の動作の一例を示すフローチャートである。図3は、文字色の決定のサブルーチンを示すフローチャートである。図4は、背景レイヤーの色及び文字色の決定のサブルーチンを示すフローチャートである。
Next, an example of the operation of the
ステップS101:CPU20の位置情報検出部20aは、タッチパネル19を介して位置情報の検出処理を行う。具体的には、先ず、CPU20は、ユーザ入力に基づいて指定された画像を表示モニタ15に表示させる。続いて、位置情報検出部20aは、表示モニタ15上のタッチパネル19に接触するスタイラスの位置情報(座標データ)を検出する。
Step S <b> 101: The position information detection unit 20 a of the
ステップS102:CPU20の設定部20bは、指定領域の設定処理を行う。具体的には、設定部20bは、位置情報検出部20aが検出した位置情報に基づいて、指定領域を設定する。
Step S102: The setting
図5は、指定領域の設定例を説明する図である。図5(a)は、表示モニタ15に表示された本画像を示す図である。図5(a)では、一例として、海辺を移動するヨット40の本画像を表している。ここで、ユーザがスタイラスで略矩形を入力した場合、設定部20bは、ユーザが入力した略矩形による座標データに基づいて、例えば、矩形の座標データに変換する。図5(b)は、設定部20bにより設定された指定領域50を示す図である。
FIG. 5 is a diagram for explaining an example of setting a designated area. FIG. 5A is a diagram showing the main image displayed on the
ステップS103:CPU20のコントラスト検出部20cは、指定領域のコントラストの検出処理を行う。例えば、コントラスト検出部20cは、先ず、図5(b)に示す指定領域50の画像データの階調分布(輝度分布)を表すヒストグラムを算出する。続いて、コントラスト検出部20cは、ヒストグラムに基づいて、コントラストの度合いを示す評価値として標準偏差を算出する。具体的には、コントラスト検出部20cは、ヒストグラムにおけるデータの平均値との差(偏差)の2乗を平均し、さらに平方根をとることにより標準偏差を算出する。なお、コントラスト検出部20cは、ヒストグラムにおけるデータの平均値との差(偏差)の2乗を平均した値(分散)を算出しても良い。
Step S103: The
図6は、指定領域内のヒストグラムを例示する図である。横軸は、輝度を表し、縦軸は、頻度(該当する画素数)を表している。輝度の値は、例えば、0(純黒)から255(純白)までのデジタル値をとることとする。図6(a)は、偏り傾向を表し、図6(b)は、分散傾向を表している。ここで、図6(a)において、ヒストグラムの範囲が狭く偏っている場合、標準偏差の値は、分散傾向の場合と比較して低くなる。一方、図6(b)において、ヒストグラムの範囲が広範囲に分散している場合、標準偏差の値は、偏り傾向の場合と比較して高くなる。 FIG. 6 is a diagram illustrating a histogram in the designated area. The horizontal axis represents luminance, and the vertical axis represents frequency (number of corresponding pixels). The luminance value is a digital value from 0 (pure black) to 255 (pure white), for example. FIG. 6A shows a bias tendency, and FIG. 6B shows a dispersion tendency. Here, in FIG. 6A, when the range of the histogram is narrow and biased, the value of the standard deviation is lower than that in the case of the dispersion tendency. On the other hand, in FIG. 6B, when the range of the histogram is dispersed over a wide range, the value of the standard deviation is higher than that in the case of a bias tendency.
つまり、標準偏差の値が偏り傾向の場合、分散傾向の場合と比較してコントラストは低くなる。したがって、文字等を重畳表示した場合、視認性は、確保されやすい。一方、標準偏差の値が分散傾向の場合、偏り傾向の場合と比較してコントラストは高くなる。つまり、文字等を重畳表示した場合、視認性は、確保されにくい。本実施形態では、標準偏差の値が分散傾向の場合、後述する背景レイヤーを用いて視認性を確保できるようにする。また、本実施形態では、所定の標準偏差の値を閾値として設定し、閾値より高いか否かによって指定領域の補正処理を変更する。なお、本実施形態では、実験等に基づいて、閾値を一例として30の値とする。 That is, when the standard deviation value tends to be biased, the contrast becomes lower than that of the dispersion tendency. Therefore, when characters or the like are displayed in a superimposed manner, visibility is easily ensured. On the other hand, when the standard deviation value has a tendency to disperse, the contrast is higher than that in the case of a bias tendency. That is, when characters or the like are superimposed and displayed, the visibility is difficult to be ensured. In the present embodiment, when the standard deviation value tends to be distributed, visibility is ensured by using a background layer described later. Further, in the present embodiment, a predetermined standard deviation value is set as a threshold value, and the correction process for the designated region is changed depending on whether or not the threshold value is higher than the threshold value. In the present embodiment, the threshold value is set to 30 as an example based on experiments and the like.
ステップS104:CPU20は、標準偏差の値が閾値よりも高いか否かを判定する。標準偏差の値が閾値以下の場合(ステップS104:No)、CPU20は、ステップS105の処理に移行する。
Step S104: The
ステップS105:CPU20は、図3に示す文字色の決定のサブルーチンを示すフローチャートに移行する。
(文字色の決定のサブルーチン)
ステップS201:CPU20の色相検出部20eは、指定領域の色相の検出処理を行う。具体的には、先ず、CPU20は、指定領域のRGBの画像データに対してHSI変換を画像処理部13に行わせる。そして、色相検出部20eは、例えば、HSI変換後の各画素の値に基づいて、最も頻度の高い色相を検出して指定領域の色相とする。なお、色相は、色相環を用いて視覚的に表現することができる。
Step S105: The
(Subroutine for determining character color)
Step S201: The hue detection unit 20e of the
図7は、色相環の一例を示す図である。図7(a)は、文字色のみを補正する場合の適用例を説明する図である。図7(b)は、文字色及び背景レイヤーの色を補正する場合の適用例を説明する図である。図7(a)及び(b)では、簡単のため、6色からなる色相環を例示しているが、これに限られない。例えば、色相環としては、色相を24通りに分類したオストワルト表色系の色相環であっても良い。或いは、色相環としては、色相を100通りに分類したマンセル表色系の色相環であっても良い。 FIG. 7 is a diagram illustrating an example of a hue circle. FIG. 7A is a diagram illustrating an application example in the case of correcting only the character color. FIG. 7B is a diagram illustrating an application example in the case where the character color and the background layer color are corrected. In FIGS. 7A and 7B, a hue circle composed of six colors is illustrated for the sake of simplicity, but the present invention is not limited to this. For example, the hue ring may be an Ostwald color system that has 24 hues. Alternatively, the hue circle may be a Munsell color system hue circle in which hues are classified into 100 ways.
ステップS202:CPU20は、文字色を補色に決定する。具体的には、CPU20は、色相検出部20eが検出した色相の補色に文字色を決定する。例えば、色相検出部20eにより検出された色相が青色の場合、CPU20は、文字色を黄色に設定する。図7(a)では、わかりやすくするため、実線の矢印で青色から黄色に決定されたことを模式的に表している。そして、CPU20は、サブルーチンを終了し、図2に示すステップS108の処理に戻る。
Step S202: The
一方、ステップS104において、標準偏差の値が閾値より高い場合(ステップS104:Yes)、CPU20は、ステップS106の処理に移行する。
On the other hand, when the standard deviation value is higher than the threshold value in step S104 (step S104: Yes), the
ステップS106:CPU20は、本画像の指定領域に重ね合わせる画像として背景レイヤーの設定処理を行う。この背景レイヤーは、本画像の指定領域に重ね合わされるため、最前面に位置する。例えば、標準偏差の値が30より大きく50未満の場合、CPU20は、標準偏差の値が50以上に比べて背景レイヤーの透過率(画像の階調濃度)を高める。また、例えば、標準偏差の値が50以上の場合、CPU20は、標準偏差の値が30より大きく50未満の場合に比べて背景レイヤーの透過率を下げる。なお、CPU20は、標準偏差の値に応じて段階的に背景レイヤーの透過率を変更しても良い。
Step S106: The
ステップS107:CPU20は、図4に示す背景レイヤーの色及び文字色の決定のサブルーチンを示すフローチャートに移行する。
(背景レイヤーの色及び文字色の決定のサブルーチン)
ステップS301:色相検出部20eは、ステップS201と同様にして指定領域の色相の検出処理を行う。
Step S107: The
(Subroutine for determining background layer color and text color)
Step S301: The hue detection unit 20e performs the hue detection process for the designated area in the same manner as in step S201.
ステップS302:CPU20は、背景レイヤーの色を類似色に決定する。具体的には、CPU20は、色相検出部20eが検出した色相のうち、最も頻度の高い色相の色の類似色を背景レイヤーの色に決定する。
Step S302: The
例えば、複数の色が存在する指定領域内で最も頻度の高い色相が青色の場合、CPU20は、青色の類似色を背景レイヤーの色に決定する。ここで、色相の補正は、いわゆる色相環の回転量(マイナス180度からプラス180度の範囲)に対応している。例えば、青色に対してマイナスの設定値の場合、画像処理部13は、青色を基準として色相環の時計回り方向に色相を変化させる。すなわち、補正される部分の色相は、回転量(角度)に応じて例えば青色からシアン色に変化する。また、青色に対してプラスの設定値の場合、画像処理部13は、青を基準として色相環の反時計回り方向に色相を変化させる。すなわち、補正される部分の色相は、回転量に応じて例えば青色からマゼンタに変化する。図7(b)の場合、CPU20は、一例として背景レイヤーの色相をマゼンタに決定する。
For example, when the most frequent hue is blue in a designated area where a plurality of colors exist, the
ステップS303:CPU20は、文字色を背景レイヤーの補色に決定する。具体的には、CPU20は、ステップS302で決定された類似色の色相の補色に文字色を決定する。例えば、ステップS302で決定された類似色の色相がマゼンタの場合、CPU20は、緑色に文字色を決定する(図7(b)参照)。図7(b)では、わかりやすくするため、実線の矢印で先ず背景レイヤーの補色が決定された後、文字色が決定されたことを模式的に表している。
Step S303: The
そして、CPU20は、サブルーチンを終了し、図2に示すステップS108の処理に戻る。 And CPU20 complete | finishes a subroutine and returns to the process of step S108 shown in FIG.
ステップS108:CPU20は、指定領域の拡大表示を行う。具体的には、先ず、画像処理部13は、指定領域の画像の画素を補間する補間処理により、指定領域を拡大する。この補間処理は、例えば、バイキュービック法又はニヤレストネイバー法といった補間処理により実現される。ここで、バイキュービック法では、例えば、複数の近傍画素の値に対して3次補間法と呼ばれる関数処理を行った後、その関数処理で求めた画素の値を注目画素の値に割り当てる。また、ニヤレストネイバー法では、例えば、注目画素に対して近傍画素の値を割り当てる。
Step S108: The
具体例として、画像処理部13は、図5(b)に示す指定領域50の画像を例えばバイキュービック法により拡大する。続いて、CPU20は、指定領域50の画像を表示モニタ15に表示する。
As a specific example, the
ステップS109:CPU20の受付部20dは、文字入力の受付け処理を行う。図8は、文字入力の受付け処理の一例を説明する図である。例えば、ユーザがタッチパネル19上でスタイラスを用いて、「夏の思い出」の文字を書いた場合、位置情報検出部20aは、スタイラスの移動軌跡に基づく位置情報を文字データ(「夏の思い出」)として検出する。なお、手書き文字としてユーザ入力されているが、CPU20は、手書き文字を解析して活字体の文字に変換しても良い。図8では、活字体に変換された後の文字「夏の思い出」が表示モニタ15に表示されている。
Step S109: The receiving
ステップS110:CPU20は、文字の入力結果の判定を行う。具体的には、CPU20は、表示モニタ15に表示された文字に対して、ユーザからの「OK」の指示入力を例えば操作部18を介して受け付けた場合(ステップS110:Yes)、ステップS111の処理に移行する。この場合、受付部20dは、文字データを指定領域に表示する文字の入力として受け付けると共に、活字体の文字データをRAM12に記録する。
Step S110: The
一方、CPU20は、ユーザからの「No」の指示入力を例えば操作部18を介して受け付けた場合(ステップS110:No)、ステップS109の処理に戻る。これにより、表示モニタ15には、文字入力前の指定領域の画像が表示される。そして、受付部20dは、文字入力の受付け処理を再度やり直す。なお、CPU20は、ステップS101の処理に戻って、指定領域の設定からやり直しても良い。
On the other hand, when the
ステップS111:CPU20の補正部20fは、指定領域の補正処理を行う。具体的には、補正部20fは、標準偏差の値が閾値以下の場合、本画像の指定領域内に重畳表示する文字色を、ステップS202で決定された補色に補正する。
Step S111: The
図9は、標準偏差の値が閾値以下の場合における補正後の画像の一例を示す図である。図9では、図5に示す本画像に対して、文字が重畳表示された画像が表示モニタ15に表示された場合を例示している。例えば、図5(b)に示す指定領域50内の画像が青空である場合、色相の色は単色傾向になる。そのため、標準偏差の値は、偏り傾向を示す。したがって、CPU20は、文字のみを背景の色の補色として重畳表示する。その結果、視認性は高まる。
FIG. 9 is a diagram illustrating an example of a corrected image when the standard deviation value is equal to or less than the threshold value. FIG. 9 illustrates a case where an image in which characters are superimposed on the main image shown in FIG. 5 is displayed on the
一方、補正部20fは、標準偏差の値が閾値より高い場合、背景レイヤーの色をステップS302で決定された類似色に補正する。そして、補正部20fは、本画像の指定領域内に重畳表示する文字色を、ステップS303で決定された補色に補正する。補正部20fは、背景レイヤーの画像を本画像に重ね合わせる。
On the other hand, when the value of the standard deviation is higher than the threshold value, the
図10は、標準偏差の値が閾値より高い場合における補正前後の画像の一例を示す図である。図10(a)は、補正前の画像を示し、図10(b)は、補正後の画像を示す。図10(a)では、誕生日を祝うためのケーキ31が人物Pの前に配置されている。また、図10(a)では、指定領域51がユーザ入力により設定されたことを示している。この場合、指定領域51は、複数の色が混在しているため、標準偏差の値が分散傾向を示す。すなわち、指定領域51のコントラストは、単色傾向の場合と比較して高くなる。したがって、図10(b)では、背景レイヤー32がステップS302で決定された類似色となり、「おめでとう!」の文字色が類似色の補色となっている。
FIG. 10 is a diagram illustrating an example of images before and after correction when the value of the standard deviation is higher than a threshold value. FIG. 10A shows an image before correction, and FIG. 10B shows an image after correction. In FIG. 10A, the cake 31 for celebrating the birthday is arranged in front of the person P. FIG. 10A shows that the designated area 51 is set by user input. In this case, since a plurality of colors are mixed in the designated area 51, the standard deviation value indicates a dispersion tendency. That is, the contrast of the designated area 51 is higher than that in the case of a monochromatic tendency. Accordingly, in FIG. 10B, the
CPU20は、補正処理後の本画像を記録媒体30に記録する。そして、CPU20は、図2に示すフローを終了させる。
The
以上より、本実施形態の電子カメラ1によれば、補正部20fは、指定領域のコントラストに基づいて、文字が表示される指定領域内の表示態様を補正する。そのため、本実施形態の電子カメラ1は、文字等を画像に重畳表示させた場合、視認性を向上させることができる。
(実施形態の補足事項)
(1)上記の実施形態では、指定領域を一例として矩形の領域としたが、形状は特に限定されない。
As described above, according to the
(Supplementary items of the embodiment)
(1) In the above embodiment, the designated area is a rectangular area as an example, but the shape is not particularly limited.
(2)上記の実施形態では、設定部20bは、本画像に対して指定領域が傾かないように設定した。ここで、ユーザは、本画像に対して指定領域(矩形)を傾けて入力しても良い。
(2) In the above embodiment, the
図11は、指定領域が傾いている場合の入力操作と出力結果を説明する図である。図11(a)では、ユーザ入力により、指定領域52(矩形ABCD)が本画像に対して傾いて設定されている。この場合、図11(b)に示す通り、CPU20は、ユーザ入力により、傾き補正を行うための指定線EFの入力を受け付ける。なお、符号ABCD、や符号EFは、説明の便宜上表記されているが、実際には、表示モニタ15に表示されないこととする。
FIG. 11 is a diagram illustrating an input operation and an output result when the designated area is inclined. In FIG. 11A, the designated area 52 (rectangular ABCD) is set to be inclined with respect to the main image by user input. In this case, as shown in FIG. 11B, the
補正部20fは、例えば、指定領域の画像の傾きを補正するための数学的な処理としてアフィン変換を行う。つまり、補正部20fは、指定線EFを横切る指定領域の線分ABが図中に示すx軸と平行になるようにアフィン変換を行う。この場合、補正部20fは、指定領域52(矩形ABCD)のうち、線分ABが紙面の上下方向の上の位置になるようにアフィン変換を行う。そして、補正部20fは、アフィン変換後の画像を表示モニタ15のサイズに拡大する。CPU20は、拡大した指定領域の画像を表示モニタ15に表示する。受付部20dが文字入力(例えば、「夏の思い出」)を受け付けた後、CPU20は、図8と同様、活字体に変換された後の文字「夏の思い出」を表示モニタ15に表示する。その後、補正部20fは、指定領域52を縮小し、アフィン変換の逆の演算により、ユーザ入力により設定された元の指定領域52の傾きに再変換する。CPU20は、図11(c)に示す通り、文字を傾けて重畳表示させる。これにより、ユーザは文字入力する際、文字を傾けて書かずに済むので、文字入力がしやすくなる。
For example, the
(3)上記の実施形態では、本発明の画像処理装置を備えた電子カメラ1について説明した。しかし、本発明は、上記の実施形態に限定されない。本発明の画像処理装置は、タッチパネル機能を有する電子機器として、例えば、コンピュータ、携帯電話、PDA(Personal Digital Assistant)等に備えられても良い。
(3) In the above embodiment, the
(4)本発明は、コンピュータとプログラムとにより、本実施形態で説明した画像処理装置をソフトウエア的に実現しても良い。この場合、コンピュータは、図2から図4に示すフローの処理を実現すれば良い。このフローの処理を実現するには、例えば、コンピュータ読み取り可能な記録媒体30に記録された本発明の一実施形態のプログラムがコンピュータにインストールされる。具体的には、例えば、図1に示す位置情報検出部20a、設定部20b、コントラスト検出部20c、受付部20d、色相検出部20e及び補正部20fの機能モジュールが、コンピュータにインストールされる。これにより、コンピュータは、本実施形態と同様の処理を実施することができる。このようにして、本発明の一実施形態のプログラムを実行するコンピュータは、電子カメラ1と同様の効果を得ることができる。なお、コンピュータ読み取り可能な記録媒体は、記録媒体30に限られず、CD−ROM、光磁気ディスク、光ディスク等の記録媒体であっても良い。
(4) In the present invention, the image processing apparatus described in the present embodiment may be realized in software by a computer and a program. In this case, the computer may realize the processing of the flow shown in FIGS. In order to realize the processing of this flow, for example, a program according to an embodiment of the present invention recorded on a computer-
1・・・電子カメラ、11・・・撮像部、20a・・・位置情報検出部、20b・・・設定部、20c・・・コントラスト検出部、20d・・・受付部、20f・・・補正部
DESCRIPTION OF
Claims (5)
前記所定領域に表示する表示体の入力を受け付ける受付部と、
前記コントラストに応じて、前記所定領域を表示する色と前記表示体を表示する色とを設定する設定部と、
を備えることを特徴とする画像処理装置。 A contrast detection unit that detects contrast of an image included in the predetermined area based on image data of the predetermined area of the image displayed on the image display device ;
A reception unit that receives an input of a display body to be displayed in the predetermined area;
Depending on the Contrast, a setting unit that sets a color for displaying the predetermined area and the color for displaying the display member,
An image processing apparatus comprising:
前記コントラスト検出部は、
前記所定領域の画像データの階調分布を表すヒストグラムを算出し、前記ヒストグラムの分散を示す値に基づいて、前記コントラストを検出することを特徴とする画像処理装置。 The image processing apparatus according to claim 1.
The contrast detection unit
An image processing apparatus, comprising: calculating a histogram representing a gradation distribution of image data in the predetermined area; and detecting the contrast based on a value indicating variance of the histogram.
前記所定領域の画像データに基づいて、前記所定領域の色相を検出する色相検出部をさらに備え、
前記コントラスト検出部は、前記所定領域の画像データに基づいて、前記コントラストの度合いを示す評価値を算出し、
前記設定部は、
前記評価値が閾値より高い場合には、前記所定領域を表示する色を前記色相検出部が検出した色相の類似色に設定すると共に、前記表示体を表示する色を前記類似色の補色に設定し、
前記評価値が閾値以下の場合には、前記所定領域を表示する色を設定せず、前記表示体を表示する色を前記色相検出部が検出した色相の補色に設定することを特徴とする画像処理装置。 The image processing apparatus according to claim 1 or 2,
Based on the image data of the predetermined region, further comprising a color detector for detecting the hue of said predetermined area,
The contrast detection unit calculates an evaluation value indicating the degree of contrast based on the image data of the predetermined region,
The setting unit
When the evaluation value is higher than the threshold value, the color for displaying the predetermined area is set to a similar color of the hue detected by the hue detection unit, and the color for displaying the display body is set to the complementary color of the similar color And
When the evaluation value is equal to or less than a threshold value, the color for displaying the predetermined area is not set, and the color for displaying the display body is set as a complementary color of the hue detected by the hue detection unit. Processing equipment.
請求項1から請求項3の何れか1項に記載の画像処理装置と、
を備えることを特徴とする電子カメラ。 An imaging unit that captures an image of a subject and generates image data;
The image processing apparatus according to any one of claims 1 to 3,
An electronic camera comprising:
前記所定領域に表示する表示体の入力を受け付ける受付処理と、
前記コントラストに応じて、前記所定領域を表示する色と前記表示体を表示する色とを設定する設定処理と、
をコンピュータに実行させることを特徴とするプログラム。 A contrast detection process for detecting a contrast of an image included in the predetermined area based on image data of the predetermined area of the image displayed on the image display device ;
A reception process for receiving an input of a display body to be displayed in the predetermined area;
Depending on the Contrast, the setting processing for setting the color for displaying the predetermined area and the color for displaying the display member,
A program that causes a computer to execute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010216695A JP5740888B2 (en) | 2010-09-28 | 2010-09-28 | Image processing apparatus, electronic camera, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010216695A JP5740888B2 (en) | 2010-09-28 | 2010-09-28 | Image processing apparatus, electronic camera, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012074812A JP2012074812A (en) | 2012-04-12 |
JP5740888B2 true JP5740888B2 (en) | 2015-07-01 |
Family
ID=46170598
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010216695A Expired - Fee Related JP5740888B2 (en) | 2010-09-28 | 2010-09-28 | Image processing apparatus, electronic camera, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5740888B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014155603A (en) * | 2013-02-15 | 2014-08-28 | Sammy Corp | Game machine |
JP6837860B2 (en) * | 2017-02-15 | 2021-03-03 | Necプラットフォームズ株式会社 | Image display control device, image display control method, and image display control program |
KR102544626B1 (en) * | 2019-01-23 | 2023-06-19 | 한국전자통신연구원 | System and method for processing masking region |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3078088B2 (en) * | 1992-03-13 | 2000-08-21 | 株式会社東芝 | Character image synthesis display device |
JPH08171382A (en) * | 1994-12-16 | 1996-07-02 | Nec Corp | Video display device |
JPH10319488A (en) * | 1997-05-23 | 1998-12-04 | Fuji Photo Film Co Ltd | Camera with liquid crystal finder |
JP4264573B2 (en) * | 1999-06-07 | 2009-05-20 | ソニー株式会社 | Image processing apparatus and method, and recording medium |
US6711291B1 (en) * | 1999-09-17 | 2004-03-23 | Eastman Kodak Company | Method for automatic text placement in digital images |
JP2003076355A (en) * | 2001-08-31 | 2003-03-14 | Sharp Corp | Picture display device, picture display method, recording medium, and program |
JP4552426B2 (en) * | 2003-11-28 | 2010-09-29 | カシオ計算機株式会社 | Display control apparatus and display control processing program |
JP2006041614A (en) * | 2004-07-22 | 2006-02-09 | Seiko Epson Corp | Image processing apparatus, image processing method, program, and recording medium |
JP4995056B2 (en) * | 2007-12-06 | 2012-08-08 | キヤノン株式会社 | Image display apparatus, control method thereof, and program |
-
2010
- 2010-09-28 JP JP2010216695A patent/JP5740888B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2012074812A (en) | 2012-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8237678B2 (en) | Apparatus and method for detecting contact on or proximity to a touch screen | |
JP6467787B2 (en) | Image processing system, imaging apparatus, image processing method, and program | |
JP4165220B2 (en) | Image processing method, program, and image processing apparatus | |
JP4747970B2 (en) | Image processing device | |
JP2003116060A (en) | Correcting device for defective picture element | |
KR20140137738A (en) | Image display method, image display apparatus and recordable media | |
US8379977B2 (en) | Method for removing color fringe in digital image | |
JP2005056374A (en) | Apparatus for and method of edge enhancement in image processing | |
JP5169994B2 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
KR101450782B1 (en) | Image processing device and program | |
JP4992698B2 (en) | Chromatic aberration correction apparatus, imaging apparatus, chromatic aberration calculation method, and chromatic aberration calculation program | |
US11683466B2 (en) | Application processor, electronic device including the same and operation method of the electronic device | |
JP5740888B2 (en) | Image processing apparatus, electronic camera, and program | |
JP5181894B2 (en) | Image processing apparatus and electronic camera | |
CN101827273B (en) | A color rendition method of image | |
JP5671795B2 (en) | Imaging device | |
JP2012004719A (en) | Image processing device, image processing program, and electronic camera | |
JP2003283916A (en) | Digital camera | |
JP6091133B2 (en) | Projection type display device, control method used therefor, and program | |
WO2018119787A1 (en) | Demosaicing method and device | |
JP2010154365A (en) | Color correction device, camera, color correction method, and color correction program | |
JP2013257643A (en) | Image processing system, and program | |
WO2018214284A1 (en) | Image photographing method applied to terminal, and terminal device | |
JP2007274702A (en) | Image photographing system | |
JP5444970B2 (en) | Imaging device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130820 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140626 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140701 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140901 |
|
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: 20150331 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150413 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5740888 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
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 |