JP2012044542A - Image processing device, method, and program - Google Patents

Image processing device, method, and program Download PDF

Info

Publication number
JP2012044542A
JP2012044542A JP2010185310A JP2010185310A JP2012044542A JP 2012044542 A JP2012044542 A JP 2012044542A JP 2010185310 A JP2010185310 A JP 2010185310A JP 2010185310 A JP2010185310 A JP 2010185310A JP 2012044542 A JP2012044542 A JP 2012044542A
Authority
JP
Japan
Prior art keywords
image
foreign matter
position information
cut
information
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
JP2010185310A
Other languages
Japanese (ja)
Inventor
Makoto Kameyama
誠 亀山
Takayoshi Odate
貴義 大館
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 JP2010185310A priority Critical patent/JP2012044542A/en
Publication of JP2012044542A publication Critical patent/JP2012044542A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To accurately remove a foreign matter from a cut-out image even when a part of a taken image is cut out.SOLUTION: An image processing device obtains foreign matter information including positional information Di of a foreign matter and size information Ri of the foreign matter which are extracted from a taken image for detecting a foreign matter, the image which is obtained by an imaging element 2, and obtains cut-out positional information T of a cut-out image 201 to be cut out from a taken image taken by the imaging element 2 in normal photographing. Then, on the basis of the positional information Di and the cut-out positional information T, it is determined whether the foreign matter is located within the cut-out image 201. Then, if it is determined that the foreign matter is not located within the cut-out image 201, positional information of the foreign matter is converted to that of the second foreign matter on the basis of the size information Ri of the foreign matter.

Description

本発明は、CCDやCMOSセンサ等の撮像素子を用いた撮像装置における、光学ローパスフィルタ等の光学素子の表面に付着した異物による画質劣化を抑制する技術に関する。   The present invention relates to a technique for suppressing image quality deterioration due to foreign matters adhering to the surface of an optical element such as an optical low-pass filter in an imaging apparatus using an imaging element such as a CCD or a CMOS sensor.

一眼レフ方式等のレンズ交換が可能なデジタルカメラにおいては、構造上、光学系内にゴミ等の異物が混入しやすい。特に撮像素子の前方に配置されたローパスフィルタ等の光学素子の表面に異物が付着すると、撮影画像にその異物の影が写り込み、画像の品質が低下するという問題がある。   In a digital camera capable of exchanging lenses such as a single lens reflex system, foreign matters such as dust are likely to be mixed in the optical system due to its structure. In particular, when a foreign object adheres to the surface of an optical element such as a low-pass filter disposed in front of the image sensor, there is a problem in that the shadow of the foreign object appears in the captured image and the quality of the image decreases.

そこで、レンズの絞りを絞った状態で白い壁等を撮影し、撮像素子上のゴミだけが写った画像を予め用意して通常撮影画像と組み合わせて使用することで、ゴミを目立たなくする方法が知られている(特許文献1参照)。   Therefore, there is a method to make the dust inconspicuous by taking a picture of a white wall etc. with the lens aperture closed and preparing an image showing only dust on the image sensor in combination with a normal shot image. It is known (see Patent Document 1).

しかしながら、この方法では、ゴミ検出用に撮影した画像と、それに関連付ける本撮影画像群との対応付けを常に意識しなくてはならず、煩わしい。   However, in this method, it is necessary to always be aware of the association between the image captured for dust detection and the actual captured image group associated therewith, which is troublesome.

そこで、白い壁等を撮影してゴミの位置を取得した後これをデジタルカメラ上で保持しておき、通常撮影時の画像データにゴミの位置や大きさのリスト(ダスト情報)を添付することが考えられる。例えば別途用意された画像処理装置を用い、添付されたゴミの位置から撮影画像データ上のゴミ位置を解析し、解析された領域を周囲の画素で補間処理することにより目立たなくすることができる(特許文献2参照)。   Therefore, after capturing the position of dust by photographing a white wall etc., hold it on the digital camera and attach a list of dust positions and sizes (dust information) to the image data at the time of normal shooting Can be considered. For example, using a separately prepared image processing device, the dust position on the captured image data is analyzed from the attached dust position, and the analyzed area is interpolated with surrounding pixels to make it inconspicuous ( Patent Document 2).

特開2004-222231号公報JP 2004-222231 A 特開2007-189467号公報JP 2007-189467 A

一方、撮影時に、撮影画像の一部を切り出すことで、アスペクト比を変更した画像を記録したり、被写体をズームアップした画像を記録したりする機能がある。このような機能で生成した画像では、予め保存したゴミの位置をそのまま適用できないため、画像に全体から切り出した位置を記録して、補間処理を行う際にゴミ位置の変換を行うようになっている。   On the other hand, there is a function of recording an image with a changed aspect ratio or recording a zoomed up image of a subject by cutting out a part of the captured image at the time of shooting. In an image generated by such a function, since the position of dust stored in advance cannot be applied as it is, the position cut out from the entire image is recorded, and dust position conversion is performed when performing interpolation processing. Yes.

しかしながら、図2に示すように、撮影画像200から切り出した画像201の近傍にゴミ100がある場合、すなわちゴミ100を囲む円の中心座標D(Xi,Yi)は画像の切り出し位置の外にありながら、ゴミ100自体の大きさによって切り出し画像201に含まれてしまう場合、その含まれた部分の補間処理を行えないという問題がある。   However, as shown in FIG. 2, when there is dust 100 in the vicinity of the image 201 cut out from the photographed image 200, that is, the center coordinates D (Xi, Yi) of the circle surrounding the dust 100 are outside the image cut-out position. However, when the cutout image 201 is included due to the size of the dust 100 itself, there is a problem in that the included portion cannot be interpolated.

本発明は上述した課題に鑑みてなされたものであり、撮影画像の一部を切り出したときにも、その切り出し画像に対する異物除去処理を精度よく行えるようにすることを目的とする。   The present invention has been made in view of the above-described problems, and it is an object of the present invention to perform a foreign substance removal process on a clipped image with high accuracy even when a portion of the captured image is clipped.

本発明の画像処理装置は、撮像手段で得られた異物検出用の撮影画像から抽出された異物の位置情報及び異物の大きさ情報を含む異物情報を取得する異物情報取得手段と、前記撮像手段による通常撮影時の撮影画像から切り出す、切り出し画像の切り出し位置情報を取得する切り出し位置情報取得手段と、前記異物の位置情報及び前記切り出し位置情報に基づいて、異物の位置が前記切り出し画像内にあるか否かを判定する判定手段と、前記判定手段により、異物の位置が前記切り出し画像内にないと判定された場合、前記異物の位置情報を、前記異物の大きさ情報に基づいて第2の異物の位置情報に変換する変換手段とを備えたことを特徴とする。   The image processing apparatus of the present invention includes a foreign object information acquisition unit that acquires foreign object information including foreign object position information and foreign object size information extracted from a captured image for foreign object detection obtained by the imaging unit, and the imaging unit. Based on the cutout position information acquisition means for cutting out the cutout position information of the cutout image cut out from the photographed image at the time of normal shooting by means of, the position of the foreign matter is in the cutout image based on the position information of the foreign matter and the cutout position information If the determination means and the determination means determine that the position of the foreign object is not in the cut-out image, the position information of the foreign object is determined based on the size information of the foreign object. Conversion means for converting into position information of a foreign object.

本発明によれば、撮影画像の一部を切り出したときにも、その切り出し画像に対する異物除去処理を精度よく行うことができる。   According to the present invention, even when a part of a photographed image is cut out, the foreign substance removal process for the cut-out image can be performed with high accuracy.

実施形態に係る電子カメラの回路構成を示すブロック図である。It is a block diagram which shows the circuit structure of the electronic camera which concerns on embodiment. 画像とゴミの位置を説明する図である。It is a figure explaining the position of an image and dust. 実施形態に係る電子カメラによるゴミ検出処理を説明するフローチャートである。It is a flowchart explaining the dust detection process by the electronic camera which concerns on embodiment. ゴミ補正データとなるゴミの位置と大きさを説明する図である。It is a figure explaining the position and size of the dust used as dust correction data. 実施形態に係る画像処理装置の概略構成を示す図である。1 is a diagram illustrating a schematic configuration of an image processing apparatus according to an embodiment. 実施形態に係る画像処理装置によるゴミ除去処理を説明するフローチャートである。5 is a flowchart for explaining dust removal processing by the image processing apparatus according to the embodiment. 実施形態に係る画像処理装置によるゴミ位置変換ルーチンを説明するフローチャートである。It is a flowchart explaining a dust position conversion routine by the image processing apparatus according to the embodiment.

以下、添付図面を参照して、本発明の好適な実施形態について説明する。
図1は、本発明の実施形態に係る電子カメラの回路構成を示すブロック図である。1はレンズを含む撮像光学系である。2はCCDCMOSセンサ等の撮像素子(光電変換素子)である。3はA/D変換回路であり、撮像素子2で得られたアナログ画像信号をデジタル信号に変換する。
Preferred embodiments of the present invention will be described below with reference to the accompanying drawings.
FIG. 1 is a block diagram showing a circuit configuration of an electronic camera according to an embodiment of the present invention. Reference numeral 1 denotes an imaging optical system including a lens. Reference numeral 2 denotes an image pickup device (photoelectric conversion device) such as a CCDCMOS sensor. Reference numeral 3 denotes an A / D conversion circuit that converts an analog image signal obtained by the image sensor 2 into a digital signal.

4は画像処理回路(プロセス回路)であり、ガンマ補正等の画像処理を行う。5はメモリ制御回路(記録再生部)であり、画像データの圧縮・伸長を行い、外部メモリ7からの信号の授受を行う。6は画像の展開やカメラの制御に使用するフレームメモリである。7は画像を記録する外部メモリである。8は画像表示用のメモリ(バッファメモリ)である。9は撮影画像等を表示する画像表示部(モニタ)である。10はCPU等からなるシステム制御回路である。   An image processing circuit (process circuit) 4 performs image processing such as gamma correction. Reference numeral 5 denotes a memory control circuit (recording / reproducing unit) that compresses / decompresses image data and exchanges signals from the external memory 7. A frame memory 6 is used for image development and camera control. Reference numeral 7 denotes an external memory for recording an image. Reference numeral 8 denotes an image display memory (buffer memory). Reference numeral 9 denotes an image display unit (monitor) that displays captured images and the like. A system control circuit 10 includes a CPU and the like.

11はレンズ駆動制御回路であり、撮像光学系1のフォーカシング駆動の制御を行う。12は撮影情報表示部であり、シャッター速度や絞り値等を表示する。13はカメラに撮影を指示する撮影指示スイッチである。14はカメラに画像表示を行うよう指示する画像表示スイッチである。15はカメラに設定変更のメニュー画面を表示するように指示する設定変更スイッチである。   Reference numeral 11 denotes a lens drive control circuit that controls the focusing drive of the imaging optical system 1. Reference numeral 12 denotes a photographing information display unit that displays a shutter speed, an aperture value, and the like. Reference numeral 13 denotes a photographing instruction switch for instructing the camera to perform photographing. An image display switch 14 instructs the camera to display an image. A setting change switch 15 instructs the camera to display a setting change menu screen.

次に、上記構成の電子カメラの動作について説明する。始めに、システム制御回路10は、撮影者の操作によるスイッチ13、14、15のいずれかの状態変化を検出し、他の各ブロック及び撮像光学系への電源供給を開始して、各ブロックを使用できる状態にする。   Next, the operation of the electronic camera having the above configuration will be described. First, the system control circuit 10 detects a state change of any one of the switches 13, 14, and 15 by the photographer's operation, starts supplying power to the other blocks and the imaging optical system, and sets each block. Make it ready for use.

(撮像処理)
撮影者が撮影指示スイッチ13の操作により撮影動作を行った場合、システム制御回路10からの制御信号によって、撮像光学系1が作動し、撮像素子2上に被写体像が結像する。撮像素子2で光電変換された電気信号は、各画素毎に順々にA/D変換回路3を通して所定のデジタル信号に変換された後、画像処理回路4へ入力される。画像処理回路4では、撮像素子2の各画素データを基にRGBの各色信号を生成する。次に、これら各画素データをメモリ6に記憶する。メモリ6に記憶された画像データは、画像表示メモリ8へ転送され、画像表示部9を介して表示される。
(Imaging processing)
When the photographer performs a photographing operation by operating the photographing instruction switch 13, the imaging optical system 1 is activated by a control signal from the system control circuit 10, and a subject image is formed on the imaging element 2. The electric signal photoelectrically converted by the image pickup device 2 is converted into a predetermined digital signal through the A / D conversion circuit 3 in order for each pixel and then input to the image processing circuit 4. The image processing circuit 4 generates RGB color signals based on the pixel data of the image sensor 2. Next, each pixel data is stored in the memory 6. The image data stored in the memory 6 is transferred to the image display memory 8 and displayed via the image display unit 9.

(切り出し画像生成処理)
また、システム制御回路10は、メモリ6に記憶された画像データから、予め設定してある画像の切り出し位置情報、例えば図2の左上位置(Xt,Yt)と右下位置(Xb,Yb)といった情報Tに基づいて画像データを切り出す。そして、切り出し画像を新たな画像としてメモリ6に記憶することができる。
(Cut image generation processing)
Further, the system control circuit 10 uses preset image clipping position information from the image data stored in the memory 6, such as the upper left position (Xt, Yt) and lower right position (Xb, Yb) in FIG. Image data is cut out based on the information T. Then, the cut-out image can be stored in the memory 6 as a new image.

(画像保存処理)
撮影結果を保存する場合は、メモリ6に記憶された画像データを、メモリ制御回路5により所定の圧縮フォーマットに基づいてデータ圧縮し、その結果を外部メモリ7(通常フラッシュメモリ等の不揮発性メモリを使用)に記録する。その際、画像データに付随する情報として、画像の切り出し位置情報T(図2の左上位置(Xt,Yt)と右下位置(Xb,Yb))等の情報を付与することができる。
(Image saving process)
When saving the shooting result, the image data stored in the memory 6 is compressed by the memory control circuit 5 based on a predetermined compression format, and the result is stored in the external memory 7 (usually a non-volatile memory such as a flash memory). Use). At this time, information such as image cutout position information T (upper left position (Xt, Yt) and lower right position (Xb, Yb) in FIG. 2) can be added as information accompanying the image data.

また、撮影者が設定変更スイッチ15の操作によりカメラの設定を変更する場合、システム制御回路10から画像表示メモリ8を通して画像表示部9に設定変更画面(メニュー等のユーザーインターフェースにより構成される)を表示して行うことができる。   When the photographer changes the setting of the camera by operating the setting change switch 15, a setting change screen (configured by a user interface such as a menu) is displayed on the image display unit 9 from the system control circuit 10 through the image display memory 8. Can be displayed.

(ゴミ検出処理)
図3は、本実施形態に係る電子カメラによるゴミ検出処理(ゴミによって画像不良が生じている画素位置の検出処理)を説明するフローチャートである。ゴミ検出処理は、ゴミ検出用画像を撮像することにより行われる。
(Dust detection process)
FIG. 3 is a flowchart for explaining dust detection processing (detection processing of a pixel position where an image defect is caused by dust) by the electronic camera according to the present embodiment. The dust detection process is performed by capturing a dust detection image.

ゴミ検出処理を行う場合、面光源装置の出射面や白い壁等の均一な色を持つ面に撮像光学系1を向けてカメラを設置し、ゴミ検出の準備を行う。準備が終了した後、例えば撮影指示スイッチ13からゴミ検出処理の開始が指示されると、システム制御回路10は、まず絞りの設定を行う。撮像素子2近傍のゴミはレンズの絞り値によって結像状態が変わり、レンズの瞳位置によって位置が変化する。したがって、異物情報たるゴミ補正データには、ゴミの位置情報及び大きさ情報に加え、ゴミ検出処理時の絞り値とレンズの瞳位置を保持する必要がある。ここでは、例えばF16を指定する(ステップS21)。   When performing dust detection processing, a camera is installed with the imaging optical system 1 facing a surface having a uniform color, such as an emission surface of a surface light source device or a white wall, and preparation for dust detection is performed. After the preparation is completed, for example, when the start of dust detection processing is instructed from the photographing instruction switch 13, the system control circuit 10 first sets the aperture. The dust near the image sensor 2 changes its imaging state depending on the aperture value of the lens and changes its position depending on the pupil position of the lens. Accordingly, the dust correction data as foreign matter information needs to hold the aperture value and the lens pupil position at the time of dust detection processing in addition to dust position information and size information. Here, for example, F16 is designated (step S21).

次に、システム制御回路10は、レンズ駆動制御回路11に対し、撮像光学系1の絞り羽根制御を行わせ、ステップS21で指定された絞り値に絞りを設定する(ステップS22)。また、フォーカス位置を無限遠に設定する(ステップS23)。   Next, the system control circuit 10 causes the lens drive control circuit 11 to perform aperture blade control of the imaging optical system 1, and sets the aperture to the aperture value specified in step S21 (step S22). Further, the focus position is set to infinity (step S23).

絞り値とフォーカス位置が設定されると、ゴミ検出処理モードでの撮影を実行する(ステップS24)。これにより、異物検出用の撮影画像であるゴミ検出用画像が得られる。   When the aperture value and the focus position are set, shooting in the dust detection processing mode is executed (step S24). As a result, a dust detection image, which is a captured image for detecting foreign matter, is obtained.

撮影が終了すると、撮影時の絞り値とレンズ瞳位置を取得する(ステップS25)。次に、画像処理回路4とメモリ制御回路5を通してメモリ6に記憶されている撮影画像の各画素に対応するデータを呼び出す(ステップS26)。   When shooting is completed, the aperture value and lens pupil position at the time of shooting are acquired (step S25). Next, data corresponding to each pixel of the captured image stored in the memory 6 is called through the image processing circuit 4 and the memory control circuit 5 (step S26).

システム制御回路10は、ゴミが存在する画素の位置と大きさを取得する(ステップS27)。このステップS27のゴミ領域取得処理は、公知の手法、例えば特許文献2に開示された手法を用いればよく、ここではその詳細な説明は省略する。ステップS27のゴミ領域取得処理で取得されるゴミの位置情報とゴミの大きさ情報は、図4に示すように、ゴミ100を囲む円の中心座標D(Xi,Yi)(以下、Diと略す)を位置情報、ゴミ100を囲む円の半径Riを大きさ情報とする。   The system control circuit 10 acquires the position and size of the pixel where dust is present (step S27). The dust region acquisition processing in step S27 may use a known method, for example, the method disclosed in Patent Document 2, and a detailed description thereof is omitted here. As shown in FIG. 4, the dust position information and dust size information acquired in the dust region acquisition processing in step S27 are center coordinates D (Xi, Yi) (hereinafter abbreviated as Di) of a circle surrounding the dust 100. ) As position information and the radius Ri of the circle surrounding the dust 100 as size information.

ステップS27で取得したゴミが存在する画素の位置及び大きさ、及びステップS25で取得した絞り値とレンズ瞳位置情報を、ゴミ補正データとして外部メモリ7に登録する(ステップS28)。   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 external memory 7 as dust correction data (step S28).

(ゴミ除去(異物除去)処理)
次に、ゴミ除去処理の流れについて説明する。ゴミ除去処理は、電子カメラではなく、別途用意したパーソナルコンピュータ(PC)等の画像処理装置で行う。図5は、画像処理装置の概略構成を示す図である。CPU1001は、システム全体の動作をコントロールし、一次記憶部1002に格納されたプログラムの実行等を行う。
(Dust removal (foreign matter removal) processing)
Next, the flow of dust removal processing will be described. The dust removal process is performed not by an electronic camera but by an image processing apparatus such as a personal computer (PC) prepared separately. FIG. 5 is a diagram illustrating a schematic configuration of the image processing apparatus. The CPU 1001 controls the operation of the entire system and executes a program stored in the primary storage unit 1002.

一次記憶部1002は、主にメモリであり、二次記憶部1003に記憶されたプログラム等を読み込んで格納する。二次記憶部1003は、例えばハードディスク等がこれに該当する。一般に一次記憶部の容量は二次記憶部の容量より小さく、一次記憶部に格納しきれないプログラムやデータ等は二次記憶部に格納される。また、長時間記憶しなくてはならないデータ等も二次記憶部に格納される。本実施形態では、プログラムを二次記憶部1003に格納し、プログラム実行時に一次記憶部1002に読み込んでCPU1001が実行処理を行う。   The primary storage unit 1002 is mainly a memory, and reads and stores programs and the like stored in the secondary storage unit 1003. The secondary storage unit 1003 corresponds to a hard disk, for example. 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とは、例えばモニタやプリンタ等が挙げられる。この装置の構成方法は他にも様々な形態が考えられるが、本発明の主眼ではないので説明を省略する。   The input device 1004 corresponds to, for example, a card reader, a scanner, a film scanner, and the like necessary for inputting image data in addition to a mouse and a keyboard used for system control. 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.

図6は、本実施形態に係る画像処理装置によるゴミ除去処理を説明するフローチャートである。まず、画像処理装置は、電子カメラ内又は電子カメラから取り外された外部メモリ7からゴミ補正データが添付された通常撮影画像データを取り込んで、一次記憶部1002又は二次記憶部1003に記憶する(ステップS101)。   FIG. 6 is a flowchart for explaining dust removal processing by the image processing apparatus according to the present embodiment. First, the image processing apparatus takes in normal photographed image data attached with dust correction data from the external memory 7 in the electronic camera or removed from the electronic camera, and stores it in the primary storage unit 1002 or the secondary storage unit 1003 ( Step S101).

次に、通常撮影画像データから、異物情報取得のために、ステップS28で登録されたゴミ補正データを抽出する(ステップS102)。   Next, the dust correction data registered in step S28 is extracted from the normal captured image data in order to acquire foreign substance information (step S102).

次に、ステップS102で抽出したゴミ補正データから、ゴミの位置情報である座標列Di(i=1,2,…,n)、ゴミの大きさ情報である半径列Ri(i=1,2,…,n)、絞り値f1及びレンズ瞳位置L1を取得する(ステップS103)。   Next, from the dust correction data extracted in step S102, a coordinate row Di (i = 1, 2,..., N) which is dust position information and a radius row Ri (i = 1, 2) which is dust size information. ,..., N), the aperture value f1 and the lens pupil position L1 are acquired (step S103).

次に、通常撮影画像の撮影時の絞り値f2とレンズ瞳位置L2を取得する(ステップS104)。そして、ゴミの位置情報である座標Diとゴミの大きさ情報である半径列Riを次式(1)、(2)で変換して、変換後の座標Di’と変換後の半径Ri’を得る(ステップS105)。ここで、dは画像中心から座標Diまでの距離、Hは撮像素子2の表面とゴミとの距離である。ここでの単位はピクセルであり、Ri’についての「+3」はマージン量である。
Di’=(L2×(L1−H)×d/((L2−H)×L1))×Di・・・(1)
Ri’=(Ri×f1/f2+3)・・・(2)
Next, an aperture value f2 and a lens pupil position L2 at the time of photographing a normal photographed image are acquired (step S104). Then, the coordinate Di, which is dust position information, and the radius sequence Ri, which is dust size information, are converted by the following equations (1) and (2), and the converted coordinates Di ′ and the converted radius Ri ′ are obtained. Obtain (step S105). Here, d is the distance from the center of the image to the coordinates Di, and H is the distance between the surface of the image sensor 2 and dust. The unit here is a pixel, and “+3” for Ri ′ is a margin amount.
Di ′ = (L2 × (L1-H) × d / ((L2-H) × L1)) × Di (1)
Ri ′ = (Ri × f1 / f2 + 3) (2)

次に、切り出し位置情報取得のために、画像保存時に付与した画像の切り出し位置情報T(図2の左上位置(Xt,Yt)と右下位置(Xb,Yb))を取得する。そして、ステップS105での変換後の座標Di’を、画像の切り出し位置情報T、更には必要に応じてゴミの大きさ情報Riに基づいて変換して、変換後の座標Dia(x,y)又はDib(x,y)を得る(ステップS106)。このゴミ位置変換ルーチンの詳細については後述する。   Next, in order to acquire cutout position information, cutout position information T (upper left position (Xt, Yt) and lower right position (Xb, Yb) in FIG. 2) of the image assigned when the image is stored is acquired. Then, the coordinate Di ′ after the conversion in step S105 is converted based on the cutout position information T of the image and, if necessary, the dust size information Ri, and the converted coordinate Dia (x, y). Or, Div (x, y) is obtained (step S106). Details of the dust position conversion routine will be described later.

