JP5616745B2 - TRACKING DEVICE AND TRACKING METHOD - Google Patents

TRACKING DEVICE AND TRACKING METHOD Download PDF

Info

Publication number
JP5616745B2
JP5616745B2 JP2010237479A JP2010237479A JP5616745B2 JP 5616745 B2 JP5616745 B2 JP 5616745B2 JP 2010237479 A JP2010237479 A JP 2010237479A JP 2010237479 A JP2010237479 A JP 2010237479A JP 5616745 B2 JP5616745 B2 JP 5616745B2
Authority
JP
Japan
Prior art keywords
image
correlation
frame
tracking
unit
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.)
Active
Application number
JP2010237479A
Other languages
Japanese (ja)
Other versions
JP2012090232A5 (en
JP2012090232A (en
Inventor
尚 米山
尚 米山
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.)
Olympus Imaging Corp
Original Assignee
Olympus Imaging Corp
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 Olympus Imaging Corp filed Critical Olympus Imaging Corp
Priority to JP2010237479A priority Critical patent/JP5616745B2/en
Publication of JP2012090232A publication Critical patent/JP2012090232A/en
Publication of JP2012090232A5 publication Critical patent/JP2012090232A5/ja
Application granted granted Critical
Publication of JP5616745B2 publication Critical patent/JP5616745B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Studio Devices (AREA)
  • Image Analysis (AREA)

Description

本発明は、被写体画像中で指定した追尾対象を追跡可能な追尾装置および追尾方法に関する。   The present invention relates to a tracking device and a tracking method capable of tracking a tracking target specified in a subject image.

移動する被写体にピントや露出を合わせるために追尾装置を搭載した撮影装置が知られている。この追尾装置では、1つの画像内に設定された領域を参照画像とし、この参照画像の画像データと、前述の1つの画像と時系列的に続く画像の画像データと相関演算を行い、参照画像と最も整合する画像の位置を検出し、この位置を追尾位置とする。   2. Description of the Related Art An imaging device equipped with a tracking device for adjusting the focus and exposure of a moving subject is known. In this tracking device, a region set in one image is used as a reference image, and correlation processing is performed between the image data of the reference image and the image data of the image that continues in time series with the one image described above. The position of the image that most closely matches is detected, and this position is set as the tracking position.

例えば、特許文献1に開示の追尾装置は、過去に遡ってk回分(ここで、kは2以上の整数)の参照画像を記憶する参照メモリと、この参照メモリに記憶されたi=1(iは現画像から過去に遡った数)の参照画像と今回の画像との相関演算、およびこの相関演算により最も整合する今回の画像とi≧2の各参照画像との相関演算を行う相関演算部と、この相関演算で演算された相関値が予め定めた基準値を超えるか否かを判断する相関判断部と、この判断結果に基づいて参照画像の更新制御を行うメモリ制御部とを有している。   For example, the tracking device disclosed in Patent Document 1 has a reference memory for storing reference images k times (here, k is an integer of 2 or more) retroactively, and i = 1 ( Correlation calculation between the reference image of the current image and the current image), and the correlation calculation between the current image most matched by this correlation calculation and each reference image of i ≧ 2 A correlation determination unit that determines whether or not the correlation value calculated by the correlation calculation exceeds a predetermined reference value, and a memory control unit that performs reference image update control based on the determination result. doing.

特開平9−65193号公報JP-A-9-65193

前述の追尾装置では、i=1の参照画像と、それに連続する画像データとの間で相関演算を行うために、追尾対象手前に低速で移動する遮蔽物の一部が侵入し、かつ相関値が基準値を超えない場合には、遮蔽物の一部を含んだ画像が誤って参照画像として更新される。このため、追尾対象が遮蔽物に移ってしまうおそれがある。   In the tracking device described above, in order to perform a correlation calculation between the reference image of i = 1 and the image data continuous thereto, a part of the shield moving at a low speed in front of the tracking target enters, and the correlation value If the reference value does not exceed the reference value, an image including a part of the shielding object is erroneously updated as a reference image. For this reason, there is a possibility that the tracking target may move to the shield.

追尾対象が遮蔽物に移ってしまわないようにするためには、高精度に相関演算を行う必要があるが、携帯可能な装置では、データ量が増えると処理時間がかかってしまう。一方、データ量を少なくすると、高精度な相関演算を行うことができず、追尾対象が遮蔽物に移ってしまうおそれがある。   In order to prevent the tracking target from moving to the shielding object, it is necessary to perform the correlation calculation with high accuracy. However, in a portable device, if the amount of data increases, processing time is required. On the other hand, if the data amount is reduced, highly accurate correlation calculation cannot be performed, and the tracking target may move to the shielding object.

本発明は、このような事情を鑑みてなされたものであり、少ない画像データ量で、追尾対象として遮蔽物を移ってしまうことを低減させた追尾装置および追尾方法を提供することを目的とする。   The present invention has been made in view of such circumstances, and an object of the present invention is to provide a tracking device and a tracking method that reduce the movement of a shield as a tracking target with a small amount of image data. .

上記目的を達成するため第1の発明に係わる追尾装置は、被写体を撮像し、複数のフレーム画像を得る撮像部と、上記撮像された複数のフレーム画像を記憶する画像記憶部と、上記撮像されたフレーム画像内に、追尾対象とする領域を設定する領域設定部と、上記設定された領域のフレーム画像間の画像相関度を評価する評価画像を取得する評価画像取得部と、上記評価画像と上記複数のフレーム画像のうちの1つのフレーム画像から上記設定された領域における第1の画像相関度を検出する第1の相関検出部と、上記評価画像と上記第1の相関検出部で検出するフレーム画像より相対的に時間の離れた2つのフレーム画像から上記設定された領域における第2の画像相関度を検出する第2の相関検出部と、上記第1の画像相関及び上記第2の画像相関の何れも相関が高い場合に上記追尾対象とする領域を変更する判断を行う追尾領域変更判断部と、を有し、上記追尾領域変更判断部は、上記第1の画像相関、または第2の画像相関度の何れかで相関が低いと判断された場合には、上記追尾対象とする領域を変更しないと判断する。 In order to achieve the above object, a tracking device according to a first invention includes an imaging unit that captures a subject and obtains a plurality of frame images, an image storage unit that stores the plurality of captured frame images, and the captured image. A region setting unit that sets a region to be tracked within the frame image, an evaluation image acquisition unit that acquires an evaluation image for evaluating an image correlation degree between the frame images of the set region, and the evaluation image A first correlation detection unit that detects a first image correlation degree in the set region from one frame image of the plurality of frame images, and the evaluation image and the first correlation detection unit detect the first image correlation degree. a second correlation detector for detecting a second image correlation from two frame images away relatively time than the frame image in the set region, the first image correlation and the second Any image correlation anda tracking area change determination unit makes a determination to change the region to the tracking target when a high correlation, the tracking area change determination unit, the first image correlation If the correlation is determined to be low based on either the second image correlation level or the second image correlation level , it is determined that the tracking target area is not changed.

第2の発明に係わる追尾装置は、上記第1の発明において、上記第1および第2の相関検出部による上記第1及び第2の画像相関度の検出は、上記追尾対象とする領域から間引かれたデータを用いて行う。 The tracking device according to a second invention is the tracking device according to the first invention, wherein the detection of the first and second image correlation degrees by the first and second correlation detectors is performed from the region to be tracked. This is done using the drawn data.

の発明に係わる追尾装置は、上記第1の発明において、上記第1の相関検出部の複数回の検出結果より第1の相関度を判断する第1の閾値を設定し、上記第1の相関度がこの第1の閾値よりも相関が高いか否を判定する第1の相関判定部と、上記第2の相関検出部の複数回の検出結果より第2の相関度を判断する第2の閾値を設定し、上記第2の相関度がこの第2の閾値よりも相関が高いか否かを判定する第2の相関判定部と、を有する。 The tracking device according to a third aspect of the present invention is the tracking device according to the first aspect, wherein a first threshold value for determining a first degree of correlation is set based on a plurality of detection results of the first correlation detection unit. The first correlation determination unit for determining whether or not the correlation degree of the second correlation is higher than the first threshold, and the second correlation degree is determined from a plurality of detection results of the second correlation detection unit. And a second correlation determination unit that determines whether or not the second correlation degree is higher than the second threshold.

の発明に係わる追尾装置は、上記第1の発明において、上記追尾対象とする領域を変更する判断の更新に応じて、追尾指標となる枠表示位置を移動する。
の発明に係わる追尾装置は、上記第1の発明において、撮像する画像の撮像フレームレートを判定するフレームレート判定部を更に有し、上記第1及び第2の相関検出部、または第2の相関検出部は、設定されたフレームレートに応じて画像相関度を検出するフレームレート間隔を変更する。
In the tracking device according to a fourth aspect of the present invention, in the first aspect of the invention, the frame display position serving as the tracking index is moved in accordance with the update of the determination to change the area to be tracked.
The tracking device according to a fifth aspect of the present invention is the tracking device according to the first aspect, further comprising a frame rate determining unit that determines an imaging frame rate of an image to be captured, The correlation detection unit changes the frame rate interval for detecting the degree of image correlation according to the set frame rate.

第6の発明に係わる追尾装置は、被写体を撮像し、フレーム画像を得る撮像部と、上記フレーム画像の内、追尾対象として設定された領域の画像を参照画像として、フレームごとに更新しながら、複数フレームの上記参照画像を記憶する参照画像記憶部と、現フレーム画像を評価画像として記憶する評価画像記憶部と、上記評価画像と隣接フレームの関係にある参照画像と、上記評価画像との間で第1の画像相関度を検出し、上記評価画像と離散フレームの関係にある参照画像と、上記評価画像との間で第2の画像相関度を検出する相関演算部と、上記第1の画像相関度および上記第2の画像相関度の何れ相関度が高い場合に上記追尾対象とする領域の参照画像を変更する判断を行う追尾領域変更判断部と、を有する。 A tracking device according to a sixth aspect of the invention captures a subject and obtains a frame image, and updates an image of a region set as a tracking target in the frame image as a reference image for each frame, A reference image storage unit that stores the reference images of a plurality of frames, an evaluation image storage unit that stores a current frame image as an evaluation image, a reference image that is in a relationship between the evaluation image and an adjacent frame, and the evaluation image A correlation calculating unit that detects a first image correlation degree, detects a second image correlation degree between the evaluation image and a reference image in a discrete frame relationship with the evaluation image, and the first image image correlation and both of the second image correlation having a tracking area change determination unit makes a determination to change the reference image region and the tracking target when a high degree of correlation.

第7の発明に係わる追尾方法は、被写体を撮像し、フレーム画像を取得するたびに、追尾対象として設定された領域の画像を参照画像として記憶し、現フレーム画像を評価画像として記憶し、上記評価画像と隣接フレームの関係にある参照画像と、上記評価画像との間で第1の画像相関度を算出し、上記評価画像と離散フレームの関係にある参照画像と、上記評価画像との間で第2の画像相関度を算出し、上記第1の画像相関度および上記第2の画像相関度の何れ相関度が高い場合に上記追尾対象とする領域の参照画像を変更する。 In the tracking method according to the seventh aspect of the invention, every time a subject is imaged and a frame image is acquired, an image of an area set as a tracking target is stored as a reference image, and the current frame image is stored as an evaluation image. A first image correlation is calculated between the reference image in the relationship between the evaluation image and the adjacent frame and the evaluation image, and between the reference image in the relationship between the evaluation image and the discrete frame and the evaluation image. in calculating a second image correlation, any of the first image correlation and the second image correlation change the reference image of the region with the tracking target when a high degree of correlation.

本発明によれば、少ない画像データ量で、追尾対象として遮蔽物を移ってしまうことを低減させた追尾装置および追尾方法を提供することができる。   According to the present invention, it is possible to provide a tracking device and a tracking method that reduce the movement of a shield as a tracking target with a small amount of image data.

本発明の一実施形態に係わるカメラの主として電気回路の構成を示すブロック図である。It is a block diagram which mainly shows the structure of the electric circuit of the camera concerning one Embodiment of this invention. 本発明の一実施形態に係わるカメラの動き検出部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the motion detection part of the camera concerning one Embodiment of this invention. 本発明の一実施形態に係わるカメラにおける動作を示すフローチャートである。It is a flowchart which shows the operation | movement in the camera concerning one Embodiment of this invention. 本発明の一実施形態に係わるカメラにおける基準値算出の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the reference value calculation in the camera concerning one Embodiment of this invention. 本発明の一実施形態に係わるカメラにおいて、ブロックマッチングの概念を説明する図である。It is a figure explaining the concept of block matching in the camera concerning one Embodiment of this invention. 本発明の一実施形態に係わるカメラにおいて、低速遮蔽の概念を説明する図である。It is a figure explaining the concept of low-speed shielding in the camera concerning one Embodiment of this invention. 本発明の一実施形態に係わるカメラにおいて、参照するフレームによる相関値の違いを説明する図である。It is a figure explaining the difference in the correlation value by the frame to refer in the camera concerning one Embodiment of this invention. 本発明の一実施形態に係わるカメラにおいて、基準値の設定による相関判断の結果の違いを説明する図である。It is a figure explaining the difference of the result of the correlation judgment by the setting of a reference value in the camera concerning one embodiment of the present invention. 本発明の一実施形態に係わるカメラにおいて、基準値の決め方を説明する図である。It is a figure explaining how to determine a reference value in a camera according to an embodiment of the present invention.

以下、図面に従って本発明を適用したカメラを用いて好ましい実施形態について説明する。本発明の好ましい一実施形態に係わるカメラは、デジタルカメラであり、概略、撮像部を有し、この撮像部によって被写体像を画像データに変換し、この変換された画像データに基づいて、被写体像を表示部にライブビュー表示する。撮影時には、撮影者はライブビュー表示を観察し、構図やシャッタチャンスを決定する。ライブビュー表示の際に、撮影者が被写体を指定すると、指定された被写体を追跡し、この被写体に対してピント合わせを行うと共に適正露出となるように露出制御を行う。レリーズがなされると、撮影を行う。再生モードを選択すると、記録媒体に記録した撮影画像を表示部に再生表示することができる。   Hereinafter, a preferred embodiment will be described using a camera to which the present invention is applied according to the drawings. A camera according to a preferred embodiment of the present invention is a digital camera and generally includes an imaging unit. The imaging unit converts a subject image into image data, and the subject image is converted based on the converted image data. Is displayed in live view on the display. At the time of shooting, the photographer observes the live view display and determines the composition and photo opportunity. When the photographer designates a subject during live view display, the designated subject is tracked, the subject is focused, and exposure control is performed so that an appropriate exposure is obtained. When the release is made, a picture is taken. When the reproduction mode is selected, the captured image recorded on the recording medium can be reproduced and displayed on the display unit.

図1は、本実施形態に係わるカメラ1の主として電気的構成を示すブロック図である。撮像光学系11の光軸上に、撮像素子13が配置されている。撮像素子13の出力はAFE(Analogue Front End)15に接続され、AFE15の出力は動き検出部17およびバス33に接続されている。バス33には、前述の動き検出部17の他に、画像処理部19、RAM(Random Access Memory)21、ROM(Read Only Memory)23、システムコントローラ25、記録部27、表示部29、操作部31が接続されている。   FIG. 1 is a block diagram mainly showing an electrical configuration of a camera 1 according to the present embodiment. An image sensor 13 is disposed on the optical axis of the imaging optical system 11. The output of the image sensor 13 is connected to an AFE (Analogue Front End) 15, and the output of the AFE 15 is connected to the motion detector 17 and the bus 33. In addition to the motion detection unit 17 described above, the bus 33 includes an image processing unit 19, a RAM (Random Access Memory) 21, a ROM (Read Only Memory) 23, a system controller 25, a recording unit 27, a display unit 29, an operation unit. 31 is connected.

撮像光学系11は、被写体光束を撮像素子13に集光させ、被写体像を結像させるための光学系である。撮像部としての機能を有する撮像素子13は、CCD(Charge Coupled Device)やCMOS(Complementary Metal Oxide Semiconductor)等のイメージセンサであり、撮像光学系11により結像された被写体像を各画素で光電変換し、フレーム画像(画像信号)を取得し、AFE15に出力する。   The imaging optical system 11 is an optical system for condensing a subject light flux on the imaging element 13 to form a subject image. The image pickup device 13 having a function as an image pickup unit is an image sensor such as a CCD (Charge Coupled Device) or a CMOS (Complementary Metal Oxide Semiconductor). The frame image (image signal) is acquired and output to the AFE 15.

AFE15は、撮像素子13から出力されるフレーム画像をデジタル化したフレーム画像(画像データ)に変換する等の処理を行う。このAFE15によって処理された画像データは、動き検出部17およびバス33に出力され、バス33に出力された画像データはRAM21に一時記憶される。   The AFE 15 performs processing such as converting a frame image output from the image sensor 13 into a digitized frame image (image data). The image data processed by the AFE 15 is output to the motion detection unit 17 and the bus 33, and the image data output to the bus 33 is temporarily stored in the RAM 21.

動き検出部17は、参照画像とは異なる時点で取得した評価画像と相関演算を行い、相関値を検出し、また、動きベクトルを検出する。この動き検出部17の詳細な構成については、図2を用いて後述する。   The motion detection unit 17 performs a correlation operation with an evaluation image acquired at a different time from the reference image, detects a correlation value, and detects a motion vector. The detailed configuration of the motion detector 17 will be described later with reference to FIG.

画像処理部19は、RAM21に一時記憶された画像データを読み出し、この画像データに対して、ホワイトバランス補正処理、同時化処理、色変換処理等の画像処理を行う。また、画像処理部19は、後述する記録部27に画像データを記録する際に画像圧縮を行い、また記録部27から読み出した画像データの伸張を行う。   The image processing unit 19 reads the image data temporarily stored in the RAM 21 and performs image processing such as white balance correction processing, synchronization processing, and color conversion processing on the image data. Further, the image processing unit 19 performs image compression when recording image data in a recording unit 27 described later, and decompresses image data read from the recording unit 27.

RAM21は、DRAMやSDRAM等の揮発性メモリで構成され、一時記憶用に用いられ、バス33を介して、AFE15から出力された画像データの一時記憶や、各種情報の一時記憶の際に用いられる。前述の動き検出部17によって演算された相関値もRAM21に一時記憶される。ROM23は、フラッシュROM等の不揮発性メモリで構成され、カメラ1の全体を制御するためのプログラムや、各種調整値が記憶される。   The RAM 21 is composed of a volatile memory such as DRAM or SDRAM, and is used for temporary storage. The RAM 21 is used for temporary storage of image data output from the AFE 15 via the bus 33 and temporary storage of various types of information. . The correlation value calculated by the motion detection unit 17 is also temporarily stored in the RAM 21. The ROM 23 is composed of a nonvolatile memory such as a flash ROM, and stores a program for controlling the entire camera 1 and various adjustment values.

記録部27は、レリーズ時に取得された画像データを記録する記録媒体や、この記録媒体への記録制御部等を有する。記録媒体は、コンパクトフラッシュ(登録商標)、SDカード等、外部からカメラ1に装填可能である。   The recording unit 27 includes a recording medium for recording image data acquired at the time of release, a recording control unit for the recording medium, and the like. The recording medium can be loaded into the camera 1 from the outside, such as a compact flash (registered trademark) or an SD card.

表示部29は、カメラ1の背面等に配置され、LCDモニタや有機ELモニタ等を含み、撮像素子13からの画像データに基づくライブビュー表示や、記録部27から読み出した画像データに基づく再生表示等を行う。また、表示部29には、動き検出部17等によって検出された追尾被写体の動き量に基づいて追尾指標(ターゲットマーク)の表示を行う。   The display unit 29 is disposed on the back surface of the camera 1 and includes an LCD monitor, an organic EL monitor, and the like, and a live view display based on image data from the image sensor 13 and a reproduction display based on image data read from the recording unit 27. Etc. The display unit 29 displays a tracking index (target mark) based on the amount of movement of the tracking subject detected by the motion detection unit 17 or the like.

操作部31は、電源釦、レリーズ釦、メニュー釦等、各種入力キー等の操作部材である。ユーザが操作部31のいずれかの操作部材を操作すると、システムコントローラ25は、ユーザの操作に応じた各種シーケンスを実行する。   The operation unit 31 is an operation member such as a power button, a release button, a menu button, and various input keys. When the user operates one of the operation members of the operation unit 31, the system controller 25 executes various sequences according to the user's operation.

システムコントローラ25は、CPU(Central Processing Unit)等の中央処理装置を含み、ROM23に記憶されたプログラムに従って、カメラ1の全体制御を行う。すなわち、撮像光学系11、撮像素子13、AFE15、動き検出部17、画像処理部19、記録部27、表示部29等の各部を制御し、またRAM21やROM23のメモリ制御等を行う。   The system controller 25 includes a central processing unit such as a CPU (Central Processing Unit), and performs overall control of the camera 1 in accordance with a program stored in the ROM 23. That is, the imaging optical system 11, imaging element 13, AFE 15, motion detection unit 17, image processing unit 19, recording unit 27, display unit 29 and the like are controlled, and memory control of the RAM 21 and ROM 23 is performed.

また、システムコントローラ25は、領域設定部としての機能を果たす。この領域設定部は、レリーズ釦の半押し等により、撮像フレーム画像内に追尾対象とする領域を設定する。また、システムコントローラ25は、追尾領域変更判断部としての機能も果たす。この領域設定部は、動き検出部17による隣接フレームの参照画像と評価画像に基づく第1の相関検出の結果と、離散フレームの参照画像と評価画像に基づく第2の相関検出結果の何れの相関結果も高い場合に、追尾対象とする領域を変更する。   The system controller 25 also functions as an area setting unit. The area setting unit sets an area to be tracked in the captured frame image by pressing the release button halfway. The system controller 25 also functions as a tracking area change determination unit. The area setting unit is configured to detect any correlation between the result of the first correlation detection based on the reference image and the evaluation image of the adjacent frame by the motion detection unit 17, and the second correlation detection result based on the reference image and the evaluation image of the discrete frame. If the result is also high, the tracking target area is changed.

次に、動き検出部17の詳細な構成について図2を用いて説明する。AFE15の出力は、動き検出部17内のバッファメモリ41、第1動き検出用メモリ43、および第2動き検出用メモリ45にそれぞれ接続されている。評価画像取得部として機能するバッファメモリ41は、現フレームの画像(評価画像とも称する)の画像データを一時記憶するためのメモリである。厳密は、バッファメモリ41に一時記憶される画像データは現フレームの直前のフレームであるが、本明細書においては、便宜上、現フレームと称する。   Next, a detailed configuration of the motion detection unit 17 will be described with reference to FIG. The output of the AFE 15 is connected to a buffer memory 41, a first motion detection memory 43, and a second motion detection memory 45 in the motion detection unit 17, respectively. The buffer memory 41 functioning as an evaluation image acquisition unit is a memory for temporarily storing image data of an image of the current frame (also referred to as an evaluation image). Strictly speaking, the image data temporarily stored in the buffer memory 41 is the frame immediately before the current frame, but in this specification, for convenience, it is referred to as the current frame.

画像記憶部(または参照画像記憶部)として機能する第1動き検出用メモリ43は、現フレームの1フレーム前の画像(参照画像とも称する)の画像データを一時記憶するためのメモリである。また、画像記憶部(または参照画像記憶部)として機能する第2動き検出用メモリ45は、現フレームのnフレーム前の画像(参照画像とも称する)の画像データを一時記憶するためのメモリである。   The first motion detection memory 43 functioning as an image storage unit (or reference image storage unit) is a memory for temporarily storing image data of an image (also referred to as a reference image) one frame before the current frame. The second motion detection memory 45 functioning as an image storage unit (or reference image storage unit) is a memory for temporarily storing image data of an image n frames before the current frame (also referred to as a reference image). .

なお、図2には、1フレーム前とnフレーム前の画像データを一時記憶するためのメモリのみを記載してあるが、実際には、1フレーム前とnフレーム前の間の画像データを一時記憶するためのメモリも用意されており、画像データの更新の際には、画像データのシフトを行う。また、第1の動き検出用メモリ43および第2の動き検出用メモリ45は、撮像素子13によって撮像したフレーム画像から少なくとも追尾被写体の領域の画像とその周辺画像を記憶するが、記憶にあたって画像データを間引いてから記憶するようにしてもよい。   Note that FIG. 2 shows only a memory for temporarily storing image data of 1 frame before and n frames before, but actually, image data between 1 frame before and n frames before is temporarily stored. A memory for storage is also prepared, and the image data is shifted when the image data is updated. The first motion detection memory 43 and the second motion detection memory 45 store at least an image of the area of the tracking subject and its surrounding images from the frame image captured by the image sensor 13. You may make it memorize | store after thinning out.

バッファメモリ41の出力、第1動き検出用メモリ43の出力、および第2動き検出用メモリ45の出力は相関演算部47に接続されている。相関演算部47は、2つの画像データを用い、これらの画像の間で相関演算を行い、第1の相関値および第2の相関値を算出する。相関演算部47の出力は、バス31を介してRAM21に接続されている。   The output of the buffer memory 41, the output of the first motion detection memory 43, and the output of the second motion detection memory 45 are connected to the correlation calculation unit 47. The correlation calculation unit 47 uses two image data, performs a correlation calculation between these images, and calculates a first correlation value and a second correlation value. The output of the correlation calculation unit 47 is connected to the RAM 21 via the bus 31.

すなわち、相関演算部47は、バッファメモリ41に記憶された評価画像の画像データと第1動き検出用メモリ43に記憶された参照画像の画像データを用いて、相関演算部47は第1の相関値を演算し、この第1の相関演算値はRAM21に一時記憶する。また、バッファメモリ41に記憶された評価画像の画像データと第2動き検出用メモリ45に記憶された参照画像の画像データを用いて、相関演算部47は第2の相関値を演算し、この第2の相関演算値はRAM21に一時記憶する。   That is, the correlation calculation unit 47 uses the image data of the evaluation image stored in the buffer memory 41 and the image data of the reference image stored in the first motion detection memory 43, and the correlation calculation unit 47 uses the first correlation. A value is calculated, and this first correlation calculation value is temporarily stored in the RAM 21. Further, using the image data of the evaluation image stored in the buffer memory 41 and the image data of the reference image stored in the second motion detection memory 45, the correlation calculation unit 47 calculates a second correlation value, The second correlation calculation value is temporarily stored in the RAM 21.

また、相関演算部47は、動き量(動きベクトル)も算出する。動きベクトルは、相関演算部47によって第1及び第2の相関値が一番高くなった際における評価画像と参照画像の相対的な位置の差を、x座標およびy座標の差分で表わす。   The correlation calculation unit 47 also calculates a motion amount (motion vector). The motion vector represents the difference between the relative positions of the evaluation image and the reference image when the first and second correlation values become the highest by the correlation calculation unit 47 as the difference between the x coordinate and the y coordinate.

次に、本実施形態における追尾動作について、図5および図6を用いて説明する。本実施形態における追尾動作は、追尾対象決定時の追尾対象を示す参照画像と相関値の高い部分を、次のフレームの画像の中から検出することによって行う。この相関値の高い部分の検出は、いわゆるブロックマッチングによって行う。   Next, the tracking operation in the present embodiment will be described with reference to FIGS. The tracking operation in the present embodiment is performed by detecting a reference image indicating a tracking target at the time of tracking target determination and a portion having a high correlation value from the image of the next frame. The detection of the portion having a high correlation value is performed by so-called block matching.

図5(a)は、現フレームより1フレーム前の画像(N−1フレーム)であり、撮影者が追尾の対象として「A」の文字の部分を指定したときの様子を示す。撮影者が「A」を指定することにより、「A」を含む領域が参照画像400として選択される。参照画像400は、横6画素、縦6画素分のサイズであり、画素(a1,b1)〜画素(a6,b6)の36画素から構成される。   FIG. 5A shows an image (N-1 frame) one frame before the current frame, and shows a situation when the photographer designates a character portion “A” as a tracking target. When the photographer designates “A”, an area including “A” is selected as the reference image 400. The reference image 400 is 6 pixels wide and 6 pixels long, and is composed of 36 pixels from pixels (a1, b1) to pixels (a6, b6).

図5(b)は現フレームの画像(Nフレーム)であり、撮影者が「A」の文字を指定したときより、1フレーム後の画像である。この画像の中から、「A」を含むと予測される範囲を評価画像402とする。評価画像402は、横18画素、縦12画素分のサイズであり、画素(x1,y1)〜画素(x18,y12)の216画素から構成される。   FIG. 5B is an image of the current frame (N frame), which is an image one frame after the photographer specifies the character “A”. A range predicted to include “A” from these images is set as an evaluation image 402. The evaluation image 402 has a size of 18 pixels in the horizontal direction and 12 pixels in the vertical direction, and includes 216 pixels from the pixel (x1, y1) to the pixel (x18, y12).

ブロックマッチングによる相関値の演算では、画素(a1,b1)〜画素(a6,b6)の参照画像400を、評価画像402の内の画素(x1,y1)〜画素(x6,y6)に重ね、対応する画素同士の差分の累積値を求める。次に、評価画像402の内でx方向に1画素分ずらして同様に対応する画素同士の差分の累積値を求める。評価画像402内で参照画像400の位置をずらしながら、累積値を求め、この中で累積値が最も低い値となるところが最もマッチングが高い。このときの累積値が最も高くなるように変換した値が相関値である。最も相関値が高くなる位置を追尾位置とする。そして、この相関値の最も高かった位置に対応する6×6の画像を参照画像400として更新する。   In the calculation of the correlation value by block matching, the reference images 400 of the pixels (a1, b1) to the pixels (a6, b6) are superimposed on the pixels (x1, y1) to the pixels (x6, y6) in the evaluation image 402, A cumulative value of differences between corresponding pixels is obtained. Next, in the evaluation image 402, a cumulative value of differences between corresponding pixels is similarly obtained by shifting by one pixel in the x direction. The accumulated value is obtained while shifting the position of the reference image 400 in the evaluation image 402, and the place where the accumulated value is the lowest among these is the highest matching. The value converted so that the cumulative value at this time becomes the highest is the correlation value. The position with the highest correlation value is set as the tracking position. Then, the 6 × 6 image corresponding to the position having the highest correlation value is updated as the reference image 400.

このようにブロックマッチングによる相関値の演算では、参照画像400を評価画像402上で移動させながら相関値を求め、相関値が最も高くなる評価画像402上の位置を追尾位置とする。また相関値が最も高くなる参照画像を新たな参照画像400として更新を行う。また、相関値が最も高くなるときの参照画像400に対応する評価画像402上の位置までの移動量が動きベクトルとなる。   Thus, in the calculation of the correlation value by block matching, the correlation value is obtained while moving the reference image 400 on the evaluation image 402, and the position on the evaluation image 402 where the correlation value is the highest is set as the tracking position. The reference image having the highest correlation value is updated as a new reference image 400. Further, the amount of movement to the position on the evaluation image 402 corresponding to the reference image 400 when the correlation value is the highest is the motion vector.

図6は、追尾対象の前を、低速で移動する遮蔽物302がある場合を示す。図6(d)は、現フレーム(Nフレーム)の様子を示し、図6(c)は、現フレームより1フレーム前(N−1フレーム)、図6(b)は現フレームより2フレーム前(N−2フレーム)、図6(a)は現フレームより3フレーム前(N−3フレーム)である。撮影者は、現フレームより3フレーム前において、文字「A」の部分を追尾対象として指定している。追尾対象が指定されると、参照画像300が選択される。   FIG. 6 shows a case where there is an obstacle 302 moving at a low speed in front of the tracking target. 6 (d) shows the state of the current frame (N frame), FIG. 6 (c) is one frame before the current frame (N-1 frame), and FIG. 6 (b) is two frames before the current frame. (N-2 frame) and FIG. 6A are three frames before the current frame (N-3 frame). The photographer designates the portion of the letter “A” as a tracking target three frames before the current frame. When the tracking target is designated, the reference image 300 is selected.

従来の追尾方法では、現フレーム(Nフレーム)と、現フレームの1フレーム前(N−1フレーム)の画像データの相関演算を行い、最も、相関値の高い位置を追尾位置とし、また参照画像の更新を行っていた。それに対して、本実施形態においては、現フレームと1フレーム前の画像の相関演算のみならず、nフレーム(少なくとも2フレームより前、図6の例では、3フレーム)前の画像とも相関演算を行い、両者の相関値が所定値以上なければ、追尾位置を変更せず、また参照画像の更新を行わないようにしている。   In the conventional tracking method, a correlation calculation is performed between the current frame (N frame) and the image data of one frame before the current frame (N-1 frame), the position with the highest correlation value is set as the tracking position, and the reference image Had been updated. On the other hand, in the present embodiment, not only the correlation calculation between the current frame and the image one frame before, but also the correlation calculation with an image before n frames (at least before two frames, three frames in the example of FIG. 6). If the correlation value between the two is not greater than a predetermined value, the tracking position is not changed and the reference image is not updated.

従来の追尾方法では、低速で移動する遮蔽物の場合、移動速度が低いために1フレーム前の画像と現フレームの画像との差異が大きくならず、図7(a)に示すように、相関値は徐々に変化する。すなわち、時刻T1において、遮蔽物が参照画像中に入りだすと、相関値は徐々に低下し、時刻T2において予め決められている閾値より低下し、この時点で参照画像の更新が停止する。   In the conventional tracking method, in the case of a shield that moves at a low speed, the moving speed is low, so the difference between the image of the previous frame and the image of the current frame does not increase, and as shown in FIG. The value changes gradually. That is, when the shielding object begins to enter the reference image at time T1, the correlation value gradually decreases, and decreases from a predetermined threshold value at time T2, and at this point, updating of the reference image stops.

一方、本実施形態における追尾方法では、nフレーム前の画像とも相関演算を行っていることから、遮蔽物の移動速度が低速であっても、図7(b)に示すように、相関値は急速に低下する。すなわち、時刻T3において、遮蔽物が参照画像中に入り出すと、相関値は急激に低下し、時刻T4において閾値より低下し、この時点で参照画像の更新が停止する。このため、遮蔽物が参照画像中から出ると、停止の前の参照画像を用いて、追尾を再開することができる。なお、本実施形態においては、第1の相関値と第2の相関値を算出しており、図7(b)は、第1および第2の相関値を合成した結果を示す。   On the other hand, in the tracking method according to the present embodiment, since the correlation calculation is also performed on the image n frames before, even if the moving speed of the shielding object is low, the correlation value is as shown in FIG. Declines rapidly. That is, when the shielding object starts to enter the reference image at time T3, the correlation value rapidly decreases and falls below the threshold value at time T4, and at this point, the updating of the reference image is stopped. For this reason, when the shielding object comes out of the reference image, tracking can be resumed using the reference image before the stop. In the present embodiment, the first correlation value and the second correlation value are calculated, and FIG. 7B shows the result of combining the first and second correlation values.

次に、本実施形態における動作を図3に示すフローチャートを用いて説明する。この図3に示すフローチャートと図4に示すフローチャートは、ROM23に記憶されているプログラムに従って、システムコントローラ25によって実行される。カメラ1の電源釦が操作されると、スタートする。まず、ライブビュー動作を開始する(S11)。このステップでは、撮像素子13からの画像データに基づいて、表示部29にライブビュー表示を開始する。   Next, the operation in the present embodiment will be described with reference to the flowchart shown in FIG. The flowchart shown in FIG. 3 and the flowchart shown in FIG. 4 are executed by the system controller 25 in accordance with a program stored in the ROM 23. The operation starts when the power button of the camera 1 is operated. First, a live view operation is started (S11). In this step, live view display is started on the display unit 29 based on the image data from the image sensor 13.

ライブビュー動作を開始すると、次に、ターゲットロックオンを行う(S13)。撮影者が被写体追尾を行う場合には、メニュー画面等において被写体追尾モード等を予め設定しておき、その上で、追尾したい被写体をAFエリアに合わせ、レリーズ釦を半押しすることにより、領域設定部がターゲットロックオンする。ターゲットロックオンすると指定された領域の画像データを参照画像の画像データとする。なお、表示部29にタッチパネルを配置した場合には、追尾した被写体をタッチすることによりターゲットロックオンするようにしてもよい。ターゲットロックオンすると、動き検出部17は動作を開始し、追尾したい被写体の動きを追跡する。   Once the live view operation is started, next, target lock-on is performed (S13). When the photographer tracks the subject, set the subject tracking mode, etc. in advance on the menu screen, etc., set the subject to be tracked to the AF area, and press the release button halfway to set the area. Department locks on the target. When the target lock is turned on, the image data of the designated area is set as the image data of the reference image. When a touch panel is arranged on the display unit 29, target lock-on may be performed by touching a tracked subject. When the target lock is turned on, the motion detector 17 starts its operation and tracks the motion of the subject to be tracked.

続いて、被写体が検出されたか否かを判定する(S15)。ここでは、動き検出部17によって追尾対象となる被写体を検出できたか否かを判定する。この判定の結果、追尾対象となる被写体を検出できなかった場合には、ステップS13に戻り、検出されるのを待つ。   Subsequently, it is determined whether or not a subject is detected (S15). Here, it is determined whether or not the subject to be tracked has been detected by the motion detector 17. As a result of this determination, if the subject to be tracked cannot be detected, the process returns to step S13 and waits for detection.

ステップS15における判定の結果、被写体が検出されると、次に、第1及び第2の参照画像の領域を設定する(S17)。ここでは、ターゲットロックオンされた追尾被写体の領域を第1及び第2の参照画像として設定する。ここで設定した参照画像は、第1の動き検出用メモリ43および第2の動き検出メモリ45の両方に一時記憶される。   If the result of determination in step S15 is that a subject has been detected, then first and second reference image areas are set (S17). Here, the area of the tracking subject whose target is locked on is set as the first and second reference images. The reference image set here is temporarily stored in both the first motion detection memory 43 and the second motion detection memory 45.

第1及び第2の参照画像を設定すると、次に、追尾被写***置を示すターゲットマークの表示を行う(S19)。ここでは、ステップS13においてターゲットロックオンされた被写体の位置を示すターゲットマークを表示部29上にライブビュー表示に重畳表示し、撮影者が追尾対象を視認できるようにする。   Once the first and second reference images are set, next, a target mark indicating the tracking subject position is displayed (S19). Here, a target mark indicating the position of the subject whose target is locked on in step S13 is superimposed on the live view display on the display unit 29 so that the photographer can visually recognize the tracking target.

ターゲットマークを表示すると、次に、評価画像が取得されたか否かを判定する(S21)。ここでは、ターゲットロックオンされた際のフレームの次のフレームの画像データを取得したか否かを判定する。なお、本実施形態においては、撮像素子13は、1/15秒、1/30秒、1/60秒、または1/120秒程度のフレームレートで画像を取得する。後述するステップS45からステップS21に進んだ際には、次フレームの画像データを取得したか否かを判定する。評価画像としては、1フレームの全画像または参照画像を含むと推定される範囲内の画像とする。   Once the target mark is displayed, it is next determined whether or not an evaluation image has been acquired (S21). Here, it is determined whether the image data of the next frame after the target lock-on has been acquired. In the present embodiment, the image sensor 13 acquires an image at a frame rate of about 1/15 seconds, 1/30 seconds, 1/60 seconds, or 1/120 seconds. When the process proceeds from step S45 to be described later to step S21, it is determined whether or not image data of the next frame has been acquired. The evaluation image is an image within the range estimated to include the entire image of one frame or the reference image.

ステップS21における判定の結果、評価画像を取得した場合には、次に、評価画像の領域を記憶する(S23)。ここでは、取得した評価画像の画像データをバッファメモリ41に一時記憶する。   If the evaluation image is acquired as a result of the determination in step S21, then the evaluation image area is stored (S23). Here, the acquired image data of the evaluation image is temporarily stored in the buffer memory 41.

評価画像の記憶を行うと、次に、第1の参照画像と評価画像に基づき動き量と第1の相関値を算出する(S25)。ここでは、第1の動き検出用メモリ43に記憶された第1の参照画像の画像データと、バッファメモリ41に記憶された評価画像の画像データを用いて、相関演算部47が動き量と相関値を算出する。   Once the evaluation image is stored, the motion amount and the first correlation value are calculated based on the first reference image and the evaluation image (S25). Here, using the image data of the first reference image stored in the first motion detection memory 43 and the image data of the evaluation image stored in the buffer memory 41, the correlation calculation unit 47 uses the motion amount and the correlation. Calculate the value.

動き量と相関値を算出すると、次に、第1の基準値を算出する(S27)。第1の基準値は、図7(b)に示した閾値に相当する値であり、相関値が低下してきた場合に、参照画像の更新を停止するか否かを判定するための値である。本実施形態においては、過去の相関値の平均値を基にして算出している。この第1の基準値の算出については、図4を用いて後述する。   Once the amount of motion and the correlation value are calculated, the first reference value is then calculated (S27). The first reference value is a value corresponding to the threshold value shown in FIG. 7B, and is a value for determining whether or not to stop updating the reference image when the correlation value decreases. . In the present embodiment, the calculation is based on the average of past correlation values. The calculation of the first reference value will be described later with reference to FIG.

第1の基準値を算出すると、次に、第1の相関値が第1の基準値よりも大きいか否かを判定する(S29)。ここでは、ステップS25において算出した第1の相関値と、ステップS27において算出した第1の基準値を比較することにより判定する。   Once the first reference value is calculated, it is next determined whether or not the first correlation value is larger than the first reference value (S29). Here, the determination is made by comparing the first correlation value calculated in step S25 with the first reference value calculated in step S27.

ステップS29における判定の結果、第1の相関値が第1の基準値より大きかった場合には、次に、追尾開始後Nフレームが経過したか否かを判定する(S31)。追尾開始後、撮像素子13からフレーム画像が出力されるたびにカウントしておき、このステップでは、カウントしたフレーム数がNフレームを超えたか否かによって判定する。   If the result of determination in step S29 is that the first correlation value is greater than the first reference value, it is next determined whether or not N frames have elapsed after the start of tracking (S31). After the start of tracking, counting is performed every time a frame image is output from the image sensor 13, and in this step, determination is made based on whether or not the counted number of frames exceeds N frames.

ステップS31における判定の結果、追尾開始後Nフレームが経過していなかった場合には、1フレーム次の画像を第1の参照画像として更新し、また第1の相関値ログデータを更新する(S33)。ここでは、ステップS25において、第1の相関値を算出した際に、最も相関値の大きかった領域を第1の参照画像とし、この領域の画像データを第1の動き検出用メモリ43に一時記憶する。また、ステップS25において算出した第1の相関値をRAM21のログデータ領域に一時記憶する。   If the result of determination in step S31 is that N frames have not elapsed since the start of tracking, the next frame image is updated as the first reference image, and the first correlation value log data is updated (S33). ). Here, in step S25, when the first correlation value is calculated, the region having the largest correlation value is set as the first reference image, and the image data in this region is temporarily stored in the first motion detection memory 43. To do. Further, the first correlation value calculated in step S25 is temporarily stored in the log data area of the RAM 21.

