JP2008010958A - Imaging apparatus and method - Google Patents

Imaging apparatus and method Download PDF

Info

Publication number
JP2008010958A
JP2008010958A JP2006176800A JP2006176800A JP2008010958A JP 2008010958 A JP2008010958 A JP 2008010958A JP 2006176800 A JP2006176800 A JP 2006176800A JP 2006176800 A JP2006176800 A JP 2006176800A JP 2008010958 A JP2008010958 A JP 2008010958A
Authority
JP
Japan
Prior art keywords
isolated
motion vector
image data
region
area
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
JP2006176800A
Other languages
Japanese (ja)
Inventor
Norihiro Kawahara
範弘 川原
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 JP2006176800A priority Critical patent/JP2008010958A/en
Publication of JP2008010958A publication Critical patent/JP2008010958A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To determine a motion vector accurately even in case of starlit sky photography. <P>SOLUTION: The imaging apparatus comprises a motion vector detection circuit 6 for dividing both first image data outputted from an image sensor 2 having a plurality of pixels and second image data outputted from the image sensor before the first image data is outputted, respectively, into a plurality of regions and calculating a motion vector for each divided region, and an isolated region judging circuit 5 for judging an isolated region existing in each divided region wherein the motion vector detection circuit calculates a motion vector only in such a divided region where the isolated regions exceeding a predetermined number are detected by the isolated region judging circuit. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、CCDイメージセンサ等の撮像素子を備えた撮像装置及び撮像方法に関する。   The present invention relates to an imaging apparatus and an imaging method provided with an imaging element such as a CCD image sensor.

近年の撮像装置では、天体観測を用途として「星空」を撮影可能であることが求められている。また、星空撮影を手軽に行うために、三脚を用いずに手持ちで撮影したいという要求も強くなっている。そのため、撮像装置は星空撮影時における防振機能が必要となっており、この防振機能は画像の動きベクトルを算出することで実現可能である。   Recent imaging apparatuses are required to be able to photograph “starry sky” for astronomical observation. In addition, there is an increasing demand for hand-held shooting without using a tripod for easy shooting of the starry sky. For this reason, the image pickup apparatus needs to have an image stabilization function at the time of shooting the starry sky, and this image stabilization function can be realized by calculating a motion vector of an image.

動きベクトルの算出方法は、例えば下記特許文献1に記載されている。特許文献1に記載の手法では、時間的に連続する2フレームの画像を垂直及び水平方向に複数分割する。続いて、分割して得られた複数の分割ブロック毎に、時間的に連続する2フレームの画像の互いに対応する分割画像相互間で両者の偏移量に対する相関値を求める。そして、求められた相関値に基づいて画像全体の平行移動量を示す動きベクトルを算出する。   A method for calculating a motion vector is described, for example, in Patent Document 1 below. In the method described in Patent Literature 1, two temporally continuous images are divided into a plurality of vertical and horizontal directions. Subsequently, for each of the plurality of divided blocks obtained by the division, a correlation value for the amount of shift between the two divided images corresponding to each other in temporally continuous images is obtained. Then, a motion vector indicating the amount of parallel movement of the entire image is calculated based on the obtained correlation value.

特開昭61−269475号公報JP-A 61-269475

しかしながら、特許文献1に記載の方法を星空撮影に用いると、下記のような課題がある。
まず、分割ブロック内に星が存在せず一面黒(夜空部分のみ)になった場合には、時間的に連続する2フレーム間の偏移量に対する相関値が常に最大値となり、動きベクトルを正確に求めることができない。
また、撮像装置が備えるイメージセンサ上に、いわゆる「白キズ」と呼ばれる欠陥画素があった場合には、時間的に連続する2フレームの画像のうち、片方の画像のみに星のように見える白点が存在し、動きベクトルを正確に求めることができない。
また、例えば唯1個存在する星が点滅しているように見える場合には、時間的に連続する2フレームの画像のうち、片方の画像には星が映っていないことがあり、その際には画像間の相関を正確に求めることができない。
However, when the method described in Patent Document 1 is used for starry sky photography, there are the following problems.
First, if there is no star in the divided block and the screen is black (only in the night sky), the correlation value for the amount of shift between two consecutive frames is always the maximum, and the motion vector is accurate. Can not ask for.
In addition, when there is a defective pixel called “white scratch” on the image sensor included in the image pickup device, the white image that looks like a star in only one of two temporally continuous images. A point exists and the motion vector cannot be obtained accurately.
For example, if only one star appears to blink, one of the two consecutive frames of time may not have a star. Cannot accurately determine the correlation between images.

本発明は、このような事情に鑑みてなされたものであり、撮像装置による星空撮影時であっても動きベクトルを正確に求められるようにすることを目的とする。   The present invention has been made in view of such circumstances, and an object of the present invention is to accurately obtain a motion vector even at the time of shooting a starry sky by an imaging apparatus.

本発明に係る撮像装置は、複数の画素を有する撮像素子と、上記撮像素子より出力された第1の画像データを複数の領域に分割し、上記第1の画像データよりも先に出力された第2の画像データを参照して各分割領域に係る動きベクトルを算出する動きベクトル検出手段と、上記第1の画像データの分割領域内に存在する孤立領域を各分割領域毎に判別する孤立領域判別手段とを備え、上記動きベクトル検出手段は、上記孤立領域判別手段での判別結果に応じて、上記分割領域に係る動きベクトルの算出を行うことを特徴とする。
本発明に係る撮像方法は、複数の画素を有する撮像素子より出力された第1の画像データを複数の領域に分割し、上記第1の画像データよりも先に出力された第2の画像データを参照して各分割領域に係る動きベクトルを算出する動きベクトル検出工程と、上記第1の画像データの分割領域内に存在する孤立領域を各分割領域毎に判別する孤立領域判別工程とを有し、上記孤立領域判別工程での判別結果に応じて、上記動きベクトル検出工程にて上記分割領域に係る動きベクトルの算出を行うことを特徴とする。
本発明に係るプログラムは、複数の画素を有する撮像素子より出力された第1の画像データを複数の領域に分割し、上記第1の画像データよりも先に出力された第2の画像データを参照して各分割領域に係る動きベクトルを算出する動きベクトル検出ステップと、上記第1の画像データの分割領域内に存在する孤立領域を各分割領域毎に判別する孤立領域判別ステップとをコンピュータに実行させ、かつ上記動きベクトル検出ステップでは、上記孤立領域判別ステップにおける判別結果に応じて、上記分割領域に係る動きベクトルの算出を行うことを特徴とする。
An image pickup apparatus according to the present invention divides an image pickup device having a plurality of pixels and first image data output from the image pickup device into a plurality of regions, and outputs the first image data before the first image data. A motion vector detecting means for calculating a motion vector related to each divided area with reference to the second image data, and an isolated area for discriminating an isolated area existing in the divided area of the first image data for each divided area; Discriminating means, wherein the motion vector detecting means calculates a motion vector related to the divided area according to the discrimination result of the isolated area discriminating means.
The imaging method according to the present invention divides first image data output from an imaging device having a plurality of pixels into a plurality of regions, and outputs second image data prior to the first image data. A motion vector detecting step for calculating a motion vector relating to each divided region, and an isolated region determining step for determining for each divided region an isolated region existing in the divided region of the first image data. The motion vector relating to the divided region is calculated in the motion vector detecting step in accordance with the discrimination result in the isolated region discriminating step.
The program according to the present invention divides first image data output from an imaging device having a plurality of pixels into a plurality of regions, and outputs second image data output before the first image data. A motion vector detecting step for calculating a motion vector related to each divided region with reference to the computer, and an isolated region determining step for determining an isolated region existing in the divided region of the first image data for each divided region. In the motion vector detection step, the motion vector relating to the divided region is calculated according to the determination result in the isolated region determination step.

本発明によれば、撮像素子からの画像データを複数の領域に分割して分割領域毎に孤立領域の数を求め、既定数以上の孤立領域が存在する分割領域においてのみ動きベクトルを算出することにより、星空撮影時であっても動きベクトルを正確に求めることができる。   According to the present invention, the image data from the image sensor is divided into a plurality of areas, the number of isolated areas is obtained for each divided area, and the motion vector is calculated only in the divided areas where a predetermined number or more of isolated areas exist. Thus, the motion vector can be accurately obtained even during starry sky photography.

以下、本発明の実施形態を図面に基づいて説明する。
以下に説明する本発明の実施形態は、上述した従来の問題に鑑み、時間的に連続する2フレームの画像間で両者の偏移量に係る相関値を求める際、星に相当する孤立領域の数を求めて、孤立領域が既定数以上存在する分割領域でのみ動きベクトルを算出する。このようにすることで星空撮影時にも動きベクトルを正確に求め、それにより正確な防振動作を実現するようにしたものである。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
In the embodiment of the present invention described below, in view of the above-described conventional problems, an isolated region corresponding to a star is obtained when obtaining a correlation value related to the shift amount between two temporally continuous images. The number is obtained, and the motion vector is calculated only in the divided area where there are a predetermined number or more of isolated areas. In this way, the motion vector is accurately obtained even when shooting a starry sky, thereby realizing an accurate image stabilization operation.