次に、ステップS106での変換後の座標Dia(x,y)又はDib(x,y)、及び、ゴミの大きさ情報Ri’で示される領域内のゴミを検出し、必要に応じて補間処理を適用する(ステップS107)。このステップS107の補間処理は、公知の手法、例えば特許文献2に開示された手法を用いればよく、ここではその詳細な説明は省略する。   Next, dust in the area indicated by the coordinate Dia (x, y) or Div (x, y) after the conversion in step S106 and the dust size information Ri ′ is detected and interpolated as necessary. Processing is applied (step S107). The interpolation processing in step S107 may use a known method, for example, the method disclosed in Patent Document 2, and detailed description thereof is omitted here.

その後、全てのゴミについてゴミ除去処理を適用したか否かを判定し(ステップS108)、全てのゴミについて処理が終わっていれば処理を終了し、そうでなければステップS107に戻る。   Thereafter, it is determined whether or not dust removal processing has been applied to all dust (step S108). If processing has been completed for all dust, the processing ends. Otherwise, the processing returns to step S107.

(ゴミ位置変換ルーチン)
図7を参照して、図6のステップS106のゴミ位置変換ルーチンの流れを説明する。なお、このゴミ位置変換ルーチンで扱う座標は、切り出し画像201の左上を原点(0,0)とし、右及び下方向を増加する方向としている。
(Dust position conversion routine)
With reference to FIG. 7, the flow of the dust position conversion routine in step S106 of FIG. 6 will be described. Note that the coordinates handled in this dust position conversion routine are such that the upper left of the clipped image 201 is the origin (0, 0) and the right and lower directions are increasing.

まずステップS201で、ステップS105での変換後の座標Di’が、画像の切り出し範囲T(図2の左上位置(Xt,Yt)と右下位置(Xb,Yb))内にあるか否かを判定する。   First, in step S201, it is determined whether or not the coordinate Di ′ after the conversion in step S105 is within the image cutout range T (upper left position (Xt, Yt) and lower right position (Xb, Yb) in FIG. 2). judge.

ステップS201で座標Di’が画像の切り出し範囲T内にあれば、ステップS202に進み、座標Di’を切り出し画像201を基準とした座標に次式(3)で変換し、座標Di’を変換後の座標Dia(x,y)で置き換える。その後、ステップS207に進む。
Dia(x,y)=Di’−(Xt,Yt)・・・(3)
If the coordinate Di ′ is within the cutout range T of the image in step S201, the process proceeds to step S202, where the coordinate Di ′ is converted into a coordinate based on the cutout image 201 by the following expression (3), and the coordinate Di ′ is converted. Replace with the coordinates Dia (x, y). Thereafter, the process proceeds to step S207.
Dia (x, y) = Di ′ − (Xt, Yt) (3)

一方、ステップS201で座標Di’が画像の切り出し範囲T内になければ,ステップS203に進み、座標Di’を切り出し画像201を基準とした座標に変換するとともに、ゴミの大きさ情報Riに基づいて変換する。ステップS203では、座標Di’を以下のいずれかの条件に従って変換し、座標Di’を変換後の座標Dib(x,y)(第2の異物の位置情報)で置き換える。
Di’がT(図2の左上位置(Xt,Yt)と右下位置(Xb,Yb))より上位置にある場合、
Dib(x,y)=Di’−(Xt,Yt)+(0,Ri)
Di’がT(図2の左上位置(Xt,Yt)と右下位置(Xb,Yb))より下位置にある場合、
Dib(x,y)=Di’−(Xt,Yt)−(0,Ri)
Di’がT(図2の左上位置(Xt,Yt)と右下位置(Xb,Yb))より左位置にある場合、
Dib(x,y)=Di’−(Xt,Yt)+(Ri,0)
Di’がT(図2の左上位置(Xt,Yt)と右下位置(Xb,Yb))より右位置にある場合、
Dib(x,y)=Di’−(Xt,Yt)−(Ri,0)
On the other hand, if the coordinate Di ′ is not within the cutout range T of the image in step S201, the process proceeds to step S203, where the coordinate Di ′ is converted into a coordinate based on the cutout image 201, and based on the dust size information Ri. Convert. In step S203, the coordinate Di ′ is converted according to any of the following conditions, and the coordinate Di ′ is replaced with the converted coordinate Dib (x, y) (second foreign substance position information).
When Di ′ is above T (upper left position (Xt, Yt) and lower right position (Xb, Yb) in FIG. 2),
Dib (x, y) = Di ′ − (Xt, Yt) + (0, Ri)
When Di ′ is below T (upper left position (Xt, Yt) and lower right position (Xb, Yb) in FIG. 2),
Dib (x, y) = Di ′ − (Xt, Yt) − (0, Ri)
When Di ′ is at a position to the left of T (upper left position (Xt, Yt) and lower right position (Xb, Yb) in FIG. 2),
Dib (x, y) = Di ′ − (Xt, Yt) + (Ri, 0)
When Di ′ is at the right position from T (upper left position (Xt, Yt) and lower right position (Xb, Yb) in FIG. 2),
Dib (x, y) = Di ′ − (Xt, Yt) − (Ri, 0)