ステップS31における判定の結果、追尾開始後Nフレームが経過すると、次に、第2の参照画像と評価画像に基づき動き量と第2の相関値を算出する(S35)。最初にここのステップで処理する場合には、ステップS17において第2の動き検出用メモリ45に一時記憶した第2の参照画像の画像データと、ステップS23において取得し、バッファメモリ41に一時記憶した評価画像の画像データを用いて、相関演算部47が動き量と第2の相関値を算出する。なお、次回以降、このステップで処理する場合には、後述するステップS41において更新した第2の参照画像の画像データを用いる。   If N frames elapse after the start of tracking as a result of the determination in step S31, then the motion amount and the second correlation value are calculated based on the second reference image and the evaluation image (S35). When processing is first performed in this step, the image data of the second reference image temporarily stored in the second motion detection memory 45 in step S17 and the image data acquired in step S23 and temporarily stored in the buffer memory 41 are stored. The correlation calculation unit 47 calculates the motion amount and the second correlation value using the image data of the evaluation image. Note that when processing is performed in this step after the next time, the image data of the second reference image updated in step S41 described later is used.

動き量と第2の相関値を算出すると、次に、第2の基準値を算出する(S37)。第2の基準値は、第1および第2の参照画像の更新を停止するか否かを判定するための閾値である。第1の基準値と同様、過去の第2の相関値の平均値を基にして算出している。この第2の基準値の算出については、図4を用いて後述する。   Once the amount of motion and the second correlation value are calculated, a second reference value is then calculated (S37). The second reference value is a threshold value for determining whether or not to update the first and second reference images. Similar to the first reference value, it is calculated based on the average value of the past second correlation values. The calculation of the second reference value will be described later with reference to FIG.