(第1の実施形態)
図1は、本発明の第1の実施形態による撮像装置の構成例を示すブロック図である。
図1において、レンズ1を透過し、撮像素子2で光電変換された入力信号は、アナログフロントエンド(AFE)回路3でリセットノイズ除去、利得調整、及びアナログ−ディジタル(AD)変換等の処理が施されて、ディジタル画像データに変換される。なお、撮像素子2は、複数の画素を有し、例えばCCD(電荷結合素子)イメージセンサやCMOSイメージセンサが用いられる。
(First embodiment)
FIG. 1 is a block diagram illustrating a configuration example of an imaging apparatus according to the first embodiment of the present invention.
In FIG. 1, an input signal that has passed through a lens 1 and is photoelectrically converted by an image sensor 2 is subjected to processing such as reset noise removal, gain adjustment, and analog-digital (AD) conversion by an analog front end (AFE) circuit 3. And converted into digital image data. The imaging device 2 has a plurality of pixels, and for example, a CCD (charge coupled device) image sensor or a CMOS image sensor is used.

AFE回路3の出力であるディジタル画像データは、カメラ信号処理回路4に供給され、アパーチャ補正、ガンマ補正、及びホワイトバランス等の撮像系のカメラ信号処理が施される。カメラ信号処理回路4の出力は、撮像素子2の駆動モードに応じて1フレーム又は1フィールド分だけメモリ7に蓄積される。ここで、メモリ制御回路8は、データバス14を介して供給される指示等に応じてメモリ7を制御する。   The digital image data that is the output of the AFE circuit 3 is supplied to the camera signal processing circuit 4 and subjected to imaging system camera signal processing such as aperture correction, gamma correction, and white balance. The output of the camera signal processing circuit 4 is stored in the memory 7 for one frame or one field according to the drive mode of the image sensor 2. Here, the memory control circuit 8 controls the memory 7 in accordance with an instruction or the like supplied via the data bus 14.

また、カメラ信号処理回路4の出力、及びメモリ7からの出力は、欠陥画素補正回路9に供給され、欠陥画素補正回路9にて欠陥画素の補正が行われる。欠陥画素補正回路9の出力は、ディジタル−アナログ(DA)変換器10でディジタル−アナログ変換処理が施されてアナログ信号に変換され、そのアナログ信号に係る画像がモニタ11に表示される。   The output from the camera signal processing circuit 4 and the output from the memory 7 are supplied to the defective pixel correction circuit 9, and the defective pixel correction circuit 9 corrects the defective pixel. The output of the defective pixel correction circuit 9 is subjected to digital-analog conversion processing by a digital-analog (DA) converter 10 to be converted into an analog signal, and an image related to the analog signal is displayed on the monitor 11.

また、AFE回路3の出力であるディジタル画像データは、動きベクトル検出回路6に供給されるとともに、さらに動きベクトル検出回路6を介して孤立領域判別回路5にも供給される。孤立領域判別回路5は、ディジタル画像データに係る画像に存在する孤立領域を検出して、その数をカウントする。詳細には、孤立領域判別回路5は、AFE回路3の出力であるディジタル画像データを複数の領域に分割した分割領域毎に、その内部に存在する孤立領域を検出する。また、動きベクトル検出回路6は、ディジタル画像データに基づいて画像の動きベクトルを求める。ここで、孤立領域とは、例えば星空撮影時における夜空内の星に相当する領域であり、周辺画素と画素値が異なる島状領域である。   The digital image data that is the output of the AFE circuit 3 is supplied to the motion vector detection circuit 6 and further supplied to the isolated region discrimination circuit 5 via the motion vector detection circuit 6. The isolated area discriminating circuit 5 detects isolated areas existing in the image related to the digital image data and counts the number thereof. More specifically, the isolated area determination circuit 5 detects an isolated area existing in each divided area obtained by dividing the digital image data output from the AFE circuit 3 into a plurality of areas. The motion vector detection circuit 6 obtains an image motion vector based on the digital image data. Here, the isolated region is, for example, a region corresponding to a star in the night sky at the time of shooting the starry sky, and is an island-like region having a pixel value different from that of the surrounding pixels.

マイコン12は、データバス14を介して指示等を供給し、撮像装置内の機能(孤立領域判別回路5やメモリ制御回路8等)を制御する。入力キー13は、撮像装置を使用するユーザが各種設定や指示に係る入力等の操作を行うためのものであり、入力操作に応じて信号をマイコン12に出力する。   The microcomputer 12 supplies an instruction or the like via the data bus 14 and controls functions (such as the isolated area determination circuit 5 and the memory control circuit 8) in the imaging apparatus. The input key 13 is used by a user who uses the imaging apparatus to perform operations such as input related to various settings and instructions, and outputs a signal to the microcomputer 12 according to the input operation.

ここで本実施形態において、動きベクトルは、時間的に連続する2つのフレーム(あるいはフィールド)の画像から算出する。図4(a)、(b)に示すように、前フィールドの画像をサーチ領域41と称し、現フィールドの画像をテンプレート領域42と称す。テンプレート領域42は、サーチ領域41よりも狭い領域を持つ。なお、図4(b)においては、比較参照のためにサーチ領域41に相当する領域43を点線により示している。   Here, in this embodiment, the motion vector is calculated from images of two frames (or fields) that are temporally continuous. As shown in FIGS. 4A and 4B, the image in the previous field is referred to as a search area 41, and the image in the current field is referred to as a template area 42. The template area 42 has a narrower area than the search area 41. In FIG. 4B, a region 43 corresponding to the search region 41 is indicated by a dotted line for comparison and reference.

また、テンプレート領域42は、その領域を所定の数だけ分割する。図4(b)には、テンプレート領域42を横方向に5個、縦方向に4個分割、すなわち水平方向に5分割し垂直方向に4分割している場合を一例として図示している。この分割された各領域をマッチングブロックとも称す。図4(c)に示すように、マッチングブロックとして分割した各テンプレート領域44を分割した各サーチ領域45内で後述の通りシフトさせて相関を求め、両者の相関値が最大となるシフト量を動きベクトルとする。   Further, the template area 42 divides the area by a predetermined number. FIG. 4B illustrates an example in which the template region 42 is divided into five in the horizontal direction and four in the vertical direction, that is, five in the horizontal direction and four in the vertical direction. Each divided area is also referred to as a matching block. As shown in FIG. 4C, the correlation is obtained by shifting as described later in each search area 45 obtained by dividing each template area 44 divided as a matching block, and the shift amount that maximizes the correlation value between the two is determined. Let it be a vector.

図2は、動きベクトル検出回路6の内部構成を示すブロック図である。
図2において、帯域通過フィルタ21は、AFE回路3の出力であるディジタル画像データから所定周波数成分を抽出する。零クロス検出回路22は、帯域通過フィルタ21の出力信号の零クロス点を検出して当該出力信号を2値化する。
FIG. 2 is a block diagram showing the internal configuration of the motion vector detection circuit 6.
In FIG. 2, the band pass filter 21 extracts a predetermined frequency component from the digital image data that is the output of the AFE circuit 3. The zero cross detection circuit 22 detects the zero cross point of the output signal of the band pass filter 21 and binarizes the output signal.

サーチメモリ23は、零クロス検出回路22の出力である2値化信号のうちサーチ領域に対応する信号を1フレーム(1フィールド)分遅延させるメモリである。テンプレートメモリ24は、零クロス検出回路22の出力である2値化信号の現フレームの信号をテープレート領域分だけ格納するメモリである。シフトレジスタ25、26は、サーチメモリ23、テンプレートメモリ24の出力信号をそれぞれ一時記憶し、画面内の上下左右にシフトさせる。   The search memory 23 is a memory that delays the signal corresponding to the search area among the binarized signals that are the output of the zero cross detection circuit 22 by one frame (one field). The template memory 24 is a memory for storing the current frame signal of the binarized signal that is the output of the zero cross detection circuit 22 for the tape rate region. The shift registers 25 and 26 temporarily store the output signals of the search memory 23 and the template memory 24, respectively, and shift them up, down, left and right in the screen.

