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

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

Info

Publication number
JP2008005059A
JP2008005059A JP2006170580A JP2006170580A JP2008005059A JP 2008005059 A JP2008005059 A JP 2008005059A JP 2006170580 A JP2006170580 A JP 2006170580A JP 2006170580 A JP2006170580 A JP 2006170580A JP 2008005059 A JP2008005059 A JP 2008005059A
Authority
JP
Japan
Prior art keywords
lens
image
information
foreign matter
foreign object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2006170580A
Other languages
Japanese (ja)
Inventor
Hironobu Arifuku
浩信 有福
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 JP2006170580A priority Critical patent/JP2008005059A/en
Publication of JP2008005059A publication Critical patent/JP2008005059A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To acquire a more accurate foreign matter information profile in the case of photographing a uniform object such as a white wall to obtain a foreign matter information profile. <P>SOLUTION: An imaging apparatus includes: a body section 101 to which a lens is interchangeably mounted; an imaging element 40 for applying photoelectric conversion to an object image; an acquisition section 1 for acquiring information unique to the lens from the lens by means of the communication section; a foreign matter information generating section 40 for generating foreign matter information including at least information of positions and sizes of the foreign matter on the basis of a foreign matter detection image including an image of the foreign matter imaged by the imaging element and adhering to the surface of the imaging element or the surface of the optical element arranged in front of the imaging element; and a restriction section 1 for inhibiting imaging of the foreign matter detection image when it is determined that the lens mounted on the body section is an improper lens to image the foreign matter detection image. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、デジタルカメラ等の撮像装置において、光学系内に付着した異物の位置及び大きさ等の情報を取得する技術に関するものである。   The present invention relates to a technique for acquiring information such as the position and size of a foreign substance attached in an optical system in an imaging apparatus such as a digital camera.

従来より、デジタルカメラにおいては、光学系内(特に撮像素子の前方に配置されたローパスフィルタなどの光学素子の表面)にゴミ等の異物が付着すると、撮影された画像にそれらの異物の影が写り込み、画像の品質が低下するという問題がある。   Conventionally, in a digital camera, when foreign objects such as dust adhere to the optical system (especially the surface of an optical element such as a low-pass filter disposed in front of the image sensor), the shadows of the foreign objects are shadowed on the captured image. There is a problem that the image quality is deteriorated.

この問題を解決するために、次のような方法が提案されている。まず、白壁等の一様な被写体を撮影し、ほぼ光学系内の異物のみが写りこんだ画像を撮影する。そして、その画像から光学系内の異物の情報を得て、本撮影した画像の補正処理を行って、画像の品質を向上させる(特許文献1参照)。
特開2004−222231号公報
In order to solve this problem, the following method has been proposed. First, a uniform subject such as a white wall is photographed, and an image in which only foreign matter in the optical system is reflected is photographed. Then, information on the foreign matter in the optical system is obtained from the image, and the correction processing of the actually captured image is performed to improve the image quality (see Patent Document 1).
JP 2004-222231 A

しかしながら、上記の従来の方法で白壁等の一様な被写体を撮影し、異物情報を取得する場合、カメラに装着するレンズによっては品質の高い異物情報が得られないことがある。   However, when photographing a uniform subject such as a white wall by the above-described conventional method and acquiring foreign matter information, high quality foreign matter information may not be obtained depending on the lens attached to the camera.

具体的には、一様な画像を得るために白壁等を撮影すると、その品質はカメラに装着されているレンズの特性に左右される。たとえば白壁を写したつもりでも異物と判断される部分を含んだ画像が得られてしまったり、カメラの光学系内に異物が付着していた場合でもその異物がはっきりと写らなかったりする。   Specifically, when a white wall or the like is photographed to obtain a uniform image, the quality depends on the characteristics of the lens attached to the camera. For example, even if a white wall is intended to be copied, an image including a portion that is determined to be a foreign object is obtained, or even if a foreign object is attached in the optical system of the camera, the foreign object is not clearly visible.

品質の高い異物情報を得るためには、異物の影が撮像素子上の正確な位置にはっきりと写り込むようなレンズをカメラに装着することが望ましい。   In order to obtain high quality foreign object information, it is desirable to attach a lens to the camera so that the shadow of the foreign object is clearly reflected at an accurate position on the image sensor.

従って、本発明は上述した課題に鑑みてなされたものであり、その目的は、白壁等の一様な被写体を撮影して異物情報を得る場合に、より正確な異物情報を得られるようにすることである。   Accordingly, the present invention has been made in view of the above-described problems, and an object of the present invention is to obtain more accurate foreign object information when photographing a uniform subject such as a white wall to obtain foreign object information. That is.

上述した課題を解決し、目的を達成するために、本発明に係わる撮像装置は、レンズを交換可能に装着する本体部と、被写体像を光電変換する撮像素子と、前記レンズと通信を行なう通信手段と、前記通信手段により、前記レンズから該レンズ固有の情報を取得する取得手段と、前記撮像素子によって撮像されたところの、前記撮像素子の表面、又は前記撮像素子の前方に配置された光学素子の表面に付着した異物の像を含む異物検出用画像に基づいて、少なくとも前記異物の位置及び大きさの情報を含む情報である異物情報を生成する異物情報生成手段と、前記取得手段により取得された前記レンズ固有の情報に基づいて、前記本体部に装着されたレンズが前記異物検出用画像を撮像するのに不適切なレンズであると判断された場合に、前記異物検出用画像の撮像を禁止する規制手段と、を具備することを特徴とする。   In order to solve the above-described problems and achieve the object, an imaging apparatus according to the present invention includes a main body unit in which a lens is replaceably mounted, an imaging element that photoelectrically converts a subject image, and communication that communicates with the lens. Means for acquiring information specific to the lens from the lens by means of the communication means, and an optical device disposed on the surface of the image sensor or in front of the image sensor, which is imaged by the image sensor. Obtained by the foreign matter information generating means for generating foreign matter information which is information including at least the position and size information of the foreign matter based on the foreign matter detection image containing the foreign matter image attached to the surface of the element, and acquired by the obtaining means When it is determined that the lens attached to the main body is an inappropriate lens for capturing the foreign object detection image based on the information unique to the lens, Characterized by comprising a regulating means for inhibiting imaging of the foreign substance detection image.

また、本発明に係わる撮像装置の制御方法は、レンズを交換可能に装着する本体部と、被写体像を光電変換する撮像素子とを備える撮像装置を制御する方法であって、前記レンズと通信を行ない、前記レンズから該レンズ固有の情報を取得する取得工程と、前記撮像素子によって撮像されたところの、前記撮像素子の表面、又は前記撮像素子の前方に配置された光学素子の表面に付着した異物の像を含む異物検出用画像に基づいて、少なくとも前記異物の位置及び大きさの情報を含む情報である異物情報を生成する異物情報生成工程と、前記取得工程において取得された前記レンズ固有の情報に基づいて、前記本体部に装着されたレンズが前記異物検出用画像を撮像するのに不適切なレンズであると判断された場合に、前記異物検出用画像の撮像を禁止する規制工程と、を具備することを特徴とする。   An image pickup apparatus control method according to the present invention is a method for controlling an image pickup apparatus including a main body unit in which a lens is replaceably mounted and an image pickup element that photoelectrically converts a subject image, and communicates with the lens. Performing an acquisition step of acquiring information specific to the lens from the lens, and attached to the surface of the image sensor, or the surface of the optical element disposed in front of the image sensor, captured by the image sensor Based on a foreign object detection image including a foreign object image, a foreign object information generation step for generating foreign object information, which is information including at least the position and size information of the foreign object, and the lens-specific information acquired in the acquisition step Based on the information, when it is determined that the lens attached to the main body is an inappropriate lens for capturing the foreign object detection image, the foreign object detection image Characterized in that it comprises a and a regulating step of prohibiting the image.

また、本発明に係わるプログラムは、上記の制御方法をコンピュータに実行させることを特徴とする。   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, more accurate foreign object information can be obtained when foreign object information is obtained by photographing a uniform subject such as a white wall.

以下、本発明をレンズ交換式デジタル一眼レフカメラに適用した一実施形態について、添付図面を参照して詳細に説明する。   Hereinafter, an embodiment in which the present invention is applied to an interchangeable lens digital single-lens reflex camera will be described in detail with reference to the accompanying drawings.