第2の基準値を算出すると、次に、第2の相関値が第2の基準値よりも大きいか否かを判定する(S39)。ここでは、ステップS35において算出した第2の相関値と、ステップS37において算出した第2の基準値を比較することにより判定する。後述するように、本実施形態においては、第1の基準と第2の基準値の値は異なるようにしている。   Once the second reference value has been calculated, it is next determined whether or not the second correlation value is greater than the second reference value (S39). Here, the determination is made by comparing the second correlation value calculated in step S35 with the second reference value calculated in step S37. As will be described later, in the present embodiment, the first reference value and the second reference value are different.

ステップS39における判定の結果、第2の相関値が第2の基準値よりも大きかった場合には、次に、1フレーム次の画像を第1、第2の参照画像として更新し、また第1および第2の相関値のログデータの更新を行う(S41)。ここでは、ステップS35において、第2の相関値を算出した際に、最も相関値の大きかった領域を第2の参照画像とし、この領域の画像データを第2の動き検出用メモリ45に一時記憶する。また、ステップS35において算出した第2の相関値をRAM21のログデータの記憶領域に一時記憶する。   If the result of determination in step S39 is that the second correlation value is greater than the second reference value, then the next frame image is updated as the first and second reference images, and the first The log data of the second correlation value is updated (S41). Here, when the second correlation value is calculated in step S35, the region having the largest correlation value is set as the second reference image, and the image data in this region is temporarily stored in the second motion detection memory 45. To do. Further, the second correlation value calculated in step S35 is temporarily stored in the log data storage area of the RAM 21.