エクスクルーシブノア(EXNOR)積算回路27は、シフトレジスタ25及び26の出力を用いて排他的論理和演算を行い、その演算結果の反転値を所定ブロック単位で積算する。最大値検出回路28は、シフトレジスタ25、26による各シフトに対するEXNOR積算回路27の出力を記憶して相互に比較し、その最大値を検出する。最大値検出回路28は、EXNOR積算回路27の出力の総和が最大になるシフト量及び方向を動きベクトルとして出力する。   An exclusive NOR (EXNOR) integrating circuit 27 performs an exclusive OR operation using the outputs of the shift registers 25 and 26, and integrates the inverted value of the operation result in units of predetermined blocks. The maximum value detection circuit 28 stores the outputs of the EXNOR integrating circuit 27 for each shift by the shift registers 25 and 26, compares them, and detects the maximum value. The maximum value detection circuit 28 outputs, as a motion vector, the shift amount and direction in which the total sum of the outputs of the EXNOR integrating circuit 27 is maximized.

上述したサーチメモリ23、テンプレートメモリ24、シフトレジスタ25、26、EXNOR積算回路27、及び最大値検出回路28によりマッチング回路が構成される。   The search memory 23, template memory 24, shift registers 25 and 26, EXNOR integrating circuit 27, and maximum value detecting circuit 28 described above constitute a matching circuit.

次に、動きベクトル検出回路6の動作について説明する。
帯域通過フィルタ21は、AFE回路3から供給されるディジタル画像データの所定周波数成分を抽出し、零クロス検出回路22は、当該抽出された所定周波数成分の信号(画像データ)を2値化する。この2値化動作を、図5を参照して説明する。
Next, the operation of the motion vector detection circuit 6 will be described.
The band pass filter 21 extracts a predetermined frequency component of the digital image data supplied from the AFE circuit 3, and the zero cross detection circuit 22 binarizes the extracted signal (image data) of the predetermined frequency component. This binarization operation will be described with reference to FIG.

図5(a)、(b)は、帯域通過フィルタ21の出力を表している。図5(a)、(b)において、横軸は画面横(x)方向の座標、縦軸は濃度(又は輝度)であり、二次元空間の一断面を示している。また、図5(a)において、51、52、53は、それぞれ異なる照明条件下で同じ被写体を撮影した場合の帯域通過フィルタ21の出力波形を示している。   5A and 5B show the output of the band pass filter 21. FIG. 5A and 5B, the horizontal axis represents coordinates in the horizontal (x) direction of the screen, and the vertical axis represents density (or luminance), which shows a cross section of the two-dimensional space. In FIG. 5A, reference numerals 51, 52, and 53 denote output waveforms of the band pass filter 21 when the same subject is photographed under different illumination conditions.

本実施形態における動きベクトル検出回路は、供給されるディジタル画像データから帯域通過フィルタ21により特定の周波数成分を抽出し、その特定周波数成分の位相情報から動きベクトルを検出する。そのため、本実施形態における動きベクトル検出回路では、照明条件の変化に依存しない2値化パターンを得ることが可能である。   The motion vector detection circuit in this embodiment extracts a specific frequency component from the supplied digital image data by the band pass filter 21 and detects a motion vector from the phase information of the specific frequency component. Therefore, the motion vector detection circuit in the present embodiment can obtain a binarized pattern that does not depend on a change in illumination conditions.

すなわち、図5に示すように、帯域通過フィルタ21の出力波形51、52、53において、零クロス点は照明条件に関わらず一定である。この零クロス点は、被写体が動けばそれに応じて移動するので、零クロス点の変化により動きベクトルを検出することができる。そこで、零クロス検出回路22は、帯域通過フィルタ21の出力信号の零クロス点を検出し、検出により得られた零レベルを閾値として帯域通過フィルタ21の出力を2値化する。   That is, as shown in FIG. 5, in the output waveforms 51, 52, 53 of the band pass filter 21, the zero cross point is constant regardless of the illumination conditions. Since the zero cross point moves according to the movement of the subject, the motion vector can be detected by the change of the zero cross point. Therefore, the zero cross detection circuit 22 detects the zero cross point of the output signal of the band pass filter 21 and binarizes the output of the band pass filter 21 using the zero level obtained by the detection as a threshold value.

零クロス検出回路22により2値化された信号は、適宜サーチメモリ23及びテンプレートメモリ24に記憶される。シフトレジスタ25、26は、お互いに1フレーム(あるいは1フィールド)の時間差を有するサーチメモリ23及びテンプレートメモリ24の出力を一時記憶し、それを画面内で上下左右にシフトした信号を出力する。EXNOR積算回路27は、シフトレジスタ25、26の出力について、それらの排他的論理和の反転を出力し、画面内の所定ブロック単位でその総和を算出する。EXNOR積算回路27の出力値は、各シフト量に対応する所定ブロック内の相関値に相当する。   The signal binarized by the zero cross detection circuit 22 is stored in the search memory 23 and the template memory 24 as appropriate. The shift registers 25 and 26 temporarily store the outputs of the search memory 23 and the template memory 24 having a time difference of 1 frame (or 1 field) from each other, and output a signal obtained by shifting the output vertically and horizontally within the screen. The EXNOR integrating circuit 27 outputs the inversion of the exclusive OR of the outputs of the shift registers 25 and 26, and calculates the sum in units of predetermined blocks in the screen. The output value of the EXNOR integrating circuit 27 corresponds to a correlation value in a predetermined block corresponding to each shift amount.

上述のようにしてシフトレジスタ25、26は、所定の探索範囲内で前フィールド、現フィールドの画像をシフトし、EXNOR積算回路27は、各シフト量に対する排他的論理和の反転及びその総和を算出して最大値検出回路28に出力する。最大値検出回路28は、マッチングブロック毎に、シフトレジスタ25、26の各シフト量に対するEXNOR積算回路27の出力を相互比較し、EXNOR積算回路27の出力が最大になるときのシフト量を動きベクトルとして出力する。このようにして、画像を分割したマッチングブロック毎に動きベクトルが検出される。   As described above, the shift registers 25 and 26 shift the image of the previous field and the current field within a predetermined search range, and the EXNOR integrating circuit 27 calculates the inversion of the exclusive logical sum and the total sum for each shift amount. And output to the maximum value detection circuit 28. The maximum value detection circuit 28 compares the outputs of the EXNOR integration circuit 27 with respect to the shift amounts of the shift registers 25 and 26 for each matching block, and determines the shift amount when the output of the EXNOR integration circuit 27 is maximized as a motion vector. Output as. In this way, a motion vector is detected for each matching block obtained by dividing the image.

以上の動作により、図4(b)に示すように1フレーム(1フィールド)内の各マッチングブロックについて、動きベクトルを検出することができる。これらのマッチングブロック毎の動きベクトルから、図1に示したマイコン12で平均をとる等の演算を行い、最終的なフレーム(フィールド)間の動きベクトルを求める。   With the above operation, a motion vector can be detected for each matching block in one frame (one field) as shown in FIG. From the motion vector for each matching block, an operation such as averaging is performed by the microcomputer 12 shown in FIG. 1 to obtain a final motion vector between frames (fields).

次に、図1に示した孤立領域判別回路5について詳細に説明する。
図3は、孤立領域判別回路5の構成を示すブロック図である。
図3に示すように、孤立領域判別回路5は、検定領域生成部31、孤立領域検出部32、カウンタ33、及び孤立領域サイズ指定部34を有する。
Next, the isolated region discriminating circuit 5 shown in FIG. 1 will be described in detail.
FIG. 3 is a block diagram showing a configuration of the isolated region discrimination circuit 5.
As illustrated in FIG. 3, the isolated region determination circuit 5 includes a test region generation unit 31, an isolated region detection unit 32, a counter 33, and an isolated region size designation unit 34.

検定領域生成部31は、テンプレートメモリから2値化されたデータを読み出したマッチングブロックにおいて、孤立領域サイズ指定部34により指定された検出する孤立領域サイズに応じた検定領域を生成する。孤立領域検出部32は、検定領域生成部31で生成された検定領域毎に、検定領域内の画素値と孤立領域パターンとのパターンマッチングを行い、孤立領域を検出する。カウンタ33は、孤立領域検出部32で検出された孤立領域の数をカウントする。孤立領域サイズ指定部34は、検出する孤立領域サイズに応じて検定領域生成部31及び孤立領域検出部32を制御するものである。   The verification area generation unit 31 generates a verification area corresponding to the isolated area size to be detected designated by the isolated area size designation unit 34 in the matching block from which the binarized data is read from the template memory. The isolated region detection unit 32 performs pattern matching between the pixel value in the verification region and the isolated region pattern for each verification region generated by the verification region generation unit 31, and detects an isolated region. The counter 33 counts the number of isolated areas detected by the isolated area detection unit 32. The isolated region size designation unit 34 controls the verification region generation unit 31 and the isolated region detection unit 32 according to the isolated region size to be detected.

次に、孤立領域判別回路5の動作について、図6〜図10を参照して説明する。
図6は、孤立領域判別回路5の動作を示すフローチャートである。また、図7は、各孤立領域サイズに対する検定領域を示す図であり、図8、図9、及び図10は、それぞれ孤立領域サイズが「1」、「2」、及び「3」の孤立領域を示す図である。
Next, the operation of the isolated region determination circuit 5 will be described with reference to FIGS.
FIG. 6 is a flowchart showing the operation of the isolated region discrimination circuit 5. FIG. 7 is a diagram showing a test area for each isolated area size. FIGS. 8, 9, and 10 are isolated areas whose isolated area sizes are “1”, “2”, and “3”, respectively. FIG.

孤立領域判別回路5は、動作を開始すると、動きベクトル検出回路6内のテンプレートメモリ24からマッチングブロック(分割されたテンプレート領域)のデータを読み出す(S101)。次に、孤立領域サイズが「1」と設定された後(S102)、孤立領域サイズ指定部34の制御を受けた検定領域生成部31は、動きベクトル検出回路6内の零クロス検出回路22で2値化されたデータを基に検定領域を生成する(S103)。具体的には、検定領域生成部31は、指定される孤立領域サイズに応じて必要な領域のデータを同時化する。   When the isolated region determination circuit 5 starts its operation, it reads the data of the matching block (divided template region) from the template memory 24 in the motion vector detection circuit 6 (S101). Next, after the isolated region size is set to “1” (S102), the test region generation unit 31 under the control of the isolated region size designating unit 34 uses the zero cross detection circuit 22 in the motion vector detection circuit 6. A test area is generated based on the binarized data (S103). Specifically, the test area generation unit 31 synchronizes data of necessary areas according to the specified isolated area size.

例えば、マイコン12の指示によりデータバス14を介して伝達された孤立領域サイズが「1」である場合には、検定領域生成部31は、図7(a)に示すような3×3画素から四隅の画素(図中、“×”印の画素)を除いたデータを同時化する。図7(a)において、図中の黒丸(“●”)が、2値化されて黒となった画素(例えば、星空撮影における夜空部分の画素)を表す(以下、図7(b)、(c)においても同様)。   For example, when the isolated area size transmitted through the data bus 14 according to the instruction of the microcomputer 12 is “1”, the verification area generation unit 31 starts from 3 × 3 pixels as shown in FIG. Data excluding the pixels at the four corners (pixels marked with “x” in the figure) are synchronized. In FIG. 7A, a black circle (“●”) in the drawing represents a pixel that has been binarized to become black (for example, a pixel in the night sky portion in starry sky photography) (hereinafter, FIG. 7B, The same applies to (c)).

検定領域生成部31により同時化された5つのデータは、孤立領域検出部32でパターンマッチングが行われる(S104)。その結果、2値化されて黒となった画素(黒丸)が4つとも存在し、かつ真中に位置する画素A1が2値化されて白となった画素(例えば、星に対応)である場合には、その領域は、孤立領域検出部32によりサイズ「1」の孤立領域として検出される。   The five data synchronized by the verification region generation unit 31 are subjected to pattern matching by the isolated region detection unit 32 (S104). As a result, there are four binarized pixels (black circles), and the pixel A1 positioned in the middle is binarized and white (for example, corresponding to a star). In this case, the isolated region detection unit 32 detects the region as an isolated region of size “1”.

孤立領域サイズが「1」の場合には、図8(a)に示す孤立領域を検出することができる。また、隣接する検定領域でサイズ「1」の孤立領域を検出した場合、図8(b)(c)のような斜め方向に隣接するサイズ「1」の孤立領域を検出することができる。   When the isolated area size is “1”, the isolated area shown in FIG. 8A can be detected. Further, when an isolated region of size “1” is detected in the adjacent test region, an isolated region of size “1” adjacent in the oblique direction as shown in FIGS. 8B and 8C can be detected.

同様に、孤立領域サイズが「2」と指定された場合には、検定領域生成部31は、図7(b)に示すような4×4画素から四隅を除いたデータを同時化する。そして、孤立領域検出部32は、図7(b)に示した2値化されて黒となった画素(黒丸)が8つとも存在し、かつ4つの画素B1、B2、B3、B4にてサイズ「2」の孤立領域パターンを検出した場合には、その領域をサイズ「2」の孤立領域として検出する。図9(a)〜(e)には、サイズ「2」の孤立領域パターンを示しており、これらの孤立領域パターンの何れかを検出した場合に、孤立領域検出部32は、その領域をサイズ「2」の孤立領域として検出する。   Similarly, when the isolated area size is designated as “2”, the test area generation unit 31 synchronizes data obtained by removing four corners from 4 × 4 pixels as shown in FIG. 7B. The isolated region detection unit 32 has eight pixels (black circles) binarized and black as shown in FIG. 7B, and has four pixels B1, B2, B3, and B4. When an isolated area pattern of size “2” is detected, the area is detected as an isolated area of size “2”. FIGS. 9A to 9E show an isolated region pattern of size “2”. When any of these isolated region patterns is detected, the isolated region detection unit 32 determines the size of the region. It is detected as an isolated region of “2”.

また、同様に、孤立領域サイズが「3」と指定された場合には、検定領域生成部31は、図7(c)に示すような5×5画素から四隅を除いたデータを同時化する。孤立領域検出部32は、図7(c)に示した黒画素(黒丸)が12個とも存在し、かつ、9つの画素C1〜C9にてサイズ「3」の孤立領域パターンを検出した場合には、その領域をサイズ「3」の孤立領域として検出する。図10(a)〜(g)には、サイズ「3」の孤立領域パターンの一例を示しており、これらの孤立領域パターンを検出した場合に、孤立領域検出部32は、その領域をサイズ「3」の孤立領域として検出する。なお、図10にはサイズ「3」の孤立領域パターンをすべて示しているわけではない。
同様の手法でサイズ「4」以上の孤立領域パターンを検出することが可能であることは言うまでもない。
Similarly, when the isolated area size is designated as “3”, the test area generation unit 31 synchronizes data obtained by removing the four corners from 5 × 5 pixels as shown in FIG. . The isolated region detection unit 32 includes all 12 black pixels (black circles) shown in FIG. 7C and detects an isolated region pattern of size “3” using nine pixels C1 to C9. Detects the region as an isolated region of size “3”. FIGS. 10A to 10G show an example of an isolated region pattern having a size “3”. When these isolated region patterns are detected, the isolated region detecting unit 32 converts the region into a size “ 3 ”is detected as an isolated region. Note that FIG. 10 does not show all isolated region patterns of size “3”.
Needless to say, it is possible to detect an isolated region pattern of size “4” or larger by the same method.

図6に戻り、孤立領域検出部32でのパターンマッチングの結果、検定領域内の画素値が孤立領域パターンに一致していれば(S105のY)、カウンタ33はカウント値をインクリメントする(S106)。一方、検定領域内の画素値と孤立領域パターンとが不一致であれば(S105のN)、ステップS106をスキップする。   Returning to FIG. 6, as a result of pattern matching in the isolated region detection unit 32, if the pixel value in the verification region matches the isolated region pattern (Y in S105), the counter 33 increments the count value (S106). . On the other hand, if the pixel value in the verification area does not match the isolated area pattern (N in S105), step S106 is skipped.

さらに、指定される孤立領域サイズが最大値に達していなければ(S107のN)、マイコン12からの指示に応じて孤立領域サイズがインクリメントされる(S108)。孤立領域サイズ指定部34の制御を受けた検定領域生成部31は、その孤立領域サイズに対応した検定領域を生成する(S103)。   Further, if the designated isolated area size does not reach the maximum value (N in S107), the isolated area size is incremented in accordance with an instruction from the microcomputer 12 (S108). The test area generation unit 31 under the control of the isolated area size designation unit 34 generates a test area corresponding to the isolated area size (S103).

例えば、孤立領域サイズ「1」の検出動作が終了して孤立領域サイズ「2」の検出動作に移行する場合、検定領域生成部31は、検定領域を図7(a)に示す3×3画素の領域から、縦横に1画素ずつ拡張して図7(b)に示す4×4画素の検定領域を生成する。   For example, when the detection operation for the isolated region size “1” ends and the operation shifts to the detection operation for the isolated region size “2”, the verification region generation unit 31 sets the verification region to 3 × 3 pixels shown in FIG. From this area, a 4 × 4 pixel test area shown in FIG.

指定される孤立領域サイズが最大値に達していれば(S107のY)、マッチングブロック内のすべての領域で孤立領域の検出動作を行ったか否かが判断される(S109)。その結果、全領域での検出動作が終了していなければ(S109のN)、孤立領域判別回路5は、再び孤立領域サイズを「1」と設定し(S102)、検出動作が終了していない領域(例えば、既に検出を終えた領域に隣接する領域)の検出動作を同様に行う。   If the specified isolated area size has reached the maximum value (Y in S107), it is determined whether or not the isolated area detection operation has been performed in all areas in the matching block (S109). As a result, if the detection operation in the entire region has not ended (N in S109), the isolated region determination circuit 5 sets the isolated region size to “1” again (S102), and the detection operation has not ended. The detection operation of a region (for example, a region adjacent to a region that has already been detected) is similarly performed.

ステップS109での判断の結果、マッチングブロック内の全領域での孤立領域の検出動作が終了していれば(S109のY)、動きベクトル検出回路5は、カウンタ33のカウント値をみる。そのカウント値が既定値以上であれば、即ち、マッチングブロック内に一定数以上の孤立領域が存在すれば(S110のY)、動きベクトル検出回路5は、上述の動作によりマッチングブロックの画像の動きベクトルを算出する(S111)。一方、マッチングブロック内に規定数以上の孤立領域が存在しない場合には(S110のN)、ステップS111をスキップする。   If the result of determination in step S109 is that the isolated region detection operation in all regions within the matching block has ended (Y in S109), the motion vector detection circuit 5 looks at the count value of the counter 33. If the count value is equal to or greater than the predetermined value, that is, if a certain number or more of isolated regions exist in the matching block (Y in S110), the motion vector detection circuit 5 performs the motion of the image of the matching block by the above-described operation. A vector is calculated (S111). On the other hand, if there are no more than the specified number of isolated regions in the matching block (N in S110), step S111 is skipped.

そして、テンプレート領域内のすべてのマッチングブロックで孤立領域の検出動作が完了したか否かを判断し、完了していれば(S112のY)、動作を終了する。一方、すべてのマッチングブロックでの検出動作が完了していなければ(S112のN)、カウンタ33のカウント値をリセットし(S113)、次のマッチングブロックのデータを読み出し(S114)、上述した孤立領域の検出動作を行う。   Then, it is determined whether or not the isolated region detection operation has been completed for all the matching blocks in the template region. If completed (Y in S112), the operation is terminated. On the other hand, if the detection operation in all the matching blocks is not completed (N in S112), the count value of the counter 33 is reset (S113), the data of the next matching block is read (S114), and the above-described isolated region Detection operation is performed.

上述した動作により検出される孤立領域とテンプレート領域の一例を図11に示す。
図11に示した例では、横方向に5個、縦方向に4個のマッチングブロックが配列されている。図11において、白い孤立領域は、例えば星空撮影時の星に対応する。動きベクトルの算出を行う上述した既定値が「2」であるとき、孤立領域が2個以上存在する領域(太線で囲んだ領域)0−A,0−D,1−A,1−E,2−B,2−D,3−Eで動きベクトルが算出される。なお、動きベクトルを算出しないマッチングブロックでは、図3に示したカウンタ33のカウント値に基づいて制御を行い、図2に示したシフトレジスタ25、26、EXNOR積算回路27、及び最大値検出回路28の動作を停止させるようにすれば良い。このようにすることで、不要な動きベクトル算出処理が行われることを防止し、処理負荷の軽減や消費電力を削減することができる。
An example of the isolated area and the template area detected by the above-described operation is shown in FIG.
In the example shown in FIG. 11, five matching blocks are arranged in the horizontal direction and four matching blocks in the vertical direction. In FIG. 11, a white isolated region corresponds to, for example, a star at the time of shooting a starry sky. When the above-mentioned default value for calculating the motion vector is “2”, areas where two or more isolated areas exist (areas surrounded by bold lines) 0-A, 0-D, 1-A, 1-E, A motion vector is calculated by 2-B, 2-D, and 3-E. In the matching block that does not calculate the motion vector, control is performed based on the count value of the counter 33 shown in FIG. 3, and the shift registers 25 and 26, the EXNOR integrating circuit 27, and the maximum value detecting circuit 28 shown in FIG. It suffices to stop the operation. By doing so, it is possible to prevent unnecessary motion vector calculation processing from being performed, and to reduce processing load and power consumption.

上述のようにして求められた動きベクトルに基づいて、マイコン12の指示によりメモリ制御回路8で切り出し位置(読み出し範囲)を制御し、メモリ7に格納した1フレーム(あるいは1フィールド)前の映像信号を読み出すことにより電子防振を行う。   Based on the motion vector obtained as described above, the cutout position (readout range) is controlled by the memory control circuit 8 according to the instruction of the microcomputer 12, and the video signal one frame (or one field) before stored in the memory 7. Electronic vibration isolation is performed by reading

以上のように、存在する孤立領域の数が既定数未満(本実施形態では、0又は1)のマッチングブロックでは動きベクトルを算出しないことにより、星空撮影時に生じる従来の不都合を回避し、星空撮影時であっても動きベクトルを正確に算出することができる。これにより、星空撮影時にも正確な電子防振をすることが可能になり、良好な撮像画像を得ることができる。   As described above, a motion vector is not calculated for a matching block in which the number of isolated regions existing is less than a predetermined number (0 or 1 in the present embodiment), thereby avoiding the conventional inconvenience that occurs during starry sky shooting. Even at times, the motion vector can be calculated accurately. As a result, accurate electronic image stabilization can be performed even when shooting a starry sky, and a good captured image can be obtained.

なお、上述した孤立領域の検出動作では、指定される孤立領域サイズをインクリメントして、1〜最大値の孤立領域サイズで順次、孤立領域の検出を行うようにしているが、これに限定されるものではない。例えば、最初に孤立領域サイズを最大値とし、孤立領域サイズをデクリメントして、1〜最大値の孤立領域サイズでの孤立領域の検出を行うようにしても良い。1〜最大値の孤立領域サイズの全サイズで孤立領域の検出を行えれば良く、孤立領域サイズの指定順序はランダムであっても良く、任意である。   In the above-described isolated region detection operation, the specified isolated region size is incremented, and the isolated region is sequentially detected with the isolated region size of 1 to the maximum value. However, the present invention is not limited to this. It is not a thing. For example, the isolated area size may be first set to the maximum value, and the isolated area size may be decremented to detect the isolated area with the isolated area size of 1 to the maximum value. It suffices if the isolated region can be detected with all the isolated region sizes of 1 to the maximum value, and the designation order of the isolated region size may be random or arbitrary.

次に、本実施形態における欠陥画素補正回路9での欠陥画素補正について説明する。
電子防振を実現する場合と同様に、欠陥画素の補正を行うには、上述のようにして得られた動きベクトルに基づいて、メモリ制御回路8で切り出し位置を制御し、メモリ7に格納した1フレーム(あるいは1フィールド)前の映像信号を読み出すことにより行う。
Next, the defective pixel correction in the defective pixel correction circuit 9 in the present embodiment will be described.
As in the case of realizing electronic image stabilization, in order to correct a defective pixel, the cutout position is controlled by the memory control circuit 8 based on the motion vector obtained as described above, and stored in the memory 7. This is done by reading the video signal of one frame (or one field) before.

例えば、得られた動きベクトルが、水平方向及び垂直方向について、それぞれ(vec_h,vec_v)であるとき、1フレーム(あるいは1フィールド)前の映像信号がメモリ7の出力で、現在のフィールドの映像信号がカメラ信号処理回路4の出力である。したがって、図12に示すように、メモリ7の出力に基づく画像121から、TV信号において(vec_h,vec_v)分ずれた箇所の画像122の信号を比較すれば両者は一致するはずである。   For example, when the obtained motion vectors are (vec_h, vec_v) in the horizontal direction and the vertical direction, respectively, the video signal of one frame (or one field) is the output of the memory 7 and the video signal of the current field Is the output of the camera signal processing circuit 4. Therefore, as shown in FIG. 12, if the signal of the image 122 at a location shifted by (vec_h, vec_v) in the TV signal from the image 121 based on the output of the memory 7 is compared, the two should match.

ところが、図12に示すように画像121にのみ孤立領域123が存在し、画像122にはそれに対応する孤立領域124は存在しない場合、画像121中の領域123は、撮像素子2の欠陥画素(白キズ)であると判断することができる。そこで、欠陥画素補正回路9は、検出した欠陥画素である領域123を除去するべく補正を行う。   However, as shown in FIG. 12, when the isolated region 123 exists only in the image 121 and the corresponding isolated region 124 does not exist in the image 122, the region 123 in the image 121 is a defective pixel (white) in the image sensor 2. It can be determined that it is a scratch. Therefore, the defective pixel correction circuit 9 performs correction to remove the region 123 that is the detected defective pixel.

なお、欠陥画素補正回路9による欠陥画素領域の除去は、星空撮影時であれば、例えば欠陥画素領域を単に黒画素としても良いし、領域123の周辺画素により補間するようにしても良いし、画像122内の対応する領域124の画素値を用いるようにしても良い。また、これらの例に限定されるものではなく、従来から用いられている補正方法を適用するようにしても良い。   The removal of the defective pixel area by the defective pixel correction circuit 9 may be, for example, simply a black pixel or interpolation with peripheral pixels of the area 123, when shooting at the starry sky. The pixel value of the corresponding region 124 in the image 122 may be used. Moreover, it is not limited to these examples, You may make it apply the correction method used conventionally.

