JP2008244868A - Imaging apparatus, and control method, program and storage medium thereof - Google Patents

Imaging apparatus, and control method, program and storage medium thereof Download PDF

Info

Publication number
JP2008244868A
JP2008244868A JP2007082744A JP2007082744A JP2008244868A JP 2008244868 A JP2008244868 A JP 2008244868A JP 2007082744 A JP2007082744 A JP 2007082744A JP 2007082744 A JP2007082744 A JP 2007082744A JP 2008244868 A JP2008244868 A JP 2008244868A
Authority
JP
Japan
Prior art keywords
dust
image
foreign matter
information
stored
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.)
Pending
Application number
JP2007082744A
Other languages
Japanese (ja)
Other versions
JP2008244868A5 (en
Inventor
Makoto Oikawa
真 追川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2007082744A priority Critical patent/JP2008244868A/en
Publication of JP2008244868A publication Critical patent/JP2008244868A/en
Publication of JP2008244868A5 publication Critical patent/JP2008244868A5/ja
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Camera Bodies And Camera Details Or Accessories (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To suppress the precision of dust removal correction for image data from being degraded even in the case where the situation of dust deposition changes after dust correction data are acquired. <P>SOLUTION: The imaging apparatus comprises: an image pickup element in which a plurality of pixels each for performing optic/electric conversion on a subject image are arrayed in a two-dimensional manner; a foreign material detection section for detecting information about the position of a foreign material deposited on an optical member disposed on a photographing optical axis in front of the image pickup element; a change detection section for detecting a change in the situation of the foreign material deposited on the optical member based on a picked-up image obtained by performing optic/electric conversion on the subject image by means of the image pickup element and the information about the position of the foreign material being stored in the storage section; and an updating section for updating the information about the position of the foreign material being stored in the storage section based on the information about the change in the deposition situation of the foreign material detected by the change detection section. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、撮像装置において、撮像光路中のゴミ等の異物が画像に与える影響を軽減する技術に関するものである。   The present invention relates to a technique for reducing the influence of foreign matter such as dust in an imaging optical path on an image in an imaging apparatus.

画像信号を電気信号に変換して撮像するデジタルカメラ等の撮像装置では、撮影光束を撮像素子で受光し、その撮像素子から出力される光電変換信号を画像データに変換して、メモリカード等の記録媒体に記録する。撮像素子としては、CCD(Charge Coupled Device)やC−MOS(Complementary Metal Oxide Semiconductor)等が知られている。   In an imaging device such as a digital camera that captures an image by converting an image signal into an electrical signal, the imaging light beam is received by the imaging device, a photoelectric conversion signal output from the imaging device is converted into image data, and a memory card, etc. Record on a recording medium. As an image sensor, a CCD (Charge Coupled Device), a C-MOS (Complementary Metal Oxide Semiconductor), and the like are known.

このような撮像装置では、撮像素子の被写体側に、光学ローパスフィルタや赤外線カットフィルタが配置されている。そして、撮像素子のカバーガラスやこれらのフィルタの表面にゴミ等の異物が付着すると、その付着部分が黒い点となって撮影画像に写り込み、撮影画像の品質を低下させることが知られている。   In such an imaging apparatus, an optical low-pass filter and an infrared cut filter are disposed on the subject side of the imaging element. It is known that if foreign matter such as dust adheres to the cover glass of the image sensor or the surface of these filters, the adhering portion becomes a black dot and appears in the photographed image, thereby reducing the quality of the photographed image. .

特にレンズ交換可能な一眼レフデジタルカメラでは、シャッタやクイックリターンミラーといった機械的な作動部が、撮像素子の近傍に配置されており、それらの作動部から発生したゴミ等の異物が、撮像素子やローパスフィルタに付着することがある。また、レンズ交換時に、レンズマウントの開口から塵埃等がカメラ本体内に入り込み、これが付着することもある。   In particular, in a single-lens reflex digital camera with interchangeable lenses, mechanical operation parts such as shutters and quick return mirrors are arranged in the vicinity of the image sensor, and foreign matters such as dust generated from these operation parts are captured by the image sensor and May adhere to the low-pass filter. Further, when the lens is exchanged, dust or the like may enter the camera body from the opening of the lens mount and adhere to it.

ところで、従来、コピー機の分野では、常に変化する可能性のあるゴミ対策として、原稿読み取り前に均一な反射面を有する均一輝度パターンを取り込んでゴミ検出する技術が、特許文献1や特許文献2に開示されている。   Conventionally, in the field of copiers, as a countermeasure against dust that may change constantly, a technique for detecting dust by capturing a uniform luminance pattern having a uniform reflection surface before reading a document is disclosed in Patent Document 1 and Patent Document 2. Is disclosed.

また、特許文献3では、均一輝度の被写体を撮影して得られた基準画像から、画像全体の透過率マップを作成し、この透過率マップに基づいて撮影画像の補正を行い、ゴミの影などを除去する電子カメラが開示されている。   In Patent Document 3, a transmittance map of the entire image is created from a reference image obtained by photographing a subject with uniform brightness, and the captured image is corrected based on the transmittance map, and shadows of dust, etc. An electronic camera that removes light is disclosed.

特許文献1や特許文献2に開示されている技術では、コピー機やスキャナーにおける本スキャンの前あるいは本スキャンと同時にゴミ補正データを取得して、ゴミ補正処理を行なう。コピー機やスキャナーでは、固定距離にある原稿やフィルム面に対して一様な照明手段を有しており、更に完全に均一な反射面を備えたり、新たに赤外線照明手段を設けたりすることによって透過率データを比較的容易に得ることができる。しかしながら、電子カメラの場合、製造時の検査以外ではそのように完全に一様な条件で透過率データを得ることは困難である。   In the techniques disclosed in Patent Literature 1 and Patent Literature 2, dust correction data is acquired before the main scan or simultaneously with the main scan in a copier or scanner, and dust correction processing is performed. Copiers and scanners have a uniform illumination means for a document or film surface at a fixed distance, and have a completely uniform reflective surface or a new infrared illumination means. Transmittance data can be obtained relatively easily. However, in the case of an electronic camera, it is difficult to obtain transmittance data under such completely uniform conditions except for inspection at the time of manufacture.

また、電子カメラでは、撮影前や撮影後にゴミ補正データを取得するシーケンスにした場合、レリーズタイムラグが大きくなったり、連写駒速が低下するなどの不都合を招くおそれがある。
特開平10−294870号公報 特開平11−27475号公報 特開2004−222231号公報 特開2006−203776号公報
Further, in the electronic camera, when the dust correction data is acquired before shooting or after shooting, there is a possibility that the release time lag increases or the continuous shooting frame speed decreases.
Japanese Patent Laid-Open No. 10-294870 Japanese Patent Laid-Open No. 11-27475 JP 2004-222231 A JP 2006-203776 A

ここで、上記のようなレリーズタイムラグが大きくなったり、連写駒速が低下するなどの不都合を防ぐ方法としては、ゴミ補正データの取得を毎回の撮影毎ではなく、ある程度の時間間隔毎あるいはある撮影回数毎に行うような方法が考えられる。   Here, as a method for preventing the inconvenience such as an increase in the release time lag and a decrease in the continuous shooting frame speed as described above, the dust correction data is acquired every certain time interval or not every shooting. A method of performing every number of times of photographing can be considered.

しかしながら、この方法では、ゴミ補正データを取得してから次にゴミ補正データを取得するまでの間にゴミの付着状況が変化した場合には、ゴミ情報の信頼度が落ちてしまうという問題がある。即ち、ゴミ補正データを取得した後にゴミがなくなることも考えられ、ゴミがなくなった箇所に対しても、不要なゴミ除去処理を施してしまい、画質が劣化してしまうおそれがある。   However, this method has a problem that the reliability of the dust information is lowered when the dust adhesion state changes between the acquisition of dust correction data and the next acquisition of dust correction data. . In other words, it is conceivable that the dust disappears after the dust correction data is acquired, and unnecessary dust removal processing is performed even on the portion where the dust is removed, which may deteriorate the image quality.

さらに、特開2006−203776号公報(特許文献4)に開示されているような、光学面に付着したゴミを除去する機能を有する撮像装置では、ゴミ補正データの取得後にゴミ除去動作を実行させると、ゴミがなくなる可能性はさらに増える。   Furthermore, in an imaging apparatus having a function of removing dust attached to an optical surface as disclosed in Japanese Patent Application Laid-Open No. 2006-203776 (Patent Document 4), a dust removal operation is executed after obtaining dust correction data. And the possibility of running out of trash further increases.

従って、本発明は上述した課題に鑑みてなされたものであり、その目的は、ゴミ補正データ取得後にゴミの付着状況が変化した場合でも、画像データに対するゴミ除去補正の精度の低下を抑制できるようにすることである。   Accordingly, the present invention has been made in view of the above-described problems, and an object of the present invention is to suppress a decrease in accuracy of dust removal correction for image data even when the dust adhesion state changes after dust correction data acquisition. Is to do.

上述した課題を解決し、目的を達成するために、本発明に係わる撮像装置は、被写体像を光電変換する複数の画素が2次元的に配列された撮像素子と、前記撮像素子の前方の撮影光軸上に配設された光学部材に付着した異物の位置に関する情報を検出する異物検出手段と、前記異物検出手段で検出された少なくとも前記異物の位置に関する情報を記憶する記憶手段と、前記撮像素子により前記被写体像を光電変換して得られた撮像画像と前記記憶手段に記憶されている異物の位置に関する情報とに基づいて、前記異物の前記光学部材への付着状態の変化を検出する変化検出手段と、前記変化検出手段により検出された前記異物の付着状態の変化の情報に基づいて、前記記憶手段に記憶されている前記異物の位置に関する情報を更新する更新手段と、を具備することを特徴とする。   In order to solve the above-described problems and achieve the object, an imaging apparatus according to the present invention includes an imaging element in which a plurality of pixels that photoelectrically convert a subject image are two-dimensionally arranged, and imaging in front of the imaging element. Foreign matter detection means for detecting information on the position of the foreign matter attached to the optical member disposed on the optical axis, storage means for storing at least information on the position of the foreign matter detected by the foreign matter detection means, and the imaging A change for detecting a change in the adhesion state of the foreign matter to the optical member based on a captured image obtained by photoelectrically converting the subject image by an element and information on the position of the foreign matter stored in the storage means An updater that updates information on the position of the foreign matter stored in the storage means based on information on a change in the adhesion state of the foreign matter detected by the detection means and the change detection means Characterized by comprising the, the.

また、本発明に係わる撮像装置の制御方法は、被写体像を光電変換する複数の画素が2次元的に配列された撮像素子と、前記撮像素子の前方の撮影光軸上に配設された光学部材に付着した異物の位置に関する情報を検出する異物検出手段と、前記異物検出手段で検出された少なくとも前記異物の位置に関する情報を記憶する記憶手段と、を備える撮像装置を制御する方法であって、前記撮像素子により前記被写体像を光電変換して得られた撮像画像と前記記憶手段に記憶されている異物の位置に関する情報とに基づいて、前記異物の前記光学部材への付着状態の変化を検出する変化検出工程と、前記変化検出工程において検出された前記異物の付着状態の変化の情報に基づいて、前記記憶手段に記憶されている前記異物の位置に関する情報を更新する更新工程と、を具備することを特徴とする。   The image pickup apparatus control method according to the present invention includes an image pickup device in which a plurality of pixels for photoelectrically converting a subject image are two-dimensionally arranged, and an optical element disposed on a photographing optical axis in front of the image pickup device. A method for controlling an imaging apparatus, comprising: a foreign matter detection unit that detects information about a position of a foreign matter attached to a member; and a storage unit that stores at least information about the position of the foreign matter detected by the foreign matter detection unit. Based on the captured image obtained by photoelectrically converting the subject image by the imaging element and information on the position of the foreign matter stored in the storage means, the change in the state of attachment of the foreign matter to the optical member is determined. Based on the change detection step to detect and information on the change in the adhesion state of the foreign matter detected in the change detection step, information on the position of the foreign matter stored in the storage means An updating step of new to, characterized by including the.

また、本発明に係わるプログラムは、上記の制御方法をコンピュータに実行させることを特徴とする。   A program according to the present invention causes a computer to execute the above control method.

また、本発明に係わる記憶媒体は、上記のプログラムを記憶したことを特徴とする。   A storage medium according to the present invention stores the above program.

本発明によれば、ゴミ補正データ取得後にゴミの付着状況が変化した場合でも、画像データに対するゴミ除去補正の精度の低下を抑制することが可能となる。   According to the present invention, it is possible to suppress a reduction in accuracy of dust removal correction for image data even when the dust adhesion state changes after dust correction data is acquired.

以下、本発明の好適な実施形態について、添付図面を参照して詳細に説明する。   DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described in detail with reference to the accompanying drawings.

(第1の実施形態)
図1は、本発明の第1の実施形態に係わる撮像装置としてのレンズ交換式一眼レフデジタルカメラの回路構成を示すブロック図である。
(First embodiment)
FIG. 1 is a block diagram showing a circuit configuration of an interchangeable lens single-lens reflex digital camera as an imaging apparatus according to the first embodiment of the present invention.

図1において、マイクロコンピュータ402は、撮像素子418が出力する画像データの処理や、LCDモニタ装置417の表示制御をはじめ、カメラ全体の動作を制御する。なお、撮像素子418は、被写体像を光電変換する複数の画素が2次元的に配列されて構成されている。   In FIG. 1, the microcomputer 402 controls the operation of the entire camera, including processing of image data output from the image sensor 418 and display control of the LCD monitor device 417. Note that the image sensor 418 is configured by two-dimensionally arranging a plurality of pixels that photoelectrically convert a subject image.

スイッチ(SW1)405は、レリーズボタン114(図2参照)の半押し状態でオンになり、スイッチ(SW1)405がオンすると本実施形態のデジタルカメラは撮影準備状態になる。スイッチ(SW2)406は、レリーズボタン114が最後まで押された状態(全押し状態)でオンし、スイッチ(SW2)406がオンすると本実施形態のデジタルカメラは撮影動作を開始する。   The switch (SW1) 405 is turned on when the release button 114 (see FIG. 2) is half-pressed. When the switch (SW1) 405 is turned on, the digital camera according to the present embodiment is in a shooting preparation state. The switch (SW2) 406 is turned on when the release button 114 is pressed to the end (fully pressed state), and when the switch (SW2) 406 is turned on, the digital camera of this embodiment starts a photographing operation.

レンズ制御回路407は、撮影光学系200(図3参照)との通信およびAF(オートフォーカス)時の撮影光学系200の駆動制御や絞り羽根の駆動制御を行う。   The lens control circuit 407 performs communication with the photographing optical system 200 (see FIG. 3) and drive control of the photographing optical system 200 and driving control of the diaphragm blades during AF (autofocus).

また図1において、外部表示制御回路408は、外部表示装置(OLC)409や、ファインダ内の表示装置(不図示)の制御を行う。スイッチセンス回路410は、カメラに設けられた電子ダイヤル411を含む多数のスイッチ類の信号をマイクロコンピュータ402に伝える。   In FIG. 1, an external display control circuit 408 controls an external display device (OLC) 409 and a display device (not shown) in the viewfinder. The switch sense circuit 410 transmits signals of a large number of switches including the electronic dial 411 provided in the camera to the microcomputer 402.

ストロボ発光調光制御回路412は、X接点412aを介して接地されており、外部ストロボの制御を行う。測距回路413は、AFのための被写体に対するデフォーカス量を検出する。測光回路414は、被写体の輝度を測定する。   The strobe light emission dimming control circuit 412 is grounded via the X contact 412a and controls the external strobe. The distance measuring circuit 413 detects the defocus amount with respect to the subject for AF. The photometry circuit 414 measures the luminance of the subject.

シャッター制御回路415はシャッターの制御を行い、撮像素子に対して適正な露光を行う。LCDモニタ装置417とバックライト照明装置416は、画像表示装置を構成している。記録装置419は例えばカメラ本体に着脱可能なハードディスクドライブや半導体メモリカード等である。   A shutter control circuit 415 controls the shutter and performs appropriate exposure on the image sensor. The LCD monitor device 417 and the backlight illumination device 416 constitute an image display device. The recording device 419 is, for example, a hard disk drive or a semiconductor memory card that can be attached to and detached from the camera body.

また、マイクロコンピュータ402には、A/Dコンバータ423、画像バッファメモリ424、DSPなどからなる画像処理回路425、撮像素子内の所定画素そのものに欠陥があることを記憶している画素欠陥位置メモリ426が接続されている。また、ゴミ(以下異物とも呼ぶ)による画像不良を起こしている撮像素子内の画素位置を記憶しているゴミ位置メモリ427も接続されている。なお、画素欠陥位置メモリ426およびゴミ位置メモリ427は不揮発性メモリを用いることが好ましい。また、画素欠陥位置メモリ426とゴミ位置メモリ427は、同一メモリ空間の異なるアドレスを用いて記憶しても良い。   Further, the microcomputer 402 includes an A / D converter 423, an image buffer memory 424, an image processing circuit 425 including a DSP, and a pixel defect position memory 426 that stores that a predetermined pixel in the image sensor itself is defective. Is connected. Also connected is a dust position memory 427 that stores pixel positions in the image sensor where image defects are caused by dust (hereinafter also referred to as foreign matter). Note that the pixel defect position memory 426 and the dust position memory 427 are preferably non-volatile memories. Further, the pixel defect position memory 426 and the dust position memory 427 may be stored using different addresses in the same memory space.

また、428は、マイクロコンピュータ402が実行するプログラム等を記憶する不揮発性のメモリである。   Reference numeral 428 denotes a nonvolatile memory that stores programs executed by the microcomputer 402.

さらに、418bは、撮像素子418の前方の撮影光軸上に配置された光学部材を振動させるための加振装置である。   Further, reference numeral 418b denotes a vibration device for vibrating an optical member arranged on the photographing optical axis in front of the image sensor 418.

図2は、本実施形態に係るデジタルカメラの外観を示す斜視図、図3は図2の垂直断面図である。図2において、カメラ本体100の上部には、ファインダ観察用の接眼窓111、AE(自動露出)ロックボタン112、AFの測距点選択ボタン113、撮影操作を指示するためのレリーズボタン114が設けられている。また、電子ダイヤル411、撮影モード選択ダイヤル117、および外部表示装置409も設けられている。電子ダイヤル411は、他の操作ボタンと併用してカメラに数値を入力したり、撮影モードを切り換えたりするための多機能信号入力装置である。また、外部表示装置409は、液晶表示装置から構成され、シャッタースピード、絞り、撮影モードなどの撮影条件や、他の情報を表示する。   FIG. 2 is a perspective view showing the external appearance of the digital camera according to the present embodiment, and FIG. 3 is a vertical sectional view of FIG. In FIG. 2, an eyepiece window 111 for finder observation, an AE (automatic exposure) lock button 112, an AF distance measuring point selection button 113, and a release button 114 for instructing a photographing operation are provided on the upper part of the camera body 100. It has been. An electronic dial 411, a shooting mode selection dial 117, and an external display device 409 are also provided. The electronic dial 411 is a multi-function signal input device that is used in combination with other operation buttons to input numerical values to the camera and to switch the shooting mode. The external display device 409 includes a liquid crystal display device, and displays shooting conditions such as shutter speed, aperture, and shooting mode, and other information.

また、カメラ本体100の背面には、撮影された画像や各種設定画面などを表示するLCDモニタ装置417、LCDモニタ装置417をオン/オフするためのモニタスイッチ121、十字配置スイッチ116、およびメニューボタン124が設けられている。   Also, on the back of the camera main body 100, an LCD monitor device 417 for displaying captured images and various setting screens, a monitor switch 121 for turning on / off the LCD monitor device 417, a cross switch 116, and a menu button 124 is provided.

十字配置スイッチ116は、上下左右に配された4つのボタンと、中央に配されたSETボタンを有し、ユーザがLCDモニタ装置417に表示されるメニュー項目などの選択や実行をカメラに指示するために用いられる。   The cross placement switch 116 has four buttons arranged vertically and horizontally and a SET button arranged in the center. The user instructs the camera to select and execute menu items displayed on the LCD monitor device 417. Used for.

メニューボタン124は、LCDモニタ装置417にカメラの各種設定を行うためのメニュー画面を表示させるためのボタンである。例えば、撮影モードを選択、設定する時は、このメニューボタン124を押した後、十字配置スイッチ116の上下左右のボタンを操作して希望のモードを選択し、希望のモードが選択された状態でSETボタンを押すことにより設定が完了する。このメニューボタン124と十字配置スイッチ116は、後述するゴミ検出モードの設定や、ゴミ検出モードの際の表示モード設定などにも使用される。   The menu button 124 is a button for causing the LCD monitor device 417 to display a menu screen for performing various camera settings. For example, when selecting and setting the shooting mode, after pressing the menu button 124, the user operates the up / down / left / right buttons of the cross switch 116 to select the desired mode, and the desired mode is selected. Setting is completed by pressing the SET button. The menu button 124 and the cross switch 116 are also used for setting a dust detection mode, which will be described later, and a display mode setting in the dust detection mode.

本実施形態のLCDモニタ装置417は透過型であるため、LCDモニタ装置の駆動だけでは画像を視認することはできず、必ずその裏面には図3に示すようにバックライト照明装置416が必要である。このようにLCDモニタ装置417とバックライト照明装置416は画像表示装置を構成している。   Since the LCD monitor device 417 of the present embodiment is a transmissive type, an image cannot be visually recognized only by driving the LCD monitor device, and a backlight illumination device 416 is necessarily provided on the back surface thereof as shown in FIG. is there. As described above, the LCD monitor device 417 and the backlight illumination device 416 constitute an image display device.

図3に示すように、撮影光学系200はカメラ本体100に対してレンズマウント202を介して着脱可能である。図3において201は撮影光軸、203はクイックリターンミラーである。   As shown in FIG. 3, the photographing optical system 200 can be attached to and detached from the camera body 100 via a lens mount 202. In FIG. 3, 201 denotes a photographing optical axis, and 203 denotes a quick return mirror.

クイックリターンミラー203は撮影光路中に配置され、撮影光学系200からの被写体光をファインダ光学系に導く位置(図3に示す位置、斜設位置と呼ぶ)と撮影光路外に退避する位置(退避位置と呼ぶ)との間で移動可能である。   The quick return mirror 203 is disposed in the photographing optical path, and a position for guiding subject light from the photographing optical system 200 to the finder optical system (referred to as a position shown in FIG. 3, an oblique position) and a position for retracting outside the photographing optical path (retraction) It is possible to move between them.

図3において、ピント板204上にはクイックリターンミラー203からファインダ光学系に導かれる被写体光が結像される。205はファインダの視認性を向上させるためのコンデンサレンズ、206はペンタゴナルダハプリズムであり、ピント板204およびコンデンサレンズ205を通った被写体光をファインダ観察用の接眼レンズ208および測光センサ207に導く。   In FIG. 3, the subject light guided from the quick return mirror 203 to the finder optical system is imaged on the focus plate 204. Reference numeral 205 denotes a condenser lens for improving the visibility of the finder, and 206 denotes a pentagonal roof prism.

209、210はそれぞれシャッターを構成する後幕と先幕で、これら後幕209、先幕210の開放によって後方に配置されている固体撮像素子である撮像素子418が必要時間だけ露光される。撮影光学系200によって結像された被写体像は、撮像素子418によって画素毎の電気信号に変換され、光電変換された撮影画像は、A/Dコンバータ423や画像処理回路425などによって処理され、画像データとして記録装置419に記録される。   Reference numerals 209 and 210 respectively denote a rear curtain and a front curtain that constitute a shutter, and an image sensor 418 that is a solid-state image sensor disposed behind the rear curtain 209 and the front curtain 210 is exposed for a necessary time. The subject image formed by the photographing optical system 200 is converted into an electric signal for each pixel by the image sensor 418. The photoelectrically converted photographed image is processed by the A / D converter 423, the image processing circuit 425, etc. It is recorded in the recording device 419 as data.

撮像素子418はプリント基板211に保持されている。このプリント基板211の後方には、もう一枚のプリント基板である表示基板215が配置されている。この表示基板215の反対側の面にLCDモニタ装置417およびバックライト照明装置416が配置されている。   The image sensor 418 is held on the printed circuit board 211. Behind this printed board 211, a display board 215, which is another printed board, is arranged. An LCD monitor device 417 and a backlight illumination device 416 are disposed on the opposite surface of the display substrate 215.

なお、撮像素子418の前方の撮影光軸201上には、光学ローパスフィルタ、赤外カットフィルタ等の光学部材418aが配置されている。そして、この撮像素子418の前方に配置された光学部材418aの表面にゴミ等の異物が付着し、その異物の影が撮像素子418で光電変換された画像に写り込む。本実施形態は、この異物の影が写り込んだ画像を補正する技術に関するものである。   An optical member 418a such as an optical low-pass filter or an infrared cut filter is disposed on the photographing optical axis 201 in front of the image sensor 418. Then, foreign matter such as dust adheres to the surface of the optical member 418a disposed in front of the image sensor 418, and the shadow of the foreign matter is reflected in an image photoelectrically converted by the image sensor 418. The present embodiment relates to a technique for correcting an image in which the shadow of the foreign object is reflected.

また、本実施形態のデジタルカメラでは、光学部材418aには、圧電素子等からなる加振装置418bが接続されており、マイクロコンピュータ402からの指示によりこの加振装置418bが駆動されて、光学部材418aが振動する。これにより光学部材418aに付着しているごみ等の異物が払い落とされる。なお、加振装置418bの駆動のタイミングは、予め設定しておいたタイミングでも良いし、ユーザにより指示されたタイミングでも良い。   In the digital camera of the present embodiment, a vibration device 418b made of a piezoelectric element or the like is connected to the optical member 418a. The vibration device 418b is driven by an instruction from the microcomputer 402, and the optical member 418a vibrates. As a result, foreign matters such as dust adhering to the optical member 418a are removed. The driving timing of the vibration exciter 418b may be a preset timing or a timing instructed by the user.

419は画像データを記録する記録装置、217は電池(携帯用電源)である。この記録装置419および電池217は、カメラ本体に対して着脱可能である。   Reference numeral 419 denotes a recording device for recording image data, and 217 denotes a battery (portable power supply). The recording device 419 and the battery 217 are detachable from the camera body.

(ゴミ検出処理)
図4は、本実施形態に係るデジタルカメラにおけるゴミ検出処理(ゴミによって画像不良が生じている画素位置の検出処理)を説明するフローチャートである。当該処理は、マイクロコンピュータ402がメモリ428に記憶されたゴミ検出処理プログラムを実行することにより実施される。
(Dust detection process)
FIG. 4 is a flowchart for explaining dust detection processing (detection processing of a pixel position where an image defect is caused by dust) in the digital camera according to the present embodiment. This processing is performed by the microcomputer 402 executing a dust detection processing program stored in the memory 428.

このゴミ検出処理は、画像に写り込んだ、撮像素子418の前方に配置された光学部材418aの表面に付着したゴミの影の位置、大きさ等を検出する処理である。   This dust detection processing is processing for detecting the position and size of the shadow of dust attached to the surface of the optical member 418a disposed in front of the image sensor 418 in the image.

ゴミ検出処理は、ゴミ検出用画像を撮像することにより行われる。ゴミ検出処理を行う場合、面光源装置の出射面や白い壁などの均一輝度パターンを持つ面に撮影光学系(レンズ)200の撮影光軸201を向けてカメラを設置し、ゴミ検出の準備を行なう。または、レンズマウント202にゴミ検出用のライトユニット(レンズの代わりに装着する小型の点光源装置)を装着し、ゴミ検出の準備を行う。ライトユニットの光源は例えば白色LEDが考えられ、発光面のサイズを予め定めた絞り値(例えば、本実施形態ではF64)相当になるように調整するのが望ましい。   The dust detection process is performed by capturing a dust detection image. When performing dust detection processing, a camera is installed with the photographing optical axis 201 of the photographing optical system (lens) 200 facing a surface having a uniform luminance pattern, such as an exit surface of a surface light source device or a white wall, and preparation for dust detection is performed. Do. Alternatively, a dust detection light unit (a small point light source device mounted instead of a lens) is mounted on the lens mount 202 to prepare for dust detection. The light source of the light unit may be a white LED, for example, and it is desirable to adjust the size of the light emitting surface so that it corresponds to a predetermined aperture value (for example, F64 in this embodiment).

本実施形態では、通常の撮影光学系を用いる場合について説明するが、上記のライトユニットをレンズマウント202に取り付けてゴミ検出を行っても良い。このように、本実施形態においてゴミ検出用画像は、均一な色を有する画像である。   In this embodiment, a case where a normal photographing optical system is used will be described. However, dust detection may be performed by attaching the light unit to the lens mount 202. Thus, in this embodiment, the dust detection image is an image having a uniform color.

準備が終了した後、例えば十字配置スイッチ116からゴミ検出処理の開始が指示されると、マイクロコンピュータ402は、まず絞りの設定を行う。撮像素子近傍(撮像素子前方)のゴミはレンズの絞り値によって結像状態が変わり、レンズの瞳位置によって位置が変化する。したがって、ゴミ補正データにはゴミの位置や大きさに加え、検出時の絞り値とレンズの瞳位置を保持する必要がある。   After the preparation is completed, for example, when the start of dust detection processing is instructed from the cross arrangement switch 116, the microcomputer 402 first sets the aperture. The image forming state of dust near the imaging device (in front of the imaging device) changes depending on the aperture value of the lens, and the position changes depending on the pupil position of the lens. Therefore, in the dust correction data, in addition to the position and size of dust, it is necessary to hold the aperture value at the time of detection and the pupil position of the lens.

ただし、ゴミ補正データを作成する段階で、異なるレンズを用いたとしても常に同じ絞り値を使うことを予め決めておけば、必ずしもゴミ補正データ内に絞り値を保持する必要はない。また、瞳位置に関してもライトユニットを用いたり、特定のレンズのみの使用を許可することで、同様に必ずしもゴミ補正データ内に瞳位置を保持する必要はなくなる。つまり、ゴミ補正データを作成する段階において、使用するレンズを複数許したり、絞り込む絞り値を適宜変更する場合には、検出時の絞り値とレンズの瞳位置を、ゴミ補正データ内に保持する必要があると言える。なお、ここで瞳位置とは、射出瞳の撮像面(焦点面)からの距離をいう。   However, it is not always necessary to hold the aperture value in the dust correction data if it is determined in advance that the same aperture value is always used even when different lenses are used at the stage of creating dust correction data. Similarly, by using a light unit or permitting the use of only a specific lens for the pupil position, it is not always necessary to hold the pupil position in the dust correction data. In other words, at the stage of creating dust correction data, if you want to allow multiple lenses to use or change the aperture value to narrow down appropriately, it is necessary to keep the aperture value and lens pupil position at the time of detection in the dust correction data It can be said that there is. Here, the pupil position refers to the distance from the imaging plane (focal plane) of the exit pupil.

以下、フローチャートについて具体的に説明する。   The flowchart will be specifically described below.

まず、ゴミ検出処理が開始されると、撮影光学系200の絞り値が指定される。ここでは、例えばF16を指定する(ステップS21)。   First, when the dust detection process is started, the aperture value of the photographing optical system 200 is designated. Here, for example, F16 is designated (step S21).

次にマイクロコンピュータ402はレンズ制御回路407に対し、撮影光学系200の絞り羽根制御を行わせ、ステップS21で指定された絞り値に絞りを設定する(ステップS22)。さらに、フォーカス位置を無限遠に設定する(ステップS23)。   Next, the microcomputer 402 causes the lens control circuit 407 to perform aperture blade control of the photographing optical system 200, and sets the aperture to the aperture value designated in step S21 (step S22). Further, the focus position is set to infinity (step S23).

撮影光学系200の絞り値とフォーカス位置が設定されると、ゴミ検出モードでの撮影を実行する(ステップS24)。ステップS24で行う均一輝度撮影ルーチンの詳細に関しては図9を用いて後に説明する。撮影された画像データは、ゴミ検出用画像データとしてバッファメモリ424に格納される。   When the aperture value and focus position of the photographing optical system 200 are set, photographing in the dust detection mode is executed (step S24). Details of the uniform luminance photographing routine performed in step S24 will be described later with reference to FIG. The captured image data is stored in the buffer memory 424 as dust detection image data.

撮影が終了すると、撮影時の絞り値とレンズ瞳位置を取得する(ステップS25)。   When shooting is completed, the aperture value and lens pupil position at the time of shooting are acquired (step S25).

次に、画像処理回路425に画像バッファメモリ424に記憶されているゴミ検出用画像データの各画素に対応するデータを呼び出す(ステップS26)。   Next, data corresponding to each pixel of the dust detection image data stored in the image buffer memory 424 is called to the image processing circuit 425 (step S26).

画像処理回路425は、図7に示す処理を行い、ゴミが存在する画素の位置と大きさを取得する(ステップS27)。   The image processing circuit 425 performs the process shown in FIG. 7, and acquires the position and size of the pixel where dust is present (step S27).

そして、ステップS27で取得したゴミが存在する画素の位置と大きさ、およびステップS25で取得した絞り値とレンズ瞳位置情報を、ゴミ位置メモリ427に登録する(ステップS28)。ここで、前述したライトユニットを用いた場合には、レンズ情報を取得できない。そこで、レンズ情報が取得できない場合は、ライトユニットを使ったと判断し、予め定められたレンズ瞳位置情報と、ライトユニットの光源径から算出される換算絞り値を登録する。   Then, the position and size of the pixel where dust is present acquired in step S27 and the aperture value and lens pupil position information acquired in step S25 are registered in the dust position memory 427 (step S28). Here, when the light unit described above is used, lens information cannot be acquired. Therefore, when the lens information cannot be acquired, it is determined that the light unit is used, and predetermined lens pupil position information and a converted aperture value calculated from the light source diameter of the light unit are registered.

ここで、ステップS28において、予め画素欠陥位置メモリに記録されている製造時からの不良画素(画素欠陥)の位置と、読み出した画素データの位置を比べて画素欠陥であるかどうかを確認する。そして、画素欠陥によるものでは無いと判断された領域のみ、ゴミ位置メモリ427に位置を登録しても良い。   Here, in step S28, the position of the defective pixel (pixel defect) from the time of manufacture recorded in the pixel defect position memory in advance is compared with the position of the read pixel data to check whether the pixel defect is present. Only the area determined not to be due to the pixel defect may be registered in the dust position memory 427.

ゴミ位置メモリ427に格納されるゴミ補正データのデータ形式例を図5に示す。図5に示した通り、ゴミ補正データには、ゴミ検出用画像データ撮影時の、レンズ情報とゴミの位置、大きさの情報が格納される。このゴミ補正データは、通常撮影時に画像データの撮影時情報と共に画像に付加し、後に説明するゴミ除去処理で利用する。   An example of the data format of dust correction data stored in the dust position memory 427 is shown in FIG. As shown in FIG. 5, the dust correction data stores lens information and dust position and size information when photographing dust detection image data. This dust correction data is added to the image together with the shooting time information of the image data during normal shooting, and used in dust removal processing described later.

具体的には、ゴミ検出用画像データ撮影時のレンズ情報として、ゴミ検出用画像データ撮影時における実際の絞り値(F値)と、そのときのレンズ瞳位置を格納する。続いて記憶領域に検出したゴミ領域の数(整数値)を格納し、これに続き、個々の具体的なゴミ領域のパラメータを、ゴミ領域の数だけ繰返して格納する。ゴミ領域のパラメータは、ゴミの半径(例えば2バイト)、有効画像領域における中心のx座標(例えば2バイト)、おなじく中心のy座標(例えば2バイト)の3つの数値のセットである。   Specifically, the actual aperture value (F value) at the time of photographing dust detection image data and the lens pupil position at that time are stored as lens information at the time of photographing dust detection image data. 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).

ゴミ位置メモリ427の大きさ等によりゴミ補正データサイズに制限がある場合、ステップS27で得たゴミ領域の先頭から優先してデータを格納する。これは、ステップS27のゴミ領域取得ルーチン内では、後述するようにゴミ領域を、目立つゴミの順にソートするからである。   When the dust correction data size is limited due to the size of the dust position memory 427 or the like, the data is stored with priority from the head of the dust area obtained in step S27. This is because in the dust area acquisition routine in step S27, the dust areas are sorted in the order of noticeable dust, as will be described later.

(ゴミ領域取得ルーチン)
次に、図6、図7、図8を用いて、ステップS27で行うゴミ領域取得ルーチンの詳細について説明する。
(Trash area acquisition routine)
Next, the details of the dust region acquisition routine performed in step S27 will be described with reference to FIGS.

図6に示すように、呼び出したゴミ検出用画像データをメモリ上に展開し、予め定められたブロック単位で処理を行う。これは、レンズやセンサ特性に起因する周辺減光に対応するためである。周辺減光とは、レンズの中央部に比べ周辺部の輝度が落ちてしまう現象であり、レンズの絞りを小さくすることである程度軽減されることが知られている。しかし、絞りを絞った状態でも、撮影画像に対して予め定められたスレッショルド値でゴミ位置の判定を行うと、レンズによっては周辺部のゴミが正確に検出できなくなるという問題がある。そこで、画像をブロック分割して周辺減光の影響を軽減する。   As shown in FIG. 6, the called dust detection image data is developed on a memory and processed in units of predetermined blocks. This is to cope with peripheral dimming caused by lens and sensor characteristics. Peripheral dimming is a phenomenon in which the luminance at the peripheral portion is lower than that at the central portion of the lens, and it is known that it is reduced to some extent by reducing the aperture of the lens. However, there is a problem that even if the aperture is reduced, if the dust position is determined based on a predetermined threshold value for the photographed image, dust in the peripheral portion cannot be detected accurately depending on the lens. Therefore, the image is divided into blocks to reduce the influence of peripheral dimming.

単純にブロック分割すると、ブロックとブロックの間でスレッショルド値が異なる場合、ブロック間をまたぐゴミの検出結果がずれてしまうという問題がある。そこで、ブロック間をオーバーラップさせ、オーバーラップ領域を構成するブロックのいずれかでゴミと判定された画素をゴミ領域として扱う。   When the blocks are simply divided, there is a problem that the detection result of the dust straddling the blocks is shifted when the threshold values are different between the blocks. Therefore, the blocks are overlapped, and pixels determined to be dust in any of the blocks constituting the overlap region are treated as dust regions.

ブロック内のゴミ領域判定は、図8に示す処理の流れで行う。まず、ブロック内の最大輝度Lmax、平均輝度Laveを算出し、次式を用いてブロック内のスレッショルド値T1を算出する。   The dust region determination in the block is performed according to the processing flow shown in FIG. First, 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 equation.

T1=Lave×0.6 + Lmax×0.4
次に、スレッショルド値を超えない画素をゴミ画素とし(ステップS61)、ゴミ画素によって構成される孤立領域を各々一つのゴミ領域di(i=0,1,…,n)とする(ステップS62)。図7に示すように、ゴミ領域毎に、ゴミ領域を構成する画素の水平方向の座標の最大値Xmaxおよび最小値Xmin、垂直方向の座標の最大値Ymaxおよび最小値Yminを求め、ゴミ領域diのサイズを表す半径riを次式によって算出する(ステップS63)。
T1 = Lave × 0.6 + Lmax × 0.4
Next, pixels that do not exceed the threshold value are defined as dust pixels (step S61), and isolated regions constituted by dust pixels are each defined as one dust region di (i = 0, 1,..., N) (step S62). . As shown in FIG. 7, for each dust region, the maximum value Xmax and the minimum value Xmin of the horizontal coordinate of the pixels constituting the dust region, the maximum value Ymax and the minimum value Ymin of the vertical coordinate are obtained, and the dust region di A radius ri representing the size of is calculated by the following equation (step S63).

ri=√[{(Xmax−Xmin)/2}2+{(Ymax−Ymin)/2 }2]
Xmax、Xmin、Ymax、Yminとriの関係を、図7に示す。
ri = √ [{(Xmax−Xmin) / 2} 2 + {(Ymax−Ymin) / 2} 2 ]
The relationship between Xmax, Xmin, Ymax, Ymin and ri is shown in FIG.

その後ステップS64で、ゴミ領域毎の平均輝度値を算出する。   Thereafter, in step S64, an average luminance value for each dust region is calculated.

ゴミ位置メモリ427のサイズによる制限などにより、ゴミ補正データのデータサイズが制限されている場合がある。このような場合に対応するために、ゴミ位置情報を、大きさやゴミ領域の平均輝度値によってソートする(ステップS65)。本実施形態では、riの大きい順にソートする。riが等しい場合、平均輝度値の低い順にソートする。このようにすることで、目立つゴミを優先してゴミ補正データに登録することが出来る。なお、ソート済みのゴミ領域をDi、ゴミ領域Diの半径をRiとする。   In some cases, the data size of the dust correction data is limited due to the limitation due to the size of the dust position memory 427. In order to cope with such a case, the dust position information is sorted according to the size and the average luminance value of the dust region (step S65). In this embodiment, sorting is performed in descending order of ri. When ri is equal, the sort is performed in ascending order of the average luminance value. In this way, it is possible to preferentially register noticeable dust in the dust correction data. The sorted dust area is Di, and the radius of the dust area Di is Ri.

なお、予め定められたサイズより大きいゴミ領域がある場合、ソートの対象から外し、ソート済みゴミ領域リストの末尾に配置しても良い。大きいゴミ領域については、後に補間処理をするとかえって画質を低下させる場合があり、補正対象の優先順位としては最下位として扱うことが望ましいからである。   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.

(均一輝度撮影ルーチン)
次に、図9に示すフローチャートを用いて、図4のステップS24で行われる均一輝度撮影ルーチンの詳細について説明する。この均一輝度撮影ルーチンは、マイクロコンピュータ402がメモリ428に記憶された均一輝度撮影プログラムを実行することにより実施される。
(Uniform luminance shooting routine)
Next, details of the uniform luminance photographing routine performed in step S24 of FIG. 4 will be described using the flowchart shown in FIG. This uniform luminance photographing routine is executed by the microcomputer 402 executing a uniform luminance photographing program stored in the memory 428.

この均一輝度撮影ルーチンが実行されると、ステップS201でマイクロコンピュータ402は、図3に示すクイックリターンミラー203を作動させ、いわゆるミラーアップを行い、撮影光路外にクイックリターンミラー203を退避させる。   When this uniform luminance photographing routine is executed, in step S201, the microcomputer 402 operates the quick return mirror 203 shown in FIG. 3, performs so-called mirror up, and retracts the quick return mirror 203 outside the photographing optical path.

次に、ステップS202で撮像素子418での電荷蓄積を開始させ、次のステップS203では図3に示したシャッターの先幕210、後幕209をそれぞれ走行させて露光を行う。そして、ステップS204で撮像素子の電荷蓄積を終了し、次のステップS205で撮像素子418から画像データを読み出してA/Dコンバータ423および画像処理回路425で処理した画像データをバッファメモリ424に一次記憶する。   Next, in step S202, charge accumulation in the image sensor 418 is started, and in the next step S203, the shutter front curtain 210 and rear curtain 209 shown in FIG. In step S204, the charge accumulation of the image sensor is terminated. In the next step S205, image data is read from the image sensor 418, and the image data processed by the A / D converter 423 and the image processing circuit 425 is temporarily stored in the buffer memory 424. To do.

次のステップS206で撮像素子418から全ての画像データの読み出しが終了すると、ステップS207でクイックリターンミラー203をミラーダウンさせ、クイックリターンミラーを斜設位置に戻して一連の撮像動作を終了する。   When reading of all image data from the image sensor 418 is completed in the next step S206, the quick return mirror 203 is mirrored down in step S207, the quick return mirror is returned to the oblique position, and a series of imaging operations is completed.

(通常撮影ルーチン)
次に、図10に示すフローチャートを用いて、通常の被写体を撮影するモードである通常撮影ルーチンの詳細について説明する。均一輝度撮影モード以外の撮影は、この通常撮影ルーチンに対応する。当該処理はマイクロコンピュータ402がメモリ428に記憶された通常撮影プログラムを実行することにより実施される。
(Normal shooting routine)
Next, the details of the normal shooting routine, which is a mode for shooting a normal subject, will be described using the flowchart shown in FIG. Shooting other than the uniform luminance shooting mode corresponds to this normal shooting routine. The processing is performed by the microcomputer 402 executing a normal photographing program stored in the memory 428.

この通常撮影ルーチンが実行されると、ステップS401でマイクロコンピュータ402は、図3に示すクイックリターンミラー203を作動させ、いわゆるミラーアップを行い、撮影光路外にクイックリターンミラー203を退避させる。   When this normal photographing routine is executed, in step S401, the microcomputer 402 operates the quick return mirror 203 shown in FIG. 3, performs so-called mirror-up, and retracts the quick return mirror 203 outside the photographing optical path.

次に、ステップS402で撮像素子418での電荷蓄積を開始させ、次のステップS403では図3に示したシャッターの先幕210、後幕209をそれぞれ走行させて露光を行う。そして、ステップS404で撮像素子418の電荷蓄積を終了し、次のステップS405で撮像素子418から画像データを読み出してA/Dコンバータ423および画像処理回路425で処理した画像データをバッファメモリ424に一次記憶する。   Next, in step S402, charge accumulation in the image sensor 418 is started, and in the next step S403, exposure is performed by running the shutter front curtain 210 and the rear curtain 209 shown in FIG. In step S404, the charge accumulation of the image sensor 418 is terminated, and in the next step S405, image data is read from the image sensor 418 and processed by the A / D converter 423 and the image processing circuit 425 in the buffer memory 424. Remember.

次のステップS406で撮像素子418から全ての画像データの読み出しが終了すると、ステップS407でクイックリターンミラー203をミラーダウンさせ、クイックリターンミラーを斜設位置に戻して一連の撮像動作を終了する。   When reading of all image data from the image sensor 418 is completed in the next step S406, the quick return mirror 203 is mirrored down in step S407, the quick return mirror is returned to the oblique position, and a series of imaging operations is completed.

ステップS300では、ステップS406で読み出した画像データに基づいて、ゴミ補正データの更新を行う。既にゴミ位置メモリ427に記憶されているゴミ補正データからゴミ領域を知ることができるので、ステップS406で読み出した画像データのゴミ領域にゴミの影が映っているかを確認する。ゴミの影が映っていない場合には、そのゴミは既になくなったと判定し、そのゴミ情報を削除する。   In step S300, dust correction data is updated based on the image data read in step S406. Since the dust area can be known from the dust correction data already stored in the dust position memory 427, it is confirmed whether a dust shadow is reflected in the dust area of the image data read in step S406. If there is no shadow of dust, it is determined that the dust has already disappeared, and the dust information is deleted.

例えば、ステップS406で読み出した画像データが、図11に示すような画像であった場合を例に挙げて説明する。ゴミ補正データから得られたi番目のゴミ領域1100が、図11の画像の空の部分であったとする。空は明るいうえに、ほぼ均一な画像であるため、ゴミが実際に存在するならば、はっきりとゴミの影が映り込むはずである。それにもかかわらず、i番目のゴミ領域1100にゴミの影が存在しない場合には、そのゴミは移動したか、もしくは取れてしまった可能性が高いため、i番目のゴミデータをゴミ補正データから削除する。即ち、ゴミ位置メモリ427に記憶されているゴミ補正データからi番目のゴミデータを削除し、ゴミ位置メモリ427内のゴミ補正データを更新する。   For example, the case where the image data read in step S406 is an image as shown in FIG. 11 will be described as an example. Assume that the i-th dust region 1100 obtained from dust correction data is an empty portion of the image of FIG. The sky is bright and almost uniform, so if there is any garbage, the shadow of the dust should be clearly reflected. Nevertheless, if there is no dust shadow in the i-th dust area 1100, it is highly likely that the dust has moved or has been removed, so the i-th dust data is extracted from the dust correction data. delete. That is, the i-th dust data is deleted from the dust correction data stored in the dust position memory 427, and the dust correction data in the dust position memory 427 is updated.

このように、通常撮影で得られた画像データに基づいて、ゴミ補正データを更新することで、ゴミ補正データの信頼度を上げることが可能となる。特に、撮影光学系200と撮像素子418の間に介在するゴミを除去する機能を有する本実施形態の撮像装置では、均一輝度画像取得後にゴミが移動したり、落ちてしまったりする可能性が高い。そのため、本実施形態のように、通常の撮影画像に基づいてゴミ補正データを更新することは有効である。また、本実施形態の撮像装置では、撮像装置内で自動的にゴミ補正データの更新が行なわれるので、撮影者が不要なゴミ情報を指定する必要がなく、撮影者が面倒な作業を強いられることがない。   As described above, by updating the dust correction data based on the image data obtained by the normal shooting, the reliability of the dust correction data can be increased. In particular, in the image pickup apparatus according to the present embodiment having a function of removing dust interposed between the photographing optical system 200 and the image pickup element 418, there is a high possibility that dust moves or falls after obtaining a uniform luminance image. . Therefore, it is effective to update the dust correction data based on the normal captured image as in the present embodiment. Further, in the imaging apparatus of this embodiment, dust correction data is automatically updated in the imaging apparatus, so that it is not necessary for the photographer to specify unnecessary dust information, and the photographer is forced to perform troublesome work. There is nothing.

なお、このステップS300のゴミ補正データ更新ルーチンについては、後にさらに詳しく説明する。   Note that the dust correction data update routine in step S300 will be described in more detail later.

ステップS408では、撮影時のカメラ設定値等と共に図5に示したゴミ補正データ(ステップS300で更新済みのデータ)を画像データに関連付けて記録装置419に記録する。   In step S408, the dust correction data (data updated in step S300) shown in FIG. 5 is recorded in the recording device 419 in association with the image data together with the camera setting value at the time of shooting.

具体的には、例えば、撮影時のカメラ設定値等が記録される画像ファイルのヘッダ領域である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.

(ゴミ除去処理)
次に、ゴミ除去処理の流れについて説明する。ゴミ除去処理は、デジタルカメラ本体ではなく、別途用意した画像処理装置上で行う。
(Dust removal process)
Next, the flow of dust removal processing will be described. The dust removal process is performed not on the digital camera body but on a separately prepared image processing apparatus.

図12は、画像処理装置のシステム構成の概略を示した図である。   FIG. 12 is a diagram showing an outline of the system configuration of the image processing apparatus.

CPU1001は、システム全体の動作をコントロールし、一次記憶部1002に格納されたプログラムの実行などを行う。一次記憶部1002は、主にメモリであり、二次記憶部1003に記憶されたプログラムなどを読み込んで格納する。二次記憶部1003は、例えばハードディスクなどがこれに該当する。一般に一次記憶部の容量は二次記憶部の容量より小さく、一次記憶部に格納しきれないプログラムやデータなどは二次記憶部に格納される。また、長時間記憶しなくてはならないデータなども二次記憶部に格納される。本実施形態では、プログラムを二次記憶部1003に格納し、プログラム実行時に一次記憶部1002に読み込んでCPU1001が実行処理を行う。   The CPU 1001 controls the operation of the entire system, and executes a program stored in the primary storage unit 1002. The primary storage unit 1002 is mainly a memory, and reads and stores programs stored in the secondary storage unit 1003. The secondary storage unit 1003 corresponds to, for example, a hard disk. Generally, the capacity of the primary storage unit is smaller than the capacity of the secondary storage unit, and programs and data that cannot be stored in the primary storage unit are stored in the secondary storage unit. Data that must be stored for a long time is also stored in the secondary storage unit. In the present embodiment, the program is stored in the secondary storage unit 1003, read into the primary storage unit 1002 when the program is executed, and the CPU 1001 performs an execution process.

入力デバイス1004とは例えば、システムのコントロールに用いるマウスやキーボードの他、画像データの入力に必要なカードリーダー、スキャナ、フィルムスキャナなどがこれに該当する。出力デバイス1005とは例えば、モニタやプリンタなどが考えられる。この装置の構成方法は他にも様々な形態が考えられるが、本発明の主眼ではないので説明を省略する。   Examples of the input device 1004 include a mouse and keyboard used for system control, as well as a card reader, scanner, film scanner, and the like necessary for inputting image data. Examples of the output device 1005 include a monitor and a printer. Various other configurations of the apparatus configuration method are conceivable, but the description thereof is omitted because it is not the main point of the present invention.

画像処理装置には、複数のプログラムを並列実行可能なオペレーティングシステムが搭載され、操作者はGUIを使ってこの装置上で動作するプログラムの操作が可能である。   The image processing apparatus is equipped with an operating system capable of executing a plurality of programs in parallel, and an operator can operate a program operating on the apparatus using a GUI.

画像処理装置におけるゴミ除去処理の流れを、図13に示す。   The flow of dust removal processing in the image processing apparatus is shown in FIG.

まず、デジタルカメラ内の記録装置419からゴミ補正データが添付された通常撮影画像データを画像処理装置に取り込んで、一次記憶部1002又は二次記憶部1003に記憶する(ステップS90)。   First, normal captured image data to which dust correction data is attached from the recording device 419 in the digital camera is taken into the image processing device and stored in the primary storage unit 1002 or the secondary storage unit 1003 (step S90).

次に、通常撮影された画像データ(ゴミ除去処理を行う対象となる画像)から、図10のステップS408で撮影画像に付与されたゴミ補正データを抽出する(ステップS91)。   Next, the dust correction data added to the photographed image in step S408 in FIG. 10 is extracted from the normally photographed image data (image to be subjected to dust removal processing) (step S91).

次に、ステップS91で抽出したゴミ補正データから座標列Di(i=1,2,…n)、半径列Ri(i=1,2,…,n)、絞り値f1とレンズ瞳位置L1を得る(ステップS92)。ここでRiは、図8のステップS65で算出した座標Diのゴミの大きさである。   Next, the coordinate sequence Di (i = 1, 2,... N), the radius sequence Ri (i = 1, 2,..., N), the aperture value f1, and the lens pupil position L1 are extracted from the dust correction data extracted in step S91. Obtain (step S92). Here, Ri is the size of the dust at the coordinate Di calculated in step S65 of FIG.

ステップS93で、通常撮影された画像の撮影時の絞り値f2とレンズ瞳位置L2を取得し、ステップS94でDiを次式で変換する。ここで、dは画像中心から座標Diまでの距離、Hは撮像素子418の表面とゴミとの距離であるとする。変換後の座標Di’と変換後の半径Ri’は例えば次式で定義する。   In step S93, the aperture value f2 and the lens pupil position L2 at the time of shooting of the normally shot image are acquired, and in step S94, 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 418 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.

ステップS95で座標Di’、半径Ri’で示される領域内のゴミを検出し、必要に応じて補間処理を適用する。補間処理の詳細については後述する。   In step S95, 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.

ステップS96で全ての座標についてゴミ除去処理を適用したかどうかを判定し、全ての座標について処理が終わっていれば処理を終了し、そうでなければステップS95に戻る。   In step S96, it is determined whether or not dust removal processing has been applied to all coordinates. If processing has been completed for all coordinates, the processing is terminated; otherwise, the processing returns to step S95.

(補間ルーチン)
次に、ゴミ領域の補間処理の詳細について述べる。補間ルーチンの流れを示すフローチャートを図14に示す。まずステップS1201で、ゴミ領域判定を行う。ゴミ領域とは、次の条件全てを満たす領域とする。
(1)図13のステップS94で算出した中心座標Di’、半径Ri’(式(1)で求められたDi’,Ri’)に含まれる画素の平均輝度Yaveと最高輝度Ymaxを用いて次式で求められるスレッショルド値T2より暗い領域。
(Interpolation routine)
Next, details of dust region interpolation processing will be described. A flowchart showing the flow of the interpolation routine is shown in FIG. First, in step S1201, dust region determination is performed. The dust area is an area that satisfies all of the following conditions.
(1) Next, using the average luminance Yave and the maximum luminance Ymax of the pixels included in the center coordinates Di ′ and radius Ri ′ (Di ′, Ri ′ obtained in Expression (1)) calculated in step S94 in FIG. An area darker than the threshold value T2 obtained by the equation.

T2=Yave×0.6+Ymax×0.4
(2)上記の中心座標Di’、半径Ri’の円と接しない領域。
(3)(1)で選択された輝度の低い画素によって構成される孤立領域に対し、図8中のステップS63と同様の方法で算出した半径値がl1画素以上、l2画素未満である領域。
(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) A region in which the radius value calculated by the same method as in step S63 in FIG. 8 is not less than l1 pixels and less than l2 pixels with respect to the isolated region constituted by the low-luminance pixels selected in (1).
(4) A region including the center coordinates Di of the circle.

本実施形態では、l1は3画素、l2は30画素とする。このようにすることで、孤立した小領域だけをゴミ領域として扱うことが可能になる。また、レンズ瞳位置が正確に取得できない場合には、(4)の条件は幅を持たせても良い。例えば、着目領域が座標DiからX方向、Y方向に夫々±3画素の範囲の座標を含めば、ゴミ領域と判定するなどという条件が考えられる。   In this embodiment, l1 is 3 pixels and l2 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. 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.

ステップS1202で、このような領域があればステップS1203へ進みゴミ領域補間を行い、存在しない場合は処理を終了する。ステップS1203で実行するゴミ領域補間処理は、公知の欠損領域補間法で行う。公知の欠損領域補間法には例えば、特開2001−223894号公報に開示されているパターン置換がある。特開2001−223894号公報では赤外光を用いて欠損領域を特定しているが、本実施形態ではステップS1201で検出したゴミ領域を欠損領域として扱い、パターン置換によりゴミ領域を周囲の正常画素で補間する。パターン置換で埋められない画素については、パターン補間後の画像データに対し、補間対象画素に最も近い順に正常画素をp個選択し、その平均色を用いて補間する。   If there is such an area in step S1202, the process advances to step S1203 to perform dust area interpolation. If there is no such area, the process ends. The dust region interpolation processing executed in step S1203 is performed by a known defect 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 S1201 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.

このように画像にゴミ補正データを添付することで、ゴミ補正用画像データと撮影画像データの対応関係を意識する必要が無くなるという利点がある。また、ゴミ補正データが位置、大きさ、変換用データ(絞り値、レンズの瞳位置の距離情報)で構成されるコンパクトなデータであるので、撮影画像データサイズが極端に大きくなることもない。また、ゴミ補正データで指定された画素を含む領域だけを補間処理することにより、誤検出の確率を大幅に低減することが可能になる。   By attaching dust correction data to an image in this way, there is an advantage that it is not necessary to be aware of the correspondence between dust correction image data and captured image data. 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.

次に、図15を用いて、図10のステップS300で実行されるゴミ補正データ更新ルーチンについて説明する。   Next, the dust correction data update routine executed in step S300 of FIG. 10 will be described using FIG.

図10のステップS300のゴミ補正データ更新ルーチンが実行されると、まずステップS301において、ゴミ補正データの取得が行われる。既にゴミ位置メモリ427に記憶されているゴミ補正データを抽出する。   When the dust correction data update routine of step S300 in FIG. 10 is executed, dust correction data is first acquired in step S301. Dust correction data already stored in the dust position memory 427 is extracted.

次に、ステップS301で抽出したゴミ補正データから座標列Di(i=1,2,…n)、半径列Ri(i=1,2,…,n)、絞り値f1とレンズ瞳位置L1を得る(ステップS302)。ここでRiは、図8のステップS65で算出した座標Diのゴミの大きさである。   Next, the coordinate sequence Di (i = 1, 2,... N), the radius sequence Ri (i = 1, 2,..., N), the aperture value f1, and the lens pupil position L1 are extracted from the dust correction data extracted in step S301. Obtain (step S302). Here, Ri is the size of the dust at the coordinate Di calculated in step S65 of FIG.

ステップS303では、通常撮影された画像の撮影時の絞り値f2とレンズ瞳位置L2を取得し、ステップS304でDiを次式で変換する。ここで、dは画像中心から座標Diまでの距離、Hは撮像素子418の表面とゴミとの距離であるとする。変換後の座標Di’と変換後の半径Ri’は例えば次式で定義する。   In step S303, the aperture value f2 and the lens pupil position L2 at the time of shooting of the normally shot image are acquired, and in step S304, 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 418 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) (2)
ここでの単位はピクセルであり、Ri’についての「+3」はマージン量である。
Di ′ (x, y) = (L2 × (L1−H) × d / ((L2−H) × L1)) × Di (x, y)
Ri ′ = (Ri × f1 / f2 + 3) (2)
The unit here is a pixel, and “+3” for Ri ′ is a margin amount.