ステップS41、S33において参照画像の更新と相関値のログデータの更新を行うと、またはステップS29、S39における判定の結果、相関値が基準値より小さかった場合には、次に、被写***置情報の更新を行い、ターゲットマーク表示位置の変更を行う(S43)。追尾被写体の位置は、ステップS25およびS35において算出された動き量に基づいて、決定される。なお、動き量は、動き検出部17において検出され、前回の追尾被写体の位置から、参照画像が評価画像中で最も一致する位置へのベクトルで決まる。追尾被写***置が決まると、表示部29に表示されているライブビュー表示に、追尾被写***置(ターゲットマーク)を重畳して表示する。   If the reference image is updated and the log data of the correlation value is updated in steps S41 and S33, or if the correlation value is smaller than the reference value as a result of the determination in steps S29 and S39, then the subject position information is updated. Update is performed and the target mark display position is changed (S43). The position of the tracking subject is determined based on the amount of movement calculated in steps S25 and S35. Note that the amount of motion is detected by the motion detection unit 17 and is determined by a vector from the previous position of the tracking subject to the position where the reference image most closely matches in the evaluation image. When the tracking subject position is determined, the tracking subject position (target mark) is superimposed on the live view display displayed on the display unit 29 and displayed.

ターゲットマークを表示すると、次に、撮影開始の操作が行われたか否かを判定する(S45)。ここでは、操作部31の内のレリーズ釦の全押し操作が行われたか否かを判定する。この判定の結果、撮影開始の操作が行われていなかった場合には、ステップS21に戻り、追尾動作を続行する。   When the target mark is displayed, it is next determined whether or not an operation for starting shooting has been performed (S45). Here, it is determined whether or not the release button in the operation unit 31 has been fully pressed. If the result of this determination is that an operation to start shooting has not been performed, processing returns to step S21 and the tracking operation is continued.