上述のように前のフレームの領域と、その領域に対応する当該領域から動きベクトル分移動した現在のフレームの領域を比較し、何れか一方のみに存在する孤立領域を消去すべく欠陥画素補正回路9で補正を行う。これにより、星空撮影時に、防振動作を行いつつ、撮像画像において星に対応する部分(画素)と撮像素子2における欠陥画素(白キズ)を区別して欠陥画素(白キズ)のみを補正することができる。   As described above, the defective pixel correction circuit compares the area of the previous frame with the area of the current frame moved by the motion vector from the area corresponding to the area, and erases the isolated area existing in only one of the areas. In step 9, correction is performed. Thereby, at the time of photographing the starry sky, while performing the image stabilization operation, the portion (pixel) corresponding to the star in the captured image is distinguished from the defective pixel (white defect) in the image sensor 2, and only the defective pixel (white defect) is corrected. Can do.

なお、上述した実施形態では、孤立領域が2個以上存在するマッチングブロックについてのみ動きベクトルを算出する場合を一例として説明した。しかしながら、動きベクトルの算出を行う所定の孤立領域数(既定値)は、「2」に限ったものでなく、「3」以上であっても同様の効果を得ることができる。   In the above-described embodiment, the case where the motion vector is calculated only for the matching block having two or more isolated regions has been described as an example. However, the predetermined number of isolated regions (predetermined value) for calculating the motion vector is not limited to “2”, and the same effect can be obtained even if it is “3” or more.

また、本実施形態で説明した孤立領域の検出方法はこれに限ったものではなく、他の手法を用いても差し支えない。   In addition, the method for detecting an isolated region described in the present embodiment is not limited to this, and other methods may be used.

また、本実施形態では、動きベクトルを算出しないマッチングブロックでは、カウンタ33のカウント値に基づいて制御し、シフトレジスタ25、26、EXNOR積算回路27、及び最大値検出回路28の動作を停止させる例を示した。しかし、これに限定されるものではなく、例えば、すべてのマッチングブロックで動きベクトルを求めておき、マイコン12で最終的な動きベクトルを求める際に、孤立領域の数が不十分なマッチングブロックの動きベクトルを用いないようにしても良い。   In the present embodiment, in a matching block that does not calculate a motion vector, control is performed based on the count value of the counter 33, and the operations of the shift registers 25 and 26, the EXNOR integrating circuit 27, and the maximum value detecting circuit 28 are stopped. showed that. However, the present invention is not limited to this. For example, when motion vectors are obtained for all the matching blocks and the final motion vector is obtained by the microcomputer 12, the motion of the matching block having an insufficient number of isolated regions. A vector may not be used.

(第2の実施形態)
次に、本発明の第2の実施形態について説明する。
第2の実施形態による撮像装置は、既定数以上の孤立領域が存在するマッチングブロックの数が著しく少なく、動きベクトルを算出できない、又は算出した動きベクトルの正確さが乏しくなるような場合に、動きベクトルを正確に算出できるようにするものである。具体的には、第2の実施形態では、一定数以上の孤立領域が存在するマッチングブロックの数が著しく少ない場合には、帯域通過フィルタ21の通過帯域を制御して2値化パターンを変えることで、動きベクトルを算出できるようにする。
(Second Embodiment)
Next, a second embodiment of the present invention will be described.
The image pickup apparatus according to the second embodiment performs motion when the number of matching blocks in which an isolated region of a predetermined number or more exists is extremely small and the motion vector cannot be calculated or the accuracy of the calculated motion vector is poor. The vector can be calculated accurately. Specifically, in the second embodiment, when the number of matching blocks in which a certain number or more of isolated regions exist is extremely small, the binarization pattern is changed by controlling the pass band of the band pass filter 21. Thus, the motion vector can be calculated.

第2の実施形態による撮像装置の構成は、図1〜図3に示した第1の実施形態による撮像装置と同様であるので、その説明は省略する。   The configuration of the imaging apparatus according to the second embodiment is the same as that of the imaging apparatus according to the first embodiment shown in FIGS.

第2の実施形態による撮像装置の動作について、図13を参照して説明する。
図13は、第2の実施形態における動作を示すフローチャートである。
動作が開始されると、マイコン12は、データバス14を介して、デフォルトとなる帯域通過フィルタ21の通過帯域を設定する(S201)。次に、動きベクトル検出回路6内のテンプレートメモリ24から最初のマッチングブロックのデータを読み出す(S202)。続いて、上述した第1の実施形態と同様にしてマッチングブロック内に存在する孤立領域の数をカウントする(S203)。
The operation of the imaging apparatus according to the second embodiment will be described with reference to FIG.
FIG. 13 is a flowchart showing the operation in the second embodiment.
When the operation is started, the microcomputer 12 sets a pass band of the band pass filter 21 as a default via the data bus 14 (S201). Next, data of the first matching block is read from the template memory 24 in the motion vector detection circuit 6 (S202). Subsequently, the number of isolated regions present in the matching block is counted in the same manner as in the first embodiment described above (S203).

そして、マッチングブロックに孤立領域が既定数以上あると判断されたら(S204のY)、このマッチングブロックを有効であると判断して、不図示の有効テンプレート領域カウンタをインクリメントする(S205)。一方、マッチングブロックにある孤立領域が既定数未満であると判断した場合には(S204のN)、ステップS205をスキップする。   If it is determined that there are more than a predetermined number of isolated areas in the matching block (Y in S204), it is determined that this matching block is valid, and an effective template area counter (not shown) is incremented (S205). On the other hand, when it is determined that the number of isolated regions in the matching block is less than the predetermined number (N in S204), step S205 is skipped.

次に、すべてのマッチングブロックで孤立領域の検出動作が終了したか否かを判断し、終了していなければ(S206のN)、次のマッチングブロックのデータを読み出し(S207)、ステップS203に戻る。   Next, it is determined whether or not the isolated region detection operation has been completed for all the matching blocks. If not (N in S206), the data of the next matching block is read (S207), and the process returns to step S203. .

一方、すべてのマッチングブロックで孤立領域の検出が終了していれば(S206のY)、有効テンプレート領域カウンタの値を読み出し、孤立領域を所定数以上有する有効なマッチングブロックが1フレーム内で既定数以上あるか否かを判断する(S208)。その結果、有効なマッチングブロックが既定数以上あれば(S208のY)、有効テンプレート領域カウンタのカウント値をリセットし(S210)、動作を終了して引き続き第1の実施形態で説明した動きベクトルの検出や欠陥画素補正の動作を行う。   On the other hand, if the detection of isolated regions has been completed for all matching blocks (Y in S206), the value of the effective template region counter is read, and a predetermined number of effective matching blocks having a predetermined number or more of isolated regions are included in one frame. It is determined whether or not there is more (S208). As a result, if the number of valid matching blocks is equal to or larger than the predetermined number (Y in S208), the count value of the valid template area counter is reset (S210), the operation is terminated, and the motion vector described in the first embodiment is continued. Detection and defective pixel correction are performed.

一方、ステップS208での判断の結果、有効なマッチングブロックが既定数以上無い場合には(S208のN)、マイコン12は、帯域通過フィルタ21の通過帯域を変更する(S209)。ここで、例えば、初めに図5(a)に示したような出力波形が得られる通過帯域を有する帯域通過フィルタ21を用いて孤立領域の検出を行っていたとする。このときは、図5(a)に示したように零クロス点の間隔が広いので、星空撮影時には、小さい星に対応する画像データは2値化処理した場合に孤立点とならない可能性が高い。   On the other hand, if the result of determination in step S208 is that there are not more than a predetermined number of valid matching blocks (N in S208), the microcomputer 12 changes the passband of the bandpass filter 21 (S209). Here, for example, it is assumed that the isolated region is first detected using the band-pass filter 21 having a pass band from which an output waveform as shown in FIG. At this time, since the interval between the zero cross points is wide as shown in FIG. 5A, at the time of shooting the starry sky, there is a high possibility that image data corresponding to a small star will not become an isolated point when binarized. .

そこで、帯域通過フィルタ21の通過帯域を高くすると、2値化信号は図5(b)に示したようになり、零クロス点の間隔が狭まって、より小さい星を孤立領域として生成することができる。また、星空撮影時には、ほとんどの被写体が夜空と星のみで、第1の実施形態で述べたような照明条件の変化による零クロス点の変化が起こり得ない。そこで、極めて小さい星を孤立領域としたい場合には、帯域通過フィルタ21の制御して動作を止め、ある閾値を用いて2値化信号を生成するようにしても良い。   Therefore, when the pass band of the band pass filter 21 is increased, the binarized signal becomes as shown in FIG. 5B, and the interval between the zero cross points is narrowed, and a smaller star can be generated as an isolated region. it can. Further, at the time of shooting the starry sky, most subjects are only the night sky and the stars, and the change of the zero cross point due to the change of the illumination condition as described in the first embodiment cannot occur. Therefore, when an extremely small star is desired to be an isolated region, the band pass filter 21 may be controlled to stop the operation, and a binarized signal may be generated using a certain threshold value.