ステップS305では、画像データの内の、ステップS304で変換したゴミ座標Di‘(x、y)と半径Ri’の範囲の出力を読み出す。   In step S305, the output of the range of dust coordinates Di ′ (x, y) and radius Ri ′ converted in step S304 in the image data is read.

そしてステップS306では、ステップS305で読み出した領域に、ゴミの影が存在するか否かを判定する。ゴミの影の有無は、下記条件を全て満たす場合をゴミの影無しとし、一つでも満たさない場合にはゴミの影有りとすることで判定を行なう。
(1)図15のステップS304で算出した中心座標Di’、半径Ri’(式(2)で求められたDi’,Ri’)に含まれる画素の平均輝度Yaveが、或る閾値Y0より大きい。
In step S306, it is determined whether there is a dust shadow in the area read in step S305. The presence / absence of a dust shadow is determined by determining that there is no dust shadow when all of the following conditions are satisfied, and that there is a dust shadow when one of the following conditions is not satisfied.
(1) The average luminance Yave of the pixels included in the center coordinate Di ′ and the radius Ri ′ (Di ′, Ri ′ obtained by the equation (2)) calculated in step S304 in FIG. 15 is larger than a certain threshold Y0. .

Yave>Y0
(2)中心座標Di’、半径Ri’(式(2)で求められたDi’,Ri’)に含まれる画素の輝度Yが、全て下記範囲に収まる。
Yave> Y0
(2) All the luminances Y of the pixels included in the center coordinates Di ′ and the radius Ri ′ (Di ′, Ri ′ obtained by the expression (2)) fall within the following range.