図1は本発明の撮像装置の一実施形態であるカメラシステムの構成を示す断面図であり、カメラ本体と交換レンズからなるデジタル一眼レフカメラシステムの撮影準備状態を示している。   FIG. 1 is a cross-sectional view showing a configuration of a camera system which is an embodiment of an imaging apparatus of the present invention, and shows a shooting preparation state of a digital single lens reflex camera system including a camera body and an interchangeable lens.

図1において、101はカメラ本体で、このカメラ本体101に対して着脱可能な交換レンズ180はカメラマウント102とレンズマウント182によって固定される。そしてカメラ側接点103とレンズ側接点184とが接触することによって、カメラ内制御部とレンズ内制御部の電気的な接続がなされ、カメラ本体101から交換レンズ180への電力の供給やレンズを制御するための通信が行われる。なお、カメラ内制御部とは、図2に示すマイクロコンピュータ1であり、レンズ内制御部とは、図2及び図3に示すレンズ内マイクロコンピュータ16である。また、カメラ側接点103は、図2及び図3に示す接点12,13,14,15といった複数の接点を含む。また、レンズ側接点184は、図2及び図3に示す接点22,23,24,25といった複数の接点を含む。   In FIG. 1, reference numeral 101 denotes a camera body. An interchangeable lens 180 that can be attached to and detached from the camera body 101 is fixed by a camera mount 102 and a lens mount 182. When the camera side contact 103 and the lens side contact 184 come into contact with each other, the in-camera control unit and the in-lens control unit are electrically connected to supply power from the camera body 101 to the interchangeable lens 180 and control the lens. To communicate. The in-camera control unit is the microcomputer 1 shown in FIG. 2, and the in-lens control unit is the in-lens microcomputer 16 shown in FIGS. The camera-side contact 103 includes a plurality of contacts such as contacts 12, 13, 14, and 15 shown in FIGS. Further, the lens side contact 184 includes a plurality of contacts such as contacts 22, 23, 24, and 25 shown in FIGS.

交換レンズ180の撮影光学系181を透過した光束は、カメラのメインミラー105に入射する。メインミラー105はハーフミラーとなっており、ここで反射した光束はファインダスクリーン109へと導かれ、ファインダスクリーン109に被写体像が形成される。そして撮影者はペンタダハプリズム111及び接眼レンズ112を介して、ファインダスクリーン109上の被写体像を観察することができる。   The light beam that has passed through the photographing optical system 181 of the interchangeable lens 180 is incident on the main mirror 105 of the camera. The main mirror 105 is a half mirror, and the light beam reflected here is guided to the finder screen 109, and a subject image is formed on the finder screen 109. The photographer can observe the subject image on the viewfinder screen 109 via the penta roof prism 111 and the eyepiece 112.

一方、メインミラー105を透過した光束はサブミラー107にて下方へ反射され、焦点検出ユニット8へと導かれる。焦点検出ユニット8は、撮影光学系181のピントずれ量、いわゆるデフォーカス量を検出し、撮影光学系181が合焦状態となるように撮影光学系181内のフォーカスレンズのレンズ駆動量を演算する。このレンズ駆動量が接点103、184を介して交換レンズ180へ送出されると、レンズ内制御部は不図示のモータを制御し、撮影光学系181内のフォーカスレンズを駆動して焦点調節を行なう。   On the other hand, the light beam transmitted through the main mirror 105 is reflected downward by the sub mirror 107 and guided to the focus detection unit 8. The focus detection unit 8 detects a focus shift amount of the photographic optical system 181, a so-called defocus amount, and calculates a lens driving amount of the focus lens in the photographic optical system 181 so that the photographic optical system 181 is in a focused state. . When this lens driving amount is sent to the interchangeable lens 180 via the contacts 103 and 184, the in-lens control unit controls a motor (not shown) to drive the focus lens in the photographing optical system 181 to adjust the focus. .

メインミラー105はメインミラー保持枠106に接着固定され、ヒンジ軸106aによってミラーボックス199に対して回転可能に軸支されている。また、サブミラー107はサブミラー保持枠108に対して接着固定され、サブミラー保持枠108はヒンジ軸108aによってメインミラー保持枠106に対して回転可能に軸支されている。   The main mirror 105 is bonded and fixed to the main mirror holding frame 106, and is rotatably supported with respect to the mirror box 199 by a hinge shaft 106a. Further, the sub mirror 107 is bonded and fixed to the sub mirror holding frame 108, and the sub mirror holding frame 108 is pivotally supported with respect to the main mirror holding frame 106 by a hinge shaft 108a.

サブミラー107の後方にはフォーカルプレンシャッタ113が配置され、そのシャッタ先幕113aは通常閉じた状態、すなわち後述する撮像素子を遮光する状態としている。シャッタ113の後方には光学ローパスフィルタ及び赤外線カットフィルタを一体化した光学フィルタ114が配置されており、撮影時には光学フィルタ114を透過した光束が更に後方に配置された撮像素子115へ入射される。   A focal plane shutter 113 is disposed behind the sub-mirror 107, and the shutter front curtain 113a is normally closed, that is, a state in which an image sensor to be described later is shielded. An optical filter 114 in which an optical low-pass filter and an infrared cut filter are integrated is disposed behind the shutter 113, and a light beam that has passed through the optical filter 114 is incident on an image sensor 115 disposed further rearward during photographing.

撮像素子115は、カバーガラス115a、センサパッケージ115b、センサチップ115c、センサ基板115dより構成される。ここで撮像素子あるいは撮像手段とは、狭義にはセンサチップ115c単体、広義には前記115a乃至115dからなる撮像素子ユニット、さらにはこの撮像素子ユニットと光学フィルタ114を合わせた構造体を指すものとする。   The image sensor 115 includes a cover glass 115a, a sensor package 115b, a sensor chip 115c, and a sensor substrate 115d. Here, the image pickup device or the image pickup means refers to a sensor chip 115c alone in a narrow sense, an image pickup device unit including the above-described 115a to 115d in a broad sense, and a structure in which the image pickup device unit and the optical filter 114 are combined. To do.

160はLCD等の表示器で、カメラの撮影モードに関する情報、撮影前のプレビュー画像、撮影後の確認用画像等を表示する。   Reference numeral 160 denotes a display such as an LCD, which displays information related to the shooting mode of the camera, a preview image before shooting, a confirmation image after shooting, and the like.

図2は、一実施形態に係わるレンズ交換式デジタル一眼レフカメラのカメラ本体101に、交換レンズ180としてのズームレンズ202を装着した状態での電気制御ブロックの構成を示す図である。   FIG. 2 is a diagram illustrating a configuration of an electric control block in a state where the zoom lens 202 as the interchangeable lens 180 is attached to the camera body 101 of the interchangeable lens digital single lens reflex camera according to the embodiment.

図2において、カメラ内制御部であるマイクロコンピュータ(マイコン)1はカメラ全体の動作を制御している。このマイコン1の内部にはRAM、ROM、EEPROM等のメモリが内蔵(外付けでも構わない)されており、このEEPROMにはカメラの各種設定値やレンズ情報などが記憶される。また、マイコン1にはフォーカルプレンシャッタ113を動作させるためのスイッチであるSW2が接続され、所定の条件を満たした状態でスイッチSW2がONになるとシャッタ制御を行い、撮像素子115の露光を開始する。   In FIG. 2, a microcomputer (microcomputer) 1 serving as an in-camera control unit controls the operation of the entire camera. The microcomputer 1 has a built-in memory (RAM, ROM, EEPROM, etc.), which may be externally attached, and stores various setting values, lens information, and the like of the camera. Further, the microcomputer 1 is connected to SW2, which is a switch for operating the focal plane shutter 113. When the switch SW2 is turned on in a state where a predetermined condition is satisfied, shutter control is performed and exposure of the image sensor 115 is started. .

なお、ここでスイッチSW2とは、カメラ本体101に備えられている不図示のレリーズボタンが全押しされることによりONとなるスイッチであり、このスイッチSW2がONされることによりカメラの撮像動作が開始される。また、後述するスイッチSW1とは、上記のレリーズボタンの半押し(レリーズボタンの操作途中)でONとなるスイッチであり、このスイッチSW1がONされることにより、撮像のための準備動作が開始される。   Here, the switch SW2 is a switch that is turned on when a release button (not shown) provided in the camera body 101 is fully pressed, and the imaging operation of the camera is performed when the switch SW2 is turned on. Be started. The switch SW1, which will be described later, is a switch that is turned on when the release button is pressed halfway (while the release button is being operated), and when this switch SW1 is turned on, a preparatory operation for imaging is started. The