以上のように、既定数以上の孤立領域を有するマッチングブロック数が所定の数よりも少ない場合には、動きベクトル検出回路5が有する帯域通過フィルタ21の通過帯域を変更することにより、星の大きさが小さいときにも防振動作を実現することが可能となる。また、第1の実施形態と同様の動きベクトルの検出や欠陥画素補正の動作を行うことで、第1の実施形態と同様の効果が得られる。   As described above, when the number of matching blocks having a predetermined number or more of isolated regions is smaller than a predetermined number, the size of the star is increased by changing the passband of the bandpass filter 21 included in the motion vector detection circuit 5. It is possible to realize the image stabilization operation even when the height is small. Further, by performing the same motion vector detection and defective pixel correction operation as in the first embodiment, the same effects as in the first embodiment can be obtained.

(本発明の他の実施形態)
上述した実施形態の機能を実現するべく各種のデバイスを動作させるように、該各種デバイスと接続された装置又はシステム内のコンピュータ(CPU又はMPU)に対し、上記実施形態の機能を実現するためのソフトウェアのプログラムを供給する。そして、そのシステム又は装置のコンピュータに格納されたプログラムに従って上記各種デバイスを動作させることによって実施したものも、本発明の範疇に含まれる。
また、この場合、上記ソフトウェアのプログラム自体が上述した実施形態の機能を実現することになり、そのプログラム自体は本発明を構成する。また、そのプログラムをコンピュータに供給するための手段、例えばかかるプログラムを格納した記録媒体は本発明を構成する。かかるプログラムを記憶する記録媒体としては、例えばフレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。
また、供給されたプログラムがコンピュータにて稼働しているオペレーティングシステム又は他のアプリケーションソフト等と共同して上述の実施形態の機能が実現される場合にもかかるプログラムは本発明の実施形態に含まれることは言うまでもない。
さらに、供給されたプログラムがコンピュータに係る機能拡張ボードや機能拡張ユニットに備わるメモリに格納された後、そのプログラムの指示に基づいてその機能拡張ボード等に備わるCPU等が実際の処理の一部又は全部を行う。その処理によって上述した実施形態の機能が実現される場合にも本発明に含まれることは言うまでもない。
(Other embodiments of the present invention)
For realizing the functions of the above-described embodiment for a computer (CPU or MPU) in an apparatus or system connected to the various devices so as to operate various devices to realize the functions of the above-described embodiments. Supply software programs. And what was implemented by operating the said various devices according to the program stored in the computer of the system or apparatus is also contained under the category of this invention.
In this case, the software program itself realizes the functions of the above-described embodiments, and the program itself constitutes the present invention. Further, means for supplying the program to the computer, for example, a recording medium storing the program constitutes the present invention. As a recording medium for storing such a program, for example, a flexible disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.
In addition, such a program is also included in the embodiment of the present invention when the function of the above-described embodiment is realized in cooperation with an operating system running on a computer or other application software. Needless to say.
Further, after the supplied program is stored in a memory provided in a function expansion board or a function expansion unit related to the computer, a CPU or the like provided in the function expansion board or the like based on an instruction of the program may be part of the actual processing Do everything. Needless to say, the present invention includes the case where the functions of the above-described embodiments are realized by the processing.

なお、上記実施形態は、何れも本発明を実施するにあたっての具体化のほんの一例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、またはその主要な特徴から逸脱することなく、様々な形で実施することができる。   The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed as being limited thereto. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.

本発明の第1の実施形態による撮像装置の構成例を示す図である。It is a figure which shows the structural example of the imaging device by the 1st Embodiment of this invention. 第1の実施形態における動きベクトル検出回路の構成例を示す図である。It is a figure which shows the structural example of the motion vector detection circuit in 1st Embodiment. 第1の実施形態における孤立領域判別回路の構成例を示す図である。It is a figure which shows the structural example of the isolated area | region discrimination circuit in 1st Embodiment. 動きベクトル検出に係るサーチ領域及びテンプレート領域を示す図である。It is a figure which shows the search area | region and template area | region which concern on a motion vector detection. 動きベクトル検出回路の帯域通過フィルタの出力波形を示す図である。It is a figure which shows the output waveform of the bandpass filter of a motion vector detection circuit. 第1の実施形態における孤立領域判別回路の動作を示すフローチャートである。5 is a flowchart illustrating an operation of the isolated region determination circuit according to the first embodiment. 各孤立領域サイズに対する検定領域を示す図である。It is a figure which shows the test area | region with respect to each isolated area size. 孤立領域サイズが「1」の孤立領域の形状を示す図である。It is a figure which shows the shape of the isolated area whose isolated area size is "1". 孤立領域サイズが「2」の孤立領域の形状を示す図である。It is a figure which shows the shape of the isolated area whose isolated area size is "2". 孤立領域サイズが「3」の孤立領域の形状を示す図である。It is a figure which shows the shape of the isolated area whose isolated area size is "3". テンプレート領域と検出された孤立領域を示す図である。It is a figure which shows the isolated area | region detected with the template area | region. 第1の実施形態における欠陥画素補正を説明するための図である。It is a figure for demonstrating the defective pixel correction | amendment in 1st Embodiment. 第2の実施形態による撮像装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the imaging device by 2nd Embodiment.

符号の説明Explanation of symbols

1 レンズ
2 撮像素子
4 カメラ信号処理回路
5 孤立領域判別回路
6 動きベクトル検出回路
7 メモリ
8 メモリ制御回路
9 欠陥画素補正回路
12 マイコン
14 データバス
21 帯域通過フィルタ
22 零クロス検出回路
23 サーチメモリ
24 テンプレートメモリ
25,26 シフトレジスタ
27 EXNOR回路
28 最大値検出回路
31 検定領域生成部
32 孤立領域検出部
33 カウンタ
34 孤立領域サイズ指定部
DESCRIPTION OF SYMBOLS 1 Lens 2 Image pick-up element 4 Camera signal processing circuit 5 Isolated area discrimination circuit 6 Motion vector detection circuit 7 Memory 8 Memory control circuit 9 Defective pixel correction circuit 12 Microcomputer 14 Data bus 21 Band pass filter 22 Zero cross detection circuit 23 Search memory 24 Template Memory 25, 26 Shift register 27 EXNOR circuit 28 Maximum value detection circuit 31 Test region generation unit 32 Isolated region detection unit 33 Counter 34 Isolated region size designation unit

Claims (11)