K1×Yave<Y<K2×Yave ここで、K1、K2は比例定数
(3)図15のステップS304で算出した中心座標Di’、半径Ri’(式(2)で求められたDi’,Ri’)に含まれる画素の平均輝度Yaveと最高輝度Ymaxを用いて、次式で求められるスレッショルド値T3より暗い領域が存在しない。
K1 × Yave <Y <K2 × Yave Here, K1 and K2 are proportional constants (3), center coordinates Di ′ calculated in step S304 of FIG. 15, radius Ri ′ (Di ′, Ri determined by equation (2)) Using the average luminance Yave and the maximum luminance Ymax of the pixels included in '), there is no region darker than the threshold value T3 obtained by the following equation.

T3=Yave×0.6+Ymax×0.4
(1)で平均輝度Yaveが閾値Y0より大きいかどうかを調べ、(2)で輝度Yがある範囲内に収まっているかを調べることで、中心座標Di’、半径Ri’で定められる領域が、均一画像領域であるかどうか調べている。さらに(3)でゴミの影がないかどうか確認することで、中心座標Di’、半径Ri’で定められる領域にゴミの影が存在するかどうかの判定を行う。
T3 = Yave × 0.6 + Ymax × 0.4
By checking whether or not the average luminance Yave is larger than the threshold Y0 in (1) and checking whether or not the luminance Y is within a certain range in (2), the region defined by the central coordinate Di ′ and the radius Ri ′ is It is checked whether it is a uniform image area. Further, in (3), whether or not there is a dust shadow is determined by checking whether or not there is a dust shadow in the area defined by the center coordinate Di ′ and the radius Ri ′.