一方、ステップS45における判定の結果、撮影開始の操作が行われた場合には、撮影準備動作を行う(S47)。撮影準備動作として、追尾被写***置にピントが合うようにAF動作を行い、適正露出となるようにAE動作を行う。   On the other hand, if the result of determination in step S45 is that a shooting start operation has been performed, a shooting preparation operation is performed (S47). As a shooting preparation operation, an AF operation is performed so that the tracking subject position is in focus, and an AE operation is performed so as to obtain an appropriate exposure.

続いて、静止画像データを取得し、画像ファイルの生成を行う(S49)。ここでは、撮像素子13から画像信号を取得し、この画像信号に基づく画像データの画像処理を行い、画像ファイルを生成してから、記録部27に記録する。画像ファイルを記録すると、一連動作を終了し、電源釦がオンであれば、ステップS11に戻る。   Subsequently, still image data is acquired and an image file is generated (S49). Here, an image signal is acquired from the image sensor 13, image processing of image data based on the image signal is performed, an image file is generated, and then recorded in the recording unit 27. When the image file is recorded, the series of operations ends, and if the power button is on, the process returns to step S11.

本実施形態におけるフローにおいては、ステップS39における判定の結果、第2相関値が第2の基準値より小さかった場合には、第1及び第2の参照画像が更新されない。このため、遮蔽物が低速で移動しながら追尾被写体を横切る場合には、第1及び第2の参照画像の更新を停止する。そして、遮蔽物が追尾被写体の前を通り過ぎると、参照画像を用いて追尾被写体に対して追尾を再開することができる。 In the flow in this embodiment, the result of determination in step S 39, if the second correlation value is smaller than the second reference value, the first and second reference image is not updated. For this reason, when the obstruction crosses the tracking subject while moving at a low speed, the updating of the first and second reference images is stopped. When the shielding object passes in front of the tracking subject, tracking can be resumed with respect to the tracking subject using the reference image.