ストロボ制御回路2は、不図示のストロボ発光制御回路とレンズ202の焦点距離に合わせて照射角を制御するズームストロボ制御回路からなる。ストロボ発光制御回路はストロボの発光と調光を制御するもので、発光のための電荷を蓄積する回路、発光部であるキセノン管、トリガー回路、発光を停止させる回路、撮像面反射光測光回路、積分回路等からなる。そして、フォーカルプレンシャッタ113の先幕走行によりONするX接点のONでストロボの閃光を開始する。ズームストロボ制御回路は、装着されたレンズ202の焦点距離によって必要且つ適正なストロボの照射角が異なるので、焦点距離に合わせて反射傘等を移動させることにより照射角を変化させる回路である。ストロボ発光制御回路とズームストロボ制御回路は、いずれも既知の回路である。   The strobe control circuit 2 includes a strobe light emission control circuit (not shown) and a zoom strobe control circuit that controls the irradiation angle in accordance with the focal length of the lens 202. The strobe light emission control circuit controls the light emission and dimming of the strobe. A circuit that accumulates charges for light emission, a xenon tube that is a light emission unit, a trigger circuit, a circuit that stops light emission, an imaging surface reflected light photometry circuit, It consists of an integration circuit. Then, the flash of the strobe is started when the X contact point which is turned on when the focal plane shutter 113 is driven in the first curtain is turned on. The zoom strobe control circuit is a circuit that changes the irradiation angle by moving a reflector or the like according to the focal length because the necessary and appropriate strobe irradiation angle varies depending on the focal length of the lens 202 mounted. Both the strobe light emission control circuit and the zoom strobe control circuit are known circuits.

液晶表示回路3は、シャッタスピード、絞り制御値などのカメラの各撮影情報を表示する回路であり、マイコン1から表示信号を受けている間DBUS(接続バス)を介してシリアル通信を行い、通信内容により液晶表示を行う。   The liquid crystal display circuit 3 is a circuit for displaying each camera shooting information such as shutter speed and aperture control value, and performs serial communication via the DBUS (connection bus) while receiving a display signal from the microcomputer 1. Displays liquid crystal depending on the content.

スイッチ検出回路7は液晶表示回路3と共に常に電源が供給されている。そして、前述したスイッチSW1やSW2、その他不図示の露出モードを決めるスイッチやカメラの自動焦点調節(AF)モードを決めるスイッチ等を常に読み取ることができる。スイッチ検出回路7はスイッチが切替わるとDBUSを介しシリアル通信を行って、マイコン1に各スイッチ情報を通信する。   The switch detection circuit 7 is always supplied with power together with the liquid crystal display circuit 3. The above-described switches SW1 and SW2, other switches for determining an exposure mode (not shown), switches for determining an automatic focus adjustment (AF) mode of the camera, and the like can always be read. When the switch is switched, the switch detection circuit 7 performs serial communication via DBUS and communicates each switch information to the microcomputer 1.

焦点検出ユニット8はレンズ202を通して得られる被写体の像信号から被写体がレンズ202によりどの位置に焦点を結んでいるかを位相差検出法で演算して検出する。電池9はカメラ各部やレンズ各部の電源である。なお電池交換等で電池を装着した際には、カメラシステム全体がリセットされるようになされている。   The focus detection unit 8 calculates and detects in which position the subject is focused by the lens 202 from the image signal of the subject obtained through the lens 202 by a phase difference detection method. The battery 9 is a power source for each part of the camera and each part of the lens. Note that the entire camera system is reset when a battery is mounted for battery replacement or the like.

撮像部40は、図1に示した撮像素子115や、撮像素子115から出力されるアナログ信号をデジタル信号に変換するA/D変換器や、各種の画像処理を行う画像処理回路等を備えている。   The imaging unit 40 includes the imaging device 115 illustrated in FIG. 1, an A / D converter that converts an analog signal output from the imaging device 115 into a digital signal, an image processing circuit that performs various image processing, and the like. Yes.

DC/DCコンバータ10は、負荷の状態により変化する電池9の出力電圧を安定化してカメラ各部とレンズ202へ供給する。DC/DCコンバータ10はマイコン1により制御され、マイコン1が低速のクロックで動作する場合等で、安定化電源が必要なく電池9の出力そのままで動作できる場合等には停止する。停止状態ではDC/DCコンバータ10から電池9の電圧をそのまま出力して消費電力を削減するように構成されている。   The DC / DC converter 10 stabilizes the output voltage of the battery 9 that changes depending on the load state, and supplies the output voltage to each part of the camera and the lens 202. The DC / DC converter 10 is controlled by the microcomputer 1 and stops when the microcomputer 1 operates with a low-speed clock, or when the stabilized power supply is not required and the battery 9 can be operated as it is. In the stopped state, the voltage of the battery 9 is output as it is from the DC / DC converter 10 to reduce power consumption.

レンズ検知回路11は、レンズの着脱の状態を検知してマイコン1に入力すると共に、マイコン1の指示により装着されたレンズへの電源供給を制御する。電源供給端子12はカメラ本体101からレンズ202へ電源を供給するための端子であり、レンズ202が装着されるとレンズ検知回路11より電源が供給される。カメラ本体101のレンズ装着検知端子13は、レンズが装着されるとレンズ202側の端子23と接続される。14はカメラ本体101側のグラウンド端子である。カメラ本体101側の各通信端子15a,15b,15cはレンズ202とシリアル通信を行う。   The lens detection circuit 11 detects the lens attachment / detachment state and inputs it to the microcomputer 1, and controls power supply to the lens mounted according to an instruction from the microcomputer 1. The power supply terminal 12 is a terminal for supplying power from the camera body 101 to the lens 202. When the lens 202 is attached, power is supplied from the lens detection circuit 11. The lens mounting detection terminal 13 of the camera body 101 is connected to the terminal 23 on the lens 202 side when the lens is mounted. Reference numeral 14 denotes a ground terminal on the camera body 101 side. Each communication terminal 15a, 15b, 15c on the camera body 101 side performs serial communication with the lens 202.

一方、レンズ202側では、レンズ内のマイコン16はカメラ本体側のマイコン1と通信を行い、カメラ本体101の指示に従ってフォーカス、絞り、ズームの駆動を行うと共に、レンズ固有の情報をカメラに通信する。レンズ固有の情報には焦点距離、絞り、最小絞り、フォーカス位置といった情報が存在する。   On the other hand, on the lens 202 side, the microcomputer 16 in the lens communicates with the microcomputer 1 on the camera body side to drive focus, aperture, and zoom according to instructions from the camera body 101 and to communicate information specific to the lens to the camera. . Information unique to the lens includes information such as focal length, aperture, minimum aperture, and focus position.

フォーカス駆動回路17はレンズ内のマイコン16の指示に従ってフォーカスレンズ(不図示)を駆動し、フォーカス位置検出部18でフォーカス駆動回路17により駆動されたフォーカスレンズの位置及び移動量を検出する。   The focus drive circuit 17 drives a focus lens (not shown) according to an instruction from the microcomputer 16 in the lens, and a focus position detection unit 18 detects the position and amount of movement of the focus lens driven by the focus drive circuit 17.

絞り駆動回路19はレンズ内のマイコン16の指示に従って絞りを駆動し、絞り位置検出部20で絞り駆動回路19により駆動された絞りの位置及び移動量を検出する。   The diaphragm drive circuit 19 drives the diaphragm in accordance with instructions from the microcomputer 16 in the lens, and the diaphragm position detection unit 20 detects the position and movement amount of the diaphragm driven by the diaphragm drive circuit 19.

ズーム位置検出部21は、ズームレンズ(不図示)の位置及び移動量を検出する。   The zoom position detector 21 detects the position and movement amount of a zoom lens (not shown).

レンズ202側の電源端子22はカメラの電源供給端子12から電源の供給を受ける。 レンズ202側のレンズ装着検知端子23がカメラ本体101側のレンズ装着検知端子13と正常に接続されると、カメラ本体101はレンズ装着を検知する。レンズ202側のグラウンド端子24はカメラ本体101側のグラウンド端子14に接続されレンズ装着検知端子23にも接続されている。   The power terminal 22 on the lens 202 side is supplied with power from the power supply terminal 12 of the camera. When the lens mounting detection terminal 23 on the lens 202 side is normally connected to the lens mounting detection terminal 13 on the camera body 101 side, the camera body 101 detects the lens mounting. The ground terminal 24 on the lens 202 side is connected to the ground terminal 14 on the camera body 101 side and is also connected to the lens mounting detection terminal 23.