(1)において、平均輝度Yaveが閾値Y0より大きいかどうかを調べることで、次のような効果が得られる。即ち、中心座標Di’、半径Ri’で定められる領域に光が到達しないために、ゴミが存在するにもかかわらずゴミの影が映りこまず、ゴミが取れてしまったと判定してしまうことを防止することができる。   In (1), by examining whether the average luminance Yave is greater than the threshold value Y0, the following effects can be obtained. That is, since the light does not reach the area defined by the center coordinates Di ′ and the radius Ri ′, it is determined that the dust is not taken out and the dust is removed even though the dust is present. Can be prevented.

また、(2)において、輝度Yがある範囲内に収まっているかを調べることで、中心座標Di’、半径Ri’で定められる領域が、細かいパターンがなく、ゴミの影の有無の判定を確実に行なえるような模様であるかどうかを判定している。例えばK1=0.8、K2=1.2とすれば、平均輝度Yaveを基準として±20%の範囲に収まっているかどうかを判定することになる。これにより、誤ったゴミ有無の判定を行なうことを防止することができる。   Further, in (2), by checking whether the luminance Y is within a certain range, the region defined by the center coordinate Di ′ and the radius Ri ′ does not have a fine pattern, and it is reliably determined whether there is a shadow of dust. It is judged whether it is a pattern that can be performed. For example, if K1 = 0.8 and K2 = 1.2, it is determined whether the average luminance Yave is within a range of ± 20%. As a result, it is possible to prevent erroneous determination of the presence / absence of dust.