次に、ステップS27における第1の基準値算出と、ステップS37における第2の基準値算出の動作について、図4を用いて説明する。なお、第1の基準値算出のフローの場合には、ステップS51における相関値が第1の相関値であり、第2の基準値算出のフローの場合には、ステップS52における相関値が第2の相関値であり、他は同一であることから合わせて説明する。   Next, the operation of the first reference value calculation in step S27 and the second reference value calculation in step S37 will be described with reference to FIG. In the case of the first reference value calculation flow, the correlation value in step S51 is the first correlation value, and in the case of the second reference value calculation flow, the correlation value in step S52 is the second correlation value. Since the other correlation values are the same, they will be described together.

この基準値算出のフローでは、第1の相関値と第2の相関値に対する基準を異ならせている。図8(a)は第1の相関値の時間的変化を示し、図8(b)は第2の相関値の時間的変化を示している。この場合、第1及び第2の相関値に対して共通の基準値Aを設定すると、いずれか一方の相関値は基準値Aを超える可能性が高くなる。図8(b)に示す例では、時刻T5において遮蔽物を誤検知してしまっている。   In this reference value calculation flow, the reference for the first correlation value and the second correlation value are different. FIG. 8A shows the temporal change of the first correlation value, and FIG. 8B shows the temporal change of the second correlation value. In this case, if a common reference value A is set for the first and second correlation values, there is a high possibility that one of the correlation values exceeds the reference value A. In the example shown in FIG. 8B, the shielding object is erroneously detected at time T5.

そこで、本実施形態においては、図8(c)(d)に示すように、第1の相関値と第2の相関値に対して、それぞれ基準値を異ならせている。すなわち、第1の相関値に対しては、基準値Aを、第2の相関値に対しては基準値Bを設定するようにしている。また、これらの基準値A、基準値Bは、第1および第2の相関値の過去のデータに基づいて、図4に示すフローによって、算出するようにしている。   Therefore, in the present embodiment, as shown in FIGS. 8C and 8D, the reference values are made different for the first correlation value and the second correlation value, respectively. That is, the reference value A is set for the first correlation value, and the reference value B is set for the second correlation value. The reference value A and the reference value B are calculated by the flow shown in FIG. 4 based on the past data of the first and second correlation values.

基準値算出のフローに入ると、まず第1(第2)の相関値ログデータから相関値の平均値を算出する(S51)。前述したようにステップS33およびS41において、RAM21が相関値のログデータを記憶しているので、このログデータの平均を算出する。   When the flow for calculating the reference value is entered, first, the average value of the correlation values is calculated from the first (second) correlation value log data (S51). As described above, in steps S33 and S41, since the RAM 21 stores the log data of the correlation value, the average of the log data is calculated.

