JP5247346B2 - Imaging apparatus, control method and program thereof, image processing apparatus, and image processing method - Google Patents
Imaging apparatus, control method and program thereof, image processing apparatus, and image processing method Download PDFInfo
- Publication number
- JP5247346B2 JP5247346B2 JP2008272350A JP2008272350A JP5247346B2 JP 5247346 B2 JP5247346 B2 JP 5247346B2 JP 2008272350 A JP2008272350 A JP 2008272350A JP 2008272350 A JP2008272350 A JP 2008272350A JP 5247346 B2 JP5247346 B2 JP 5247346B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- foreign matter
- information
- electronic zoom
- processing
- 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
- Television Signal Processing For Recording (AREA)
- Studio Devices (AREA)
Description
本発明は、CCDやCMOSセンサ等の撮像素子を用いた撮像装置における、撮像素子の前方に配置された光学ローパスフィルタ等の表面に付着した異物による画質劣化を抑制する技術に関し、特に動画撮影時の異物による画質劣化を抑制する技術に関する。 The present invention relates to a technique for suppressing image quality deterioration due to foreign matter adhering to the surface of an optical low-pass filter or the like disposed in front of an image pickup device in an image pickup apparatus using an image pickup device such as a CCD or a CMOS sensor, and particularly at the time of moving image shooting. The present invention relates to a technology for suppressing image quality deterioration due to foreign matter.
レンズ交換式のデジタルカメラでは、レンズをカメラ本体から取り外した際にカメラ本体の内部に空気中に浮遊する埃などが侵入する可能性がある。またカメラ内部には、例えばシャッタ機構等の機械的に動作する各種の機構部が配設されており、これらの機構部が動作することにより、カメラ本体内で金属片などのゴミ等が発生する場合もある。 In an interchangeable lens digital camera, dust or the like floating in the air may enter the camera body when the lens is removed from the camera body. In addition, various mechanical units such as a shutter mechanism are disposed inside the camera. By operating these mechanical units, dust such as metal pieces is generated in the camera body. In some cases.
このようなゴミや埃などの異物がデジタルカメラの撮像部を構成する光学素子である撮像素子の前方に配置された光学ローパスフィルタの表面等に付着すると、その異物は撮影された画像に影となって写り込んでしまい、撮影画像の品位を低下させてしまう。 When foreign matter such as dust or dust adheres to the surface of an optical low-pass filter disposed in front of an image sensor that is an optical element that constitutes an image capturing unit of a digital camera, the foreign matter causes shadows on the captured image. And the quality of the photographed image is deteriorated.
銀塩フィルムを使用したカメラでは、画像を撮影する度にフィルムが送られるため、同じ異物が連続して画像の同じ位置に写り込むことは極めて稀である。しかしデジタルカメラでは、撮影毎にフィルムのコマを送るような動きが発生しないため、撮影画像の同じ位置に連続して同じ異物が写り込んでしまうという問題がある。 In a camera using a silver salt film, since the film is sent each time an image is taken, it is very rare that the same foreign matter is continuously reflected at the same position in the image. However, in a digital camera, there is no problem that a film frame is sent every time shooting is performed, and therefore, there is a problem in that the same foreign matter is continuously captured at the same position of a captured image.
このような問題点を解決するため、異物が写り込んだ画素をその画素の周囲の画素の信号を利用するなどして補正する方法が考えられる。そのような画素を補正する技術として、例えば特許文献1(特開平6−105241号公報)には、撮像素子の画素欠陥を補正するための画像欠陥補正方法が提案されている。また特許文献2(特開2004−242158号公報)には、画素欠陥の位置情報の設定を簡略化するために、ゴミ取得モードで撮影した画像ファイルの拡張子などを通常画像と異ならせることが提案されている。このようにすることで、PC(パーソナルコンピュータ)側でゴミ情報画像を自動判別し、その情報を用いて補正対象画像を補正する。 In order to solve such a problem, a method of correcting a pixel in which a foreign object is reflected by using a signal of a pixel around the pixel can be considered. As a technique for correcting such pixels, for example, Patent Document 1 (Japanese Patent Laid-Open No. 6-105241) proposes an image defect correction method for correcting pixel defects of an image sensor. In Patent Document 2 (Japanese Patent Laid-Open No. 2004-242158), in order to simplify the setting of pixel defect position information, an extension of an image file shot in the dust acquisition mode may be different from that of a normal image. Proposed. In this way, the dust information image is automatically determined on the PC (personal computer) side, and the correction target image is corrected using the information.
また近年、動画情報をデジタルデータとして取り扱い、蓄積・伝送に用いるために、高圧縮率かつ高画質で符号化する技術が提案され広く普及している。 In recent years, in order to handle moving image information as digital data and use it for storage and transmission, a technique for encoding with high compression rate and high image quality has been proposed and widely used.
Motion JPEG方式は、静止画符号化(例えば、JPEG(JointPhotographic Coding Experts Group)符号化)を各フレームに適応させることで符号化する。JPEG符号化は、基本的には静止画に対する符号化方式であるが、高速処理させることにより動画にも対応させる製品も出てきている。 The Motion JPEG system performs encoding by adapting still image encoding (for example, JPEG (Joint Photographic Coding Experts Group) encoding) to each frame. JPEG encoding is basically an encoding method for still images, but there are products that can handle moving images by high-speed processing.
JPEG方式の概略を簡単に説明する。画像データを所定の大きさのブロック(例えば、8×8画素よりなるブロック)に分割し、そのブロック毎に2次元離散コサイン変換を行ない、その変換係数を線形又は非線形に量子化する。量子化された変換係数を次のようにハフマン符号化(可変長符号化)する。即ち、変換係数の直流成分に関しては、近傍ブロックの直流成分との差分値をハフマン符号化し、交流成分についてはジグザグ・スキャンにより低周波数成分から高周波数成分へとシリアル化する。そして、値が0の無効成分の連続する個数とそれに続く有効な成分の値との組に対してハフマン符号化を実行する。 An outline of the JPEG method will be briefly described. Image data is divided into blocks of a predetermined size (for example, blocks of 8 × 8 pixels), two-dimensional discrete cosine transform is performed for each block, and the transform coefficient is quantized linearly or nonlinearly. The quantized transform coefficient is Huffman encoded (variable length encoding) as follows. That is, for the DC component of the transform coefficient, the difference value from the DC component of the neighboring block is Huffman coded, and the AC component is serialized from the low frequency component to the high frequency component by zigzag scanning. Then, Huffman coding is performed on a set of consecutive invalid component values having a value of 0 and subsequent valid component values.
一方、更なる高圧縮率、高画質を目指した符号化方式としてH.264(MPEG4−Part10 AVC)がある。このH.264はMPEG2やMPEG4といった従来の符号化方式と比較して、その符号化、復号により多くの演算量が要求されるものの、より高い符号化効率が実現されることが知られている(非特許文献1参照)。 On the other hand, H.264 is an encoding method aiming at higher compression ratio and higher image quality. H.264 (MPEG4-Part10 AVC). This H. H.264 is known to achieve higher encoding efficiency compared to conventional encoding schemes such as MPEG2 and MPEG4, although a larger amount of computation is required for encoding and decoding (Non-patent) Reference 1).
図16は、H.264方式で画像データを圧縮する画像処理装置の構成を示す図である。 FIG. 1 is a diagram illustrating a configuration of an image processing apparatus that compresses image data using an H.264 system.
図16において、入力された画像データは、マクロブロックに分けられ、減算部401に送られる。減算部401は、画像データと予測値との差分を求めて、整数DCT(Discrete Cosine Transform)変換部402に出力する。整数DCT変換部402は、入力されたデータを整数DCT変換して量子化部403に出力する。量子化部403は、入力されたデータを量子化する。量子化されたデータの一方は、差分画像データとしてエントロピー符号化部415に送られる。もう一方は、逆量子化部404で逆量子化された後、逆整数DCT変換部405で逆整数DCT変換される。逆整数DCT変換されたデータは、加算部406で予測値が加えられる。これにより、画像が復元される。
In FIG. 16, input image data is divided into macro blocks and sent to the
復元された画像の一方は、イントラ(フレーム内)予測のためのフレームメモリ407に送られる。他方は、デブロッキングフィルター409でデブロッキングフィルター処理が行われた後、インター(フレーム間)予測のためのフレームメモリ410に送られる。イントラ予測のためのフレームメモリ407内の画像は、イントラ予測部408でのイントラ予測で使用される。このイントラ予測では、同一ピクチャ内で、既に符号化されたブロックの隣接画素の値を予測値として用いる。
One of the restored images is sent to the
インター予測のためのフレームメモリ410内の画像は、後述するように、複数のピクチャで構成される。これら複数のピクチャは、「List0」と「List1」の2つのリストに分けられる。2つのリストに分けられた複数のピクチャは、インター予測部411でのインター予測で使用される。インター予測がなされた後に、メモリコントローラ413によって、内部の画像が更新される。インター予測部411で行われるインター予測では、フレームの異なる画像データに対して動き検出部412で行われた動き検出の結果に基づく最適な動きベクトルを用いて、予測画像を決定する。
An image in the
イントラ予測とインター予測の結果、最適な予測結果が選択部414で選択される。また、上記の動きベクトルは、エントロピー符号化部415に送られ、上記の差分画像データと共に符号化される。こうして出力ビットストリームが形成される。
As a result of intra prediction and inter prediction, an optimal prediction result is selected by the
ここで、H.264方式のインター予測について、図17乃至図20を参照して詳細に説明する。 Here, H. H.264 inter prediction will be described in detail with reference to FIGS.
H.264方式のインター予測では、複数のピクチャを予測に用いることができる。このため、参照ピクチャを特定するためにリストを2つ(「List0」及び「List1」)用意する。各リストには最大5枚の参照ピクチャが割り当てられるようにしている。 H. In the H.264 inter prediction, a plurality of pictures can be used for prediction. For this reason, two lists (“List0” and “List1”) are prepared to specify the reference picture. Each list is assigned a maximum of five reference pictures.
Pピクチャでは「List0」のみを使用して、主に前方向予測を行う。Bピクチャでは「List0」及び「List1」を用いて、双方向予測(または前方あるいは後方のみの予測)を行う。すなわち、「List0」には主に前方向予測のためのピクチャが割り当てられ、「List1」には主に後方向予測のためのピクチャが収められる。 In the P picture, only “List0” is used and forward prediction is mainly performed. In B picture, “List0” and “List1” are used to perform bi-directional prediction (or prediction only forward or backward). That is, a picture for forward prediction is mainly assigned to “List0”, and a picture for backward prediction is mainly contained in “List1”.
図17に、符号化の際に使用される参照リストの例を示す。ここでは、Iピクチャ、Pピクチャ及びBピクチャの割合が、標準的な場合を例に挙げて説明する。すなわち、Iピクチャが15フレーム間隔、Pピクチャが3フレーム間隔、その間のBピクチャが2フレーム間隔である場合で説明する。図17において、1001は、表示順に並べた画像データを示す。画像データ1001の四角の中にはピクチャの種類と表示順を示す番号を記入してある。例えば、ピクチャI15は表示順が15番目のIピクチャであり、イントラ予測のみを行う。ピクチャP18は表示順が18番目のPピクチャであり、前方向予測のみを行う。ピクチャB16は表示順が16番目のBピクチャであり、双方向予測を行う。
FIG. 17 shows an example of a reference list used for encoding. Here, a case where the ratio of I picture, P picture, and B picture is standard will be described as an example. That is, a case where an I picture has an interval of 15 frames, a P picture has an interval of 3 frames, and a B picture between them has an interval of 2 frames will be described. In FIG. 17,
符号化を行う順序は表示順序と異なり、予測を行う順となる。すなわち、図17では、符号化を行う順序は、「I15、P18、B16、B17、P21、B19、B20、…」となる。 The order of encoding is different from the display order and is the order of prediction. That is, in FIG. 17, the encoding order is “I15, P18, B16, B17, P21, B19, B20,.
また、図17において、1002は、参照リスト(List0)を示す。この参照リスト(List0)1002には、一旦符号化され復号化されたピクチャが収められている。例えば、ピクチャP21(表示順が21番目のPピクチャ)でインター予測を行う場合、参照リスト(List0)1002内の既に符号化が終わって復号化されたピクチャを参照する。図17に示す例では、ピクチャP06、P09、P12、I15、P18が参照リスト1002に収められている。
In FIG. 17,
インター予測では、マクロブロック毎に、この参照リスト(List0)1002中の参照ピクチャ内から最適な予測値をもつ動きベクトルを求め、符号化する。参照リスト(List0)1002内のピクチャは、参照ピクチャ番号が順に与えられ、区別される(図示した番号とは別に与えられる)。 In inter prediction, for each macroblock, a motion vector having an optimal prediction value is obtained from the reference picture in the reference list (List0) 1002 and encoded. The pictures in the reference list (List0) 1002 are given reference picture numbers in order and are distinguished (given separately from the numbers shown).
ピクチャP21の符号化が終わると、こんどは新たにピクチャP21が復号化され参照リスト(List0)1002に追加される。参照リスト(List0)1002から、最も古い参照ピクチャ(ここではピクチャP06)が除去される。この後符号化は、ピクチャB19、B20と行われ、ピクチャP24へと続く。このときの参照リスト(List0)1002の様子を図18に示す。 When the encoding of the picture P21 is completed, the picture P21 is newly decoded and added to the reference list (List0) 1002. The oldest reference picture (here, picture P06) is removed from the reference list (List0) 1002. After this, encoding is performed with pictures B19 and B20, and continues to picture P24. The state of the reference list (List0) 1002 at this time is shown in FIG.
図19に、参照リストの変化の様子をピクチャ毎に示す。 FIG. 19 shows how the reference list changes for each picture.
図19では、上から順番にピクチャが符号化されるようにしている。また、符号化中のピクチャと、その符号化中のピクチャに対する参照リスト(List0及びList1)の内容を示している。図19に示す様に、Pピクチャ(またはIピクチャ)が符号化されると、参照リスト(List0及びList1)が更新され、参照リスト(List0及びList1)中の最も古いピクチャが除去される。この例では、参照リスト(List1)は1つのピクチャしか持っていない。これは、後方向予測のために参照するピクチャの数を多くすると、復号までのバッファ量が増えてしまうためである。すなわち、符号化中のピクチャとあまりに離れたところにある後方のピクチャの参照を避けたためである。 In FIG. 19, pictures are encoded in order from the top. Also, the picture being encoded and the contents of the reference lists (List0 and List1) for the picture being encoded are shown. As shown in FIG. 19, when a P picture (or I picture) is encoded, the reference list (List0 and List1) is updated, and the oldest picture in the reference list (List0 and List1) is removed. In this example, the reference list (List1) has only one picture. This is because if the number of pictures referred for backward prediction is increased, the amount of buffer until decoding increases. In other words, this is because a reference to a backward picture that is too far away from the picture being encoded is avoided.
ここで挙げた例では、参照に用いるピクチャを、Iピクチャ及びPピクチャとし、Iピクチャ及びPピクチャの全てを参照リスト(List0及びList1)に順次加えている。また、後方向予測のために参照リスト(List1)で使うピクチャはPピクチャだけとした。以上のようにしたのは、通常最もよく用いられるであろうピクチャの構成であるからである。ただし、このような参照リストにおけるピクチャの構成は、最も良く使用されるであろう一例に過ぎず、H.264自体は、参照リストの構成に、より高い自由度を持っている。 In the example given here, pictures used for reference are an I picture and a P picture, and all of the I picture and P picture are sequentially added to the reference list (List0 and List1). Also, only the P picture is used in the reference list (List1) for backward prediction. The reason described above is that it is a picture structure that would normally be used most often. However, the configuration of pictures in such a reference list is just one example that would be most often used. H.264 itself has a higher degree of freedom in the configuration of the reference list.
例えば、Iピクチャ及びPピクチャの全てを参照リストに加える必要は無く、またBピクチャを参照リストに加えることも可能である。また明示的に指示されるまで参照リストにとどまる長期参照リストも定義されている。図20に、Bピクチャを参照リストに加える場合の参照リストの変化の様子を示す。Bピクチャを参照リストに加える場合、通常、全てのBピクチャを符号化する度に、符号化したピクチャを参照リストに追加することが考えられる。 For example, it is not necessary to add all of the I picture and P picture to the reference list, and it is also possible to add a B picture to the reference list. Also defined are long-term reference lists that remain in the reference list until explicitly specified. FIG. 20 shows how the reference list changes when a B picture is added to the reference list. When a B picture is added to the reference list, it is usually considered that the encoded picture is added to the reference list every time all the B pictures are encoded.
これらの符号化方式を利用して動画像を記録可能としたコンパクトデジタルカメラも開発、製品化されており、ユーザーはこれらの装置或いはパーソナルコンピュータやDVDプレーヤーなどを用いて簡単に画像を視聴することが可能となっている。 Compact digital cameras capable of recording moving images using these encoding methods have also been developed and commercialized, and users can easily view images using these devices, personal computers, DVD players, etc. Is possible.
従来よりデジタルビデオカメラなどの撮像装置においては、電子ズームを搭載するのが一般的である。電子ズームとは撮像素子から読み出された画像信号を間引き、或いは撮像素子から間欠的に画像信号を読み出した後、この画像信号から補間信号を生成し、この補間信号を当該画像信号に内挿入することにより被写体の像倍率を電子的に拡大する機能である。これにより、任意倍率で拡大された画像を得ることができる。 Conventionally, an image pickup apparatus such as a digital video camera is generally equipped with an electronic zoom. Electronic zooming thins out the image signal read from the image sensor or intermittently reads the image signal from the image sensor, then generates an interpolation signal from the image signal, and inserts the interpolation signal into the image signal. This is a function that electronically enlarges the image magnification of the subject. As a result, an image enlarged at an arbitrary magnification can be obtained.
例えば、図6(a)で、61が撮像素子の撮影画面であり、その中の斜線部分62の画像信号を図6(b)に示すように、撮影画面61と同じ大きさに拡大する。電子処理により拡大画像を得るので、電子ズームと呼ぶ。電子ズームでは、任意の拡大率を選択でき、拡大率を連続的に変化させることも容易である。
For example, in FIG. 6A,
任意の拡大率では、出力の走査線は、撮像素子の出力から得られる走査線と走査線の中間に位置することになるので、相互の距離の比と所定の重み付けの下で上下の信号を内挿補間する。これにより、拡大による画質劣化をある程度抑制できるが、電子ズームのみで、ある程度の画質を確保しつつ、6倍、8倍、10倍といった一般的なズーム比を実現するのは、困難である。従って、現状では、光学ズームと電子ズームを併用している。 At an arbitrary magnification, the output scanning line is positioned between the scanning line obtained from the output of the image sensor and the scanning line. Interpolate. As a result, image quality deterioration due to enlargement can be suppressed to some extent, but it is difficult to achieve a general zoom ratio of 6 times, 8 times, or 10 times while securing a certain level of image quality using only the electronic zoom. Therefore, at present, optical zoom and electronic zoom are used together.
光学ズームと電子ズームを併用することにより、小型軽量でズーム倍率の大きなズームレンズシステムを実現することができる。このようなシステムでは、小さいズーム倍率から大きいズーム倍率に変化させるいわゆるズームアップを行う際には、始めは電子ズームでの拡大率を1倍にして、すなわち電子ズームでの拡大を行わずに、光学ズームのみでズーム倍率を変化させる。そして、光学ズームがテレ端に達した後に、電子ズームを用いてズーム倍率を変化させるようにしている。 By using the optical zoom and the electronic zoom together, it is possible to realize a zoom lens system that is small and light and has a large zoom magnification. In such a system, when performing so-called zoom-up to change from a small zoom magnification to a large zoom magnification, first, the enlargement ratio in the electronic zoom is increased by a factor of 1, that is, without performing the enlargement in the electronic zoom. Change the zoom magnification only with optical zoom. Then, after the optical zoom reaches the tele end, the zoom magnification is changed using the electronic zoom.
また、大きいズーム倍率から小さいズーム倍率に変化させるいわゆるズームダウンを行う際には、始めは電子ズームのみでズーム倍率を変化させ、電子ズームでの拡大率が1倍に達した後に、光学ズームを用いてズーム倍率を変化させるようにしている。 In addition, when performing so-called zoom-down in which the zoom magnification is changed from a large zoom magnification to a small zoom magnification, the zoom magnification is first changed only by the electronic zoom, and after the enlargement ratio in the electronic zoom reaches 1 time, the optical zoom is performed. This is used to change the zoom magnification.
さらに、近年では、半導体技術の向上により、H.264などのフォーマットにて規定された画素数(例えばHD解像度)よりもはるかに画素数の多い撮像素子を採用し、このような多画素の撮像素子から間欠的に画像信号を読み出すことによりフォーマットに規定された画素数の画像信号を生成し、より高画質な画像を記録する装置も提案されている。 Furthermore, in recent years, due to the improvement of semiconductor technology, An image sensor having a much larger number of pixels than the number of pixels defined in a format such as H.264 (for example, HD resolution) is adopted, and the image signal is intermittently read out from such a multi-pixel image sensor. An apparatus that generates an image signal with a prescribed number of pixels and records a higher quality image has also been proposed.
この種の撮像装置における電子ズームの技術として、例えば特許文献3(特開2007−221273号公報)には、電子ズーム動作時の画質の劣化を抑制する方法が提案されている。
このような状況の中で、近年では、コンパクトタイプのデジタルカメラのみならず、レンズ交換式のデジタルカメラにおいても、より高画素、高精細な動画像を記録したいニーズも高まっている。しかし、すでに述べたように、レンズ交換式のデジタルカメラではさまざまな要因で撮像素子の表面にゴミが付着するため、そのまま動画記録を行うと、動画再生中、常に同じ位置にゴミが写ってしまう可能性があった。 Under such circumstances, in recent years, there is an increasing need for recording a moving image with higher pixels and higher definition not only in a compact type digital camera but also in an interchangeable lens type digital camera. However, as already mentioned, dust is attached to the surface of the image sensor due to various factors in an interchangeable lens digital camera, so if you record a movie as it is, it will always appear at the same position during movie playback. There was a possibility.
レンズ交換式のデジタルカメラにおける従来のゴミ除去方法では、ゴミ除去に必要な情報(例えばゴミの位置及び大きさの情報)と画像データとを記録しておき、後にパソコンなどに画像を取り込んで画像処理によりゴミを除去していた。すなわち、記録される画像データにはゴミが写り込んでいることになる。静止画ではゴミを除去する作業は一枚ごとになるが、動画では記録された時間すべてにわたりゴミ除去を行わなければならず非常に時間のかかる作業となる。 In a conventional dust removal method in an interchangeable lens digital camera, information necessary for dust removal (for example, dust position and size information) and image data are recorded, and the image is later imported into a personal computer or the like. Garbage was removed by processing. That is, dust is reflected in the recorded image data. In the still image, the dust removal operation is performed one by one, but in the moving image, the dust removal must be performed over the entire recorded time, which is a very time-consuming operation.
また、動画撮影を行う際には、電子ズームを用いて画像を拡大することが一般的に行われている。しかし、電子ズームによる拡大を行うと、電子ズームのそれぞれの倍率(電子ズームOFFの時の電子ズームの倍率を1倍とみなす)において画角(撮像素子の有効画素領域)が異なってしまう。そのため、ゴミ除去に必要な位置及び大きさの情報が実際に画像に写りこんでいるゴミの位置及び大きさと一致しなくなるため、うまくゴミ補正処理を行うことができないという問題があった。 In addition, when performing moving image shooting, it is common to enlarge an image using an electronic zoom. However, when enlargement is performed by electronic zoom, the angle of view (effective pixel area of the image sensor) differs at each magnification of electronic zoom (the magnification of electronic zoom when electronic zoom is OFF is regarded as 1). For this reason, the position and size information necessary for dust removal does not coincide with the position and size of the dust actually reflected in the image, and there is a problem that dust correction processing cannot be performed successfully.
本発明は上述した課題に鑑みてなされたものであり、その目的は、動画記録時において電子ズームを用いて撮影した動画像に対しても、ゴミ除去処理を行うことを可能とすることである。 The present invention has been made in view of the above-described problems, and an object of the present invention is to enable dust removal processing to be performed on a moving image shot using an electronic zoom during moving image recording. .
上述した課題を解決し、目的を達成するために、本発明に係わる撮像装置は、被写体像を光電変換する撮像素子を備え、該撮像素子からの出力信号に基づいて画像信号を生成する撮像手段と、前記画像信号の一部を切り出して拡大する電子ズーム処理を行う電子ズーム処理手段と、前記撮像素子の前方に配置された光学素子の表面に付着した異物の像を含む異物検出用画像から、少なくとも異物の位置及び大きさの情報を含む情報である異物情報を検出する異物検出手段と、前記異物情報を画像ファイルに記録する異物情報記録手段と、前記電子ズーム処理手段における電子ズームのズーム倍率を前記画像ファイルに記録するズーム倍率記録手段と、前記異物情報と、前記電子ズームのズーム倍率とを用いて、前記異物の位置及び大きさを前記電子ズーム処理後の画像における異物の位置及び大きさに変換し、前記電子ズーム処理後の画像における異物の像を画像処理により除去する異物除去手段と、を備えることを特徴とする。 In order to solve the above-described problems and achieve the object, an imaging apparatus according to the present invention includes an imaging device that photoelectrically converts a subject image and generates an image signal based on an output signal from the imaging device. And an electronic zoom processing means for performing an electronic zoom process for cutting out and enlarging a part of the image signal, and a foreign object detection image including an image of the foreign object attached to the surface of the optical element disposed in front of the imaging element. A foreign object detection unit for detecting foreign object information, which is information including at least the position and size information of the foreign object, a foreign object information recording unit for recording the foreign object information in an image file, and an electronic zoom zoom in the electronic zoom processing unit. a zoom magnification recording means for recording magnification to the image file, and the foreign substance information, by using the zoom magnification of the electronic zoom, the position and size of the foreign substance before Converting the position and size of the foreign substance in an image after the electronic zoom process, characterized in that it and a foreign substance removing means for removing by image image processing foreign matter in the image after the electronic zoom processing.
また、本発明に係わる撮像装置の制御方法は、被写体像を光電変換する撮像素子を備え、該撮像素子からの出力信号に基づいて画像信号を生成する撮像手段を有する撮像装置を制御する方法であって、前記画像信号の一部を切り出して拡大する電子ズーム処理を行う電子ズーム処理工程と、前記撮像素子の前方に配置された光学素子の表面に付着した異物の像を含む異物検出用画像から、少なくとも異物の位置及び大きさの情報を含む情報である異物情報を検出する異物検出工程と、前記異物情報を動画像ファイルに記録する異物情報記録工程と、前記電子ズーム処理工程における電子ズームのズーム倍率を前記動画像ファイルに記録するズーム倍率記録工程と、前記異物情報と、前記電子ズームのズーム倍率とを用いて、前記異物の位置及び大きさを前記電子ズーム処理後の画像における異物の位置及び大きさに変換し、前記電子ズーム処理後の画像における異物の像を画像処理により除去する異物除去工程と、を備えることを特徴とする。 The image pickup apparatus control method according to the present invention is a method for controlling an image pickup apparatus having an image pickup device that photoelectrically converts a subject image and generating an image signal based on an output signal from the image pickup device. A foreign object detection image including an electronic zoom process for performing an electronic zoom process for cutting out and enlarging a part of the image signal, and an image of a foreign object attached to the surface of an optical element disposed in front of the image sensor A foreign substance detection step for detecting foreign substance information that is information including at least the position and size information of the foreign substance, a foreign substance information recording step for recording the foreign substance information in a moving image file, and an electronic zoom in the electronic zoom processing step. and the zoom magnification recording process of the zoom magnification recorded in the moving image file, and the foreign substance information, by using the zoom magnification of the electronic zoom, the position of the foreign substance及Convert the size on the position and size of the foreign substance in an image after the electronic zoom processing, characterized in that it and a foreign matter removing step of removing the image the image processing of the foreign matter in the image after the electronic zoom processing .
また、本発明に係わる画像処理装置は、撮影時に撮像素子の前方に配置された光学素子の表面に付着した異物の位置及び大きさの情報を含む情報である異物情報および撮影時の電子ズームのズーム倍率が記録される画像ファイルを処理する画像処理装置であって、前記異物情報と、前記電子ズームのズーム倍率とを用いて、前記異物の位置及び大きさを前記電子ズーム処理後の画像における異物の位置及び大きさに変換し、変換した異物の位置及び大きさに基づいて、前記電子ズーム処理後の画像における異物の像を画像処理により除去する異物除去手段を備えることを特徴とする。 The image processing apparatus according to the present invention also includes foreign object information, which is information including information on the position and size of a foreign object attached to the surface of an optical element disposed in front of an image sensor at the time of photographing, and electronic zoom at the time of photographing. An image processing apparatus for processing an image file in which a zoom magnification is recorded, wherein the position and size of the foreign matter in the image after the electronic zoom processing are determined using the foreign matter information and the zoom magnification of the electronic zoom. Foreign matter removing means for converting to the position and size of the foreign matter and removing the foreign matter image in the image after the electronic zoom processing by image processing based on the converted position and size of the foreign matter is provided.
また、本発明に係わる画像処理方法は、撮影時に撮像素子の前方に配置された光学素子の表面に付着した異物の位置及び大きさの情報を含む情報である異物情報および撮影時の電子ズームのズーム倍率が記録される画像ファイルを処理する画像処理方法であって、前記異物情報と、前記電子ズームのズーム倍率とを用いて、前記異物の位置及び大きさを前記電子ズーム処理後の画像における異物の位置及び大きさに変換し、変換した異物の位置及び大きさに基づいて、前記電子ズーム処理後の画像における異物の像を画像処理により除去する異物除去工程を備えることを特徴とする。 The image processing method according to the present invention also includes foreign object information, which is information including information on the position and size of a foreign object attached to the surface of an optical element disposed in front of an image sensor at the time of photographing, and electronic zoom at the time of photographing. An image processing method for processing an image file in which a zoom magnification is recorded, wherein the position and size of the foreign matter are determined in the image after the electronic zoom processing using the foreign matter information and the zoom magnification of the electronic zoom. A foreign matter removing step of converting the position and size of the foreign matter into a foreign matter and removing the image of the foreign matter in the image after the electronic zoom processing based on the converted position and size of the foreign matter is provided.
本発明によれば、動画記録時に電子ズームを用いて撮影した動画像に対しても、ゴミ除去処理を行うことが可能となる。 According to the present invention, it is possible to perform dust removal processing on a moving image shot using an electronic zoom during moving image recording.
以下、本発明の好適な実施形態について、図面を参照して詳細に説明する。 DESCRIPTION OF EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings.
(第1の実施形態)
図1は、本発明の第1の実施形態における画像処理機能を有する撮像装置の構成を示すブロック図である。本実施形態においては、撮像装置としてレンズ交換可能な一眼レフタイプのデジタルスチルカメラを例に挙げて説明する。なお撮像装置としては、他にレンズ交換が可能なデジタルビデオカメラ等にも、本発明を適用することが可能である。
(First embodiment)
FIG. 1 is a block diagram illustrating a configuration of an imaging apparatus having an image processing function according to the first embodiment of the present invention. In the present embodiment, a single-lens reflex digital still camera with interchangeable lenses will be described as an example of an imaging apparatus. As an imaging apparatus, the present invention can be applied to a digital video camera or the like in which lenses can be exchanged.
図1に示すように、本実施形態の撮像装置は、主にカメラ本体100と、交換レンズタイプのレンズユニット300とを備えて構成されている。
As shown in FIG. 1, the imaging apparatus of the present embodiment mainly includes a
レンズユニット300において、310は複数のレンズから成る撮像レンズ、312は絞り、306はレンズユニット300をカメラ本体100と機械的に結合するレンズマウントである。レンズマウント306内には、レンズユニット300をカメラ本体100と電気的に接続する各種機能が含まれている。320は、レンズマウント306において、レンズユニット300をカメラ本体100と接続するためのインターフェース、322はレンズユニット300をカメラ本体100と電気的に接続するコネクタである。
In the
コネクタ322は、カメラ本体100とレンズユニット300との間で制御信号、状態信号、データ信号などを伝え合うと共に、各種電圧の電流を供給される機能も備えている。また、コネクタ322は電気通信のみならず、光通信、音声通信などを用いて通信を行う構成としてもよい。
The
340は、測光制御部46からの測光情報に基づいて、後述するカメラ本体100のシッター12を制御するシャッター制御部40と連携しながら、絞り312を制御する絞り制御部である。342は撮像レンズ310のフォーカシングを制御するフォーカス制御部、344は撮像レンズ310のズーミングを制御するズーム制御部である。
350はレンズユニット300全体を制御するレンズシステム制御回路である。レンズシステム制御回路350は、動作用の定数、変数、プログラムなどを記憶するメモリを備えている。更に、レンズユニット300固有の番号などの識別情報、管理情報、開放絞り値や最小絞り値、焦点距離などの機能情報、現在や過去の各設定値などを保持する不揮発性メモリも備えている。
A lens
次に、カメラ本体100の構成について説明する。
Next, the configuration of the
106はカメラ本体100とレンズユニット300を機械的に結合するレンズマウント、130,132はミラーで、撮像レンズ310に入射した光線を一眼レフ方式によって光学ファインダ104に導く。なお、ミラー130はクイックリターンミラーの構成としても、ハーフミラーの構成としても、どちらでも構わない。12はフォーカルプレーン式のシャッター、14はCCD、CMOSセンサ等からなり、被写体像を光電変換する撮像素子である。撮像素子14は、撮像素子に配置されている全画素からアナログ信号を出力する間引き無し読み出しモードのみならず、水平方向及び垂直方向に画素を間引いてアナログ信号を出力する間引き読み出しモードも有している。この間引き読み出しモードの活用により、表示解像度や記録解像度に最適な画素数のアナログ信号を得ることができる。
なお、撮像素子14の前方には、光学ローパスフィルター等の光学素子14aが配置されており、この光学素子14の表面に付着したゴミ等の異物が撮像素子14で生成される画像に写りこみ、画質を劣化させる。本実施形態は、この画質劣化を抑制する技術に関するものである。
An
撮像レンズ310に入射した光線は、一眼レフ方式によって光量制限手段である絞り312、レンズマウント306及び106、ミラー130、シャッター12を介して導かれ、光学像として撮像素子14上に結像される。
The light beam incident on the
16は、撮像素子14から出力されるアナログ信号(出力信号)をデジタル信号に変換するA/D変換器である。18は撮像素子14、A/D変換器16、D/A変換器26にそれぞれクロック信号や制御信号を供給するタイミング発生回路であり、メモリ制御回路22及びシステム制御回路50により制御される。
20は画像処理回路であり、A/D変換器16からのデータ或いはメモリ制御回路22からのデータに対して所定の画素補間処理や色変換処理を行う。また、画像処理回路20は、必要に応じて、A/D変換器16から出力される画像データを用いて所定の演算処理を行う。得られた演算結果に基づいてシステム制御回路50がシャッター制御部40、焦点調節部42を制御するための、TTL(スルー・ザ・レンズ)方式のオートフォーカス(AF)処理、自動露出(AE)処理、フラッシュプリ発光(EF)処理を行うことができる。さらに、画像処理回路20は、A/D変換器16から出力される画像データを用いて所定の演算処理を行い、得られた演算結果に基づいてTTL方式のオートホワイトバランス(AWB)処理も行っている。また、画像処理回路20は、電子ズーム時の画素補間処理を用いた画像の拡大処理を行っている。
An
なお、本実施形態における図1に示す例では、焦点調節部42及び測光制御部46を専用に備えている。従って、焦点調節部42及び測光制御部46を用いてAF処理、AE処理、EF処理の各処理を行い、画像処理回路20を用いたAF処理、AE処理、EF処理の各処理を行わない構成としても構わない。また、焦点調節部42及び測光制御部46を用いてAF処理、AE処理、EF処理の各処理を行い、さらに、画像処理回路20を用いたAF処理、AE処理、EF処理の各処理を行う構成としてもよい。
In the example shown in FIG. 1 in the present embodiment, the
22はメモリ制御回路であり、A/D変換器16、タイミング発生回路18、画像処理回路20、画像表示メモリ24、D/A変換器26、メモリ30、圧縮・伸長回路32を制御する。A/D変換器16から出力される画像データは、画像処理回路20、メモリ制御回路22を介して、或いはメモリ制御回路22のみを介して、画像表示メモリ24或いはメモリ30に書き込まれる。
A
24は画像表示メモリ、26はD/A変換器、28はTFT方式のLCD等から成る画像表示部であり、画像表示メモリ24に書き込まれた表示用の画像データはD/A変換器26を介して画像表示部28により表示される。画像表示部28を用いて、撮像した画像データを逐次表示することで、電子ビューファインダー(EVF)機能を実現することができる。また、画像表示部28は、システム制御回路50の指示により任意に表示をON/OFFすることが可能であり、表示をOFFにした場合にはカメラ本体100の電力消費を大幅に低減することができる。
30は撮影した静止画像あるいは動画像を格納するためのメモリであり、所定枚数の静止画像あるいは所定量の動画像を格納するのに十分な記憶容量を備えている。これにより、複数枚の静止画像を連続して撮影する連写撮影やパノラマ撮影の場合にも、高速かつ大量の画像書き込みをメモリ30に対して行うことが可能となる。また、動画撮影時には、所定レートで連続的に書き込まれる画像のフレームバッファとして使用される。さらに、メモリ30はシステム制御回路50の作業領域としても使用することが可能である。
31は後述する不揮発性メモリ56に格納されているゴミ情報と、レンズユニット300から得られる光学情報を用いて、画像データに含まれるゴミを画像処理により除去するためのゴミ除去回路(異物除去回路)である。
31 is a dust removal circuit (foreign matter removal circuit) for removing dust contained in image data by image processing using dust information stored in a
32は公知の圧縮方法を用いて画像データを圧縮・伸長する圧縮・伸長回路である。圧縮・伸長回路32は、メモリ30に格納された画像を読み込んで圧縮処理或いは伸長処理を行い、処理を終えたデータを再びメモリ30に書き込む。また、動画像データを所定のフォーマットに圧縮符号化し、又は所定の圧縮符号化データから動画像信号を伸張する機能も有する。
A compression /
33は音声信号処理回路であり、マイク(不図示)より入力された音声信号を所定の符号フォーマットに符号化し、又は所定の符号化データから音声信号を復号する機能を有する。なお、本実施形態のデジタルカメラは、スピーカ(不図示)を介して、音声信号処理回路33により復号された音声データを出力する機能を有する。
An audio
40はシャッター制御部であり、測光制御部46からの測光情報に基づいて絞り312を制御する絞り制御部340と連携しながらシャッター12を制御する。42はAF(オートフォーカス)処理を行うための焦点調節部である。レンズユニット300内の撮像レンズ310に入射した光線を絞り312、レンズマウント306,106、ミラー130及び焦点調節用サブミラー(不図示)を介して一眼レフ方式で入射させることにより、光学像として結像された画像の合焦状態を測定する。
46はAE(自動露出)処理を行うための測光制御部である。レンズユニット300内の撮像レンズ310に入射した光線を、絞り312、レンズマウント306,106、ミラー130及び測光用サブミラー(図示せず)を介して一眼レフ方式で入射させることにより、光学像として結像された画像の露出状態を測定する。48はフラッシュであり、AF補助光の投光機能、フラッシュ調光機能も有する。測光制御部46はフラッシュ48と連携することにより、EF(フラッシュ調光)処理機能も有する。
A
また、焦点調節部42による測定結果と、A/D変換器16からの画像データを画像処理回路20によって演算した演算結果とを用いて、AF制御を行うようにしてもよい。さらに、測光制御部46による測定結果と、A/D変換器16からの画像データを画像処理回路20によって演算した演算結果とを用いて露出制御を行うようにしてもよい。
Further, the AF control may be performed using the measurement result by the
50はカメラ本体100全体を制御するシステム制御回路であり、周知のCPUなどを内蔵する。52はシステム制御回路50の動作用の定数、変数、プログラム等を記憶するメモリである。
54はシステム制御回路50でのプログラムの実行に応じて、文字、画像、音声などを用いて動作状態やメッセージなどを外部に通知するための通知部である。通知部54としては、例えばLCDやLEDなどによる視覚的な表示を行う表示部や音声による通知を行う発音素子などが用いられるが、通知部54はこれらのうち1つ以上の組み合わせにより構成される。特に、表示部の場合には、カメラ本体100の操作部70近辺の、視認しやすい、単数あるいは複数箇所に設置される。また、通知部54は、その一部の機能が光学ファインダ104内に設置されている。
通知部54の表示内容の内、LCDなどの画像表示部28に表示するものとしては以下のものがある。まず、単写/連写撮影表示、セルフタイマ表示等、撮影モードに関する表示がある。また、圧縮率表示、記録画素数表示、記録枚数表示、残撮影可能枚数表示等の記録に関する表示がある。また、シャッター速度表示、絞り値表示、露出補正表示、調光補正表示、外部フラッシュ発光量表示、赤目緩和表示等の撮影条件に関する表示がある。その他に、マクロ撮影表示、ブザー設定表示、電池残量表示、エラー表示、複数桁の数字による情報表示、記録媒体200及びPC210の着脱状態表示がある。更に、レンズユニット300の着脱状態表示、通信I/F動作表示、日付・時刻表示、外部コンピュータとの接続状態を示す表示等も行われる。
Among the display contents of the
また、通知部54の表示内容のうち、光学ファインダ104内に表示するものとしては、例えば、以下のものがある。合焦表示、撮影準備完了表示、手振れ警告表示、フラッシュ充電表示、フラッシュ充電完了表示、シャッター速度表示、絞り値表示、露出補正表示、記録媒体書き込み動作表示等である。
In addition, among the display contents of the
56は後述するプログラムなどが格納された電気的に消去・記録可能な不揮発性メモリであり、例えばEEPROM等が用いられる。
58は光学情報格納メモリであり、レンズユニット300からコネクタ122を介して得られる、後述する各種レンズ情報を記憶する。
An optical
60,62,64,66,68,70は、システム制御回路50の各種の動作指示を入力するための操作手段であり、スイッチやダイアル、タッチパネル、視線検知によるポインティング、音声認識装置等の単数或いは複数の組み合わせで構成される。
ここで、これらの操作手段の具体的な説明を行う。 Here, a specific description of these operating means will be given.
60はモードダイアルスイッチで、自動撮影モード、プログラム撮影モード、シャッター速度優先撮影モード、絞り優先撮影モード、マニュアル撮影モード、焦点深度優先(デプス)撮影モード等の各機能撮影モードを切り替え設定することができる。他に、ポートレート撮影モード、風景撮影モード、接写撮影モード、スポーツ撮影モード、夜景撮影モード、パノラマ撮影モードなどの各機能撮影モードを切り替え設定することもできる。
62はシャッタースイッチSW1で、不図示のシャッターボタンの操作途中(例えば半押し)でONとなり、AF処理、AE処理、AWB処理、EF処理等の動作開始を指示する。
64はシャッタースイッチSW2で、不図示のシャッターボタンの操作完了(例えば全押し)でONとなり、露光処理、現像処理、及び記録処理からなる一連の処理の動作開始を指示する。まず、露光処理では、撮像素子14から読み出した信号をA/D変換器16、メモリ制御回路22を介してメモリ30に書き込み、更に、画像処理回路20やメモリ制御回路22での演算を用いた現像処理が行われる。更に、記録処理では、メモリ30から画像データを読み出し、圧縮・伸張回路32で圧縮を行い、記録媒体200あるいはPC210に書き込む、または送信する。
A
66は再生スイッチであり、撮影モード状態で撮影した画像をメモリ30あるいは記録媒体200、PC210から読み出して画像表示部28に表示する再生動作の開始を指示する。再生スイッチ66は、他に、再生モード、マルチ画面再生・消去モード、PC接続モード等の各機能モードを設定することができる。
68は単写/連写スイッチで、シャッタースイッチSW2(64)を押した場合に、1コマの撮影を行って待機状態とする単写モードと、シャッタースイッチSW2(64)を押している間、連続して撮影を行い続ける連写モードとを設定することができる。 68 is a single-shot / continuous-shot switch. When the shutter switch SW2 (64) is pressed, a single-shot mode in which one frame is shot and the camera is in a standby state, and while the shutter switch SW2 (64) is being pressed, continuous shooting is performed. The continuous shooting mode can be set.
70は各種ボタンやタッチパネルなどから成る操作部である。一例として、ライブビュー開始/停止ボタン、動画記録開始/停止ボタン、電子ズームの倍率を切り替えるズームスイッチ、メニューボタン、セットボタン、マルチ画面再生改ページボタン、フラッシュ設定ボタン、単写/連写/セルフタイマー切り換えボタン、メニュー移動+(プラス)ボタン、メニュー移動−(マイナス)ボタンを含む。更に、再生画像移動+(プラスボタン、再生画像移動−(マイナス)ボタン、撮影画質選択ボタン、露出補正ボタン、調光補正ボタン、外部フラッシュ発光量設定ボタン、日付/時間設定ボタンなども含む。なお、上記プラスボタン及びマイナスボタンの各機能は、回転ダイアルスイッチを備えることによって、より軽快に数値や機能を選択することが可能となる。
An
また、画像表示部28のON/OFFを設定する画像表示ON/OFFスイッチ、撮影直後に撮影した画像データを自動再生するクイックレビュー機能を設定するクイックレビューON/OFFスイッチがある。また、JPEG圧縮の圧縮率を選択するため、あるいは撮像素子の信号をそのままデジタル化して記録媒体に記録するRAWモードを選択するためのスイッチである圧縮モードスイッチがある。また、ワンショットAFモードとサーボAFモードとを設定可能なAFモード設定スイッチなどがある。ワンショットAFモードでは、シャッタースイッチSW1(62)を押した際にオートフォーカス動作を開始し、一旦合焦した場合、その合焦状態を保ち続ける。サーボAFモードでは、シャッタースイッチSW1(62)を押している間、連続してオートフォーカス動作を続ける。更に、後述するようにゴミ検出用画像を撮影してゴミ情報を取得する、ゴミ情報取得モードを設定することができる設定スイッチを含む。
In addition, there is an image display ON / OFF switch for setting ON / OFF of the
72は電源スイッチであり、カメラ本体100の電源オン、電源オフの各モードを切り替え設定することができる。また、カメラ本体100に接続されたレンズユニット300、外部フラッシュ112、記録媒体200、PC210等の各種付属装置の電源オン、電源オフの設定も合わせて切り替え設定可能である。
80は電源制御部で、電池検出回路、DC−DCコンバータ、通電するブロックを切り替えるスイッチ回路等により構成されている。電源制御部80は、電池の装着の有無、電池の種類、電池残量の検出を行い、検出結果及びシステム制御回路50の指示に基づいてDC−DCコンバータを制御し、必要な電圧を必要な期間、記録媒体を含む各部へ供給する。
A
82,84はコネクタ、86はアルカリ電池やリチウム電池等の一次電池、NiCd電池やNiMH電池、Li‐ion電池、Liポリマー電池等の二次電池、ACアダプター等からなる電源部である。
90及び94はメモリカードやハードディスク等の記録媒体やPCとのインターフェース、92及び96はメモリカードやハードディスク等の記録媒体やPCと接続を行うコネクタである。98はコネクタ92及び/或いは96に記録媒体200或いはPC210が装着されているか否かを検知する記録媒体着脱検知回路である。
なお、本実施形態では記録媒体を取り付けるインターフェース及びコネクタを2系統持つものとして説明しているが、記録媒体を取り付けるインターフェース及びコネクタは、単数或いは複数、いずれの系統数を備える構成としても構わない。また、異なる規格のインターフェース及びコネクタを組み合わせて備える構成としても構わない。 Although the present embodiment has been described as having two systems of interfaces and connectors for attaching the recording medium, the interface and connectors for attaching the recording medium may have a single or a plurality of systems. Further, a configuration including a combination of interfaces and connectors of different standards may be used.
インターフェース及びコネクタとしては、種々の記憶媒体の規格に準拠したものを用いて構成することが可能である。例えば、PCMCIA(Personal Computer Memory Card International Association)カードやCF(コンパクトフラッシュ(登録商標))カード、SDカード等である。インターフェース90及び94、そしてコネクタ92及び96をPCMCIAカードやCFカード等の規格に準拠したものを用いて構成した場合、各種通信カードを接続することができる。通信カードとしては、LANカードやモデムカード、USB(Universal Serial Bus)カード、IEEE(Institute of Electrical and Electronic Engineers)1394カードがある。他にも、P1284カード、SCSI(Small Computer System Interface)カード、PHS等がある。これら各種通信カードを接続することにより、他のコンピュータやプリンタ等の周辺機器との間で画像データや画像データに付属した管理情報を転送し合うことができる。
As the interface and the connector, it is possible to configure using interfaces that comply with various storage medium standards. For example, a PCMCIA (Personal Computer Memory Card International Association) card, a CF (Compact Flash (registered trademark)) card, an SD card, or the like. When the
104は光学ファインダであり、撮像レンズ310に入射した光線を、一眼レフ方式によって、絞り312、レンズマウント306,106、ミラー130,132を介して導き、光学像として結像させて表示することができる。これにより、画像表示部28による電子ファインダー機能を使用すること無しに、光学ファインダのみを用いて撮影を行うことが可能である。また、光学ファインダ104内には、通知部54の一部の機能、例えば、合焦状態、手振れ警告、フラッシュ充電、シャッター速度、絞り値、露出補正などが表示される。
112は、アクセサリシュー110を介して装着される、外部フラッシュ装置である。
120はレンズマウント106内でカメラ本体100をレンズユニット300と接続するためのインターフェースである。
122はカメラ本体100をレンズユニット300と電気的に接続するコネクタである。また、レンズマウント106及びコネクタ122にレンズユニット300が装着されているか否かは、不図示のレンズ着脱検知部により検知される。コネクタ122はカメラ本体100とレンズユニット300との間で制御信号、状態信号、データ信号などを伝え合うと共に、各種電圧の電流を供給する機能も備えている。
A
コネクタ122を介して通信される、レンズユニット300の各種光学情報(絞り、ズーム位置、瞳位置、焦点距離など)は、カメラ本体100の光学情報格納メモリ58に記憶される。通信の要求はカメラ側から行う場合もあれば、レンズ側から情報更新のたびに通信される場合もある。
Various optical information (aperture, zoom position, pupil position, focal length, etc.) of the
また、コネクタ122は電気通信だけでなく、光通信、音声通信により通信を行う構成としてもよい。
Further, the
200はメモリカードやハードディスク等の記録媒体である。この記録媒体200は、半導体メモリや磁気ディスク等から構成される記録部202、カメラ本体100とのインターフェース204、カメラ本体100と接続を行うコネクタ206を備えている。
記録媒体200としては、PCMCIAカードやコンパクトフラッシュ(登録商標)等のメモリカード、ハードディスク等を用いることができる。また、マイクロDAT、光磁気ディスク、CD−RやCD−RW等の光ディスク、DVD等の相変化型光ディスク等で構成されていても勿論構わない。
As the
210はPCであり、磁気ディスク(HD)等から構成される記録部212、カメラ本体100とのインターフェース214、カメラ本体100と接続を行うコネクタ216を備えている。インターフェース94はUSBやIEEE1394などが挙げられるが、特に限定はない。
次に、上記構成を有する撮像装置における撮像素子の前方に配置されたローパスフィルタやカバーガラス等の光学素子14a上のゴミの影響を画像処理により除去する処理について説明する。
Next, a process for removing the influence of dust on the
本実施形態では、まず、ゴミ(異物)の付着している位置及び大きさ等の情報であるゴミ情報(異物情報)を得るためのゴミ検出用画像(異物検出用画像)を撮影し、ゴミデータを抽出し、ゴミデータを生成しておく。ここでゴミ検出用画像は、できるだけ均一な輝度面を撮影した画像が望ましいが、身近な場所で容易に撮影できることが望ましいため、厳密な均一性を要求するものではない。例えば、青空や白い壁面を撮影することを想定している。 In this embodiment, first, a dust detection image (foreign matter detection image) for obtaining dust information (foreign matter information), which is information such as the position and size of dust (foreign matter), is photographed, and the dust is collected. Extract data and generate garbage data. Here, the dust detection image is preferably an image obtained by photographing a luminance surface that is as uniform as possible. However, since it is desirable that the dust detection image can be easily photographed in a familiar place, strict uniformity is not required. For example, it is assumed that a blue sky or a white wall is photographed.
図2は、本実施形態におけるゴミ情報を取得する際の撮像装置(本実施形態ではデジタルカメラ)における処理を示すフローチャートである。 FIG. 2 is a flowchart showing processing in the imaging apparatus (digital camera in the present embodiment) when acquiring dust information in the present embodiment.
まずステップS201において、操作部70によりゴミ情報取得モードが選択されたか否かを判定する。ゴミ情報取得モードが選択されるまでステップS201の判定を繰り返し、ゴミ情報取得モードが選択されるとステップS202へ進み、シャッタースイッチSW1(62)がONされたかどうかを判断する。OFFであればステップS201に戻って上記処理を繰り返す。
First, in step S201, it is determined whether or not the dust information acquisition mode is selected by the
一方、ONであれば、ステップS203において、絞り、ISO値、シャッタースピード、その他撮影関連のパラメータを設定する。ここで設定されるパラメータを図3に示す。絞りはF22など、絞りを絞り込んだ設定とする。レンズマウント106に接続されるレンズユニット300において設定可能な範囲内で最も絞り込んだ状態で撮影するものとしてもよい。このように絞りを絞るのは、ゴミは通常撮像素子14の表面ではなく、撮像素子14を保護する保護用ガラスや、撮像素子より被写体側に配置される光学フィルター等の光学素子14a上に付着しているため、レンズユニット300の絞り値によって結像状態が異なるためである。そのため、絞りが開放値に近いとゴミの像がぼやけてしまい、適切なゴミ検出用の画像が取得できないので、できるだけ絞り込んだ状態で撮影するのが好ましい。
On the other hand, if it is ON, in step S203, the aperture, ISO value, shutter speed, and other shooting-related parameters are set. The parameters set here are shown in FIG. The aperture is set to a narrowed aperture such as F22. The image may be taken with the
図2のフローチャートの説明に戻ると、この時までに撮影者はできるだけ白い壁などの均一輝度面に撮像装置を向け、シャッタースイッチSW2(64)を操作することとなる。 Returning to the description of the flowchart of FIG. 2, by this time, the photographer points the imaging device to a uniform luminance surface such as a white wall as much as possible and operates the shutter switch SW2 (64).
ステップS204ではシャッタースイッチSW2(64)がONされたかどうかを判断する。OFFであればステップS202に戻りシャッタースイッチSW1(62)の判定を行う。ONであればステップS205へ進む。ステップS205ではゴミ検出用画像の撮影(均一輝度面の撮影)を行って、メモリ30内に画像データを取り込む。次にステップS206ではメモリ30内に記憶した画像データからゴミ情報を取得する。
In step S204, it is determined whether or not the shutter switch SW2 (64) is turned on. If it is OFF, the process returns to step S202 to determine the shutter switch SW1 (62). If it is ON, the process proceeds to step S205. In step S <b> 205, a dust detection image is captured (uniform brightness surface is captured), and the image data is captured in the
ここで、ゴミ情報の取得について説明する。具体的には、撮影したゴミ検出用画像からゴミ領域の位置(座標)と大きさを求めるものである。まず、撮影したゴミ検出用画像の領域を複数のブロックに分割し、ブロック内の最大輝度Lmax、平均輝度Lave を算出し、次式を用いてブロック内のスレッショルド値T1を算出する。 Here, acquisition of dust information will be described. Specifically, the position (coordinates) and size of the dust region are obtained from the photographed dust detection image. First, the captured dust detection image region is divided into a plurality of blocks, the maximum luminance Lmax and average luminance Lave in the block are calculated, and the threshold value T1 in the block is calculated using the following equations.
T1=Lave×0.6+Lmax×0.4
次に、ゴミが付着している画素はその輝度が周囲の画素の輝度よりも低下するため、スレッショルド値T1を超えない画素をゴミ画素とし、ゴミ画素によって構成される孤立領域を各々一つのゴミ領域di(i=0,1,…,n)とする。
T1 = Lave × 0.6 + Lmax × 0.4
Next, since the luminance of the pixel to which dust is attached is lower than the luminance of the surrounding pixels, the pixel not exceeding the threshold value T1 is defined as the dust pixel, and each isolated region constituted by the dust pixel is defined as one dust. Let it be a region di (i = 0, 1,..., N).
図4は、ゴミ領域サイズ算出の概要を示す図である。図4に示すように、ゴミ領域毎に、ゴミ領域を構成する画素の水平方向の座標の最大値Xmax および最小値Xmin、垂直方向の座標の最大値Ymax および最小値Ymin を求め、ゴミ領域diのサイズを表す半径riを次式によって算出する。 FIG. 4 is a diagram showing an outline of dust region size calculation. As shown in FIG. 4, for each dust region, the maximum value Xmax and minimum value Xmin of the horizontal coordinate of the pixels constituting the dust region and the maximum value Ymax and minimum value Ymin of the vertical coordinate are obtained, and the dust region di is obtained. The radius ri representing the size of is calculated by the following equation.
ri=[√{(Xmax−Xmin)2+(Ymax−Ymin)2}]/2
また、このときの中心座標(Xdi,Ydi)は、近似的に、
Xdi=(Xmax+Xmin)/2
Ydi=(Ymax+Ymin)/2
で求めるものとする。このように求められた位置(座標)と半径を、ゴミ情報プロファイルとして記録する。
ri = [√ {(Xmax−Xmin) 2 + (Ymax−Ymin) 2 }] / 2
The center coordinates (Xdi, Ydi) at this time are approximately:
Xdi = (Xmax + Xmin) / 2
Ydi = (Ymax + Ymin) / 2
Sought in The position (coordinates) and radius determined in this way are recorded as a dust information profile.
不揮発性メモリ56のサイズによる制限などにより、ゴミ補正データ(ゴミ情報プロファイル)のデータサイズが制限されている場合がある。このような場合に対応するために、ゴミ位置情報を、大きさやゴミ領域の平均輝度値によってソートする。本実施形態では、riの大きい順にソートする。riが等しい場合、平均輝度値の低い順にソートする。 このようにすることで、目立つゴミを優先してゴミ補正データに登録することが出来る。なお、ソート済みのゴミ領域をDi、ゴミ領域Diの半径をRiとする。
In some cases, the data size of the dust correction data (dust information profile) is limited due to limitations due to the size of the
なお、予め定められたサイズより大きいゴミ領域がある場合、ソートの対象から外し、ソート済みゴミ領域リストの末尾に配置してもよい。大きいゴミ領域については、後に補間処理をするとかえって画質を低下させる場合があり、補正対象の優先順位としては最下位として扱うことが望ましいからである。 If there is a dust area larger than a predetermined size, it may be excluded from sorting and placed at the end of the sorted dust area list. This is because a large dust region may lower the image quality if interpolation processing is performed later, and is preferably treated as the lowest priority for correction.
このゴミ情報プロファイルは、図5に示すような構造をとる。図5に示す通り、ゴミ情報プロファイルには、ゴミ検出用画像撮影時の、レンズ情報とゴミの位置、大きさの情報が格納される。更に具体的には、ゴミ検出用画像撮影時のレンズ情報として、ゴミ検出用画像撮影時における実際の絞り値(F値)と、そのときのレンズ瞳位置を格納する。続いて記憶領域に検出したゴミ領域の数(整数値)を格納し、これに続き、個々の具体的なゴミ領域のパラメータを、ゴミ領域の数だけ繰返して格納する。ゴミ領域のパラメータは、ゴミの半径(例えば2バイト)、有効画像領域における中心のx座標(例えば2バイト)、おなじく中心のy座標(例えば2バイト)の3つの数値のセットである。 This dust information profile has a structure as shown in FIG. As shown in FIG. 5, the dust information profile stores lens information and dust position and size information when the dust detection image is captured. More specifically, the actual aperture value (F value) at the time of dust detection image capture and the lens pupil position at that time are stored as lens information at the time of dust detection image capture. Subsequently, the number of detected dust areas (integer value) is stored in the storage area, and subsequently, individual specific dust area parameters are repeatedly stored by the number of dust areas. The parameter of the dust area is a set of three numerical values: a dust radius (for example, 2 bytes), a center x coordinate (for example, 2 bytes) in the effective image area, and a similar y coordinate (for example, 2 bytes).
取得したゴミ情報はステップS207で不揮発性メモリ56に記憶され、ゴミ情報取得のための処理を終了する。
The acquired dust information is stored in the
なお、ゴミ情報取得モードにおける撮影動作は、ゴミ情報を取得することを目的とするため、本実施形態では撮影した画像そのものに対して、圧縮及び記録媒体200への記録処理は行わない。これは撮影者にとって不要な画像データで記録媒体200内の容量を無駄に消費することがないようにするためであるが、通常画像と同様に、圧縮後、記録媒体200へ保存しても良く、また、その際に拡張子を変更するなど何らかの手を加えても構わない。
Note that since the shooting operation in the dust information acquisition mode is intended to acquire dust information, in this embodiment, the captured image itself is not compressed and recorded on the
ここで、本実施形態は、主として動画を撮影する場合にゴミによる画質劣化を画像処理で補正する方法に関するものであるが、動画の処理について説明する前に、静止画の場合の処理について以下説明する。 Here, the present embodiment mainly relates to a method of correcting image quality degradation due to dust by image processing when shooting a moving image. Before describing the processing of a moving image, the processing in the case of a still image will be described below. To do.
静止画の場合には、ゴミ検出用画像の撮影ではない通常の撮影を行った場合、通常撮影時のカメラ設定値等と共に図5に示したゴミ補正データ(ゴミ情報プロファイル)を画像データに関連付けて記録媒体200に記録する。
In the case of a still image, when normal shooting is performed instead of shooting a dust detection image, the dust correction data (dust information profile) shown in FIG. 5 is associated with the image data together with the camera setting value during normal shooting. To the
具体的には、例えば、撮影時のカメラ設定値等が記録される画像ファイルのヘッダ領域であるExif領域にゴミ補正データを追記することで、関連付けを実現することができる。または、ゴミ補正データをファイルとして独立して記録し、画像データにはそのゴミ補正データファイルへのリンク情報のみを記録することで関連付けを実現することも可能である。ただし、画像ファイルとゴミ補正データファイルを別々に記録すると、画像ファイルの移動時に、リンク関係が消失する場合があるので、ゴミ補正データは画像データと一体的に保持することが望ましい。 Specifically, for example, association can be realized by adding dust correction data to the Exif area, which is the header area of an image file in which camera setting values at the time of shooting are recorded. Alternatively, the dust correction data can be independently recorded as a file, and the association can be realized by recording only the link information to the dust correction data file in the image data. However, if the image file and the dust correction data file are recorded separately, the link relationship may be lost when the image file is moved. Therefore, it is desirable to hold the dust correction data integrally with the image data.
このように、ゴミ補正データを画像データに関連付けて記録するのは、このゴミ補正データが付属されて記録された画像データを外部の画像処理装置に移し、この外部の画像処理装置でゴミ除去処理(異物除去処理)を行う場合も想定しているからである。 As described above, the dust correction data is recorded in association with the image data because the image data recorded with the dust correction data is transferred to an external image processing apparatus, and the dust removal processing is performed by the external image processing apparatus. This is because it is assumed that (foreign matter removal processing) is performed.
次に、上述したようにして不揮発性メモリ56に記憶されたゴミ情報を使用した通常撮影時のゴミ除去処理について、図7及び図8のフローチャートを用いて説明する。なお、ここでの説明もまずは静止画におけるゴミ除去処理に関するものであるが、動画においても、静止画と同様のゴミ除去処理を1フレーム毎の画像に施すことにより、同様にごみ除去処理を行うことができる。また、このゴミ除去処理は、図1におけるゴミ除去回路31を用いて行われる。
Next, dust removal processing during normal shooting using dust information stored in the
図7は本実施形態における通常撮影時の静止画像の撮影処理を示している。 FIG. 7 shows still image shooting processing during normal shooting in the present embodiment.
ステップS501ではシャッタースイッチSW1(62)がONされるまで、待機する。シャッタースイッチSW1(62)がONされるとステップS502へ進んで測光及び焦点調節処理を行い、続いてステップS503でシャッタースイッチSW2(64)がONされたかどうかを判断する。シャッタースイッチSW2(64)がOFFであればステップS501に戻って上記処理を繰り返し、ONされたことを検出するとステップS504へ進んで撮影を行う。撮影が終了するとステップS505へ進み、有効なゴミ情報が不揮発性メモリ56内に存在するか否かを判定する。ゴミ情報が存在する場合はステップS506へ進み、存在しない場合はステップS507へ進んで撮影した画像データを記録媒体200に格納する。
In step S501, the process waits until the shutter switch SW1 (62) is turned on. When the shutter switch SW1 (62) is turned on, the process proceeds to step S502 to perform photometry and focus adjustment processing, and then in step S503, it is determined whether or not the shutter switch SW2 (64) is turned on. If the shutter switch SW2 (64) is OFF, the process returns to step S501 and the above processing is repeated. If it is detected that the shutter switch SW2 (64) is turned ON, the process proceeds to step S504 to perform photographing. When shooting is completed, the process proceeds to step S505, where it is determined whether valid dust information exists in the
なお、本実施形態では不揮発性メモリ56内にゴミ情報が存在するか否かを判定しているが、本来、上述したゴミ情報取得モードでの撮影が行われているかどうかが必要な条件であり、その判定方法に関しては特に限定するものではない。例えば、ゴミ情報取得モードでの撮影時に何らかのフラグをセットしておき、そのフラグを評価する方法でも構わない。
In the present embodiment, it is determined whether or not dust information exists in the
ステップS506では撮影した画像データに対し、取得済みのゴミ情報を、Exif領域などのヘッダ領域に埋め込み、ステップS507において記録媒体200にゴミ情報を埋め込んだ画像データを格納する。
In step S506, the acquired dust information is embedded in the header area such as the Exif area for the captured image data, and in step S507, the image data in which the dust information is embedded is stored in the
続いて、図8を参照してゴミ除去処理の動作について説明する。 Next, the operation of dust removal processing will be described with reference to FIG.
ステップS601では、選択された画像にゴミ情報が埋め込まれているかどうか判定する。埋め込まれている場合はステップS602へ進み、ゴミ情報を取り込む。ステップS603では取り込んだゴミ情報から画像データにおけるゴミの影響を除去するべく、ゴミの周辺画素による画素補間処理等による補正処理を行う。 In step S601, it is determined whether dust information is embedded in the selected image. If it is embedded, the process advances to step S602 to capture dust information. In step S603, a correction process such as a pixel interpolation process using peripheral pixels of dust is performed in order to remove the influence of dust in the image data from the captured dust information.
抽出したゴミ補正データから座標列Di(i=1,2,…n)、半径列Ri(i=1,2,…,n)、絞り値f1とレンズ瞳位置L1を得る。ここでRiは、先にゴミ補正データソート時に求めた座標Diのゴミの大きさである。また、f1は、ゴミ検出用画像の撮影時のレンズの絞り値、L1は、同じくゴミ検出用画像の撮影時のレンズの瞳位置である。通常撮影された画像の撮影時の絞り値f2とレンズ瞳位置L2を取得し、Diを次式で変換する。ここで、dは画像中心から座標Diまでの距離、Hは撮像素子14の表面とゴミとの距離であるとする。変換後の座標Di’と変換後の半径Ri’は例えば次式で定義する。 A coordinate row Di (i = 1, 2,... N), a radius row Ri (i = 1, 2,..., N), an aperture value f1 and a lens pupil position L1 are obtained from the extracted dust correction data. Here, Ri is the size of the dust at the coordinate Di previously obtained when sorting the dust correction data. Further, f1 is a lens aperture value when the dust detection image is captured, and L1 is a lens pupil position when the dust detection image is captured. An aperture value f2 and a lens pupil position L2 at the time of shooting a normally shot image are acquired, and Di is converted by the following equation. Here, d is a distance from the image center to the coordinate Di, and H is a distance between the surface of the image sensor 14 and dust. The coordinate Di ′ after conversion and the radius Ri ′ after conversion are defined by the following equation, for example.
Di’(x,y)=(L2×(L1−H)×d/((L2−H)×L1))×Di(x,y)
Ri’=(Ri×f1/f2+3) (1)
ここでの単位はピクセルであり、Ri’についての「+3」はマージン量である。
Di ′ (x, y) = (L2 × (L1−H) × d / ((L2−H) × L1)) × Di (x, y)
Ri ′ = (Ri × f1 / f2 + 3) (1)
The unit here is a pixel, and “+3” for Ri ′ is a margin amount.
座標Di’、半径Ri’で示される領域内のゴミを検出し、必要に応じて補間処理を適用する。補間処理の詳細については後述する。全ての座標についてゴミ除去処理を適用し、全ての座標について処理が終わっていれば、ステップS604に進む。 Dust in the area indicated by the coordinates Di ′ and the radius Ri ′ is detected, and interpolation processing is applied as necessary. Details of the interpolation processing will be described later. If dust removal processing is applied to all coordinates and processing is completed for all coordinates, the process proceeds to step S604.
ステップS604では、撮影した画像からゴミの影響を除去した補正処理後の画像を新たに記録する。 In step S604, a corrected image obtained by removing the influence of dust from the captured image is newly recorded.
以上でゴミ除去処理を終了する。 This completes the dust removal process.
なお、本実施形態では、カメラ本体100ではゴミ情報を、撮影した画像データに埋め込む形で記録し、後からゴミの影響を除去する補正処理を行う構成を示した。これに対し、カメラ本体100で画像を撮影して記録する時に、ゴミ情報を埋め込まずにゴミの影響を除去する補正処理を行い、補正処理後の画像を記録媒体200へ記録するよう構成してもよい。
In the present embodiment, the
(補間ルーチン)
次に、ゴミ領域の補間処理の詳細について説明する。
(Interpolation routine)
Next, details of dust region interpolation processing will be described.
図9は、補間ルーチンの流れを示すフローチャートである。 FIG. 9 is a flowchart showing the flow of the interpolation routine.
まずステップS701で、ゴミ領域判定を行う。ゴミ領域とは、次の条件全てを満たす領域とする。
(1)中心座標Di’、半径Ri’(式(1)で求められたDi’,Ri’)
に含まれる画素の平均輝度Yaveと最高輝度Ymaxを用いて次式で求められるスレッショルド値T2より暗い領域。
First, in step S701, dust region determination is performed. The dust area is an area that satisfies all of the following conditions.
(1) Center coordinate Di ′, radius Ri ′ (Di ′, Ri ′ obtained by equation (1))
A region that is darker than the threshold value T2 obtained by the following equation using the average luminance Yave and the maximum luminance Ymax of the pixels included in.
T2=Yave×0.6+Ymax×0.4
(2)上記の中心座標Di’、半径Ri’の円と接しない領域。
(3)(1)で選択された輝度の低い画素によって構成される孤立領域に対し、
上述の方法で算出した半径値がX1画素以上、X2画素未満である領域。
(4)円の中心座標Diを含む領域。
T2 = Yave × 0.6 + Ymax × 0.4
(2) A region not in contact with the circle having the center coordinate Di ′ and the radius Ri ′.
(3) For an isolated region composed of low-luminance pixels selected in (1),
A region where the radius value calculated by the above method is not less than X1 pixels and less than X2 pixels.
(4) A region including the center coordinates Di of the circle.
本実施形態では、X1は3画素、X2は30画素とする。このようにすることで、孤立した小領域だけをゴミ領域として扱うことが可能になる。また、レンズ瞳位置が正確に取得できない場合には、(4)の条件は幅を持たせても良い。 In the present embodiment, X1 is 3 pixels and X2 is 30 pixels. In this way, only an isolated small area can be handled as a dust area. If the lens pupil position cannot be obtained accurately, the condition (4) may have a width.
例えば、着目領域が座標DiからX方向、Y方向に夫々±3画素の範囲の座標を含めば、ゴミ領域と判定するなどという条件が考えられる。 For example, if the region of interest includes coordinates within a range of ± 3 pixels in the X direction and the Y direction from the coordinate Di, a condition such as determining as a dust region can be considered.
ステップS702で、画像信号中にこのような領域(部分)があればステップS703へ進みゴミ領域補間を行い、存在しない場合は処理を終了する。ステップS703で実行するゴミ領域補間処理は、公知の欠損領域補間法で行う。公知の欠損領域補間法には例えば、特開2001−223894号公報に開示されているパターン置換がある。特開2001−223894号公報では赤外光を用いて欠損領域を特定しているが、本実施形態ではステップS701で検出したゴミ領域を欠損領域として扱い、パターン置換によりゴミ領域を周囲の正常画素で補間する。パターン置換で埋められない画素については、パターン補間後の画像データに対し、補間対象画素に最も近い順に正常画素をp個選択し、その平均色を用いて補間する。 If there is such an area (part) in the image signal in step S702, the process proceeds to step S703, and dust area interpolation is performed. If there is no such area (part), the process ends. The dust region interpolation processing executed in step S703 is performed by a known missing region interpolation method. Known defect area interpolation methods include, for example, pattern replacement disclosed in JP-A-2001-223894. In Japanese Patent Laid-Open No. 2001-223894, a defective region is specified using infrared light. In this embodiment, the dust region detected in step S701 is treated as a defective region, and the dust region is treated as a normal pixel by pattern replacement. Interpolate with. For pixels that are not filled by pattern replacement, p normal pixels are selected in the order closest to the interpolation target pixel from the image data after pattern interpolation, and interpolation is performed using the average color.
静止画のゴミ除去処理では、このように画像にゴミ補正データを添付することで、ゴミ補正用画像データと撮影画像データの対応を意識する必要が無くなるという利点がある。また、ゴミ補正データが位置、大きさ、変換用データ(絞り値、レンズの瞳位置の距離情報)で構成されるコンパクトなデータであるので、撮影画像データサイズが極端に大きくなることもない。また、ゴミ補正データで指定された画素を含む領域だけを補間処理することにより、誤検出の確率を大幅に低減することが可能になる。 Still image dust removal processing has the advantage that it is not necessary to be aware of the correspondence between dust correction image data and captured image data by attaching dust correction data to an image in this way. In addition, since the dust correction data is compact data composed of position, size, and conversion data (aperture value, distance information on the lens pupil position), the captured image data size does not become extremely large. Further, by performing interpolation processing only on the region including the pixel specified by the dust correction data, the probability of erroneous detection can be greatly reduced.
次に、近年デジタルカメラやデジタルビデオカメラ等で、動画像データの記録に用いられている動画ファイルフォーマットである、MP4について説明する。 Next, MP4, which is a moving image file format used in recent years for recording moving image data in digital cameras and digital video cameras, will be described.
MP4ファイル形式(ISO/IEC 14496−14;“Information technology――Coding of audio−visual objects――Part 14:MP4 file format”;ISO/IEC;2003−11−24を参照)とは、ISO/IEC JTC1/SC29/WG11(International Organization for Standardization/International Engineering Consortium)によって規格化された、MPEGなどの動画・音声のコンテンツデータをファイルに記録するために「ISO Base Media File Format」(ISO/IEC 14496−12;“Information technology――Coding of audio−visual objects――Part 12:ISO base media file format”;ISO/IEC;2004−01−23を参照)という汎用のファイル形式を元に拡張されたファイル形式である。なお、本発明はMP4に限らず類似のファイル形式を用いるケースに対しても適用できる。例えば、ISOではMP4と同様の基本構造を持つファイル形式規格として、「Motion JPEG 2000ファイル形式」(ISO/IEC 15444−3)や、「AVCファイル形式」(ISO/IEC 14496−15)といった標準規格が制定されている。 MP4 file format (ISO / IEC 14496-14; “Information technology—Coding of audio-visual objects—Part 14: MP4 file format”; ISO / IEC; see 2003-11-24) In order to record video / audio content data such as MPEG standardized by JTC1 / SC29 / WG11 (International Organization for Standardization / International Engineering Consortium) in a file, “ISO Base Media File 49 EC / F14” 12; “Inform tion technology - Coding of audio-visual objects - Part 12: ISO base media file format "; is a reference to 2004-01-23) file format, which has been extended on the basis of the file format of the general purpose of; ISO / IEC. Note that the present invention is not limited to MP4 and can be applied to cases using similar file formats. For example, ISO standard file formats such as “Motion JPEG 2000 file format” (ISO / IEC 15444-3) and “AVC file format” (ISO / IEC 14496-15) are standard file formats having the same basic structure as MP4. Has been enacted.
図10は、MP4ファイル形式におけるデータ構造を説明するための概念図である。 FIG. 10 is a conceptual diagram for explaining the data structure in the MP4 file format.
MP4ファイル1001は、映像・音声データの物理的位置、時間的位置や特性情報を示すメタデータ(ヘッダ情報)1002と、符号化された映像・音声データの実態を示すメディアデータ1003から構成される。MP4形式では、コンテンツ全体のプレゼンテーションを「ムービー」、コンテンツを構成するメディアストリームのプレゼンテーションを「トラック」と呼んでいるが、メタデータ1002には、典型的には、動画像のデータ全体を論理的に取り扱うビデオトラック1004と音声のデータ全体を論理的に取り扱うオーディオトラック1005が含まれており、ビデオトラック1004とオーディオトラック1005の基本的な構成内容は、ほとんど同等のものとなっている。すなわち、それぞれのトラックは、実際のメディアデータの様々なメタデータ情報を記録しており、その内容がメディアデータの特性に応じて多少異なっているだけである。
The
ビデオトラック1004に含まれるデータは、例えば、符号化データを復号化するための所謂デコーダの構成情報や動画像の矩形サイズなどの情報が含まれ、加えて、メディアデータが実際に記録されているファイル上の位置を示すオフセット1006や、メディアデータのそれぞれのフレームデータ(ピクチャと呼ばれることもある)のサイズを示すサンプルサイズ1007、それぞれのフレームデータのデコード時間を示すタイムスタンプ1008などが記録されている。
The data included in the
一方、メディアデータ1003には、符号化データの基本単位を示す「サンプル」が連続して1つ以上記録されている「チャンク」と呼ばれるデータ構造により、動画像のデータと音声のデータの実体が記録されている。このチャンクは、メタデータ1002のトラックに従って、動画像のメディアデータを含むビデオチャンク1009と音声のメディアデータを含むオーディオチャンク1010とにより構成されている。
On the other hand, the
図10に示す構成は、ビデオチャンク1009とオーディオチャンク1010が交互に記録されているように示しているが、その記録位置や順序は必ずしもこのようになっている必要はない。この例は、一般的に記録される形式の一例に過ぎない。しかしながら、このような交互の配置(インターリーブ)は、ほぼ同時刻に再生されるべき動画と音声のデータを近い位置に配置することにより、ファイルに記録されたデータのアクセス性を高めるといった効果があり、極めて一般的に見られる方法である。
The configuration shown in FIG. 10 shows that
チャンクには、個々のメディアデータのサンプルがひとつ以上含まれている。例えば、図10に示すように、ビデオチャンク1009には、ビデオサンプル(フレーム)1011が連続して記録される。一般的には、このビデオサンプル(フレーム)1011は、ビデオのひとつのフレームデータ(ピクチャ)に相当する。それぞれのトラックとチャンクは次のように関連付けられている。
A chunk contains one or more samples of individual media data. For example, as shown in FIG. 10, video samples (frames) 1011 are continuously recorded in the
例えば動画像のデータの場合、ビデオトラック1004に含まれる情報は、メディアデータ1003に含まれるそれぞれのビデオチャンク1009に関する情報を含んでいる。オフセット1006は、ビデオチャンク1009のそれぞれのファイル上の相対位置を示す情報のテーブルから構成されており、テーブルの個々のエントリを参照することにより、どの位置に実際のビデオチャンクが記録されていてもその位置を知ることができるようになっている。サンプルサイズ1007は、複数のチャンク内に含まれる複数のサンプル、すなわちビデオのフレームのそれぞれのサイズをテーブルとして記載している。より正確には、個々のチャンクの中に含まれるサンプルの数を記載した情報もビデオトラック1004の中に記載されており、これらの情報から、個々のビデオチャンク1009の中に含まれるサンプルを正確に取得することが可能となっている。タイムスタンプ1008は、個々のサンプルのデコード時間をサンプル間の差分としてテーブルに記録するようになっている。このテーブルを参照することにより、それぞれのサンプルの所謂タイムスタンプを積算時間を計算することにより取得することが可能となる。このような、トラックとチャンクの関係は、オーディオトラック1005とオーディオチャンク1010についても同様に成立するよう定義されている。これによって、MP4ファイルおよびISO Base Media File Formatにおいては、メタデータ1002とメディアデータ1003により、符号化データを必要な単位で任意の位置からタイムスタンプなどの付加情報を持って取得することが出来るようになっている。なお、説明を簡単にするために、ここには規格化されているすべての記録情報については記載していないことに注意しなければならない。規格化されている定義内容の詳細は、ISO/IEC 14496の該当部分を参照することで知ることができる。
For example, in the case of moving image data, the information included in the
MP4ファイル形式では、ファイルに記録されるデータは「BOX」と呼ばれるデータ構造の内部に記述され、BOXを単位としてファイルに記録される。BOXは、次のようなフィールドから構成される。 In the MP4 file format, data recorded in the file is described in a data structure called “BOX”, and is recorded in the file in units of BOX. The BOX is composed of the following fields.
Size:sizeフィールド自体を含む、BOX全体のサイズ。 Size: The size of the entire BOX, including the size field itself.
Type:BOXの種類を表す4バイトのタイプ識別子。通常は4文字の英数字で表される。 Type: 4-byte type identifier representing the type of BOX. Usually expressed in 4 alphanumeric characters.
その他のフィールドはBOXによってはオプションであるため、ここでは説明を省略する。 Since the other fields are optional depending on the BOX, the description is omitted here.
ファイル中に記録されるデータは、その種類によって異なるタイプのBOXに保持される。例えば、メディアデータ1003は符号化データを格納するMedia Data BOX(typeフィールドの内容は‘mdat’。以降の説明でBOXのタイプを示す識別子が用いられる場合は、そのタイプで示されるBOXを表現しているものとする)として、メタデータ1002はコンテンツ全体のメタデータ情報を格納するMovie BOX(‘moov’)として記録される。前述のチャンクおよびサンプルに関する情報についても、同様に固有の識別子をもつBOXとして、moovの内部にトラック毎に記録される。
Data recorded in the file is held in different types of BOX depending on the type. For example, the
また、MP4ファイル形式では、moovにすべてのメタデータを記録する形だけではなく、メタデータを時系列順に複数の領域に分割して記録するような形式も許可している。この形式は「フラグメントムービー」(Fragmented Movie)と呼ばれている。 In addition, the MP4 file format allows not only a form in which all metadata is recorded in moov but also a form in which metadata is divided and recorded in a plurality of areas in time series. This format is called “Fragmented Movie”.
図11に、フラグメントムービー形式のファイルの構造を示す。フラグメントムービー形式では、コンテンツのメディアデータおよびメタデータは任意の時間単位で分割することができ、分割された「フラグメント」はファイルの先頭から時系列順に記録される。例えば、図11では、moov1101は最初のフラグメントのメタデータを示しており、mdat1102に含まれるデータに関する情報を保持する。次に出現するmoof1103は2番目のフラグメントのメタデータであり、mdat1104の情報を保持する、というように以下同様にして記録される。なお、フラグメントムービー形式を取る場合、moov1101にフラグメントが存在することを示すMovie Extends Box(‘mvex’)1104を追加する必要がある。mvex1104に含まれる情報としては、全フラグメントを含むコンテンツ全体のduration(時間長)などである。このように、MP4ファイル形式のファイルでは、メディアデータに関する各種属性をメタデータ領域としてメディアデータと分離して保持することによって、メディアデータが物理的にどのように格納されているかに関わらず、所望のサンプルデータに容易にアクセスすることが可能になる。
FIG. 11 shows the structure of a fragment movie file. In the fragment movie format, the media data and metadata of content can be divided in arbitrary time units, and the divided “fragments” are recorded in chronological order from the beginning of the file. For example, in FIG. 11,
以降では、本実施形態における動画像および音声データの記録に用いる動画ファイルフォーマットをMP4形式の図11に示すようなフラグメントムービー形式とし、動画記録時の、前述のゴミ補正データとビデオサンプル(フレーム)1011とを関連付ける方法に関して説明する。 Hereinafter, the moving image file format used for recording moving images and audio data in the present embodiment is the fragment movie format shown in FIG. 11 of the MP4 format, and the dust correction data and video samples (frames) described above at the time of moving image recording A method of associating with 1011 will be described.
なお、前述の「Motion JPEG 2000ファイル形式」(ISO/IEC 15444−3)や、「AVCファイル形式」(ISO/IEC 14496−15)といった標準規格や、第三世代携帯電話を中心とする無線端末上での利用を前提に制約が課させられた動画ファイル規格である3GPPファイル形式(Thrird Generation Partnership Project)(3GPP TS 26.244 “Technical Specification Group Services and System Aspects Transparent end−to−end packet switched streaming service (PSS);3GPP file format (3GP)(Release 6)” 3rd Generation Partnership Project;2003−02−28を参照)など、MP4で規定されているものと類似のファイル形式およびアーキテクチャが採用されている規格に対しても、本発明は適用することが可能である。 Standards such as the aforementioned “Motion JPEG 2000 file format” (ISO / IEC 15444-3) and “AVC file format” (ISO / IEC 14496-15), and wireless terminals centering on third-generation mobile phones 3GPP file format (Through Generation Partnership Project) (3GPP TS 26.244 “Technical Special Group Transport Services and Systems Specified Spectral Specs Specimen Spect s Spec s Spec s s pe s s s s s s s t s e m s s e s s s s s s s s s s s s s s s s s s t s s s s s s s s s s t s e m e s s s s As s s s e s s s s s s s s s s t s s s s s s s s s s ed e s s t service (PSS); 3GPP file format (3G ) (Release 6) "3rd Generation Partnership Project (see 2003-02-28), etc., and the present invention is also applied to standards that employ a file format and architecture similar to those defined in MP4. Is possible.
次に、本実施形態における電子ズーム機能を有する撮像装置での、動画撮影時のファイル記録動作およびゴミ補正処理について説明する。 Next, a file recording operation and dust correction processing at the time of moving image shooting in the imaging apparatus having the electronic zoom function according to the present embodiment will be described.
図12は、本実施形態におけるライブビュー及び動画記録時に行われる電子ズーム処理(ズーム倍率2倍)の動作概要を示す図である。 FIG. 12 is a diagram showing an outline of the operation of electronic zoom processing (zoom magnification of 2) performed during live view and moving image recording in the present embodiment.
図12(a)で、121が撮像素子から読み出される画像信号に対応する撮影画面であり、その内部に含まれる斜線部分123がズーム対象領域である。本実施形態では、画像中央部(中心部分)を拡大することを想定している。従って、ズーム倍率に関係なく画像中心が固定されるため、画面全体に対するズーム対象領域(の座標)はズーム倍率のみで決定することができる。この斜線部分123の画像信号から補間信号を生成し、この補間信号を画像信号に内挿入することによって、図12(b)に示すような、撮影画面121と同じ大きさになるよう2倍に拡大した画像を生成する。以上により電子ズームを実現する。なお、122は撮影画面上に写りこんだゴミ領域を示しており、このゴミ領域122は通常の被写体と同様に電子ズームにより2倍に拡大される。電子ズームにより拡大されたゴミ領域を図12(b)に124で示す。
In FIG. 12A,
図13は、動画撮影時の動作を説明するためのフローチャートである。 FIG. 13 is a flowchart for explaining the operation at the time of moving image shooting.
まずステップS1401において、操作部70によりライブビュー開始が選択されたか否かを判定する。ライブビュー開始が選択されるまでステップS1401の判定を繰り返す。ライブビュー開始が選択されると、ミラー130がミラーアップされ、シャッター12が開かれ、撮像素子14に光学像が結像する。
First, in step S1401, it is determined whether or not live view start is selected by the
所定のフレームレートで撮像素子14から出力されるアナログ信号は、A/D変換器16でデジタル信号に変換され、画像処理回路20で所定の画素補間処理や色変換処理が施され、メモリ30内のフレームメモリバッファへ格納される。
An analog signal output from the image sensor 14 at a predetermined frame rate is converted into a digital signal by the A /
このとき、フレームレートに合わせて、カメラ本体100からレンズユニット300に対して各種光学情報(絞り、ズーム位置、瞳位置、焦点距離など)を要求する。レンズユニット300からコネクタ122を介して送られてきた各種光学情報はフレームメモリバッファの各画像データに対応づけられて、光学情報格納メモリ58に記憶される。
At this time, various optical information (aperture, zoom position, pupil position, focal length, etc.) is requested from the
フレームメモリバッファへ格納された画像データは、再度読み出され、画像処理回路20において表示用の画像データに変換されて画像表示メモリ24へ格納される。画像表示メモリ24に書き込まれた表示用の画像データはD/A変換器26を介して画像表示部28により表示される。これにより、画像表示部28は、ライブビュー表示の状態(電子ビューファインダ動作)となる。
The image data stored in the frame memory buffer is read again, converted into image data for display in the
ステップS1402では、操作部70により動画記録開始が選択されたか否かを判断する。選択されていなければステップS1401に戻って上記処理を繰り返す。一方、動画記録開始が選択されていれば、ステップS1403へ進み、動画記録を開始する。
In step S1402, it is determined whether or not the moving image recording start is selected by the
また、動画記録が開始されると、音声信号処理回路ではマイク(不図示)から入力された音声データを符号化し、符号化された音声データは、メモリ30内の音声符号化データバッファへ一時保存される。一時保存された動画符号化データと、音声符号化データは時間経過とともに増加するので、所定のファイルフォーマットに成形され、随時インターフェース90を介して記録媒体200へ書き込まれる。
When moving image recording starts, the audio signal processing circuit encodes audio data input from a microphone (not shown), and the encoded audio data is temporarily stored in an audio encoded data buffer in the
ステップS1404では、操作部70により動画記録停止が選択されたか否かを判断する。動画記録停止が選択されなければ、ステップS1403に戻り、動画記録を継続する。また、動画記録停止が選択されれば、ステップS1405に進み、ライブビュー動作の停止が選択されたか否かを判断する。ライブビュー動作の停止が選択されなければ、ステップS1402に戻り、次の動画記録に備えて待機する。ライブビュー動作の停止が選択されれば、動画撮影のルーチンを終了する。
In step S1404, it is determined whether stop of moving image recording has been selected by the
次に、動画ファイルの生成についての説明を行う。 Next, generation of a moving image file will be described.
動画撮影モード時に操作部70の動画記録ボタンがONされたことで、動画撮影が開始されると、まず新規ファイルを生成し、最初のフラグメントのメタデータのBOXであるmoovおよびメディアデータのBOXであるmdatを作成する。
When moving image shooting is started by turning on the moving image recording button of the
次に、ゴミ位置補正データを作成する。ゴミ位置補正データには、動画像撮影に使われるレンズのレンズ情報である絞り値、レンズの瞳位置情報、および図5に示したゴミ補正データが格納されている。なお、作成されたゴミ位置補正データは、メモリ52に格納される。メモリ52に格納されたゴミ位置補正データを読み込み、現在のフラグメントのメタデータmoov内に書きこむ(異物情報記録)。
Next, dust position correction data is created. In the dust position correction data, an aperture value, which is lens information of a lens used for moving image shooting, lens pupil position information, and dust correction data shown in FIG. 5 are stored. The created dust position correction data is stored in the
(動画記録ルーチン)
図14は、本実施形態における動画撮影時の1フレーム毎に行われる記録処理を示すフローチャートである。当該処理はシステム制御回路50がメモリ52に記憶された動画撮像処理プログラムを実行することにより実施される。
(Movie recording routine)
FIG. 14 is a flowchart showing a recording process performed for each frame at the time of moving image shooting in the present embodiment. This process is performed by the
まず、ステップS1501で画像の符号化処理を行い、画像データを小さいデータ量に圧縮する。 First, in step S1501, an image encoding process is performed, and the image data is compressed to a small data amount.
次にステップS1502で、符号化処理の結果、圧縮された画像データをファイルへ記録する(動画像ファイルの記録)。 In step S1502, as a result of the encoding process, compressed image data is recorded in a file (moving image file recording).
次に、ステップS1503に進み、システム制御回路50から電子ズームにおけるズーム倍率を取得し、ファイルへ記録する(ズーム倍率記録)。なお、電子ズームが動作していない場合はズーム倍率として1倍を記録する。ファイルへの記録は、現在のフラグメントのメタデータmoof内に記録する。
In step S1503, the zoom magnification in the electronic zoom is acquired from the
また、1つのフラグメントには複数のフレームの動画像データが記録されるので、1つのフラグメントのメタデータmoof内に複数の切り出し位置情報が追加される形式で書き込まれていくことになる。そのため、切り出し位置情報とフレームを対応付けるための情報も同時に書き込む。 In addition, since moving image data of a plurality of frames is recorded in one fragment, it is written in a format in which a plurality of pieces of cutout position information are added in the metadata moof of one fragment. Therefore, the information for associating the cut-out position information with the frame is simultaneously written.
ステップS1501〜S1503の一連の処理は1フレーム分の画像記録を行う処理であるので、動画記録中は、一連の処理を繰り返し行う。 Since a series of processes in steps S1501 to S1503 is a process of recording an image for one frame, the series of processes is repeatedly performed during moving image recording.
(ゴミ除去処理ルーチン)
続いて、電子ズームによって撮影された動画像データからゴミの影響を取り除く処理について説明する。
(Dust removal processing routine)
Next, processing for removing the influence of dust from moving image data shot by electronic zoom will be described.
このゴミ除去処理は、画像データに関連付けて記録媒体200に記録されたゴミ補正データ(ゴミ情報)を用いてフレーム単位で行われること以外は、静止画の場合と同様に行われる。ゴミ補正データは、動画ファイルのmoovに格納されている。本実施形態では電子ズームが動作していない状態でゴミ補正データの取得を行っているため、ゴミ補正データに含まれる各ゴミ領域の位置情報及びサイズは撮像素子全体の画角が基準となる。そのため、電子ズームが動作している場合は、各ズーム倍率でそれぞれ画角が異なってしまうため、フレームごとにそれぞれ適応するゴミ情報に変換する必要がある。
This dust removal process is performed in the same manner as in the case of a still image except that it is performed in units of frames using dust correction data (dust information) recorded on the
図15は、本実施形態におけるゴミ除去処理の流れを示すフローチャートである。 FIG. 15 is a flowchart showing the flow of dust removal processing in the present embodiment.
ゴミ除去処理は、カメラ内で行ってもよいし、別途用意された画像処理装置を利用して行ってもよい。 The dust removal process may be performed in the camera or may be performed using an image processing apparatus prepared separately.
本実施形態では、まずステップS1601で、動画ファイルからフレーム毎に記録されているズーム倍率を取得する。次にステップS1602で、ゴミ除去処理を行う動画ファイルが、電子ズームが動作している状態で撮影された画像であるか否かの判断を行う。ステップS1601で取得したズーム倍率が1倍ならば電子ズームは動作していないとみなし、ステップS1606に進む。ズーム倍率が1倍より大きければ電子ズームが動作しているのでステップS1603に進み、ゴミ位置座標の変換を行う。 In this embodiment, first, in step S1601, the zoom magnification recorded for each frame is acquired from the moving image file. Next, in step S1602, it is determined whether or not the moving image file to be subjected to dust removal processing is an image shot in a state where the electronic zoom is operating. If the zoom magnification acquired in step S1601 is 1, the electronic zoom is regarded as not operating, and the process proceeds to step S1606. If the zoom magnification is greater than 1, the electronic zoom is in operation, and the process advances to step S1603 to convert dust position coordinates.
ゴミ位置座標の変換方法について図21を用いて説明する。 A dust position coordinate conversion method will be described with reference to FIG.
まず画像座標系について説明する。図21に示すように、本実施形態における画像座標系は、撮影画面211の左上を原点とし、x軸の正方向を垂直下方向(縦方向)、y軸の正方向を水平右方向(横方向)とする。同様に、ゴミ補正データに含まれるゴミ領域の位置情報も同一の画像座標系を採用するものとする。
First, the image coordinate system will be described. As shown in FIG. 21, the image coordinate system in the present embodiment has the upper left of the photographing
次にゴミ位置座標の変換方法について説明する。図21(a)のズーム対象領域212に含まれる拡大前のゴミ位置座標を(x,y)、ズーム対象領域212の左上の座標を(x0,y0)とすると、図21(b)の拡大後の座標(x’,y’)は、ズーム倍率Mを用いて次式で求められる。
Next, a method for converting dust position coordinates will be described. If the dust position coordinates before enlargement included in the
(x’,y’)=(M×(x−x0),M×(y−y0))
図21から明らかなようにズーム対象領域212の左上の座標(x0,y0)が、拡大後の原点に変換される。
(X ′, y ′) = (M × (x−x0), M × (y−y0))
As is apparent from FIG. 21, the upper left coordinate (x0, y0) of the
図15のフローチャートの説明に戻ると、次のステップS1604ではゴミサイズを変換する。拡大前のゴミサイズRとズーム倍率Mから拡大後のゴミサイズR’は次式で求められる。 Returning to the description of the flowchart of FIG. 15, in the next step S1604, the dust size is converted. From the dust size R before enlargement and the zoom magnification M, the dust size R ′ after enlargement is obtained by the following equation.
R’=M×R
続いてステップS1605ではステップS1603で変換した拡大後の座標が、図21(a)の撮影画面211の内部に存在するか否かを判定し、内部に存在しなければ拡大後の画像にはゴミ領域は存在しないと判断し、本フローチャートを終了する。ステップS1605で内部に存在すると判定された場合は、変換後のゴミ位置座標及びゴミサイズを用いてステップS1606でゴミ補正処理を行う。ここで行うゴミ補正処理とは、図9に示した一連の処理である。ステップS1602で電子ズームが動作していない状態で撮影された画像であると判断された場合は、ファイルに保存されているゴミ位置座標とゴミサイズを用いてステップS1606でゴミ補正処理を行う。
R ′ = M × R
Subsequently, in step S1605, it is determined whether or not the enlarged coordinates converted in step S1603 are present inside the
このように本実施形態では、動画撮影時にフレーム毎に電子ズームのズーム倍率をファイルへ記録していく。また、ゴミ除去処理を実施する際には、フレーム毎に記録されたズーム倍率を用いてゴミ位置情報及びゴミサイズを変換してからゴミ除去処理を行う。 As described above, in this embodiment, the zoom magnification of the electronic zoom is recorded in a file for each frame during moving image shooting. Further, when performing the dust removal process, the dust removal process is performed after converting the dust position information and the dust size using the zoom magnification recorded for each frame.
これにより、動画記録時に電子ズームを動作させた動画像に対しても、ゴミ除去処理を行うことが可能となる。 This makes it possible to perform dust removal processing on a moving image that has been operated with the electronic zoom during moving image recording.
(第2の実施形態)
次に、本発明の第2の実施形態について説明する。第2の実施形態の撮像装置の要部構成は第1の実施形態と基本的には同じであるため、同じ構成部分の説明は省略し、異なる構成部分だけを掻い摘んで説明する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. Since the main configuration of the imaging apparatus of the second embodiment is basically the same as that of the first embodiment, description of the same components is omitted, and only different components are scratched and described.
図22は第2の実施形態に係る撮像装置において、ズーム対象領域が画像中央部以外である場合の電子ズーム(ズーム倍率2倍)の動作概要を示す図である。本実施形態ではズーム対象領域を画像中央部のみに限定せず、図22(a)の撮影画面221内部の任意の領域を選択できることを想定している。従って、ズーム対象領域を決定するためにはズーム倍率と少なくともズーム対象領域の頂点の1点(例えば左上)の座標が必要となる。
FIG. 22 is a diagram illustrating an outline of the operation of electronic zoom (double zoom magnification) when the zoom target area is other than the center of the image in the imaging apparatus according to the second embodiment. In the present embodiment, it is assumed that the zoom target area is not limited to the center of the image, and an arbitrary area within the
(動画記録ルーチン)
図23は、本実施形態における動画撮影時の1フレーム毎に行われる記録処理を示すフローチャートである。当該処理はシステム制御回路50がメモリ52に記憶された動画撮像処理プログラムを実行することにより実施される。
(Movie recording routine)
FIG. 23 is a flowchart showing a recording process performed for each frame at the time of moving image shooting in the present embodiment. This process is performed by the
まず、ステップS2301で画像の符号化処理を行い、画像データを小さいデータ量に圧縮する。 First, in step S2301, an image encoding process is performed, and the image data is compressed to a small data amount.
次にステップS2302で、符号化処理の結果、圧縮された画像データをファイルへ記録する。 In step S2302, the compressed image data is recorded in the file as a result of the encoding process.
次に、ステップS2303に進み、システム制御回路50から電子ズームにおけるズーム倍率を取得し、ファイルへ記録する。なお、電子ズームが動作していない場合はズーム倍率として1倍を記録する。次にステップS2304に進み、システム制御回路50から画像切り出し位置を取得して記録する(切り出し位置記録)。本実施形態では図22(a)のズーム対象領域222の左上の座標をファイルへ記録する。
In step S2303, the zoom magnification in the electronic zoom is acquired from the
(ゴミ除去処理ルーチン)
続いて、電子ズームによって撮影された動画像データからゴミの影響を取り除く処理について説明する。
(Dust removal processing routine)
Next, processing for removing the influence of dust from moving image data shot by electronic zoom will be described.
図24は、本実施形態におけるゴミ除去処理の流れを示すフローチャートである。 FIG. 24 is a flowchart showing the flow of dust removal processing in the present embodiment.
本実施形態では、まずステップS2401で、動画ファイルからフレーム毎に記録されているズーム倍率を取得する。次にステップS2402で、ゴミ除去処理を行う動画ファイルが、電子ズームが動作している状態で撮影された画像であるか否かの判断を行う。ステップS2401で取得したズーム倍率が1倍ならば電子ズームは動作していないとみなし、ステップS2407に進む。ズーム倍率が1倍より大きければ電子ズームが動作していると判断し、ステップS2403に進む。次にステップS2403では動画ファイルから画像切り出し位置を取得する。本実施形態ではズーム対象領域の左上の座標を取得する。次にステップS2404ではゴミ位置座標の変換を行う。ゴミ位置座標の変換方法については、ズーム対象領域の左上の座標を(x0,y0)としてステップS2403で動画ファイルから取得した値を用いること以外は第1の実施形態と同様である。また、ステップS2405以降の処理についても第1の実施形態のステップS1604以降と同様な処理なので説明は省略する。 In this embodiment, first, in step S2401, the zoom magnification recorded for each frame is acquired from the moving image file. Next, in step S2402, it is determined whether or not the moving image file to be subjected to dust removal processing is an image shot in a state where the electronic zoom is operating. If the zoom magnification acquired in step S2401 is 1, the electronic zoom is regarded as not operating, and the process proceeds to step S2407. If the zoom magnification is larger than 1, it is determined that the electronic zoom is operating, and the process proceeds to step S2403. In step S2403, an image cutout position is acquired from the moving image file. In this embodiment, the upper left coordinate of the zoom target area is acquired. In step S2404, dust position coordinates are converted. The dust position coordinate conversion method is the same as that in the first embodiment except that the upper left coordinate of the zoom target area is (x0, y0) and the value acquired from the moving image file in step S2403 is used. Also, the processing after step S2405 is the same as the processing after step S1604 of the first embodiment, and the description thereof will be omitted.
このように本実施形態では、動画撮影時にフレーム毎に電子ズームのズーム倍率と画像切り出し位置をファイルへ記録していく。また、ゴミ除去処理を実施する際には、フレーム毎に記録されたズーム倍率と画像切り出し位置を用いてゴミ位置情報及びゴミサイズを変換してからゴミ除去処理を行う。 As described above, in this embodiment, the zoom magnification and image cutout position of the electronic zoom are recorded in a file for each frame during moving image shooting. Further, when performing the dust removal process, the dust removal process is performed after converting the dust position information and the dust size using the zoom magnification and the image cutout position recorded for each frame.
これにより、動画記録時に任意の領域を対象とした電子ズームを動作させた動画像に対しても、ゴミ除去処理を行うことが可能となる。 This makes it possible to perform dust removal processing on a moving image that has been operated with an electronic zoom for an arbitrary area during moving image recording.
(他の実施形態)
また、各実施形態の目的は、次のような方法によっても達成される。すなわち、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給する。そして、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行する。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、本発明には次のような場合も含まれる。すなわち、プログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される。
(Other embodiments)
The object of each embodiment is also achieved by the following method. That is, a storage medium (or recording medium) in which a program code of software that realizes the functions of the above-described embodiments is recorded is supplied to the system or apparatus. Then, the computer (or CPU or MPU) of the system or apparatus reads and executes the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but the present invention includes the following cases. That is, an operating system (OS) running on a computer performs part or all of actual processing based on an instruction of a program code, and the functions of the above-described embodiments are realized by the processing.
さらに、次のような場合も本発明に含まれる。すなわち、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれる。その後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される。 Furthermore, the following cases are also included in the present invention. That is, the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer. Thereafter, based on the instruction of the program code, the CPU or the like provided in the function expansion card or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.
本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明した手順に対応するプログラムコードが格納されることになる。 When the present invention is applied to the above storage medium, the storage medium stores program codes corresponding to the procedure described above.
12 シャッター
14 撮像素子
16 A/D変換器
18 タイミング発生回路
20 画像処理回路
22 メモリ制御回路
24 画像表示メモリ
26 D/A変換器
28 画像表示部
30 メモリ
31 ゴミ除去回路
32 画像圧縮・伸長回路
33 音声信号処理回路
40 シャッター制御部
42 焦点調節部
46 測光制御部
48 フラッシュ
50 システム制御回路
52 メモリ
54 通知部
56 不揮発性メモリ
58 光学情報格納メモリ
60 モードダイアルスイッチ
62 シャッタースイッチSW1
64 シャッタースイッチSW2
66 再生スイッチ
68 単写/連写スイッチ
70 操作部
72 電源スイッチ
80 電源制御部
82 コネクタ
84 コネクタ
86 電源
90 インタフェース
92 コネクタ
94 インタフェース
96 コネクタ
98 記録媒体着脱検知回路
100 カメラ本体
104 光学ファインダ
106 レンズマウント
110 アクセサリーシュー
112 外部フラッシュ
120 インタフェース
122 コネクタ
130 ミラー
132 ミラー
200 記録媒体
202 記録部
204 インタフェース
206 コネクタ
210 PC
212 記録部
214 インタフェース
216 コネクタ
300 レンズユニット
306 レンズマウント
310 撮影レンズ
312 絞り
320 インタフェース
322 コネクタ
340 絞り制御部
342 フォーカス制御部
344 ズーム制御部
350 レンズシステム制御回路
DESCRIPTION OF
64 Shutter switch SW2
66
212 Recording Unit 214
Claims (10)
前記画像信号の一部を切り出して拡大する電子ズーム処理を行う電子ズーム処理手段と、
前記撮像素子の前方に配置された光学素子の表面に付着した異物の像を含む異物検出用画像から、少なくとも異物の位置及び大きさの情報を含む情報である異物情報を検出する異物検出手段と、
前記異物情報を画像ファイルに記録する異物情報記録手段と、
前記電子ズーム処理手段における電子ズームのズーム倍率を前記画像ファイルに記録するズーム倍率記録手段と、
前記異物情報と、前記電子ズームのズーム倍率とを用いて、前記異物の位置及び大きさを前記電子ズーム処理後の画像における異物の位置及び大きさに変換し、前記電子ズーム処理後の画像における異物の像を画像処理により除去する異物除去手段と、
を備えることを特徴とする撮像装置。 An image pickup unit that includes an image pickup device that photoelectrically converts a subject image, and that generates an image signal based on an output signal from the image pickup device;
Electronic zoom processing means for performing electronic zoom processing for cutting out and enlarging a part of the image signal;
Foreign matter detection means for detecting foreign matter information, which is information containing at least information on the position and size of the foreign matter, from a foreign matter detection image containing a foreign matter image attached to the surface of the optical element disposed in front of the image sensor; ,
Foreign matter information recording means for recording the foreign matter information in an image file;
Zoom magnification recording means for recording the zoom magnification of the electronic zoom in the electronic zoom processing means in the image file;
Using the foreign matter information and the zoom magnification of the electronic zoom, the position and size of the foreign matter are converted into the position and size of the foreign matter in the image after the electronic zoom processing, and the image in the image after the electronic zoom processing is used. Foreign matter removing means for removing the image of the foreign matter by image processing;
An imaging apparatus comprising:
前記画像信号の一部を切り出して拡大する電子ズーム処理を行う電子ズーム処理工程と、
前記撮像素子の前方に配置された光学素子の表面に付着した異物の像を含む異物検出用画像から、少なくとも異物の位置及び大きさの情報を含む情報である異物情報を検出する異物検出工程と、
前記異物情報を動画像ファイルに記録する異物情報記録工程と、
前記電子ズーム処理工程における電子ズームのズーム倍率を前記動画像ファイルに記録するズーム倍率記録工程と、
前記異物情報と、前記電子ズームのズーム倍率とを用いて、前記異物の位置及び大きさを前記電子ズーム処理後の画像における異物の位置及び大きさに変換し、前記電子ズーム処理後の画像における異物の像を画像処理により除去する異物除去工程と、
を備えることを特徴とする撮像装置の制御方法。 A method for controlling an imaging device including an imaging device that photoelectrically converts a subject image and having an imaging means that generates an image signal based on an output signal from the imaging device,
An electronic zoom processing step of performing an electronic zoom process of cutting out and enlarging a part of the image signal;
A foreign matter detection step of detecting foreign matter information, which is information including at least the position and size information of the foreign matter, from a foreign matter detection image containing a foreign matter image attached to the surface of the optical element disposed in front of the imaging device; ,
A foreign matter information recording step for recording the foreign matter information in a moving image file;
A zoom magnification recording step of recording the zoom magnification of the electronic zoom in the electronic zoom processing step in the moving image file;
Using the foreign matter information and the zoom magnification of the electronic zoom, the position and size of the foreign matter are converted into the position and size of the foreign matter in the image after the electronic zoom processing, and the image in the image after the electronic zoom processing is used. A foreign matter removing step of removing an image of the foreign matter by image processing;
An image pickup apparatus control method comprising:
前記異物情報と、前記電子ズームのズーム倍率とを用いて、前記異物の位置及び大きさを前記電子ズーム処理後の画像における異物の位置及び大きさに変換し、変換した異物の位置及び大きさに基づいて、前記電子ズーム処理後の画像における異物の像を画像処理により除去する異物除去手段を備えることを特徴とする画像処理装置。 Processes an image file in which foreign object information, which includes information on the position and size of a foreign object attached to the surface of an optical element arranged in front of the image sensor at the time of shooting, and the zoom magnification of the electronic zoom at the time of shooting is recorded An image processing apparatus,
Using the foreign object information and the zoom magnification of the electronic zoom, the position and size of the foreign object are converted into the position and size of the foreign object in the image after the electronic zoom process , and the converted position and size of the foreign object are converted. An image processing apparatus comprising: a foreign matter removing unit that removes a foreign matter image in the image after the electronic zoom processing based on the image processing.
前記異物情報と、前記電子ズームのズーム倍率とを用いて、前記異物の位置及び大きさを前記電子ズーム処理後の画像における異物の位置及び大きさに変換し、変換した異物の位置及び大きさに基づいて、前記電子ズーム処理後の画像における異物の像を画像処理により除去する異物除去工程を備えることを特徴とする画像処理方法。 Processes an image file in which foreign object information, which includes information on the position and size of a foreign object attached to the surface of an optical element arranged in front of the image sensor at the time of shooting, and the zoom magnification of the electronic zoom at the time of shooting is recorded An image processing method comprising:
Using the foreign object information and the zoom magnification of the electronic zoom, the position and size of the foreign object are converted into the position and size of the foreign object in the image after the electronic zoom process , and the converted position and size of the foreign object are converted. And a foreign matter removing step of removing the foreign matter image in the image after the electronic zoom processing based on the image processing.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008272350A JP5247346B2 (en) | 2008-10-22 | 2008-10-22 | Imaging apparatus, control method and program thereof, image processing apparatus, and image processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008272350A JP5247346B2 (en) | 2008-10-22 | 2008-10-22 | Imaging apparatus, control method and program thereof, image processing apparatus, and image processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2010103706A JP2010103706A (en) | 2010-05-06 |
| JP5247346B2 true JP5247346B2 (en) | 2013-07-24 |
Family
ID=42293951
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008272350A Expired - Fee Related JP5247346B2 (en) | 2008-10-22 | 2008-10-22 | Imaging apparatus, control method and program thereof, image processing apparatus, and image processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5247346B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2020005142A (en) | 2018-06-28 | 2020-01-09 | キヤノン株式会社 | Imaging apparatus and method of controlling the same, program, and storage medium |
| JP2020043398A (en) | 2018-09-06 | 2020-03-19 | キヤノン株式会社 | Imaging device and control method therefor, program, storage medium |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005278003A (en) * | 2004-03-26 | 2005-10-06 | Fuji Photo Film Co Ltd | Image processing apparatus |
| JP4682104B2 (en) * | 2006-07-28 | 2011-05-11 | キヤノン株式会社 | Imaging device |
-
2008
- 2008-10-22 JP JP2008272350A patent/JP5247346B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2010103706A (en) | 2010-05-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5106335B2 (en) | Imaging apparatus, control method thereof, and program | |
| JP5210091B2 (en) | Image processing apparatus, control method therefor, imaging apparatus, and program | |
| JP5014195B2 (en) | Imaging apparatus, control method thereof, and program | |
| JP5047080B2 (en) | Image processing apparatus, control method therefor, and program | |
| JP5203869B2 (en) | Image processing apparatus, control method therefor, and program | |
| JP5014262B2 (en) | Imaging apparatus, control method thereof, and program | |
| JP5086879B2 (en) | Image processing apparatus, control method therefor, and program | |
| JP5111315B2 (en) | Image processing apparatus, image processing method, and program | |
| JP5094665B2 (en) | Imaging apparatus, control method thereof, and program | |
| JP5247346B2 (en) | Imaging apparatus, control method and program thereof, image processing apparatus, and image processing method | |
| JP5241348B2 (en) | Imaging apparatus, control method thereof, and program | |
| JP2020043398A (en) | Imaging device and control method therefor, program, storage medium | |
| JP2020005142A (en) | Imaging apparatus and method of controlling the same, program, and storage medium | |
| JP2009296361A (en) | Image processing apparatus, control method thereof, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20111017 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20121115 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121119 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130110 |
|
| 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: 20130311 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130409 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 5247346 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160419 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees |