JP2013115547A - Imaging apparatus and control method of the same - Google Patents

Imaging apparatus and control method of the same Download PDF

Info

Publication number
JP2013115547A
JP2013115547A JP2011258769A JP2011258769A JP2013115547A JP 2013115547 A JP2013115547 A JP 2013115547A JP 2011258769 A JP2011258769 A JP 2011258769A JP 2011258769 A JP2011258769 A JP 2011258769A JP 2013115547 A JP2013115547 A JP 2013115547A
Authority
JP
Japan
Prior art keywords
image
pixel
imaging
unit
reference image
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
JP2011258769A
Other languages
Japanese (ja)
Inventor
Masahiko Morita
正彦 森田
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 JP2011258769A priority Critical patent/JP2013115547A/en
Publication of JP2013115547A publication Critical patent/JP2013115547A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an imaging apparatus which obtains a high-quality image by continuously collecting data on level-varying flaws occurring in a solid state imaging device.SOLUTION: The imaging apparatus comprises: an imaging device 314 which converts an optical image of a subject to electric information; a memory unit 326 which retains defective pixel data of the imaging device 314; and a CPU provided in a system control circuit 324 which, on the basis of the defective pixel data of a defective pixel stored in the memory unit 326, corrects the defective pixel, takes a reference image for generating information for processing an image taken by the imaging device 314, detects the level-varying flaw as the defective pixel using the reference image, and performs pixel data correction on the defective pixel.

Description

本発明は、固体撮像素子を用いて静止画像や動画像を撮像する撮像装置に関し、特に、固体撮像素子の特性に起因する欠陥画素の検出及び補正を行う撮像装置及びその制御方法に関する。   The present invention relates to an imaging apparatus that captures a still image or a moving image using a solid-state imaging element, and more particularly to an imaging apparatus that detects and corrects defective pixels due to the characteristics of the solid-state imaging element and a control method thereof.

従来の固体撮像素子を利用した撮像装置では、撮像装置を出荷する前に固体撮像素子に起因する欠陥画素を検出して撮像装置内に欠陥画素データとして記憶し、撮影時には欠陥画素データを用いて欠陥画素を周辺画素データで補正している。また、撮像装置を出荷した後に固体撮像素子に発生する欠陥画素に対しては、使用者に欠陥画素の検出を行わせる場合がある。   In an imaging device using a conventional solid-state imaging device, defective pixels caused by the solid-state imaging device are detected and stored as defective pixel data in the imaging device before shipping the imaging device, and the defective pixel data is used during imaging. The defective pixel is corrected with the peripheral pixel data. In addition, for defective pixels that occur in a solid-state imaging device after the imaging device is shipped, the user may be caused to detect defective pixels.

欠陥画素には、暗電流に起因する白い点傷、画素毎の感度差に起因する感度傷、内部構造に起因して発生し、撮影毎にレベル変動し発生周期がランダムな変動レベル傷がある。また、一般的に宇宙線等の影響により発生し、撮像装置の出荷後に発生する宇宙線傷等の欠陥画素もある。   Defective pixels include white scratches caused by dark current, sensitivity flaws caused by sensitivity differences between pixels, internal flaws, and fluctuating level flaws in which the level fluctuates every shooting and the generation cycle is random. . In addition, there are also defective pixels such as cosmic ray scratches that are generally generated by the influence of cosmic rays and the like and are generated after shipment of the imaging device.

このうち、白い点傷を検出するためには遮光して撮影する必要がある。例えば、シャッタを用いて固体撮像素子を光学的に遮光した撮影画像で検出を行い、欠陥画素判別閾値をゲイン量や温度情報に基づいて変えることで検出精度を向上させる検出方法が知られている(特許文献1参照)。   Among these, in order to detect white scratches, it is necessary to shoot with shading. For example, a detection method is known in which detection is performed with a captured image in which a solid-state imaging device is optically shielded using a shutter, and detection accuracy is improved by changing a defective pixel discrimination threshold based on gain amount or temperature information. (See Patent Document 1).

特許第3014895号公報Japanese Patent No. 3014895

上述の白い点傷の検出方法とは異なり、変動レベル傷を検出するためには、固体撮像素子に均一輝度面を露光させ、複数回の撮影を行って検出頻度を上げる必要がある。しかし、製造工程の限られた時間内で全ての変動レベル傷を検出することは困難である。また、出荷後の使用者環境における変動レベル傷の検出条件を、製造工程の環境で揃えることは困難である。   Unlike the above-described white spot detection method, in order to detect fluctuating level scratches, it is necessary to expose a uniform luminance surface to a solid-state image pickup device and perform imaging a plurality of times to increase the detection frequency. However, it is difficult to detect all flaws within a limited time of the manufacturing process. In addition, it is difficult to make the detection conditions of fluctuating level scratches in the user environment after shipment uniform in the environment of the manufacturing process.

本発明は、固体撮像素子に生じる変動レベル傷のデータ収集を継続的に行うことによって高品質な画像を得る撮像装置を提供することを目的とする。   It is an object of the present invention to provide an imaging apparatus that obtains a high-quality image by continuously collecting data on fluctuating level flaws that occur in a solid-state imaging device.

本発明に係る撮像装置は、被写体の光学像を電気信号に変換して出力する撮像手段と、前記撮像手段の欠陥画素データを記憶する記憶手段と、前記記憶手段に記憶された前記欠陥画素データに基づいて前記欠陥画素の位置に対応する画像データを補正する補正手段と、前記撮像手段による撮影画像を処理する情報を生成するための基準画像を前記撮像手段を露光した状態で撮影し、前記基準画像を用いて前記欠陥画素を検出する制御手段と、を備えることを特徴とする。   An imaging apparatus according to the present invention includes an imaging unit that converts an optical image of a subject into an electrical signal and outputs the storage unit, a storage unit that stores defective pixel data of the imaging unit, and the defective pixel data stored in the storage unit A correction unit that corrects image data corresponding to the position of the defective pixel based on the reference image, and a reference image for generating information for processing the captured image by the imaging unit is captured in a state where the imaging unit is exposed, And a control means for detecting the defective pixel using a reference image.

本発明によれば、撮影画像が均一輝度面である場合に固体撮像素子に生じる変動レベル傷を検出する頻度を多くして、発生周期が区々な欠陥画素の検出を継続的に行い、欠陥画素に対する画素データの補正に用いるため、より高品質な画像を得ることが可能になる。   According to the present invention, when the captured image has a uniform luminance surface, the frequency of detecting the fluctuating level scratches generated in the solid-state imaging device is increased, and defective pixels with various generation periods are continuously detected, Since it is used for correction of pixel data with respect to a pixel, a higher quality image can be obtained.

本発明の実施形態に係る変動レベル傷の検出処理のフローチャートである。It is a flowchart of the detection process of the fluctuation | variation level damage | wound which concerns on embodiment of this invention. 変動レベル傷を検出するための基準画像の撮影画面の例である。It is an example of the imaging | photography screen of the reference | standard image for detecting a fluctuation | variation level damage | wound. 本発明の実施形態に係る撮像装置の構成を示すブロック図である。It is a block diagram which shows the structure of the imaging device which concerns on embodiment of this invention. 図1のステップS107で生成される基準画像の概念図である。It is a conceptual diagram of the reference | standard image produced | generated by step S107 of FIG. 基準画像の画面均一判定処理(図1のS109)のフローチャートである。It is a flowchart of the screen uniformity determination process (S109 of FIG. 1) of a reference image. 変動レベル傷検出処理(図1のS111)のフローチャートである。It is a flowchart of a fluctuation | variation level flaw detection process (S111 of FIG. 1).

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

<撮像装置のシステム構成>
図3は、本発明の実施形態に係る撮像装置の構成を示すブロック図である。撮像装置300は、変倍レンズ310と、焦点調節レンズ311と、後段への光束を遮断するメカニカルシャッタ312と、後段への光束を調節する絞りとNDフィルタ313と、撮像素子314とを有する。撮像素子314は、被写体の光学像を電気信号に変換して出力する。タイミング発生器315は、撮像素子314の駆動とサンプリングに必要なタイミングパルスを発生する。また、タイミング発生器315のタイミングパルスに基づいて、CDS素子316が、撮像素子314の出力の二重相関サンプリングを行う。CDS素子316からの出力は、A/D変換器317によって量子化される。
<System configuration of imaging device>
FIG. 3 is a block diagram illustrating a configuration of the imaging apparatus according to the embodiment of the present invention. The imaging apparatus 300 includes a zoom lens 310, a focus adjustment lens 311, a mechanical shutter 312 that blocks the light beam to the subsequent stage, an aperture that adjusts the light beam to the subsequent stage, an ND filter 313, and an image sensor 314. The image sensor 314 converts the optical image of the subject into an electrical signal and outputs it. The timing generator 315 generates timing pulses necessary for driving and sampling the image sensor 314. Further, based on the timing pulse of the timing generator 315, the CDS element 316 performs double correlation sampling of the output of the imaging element 314. The output from the CDS element 316 is quantized by the A / D converter 317.

撮像装置300は、撮像出力となるA/D変換器317の出力を受けて画像処理を行う画像処理部318を備えている。画像処理部318は、前処理回路、輝度積分回路、信号処理回路、縮小回路、ラスタブロック変換回路及び圧縮回路を含む。前処理回路は、入力画像をライン単位で輝度積分回路と信号処理回路とに分配する。また、前処理回路は、撮像素子314の欠陥画素データを入力し、対応する画素を固定値にマーキングし或いは前置補間して簡易補正を行う。前処理回路は更にその後段回路において、マーキングされた画素データを保持して後段に出力する機能を併せ持ち、各処理に適した補正処理を行う。   The imaging apparatus 300 includes an image processing unit 318 that receives an output of the A / D converter 317 serving as an imaging output and performs image processing. The image processing unit 318 includes a preprocessing circuit, a luminance integration circuit, a signal processing circuit, a reduction circuit, a raster block conversion circuit, and a compression circuit. The preprocessing circuit distributes the input image to the luminance integration circuit and the signal processing circuit in units of lines. Further, the preprocessing circuit inputs defective pixel data of the image sensor 314, and performs simple correction by marking the corresponding pixel to a fixed value or by performing pre-interpolation. The pre-processing circuit further has a function of holding the marked pixel data and outputting it to the subsequent stage in the subsequent circuit, and performs a correction process suitable for each process.

輝度積分回路は、RGB信号から輝度成分を混合生成し、入力画像を複数領域に分割して領域毎に輝度成分を生成する。また、輝度積分回路は、RGB信号から色空間座標に変換するための演算処理を行い、撮影画面内に設定された領域内の全画素について色毎に白抽出積分を行う。得られた白抽出積分データは、ホワイトバランスを取るための各色に掛ける白係数を求めるために使用される。   The luminance integration circuit mixes and generates luminance components from the RGB signals, divides the input image into a plurality of regions, and generates a luminance component for each region. The luminance integration circuit performs arithmetic processing for converting RGB signals into color space coordinates, and performs white extraction integration for each color for all pixels in the region set in the photographing screen. The obtained white extraction integrated data is used to obtain a white coefficient to be applied to each color for white balance.

信号処理回路は、A/D変換器317の出力データに色キャリア除去、アパーチャー補正、ガンマ補正処理等を行って輝度信号を生成すると同時に、先の白係数等を用いてホワイトバランスを取る。また、信号処理回路は、色補間、マトリックス変換、ガンマ処理、ゲイン調整(撮像素子314からの出力の増幅)等を施して色差信号を生成し、メモリ部326にYUV形式の画像データを保存する。   The signal processing circuit performs color carrier removal, aperture correction, gamma correction processing, and the like on the output data of the A / D converter 317 to generate a luminance signal, and at the same time, obtains white balance using the white coefficient and the like. In addition, the signal processing circuit performs color interpolation, matrix conversion, gamma processing, gain adjustment (amplification of output from the image sensor 314), and the like to generate a color difference signal, and stores image data in YUV format in the memory unit 326. .