複数の画素を有する撮像素子と、
上記撮像素子より出力された第1の画像データを複数の領域に分割し、上記第1の画像データよりも先に出力された第2の画像データを参照して各分割領域に係る動きベクトルを算出する動きベクトル検出手段と、
上記第1の画像データの分割領域内に存在する孤立領域を各分割領域毎に判別する孤立領域判別手段とを備え、
上記動きベクトル検出手段は、上記孤立領域判別手段での判別結果に応じて、上記分割領域に係る動きベクトルの算出を行うことを特徴とする撮像装置。
An imaging device having a plurality of pixels;
The first image data output from the image sensor is divided into a plurality of areas, and the motion vector associated with each divided area is obtained by referring to the second image data output prior to the first image data. A motion vector detecting means for calculating;
An isolated area discriminating means for discriminating an isolated area existing in the divided area of the first image data for each divided area;
The imaging apparatus according to claim 1, wherein the motion vector detection unit calculates a motion vector related to the divided region in accordance with a determination result of the isolated region determination unit.
さらに、上記動きベクトル検出手段により算出した動きベクトルに基づいて、上記撮像素子より出力された画像データの読み出し範囲を制御して防振処理を行う防振処理手段を有することを特徴とする請求項1に記載の撮像装置。   The image processing apparatus further comprises image stabilization processing means for performing image stabilization processing by controlling a read range of the image data output from the image sensor based on the motion vector calculated by the motion vector detection means. The imaging apparatus according to 1. 上記動きベクトル検出手段は、上記孤立領域判別手段により既定数以上の孤立領域が存在すると判別された分割領域に係る動きベクトルを算出することを特徴とする請求項1又は2記載の撮像装置。   The imaging apparatus according to claim 1, wherein the motion vector detection unit calculates a motion vector related to a divided region determined by the isolated region determination unit that a predetermined number or more of isolated regions exist. 上記第1の画像データと上記第2の画像データは、時間的に連続する2フレームの各フレームの画像データであることを特徴とする請求項1〜3の何れか1項に記載の撮像装置。   The imaging device according to any one of claims 1 to 3, wherein the first image data and the second image data are image data of two frames that are temporally continuous. . 上記孤立領域判別手段は、
上記分割領域において、指定される孤立領域サイズに応じた検定領域を生成する検定領域生成手段と、
上記検定領域生成手段により生成された検定領域の画素値と予め準備された孤立領域パターンとのパターンマッチングを行って孤立領域を検出する孤立領域検出手段と、
上記孤立領域検出手段により検出された孤立領域の数を計数する計数手段とを有することを特徴とする請求項1〜4の何れか1項に記載の撮像装置。
The isolated region discriminating means
In the divided area, a test area generating means for generating a test area according to a specified isolated area size;
An isolated area detecting means for detecting an isolated area by performing pattern matching between a pixel value of the verification area generated by the verification area generating means and an isolated area pattern prepared in advance;
The imaging apparatus according to claim 1, further comprising a counting unit that counts the number of isolated regions detected by the isolated region detecting unit.
上記孤立領域サイズが順次変更され、指定可能な上記孤立領域サイズのすべてのサイズに対して、上記分割領域内に存在する孤立領域の検出を行うことを特徴とする請求項5記載の撮像装置。   6. The image pickup apparatus according to claim 5, wherein the isolated area size is sequentially changed, and an isolated area existing in the divided area is detected for all sizes of the specifiable isolated area size. 上記第1の画像データと上記第2の画像データとを比較し、上記第1の画像データ及び上記第2の画像データの何れか一方のみに存在する孤立領域を補正して消去する補正手段をさらに備えることを特徴とする請求項1〜6の何れか1項に記載の撮像装置。   Correcting means for comparing the first image data with the second image data, correcting an isolated area existing in only one of the first image data and the second image data, and erasing the isolated area; The imaging apparatus according to claim 1, further comprising: 上記動きベクトル検出手段は、上記撮像素子からの画像データの特定の周波数成分を抽出するフィルタ手段を有し、
上記既定数以上の孤立領域を有する分割領域の数が既定数より少ない場合には、上記フィルタ手段により抽出する周波数成分を変更することを特徴とする請求項1〜7の何れか1項に記載の撮像装置。
The motion vector detection means has a filter means for extracting a specific frequency component of image data from the image sensor,
8. The frequency component extracted by the filter means is changed when the number of divided regions having an isolated region equal to or larger than the predetermined number is smaller than the predetermined number. Imaging device.
複数の画素を有する撮像素子より出力された第1の画像データを複数の領域に分割し、上記第1の画像データよりも先に出力された第2の画像データを参照して各分割領域に係る動きベクトルを算出する動きベクトル検出工程と、
上記第1の画像データの分割領域内に存在する孤立領域を各分割領域毎に判別する孤立領域判別工程とを有し、
上記孤立領域判別工程での判別結果に応じて、上記動きベクトル検出工程にて上記分割領域に係る動きベクトルの算出を行うことを特徴とする撮像方法。
First image data output from an imaging device having a plurality of pixels is divided into a plurality of areas, and each divided area is referred to with reference to the second image data output before the first image data. A motion vector detecting step for calculating the motion vector,
An isolated region determining step for determining, for each divided region, an isolated region present in the divided region of the first image data,
An imaging method comprising: calculating a motion vector relating to the divided region in the motion vector detecting step in accordance with a discrimination result in the isolated region discriminating step.
複数の画素を有する撮像素子より出力された第1の画像データを複数の領域に分割し、上記第1の画像データよりも先に出力された第2の画像データを参照して各分割領域に係る動きベクトルを算出する動きベクトル検出ステップと、
上記第1の画像データの分割領域内に存在する孤立領域を各分割領域毎に判別する孤立領域判別ステップとをコンピュータに実行させ、
かつ上記動きベクトル検出ステップでは、上記孤立領域判別ステップにおける判別結果に応じて、上記分割領域に係る動きベクトルの算出を行うことを特徴とするプログラム。
First image data output from an imaging device having a plurality of pixels is divided into a plurality of areas, and each divided area is referred to with reference to the second image data output before the first image data. A motion vector detection step for calculating the motion vector,
Causing the computer to execute an isolated region determination step for determining, for each divided region, an isolated region existing in the divided region of the first image data,
In the motion vector detection step, a motion vector related to the divided region is calculated according to the determination result in the isolated region determination step.
請求項10記載のプログラムを記録したことを特徴とするコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which the program according to claim 10 is recorded.
JP2006176800A 2006-06-27 2006-06-27 Imaging apparatus and method Pending JP2008010958A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006176800A JP2008010958A (en) 2006-06-27 2006-06-27 Imaging apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006176800A JP2008010958A (en) 2006-06-27 2006-06-27 Imaging apparatus and method

Publications (1)

Publication Number Publication Date
JP2008010958A true JP2008010958A (en) 2008-01-17

Family

ID=39068804

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006176800A Pending JP2008010958A (en) 2006-06-27 2006-06-27 Imaging apparatus and method

Country Status (1)

Country Link
JP (1) JP2008010958A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013090232A (en) * 2011-10-20 2013-05-13 Canon Inc Halftone processing device, halftone processing method, and program
JP2013211785A (en) * 2012-03-30 2013-10-10 Honda Motor Co Ltd Image generation device and image generation method
US9310459B2 (en) 2011-06-16 2016-04-12 Ricoh Imaging Company, Ltd. Method of automatically tracking and photographing celestial objects, and celestial-object auto-tracking photographing apparatus
US9648238B2 (en) 2014-10-06 2017-05-09 Canon Kabushiki Kaisha Image processing device that synthesizes a plurality of images, method of controlling the same, storage medium, and image pickup apparatus
JP2017225061A (en) * 2016-06-17 2017-12-21 キヤノン株式会社 Imaging device
CN111758025A (en) * 2018-02-22 2020-10-09 松下知识产权经营株式会社 Inspection apparatus and inspection method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9310459B2 (en) 2011-06-16 2016-04-12 Ricoh Imaging Company, Ltd. Method of automatically tracking and photographing celestial objects, and celestial-object auto-tracking photographing apparatus
JP2013090232A (en) * 2011-10-20 2013-05-13 Canon Inc Halftone processing device, halftone processing method, and program
JP2013211785A (en) * 2012-03-30 2013-10-10 Honda Motor Co Ltd Image generation device and image generation method
US9648238B2 (en) 2014-10-06 2017-05-09 Canon Kabushiki Kaisha Image processing device that synthesizes a plurality of images, method of controlling the same, storage medium, and image pickup apparatus
JP2017225061A (en) * 2016-06-17 2017-12-21 キヤノン株式会社 Imaging device
CN111758025A (en) * 2018-02-22 2020-10-09 松下知识产权经营株式会社 Inspection apparatus and inspection method

Similar Documents

Publication Publication Date Title
JP4815807B2 (en) Image processing apparatus, image processing program, and electronic camera for detecting chromatic aberration of magnification from RAW data
KR101396743B1 (en) An image processing device, an image processing method, and a recording medium
US7454131B2 (en) Image sensing apparatus with camera shake correction function
US8587712B2 (en) Image processing apparatus and method of correcting image quality degradation caused by aberrations due to optical system
US8760526B2 (en) Information processing apparatus and method for correcting vibration
US7509039B2 (en) Image sensing apparatus with camera shake correction function
JP2007129587A (en) Imaging apparatus, interchangeable lens apparatus, imaging control method, data processing method for distortion aberration correction and computer program
JP4876065B2 (en) Motion vector detection device, motion vector detection method, imaging device, and program
JP2006295626A (en) Fish-eye image processing apparatus, method thereof and fish-eye imaging apparatus
KR101830077B1 (en) Image processing apparatus, control method thereof, and storage medium
JPWO2012002069A1 (en) Shape extraction method and apparatus, and dimension measuring apparatus and distance measuring apparatus
JP2008010958A (en) Imaging apparatus and method
JP2007281555A (en) Imaging apparatus
US10965877B2 (en) Image generating method and electronic apparatus
JP2017054431A (en) Image processing device, image processing method, and program
JP2003078808A (en) Device and method for detecting motion vector, device and method for correcting camera shake and imaging apparatus
JP2008109545A (en) Image blur detecting apparatus, and image blur correcting apparatus with same, solid-state imaging apparatus, and electronic euipment
JP5159647B2 (en) Image processing apparatus and image processing method
JP4745147B2 (en) Imaging device
JP2014153517A (en) Image processing device, image processing method, program, and storage medium
JP3601506B2 (en) Apparatus and method for detecting motion vector, and apparatus and method for correcting image vibration
JP2007274029A (en) Hand shake correction device, method and program
JPH06153059A (en) Video record reproducing device
JP3574883B2 (en) Pupil measurement device
JP2020010097A (en) Image processing apparatus, imaging apparatus, control method for image processing apparatus, and program