レンズ202側の各通信端子25a,25b,26cとカメラ本体101側の各通信端子15a,15b,15cが接続されて、レンズ内マイコン16とカメラ内マイコン1の間でシリアル通信を行う。   The communication terminals 25a, 25b, and 26c on the lens 202 side and the communication terminals 15a, 15b, and 15c on the camera body 101 side are connected to perform serial communication between the microcomputer 16 in the lens and the microcomputer 1 in the camera.

図3は、一実施形態に係わるレンズ交換式デジタル一眼レフカメラのカメラ本体101に、交換レンズ180としての単焦点レンズ204を装着した状態での電気制御ブロックの構成を示す図である。図3では、図2と同一部分には同一符号を付して、その説明を省略する。   FIG. 3 is a diagram illustrating a configuration of an electric control block in a state where a single focus lens 204 as the interchangeable lens 180 is attached to the camera body 101 of the interchangeable lens type digital single lens reflex camera according to the embodiment. In FIG. 3, the same parts as those in FIG.

図3において、単焦点レンズ204内のマイコン26は、カメラ内のマイコン1と通信を行いカメラ内のマイコン1の指示に従ってフォーカス、絞り、ズームの駆動を行うと共に、レンズ固有の情報をカメラに通信する。   In FIG. 3, the microcomputer 26 in the single focus lens 204 communicates with the microcomputer 1 in the camera, drives the focus, aperture, and zoom according to instructions from the microcomputer 1 in the camera, and communicates lens-specific information to the camera. To do.

フォーカス駆動回路27はレンズ内のマイコン26の指示に従ってフォーカスレンズを駆動し、フォーカス位置検出部28でフォーカス駆動回路27により駆動したフォーカスレンズの位置及び移動量を検出する。絞り駆動回路29はレンズ内のマイコン26の指示に従って絞りを駆動し、絞り位置検出部30で絞り駆動回路29により駆動した絞りの位置及び移動量を検出する。   The focus drive circuit 27 drives the focus lens in accordance with an instruction from the microcomputer 26 in the lens, and the focus position detection unit 28 detects the position and movement amount of the focus lens driven by the focus drive circuit 27. The diaphragm drive circuit 29 drives the diaphragm in accordance with an instruction from the microcomputer 26 in the lens, and the diaphragm position detection unit 30 detects the position and movement amount of the diaphragm driven by the diaphragm drive circuit 29.

レンズ204側の電源端子22でカメラ本体101側の電源供給端子12より電源の供給を受け、レンズ204側のレンズ装着検知端子23がカメラ本体101側のレンズ装着検知端子13と正常に接続されると、カメラがレンズ装着を検知する。レンズ204側の各通信端子25a,25b,25cがカメラ本体101側の各通信端子15a,15b,15cと接続されて、レンズ内のマイコン26とカメラ内のマイコン1の間でシリアル通信を行う。   The power supply terminal 22 on the lens 204 side receives power from the power supply terminal 12 on the camera body 101 side, and the lens mounting detection terminal 23 on the lens 204 side is normally connected to the lens mounting detection terminal 13 on the camera body 101 side. Then, the camera detects lens mounting. The communication terminals 25a, 25b, and 25c on the lens 204 side are connected to the communication terminals 15a, 15b, and 15c on the camera body 101 side, and serial communication is performed between the microcomputer 26 in the lens and the microcomputer 1 in the camera.

図4は本実施形態のレンズ装着検知時の動作を示すフローチャートである。   FIG. 4 is a flowchart showing the operation at the time of detecting the lens mounting according to this embodiment.

図4を参照して、カメラ本体101に交換レンズ180を装着した場合の、マイコン1がレンズ検知回路11を介してレンズ装着を検知する動作について説明する。   With reference to FIG. 4, an operation in which the microcomputer 1 detects lens attachment via the lens detection circuit 11 when the interchangeable lens 180 is attached to the camera body 101 will be described.

先ず、カメラ内の各種回路を動作させるために所定の初期化動作を行い、DC/DCコンバータ10を動作させる等によりカメラの動作を開始する(ステップS101)。そして、レンズ検知回路11の電源制御回路を制御してレンズへの電源供給を開始する(ステップS102)。   First, a predetermined initialization operation is performed to operate various circuits in the camera, and the operation of the camera is started by operating the DC / DC converter 10 (step S101). Then, the power supply control circuit of the lens detection circuit 11 is controlled to start supplying power to the lens (step S102).

カメラ内のマイコン1は、カメラ側の通信端子15a〜15cとレンズ側の通信端子25a〜25cを通じてレンズ内のマイコン16又は26と通信を行い、レンズの情報を読み出して装着レンズがズームレンズか単焦点レンズかを判断する。そして、装着レンズがズームレンズの場合は、装着レンズがズームレンズであるという情報のみをEEPROMに記憶して、ステップS106へ進む(ステップS103)。装着レンズが単焦点レンズの場合は、レンズ内のレンズ固有の情報を読み出す(ステップS104)。そして読み込んだデータ、及び装着されたレンズが単焦点レンズであるという情報をEEPROMに記憶する(ステップS105)。   The microcomputer 1 in the camera communicates with the microcomputer 16 or 26 in the lens through the communication terminals 15a to 15c on the camera side and the communication terminals 25a to 25c on the lens side, reads out lens information, and determines whether the mounted lens is a zoom lens. Judge whether it is a focus lens. If the attached lens is a zoom lens, only the information that the attached lens is a zoom lens is stored in the EEPROM, and the process proceeds to step S106 (step S103). When the mounted lens is a single focus lens, information unique to the lens in the lens is read (step S104). Then, the read data and information that the mounted lens is a single focus lens are stored in the EEPROM (step S105).

通信によりレンズ内のマイコン16又は26の動作を停止してから、レンズ検知回路11の電源制御回路を制御してレンズへの電源供給を停止し、レンズの電源をOFFする(ステップS106)。   After the operation of the microcomputer 16 or 26 in the lens is stopped by communication, the power supply control circuit of the lens detection circuit 11 is controlled to stop the power supply to the lens, and the lens power is turned off (step S106).

カメラの動作を終了する各種動作を行い、DC/DCコンバータ10の動作を停止しカメラ動作を停止して終了する(ステップS107)。   Various operations for ending the operation of the camera are performed, the operation of the DC / DC converter 10 is stopped, and the camera operation is stopped and ended (step S107).

このように、カメラ本体101に装着される交換レンズの種類を判別し、単焦点レンズの場合はレンズの固有の情報を読み出してカメラ本体内のメモリにデータを記憶し、ズームレンズならばレンズ装着のみを判別して装着動作を終了する。   In this way, the type of the interchangeable lens mounted on the camera body 101 is determined. In the case of a single focus lens, the lens-specific information is read and stored in the memory in the camera body. Only the operation is discriminated and the mounting operation is terminated.

図5は、本実施形態のデジタルカメラにおける異物情報プロファイルの生成動作を示すフローチャートである。異物情報プロファイルとは、白壁等の一様な被写体を撮影することによって得られる、ほぼ光学系内の異物のみが写りこんだ画像に基づいて作成される、その異物の位置(座標)及び大きさ等の情報を管理するファイルを言う。   FIG. 5 is a flowchart showing a foreign matter information profile generation operation in the digital camera of this embodiment. The foreign substance information profile is a position (coordinates) and size of a foreign object created by photographing a uniform subject such as a white wall, which is created based on an image in which only the foreign substance in the optical system is reflected. A file that manages information such as.

まず、カメラ本体101に、交換レンズ180を装着する。すると、図7に示すように、カメラ本体101の表示器160にGUI(グラフィカルユーザインターフェイス)によるメニューが表示される。ユーザは、GUIメニューから異物情報プロファイルを生成する処理であるアプリDL(アプリケーションによる異物除去補正のためのプロファイル作成)を選択する(ステップS1)。   First, the interchangeable lens 180 is attached to the camera body 101. Then, as shown in FIG. 7, a menu using a GUI (graphical user interface) is displayed on the display 160 of the camera body 101. The user selects an application DL (profile creation for foreign substance removal correction by an application) that is a process for generating a foreign substance information profile from the GUI menu (step S1).