本実施形態においては、ログデータの平均は、過去の4データを用いて行う。現フレームをNフレームとすると、図9に示すように、第1の基準値Aは、N−1フレーム、N−2フレーム、N−3フレーム、N−4フレームで記憶した第1の相関値A1〜相関値A4の平均値とする。また、第2の基準値Bは、N−2フレーム、N−4フレーム、N−6フレーム、N−8フレームで記憶した第2の相関値B1〜相関値B4の平均値とする。なお、平均するデータ数としては、本実施形態においては、4データであるが、これよりも多くても少なくても構わない。また、平均値の算出方法として、単純平均でもよいが、直近の相関値の割合が高くなるように重み付けをした加重平均等、他の平均演算を利用してもよい。   In the present embodiment, the log data is averaged using the past four data. Assuming that the current frame is an N frame, as shown in FIG. 9, the first reference value A is the first correlation value stored in the N-1, N-2, N-3, and N-4 frames. The average value of A1 to correlation value A4 is used. The second reference value B is an average value of the second correlation values B1 to B4 stored in the N-2 frame, the N-4 frame, the N-6 frame, and the N-8 frame. The number of data to be averaged is 4 data in this embodiment, but it may be more or less than this. As a method for calculating the average value, a simple average may be used, but other average operations such as a weighted average weighted so that the ratio of the latest correlation value may be increased may be used.

相関値の平均値を算出すると、次に、平均値と予め設定した補正係数から基準値を算出する(S53)。ステップS51において算出した平均値に、ROM23に記憶した補正係数に基づいて第1の基準値Aおよび第2の基準値Bを算出する。補正係数として、例えば、1.2〜2程度の値とし、平均値に補正係数を乗算することにより、基準値を算出する。この場合、第1の基準値Aと第2の基準値Bとで補正係数を変えてもよく、また演算式を異ならせてもよい。基準値を算出すると元のフローに戻る。   Once the average value of the correlation values is calculated, a reference value is then calculated from the average value and a preset correction coefficient (S53). Based on the correction coefficient stored in the ROM 23, the first reference value A and the second reference value B are calculated based on the average value calculated in step S51. As the correction coefficient, for example, a value of about 1.2 to 2 is used, and the reference value is calculated by multiplying the average value by the correction coefficient. In this case, the correction coefficient may be changed between the first reference value A and the second reference value B, and the arithmetic expression may be different. When the reference value is calculated, the original flow is restored.

なお、本実施形態においては、相関値を求めるためのフレームレートは一定であったが、評価画像と隣接フレームの参照画像との第1の相関値と、評価画像と離散フレームの参照画像との第2の相関値に基づいて、相関演算部47における相関検出のフレームレート変更するようにしてもよい。   In this embodiment, the frame rate for obtaining the correlation value is constant, but the first correlation value between the evaluation image and the reference image of the adjacent frame, and the evaluation image and the reference image of the discrete frame Based on the second correlation value, the correlation detection frame rate in the correlation calculation unit 47 may be changed.

相関検出のフレームレートの変更にあたって、設定されている撮像フレームを判定するフレームレート判定部を設ける。このフレームレート判定部によって判定されたフレームレートに応じて、相関検出のフレーム間隔を変更する。例えば、設定されている撮像フレームが30fpsの場合、相関検出部47における第1の相関検出のフレーム間隔を1とし、第2の相関検出のフレーム間隔が2と設定されているとする。この場合、設定されている撮像フレームが60fpsとなると、第1の相関検出のフレーム間隔を2とし、第2の相関検出のフレーム間隔を4とする。また、設定されている撮像フレームが120fpsとなると、第1の相関検出のフレーム間隔を4とし、第2の相関検出のフレーム間隔を8とすればよい。   In changing the correlation detection frame rate, a frame rate determination unit for determining a set imaging frame is provided. The correlation detection frame interval is changed according to the frame rate determined by the frame rate determination unit. For example, when the set imaging frame is 30 fps, the frame interval for the first correlation detection in the correlation detection unit 47 is set to 1, and the frame interval for the second correlation detection is set to 2. In this case, when the set imaging frame is 60 fps, the frame interval for the first correlation detection is set to 2, and the frame interval for the second correlation detection is set to 4. When the set imaging frame is 120 fps, the frame interval for the first correlation detection may be set to 4, and the frame interval for the second correlation detection may be set to 8.

以上説明したように、本発明の一実施形態においては、評価画像と複数フレームの画像のうちの1つのフレームから設定された領域における第1の画像相関度を検出し、また、評価画像と第1の画像相関度で検出するフレームより相対的に時間の離れた2つのフレームから設定された領域における第2の画像相関度を検出し、第1の画像相関の検出結果と第2の画像相関の検出結果の何れの相関度が高い場合に追尾対象とする領域を変更する判断を行うようにしている。このため、少ない画像データ量で、追尾対象として遮蔽物を移ってしまうことを低減させることができる。人と人がすれ違う時、手の一部が入ってきた場合などに追尾対象が別のものに移り換わることを防止できる。   As described above, in one embodiment of the present invention, the first image correlation degree in the region set from one frame of the evaluation image and the plurality of frames is detected. Detecting a second image correlation degree in an area set from two frames relatively separated in time from a frame detected by the first image correlation degree, and detecting the first image correlation and the second image correlation When any correlation degree of the detection results is high, it is determined to change the area to be tracked. For this reason, it is possible to reduce the movement of the shielding object as the tracking target with a small amount of image data. It is possible to prevent the tracking target from changing to another when a person passes each other or when a part of the hand enters.

本発明の一実施形態においては、フレーム間隔の異なる複数の相関結果を用いて遮蔽物有無を判断している。このため、相関データ量を小さくしても確実に遮蔽物を検出する判断が可能になった。VGA程度の小さな画像データであっても、高精度で検出できる。   In one embodiment of the present invention, the presence / absence of an obstruction is determined using a plurality of correlation results having different frame intervals. For this reason, even if the correlation data amount is reduced, it is possible to make a determination to detect the shielding object with certainty. Even image data as small as VGA can be detected with high accuracy.

なお、本発明の一実施形態においては、離散フレーム間として3フレーム離れた画像を使用したが、3フレームに限らず、これよりも多くても構わない。また、隣接フレームとして現フレームと1フレーム離れた画像を使用したが、1フレームに限らず2フレーム以上で構わない。この場合、離散フレームとしては、隣接フレームよりも離れたフレームを使用すればよい。   In the embodiment of the present invention, images separated by 3 frames are used as discrete frames. However, the number of images is not limited to 3 and may be larger than this. Further, although an image that is one frame away from the current frame is used as an adjacent frame, the number of frames is not limited to one frame and may be two or more. In this case, as the discrete frame, a frame that is separated from the adjacent frame may be used.

また、本発明の一実施形態においては、撮影のための機器として、デジタルカメラを用いて説明したが、カメラとしては、デジタル一眼レフカメラでもコンパクトデジタルカメラでもよく、ビデオカメラ、ムービーカメラのような動画用のカメラでもよく、さらに、携帯電話や携帯情報端末(PDA:Personal Digital Assist)、ゲーム機器等に内蔵されるカメラでも構わない。   In the embodiment of the present invention, the digital camera is used as the photographing device. However, the camera may be a digital single lens reflex camera or a compact digital camera, such as a video camera or a movie camera. It may be a camera for moving images, or may be a camera built in a mobile phone, a personal digital assistant (PDA), a game device, or the like.

本発明は、上記実施形態にそのまま限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素の幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。   The present invention is not limited to the above-described embodiments as they are, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, you may delete some components of all the components shown by embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.

1・・・カメラ、11・・・撮像光学系、13・・・撮像素子、15・・・AFE、17・・・動き検出部、19・・・画像処理部、21・・・RAM、23・・・ROM、25・・・システムコントローラ、27・・・記録部、29・・・表示部、31・・・操作部、33・・・バス、41・・・バッファメモリ、43・・・第1動き検出用メモリ、45・・・第2動き検出用メモリ、47・・・相関演算部、300・・・参照画像、302・・・評価画像、400・・・参照画像、402・・・評価画像 DESCRIPTION OF SYMBOLS 1 ... Camera, 11 ... Imaging optical system, 13 ... Image sensor, 15 ... AFE, 17 ... Motion detection part, 19 ... Image processing part, 21 ... RAM, 23 ... ROM, 25 ... system controller, 27 ... recording unit, 29 ... display unit, 31 ... operation unit, 33 ... bus, 41 ... buffer memory, 43 ... First motion detection memory, 45 ... second motion detection memory, 47 ... correlation calculation unit, 300 ... reference image, 302 ... evaluation image, 400 ... reference image, 402 ...・ Evaluation image

Claims (7)