(3)において、スレッショルド値T3より暗い領域があるかどうかを再度確認することで、ゴミの影が本当になくなってしまったのかどうかの最終確認を行なっている。   In (3), by confirming again whether or not there is an area darker than the threshold value T3, a final confirmation is made as to whether or not the shadow of dust has really disappeared.

(1)〜(3)の複数の判定式のAND条件で絞り込むことで、ゴミが付いたままにもかかわらず、その位置のゴミデータを誤って削除してしまう危険を軽減している。   By narrowing down with AND conditions of a plurality of judgment expressions (1) to (3), the risk of accidentally deleting dust data at that position even though dust remains attached is reduced.

ステップS305で読み出したi番目のゴミ領域にゴミの影がない場合には、信頼度パラメータRiをインクリメントする(ステップS307)。信頼度Riは、i番目のゴミ領域の信頼度を示すパラメータであり、初期値は「0」とし、ゴミ有無判定でゴミがないと判定されるたびに1ずづインクリメントされていく。均一輝度画像を取得した際には、信頼度Riは全て初期値「0」にリセットする。つまり、この値が小さければ小さいほど、信頼性の高いデータと言える。   If there is no dust shadow in the i-th dust area read in step S305, the reliability parameter Ri is incremented (step S307). The reliability Ri is a parameter indicating the reliability of the i-th dust region. The initial value is “0”, and is incremented by 1 every time it is determined that there is no dust in the dust presence / absence determination. When the uniform luminance image is acquired, the reliability Ri is reset to the initial value “0”. In other words, the smaller this value, the more reliable the data.