ユーザがアプリDLを選択すると、マイコン1は、装着された交換レンズ180の固有情報を読み出す(ステップS2)。   When the user selects the application DL, the microcomputer 1 reads unique information of the attached interchangeable lens 180 (step S2).

図6は、図5のステップS2で実行されるレンズの固有情報を読み出す動作を示すサブルーチンである。   FIG. 6 is a subroutine showing an operation of reading lens specific information executed in step S2 of FIG.

まず、ステップS121において、レンズ装着検知の際に判別して記憶したEEPROM内のデータに基づいて、装着レンズがズームレンズであるか単焦点レンズであるかを判別する。   First, in step S121, it is determined whether the mounted lens is a zoom lens or a single focus lens based on the data in the EEPROM that has been determined and stored at the time of lens mounting detection.

装着されたレンズがズームレンズの場合は、レンズ検知回路11内の電源供給回路を制御してレンズへの電源供給を行いレンズ内のマイコン16を起動する(ステップS122)。そして、レンズ内の現在の焦点距離の情報、及び設定可能な絞り値の情報を読み出して、カメラ本体101内のRAM等に記憶する(ステップS123)。   When the mounted lens is a zoom lens, the power supply circuit in the lens detection circuit 11 is controlled to supply power to the lens, and the microcomputer 16 in the lens is activated (step S122). Then, information on the current focal length in the lens and information on an aperture value that can be set are read out and stored in a RAM or the like in the camera body 101 (step S123).

次に、レンズ検知回路11によりレンズへの電源供給をOFFし(ステップS124)、このサブルーチンを終了して、図5のステップS3に戻る。   Next, power supply to the lens is turned off by the lens detection circuit 11 (step S124), this subroutine is terminated, and the process returns to step S3 in FIG.

また、ステップS121のレンズ判別結果が単焦点レンズの場合は、先に記憶したEEPROMからレンズの情報を読み出し、カメラ本体101内のRAM等に記憶する(ステップS125)。そして、このサブルーチンを終了して、図5のステップS3に戻る。   If the lens discrimination result in step S121 is a single focus lens, lens information is read from the previously stored EEPROM and stored in the RAM or the like in the camera body 101 (step S125). Then, this subroutine is terminated, and the process returns to step S3 in FIG.

次に、図5のステップS3では、ステップS2で読み出したレンズ固有情報から、装着されたレンズの絞り値がF22に設定可能ならばステップS4に進み、設定不可ならばステップS11に進む。   Next, in step S3 of FIG. 5, if the aperture value of the mounted lens can be set to F22 from the lens specific information read in step S2, the process proceeds to step S4, and if it cannot be set, the process proceeds to step S11.

ステップS4では、ステップS2で読み出したレンズの固有情報から装着されたレンズの焦点距離値が28mmを超えているかどうかを判断する。たとえばレンズの焦点距離値が105mmであるとすると、28mmを超えているのでステップS7に進む。一方、レンズの焦点距離値が例えば24mmであった場合は28mmより小さいのでステップS5に進む。   In step S4, it is determined from the lens unique information read in step S2 whether or not the focal length value of the mounted lens exceeds 28 mm. For example, assuming that the focal length value of the lens is 105 mm, since it exceeds 28 mm, the process proceeds to step S7. On the other hand, if the focal length value of the lens is 24 mm, for example, it is smaller than 28 mm, so the process proceeds to step S5.

このように、本実施形態では、異物情報プロファイルを作成する場合に、絞りをF22に絞って、白壁等の被写体を撮像する。その理由は、一般のレンズでは、絞りを開くと撮像素子上に結像する被写体像がボケるため、光学系内に付着した異物をはっきり写すためには、絞りを絞り込む必要があるからである。   As described above, in the present embodiment, when creating a foreign substance information profile, the aperture is stopped down to F22, and a subject such as a white wall is imaged. The reason is that with a general lens, when the aperture is opened, the subject image formed on the image sensor is blurred, so that it is necessary to narrow the aperture in order to clearly capture the foreign matter adhering to the optical system. .

また、本実施形態では、異物情報プロファイルを作成する場合に、焦点距離の短い超広角レンズを用いないようにする。その理由は、1つには、超広角レンズを用いると、白壁などの被写体の必要以上に広い範囲が撮像されてしまうため、壁のしみなどが画像に写りこんでしまう場合があり、それをレンズの光学系に付着した異物と誤検出してしまうことが考えられるからである。また、レンズが広角になるほど光線の撮像素子への入射角度が大きくなるため、異物が付着しているローパスフィルタ等の表面から撮像素子までの距離に応じて、撮像素子上で異物の影の位置のズレが大きくなり、異物の正確な位置が検出しにくくなるためである。   In this embodiment, when creating a foreign substance information profile, an ultra-wide angle lens with a short focal length is not used. One reason for this is that if an ultra-wide-angle lens is used, a wider range of the subject, such as a white wall, is captured than necessary, so that stains on the wall may be reflected in the image. This is because it may be erroneously detected as a foreign matter adhering to the optical system of the lens. In addition, since the angle of incidence of the light beam on the image sensor increases as the lens becomes wider, the position of the shadow of the foreign object on the image sensor depends on the distance from the surface of the low-pass filter or the like to which the foreign object is attached to the image sensor. This is because the deviation of the angle increases and it becomes difficult to detect the exact position of the foreign matter.

次に、ステップS5ではレンズから読み出されたパラメータを調べ、装着されたレンズがズームレンズでかつ焦点距離が28mm以上に設定できるならばステップS6に進む。また、ズームレンズでないか、または焦点距離を28mm以上に設定できないレンズである場合はステップS11に進む。ズームレンズでかつ焦点距離が28mm以上に設定できるレンズが装着された場合は、ステップS6で図8に示すGUIによる警告を表示し、ユーザにズームレンズをテレ側(望遠側)に設定するように促して、ステップS4に戻る。   Next, in step S5, parameters read from the lens are checked. If the mounted lens is a zoom lens and the focal length can be set to 28 mm or more, the process proceeds to step S6. If it is not a zoom lens, or if the focal length cannot be set to 28 mm or more, the process proceeds to step S11. When a zoom lens and a lens whose focal length can be set to 28 mm or more is attached, a warning by the GUI shown in FIG. 8 is displayed in step S6, and the zoom lens is set to the tele side (telephoto side) to the user. Prompt and return to step S4.

ステップS7では、撮影準備及び日時表示を行い、ステップS8では、ユーザに処理を続行するか否かを問い合わせる。そして、ユーザが処理を続行した場合はステップS9に進み、処理を中断した場合は処理を終了する。   In step S7, shooting preparation and date display are performed. In step S8, the user is inquired whether or not to continue the process. If the user continues the process, the process proceeds to step S9. If the process is interrupted, the process ends.

ステップS9では異物情報プロファイル作成を行うため、ユーザによるレリーズ指示を受けて白壁等を撮影し、撮像素子の撮像面上、あるいは撮像素子の前方に配置されているローパスフィルタ等の光学素子の表面に付着したゴミ等の異物を撮影する。そして、撮像素子の撮像面上あるいは光学素子の表面に付着しているゴミ等の異物の座標や大きさに関する情報を撮像部40内に配置された画像処理部で生成して、プロファイルとして保存する。   In step S9, in order to create a foreign substance information profile, a white wall or the like is photographed in response to a release instruction from the user, and the surface of an optical element such as a low-pass filter disposed on the imaging surface of the imaging element or in front of the imaging element. Take a picture of foreign matter such as adhering dust. Then, information on the coordinates and size of foreign matter such as dust adhering to the imaging surface of the imaging element or the surface of the optical element is generated by the image processing unit arranged in the imaging unit 40 and stored as a profile. .