縮小回路は、信号処理回路からの出力を受けて、入力される画素データの切り出し、間引き及び線形補間処理等を行い、水平/垂直の両方向で画素データの縮小処理を施す。ラスタブロック変換回路は、縮小回路で変倍されたラスタスキャン画像データをブロックスキャン画像データに変換する。こうした一連の画像処理には、メモリ部326がバッファメモリとして用いられて実現され、バッファメモリでブロックスキャンデータに変換した画像データは、圧縮回路にてブロック単位で圧縮される。   The reduction circuit receives the output from the signal processing circuit, performs input pixel data clipping, thinning, linear interpolation processing, and the like, and performs pixel data reduction processing in both horizontal and vertical directions. The raster block conversion circuit converts the raster scan image data scaled by the reduction circuit into block scan image data. The series of image processing is realized by using the memory unit 326 as a buffer memory, and the image data converted into the block scan data by the buffer memory is compressed in units of blocks by the compression circuit.

上述した各種制御は、制御手段として、CPUとそのインターフェイス回路、DMAC(Direct・Momory・Access・Controller)、バスアービター等で構成されるシステム制御回路324によって統括されている。CPUが実行するプログラム及び撮像素子314の欠陥画素データは、欠陥画素記憶手段としてのフラッシュメモリ325に記憶されている。なお、撮像素子314の欠陥画素データは、撮像装置300の起動時にメモリ部326に展開され、DMACを経由して画像処理部318に入力される。   The various controls described above are controlled by a system control circuit 324 including a CPU and its interface circuit, a DMAC (Direct, Access, Access, Controller), a bus arbiter, and the like as control means. A program executed by the CPU and defective pixel data of the image sensor 314 are stored in a flash memory 325 serving as defective pixel storage means. The defective pixel data of the image sensor 314 is expanded in the memory unit 326 when the image capturing apparatus 300 is activated, and is input to the image processing unit 318 via the DMAC.

撮像装置300は、メカニカルシャッタ312及び絞り313を制御する露出制御部319と、変倍レンズ310及び焦点調節レンズ311を光軸上に沿って移動させ、被写界像を撮像素子314上に結像させるレンズ制御部320とを有する。また、撮像装置300は、ユーザが表示画像の切り替えを行うための表示切替スイッチ321と、ホワイトバランスを設定する画面に切り替え、ホワイトバランスモードを設定するWB切替スイッチ322とを有する。撮像装置300におけるモード等の選択設定は、十字スイッチ323の操作により行われる。十字スイッチ323は、表示切替スイッチ321の操作による表示切替には、ライブ画像と共に撮像装置の設定状態を示す情報表示するか否かを選択するスイッチとしても使用される。   The imaging apparatus 300 moves the exposure control unit 319 that controls the mechanical shutter 312 and the diaphragm 313, the variable power lens 310, and the focus adjustment lens 311 along the optical axis, and connects the object scene image onto the imaging element 314. A lens control unit 320 for imaging. The imaging apparatus 300 also includes a display changeover switch 321 for the user to change the display image, and a WB changeover switch 322 for switching to a screen for setting a white balance and setting a white balance mode. Selection setting such as a mode in the imaging apparatus 300 is performed by operating the cross switch 323. The cross switch 323 is also used as a switch for selecting whether to display information indicating the setting state of the imaging apparatus together with the live image for display switching by the operation of the display switching switch 321.

撮像装置300は、電源となる電池342、撮像装置300に電池342を保持させる電池BOX340、画像を記憶する記憶媒体332、記憶媒体332への書き込み禁止を検出するスイッチ333、記憶媒体332の着脱を検出するスイッチ329を有する。撮像装置300と電池342とは、切片370,341で係合、接続される。撮像装置300と記憶媒体332とは切片328,331で係合、接続され、記憶媒体332とシステム制御回路324とはI/F部327を介してデータの受け渡しを行う。   The imaging apparatus 300 includes a battery 342 serving as a power source, a battery BOX 340 that causes the imaging apparatus 300 to hold the battery 342, a storage medium 332 that stores an image, a switch 333 that detects prohibition of writing to the storage medium 332, and a storage medium 332 being attached and detached. It has a switch 329 for detection. The imaging device 300 and the battery 342 are engaged and connected by the sections 370 and 341. The imaging apparatus 300 and the storage medium 332 are engaged and connected by the sections 328 and 331, and the storage medium 332 and the system control circuit 324 exchange data via the I / F unit 327.

撮像装置300では、再生回路350が、画像処理部318で生成されてメモリ部326に記憶された画像データを表示用画像に変換してモニタ(表示装置)351に転送する。再生回路350は、YUV形式の画像データを輝度成分信号Yと変調色差成分Cとに分離し、D/A変換によりアナログ化されたY信号にLPFを施すと共に、D/A変換後のアナログC信号にBPFを施して変調色差成分の周波数成分のみを抽出する。再生回路350は、こうして生成された信号成分とサブキャリア周波数に基づいて、Y信号とRGB信号に変換生成してモニタ351に出力する。こうして、撮像素子314からの画像データが逐次処理されることによってEVFが実現される。   In the imaging device 300, the reproduction circuit 350 converts the image data generated by the image processing unit 318 and stored in the memory unit 326 into a display image and transfers the image to the monitor (display device) 351. The reproduction circuit 350 separates the YUV format image data into a luminance component signal Y and a modulated chrominance component C, applies LPF to the analogized Y signal by D / A conversion, and performs analog C after D / A conversion. BPF is applied to the signal to extract only the frequency component of the modulated color difference component. The reproduction circuit 350 converts and generates a Y signal and an RGB signal based on the signal component thus generated and the subcarrier frequency, and outputs the Y signal and the RGB signal to the monitor 351. Thus, EVF is realized by sequentially processing the image data from the image sensor 314.

<基準画像の撮影と変動レベル傷検出>
図1は変動レベル傷の検出処理のフローチャートであり、図2は変動レベル傷を検出するための基準画像の撮影画面の例である。先ず、システム制御回路324のCPUは、使用者によりWB切替スイッチ(SW)322が押下されたかを判定する(ステップS101)。CPUは、WB切替スイッチ322が押下されるまで待機し(S101:NO)、WB切替スイッチ322が押下されると(S101:YES)、処理をステップS102に進める。ステップS102では、CPUは、図2(A)に示すように、EVFと共にホワイトバランスモードを設定するGUIをモニタ351の画面に表示する。
<Capturing the reference image and detecting flaws on the fluctuation level>
FIG. 1 is a flowchart of a process for detecting a flaw level flaw, and FIG. 2 is an example of a reference image shooting screen for detecting flaw level flaws. First, the CPU of the system control circuit 324 determines whether or not the WB switch (SW) 322 has been pressed by the user (step S101). The CPU waits until the WB changeover switch 322 is pressed (S101: NO). When the WB changeover switch 322 is pressed (S101: YES), the process proceeds to step S102. In step S102, the CPU displays a GUI for setting the white balance mode together with the EVF on the screen of the monitor 351, as shown in FIG.

続いて、CPUは、十字スイッチ323で基準画像取り込みモードの選択が行われたかを判定する(ステップS103)。CPUは、基準画像取り込みモードが選択されるまで待機する(S103:NO)。基準画像取り込みモードが選択されると(S103:YES)、CPUは、図2(B)に示すように、撮影された画像の画面全体に、取り込む画像範囲を示す。また、CPUは、表示切替スイッチ321で基準画像を画面全体で取り込むガイダンス(「白データ取り込み」)を表示する(ステップS104)。   Subsequently, the CPU determines whether the reference image capture mode has been selected with the cross switch 323 (step S103). The CPU waits until the reference image capture mode is selected (S103: NO). When the reference image capturing mode is selected (S103: YES), the CPU indicates the image range to be captured on the entire screen of the photographed image as shown in FIG. In addition, the CPU displays a guidance (“white data capture”) for capturing the reference image on the entire screen with the display changeover switch 321 (step S104).

次に、CPUは、表示切替スイッチ321が押下されたかを判定し(ステップS105)。表示切替スイッチ321が押下されるまで待機する(S105:NO)。図2(B)に示す画面で表示切替スイッチ321が押下されると(S105:YES)、CPUは、基準画像撮影用の露出制御を行い(ステップS106)、複数枚の撮影と以下の処理により基準画像を生成する(ステップS107)。テップS106の基準画像撮影用の露出制御の詳細は後述する。   Next, the CPU determines whether the display changeover switch 321 has been pressed (step S105). Wait until the display changeover switch 321 is pressed (S105: NO). When the display changeover switch 321 is pressed on the screen shown in FIG. 2B (S105: YES), the CPU performs exposure control for reference image shooting (step S106), and takes a plurality of images and performs the following processing. A reference image is generated (step S107). Details of exposure control for reference image shooting in step S106 will be described later.

ステップS107の基準画像の生成では、最初に、CPUは、撮像素子314の出力データに対して、工場調整時に検出された欠陥画素の座標に相当する画素を固定値に設定してマーキングを行い、一旦、メモリ部326に記憶する。続いて、CPUは、撮影画像の画像データに対して欠陥画素のマーキングを行うと共に、先にメモリ部326に記憶した撮影画像の画像データを読み出して、欠陥画素としてマーキングされた画素を除いた画素について同一座標で画素値の比較を行う。比較の結果、画素値の最大値を選択し、その最大値を示す画素のマーキングを行い、再度、メモリ部326に画像データを記憶する。撮影毎にこのような処理を行って、1枚の基準画像を生成する。   In the generation of the reference image in step S107, first, the CPU performs marking on the output data of the image sensor 314 by setting a pixel corresponding to the coordinates of the defective pixel detected at the time of factory adjustment to a fixed value, Once stored in the memory unit 326. Subsequently, the CPU performs defective pixel marking on the image data of the photographed image, and also reads out the image data of the photographed image previously stored in the memory unit 326, and excludes pixels that are marked as defective pixels. Compare pixel values with the same coordinates. As a result of the comparison, the maximum pixel value is selected, the pixel indicating the maximum value is marked, and the image data is stored in the memory unit 326 again. Such a process is performed for each photographing to generate one reference image.

なお、画像処理部318は、マーキングされた欠陥画素を補正した上で、各種の画像処理を行う。図4は、ステップS107で生成される基準画像の概念図であり、マーキングされた欠陥画素及び最大値として選択された画素がマーキングされている。   Note that the image processing unit 318 performs various types of image processing after correcting the marked defective pixels. FIG. 4 is a conceptual diagram of the reference image generated in step S107, in which the marked defective pixel and the pixel selected as the maximum value are marked.

ステップS107の後、CPUは、生成した基準画像からホワイトバランスの基準となる白係数を算出し(ステップS108)、基準画像のそれぞれについて画面均一であるかを判定する(ステップS109)。CPUは、基準画像が画面均一であると判定した場合(S109:YES)、変動レベル傷検出を行い(ステップS111)、その後、処理を終了させる。CPUは、基準画像が画面均一でないと判定した場合(S109:NO)、処理を終了させる。ステップS111の変動レベル傷検出の詳細は後述する。   After step S107, the CPU calculates a white coefficient serving as a white balance reference from the generated reference image (step S108), and determines whether the screen is uniform for each of the reference images (step S109). If the CPU determines that the reference image is uniform on the screen (S109: YES), the CPU performs flaw level scratch detection (step S111), and then ends the process. When determining that the reference image is not uniform on the screen (S109: NO), the CPU ends the process. Details of the fluctuation level flaw detection in step S111 will be described later.

[基準画像撮影のための露出制御]
ここでは、ステップS106の処理、すなわち、基準画像撮影時の露出制御ついて詳細に説明する。ホワイトバランスの基準画像を撮影するときには、鑑賞画質は重要ではないため、欠陥画素の検出に適した露出条件で撮影を行う。欠陥画素を検出するための基準画像撮影では、CPUは、絞りとNDフィルタ313で撮像素子314に入射する光量を絞り込み、ゲイン量を所定値に設定した上で、蓄積時間が長くなるようにメカニカルシャッタ312を制御する。
[Exposure control for standard image capture]
Here, the processing in step S106, that is, the exposure control at the time of capturing the reference image will be described in detail. When shooting a white balance reference image, the viewing image quality is not important, so shooting is performed under exposure conditions suitable for detecting defective pixels. In reference image capturing for detecting defective pixels, the CPU narrows the amount of light incident on the image sensor 314 with a diaphragm and an ND filter 313, sets the gain amount to a predetermined value, and mechanically increases the accumulation time. The shutter 312 is controlled.

それ以外の制御に関しては、通常の露出制御と大きくは変わらない。例えば、上述の通り、絞りとNDフィルタ313を最大絞りに設定し、ゲインを所定値に設定した状態で、撮像素子314を露光させる。こうして得られる撮像出力は画像処理部318の輝度積分回路で積分され、輝度情報から被写界輝度が測光され、被写体輝度に応じて蓄積時間が決定される。   Other controls are not much different from normal exposure controls. For example, as described above, the image sensor 314 is exposed with the aperture and the ND filter 313 set to the maximum aperture and the gain set to a predetermined value. The imaging output thus obtained is integrated by the luminance integration circuit of the image processing unit 318, the field luminance is measured from the luminance information, and the accumulation time is determined according to the subject luminance.

なお、撮像素子314の特性に応じて、欠陥画素を検出する際の蓄積時間とゲイン量を制限し、基準画像を撮影する際の露出条件が一定範囲内に納まらない場合には、基準画像による欠陥画素検出を行わないようにしてもよい。   Depending on the characteristics of the image sensor 314, the accumulation time and gain amount when detecting defective pixels are limited, and the exposure condition when shooting the reference image does not fall within a certain range. The defective pixel detection may not be performed.

[基準画像の画面均一判定]
ここでは、ステップS109の判定手法、すなわち、基準画像の画面均一判定処理について、図5のフローチャートを参照して説明する。先ず、画像処理部318の輝度積分回路は、ステップS107において欠陥画素のマーキングを施した画像データに対して、前置補間で補正処理を行いながら画面を複数枠に分割して積分し、枠毎の輝度の積分値を算出する(ステップS501)。
[Standard image uniform judgment]
Here, the determination method in step S109, that is, the screen uniformity determination process of the reference image will be described with reference to the flowchart of FIG. First, the luminance integration circuit of the image processing unit 318 divides and integrates the screen into a plurality of frames while performing correction processing by pre-interpolation on the image data on which defective pixels are marked in step S107, and performs integration for each frame. Is calculated (step S501).

続いて、CPUは、積分枠のうちの1つを対象枠としてその積分値を抽出し(ステップS502)、更に対象枠の周辺枠の積分値を抽出し(ステップS503)、各枠の積分値が所定範囲に納まっているかを判定する(ステップS504)。各枠の積分値が所定範囲に納まっていない場合(S504:NO)、判定手段として機能するCPUは、均一面でないと判断し(ステップS505)、処理を終了させる。   Subsequently, the CPU extracts an integral value of one of the integration frames as the target frame (step S502), further extracts an integration value of the peripheral frame of the target frame (step S503), and integrates each frame. Is within a predetermined range (step S504). If the integrated value of each frame is not within the predetermined range (S504: NO), the CPU functioning as the determining means determines that the surface is not a uniform surface (step S505) and ends the process.

一方、CPUは、各枠の積分値が所定範囲に納まっている場合(S:504:YES)、対象枠内から対象画素を抽出する(ステップS506)。ステップS506で抽出される対象画素は、対象枠に対応する基準画像のマーキングされた欠陥画素を除く画素である。CPUは、抽出した対象画素の周辺の同色画素を抽出し(ステップS507)、対象画素とこれに隣接する同色画素(本実施形態では対象画素の上下左右の同色画素)の画素値が所定範囲内に納まっているかを判定する(ステップS508)。   On the other hand, when the integral value of each frame is within a predetermined range (S: 504: YES), the CPU extracts a target pixel from the target frame (step S506). The target pixels extracted in step S506 are pixels excluding the marked defective pixels of the reference image corresponding to the target frame. The CPU extracts the same color pixels around the extracted target pixel (step S507), and the pixel values of the target pixel and the same color pixels adjacent to the target pixel (the same color pixels above, below, left, and right in the present embodiment) are within a predetermined range. (Step S508).

対象画素と上下左右の同色画素の画素値が所定範囲内に納まっていない場合(S508:NO)、CPUは、均一面でないと判断し(ステップS505)、その後、処理を終了させる。対象画素と上下左右の同色画素の画素値が所定範囲内に納まっている場合(S508:YES)、CPUは、対象枠内の全ての画素についてステップS506〜S508の処理が終了したかを判定する(ステップS509)。CPUは、対象枠内の全ての画素について処理が終了していない場合(S509:NO)、処理をステップS506に戻し、対象枠内の全ての画素について処理が終了すると(S509:YES)、処理をステップS510へ進める。   When the pixel values of the same color pixels of the target pixel in the vertical and horizontal directions are not within the predetermined range (S508: NO), the CPU determines that the target pixel is not a uniform surface (step S505), and then ends the process. When the pixel values of the same color pixels of the target pixel, the upper, lower, left, and right color are within the predetermined range (S508: YES), the CPU determines whether or not the processing of steps S506 to S508 has been completed for all the pixels in the target frame. (Step S509). When the process has not been completed for all the pixels in the target frame (S509: NO), the CPU returns the process to step S506, and when the process has been completed for all the pixels in the target frame (S509: YES), the process is completed. Advances to step S510.

ステップS510では、CPUは、積分枠の全て(全ての対象枠)についてステップS506〜S509の処理が終了したかを判定する。積分枠の全てについて処理が終了していない場合(S510:NO)、CPUは、処理をステップS502に戻す。すなわち、積分枠のうち、ステップS502〜S509の処理がなされていない積分枠を対象枠として、ステップS502〜S509の処理を行う。ステップS510の判断が「YES」となる場合には、全ての積分枠の全ての画素についてステップS504,508の判断が「YES」となるので、CPUは、基準画像が均一面と判断して(ステップS511)、その後、処理を終了させる。   In step S510, the CPU determines whether the processing in steps S506 to S509 has been completed for all the integration frames (all target frames). If the process has not been completed for all of the integration frames (S510: NO), the CPU returns the process to step S502. That is, among the integration frames, the processing of steps S502 to S509 is performed using an integration frame that has not been subjected to the processing of steps S502 to S509 as a target frame. If the determination in step S510 is “YES”, the determination in steps S504 and 508 is “YES” for all pixels in all integration frames, so the CPU determines that the reference image is a uniform surface ( Step S511) and then the process is terminated.

[変動レベル傷検出]
ここでは、ステップS111の変動レベル傷の検出処理について、図6のフローチャートを参照して説明する。最初に、CPUは、撮像素子314の周辺に配置したサーミスタの出力をA/D変換して温度を測定し、温度に応じた閾値(T値)を算出する(ステップS601)。CPUは、黒レベル(OB)がT値未満かを判定し(ステップS602)、黒レベル(OB)がT値以上の場合(S602:NO)、処理を終了させる。黒レベル(OB)がT値未満の場合(S602:YES)、CPUは、対象画素の周辺の同色の9画素を抽出し、画素レベル値で並び替え、中心の2画素(4番目と5番目)の平均値であるK値(メディアンフィルタK値)を演算する(ステップS603)。なお、画素レベル値は、各画素に対してRGB毎に256段階の値で付与されている。
[Variation level scratch detection]
Here, the fluctuation level flaw detection process of step S111 will be described with reference to the flowchart of FIG. First, the CPU performs A / D conversion on the output of the thermistor arranged around the image sensor 314, measures the temperature, and calculates a threshold value (T value) according to the temperature (step S601). The CPU determines whether the black level (OB) is less than the T value (step S602), and if the black level (OB) is equal to or greater than the T value (S602: NO), the process is terminated. When the black level (OB) is less than the T value (S602: YES), the CPU extracts nine pixels of the same color around the target pixel, rearranges them by the pixel level value, and arranges the two central pixels (fourth and fifth). K value (median filter K value) which is an average value of) is calculated (step S603). The pixel level value is assigned to each pixel in 256 levels for each RGB.

続いて、CPUは、K値がT値よりも大きいかを判定する(ステップS604)。K値がT値以下の場合(S604:NO)、CPUは処理を終了させる。K値がT値よりも大きい場合(S604:YES)、CPUは、対象画素がステップS107にて最大値マーキングされた画素であるかを判定する(ステップS605)。   Subsequently, the CPU determines whether the K value is larger than the T value (step S604). When the K value is equal to or less than the T value (S604: NO), the CPU ends the process. When the K value is larger than the T value (S604: YES), the CPU determines whether the target pixel is a pixel marked with the maximum value in step S107 (step S605).

最大値マーキングされた画素ではない場合(S605:NO)、CPUは、処理を後述するステップS610へ進め、一方、最大値マーキングされた画素である場合(S605:YES)、対象画素の画素レベル値がK値以上かを判定する(ステップS606)。対象画素の画素レベル値がK値以上の場合、CPUは、“H=1−〔(K−OB)/(対象画素−OB)〕”にしたがってH値を求める(ステップS607)。対象画素の画素レベル値がK値未満の場合、CPUは、“H=1−〔(対象画素−OB)/(K−OB)〕”にしたがってH値を求める(ステップS608)。   If it is not the pixel marked with the maximum value (S605: NO), the CPU proceeds to step S610 to be described later. On the other hand, if it is the pixel marked with the maximum value (S605: YES), the pixel level value of the target pixel. Is determined to be greater than or equal to the K value (step S606). When the pixel level value of the target pixel is equal to or higher than the K value, the CPU obtains an H value according to “H = 1 − [(K−OB) / (target pixel−OB)]” (step S607). When the pixel level value of the target pixel is less than the K value, the CPU obtains an H value according to “H = 1 − [(target pixel−OB) / (K−OB)]” (step S608).

CPUは、ステップS607,S608で求めたH値を、座標データと共に新たに検出された欠陥画素の欠陥画素データとして登録する(ステップS609)。そして、CPUは、上述したステップS601〜S609の処理を全ての画素について検査したかを判定する(ステップS610)。全ての画素について検査が終了していない場合(S610:NO)、CPUは処理をステップS601に戻す。全ての画素について検査が終了した場合(S610:YES)、CPUは、最終的な欠陥画素データをフラッシュメモリ325に記憶し(ステップS611)、その後、処理を終了させる。   The CPU registers the H value obtained in steps S607 and S608 as defective pixel data of the newly detected defective pixel together with the coordinate data (step S609). Then, the CPU determines whether or not the processing in steps S601 to S609 described above has been inspected for all pixels (step S610). When the inspection has not been completed for all the pixels (S610: NO), the CPU returns the process to step S601. When the inspection has been completed for all the pixels (S610: YES), the CPU stores the final defective pixel data in the flash memory 325 (step S611), and thereafter ends the processing.

最終的な欠陥画素データをフラッシュメモリ325に記憶するときに、新しい領域に記憶すると共に、工場調整時に記憶した欠陥画素データとマージしてメモリ部326に記憶して、以後に行われる欠陥画素に対する補正処理に使用する。なお、変動レベル傷検出処理で検出された変動レベル傷は、フラッシュメモリ325に記憶された前回までに検出された変動レベル傷データとマージして記憶される。勿論、変動レベル傷検出処理において、前回までの変動レベル傷データとマージしながら変動レベル傷データを生成し記憶してもよい。更に、変動レベル傷の補正個数を限定し(つまり、フラッシュメモリ325に記憶する容量を制限し)、マージする際に容量制限内の上位から優先して記憶するように構成することも可能である。工場調整時の欠陥画素データとマージする際には、変動レベル傷を優先して採用することが望ましい。   When the final defective pixel data is stored in the flash memory 325, the final defective pixel data is stored in a new area, merged with the defective pixel data stored at the time of factory adjustment, and stored in the memory unit 326. Used for correction processing. The fluctuation level flaw detected by the fluctuation level flaw detection process is merged with the fluctuation level flaw data detected up to the previous time stored in the flash memory 325 and stored. Of course, in the fluctuating level flaw detection process, fluctuating level flaw data may be generated and stored while merging with the fluctuating level flaw data up to the previous time. Furthermore, it is possible to limit the number of corrections of fluctuating level flaws (that is, limit the capacity stored in the flash memory 325), and store the data with priority from the top within the capacity limit when merging. . When merging with defective pixel data at the time of factory adjustment, it is desirable to preferentially adopt flaws at the fluctuation level.

以上、本実施形態によれば、工場調整時に検出した欠陥画素に加え、工場調整時に検出できなかった変動レベル傷のような欠陥画素を固体撮像素子に均一面を露光させて得られる画像で検出する。こうして、工場からの出荷後も継続的に取得した欠陥画素に対して、工場調整時に検出された欠陥画素と同様に補正することによって、より優れた画質を得るための画像処理が可能となる。また、変動レベル傷のデータを工場調整時の欠陥画素データと独立して記憶させることにより、工場調整時の欠陥画素データを保護することができる。更に、フラッシュメモリ325に記憶するデータ量を極小化し、データ書き込み速度を最小化することもできる。   As described above, according to the present embodiment, in addition to defective pixels detected at the time of factory adjustment, defective pixels such as fluctuating level scratches that could not be detected at the time of factory adjustment are detected by an image obtained by exposing a uniform surface to a solid-state imaging device. To do. In this way, it is possible to perform image processing for obtaining better image quality by correcting defective pixels continuously acquired after shipment from the factory in the same manner as defective pixels detected during factory adjustment. Further, the defect level data at the time of factory adjustment can be protected by storing the data of flaws at the fluctuating level independently of the defective pixel data at the time of factory adjustment. Furthermore, the amount of data stored in the flash memory 325 can be minimized, and the data writing speed can be minimized.

<他の実施形態>
以上、本発明をその好適な実施形態に基づいて詳述してきたが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。さらに、上述した各実施形態は本発明の一実施形態を示すものにすぎず、各実施形態を適宜組み合わせることも可能である。
<Other embodiments>
Although the present invention has been described in detail based on preferred embodiments thereof, the present invention is not limited to these specific embodiments, and various forms within the scope of the present invention are also included in the present invention. included. Furthermore, each embodiment mentioned above shows only one embodiment of this invention, and it is also possible to combine each embodiment suitably.

例えば、変動レベル傷の検出方法は固体撮像素子の性質によって異なるため、本実施形態で説明した方法とは異なる方法で変動レベル傷の検出を行う場合がある。しかしながら、そのような場合でも、上記実施形態で説明した方法をその主旨を逸脱しない範囲で適用可能な場合、その変動レベル傷の検出方法は本発明に含まれる。   For example, since the detection method of the fluctuating level flaw varies depending on the properties of the solid-state imaging device, the flaw level flaw may be detected by a method different from the method described in the present embodiment. However, even in such a case, if the method described in the above embodiment can be applied without departing from the gist of the method, the detection method of the flaw level scratch is included in the present invention.

本発明は以下の処理を実行することによっても実現される。すなわち、上述した実施形態の機能を実現するソフトウェア(プログラム)をネットワーク又は各種記憶媒体を介して撮像装置に供給し、撮像装置のコンピュータ(又はCPUやMPU等)がプログラムコードを読み出して実行する処理である。この場合、そのプログラム、及び該プログラムを記憶した記憶媒体は本発明を構成することになる。   The present invention can also be realized by executing the following processing. That is, a process of supplying software (program) for realizing the functions of the above-described embodiments to the imaging apparatus via a network or various storage media, and reading and executing a program code by a computer (or CPU, MPU, or the like) of the imaging apparatus. It is. In this case, the program and the storage medium storing the program constitute the present invention.

314 撮像素子
318 画像処理部
321 表示切替スイッチ
322 WB切替スイッチ
323 十字スイッチ
324 システム制御回路
325 フラッシュメモリ
326 メモリ部
314 Image sensor 318 Image processing unit 321 Display switch 322 WB switch 323 Cross switch 324 System control circuit 325 Flash memory 326 Memory unit

Claims (8)