次に、信頼度Riが或る閾値R0より大きいか否かを判定する(ステップS308)。閾値R0より大きい場合には、ゴミがその領域から移動したか、ゴミが取れてしまった可能性が高いと判断し、i番目のゴミ領域のゴミデータを削除する。   Next, it is determined whether or not the reliability Ri is greater than a certain threshold value R0 (step S308). If it is larger than the threshold value R0, it is determined that there is a high possibility that the dust has moved from the area or the dust has been removed, and the dust data in the i-th dust area is deleted.

このように、明らかにゴミが存在しないことがわかったゴミ領域については、ゴミ補正データから削除することで、ゴミ補正データの信頼度を上げることができる。これにより、以降の撮影で、ゴミが取れてしまった領域について不要なゴミ補正を行うことを防止でき、ゴミ補正処理の信頼度を上げることができる。   As described above, by deleting the dust area that clearly has no dust from the dust correction data, the reliability of the dust correction data can be increased. Thereby, it is possible to prevent unnecessary dust correction from being performed on an area where dust has been removed in subsequent shooting, and to improve the reliability of dust correction processing.

ステップS306でゴミの影が存在すると判定されるか、ステップS308で信頼度Riが閾値R0より小さいか、もしくはステップS309でi番目のゴミ領域データが削除された後には、i番目が最終のn番目であるかどうかを判定する(ステップS310)。そして、まだ最終でない場合には、iを一つインクリメントして、次のゴミ領域の判定に移行する。最終番目の場合には、ゴミ補正データ更新ルーチンを終了する。   If it is determined in step S306 that there is a dust shadow, the reliability Ri is smaller than the threshold value R0 in step S308, or the i-th dust area data is deleted in step S309, the i-th is the final n It is determined whether it is the second (step S310). If it is not final yet, i is incremented by one and the process proceeds to determination of the next dust region. In the final case, the dust correction data update routine is terminated.