次に、ステップS204で、第2の判定として、ステップS203で変換した座標Dib(x,y)が画像の切り出し位置範囲T内にあるか否かを判定する。座標Dib(x,y)が画像の切り出し範囲T内にあれば、ステップS205に進み、座標Di’を変換後の座標Dib(x,y)で置き換える。その後、ステップS207に進む。   Next, in step S204, as a second determination, it is determined whether or not the coordinates Div (x, y) converted in step S203 are within the cutout position range T of the image. If the coordinate Div (x, y) is within the image cutout range T, the process proceeds to step S205, and the coordinate Di 'is replaced with the converted coordinate Div (x, y). Thereafter, the process proceeds to step S207.

一方、座標Dib(x,y)が画像の切り出し範囲T内になければ,ステップS206に進み、座標Di’を座標列から削除し、ゴミ除去処理の対象としないようにする。この場合は、ゴミの位置が切り出し画像201の外であって、ゴミ自体の大きさによっても切り出し画像201に含まれない場合であり、ゴミ除去処理の対象外としたものである。   On the other hand, if the coordinate Dib (x, y) is not within the image cutout range T, the process proceeds to step S206, where the coordinate Di 'is deleted from the coordinate sequence so that it is not subject to dust removal processing. In this case, the position of the dust is outside the cutout image 201 and is not included in the cutout image 201 due to the size of the dust itself, and is excluded from the target of dust removal processing.

ステップS207で、全ての座標についてゴミ位置情報の変換を適用したか否かを判定し、全ての座標について処理が終わっていれば処理を終了し、そうでなければステップS201に戻る。   In step S207, it is determined whether the conversion of dust position information has been applied to all coordinates. If the processing has been completed for all coordinates, the process ends. If not, the process returns to step S201.

以上述べたように、切り出して作成した画像に対してでも、後のゴミ除去処理において、ゴミの位置が切り出し範囲外にあるにもかかわらず、ゴミの端が切り出し画像内にあるようなゴミであっても、ゴミの除去処理を適用することができるようになる。   As described above, even in the case of an image created by cutting out, in the subsequent dust removal processing, even if the position of the dust is outside the clipping range, Even in such a case, the dust removal process can be applied.