被写体の光学像を電気信号に変換して出力する撮像手段と、
前記撮像手段の欠陥画素データを記憶する記憶手段と、
前記記憶手段に記憶された前記欠陥画素データに基づいて前記欠陥画素の位置に対応する画像データを補正する補正手段と、
前記撮像手段による撮影画像を処理する情報を生成するための基準画像を前記撮像手段を露光した状態で撮影し、前記基準画像を用いて前記欠陥画素を検出する制御手段と、を備えることを特徴とする撮像装置。
Imaging means for converting an optical image of a subject into an electrical signal and outputting the electrical signal;
Storage means for storing defective pixel data of the imaging means;
Correction means for correcting image data corresponding to the position of the defective pixel based on the defective pixel data stored in the storage means;
Control means for taking a reference image for generating information for processing an image taken by the image pickup means in a state where the image pickup means is exposed, and detecting the defective pixel using the reference image. An imaging device.
前記基準画像の画面が均一面か否かを判定する判定手段を備え、
前記制御手段は、前記判定手段により前記基準画像の画面が均一であると判定された場合に当該基準画像に基づいて前記欠陥画素の検出を行うことを特徴とする請求項1記載の撮像装置。
Determining means for determining whether the screen of the reference image is a uniform surface;
The imaging apparatus according to claim 1, wherein the control unit detects the defective pixel based on the reference image when the determination unit determines that the screen of the reference image is uniform.
前記撮像手段による撮影画像を複数の領域に分割し、分割された領域毎の輝度の積分値を抽出する積分手段を備え、
前記判定手段は、隣接する前記領域の積分値が所定範囲内にあるか否かに基づいて前記基準画像の画面が均一面か否かを判定することを特徴とする請求項2記載の撮像装置。
An integrated unit that divides a captured image by the imaging unit into a plurality of regions and extracts an integrated value of luminance for each of the divided regions;
The imaging apparatus according to claim 2, wherein the determination unit determines whether or not the screen of the reference image is a uniform surface based on whether or not an integral value of the adjacent areas is within a predetermined range. .
前記判定手段は、前記積分値が所定範囲内にあると判定された領域に相当する前記基準画像の各画素の画素値が隣接する同色画素の画素値と所定範囲内にあるか否かに基づいて前記基準画像の画面が均一面か否かを判定することを特徴とする請求項3記載の撮像装置。   The determination means is based on whether or not the pixel value of each pixel of the reference image corresponding to the region where the integral value is determined to be within the predetermined range is within the predetermined range with the pixel value of the adjacent same color pixel. 4. The imaging apparatus according to claim 3, wherein it is determined whether the screen of the reference image is a uniform surface. 前記基準画像は、前記撮像手段により撮影された画像データに対して前記記憶手段にあらかじめ記憶された前記欠陥画素の座標がマーキングされ、且つ、前記欠陥画素を除いた画素について同一座標で画素値を比較して該画素値の最大値を示す画素がマーキングされた複数枚の画像から生成された画像であることを特徴とする請求項1乃至4のいずれか1項に記載の撮像装置。   In the reference image, the coordinates of the defective pixels stored in advance in the storage unit are marked with respect to the image data captured by the imaging unit, and the pixel values except the defective pixels are set to the same coordinates. 5. The imaging apparatus according to claim 1, wherein the imaging device is an image generated from a plurality of images marked with a pixel indicating the maximum pixel value. 前記制御手段は、前記記憶手段にあらかじめ記憶された前記欠陥画素及び前記最大値としてマーキングされた画素を除く画素について欠陥画素の検出を行うことを特徴とする請求項5記載の撮像装置。   6. The imaging apparatus according to claim 5, wherein the control unit detects a defective pixel for pixels excluding the defective pixel stored in advance in the storage unit and a pixel marked as the maximum value. 前記撮像手段に入射する光量を調節する絞り手段と、
前記撮像手段へ入射する光を遮断するシャッタ手段と、
前記撮像手段の出力を増幅するゲイン手段とを備え、
前記制御手段は、前記基準画像の撮影では、前記絞り手段で前記撮像手段に入射する光量を絞り込み、前記ゲイン手段により所定値にゲイン量を設定した上で、蓄積時間が長くなるように前記シャッタ手段を制御することを特徴とすることを請求項1乃至6のいずれか1項に記載の撮像装置。
A diaphragm means for adjusting the amount of light incident on the imaging means;
Shutter means for blocking light incident on the imaging means;
Gain means for amplifying the output of the imaging means,
In capturing the reference image, the control unit narrows the amount of light incident on the imaging unit with the diaphragm unit, sets the gain amount to a predetermined value by the gain unit, and then increases the accumulation time. The image pickup apparatus according to claim 1, wherein the means is controlled.
被写体の光学像を電気信号に変換して出力する撮像手段と、前記撮像手段の欠陥画素の欠陥画素データを記憶する記憶手段と、前記記憶手段に記憶された前記欠陥画素データに基づいて前記欠陥画素の位置に対応する画像データを補正する補正手段とを備えた撮像装置の制御方法であって、
制御手段が、前記撮像手段による撮影画像を処理する情報を生成するための基準画像を前記撮像手段を露光した状態で撮影する基準画像撮影ステップと、
前記制御手段が、前記基準画像を用いて前記欠陥画素を検出する検出ステップと、備えることを特徴とする撮像装置の制御方法。
An imaging unit that converts an optical image of an object into an electrical signal and outputs it, a storage unit that stores defective pixel data of a defective pixel of the imaging unit, and the defect based on the defective pixel data stored in the storage unit A control method for an image pickup apparatus including a correction unit that corrects image data corresponding to a pixel position,
A reference image capturing step for capturing a reference image for generating information for processing an image captured by the image capturing unit in a state where the image capturing unit is exposed;
An imaging apparatus control method, comprising: a detection step in which the control means detects the defective pixel using the reference image.
JP2011258769A 2011-11-28 2011-11-28 Imaging apparatus and control method of the same Pending JP2013115547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011258769A JP2013115547A (en) 2011-11-28 2011-11-28 Imaging apparatus and control method of the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011258769A JP2013115547A (en) 2011-11-28 2011-11-28 Imaging apparatus and control method of the same

Publications (1)

Publication Number Publication Date
JP2013115547A true JP2013115547A (en) 2013-06-10

Family

ID=48710728

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011258769A Pending JP2013115547A (en) 2011-11-28 2011-11-28 Imaging apparatus and control method of the same

Country Status (1)

Country Link
JP (1) JP2013115547A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020110676A1 (en) * 2018-11-29 2020-06-04 ソニーセミコンダクタソリューションズ株式会社 Solid-state imaging element and imaging device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020110676A1 (en) * 2018-11-29 2020-06-04 ソニーセミコンダクタソリューションズ株式会社 Solid-state imaging element and imaging device
US11632505B2 (en) 2018-11-29 2023-04-18 Sony Semiconductor Solutions Corporation Solid-state image sensor and imaging device

Similar Documents

Publication Publication Date Title
JP5161706B2 (en) Imaging apparatus and control method thereof
CN102870404B (en) Imaging device and dark current correction method of same
US9721609B2 (en) Image capturing apparatus, image capturing system, and control method for the image capturing apparatus
CN102572273B (en) Camera head
JP6312487B2 (en) Image processing apparatus, control method therefor, and program
JP2014057141A (en) Image processing device, method and program, and imaging apparatus including image processing device
JP5746521B2 (en) IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
US10027919B2 (en) Signal processing apparatus, image capturing apparatus, control apparatus, signal processing method, and control method
US9307168B2 (en) Image capture apparatus and method for controlling image capture apparatus in which defective pixels are indicated
JP6230760B1 (en) Imaging apparatus, image processing apparatus, image processing method, and image processing program
JP5701942B2 (en) Imaging apparatus, camera system, and image processing method
JP2009005083A (en) Imaging apparatus, control method of imaging apparatus and control program of imaging apparatus
CN100525383C (en) Image-data noise reduction apparatus and method of controlling same
JP2011101158A (en) Imaging apparatus
JP2005326621A (en) Imaging device, auto-focus device and auto-focus method
JP2010273282A (en) Image processing apparatus, imaging apparatus, and image processing program
JP5299159B2 (en) Imaging apparatus and program
JP2013115547A (en) Imaging apparatus and control method of the same
JP2010056817A (en) Imaging apparatus
JP2011009834A (en) Imager and imaging method
JP2010050730A (en) Imaging apparatus and defect correction apparatus
JP7020463B2 (en) Imaging device
JP2015061137A (en) Imaging apparatus, control method of the same, and program
JP5968145B2 (en) Image processing apparatus and control method thereof
JP2017163233A (en) Photographing apparatus and photographing method