なお、上記の説明では、ゴミ補正データの更新を撮影した1枚の画像情報に基づいて行うように説明したが、複数枚の画像情報に基づいてゴミ位置の変化を検出し、ゴミ補正データの更新をするようにすれば、より精度を向上させることが可能となる。   In the above description, the dust correction data is updated based on the single image information of the photographed image. However, a change in dust position is detected based on the image information of a plurality of images, and the dust correction data is updated. If the update is performed, the accuracy can be further improved.

以上説明したように、本実施形態の撮像装置では、通常撮影を行なうたびに、ステップS300のゴミ補正データ更新を実行する。これにより、ゴミ補正データに記憶されているゴミ領域に本当にゴミが存在しているか否かを確認し、必要に応じてゴミ補正データの更新を行なっている。これによりゴミ補正データの信頼度を上げ、誤ったゴミ補正処理が行われる危険を軽減している。また、前述のゴミ補正データ更新処理は、通常撮影が行なわれるたびにカメラ内で自動的に行なわれるため、撮影者が不要なゴミ補正処理を指定するような煩雑な作業が不要となる。   As described above, in the imaging apparatus of the present embodiment, the dust correction data update in step S300 is executed every time normal shooting is performed. Thereby, it is confirmed whether or not dust really exists in the dust area stored in the dust correction data, and the dust correction data is updated as necessary. This increases the reliability of the dust correction data and reduces the risk of erroneous dust correction processing. In addition, the dust correction data update process described above is automatically performed in the camera every time normal shooting is performed, so that a troublesome task for the photographer to specify unnecessary dust correction processing is not required.

また、均一輝度パターンを撮影者自らが撮影し、ゴミ補正データを作成する方法も考えられる。しかし、ゴミ補正データの信頼度を上げるためには、本撮影の前もしくは後に毎回均一輝度パターンを撮影する必要があり、撮影者の負担が大きすぎて現実的ではない。本実施形態の撮像装置では、通常撮影のたびに、その撮影した画像に基づいてゴミ補正データの更新が行なわれるシーケンスとなっているため、撮影者が意識することなく、自動的にゴミ補正データの信頼性を上げることが可能となる。   In addition, a method in which the photographer himself photographs a uniform luminance pattern and creates dust correction data is also conceivable. However, in order to increase the reliability of the dust correction data, it is necessary to photograph a uniform luminance pattern before or after the main photographing, which is not realistic because the burden on the photographer is too great. In the imaging apparatus according to the present embodiment, since the dust correction data is updated based on the captured image every time normal shooting is performed, the dust correction data is automatically generated without the photographer being conscious. Can be improved.

以上のような構成によれば、均一輝度画像取得を目的とした撮影以外の通常撮影を行なうたびに、得られた被写体データに基づいてゴミの影が存在するか否かを確認し、ゴミ補正データの更新を行うことで、ゴミ補正データの信頼性を向上させることができる。特に、撮影光学系と撮像素子の間に介在するゴミを除去する機能を有する本実施形態の撮像装置では、均一輝度画像取得後にゴミが移動したり、落ちてしまったりする可能性が高い。そのため、本実施形態のように、通常撮影画像に基づいてゴミ補正データを更新することは非常に有効である。   According to the above configuration, every time normal shooting other than shooting for obtaining a uniform luminance image is performed, it is confirmed whether there is a dust shadow based on the obtained subject data, and dust correction is performed. By updating the data, the reliability of the dust correction data can be improved. In particular, in the image pickup apparatus of the present embodiment having a function of removing dust interposed between the photographing optical system and the image pickup device, there is a high possibility that dust will move or fall after obtaining a uniform luminance image. Therefore, it is very effective to update the dust correction data based on the normal captured image as in this embodiment.

また、通常撮影を行なうたびに、得られた被写体データに基づいて自動的にゴミ補正の更新を行うシーケンスとすることで、撮影者が不要なゴミ補正データを指定する煩雑な作業が不要となる。これにより、撮影者の手を煩わすことなく、撮像装置内で自動的にゴミ補正データを更新することが可能となる。   In addition, since a sequence for automatically updating dust correction based on the obtained subject data every time normal shooting is performed, a troublesome task for the photographer to specify unnecessary dust correction data becomes unnecessary. . This makes it possible to automatically update the dust correction data in the imaging apparatus without bothering the photographer.

(第2の実施形態)
第1の実施形態では、デジタルカメラ本体ではなく、別途用意された画像処理装置を用いてゴミ除去処理を実行した。本実施形態では、デジタルカメラ本体でゴミ除去処理を実行する方法について説明する。この第2の実施形態に係るデジタルカメラの構成は、第1の実施形態と同様であるため、説明を省略し、第1の実施形態と異なる動作のみについて説明する。
(Second Embodiment)
In the first embodiment, the dust removal process is executed using an image processing apparatus prepared separately instead of the digital camera body. In the present embodiment, a method for executing dust removal processing in the digital camera body will be described. Since the configuration of the digital camera according to the second embodiment is the same as that of the first embodiment, description thereof will be omitted, and only operations different from those of the first embodiment will be described.

(ゴミ除去ルーチン)
本実施形態に係るデジタルカメラにおけるゴミ除去ルーチンは、図13のフローチャートで示した処理と同様の処理を行う。当該処理は、マイクロコンピュータ402がメモリ428に記憶されたゴミ除去処理プログラムを実行することにより実施される。
(Dust removal routine)
The dust removal routine in the digital camera according to this embodiment performs the same processing as the processing shown in the flowchart of FIG. This processing is performed by the microcomputer 402 executing a dust removal processing program stored in the memory 428.

例えば十字配置スイッチ116からゴミ除去処理の開始が指示されると、マイクロコンピュータ402は、画像処理回路425に画像バッファメモリ424に記憶されている撮影画像の各画素に対応するデータを呼び出す。画像処理回路425は、図14に示す処理を行い、ゴミ画素の補間処理を実行する。最後に、補間処理結果を新たな画像ファイルとして記録装置419に記録する。   For example, when the start of dust removal processing is instructed from the cross placement switch 116, the microcomputer 402 calls the data corresponding to each pixel of the captured image stored in the image buffer memory 424 to the image processing circuit 425. The image processing circuit 425 performs the processing shown in FIG. 14 and executes dust pixel interpolation processing. Finally, the interpolation processing result is recorded in the recording device 419 as a new image file.

図14の処理の詳細については、第1の実施形態において説明済みであるので省略する。   The details of the processing in FIG. 14 have been described in the first embodiment, and will be omitted.

なお、第2の実施形態の撮像装置においても、通常撮影を行なうたびに、ステップS300のゴミ補正データ更新処理を実行することで、ゴミ補正データに記憶されているゴミ領域に本当にゴミが存在しているかを確認する。そして、必要に応じてゴミ補正データの更新を行なっている。これによりゴミ補正データの信頼度を上げ、誤ったゴミ補正処理が行われる危険を軽減している。また、前述のゴミ補正データ更新処理は、通常撮影が行なわれるたびにカメラ内で自動的に行なわれるため、撮影者が不要なゴミ補正処理を指定するような煩雑な作業が不要となる。   Even in the imaging apparatus of the second embodiment, every time normal shooting is performed, the dust correction data update process in step S300 is executed, so that there is really dust in the dust area stored in the dust correction data. Make sure that The dust correction data is updated as necessary. This increases the reliability of the dust correction data and reduces the risk of erroneous dust correction processing. In addition, the dust correction data update process described above is automatically performed in the camera every time normal shooting is performed, so that a troublesome task for the photographer to specify unnecessary dust correction processing is not required.

以上説明したように、上記の第2の実施形態によれば、ゴミ検出用画像データと通常撮影データの対応関係を意識することなく好適にゴミを除去することが可能になる。さらに、画像にゴミ補正データを埋め込む場合でも、画像データファイルのサイズを大幅に増やすことなくデータを添付することが可能になる。   As described above, according to the second embodiment, dust can be suitably removed without being aware of the correspondence between dust detection image data and normal photographing data. Furthermore, even when dust correction data is embedded in an image, it is possible to attach the data without greatly increasing the size of the image data file.