つまり、ユーザは、デジタルカメラを異物情報プロファイル作成モードに設定し、傷や汚れのない単一階調の被写体(白壁等)を撮影することで、異物情報プロファイルを生成することができる。このときユーザは傷や汚れのない単一諧調の被写体を撮影する必要があるが、撮影された被写体が異物情報プロファイル生成にふさわしくない場合は撮影のやり直しを行う(ステップS10)。具体的には、ほぼ一様な画像が撮影されていなかったり、一部に輝度不足の領域が存在する場合には、異物情報プロファイル生成には不向きな画像と判断される。   That is, the user can generate a foreign matter information profile by setting the digital camera to the foreign matter information profile creation mode and photographing a single gradation subject (white wall or the like) that is free from scratches and dirt. At this time, the user needs to shoot a single-tone object without scratches or dirt, but if the photographic object is not suitable for foreign object information profile generation, the user re-shoots (step S10). Specifically, when a substantially uniform image has not been captured or there is a region with insufficient brightness in part, it is determined that the image is not suitable for foreign object information profile generation.

生成された異物情報プロファイルはカメラ本体101内のメモリに保存される。   The generated foreign object information profile is stored in a memory in the camera body 101.

なお、ステップS3で、装着されたレンズが異物情報プロファイル生成にふさわしくない場合は、図9のようなGUIによる警告を表示し、処理を終了する(ステップS11)。   If it is determined in step S3 that the attached lens is not suitable for foreign object information profile generation, a GUI warning as shown in FIG. 9 is displayed, and the process ends (step S11).

生成された異物情報プロファイルは、実際にデジタルカメラで写真を撮影し、JPEGファイルとして保存するときに、JPEGファイルのヘッダ部分に保存される。以下、ヘッダ部分に書き込まれる情報について、詳細に説明する。   The generated foreign substance information profile is saved in the header portion of the JPEG file when a photograph is actually taken with a digital camera and saved as a JPEG file. Hereinafter, the information written in the header part will be described in detail.

デジタルカメラで撮影された画像データは、JEITAデジタルスチルカメラ用画像ファイルフォーマット規格(以下、Exif規格と称する)に則った形式で記録される。Exif規格では非圧縮データファイルと圧縮データファイルの二種類のファイル形式が定められている。非圧縮データ形式ではTIFF Rev.6.0との互換性を有し、圧縮データ形式はJPEGフォーマットに準拠する形式である。   Image data taken by a digital camera is recorded in a format that complies with the image file format standard for JEITA digital still cameras (hereinafter referred to as the Exif standard). The Exif standard defines two types of file formats, an uncompressed data file and a compressed data file. The uncompressed data format is compatible with TIFF Rev. 6.0, and the compressed data format is a format conforming to the JPEG format.

図10はJPEGフォーマットの構造を示す図である。JPEGフォーマットは、ファイルの始まりを示すSOI(Start of Image) マーカーの直後に、アプリケーションマーカーセグメント(APP1) が記載されている。これに続いて、量子化テーブル(DQT)、ハフマンテーブル(DHT)、フレームヘッダ(SOF)、スキャンヘッダ(SOS)、エントロピー符号化データ、及びエントロピー符号化データ終了コード(EOI)が順に記載されている。   FIG. 10 shows the structure of the JPEG format. In the JPEG format, an application marker segment (APP1) is described immediately after an SOI (Start of Image) marker indicating the beginning of a file. Following this, a quantization table (DQT), a Huffman table (DHT), a frame header (SOF), a scan header (SOS), entropy encoded data, and an entropy encoded data end code (EOI) are described in order. Yes.

図11はAPP1の内部構造を説明する図である。   FIG. 11 is a diagram illustrating the internal structure of APP1.

APP1の構造内にはサムネイル画像を記録することができ、サムネイル画像は、主画像データとは独立に記録される。単一のファイルには二つのImage File Directory(IFD)が記述可能である。このファイルの最初に記述されるIFDは「0th JPEG IFD」と呼ばれる。0th IFDには主画像、即ちPrimary Imageに関する情報が記述される。0th IFDに続くIFDは「1st IFD」と呼ばれ、サムネイル(thumbnail)画像に関する情報が記述される。   A thumbnail image can be recorded in the structure of APP1, and the thumbnail image is recorded independently of the main image data. Two Image File Directories (IFD) can be described in a single file. The IFD described at the beginning of this file is called “0th JPEG IFD”. In the 0th IFD, information on the main image, that is, the primary image is described. The IFD following the 0th IFD is called “1st IFD”, and describes information related to a thumbnail image.

APP1マーカー1227に続きAPP1レングス1228にAPP1のフィールド長が記載される。Exif Identifier1229にはExifであることを示す固定値が含まれる。ヘッダ1230の後に「0th IFD ポインタ」1231が記載され、このポインタにより0th IFD の先頭アドレスが示される。「0th IFD ポインタ」1231に続き、エントリーカウントコード1232を先頭にして、以下、主画像に関するIFD(「0th IFD for Primary Data」1233) が記載される。「0th IFD for Primary Data」1233には、画像の幅、画像の高さ、及びExif IFDポインタ等が含まれる。   Following the APP1 marker 1227, the APP1 length 1228 describes the field length of APP1. The Exif Identifier 1229 includes a fixed value indicating Exif. A “0th IFD pointer” 1231 is written after the header 1230, and this pointer indicates the head address of the 0th IFD. Following the “0th IFD pointer” 1231, the IFD (“0th IFD for Primary Data” 1233) related to the main image is described below with the entry count code 1232 at the head. The “0th IFD for Primary Data” 1233 includes an image width, an image height, an Exif IFD pointer, and the like.

「0th IFD for Primary Data」1233に続いて「1st IFD のポインタ」1234が記載され、その下に0th IFD の具体的なデータ(「Value of 0th IFD」1235)が記載される。なお、ファイル中に「1st IFD 」が存在しない場合には、「1st IFDポインタ」1234に代えて終端コード(ターミナル)が記載される。   Following “0th IFD for Primary Data” 1233, “1st IFD pointer” 1234 is described, and specific data of “0th IFD” (“Value of 0th IFD” 1235) is described below. When “1st IFD” does not exist in the file, a terminal code (terminal) is described instead of “1st IFD pointer” 1234.

「Value of 0th IFD」1235の後は、エントリーカウントコード1236を先頭にして、以下、「Exif Private Tag」1237が記述される。「Exif Private Tag」1237には、Exifのバージョン情報、メーカーノート等が含まれる。   After “Value of 0th IFD” 1235, “Exif Private Tag” 1237 is described below with the entry count code 1236 at the head. The “Exif Private Tag” 1237 includes Exif version information, manufacturer notes, and the like.

メーカーノートエリアには、使用デジタルカメラ内のメモリに保存された、異物情報プロファイルが格納されている。   In the manufacturer note area, a foreign substance information profile stored in a memory in the digital camera used is stored.

「Exif Private Tag」1237の末尾にターミナル1238が記載され、このターミナル1238に続いて、Exifデータの値1239及びメーカーノートデータ1240が記載される。そして、その下に、エントリーカウントコード1241を先頭にして、以下、サムネイル画像に関するIFD(「1st IFD for thumbnail Data 」1242)が記載される。「1st IFD for thumbnail Data 」1242には、画像の幅、画像の高さが含まれる。ターミナル1243に続いて1st IFD のValue (「Value of 1st IFD」)1244及びサムネイル画像のデータ1245が記載され、その後に主画像データが記述される。   A terminal 1238 is described at the end of the “Exif Private Tag” 1237, and the terminal 1238 is followed by an Exif data value 1239 and manufacturer note data 1240. Below that, the IFD (“1st IFD for thumbnail Data” 1242) related to the thumbnail image is described, starting with the entry count code 1241. “1st IFD for thumbnail Data” 1242 includes the width of the image and the height of the image. Following the terminal 1243, the 1st IFD Value (“Value of 1st IFD”) 1244 and thumbnail image data 1245 are described, followed by the main image data.

具体的には、このメーカノートエリアの異物情報プロファイルは、図12に示すような構造をとる。図12に示す通り、異物補正データには、検出用画像撮影時の、レンズ情報と異物の位置、大きさの情報が格納される。更に具体的には、検出画像撮影時のレンズ情報として、検出画像撮影時における実際の絞り値(F値)と、そのときのレンズ瞳位置を格納する。続いて記憶領域に検出した異物領域の数(整数値)を格納し、これに続き、個々の具体的な異物領域のパラメータを、異物領域の数だけ繰返して格納する。異物領域のパラメータは、異物の半径(例えば2バイト)、有効画像領域における中心のx座標(例えば2バイト)、おなじく中心のy座標(例えば2バイト)の3つの数値のセットである。   Specifically, the foreign substance information profile in this maker note area has a structure as shown in FIG. As shown in FIG. 12, the foreign substance correction data stores lens information and information on the position and size of the foreign substance when the detection image is captured. More specifically, the actual aperture value (F value) at the time of detection image shooting and the lens pupil position at that time are stored as lens information at the time of detection image shooting. Subsequently, the number of detected foreign substance areas (integer value) is stored in the storage area, and subsequently, the specific parameters of the specific foreign substance areas are repeatedly stored by the number of foreign substance areas. The parameter of the foreign substance area is a set of three numerical values including the radius of the foreign substance (for example, 2 bytes), the x coordinate (for example, 2 bytes) of the center in the effective image area, and the y coordinate (for example, 2 bytes) of the center.