被写体を撮像し、複数のフレーム画像を得る撮像部と、
上記撮像された複数のフレーム画像を記憶する画像記憶部と、
上記撮像されたフレーム画像内に、追尾対象とする領域を設定する領域設定部と、
上記設定された領域のフレーム画像間の画像相関度を評価する評価画像を取得する評価画像取得部と、
上記評価画像と上記複数のフレーム画像のうちの1つのフレーム画像から上記設定された領域における第1の画像相関度を検出する第1の相関検出部と、
上記評価画像と上記第1の相関検出部で検出するフレーム画像より相対的に時間の離れた2つのフレーム画像から上記設定された領域における第2の画像相関度を検出する第2の相関検出部と、
上記第1の画像相関及び上記第2の画像相関の何れも相関が高い場合に上記追尾対象とする領域を変更する判断を行う追尾領域変更判断部と、
を有し、
上記追尾領域変更判断部は、上記第1の画像相関、または第2の画像相関度の何れかで相関が低いと判断された場合には、上記追尾対象とする領域を変更しないと判断することを特徴とする追尾装置。
An imaging unit that captures a subject and obtains a plurality of frame images;
An image storage unit for storing the plurality of captured frame images;
An area setting unit for setting an area to be tracked in the captured frame image;
An evaluation image acquisition unit for acquiring an evaluation image for evaluating the degree of image correlation between the frame images in the set region;
A first correlation detection unit for detecting a first image correlation degree in the set region from one frame image of the evaluation image and the plurality of frame images;
A second correlation detection unit that detects a second image correlation degree in the set region from two frame images relatively separated in time from the evaluation image and the frame image detected by the first correlation detection unit When,
The first image correlation and the second both image correlation makes the determination to change the region to the tracking target in the case of high correlation tracking area change determination unit,
Have
The tracking area change determination unit determines not to change the area to be tracked when it is determined that the correlation is low based on either the first image correlation degree or the second image correlation degree. A tracking device characterized by that.
上記第1および第2の相関検出部による上記第1及び第2の画像相関度の検出は、上記追尾対象とする領域から間引かれたデータを用いて行うことを特徴とする請求項1に記載の追尾装置。 Detection of the first and second image correlation by the first and second correlation detection section to claim 1, characterized in that by using the data thinned from the region to the tracking target The tracking device described. 上記第1の相関検出部の複数回の検出結果より第1の相関度を判断する第1の閾値を設定し、上記第1の相関度がこの第1の閾値よりも相関が高いか否を判定する第1の相関判定部と、
上記第2の相関検出部の複数回の検出結果より第2の相関度を判断する第2の閾値を設定し、上記第2の相関度がこの第2の閾値よりも相関が高いか否かを判定する第2の相関判定部と、
を有することを特徴とする請求項1に記載の追尾装置。
A first threshold value for determining the first correlation degree is set from a plurality of detection results of the first correlation detection unit, and whether or not the first correlation degree is higher in correlation than the first threshold value. A first correlation determination unit for determining;
A second threshold value for determining the second correlation degree is set based on a plurality of detection results of the second correlation detection unit, and whether or not the second correlation degree is higher than the second threshold value. A second correlation determination unit for determining
The tracking device according to claim 1, comprising:
上記追尾対象とする領域を変更する判断の更新に応じて、追尾指標となる枠表示位置を移動することを特徴とする請求項1に記載の追尾装置。   The tracking device according to claim 1, wherein a frame display position serving as a tracking index is moved in accordance with an update of a determination to change the region to be tracked. 撮像する画像の撮像フレームレートを判定するフレームレート判定部を更に有し、
上記第1及び第2の相関検出部、または第2の相関検出部は、設定されたフレームレートに応じて画像相関度を検出するフレームレート間隔を変更することを特徴とする請求項1に記載の追尾装置。
A frame rate determination unit that determines an imaging frame rate of an image to be captured;
The said 1st and 2nd correlation detection part or a 2nd correlation detection part changes the frame rate space | interval which detects an image correlation according to the set frame rate, It is characterized by the above-mentioned. Tracking device.
被写体を撮像し、フレーム画像を得る撮像部と、
上記フレーム画像の内、追尾対象として設定された領域の画像を参照画像として、フレームごとに更新しながら、複数フレームの上記参照画像を記憶する参照画像記憶部と、
現フレーム画像を評価画像として記憶する評価画像記憶部と、
上記評価画像と隣接フレームの関係にある参照画像と、上記評価画像との間で第1の画像相関度を検出し、上記評価画像と離散フレームの関係にある参照画像と、上記評価画像との間で第2の画像相関度を検出する相関演算部と、
上記第1の画像相関度および上記第2の画像相関度の何れ相関度が高い場合に上記追尾対象とする領域の参照画像を変更する判断を行う追尾領域変更判断部と、
を有することを特徴とする追尾装置。
An imaging unit that captures a subject and obtains a frame image;
A reference image storage unit that stores the reference image of a plurality of frames while updating the image of a region set as a tracking target among the frame images as a reference image for each frame;
An evaluation image storage unit for storing the current frame image as an evaluation image;
A reference image having a relationship of adjacent frames and the evaluation image, and detects a first image correlation between said evaluation image, a reference image having a relationship of discrete frames and the evaluation image, and the evaluation image A correlation calculation unit for detecting a second image correlation degree between the two,
The first image correlation and the second both image correlation makes the determination of changing the reference image region and the tracking target in the case of a high degree of correlation tracking area change determination unit,
A tracking device comprising:
被写体を撮像し、フレーム画像を取得するたびに、追尾対象として設定された領域の画像を参照画像として記憶し、
現フレーム画像を評価画像として記憶し、
上記評価画像と隣接フレームの関係にある参照画像と、上記評価画像との間で第1の画像相関度を算出し、
上記評価画像と離散フレームの関係にある参照画像と、上記評価画像との間で第2の画像相関度を算出し、
上記第1の画像相関度および上記第2の画像相関度の何れ相関度が高い場合に上記追尾対象とする領域の参照画像を変更する、
ことを特徴とする追尾方法。
Each time a subject is imaged and a frame image is acquired, an image of an area set as a tracking target is stored as a reference image,
Store the current frame image as an evaluation image,
Calculating a first image correlation between the reference image in the relationship between the evaluation image and the adjacent frame and the evaluation image;
Calculating a second image correlation between the evaluation image and a reference image in a discrete frame relationship with the evaluation image;
Any of the first image correlation and the second image correlation change the reference image of the region with the tracking target when a high degree of correlation,
The tracking method characterized by this.
JP2010237479A 2010-10-22 2010-10-22 TRACKING DEVICE AND TRACKING METHOD Active JP5616745B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010237479A JP5616745B2 (en) 2010-10-22 2010-10-22 TRACKING DEVICE AND TRACKING METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010237479A JP5616745B2 (en) 2010-10-22 2010-10-22 TRACKING DEVICE AND TRACKING METHOD

Publications (3)

Publication Number Publication Date
JP2012090232A JP2012090232A (en) 2012-05-10
JP2012090232A5 JP2012090232A5 (en) 2013-11-28
JP5616745B2 true JP5616745B2 (en) 2014-10-29

Family

ID=46261333

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010237479A Active JP5616745B2 (en) 2010-10-22 2010-10-22 TRACKING DEVICE AND TRACKING METHOD

Country Status (1)

Country Link
JP (1) JP5616745B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111127509B (en) * 2018-10-31 2023-09-01 杭州海康威视数字技术股份有限公司 Target tracking method, apparatus and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3505872B2 (en) * 1995-08-28 2004-03-15 日本ビクター株式会社 Moving object tracking device in image
JP3629236B2 (en) * 2001-12-07 2005-03-16 株式会社東芝 Object image tracking method and program

Also Published As

Publication number Publication date
JP2012090232A (en) 2012-05-10

Similar Documents

Publication Publication Date Title
US10827127B2 (en) Zoom control device, imaging apparatus, control method of zoom control device, and recording medium
JP4018695B2 (en) Method and apparatus for continuous focusing and exposure adjustment in a digital imaging device
JP5523143B2 (en) Imaging apparatus and automatic focusing method
US10270978B2 (en) Zoom control device with scene composition selection, and imaging apparatus, control method of zoom control device, and recording medium therewith
JP5251215B2 (en) Digital camera
JP5005570B2 (en) Image processing apparatus and program
US9253410B2 (en) Object detection apparatus, control method therefor, image capturing apparatus, and storage medium
JP6474693B2 (en) Focus detection apparatus, focus detection method, and recording medium
US20160191809A1 (en) Zoom control device, imaging apparatus, control method of zoom control device, and recording medium
JP2009225027A (en) Imaging apparatus, imaging control method, and program
TWI508548B (en) Image pickup device and image pickup method
JP2009010616A (en) Imaging device and image output control method
JP2011217103A (en) Compound eye photographing method and apparatus
JP4807582B2 (en) Image processing apparatus, imaging apparatus, and program thereof
JP2009017427A (en) Imaging device
JP5616745B2 (en) TRACKING DEVICE AND TRACKING METHOD
JP5635546B2 (en) Imaging device and method for controlling imaging device
JP6811114B2 (en) Imaging device and focus adjustment method
JP5451364B2 (en) Subject tracking device and control method thereof
JP2011130384A (en) Subject tracking apparatus and control method thereof
JP4877186B2 (en) Image processing apparatus, image processing method, and program
JP5683898B2 (en) TRACKING DEVICE AND TRACKING METHOD
JP2011018989A (en) Imaging device, image selection method, and program
JP4936799B2 (en) Electronic camera
US10168505B2 (en) Imaging apparatus

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131015

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131015

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140410

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140414

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140609

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140627

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140818

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140902

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140912

R151 Written notification of patent or utility model registration

Ref document number: 5616745

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250