(他の実施形態)
また、各実施形態の目的は、次のような方法によっても達成される。すなわち、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給する。そして、そのシステムあるいは装置のコンピュータ(または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, based on the instruction of the program code, an operating system (OS) or the like running on the computer performs part or all of the actual processing, 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, a 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.

本発明の第1の実施形態に係わる撮像装置としてのレンズ交換式一眼レフデジタルカメラの回路構成を示すブロック図である。1 is a block diagram illustrating a circuit configuration of a lens interchangeable single-lens reflex digital camera as an imaging apparatus according to a first embodiment of the present invention. 第1の実施形態に係るデジタルカメラの外観を示す斜視図である。1 is a perspective view illustrating an appearance of a digital camera according to a first embodiment. 図2の垂直断面図である。FIG. 3 is a vertical sectional view of FIG. 2. ゴミ検出ルーチンを説明するためのフローチャートである。It is a flowchart for demonstrating a dust detection routine. ゴミ位置メモリに格納されるゴミ補正データのデータ形式例を示す図である。It is a figure which shows the example of a data format of the dust correction data stored in a dust position memory. ブロック単位でゴミ領域取得処理を行なう様子を示した図である。It is the figure which showed a mode that the dust area | region acquisition process was performed per block. ゴミ領域のXmax、Xmin、Ymax、Yminとriの関係を示した図である。It is the figure which showed the relationship between Xmax, Xmin, Ymax, Ymin, and ri of a dust region. ゴミ領域取得ルーチンを説明するためのフローチャートである。It is a flowchart for demonstrating a garbage area | region acquisition routine. 均一輝度撮影ルーチンを説明するためのフローチャートである。It is a flowchart for demonstrating a uniform luminance imaging | photography routine. 通常撮影ルーチンを説明するためのフローチャートである。It is a flowchart for demonstrating a normal imaging | photography routine. ゴミ補正データ更新の概念を説明するための画像データの例を示す図である。It is a figure which shows the example of the image data for demonstrating the concept of dust correction data update. 画像処理装置のシステム構成の概略を示した図である。It is the figure which showed the outline of the system configuration | structure of an image processing apparatus. ゴミ除去ルーチンを説明するためのフローチャートである。It is a flowchart for demonstrating a dust removal routine. 補間ルーチンを説明するためのフローチャートである。It is a flowchart for demonstrating an interpolation routine. ゴミ補正データ更新ルーチンを説明するためのフローチャートである。It is a flowchart for demonstrating a dust correction data update routine.

符号の説明Explanation of symbols

100 カメラ本体
200 撮影光学系
202 レンズマウント
418 撮像素子
DESCRIPTION OF SYMBOLS 100 Camera body 200 Shooting optical system 202 Lens mount 418 Image sensor

Claims (8)

被写体像を光電変換する複数の画素が2次元的に配列された撮像素子と、
前記撮像素子の前方の撮影光軸上に配設された光学部材に付着した異物の位置に関する情報を検出する異物検出手段と、
前記異物検出手段で検出された少なくとも前記異物の位置に関する情報を記憶する記憶手段と、
前記撮像素子により前記被写体像を光電変換して得られた撮像画像と前記記憶手段に記憶されている異物の位置に関する情報とに基づいて、前記異物の前記光学部材への付着状態の変化を検出する変化検出手段と、
前記変化検出手段により検出された前記異物の付着状態の変化の情報に基づいて、前記記憶手段に記憶されている前記異物の位置に関する情報を更新する更新手段と、
を具備することを特徴とする撮像装置。
An image sensor in which a plurality of pixels for photoelectrically converting a subject image are two-dimensionally arranged;
Foreign matter detection means for detecting information on the position of the foreign matter attached to the optical member disposed on the photographing optical axis in front of the imaging element;
Storage means for storing information on at least the position of the foreign matter detected by the foreign matter detection means;
Based on a captured image obtained by photoelectrically converting the subject image by the imaging element and information on the position of the foreign matter stored in the storage unit, a change in the state of attachment of the foreign matter to the optical member is detected. Change detecting means for
Updating means for updating the information on the position of the foreign matter stored in the storage means based on the information on the change in the adhesion state of the foreign matter detected by the change detection means;
An imaging apparatus comprising:
前記記憶手段に記憶されている少なくとも前記異物の位置に関する情報を、前記撮像画像に添付して記憶媒体に記憶させることを特徴とする請求項1に記載の撮像装置。   The imaging apparatus according to claim 1, wherein at least information related to the position of the foreign matter stored in the storage unit is attached to the captured image and stored in a storage medium. 前記変化検出手段は、前記記憶手段に記憶されている異物の位置に関する情報に対応する前記撮像画像の画面上の位置に前記異物が存在するか否かを検出し、異物が存在しないことが検出された場合に、前記更新手段は、前記記憶手段に記憶されている前記異物の位置に関する情報から前記存在しないことが検出された異物の位置に関する情報を削除することを特徴とする請求項1に記載の撮像装置。   The change detecting means detects whether or not the foreign substance exists at a position on the screen of the captured image corresponding to the information on the position of the foreign substance stored in the storage means, and detects that no foreign substance exists. In this case, the updating unit deletes the information on the position of the foreign object detected to be absent from the information on the position of the foreign object stored in the storage unit. The imaging device described. 前記変化検出手段は、複数枚の前記撮像画像に基づいて、前記異物の前記光学部材への付着状態の変化を検出することを特徴とする請求項1に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the change detection unit detects a change in an adhesion state of the foreign matter to the optical member based on a plurality of the captured images. 前記異物を前記光学部材から除去する除去手段をさらに具備することを特徴とする請求項1に記載の撮像装置。   The imaging apparatus according to claim 1, further comprising a removing unit that removes the foreign matter from the optical member. 被写体像を光電変換する複数の画素が2次元的に配列された撮像素子と、前記撮像素子の前方の撮影光軸上に配設された光学部材に付着した異物の位置に関する情報を検出する異物検出手段と、前記異物検出手段で検出された少なくとも前記異物の位置に関する情報を記憶する記憶手段と、を備える撮像装置を制御する方法であって、
前記撮像素子により前記被写体像を光電変換して得られた撮像画像と前記記憶手段に記憶されている異物の位置に関する情報とに基づいて、前記異物の前記光学部材への付着状態の変化を検出する変化検出工程と、
前記変化検出工程において検出された前記異物の付着状態の変化の情報に基づいて、前記記憶手段に記憶されている前記異物の位置に関する情報を更新する更新工程と、
を具備することを特徴とする撮像装置の制御方法。
An image sensor in which a plurality of pixels that photoelectrically convert a subject image are two-dimensionally arranged, and a foreign object that detects information related to the position of a foreign object attached to an optical member disposed on a photographing optical axis in front of the image sensor A method for controlling an imaging apparatus comprising: a detection unit; and a storage unit that stores information on at least the position of the foreign matter detected by the foreign matter detection unit,
Based on a captured image obtained by photoelectrically converting the subject image by the imaging element and information on the position of the foreign matter stored in the storage unit, a change in the state of attachment of the foreign matter to the optical member is detected. A change detection step to
An update step of updating information on the position of the foreign matter stored in the storage unit based on information on a change in the adhesion state of the foreign matter detected in the change detection step;
An image pickup apparatus control method comprising:
請求項6に記載の制御方法をコンピュータに実行させることを特徴とするプログラム。   A program for causing a computer to execute the control method according to claim 6. 請求項7に記載のプログラムを記憶したことを特徴とするコンピュータ読み取り可能な記憶媒体。   A computer-readable storage medium storing the program according to claim 7.
JP2007082744A 2007-03-27 2007-03-27 Imaging apparatus, and control method, program and storage medium thereof Pending JP2008244868A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007082744A JP2008244868A (en) 2007-03-27 2007-03-27 Imaging apparatus, and control method, program and storage medium thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007082744A JP2008244868A (en) 2007-03-27 2007-03-27 Imaging apparatus, and control method, program and storage medium thereof

Publications (2)

Publication Number Publication Date
JP2008244868A true JP2008244868A (en) 2008-10-09
JP2008244868A5 JP2008244868A5 (en) 2010-05-20

Family

ID=39915653

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007082744A Pending JP2008244868A (en) 2007-03-27 2007-03-27 Imaging apparatus, and control method, program and storage medium thereof

Country Status (1)

Country Link
JP (1) JP2008244868A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011239037A (en) * 2010-05-06 2011-11-24 Fujitsu Ltd Image processing apparatus, image processing method, computer program for image processing, and imaging apparatus
JP2015222934A (en) * 2014-05-23 2015-12-10 カルソニックカンセイ株式会社 Vehicle periphery display device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05260385A (en) * 1992-03-16 1993-10-08 Sony Corp Defect picture element detection circuit for solid-state image pickup device
JP2004200818A (en) * 2002-12-16 2004-07-15 Nikon Corp Electronic camera
JP2004222232A (en) * 2002-12-27 2004-08-05 Nikon Corp Image processor and image processing program
JP2004317377A (en) * 2003-04-17 2004-11-11 Nikon Corp Foreign matter detection tool, camera body, and foreign matter detection system for lens replacing type digital camera
JP2005260573A (en) * 2004-03-11 2005-09-22 Nikon Corp Electronic camera, camera system and black point correcting method of electronic camera
JP2006010725A (en) * 2004-06-22 2006-01-12 Nikon Corp Attachment for camera and camera system
JP2006191203A (en) * 2004-12-28 2006-07-20 Konica Minolta Holdings Inc Dust removing apparatus, and imaging apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05260385A (en) * 1992-03-16 1993-10-08 Sony Corp Defect picture element detection circuit for solid-state image pickup device
JP2004200818A (en) * 2002-12-16 2004-07-15 Nikon Corp Electronic camera
JP2004222232A (en) * 2002-12-27 2004-08-05 Nikon Corp Image processor and image processing program
JP2004317377A (en) * 2003-04-17 2004-11-11 Nikon Corp Foreign matter detection tool, camera body, and foreign matter detection system for lens replacing type digital camera
JP2005260573A (en) * 2004-03-11 2005-09-22 Nikon Corp Electronic camera, camera system and black point correcting method of electronic camera
JP2006010725A (en) * 2004-06-22 2006-01-12 Nikon Corp Attachment for camera and camera system
JP2006191203A (en) * 2004-12-28 2006-07-20 Konica Minolta Holdings Inc Dust removing apparatus, and imaging apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011239037A (en) * 2010-05-06 2011-11-24 Fujitsu Ltd Image processing apparatus, image processing method, computer program for image processing, and imaging apparatus
JP2015222934A (en) * 2014-05-23 2015-12-10 カルソニックカンセイ株式会社 Vehicle periphery display device

Similar Documents

Publication Publication Date Title
JP4590355B2 (en) Image processing apparatus, image processing method, and program
KR100815512B1 (en) Image capturing apparatus and control method thereof
JP4799462B2 (en) Image processing apparatus, control method thereof, program, storage medium, and imaging apparatus
US7991241B2 (en) Image processing apparatus, control method therefor, and program
JP4771539B2 (en) Image processing apparatus, control method therefor, and program
JP4771540B2 (en) Image processing apparatus, control method therefor, image processing method and program
JP2008033442A (en) Image processor, its control method, and program
JP5078446B2 (en) Image processing apparatus, control method therefor, and program
US8576306B2 (en) Image sensing apparatus, image processing apparatus, control method, and computer-readable medium
JP5617470B2 (en) Dust processing device, imaging device, photographing lens, and dust processing program
JP4960852B2 (en) Image processing apparatus, control method thereof, interchangeable lens single-lens reflex digital camera, and program
JP2008244868A (en) Imaging apparatus, and control method, program and storage medium thereof
JP4827778B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP2010098698A (en) Imaging apparatus, control method thereof and program
JP5094571B2 (en) Imaging apparatus, control method thereof, and program
JP2011061390A (en) Image processing apparatus
JP2009152696A (en) Imaging apparatus, control method thereof, program, and image processing apparatus
JP2010014981A (en) Imaging apparatus, its control method, and program
JP2008306307A (en) Image processing unit, image processing method, and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100324

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100324

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110825

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110905

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111102

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120302