次に、撮影画像から異物領域の位置(座標)と大きさの求め方を説明する。
まず、撮影画像の領域を複数のブロックに分割し、ブロック内の最大輝度Lmax、平均輝度Laveを算出し、次式を用いてブロック内のスレッショルド値T1を算出する。
Next, how to obtain the position (coordinates) and size of the foreign substance region from the captured image will be described.
First, the captured image region is divided into a plurality of blocks, the maximum luminance Lmax and the 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
次に、スレッショルド値T1を超えない画素を異物画素とし、異物画素によって構成される孤立領域を各々一つの異物領域di(i=0,1,…,n)とする。
T1 = Lave × 0.6 + Lmax × 0.4
Next, a pixel that does not exceed the threshold value T1 is defined as a foreign substance pixel, and an isolated area constituted by the foreign substance pixel is defined as one foreign substance area di (i = 0, 1,..., N).

図13は、異物領域サイズ算出の概要を示す図である。図13に示すように、異物領域毎に、異物領域を構成する画素の水平方向の座標の最大値Xmaxおよび最小値Xmin、垂直方向の座標の最大値Ymaxおよび最小値Yminを求め、異物領域diのサイズを表す半径riを次式によって算出する。   FIG. 13 is a diagram showing an outline of foreign object region size calculation. As shown in FIG. 13, for each foreign substance area, the maximum value Xmax and the minimum value Xmin of the horizontal coordinates of the pixels constituting the foreign substance area, the maximum value Ymax and the minimum value Ymin of the vertical coordinates are obtained, and the foreign substance area di The radius ri representing the size of is calculated by the following equation.

ri=√[{(Xmax−Xmin)/2}2−{(Ymax−Ymin)/2}2]
また、このときの中心座標(Xdi,Ydi)は、近似的に
Xdi=(Xmax+Xmin)/2
Ydi=(Ymax+Ymin)/2
で求めるものとする。このように求められた位置(座標)と半径を、異物情報プロファイルとして記録する。
ri = √ [{(Xmax−Xmin) / 2} 2 − {(Ymax−Ymin) / 2} 2 ]
Further, the central 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 foreign substance information profile.

以上説明したように、上記の実施形態の方法で生成された異物情報プロファイルは、カメラの撮像素子の撮像面上、あるいは撮像素子の前方に配置されたローパスフィルタ等の光学素子の表面に付着している異物の位置、及び大きさの情報を含んでいる。そのため、通常の撮影を行った画像からこの異物の影が映りこんだ位置及び大きさを特定して、その画像を補正して異物の影響を除去することが可能となる。画像を補正する方法としては、異物の影が写りこんだ部分の画像をその周囲の画素の画像情報で補間する方法が考えられる。また、他の方法として、フレーミングが若干異なる複数の画像を撮影して、1つの画像の異物が写りこんだ位置の画像を、他の画像の異物が写りこんでいない位置の画像で補間する方法などが考えられる。これらの画像を補正する画像処理は、カメラ本体内で行ってもよいし、画像データを外部の画像処理装置に転送して、外部の画像処理装置において行ってもよい。この外部の画像処理装置は、画像処理を専門に行う装置として構成されていてもよいし、パーソナルコンピュータ上でアプリケーションソフトウェアを動作させることにより画像処理機能を果たす装置として構成されていてもよい。   As described above, the foreign substance information profile generated by the method of the above embodiment adheres to the surface of an optical element such as a low-pass filter disposed on the imaging surface of the imaging element of the camera or in front of the imaging element. It contains information on the position and size of the foreign object. For this reason, it is possible to identify the position and size of the shadow of the foreign object from an image obtained by normal photographing and correct the image to remove the influence of the foreign object. As a method of correcting the image, a method of interpolating an image of a portion where a shadow of a foreign object is reflected with image information of surrounding pixels can be considered. As another method, a plurality of images with slightly different framing are taken, and an image at a position where a foreign object in one image is reflected is interpolated with an image at a position where the foreign object is not reflected in another image. And so on. Image processing for correcting these images may be performed in the camera body, or may be performed in the external image processing apparatus by transferring the image data to the external image processing apparatus. This external image processing apparatus may be configured as an apparatus that specializes in image processing, or may be configured as an apparatus that performs an image processing function by operating application software on a personal computer.

このように、異物の位置及び大きさの情報を含む異物情報プロファイルが本実施形態の方法で得られれば、その情報を用いて画像の補正を行ない、異物の影響のない撮影画像を得ることが可能となる。   As described above, if a foreign object information profile including information on the position and size of a foreign object is obtained by the method of the present embodiment, the information is corrected using the information, and a captured image without the influence of the foreign object can be obtained. It becomes possible.

なお、本実施形態では安定した品質の異物情報プロファイルを得られるレンズのパラメータとして、焦点距離を28mm以上、絞り値をF22としたが、これらのパラメータ値は条件により異なり、上記設定値以外の値を採用する場合もある。   In this embodiment, the focal length is set to 28 mm or more and the aperture value is set to F22 as the lens parameters for obtaining a stable quality foreign matter information profile. However, these parameter values vary depending on conditions, and values other than the above set values are used. May be adopted.

また、本実施形態では安定した品質の異物情報プロファイルを得られるレンズの限定項目に焦点距離、絞り値を挙げた。しかし、限定項目としては、さらに射出瞳と撮像面の距離が小さいレンズ(ショートバックフォーカス)は使用しない、TSレンズなどの特殊なレンズは使用しない、などが考えられる。   In this embodiment, the focal length and the aperture value are listed as the limited items of the lens that can obtain the foreign substance information profile with stable quality. However, as a limited item, a lens (short back focus) having a smaller distance between the exit pupil and the imaging surface is not used, and a special lens such as a TS lens is not used.

さらに、本実施形態では異物情報プロファイルを、単一階調の被写体を撮影した画像からゴミの位置を特定し、その座標と大きさを記録したデータを画像ファイルのヘッダに格納するものとして説明した。しかし、異物情報プロファイルは一様な面を撮影した画像データであったり、その画像データより導き出せる、ゴミ座標データ以外の情報であったりしてもよい。   Further, in the present embodiment, the foreign substance information profile has been described on the assumption that the position of dust is specified from an image obtained by photographing a single gradation subject, and data in which the coordinates and size are recorded is stored in the header of the image file. . However, the foreign substance information profile may be image data obtained by photographing a uniform surface, or information other than dust coordinate data that can be derived from the image data.