(その他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。すなわち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(又はCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other embodiments)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program. It is a process to be executed.

1001:CPU、1002:一次記憶部、1003:二次記憶部、1004:入力デバイス、1005:出力デバイス 1001: CPU, 1002: primary storage unit, 1003: secondary storage unit, 1004: input device, 1005: output device

Claims (4)

撮像手段で得られた異物検出用の撮影画像から抽出された異物の位置情報及び異物の大きさ情報を含む異物情報を取得する異物情報取得手段と、
前記撮像手段による通常撮影時の撮影画像から切り出す、切り出し画像の切り出し位置情報を取得する切り出し位置情報取得手段と、
前記異物の位置情報及び前記切り出し位置情報に基づいて、異物の位置が前記切り出し画像内にあるか否かを判定する判定手段と、
前記判定手段により、異物の位置が前記切り出し画像内にないと判定された場合、前記異物の位置情報を、前記異物の大きさ情報に基づいて第2の異物の位置情報に変換する変換手段とを備えたことを特徴とする画像処理装置。
Foreign matter information acquisition means for acquiring foreign matter information including foreign matter position information and foreign matter size information extracted from a captured image for foreign matter detection obtained by the imaging means;
Cutout position information acquisition means for acquiring cutout position information of a cutout image cut out from a captured image at the time of normal shooting by the imaging means;
Determining means for determining whether or not the position of the foreign object is in the cut-out image based on the position information of the foreign object and the cut-out position information;
Conversion means for converting the position information of the foreign object into position information of the second foreign object based on the size information of the foreign object when the determination unit determines that the position of the foreign object is not in the cut-out image; An image processing apparatus comprising:
前記第2の異物の位置情報及び前記切り出し位置情報に基づいて、変換後の異物の位置が前記切り出し画像内にあるか否かを判定する第2の判定手段を更に備え、
前記第2の判定手段により、変換後の異物の位置が前記切り出し画像内にあると判定された場合、前記第2の異物の位置情報及び前記異物の大きさ情報に基づいて、前記切り出し画像に対して異物除去のための補間処理を行うことを特徴とする請求項1に記載の画像処理装置。
Based on the position information of the second foreign matter and the cutout position information, further comprising second determination means for determining whether the position of the foreign matter after conversion is in the cutout image;
When the second determination means determines that the position of the foreign matter after conversion is in the cutout image, the cutout image is determined based on the position information of the second foreign matter and the size information of the foreign matter. The image processing apparatus according to claim 1, wherein an interpolation process for removing foreign matter is performed on the image processing apparatus.
撮像手段で得られた異物検出用の撮影画像から抽出された異物の位置情報及び異物の大きさ情報を含む異物情報を取得するステップと、
前記撮像手段による通常撮影時の撮影画像から切り出す、切り出し画像の切り出し位置情報を取得するステップと、
前記異物の位置情報及び前記切り出し位置情報に基づいて、異物の位置が前記切り出し画像内にあるか否かを判定するステップと、
異物の位置が前記切り出し画像内にないと判定された場合、前記異物の位置情報を、前記異物の大きさ情報に基づいて第2の異物の位置情報に変換するステップとを有することを特徴とする画像処理方法。
Acquiring foreign matter information including foreign matter position information and foreign matter size information extracted from a captured image for foreign matter detection obtained by the imaging means;
A step of obtaining cutout position information of a cutout image cut out from a shot image at the time of normal shooting by the imaging means;
Determining whether the position of the foreign object is in the cut-out image based on the position information of the foreign object and the cut-out position information;
Converting the position information of the foreign object into position information of a second foreign object based on the size information of the foreign object when it is determined that the position of the foreign object is not in the cut-out image. Image processing method.
撮像手段で得られた異物検出用の撮影画像から抽出された異物の位置情報及び異物の大きさ情報を含む異物情報を取得する処理と、
前記撮像手段による通常撮影時の撮影画像から切り出す、切り出し画像の切り出し位置情報を取得する処理と、
前記異物の位置情報及び前記切り出し位置情報に基づいて、異物の位置が前記切り出し画像内にあるか否かを判定する処理と、
異物の位置が前記切り出し画像内にないと判定された場合、前記異物の位置情報を、前記異物の大きさ情報に基づいて第2の異物の位置情報に変換する処理とをコンピュータに実行させるためのプログラム。
Processing for acquiring foreign matter information including foreign matter position information and foreign matter size information extracted from a captured image for foreign matter detection obtained by the imaging means;
A process of obtaining cutout position information of a cutout image cut out from a shot image at the time of normal shooting by the imaging unit;
A process for determining whether or not the position of the foreign object is in the cut-out image based on the position information of the foreign object and the cut-out position information;
In order to cause the computer to execute processing for converting the position information of the foreign object into the position information of the second foreign object based on the size information of the foreign object when it is determined that the position of the foreign object is not in the cut-out image Program.
JP2010185310A 2010-08-20 2010-08-20 Image processing device, method, and program Pending JP2012044542A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010185310A JP2012044542A (en) 2010-08-20 2010-08-20 Image processing device, method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010185310A JP2012044542A (en) 2010-08-20 2010-08-20 Image processing device, method, and program

Publications (1)

Publication Number Publication Date
JP2012044542A true JP2012044542A (en) 2012-03-01

Family

ID=45900308

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010185310A Pending JP2012044542A (en) 2010-08-20 2010-08-20 Image processing device, method, and program

Country Status (1)

Country Link
JP (1) JP2012044542A (en)

Similar Documents

Publication Publication Date Title
JP4989385B2 (en) Imaging apparatus, control method thereof, and program
JP6267502B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM
JP2007215151A (en) Imaging apparatus, control method thereof, and program
JP2006287803A (en) Imaging device
JP2007189467A (en) Image processor, image processing method, and program
JP2010288240A (en) Imaging apparatus, control method of the same, and program
KR20120002834A (en) Image pickup apparatus for providing reference image and method for providing reference image thereof
JP2012008307A (en) Imaging apparatus and display method
JP2007081732A (en) Imaging apparatus
JP2008172507A (en) Imaging apparatus
JP2012044243A (en) Image processing apparatus, imaging apparatus and image processing program
JP2006033291A (en) Imaging apparatus, method of controlling the same and processing program thereof
JP2011055361A (en) Image processing apparatus and imaging apparatus
KR20120110869A (en) Digital photographing apparatus, method for controlling the same, and recording medium storing program to implement the method
US11055871B2 (en) Image capturing apparatus, control method for the same, and storage medium
JP2006217249A (en) Electronic camera, electronic camera system and program
JP5332668B2 (en) Imaging apparatus and subject detection program
JP2012044542A (en) Image processing device, method, and program
US10897571B2 (en) Image capturing apparatus, control method for the same, and storage medium
JP2007333909A (en) Electronic camera
JP2012156884A (en) Control device and computer program
JP4902512B2 (en) Imaging apparatus, control method thereof, and program
JP6278688B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM
JP5094571B2 (en) Imaging apparatus, control method thereof, and program
JP2019062369A (en) Imaging apparatus and control method thereof, electronic device and control method thereof, and program