(他の実施形態)
また、各実施形態の目的は、次のような方法によっても達成される。すなわち、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給する。そして、そのシステムあるいは装置のコンピュータ(または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.

本発明の撮像装置の一実施形態であるデジタル一眼レフカメラシステムの構成を示す断面図である。It is sectional drawing which shows the structure of the digital single-lens reflex camera system which is one Embodiment of the imaging device of this invention. 一実施形態に係わるレンズ交換式デジタル一眼レフカメラのカメラ本体に、交換レンズとしてのズームレンズを装着した状態での電気制御ブロックの構成を示す図である。It is a figure which shows the structure of the electric control block in the state which attached the zoom lens as an interchangeable lens to the camera main body of the interchangeable lens digital single-lens reflex camera concerning one Embodiment. 一実施形態に係わるレンズ交換式デジタル一眼レフカメラのカメラ本体に、交換レンズとしての単焦点レンズを装着した状態での電気制御ブロックの構成を示す図である。It is a figure which shows the structure of the electric control block in the state which mounted | wore the camera main body of the interchangeable lens digital single-lens reflex camera concerning one Embodiment with the single focus lens as an interchangeable lens. 一実施形態のデジタルカメラにおけるレンズ装着検知時の動作を示すフローチャートである。It is a flowchart which shows the operation | movement at the time of lens mounting | wearing detection in the digital camera of one Embodiment. 一実施形態のデジタルカメラにおける異物情報プロファイルの生成動作を示すフローチャートである。It is a flowchart which shows the production | generation operation | movement of the foreign material information profile in the digital camera of one Embodiment. 図5のステップS2で実行されるレンズの固有情報を読み出す動作を示すサブルーチンである。It is a subroutine which shows the operation | movement which reads the specific information of the lens performed by step S2 of FIG. カメラ本体にレンズを装着したときに表示器に表示されるGUIを示す図である。It is a figure which shows GUI displayed on a display, when a lens is mounted | worn with a camera main body. カメラ本体にズームレンズを装着したときに表示器に表示されるGUIを示す図である。It is a figure which shows GUI displayed on a display when a zoom lens is attached to a camera body. カメラ本体に異物情報プロファイルを生成するために不適切なレンズが装着されたときに表示器に表示されるGUIを示す図である。It is a figure which shows GUI displayed on a display, when an inappropriate lens is mounted | worn in order to produce a foreign substance information profile in a camera body. JPEGフォーマットの構造を示す図である。It is a figure which shows the structure of a JPEG format. APP1の内部構造を説明する図である。It is a figure explaining the internal structure of APP1. 異物情報プロファイル形式例を示す図である。It is a figure which shows the example of a foreign material information profile format. ゴミ領域サイズ算出の概要を示す図である。It is a figure which shows the outline | summary of dust area size calculation.

Claims (7)

レンズを交換可能に装着する本体部と、
被写体像を光電変換する撮像素子と、
前記レンズと通信を行なう通信手段と、
前記通信手段により、前記レンズから該レンズ固有の情報を取得する取得手段と、
前記撮像素子によって撮像されたところの、前記撮像素子の表面、又は前記撮像素子の前方に配置された光学素子の表面に付着した異物の像を含む異物検出用画像に基づいて、少なくとも前記異物の位置及び大きさの情報を含む情報である異物情報を生成する異物情報生成手段と、
前記取得手段により取得された前記レンズ固有の情報に基づいて、前記本体部に装着されたレンズが前記異物検出用画像を撮像するのに不適切なレンズであると判断された場合に、前記異物検出用画像の撮像を禁止する規制手段と、
を具備することを特徴とする撮像装置。
A main body for mounting the lens interchangeably;
An image sensor that photoelectrically converts a subject image;
Communication means for communicating with the lens;
Acquisition means for acquiring information specific to the lens from the lens by the communication means;
Based on a foreign object detection image including an image of a foreign object attached to the surface of the image sensor or the surface of an optical element disposed in front of the image sensor as captured by the image sensor, at least the foreign object Foreign matter information generating means for generating foreign matter information, which is information including position and size information;
When it is determined that the lens mounted on the main body is an inappropriate lens for capturing the foreign object detection image based on the information specific to the lens acquired by the acquisition unit. A regulation means for prohibiting the detection image from being captured;
An imaging apparatus comprising:
前記取得手段によって取得される前記レンズ固有の情報は、少なくとも前記レンズの焦点距離情報と、前記レンズの最小絞り値情報と、単焦点レンズかズームレンズかの情報を含むことを特徴とする請求項1に記載の撮像装置。   The lens-specific information acquired by the acquisition unit includes at least focal length information of the lens, minimum aperture value information of the lens, and information on whether a single-focus lens or a zoom lens is used. The imaging apparatus according to 1. 前記本体部に前記異物検出用画像を撮像するのに不適切なレンズが装着された場合に、ユーザに警告を出力する警告出力手段をさらに具備することを特徴とする請求項2に記載の撮像装置。   The imaging according to claim 2, further comprising warning output means for outputting a warning to a user when a lens inappropriate for taking the foreign object detection image is attached to the main body. apparatus. 前記警告出力手段は、前記本体部にズームレンズが装着されていた場合には、ズーム位置を望遠側に設定するように促す警告を出力することを特徴とする請求項3に記載の撮像装置。   The imaging apparatus according to claim 3, wherein the warning output unit outputs a warning that prompts the user to set the zoom position to the telephoto side when a zoom lens is attached to the main body. レンズを交換可能に装着する本体部と、被写体像を光電変換する撮像素子とを備える撮像装置を制御する方法であって、
前記レンズと通信を行ない、前記レンズから該レンズ固有の情報を取得する取得工程と、
前記撮像素子によって撮像されたところの、前記撮像素子の表面、又は前記撮像素子の前方に配置された光学素子の表面に付着した異物の像を含む異物検出用画像に基づいて、少なくとも前記異物の位置及び大きさの情報を含む情報である異物情報を生成する異物情報生成工程と、
前記取得工程において取得された前記レンズ固有の情報に基づいて、前記本体部に装着されたレンズが前記異物検出用画像を撮像するのに不適切なレンズであると判断された場合に、前記異物検出用画像の撮像を禁止する規制工程と、
を具備することを特徴とする撮像装置の制御方法。
A method for controlling an image pickup apparatus including a main body unit in which a lens is replaceably mounted and an image pickup device that photoelectrically converts a subject image,
An acquisition step of communicating with the lens and acquiring information specific to the lens from the lens;
Based on a foreign object detection image including an image of a foreign object attached to the surface of the image sensor or the surface of an optical element disposed in front of the image sensor as captured by the image sensor, at least the foreign object A foreign matter information generation step for generating foreign matter information, which is information including position and size information;
When it is determined that the lens attached to the main body is an inappropriate lens for capturing the foreign object detection image based on the information specific to the lens acquired in the acquisition step. A regulatory process that prohibits the detection of images for detection;
An image pickup apparatus control method comprising:
請求項5に記載の制御方法をコンピュータに実行させることを特徴とするプログラム。   A program for causing a computer to execute the control method according to claim 5. 請求項6に記載のプログラムを記憶したことを特徴とするコンピュータ読み取り可能な記憶媒体。   A computer-readable storage medium storing the program according to claim 6.
JP2006170580A 2006-06-20 2006-06-20 Imaging apparatus, control method thereof, program, and storage medium Withdrawn JP2008005059A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006170580A JP2008005059A (en) 2006-06-20 2006-06-20 Imaging apparatus, control method thereof, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006170580A JP2008005059A (en) 2006-06-20 2006-06-20 Imaging apparatus, control method thereof, program, and storage medium

Publications (1)

Publication Number Publication Date
JP2008005059A true JP2008005059A (en) 2008-01-10

Family

ID=39009119

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006170580A Withdrawn JP2008005059A (en) 2006-06-20 2006-06-20 Imaging apparatus, control method thereof, program, and storage medium

Country Status (1)

Country Link
JP (1) JP2008005059A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010256739A (en) * 2009-04-28 2010-11-11 Canon Inc Imaging apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010256739A (en) * 2009-04-28 2010-11-11 Canon Inc Imaging apparatus

Similar Documents

Publication Publication Date Title
JP4989385B2 (en) Imaging apparatus, control method thereof, and program
JP4378341B2 (en) Imaging apparatus and correction method
JP2007243616A (en) Exposure control method, and imaging apparatus
JP2008053843A (en) Digital camera capable of recording motion picture
JP5432664B2 (en) Imaging device
JP2003101860A (en) Image pickup device, photographing image generation method, program and storage medium
JP2006054698A (en) Imaging apparatus having camera shake correction function
JP4323945B2 (en) Electronic camera, control method thereof, program, and storage medium
JP4182864B2 (en) Electronic camera
JP3957147B2 (en) Focusing device
JP2022037033A (en) Imaging apparatus
JP4481185B2 (en) Image display device
JP2008005059A (en) Imaging apparatus, control method thereof, program, and storage medium
JP4963713B2 (en) Electronic camera, control method thereof, program, and storage medium
JP4262022B2 (en) Imaging device
JP2002014405A (en) Lens adapter for electronic camera and electronic camera
JP2003101873A (en) Image pickup device, photographing image generation method, program and storage medium
JP2007101860A (en) Imaging apparatus
JP4682104B2 (en) Imaging device
JP2005051697A (en) Imaging apparatus
JP2008052151A (en) Digital camera capable of recording moving picture
JP2007088679A (en) Photographing apparatus
JP2005057691A (en) Imaging apparatus and method
JP2003087648A (en) Imaging apparatus, photographed image generating method, program, and storage medium
JP4298491B2 (en) Imaging device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20090901