JP5247338B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP5247338B2
JP5247338B2 JP2008258452A JP2008258452A JP5247338B2 JP 5247338 B2 JP5247338 B2 JP 5247338B2 JP 2008258452 A JP2008258452 A JP 2008258452A JP 2008258452 A JP2008258452 A JP 2008258452A JP 5247338 B2 JP5247338 B2 JP 5247338B2
Authority
JP
Japan
Prior art keywords
image data
image
input
scaled
magnification
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
JP2008258452A
Other languages
Japanese (ja)
Other versions
JP2010092092A (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.)
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 JP2008258452A priority Critical patent/JP5247338B2/en
Priority to US12/571,658 priority patent/US8625933B2/en
Publication of JP2010092092A publication Critical patent/JP2010092092A/en
Application granted granted Critical
Publication of JP5247338B2 publication Critical patent/JP5247338B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/36Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
    • G09G5/39Control of the bit-mapped memory
    • G09G5/391Resolution modifying circuits, e.g. variable screen formats
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2340/00Aspects of display data processing
    • G09G2340/04Changes in size, position or resolution of an image
    • G09G2340/045Zooming at least part of an image, i.e. enlarging it or shrinking it

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Description

本発明は画像処理装置、画像処理方法、及びプログラムに関し、特に、動画像から被写体パターンを検出するために用いて好適な技術に関する。 The present invention relates to an image processing apparatus, an image processing method, and a program , and more particularly, to a technique suitable for use in detecting a subject pattern from a moving image.

従来、動画像から所定の被写体パターンを自動的に検出する画像処理方法が提案されており、例えば人間の顔の判定に利用することができる。このような画像処理方法は、ビデオ会議、監視システム等に使用することができる。このように画像の中から所定の被写体パターンを検出する技術としては、例えば、テンプレートマッチングを利用することによって所定の被写体パターンを検出する方式が知られている。この方式に関連する先行技術文献としては、例えば、特許文献1〜3に開示されている。   Conventionally, an image processing method for automatically detecting a predetermined subject pattern from a moving image has been proposed, and can be used for, for example, determination of a human face. Such an image processing method can be used for a video conference, a surveillance system, and the like. As a technique for detecting a predetermined subject pattern from an image in this way, for example, a method of detecting a predetermined subject pattern by using template matching is known. Prior art documents related to this method are disclosed in, for example, Patent Documents 1 to 3.

特開2007−25899号公報JP 2007-25899 A 特開2004−171490号公報JP 2004-171490 A 特開2003−235035号公報JP 2003-235035 A

しかしながら、特許文献1に記載されている技術では、入力画像から複数の縮小画像をフレーム毎に生成した上で所定の被写体パターンとテンプレートマッチングを行うと、演算処理の負荷が大きくなる。したがって、高速処理に対応するハードウェアを用いなければ、特許文献2に記載されている方法により、演算処理が間に合う程度に一定フレーム間隔でテンプレートマッチングによる検出処理をする必要がある。この場合、例えば、所定の被写体をカメラでズームアップして撮影していた場合、非処理のフレームの間に所定の被写体がフレームアウトすると、パンやチルトによる追尾を行うことができないという問題がある。   However, in the technique described in Patent Document 1, if a plurality of reduced images are generated from an input image for each frame and then template matching is performed with a predetermined subject pattern, the processing load increases. Therefore, if hardware corresponding to high-speed processing is not used, it is necessary to perform detection processing by template matching at a constant frame interval by a method described in Patent Document 2 so that the arithmetic processing can be made in time. In this case, for example, when a predetermined subject is zoomed in with a camera and shot, if the predetermined subject is out of frame during an unprocessed frame, tracking by panning or tilting cannot be performed. .

また、特許文献2に記載されている技術では、一定フレーム間隔で通常の検出処理を行うとともに、その通常の検出処理を行うフレーム間に既に検出済みの被写体の座標近傍だけを検出するフレームを挿入する。これによってテンプレートマッチングの演算処理負荷を軽減しているが、被写体の移動速度によっては検出領域に被写体が入らずに、検出できないという問題が発生する。また、カメラでズームアップする、あるいは被写体とカメラとの距離が近づくという状況に対しても、前検出フレームの座標近傍だけの検出では対応できない場合がある。   In the technique described in Patent Document 2, normal detection processing is performed at regular frame intervals, and a frame that detects only the vicinity of the coordinates of a subject that has already been detected is inserted between frames in which the normal detection processing is performed. To do. Although this reduces the processing load of template matching, there is a problem that the subject cannot be detected because the subject does not enter the detection region depending on the moving speed of the subject. Further, even when the camera zooms up or when the distance between the subject and the camera approaches, there are cases where detection only in the vicinity of the coordinates of the previous detection frame cannot cope.

また、特許文献3に記載の技術では、入力画像と背景画像との差分を取ってこの差分をテンプレートとして登録しておく。この時、テンプレートにおける所定の被写体は、元々入力画像内の所定の被写体と同じである。カメラのズーム制御を行った場合に、そのパラメータを元に、入力画像及びテンプレート双方の所定の被写体を同じ大きさにするように解像度変換することにより、被写体パターンの検出を可能にしている。しかしながら、入力画像に一度映った被写体を追尾するという用途にしか利用できず、被写体とカメラとの距離が変化するという状況にも対応できない。したがって、被写体とカメラとの距離が変化した場合には検出精度が劣るという問題がある。   In the technique described in Patent Document 3, the difference between the input image and the background image is taken and this difference is registered as a template. At this time, the predetermined subject in the template is originally the same as the predetermined subject in the input image. When zoom control of the camera is performed, the subject pattern can be detected by converting the resolution so that a predetermined subject of both the input image and the template has the same size based on the parameter. However, it can be used only for the purpose of tracking the subject once shown in the input image, and cannot cope with the situation where the distance between the subject and the camera changes. Therefore, when the distance between the subject and the camera changes, there is a problem that the detection accuracy is inferior.

本発明は前述の問題点に鑑み、被写体パターンを検出するための演算処理の負荷が大きくならないようにするとともに、被写体パターンの検出精度を維持できるようにすることを目的とする。   The present invention has been made in view of the above-described problems, and it is an object of the present invention to prevent an increase in the processing load for detecting a subject pattern and to maintain the subject pattern detection accuracy.

本発明の画像処理装置は、画像データから所定の対象物を検出する画像処理装置であって、撮像装置から前記画像データを入力する画像入力手段と、前記画像入力手段によって入力された前記画像データに関する前記撮像装置のズーム倍率を入力するズーム倍率入力手段と、前記所定の対象物を示す検出パターンを記憶する検出パターン記憶手段と、前記画像入力手段によって入力された画像データから互いに倍率の異なる複数の変倍画像データを生成する画像変倍手段と、前記画像変倍手段によって生成された複数の変倍画像データから一部の領域を抽出し、前記抽出した一部の領域と、前記検出パターン記憶手段に記憶された検出パターンとを照合して前記所定の対象物を検出する検出手段とを有し、前記画像変倍手段は、前記画像入力手段によって入力された第1の画像データから生成された第1の変倍画像データから前記検出手段によって前記所定の対象物が検出された場合は、前記第1の画像データに関するズーム倍率から前記第1の画像データの次に前記画像入力手段によって入力された第2の画像データに関するズーム倍率への変化率と、前記第1の画像データから前記第1の変倍画像データを生成するための倍率とに基づいて、前記第2の画像データから第2の変倍画像データを生成するための倍率を決定するとともに、前記第1の画像データから生成された第1の変倍画像データから前記検出手段によって前記所定の対象物が検出されなかった時よりも少数の1つ以上の第2の変倍画像データを前記第2の画像データから生成することを特徴とする。 The image processing apparatus of the present invention is an image processing apparatus for detecting a predetermined object from the image data, an image input unit for inputting the image data from the imaging device, the image data input by said image input means A zoom magnification input means for inputting a zoom magnification of the imaging apparatus, a detection pattern storage means for storing a detection pattern indicating the predetermined object, and a plurality of magnifications different from each other from image data input by the image input means An image scaling unit for generating the scaled image data, a partial region extracted from the plurality of scaled image data generated by the image scaling unit, the extracted partial region, and the detection pattern by matching the stored detection pattern in the storage means and a detecting means for detecting said predetermined target object, the image scaling unit, the image input When the predetermined object is detected by the detection unit from the first scaled image data generated from the first image data input by the stage, the zoom magnification relating to the first image data is used to determine the first image data. The rate of change to the zoom magnification for the second image data input by the image input means after the one image data, and the magnification for generating the first scaled image data from the first image data And determining the magnification for generating the second scaled image data from the second image data, and the detection from the first scaled image data generated from the first image data One or more second scaled image data of a smaller number than that when the predetermined object is not detected by the means is generated from the second image data .

本発明の画像処理方法は、画像データから所定の対象物を検出する画像処理方法であって、撮像装置から前記画像データを入力する画像入力工程と、前記画像入力工程において入力された前記画像データに関する前記撮像装置のズーム倍率を入力するズーム倍率入力工程と、前記画像入力工程において入力された画像データから互いに倍率の異なる複数の変倍画像データを生成する画像変倍工程と、前記画像変倍工程において生成された複数の変倍画像データから一部の領域を抽出し、前記抽出した一部の領域と、前記所定の対象物を示す検出パターンとを照合して前記所定の対象物を検出する検出工程とを有し、前記画像変倍工程においては、前記画像入力工程において入力された第1の画像データから生成された第1の変倍画像データから前記検出工程において前記所定の対象物が検出された場合は、前記第1の画像データに関するズーム倍率から前記第1の画像データの次に前記画像入力工程において入力された第2の画像データに関するズーム倍率への変化率と、前記第1の画像データから前記第1の変倍画像データを生成するための倍率とに基づいて、前記第2の画像データから第2の変倍画像データを生成するための倍率を決定するとともに、前記第1の画像データから生成された第1の変倍画像データから前記検出工程において前記所定の対象物が検出されなかった時よりも少数の1つ以上の第2の変倍画像データを前記第2の画像データから生成することを特徴とする。 The image processing method of the present invention is an image processing method for detecting a predetermined object from the image data, an image input step of inputting the image data from the imaging device, the image data input in the image input step A zoom magnification input step of inputting a zoom magnification of the imaging device, an image scaling step of generating a plurality of scaled image data having different magnifications from the image data input in the image input step, and the image scaling A partial area is extracted from a plurality of scaled image data generated in the process, and the predetermined partial object is collated with a detection pattern indicating the predetermined target object to detect the predetermined target object. to and a detection step, in the image scaling step, or the first scaled image data generated from the first image data input in the image input step When the predetermined object is detected in the detection step, the zoom related to the second image data input in the image input step after the first image data from the zoom magnification related to the first image data. Second scaled image data is generated from the second image data based on a rate of change to the scale factor and a scale factor for generating the first scaled image data from the first image data . And determining a magnification for the detection, and using the first scaled image data generated from the first image data, a smaller number of one or more first objects than when the predetermined object is not detected in the detection step . 2 scaled image data is generated from the second image data .

本発明のプログラムは、画像データから所定の対象物を検出する画像処理装置を制御するためのプログラムであって、前記画像データを入力する画像入力手順と、撮像装置から前記画像入力手順において入力された画像データから互いに倍率の異なる複数の変倍画像データを生成する画像変倍手順と、前記画像入力手順において入力された前記画像データに関する前記撮像装置のズーム倍率を入力するズーム倍率入力手順と、前記画像変倍手順において生成された複数の変倍画像データから一部の領域を抽出し、前記抽出した一部の領域と、前記所定の対象物を示す検出パターンとを照合して前記所定の対象物を検出する検出手順とをコンピュータに実行させ、前記画像変倍手順においては、前記画像入力手順において入力された第1の画像データから生成された第1の変倍画像データから前記検出手順において前記所定の対象物が検出された場合は、前記第1の画像データに関するズーム倍率から前記第1の画像データの次に前記画像入力手順において入力された第2の画像データに関するズーム倍率への変化率と、前記第1の画像データから前記第1の変倍画像データを生成するための倍率とに基づいて、前記第2の画像データから第2の変倍画像データを生成するための倍率を決定するとともに、前記第1の画像データから生成された第1の変倍画像データから前記検出手順において前記所定の対象物が検出されなかった時よりも少数の1つ以上の第2の変倍画像データを前記第2の画像データから生成することを特徴とする。 Program of the present invention is a program for controlling an image processing apparatus for detecting a predetermined object from the image data, an image input procedure of inputting the image data, inputted in the image input procedure from the imaging device An image scaling procedure for generating a plurality of scaled image data having different magnifications from the obtained image data, a zoom magnification input procedure for inputting a zoom magnification of the imaging apparatus relating to the image data input in the image input procedure, A partial area is extracted from a plurality of scaled image data generated in the image scaling procedure , and the extracted partial area is collated with a detection pattern indicating the predetermined object to determine the predetermined area to execute a detection step of detecting an object in a computer, in the image scaling procedure, the first image input in the image input procedure When the predetermined object is detected in the detection procedure from the first scaled image data generated from the data, the zoom factor relating to the first image data is followed by the first image data. Based on the rate of change to the zoom magnification for the second image data input in the image input procedure and the magnification for generating the first scaled image data from the first image data, the second The magnification for generating the second scaled image data from the image data is determined, and the predetermined object is detected in the detection procedure from the first scaled image data generated from the first image data. and wherein the benzalkonium generates few one or more second scaled image data from the second image data than when not detected.

本発明によれば、被写体パターンの検出精度を維持できるとともに、所定の被写体の検出を高速化することができるため、被写体パターンを検出するための演算処理の負荷が大きくならないようにすることができる。   According to the present invention, the detection accuracy of the subject pattern can be maintained, and the detection of the predetermined subject can be speeded up, so that the calculation processing load for detecting the subject pattern can be prevented from increasing. .

(第1の実施形態)
以下、本発明の実施形態について図面を参照しながら説明する。
図1は、本実施形態の画像処理装置1の構成例を示すブロック図である。まず、本実施形態の画像処理装置1の構成について説明する。
図1において、画像入力部11は、画像データを受信するためのものである。また、画像入力部11は、特定の通信方式に準拠したマーカーコード付きのプロトコルに適合させた画像データや、JPEG/MPEG4等の圧縮処理された画像データを受信する必要がある場合を想定し、デコード処理機能を有している。なお、画像データは、撮像装置で撮影されて生成された撮影画像や、外部の記憶装置に記憶されている画像などのデータであり、出力元は特定の機器に限定されない。
(First embodiment)
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram illustrating a configuration example of an image processing apparatus 1 according to the present embodiment. First, the configuration of the image processing apparatus 1 according to the present embodiment will be described.
In FIG. 1, an image input unit 11 is for receiving image data. Further, the image input unit 11 assumes a case where it is necessary to receive image data adapted to a protocol with a marker code conforming to a specific communication method or image data compressed by JPEG / MPEG4, etc. It has a decoding processing function. Note that the image data is data such as a photographed image generated by photographing with an imaging device or an image stored in an external storage device, and the output source is not limited to a specific device.

画像メモリ12は、RAMなどの読み書き可能な記憶装置で構成されており、画像入力部11で受信した画像データや画像変倍部13で変倍処理した画像データを記憶する。画像変倍部13は、画像メモリ12に記憶された画像データを読み出し、縮小画像データ(変倍画像データ)を生成して画像メモリ12に書き込むためのものである。   The image memory 12 is configured by a readable / writable storage device such as a RAM, and stores image data received by the image input unit 11 and image data subjected to scaling processing by the image scaling unit 13. The image scaling unit 13 reads image data stored in the image memory 12, generates reduced image data (magnified image data), and writes the reduced image data in the image memory 12.

照合対象パターン抽出部14は、画像メモリ12に記憶された縮小画像データ上で所定サイズの矩形領域を移動させながら、この矩形に含まれる部分(画素群)を照合対象パターンとして順次抽出して出力する。なお、オリジナル画像も1/1の縮小画像と解釈し、縮小画像に含むことができるものとする。   The matching target pattern extraction unit 14 sequentially extracts and outputs a portion (pixel group) included in the rectangle as a matching target pattern while moving a rectangular area of a predetermined size on the reduced image data stored in the image memory 12. To do. Note that the original image is also interpreted as a 1/1 reduced image and can be included in the reduced image.

検出パターン記憶部15は、入力画像から検出したい所定のパターン(対象物)を検出パターンとして予め記憶しておくためのものである。パターン検出部16は、照合対象パターンが所定のパターンに該当するかどうかについて、検出パターン記憶部15に記憶されている検出パターンとの照合を行う。検出情報記憶部17は、パターン検出部16によって所定のパターンが検出された時に使用された縮小画像の変倍倍率の倍率情報をパターン検出部16から受け取って記憶するためのものである。   The detection pattern storage unit 15 stores a predetermined pattern (object) to be detected from the input image in advance as a detection pattern. The pattern detection unit 16 collates with the detection pattern stored in the detection pattern storage unit 15 as to whether the verification target pattern corresponds to a predetermined pattern. The detection information storage unit 17 is used to receive and store the magnification information of the magnification ratio of the reduced image used when the predetermined pattern is detected by the pattern detection unit 16 from the pattern detection unit 16.

次に、図1に示した各部の動作によってなされる処理について、図2のフローチャートを参照しながら説明する。画像処理装置1は、所定のパターンの検出において通常検出モードと高速検出モードとの2種類の検出モードを有する。そこで、最初は、画像処理装置1は通常検出モードで動作するものとする。   Next, processing performed by the operation of each unit shown in FIG. 1 will be described with reference to the flowchart of FIG. The image processing apparatus 1 has two detection modes, a normal detection mode and a high-speed detection mode, for detecting a predetermined pattern. Therefore, initially, it is assumed that the image processing apparatus 1 operates in the normal detection mode.

図2(a)は、本実施形態において、通常検出モードにおける所定のパターンを検出する処理手順の一例を示すフローチャートである。
処理を開始すると、まず、ステップS101において、画像入力部11は、画像データを受信する。この時、特定の通信方式に準拠したマーカーコード付きのプロトコルに適合させた画像データや、JPEG/MPEG4等の圧縮処理された画像データを受信した場合には、受信した画像データに対してデコード処理をする。
FIG. 2A is a flowchart illustrating an example of a processing procedure for detecting a predetermined pattern in the normal detection mode in the present embodiment.
When the process is started, first, in step S101, the image input unit 11 receives image data. At this time, if image data adapted to a protocol with a marker code conforming to a specific communication method or image data compressed by JPEG / MPEG4 is received, the received image data is decoded. do.

次に、ステップS102において、画像入力部11は、この処理結果を入力画像データとして画像メモリ12へ書き込む。なお、デコード処理が不要な場合は、受信した画像データを入力画像データとして画像メモリ12へ書き込む。   Next, in step S102, the image input unit 11 writes the processing result as input image data into the image memory 12. If the decoding process is unnecessary, the received image data is written as input image data into the image memory 12.

次に、ステップS103において、画像変倍部13は、画像メモリ12に記憶されている入力画像データを読み出し、複数(n(n≧2)個)の縮小画像データを生成して画像メモリ12に書き込む。   Next, in step S103, the image scaling unit 13 reads the input image data stored in the image memory 12, generates a plurality (n (n ≧ 2)) of reduced image data, and stores them in the image memory 12. Write.

例えば、入力画像がVGA(横640画素、縦480画素)であるものとする。これを横320画素、縦240画素に縮小して1個目の縮小画像A1のデータを生成して画像メモリ12に書き込む。さらに、この縮小画像A1のデータを画像メモリ12から読み出して、横、縦ともに0.8倍した2個目の縮小画像A2のデータを生成して画像メモリ12に書き込む。以後n個目の縮小画像Anのデータを生成するまで繰り返し縮小処理を行う。ここで、縮小画像データを生成する時の変倍倍率(入力画像から見た倍率)は一例である。また、nの値は入力画像サイズ、検出パターンサイズ等の条件から変更するようにしてもよく、値を固定しておいてもよい。以後、縮小画像A1〜Anのデータを生成した変倍倍率をそれぞれ倍率A1〜Anとする。   For example, it is assumed that the input image is VGA (horizontal 640 pixels, vertical 480 pixels). This is reduced to 320 pixels horizontally and 240 pixels vertically to generate data of the first reduced image A1 and write it to the image memory 12. Further, the data of the reduced image A1 is read from the image memory 12, and the data of the second reduced image A2 that is multiplied by 0.8 both horizontally and vertically is generated and written to the image memory 12. Thereafter, the reduction process is repeatedly performed until data of the nth reduced image An is generated. Here, the scaling ratio (magnification viewed from the input image) when generating the reduced image data is an example. The value of n may be changed based on conditions such as the input image size and the detection pattern size, or the value may be fixed. Hereinafter, the magnifications for generating the data of the reduced images A1 to An are referred to as magnifications A1 to An, respectively.

次に、ステップS104において、照合対象パターン抽出部14は、図3(a)に示すように、縮小画像A1〜Anの上で所定サイズの矩形領域を矢印で示す方向に移動させながら、この矩形に含まれる部分(画素群)を照合対象パターンとして順次抽出する。そして、パターン検出部16に出力する。ここで所定サイズとは、例えば、検出パターンと同じサイズで図3に示しているが、縮小画像An以上のサイズで任意に定めることができる。なお、矢印で示されているような手順は一例であり、順次抽出する手順は同じである必要はない。   Next, in step S104, the verification target pattern extraction unit 14 moves the rectangular area of a predetermined size on the reduced images A1 to An in the direction indicated by the arrow as shown in FIG. Are sequentially extracted as a pattern to be collated. Then, the data is output to the pattern detection unit 16. Here, the predetermined size is, for example, the same size as the detection pattern shown in FIG. 3, but can be arbitrarily determined with a size equal to or larger than the reduced image An. Note that the procedure as indicated by the arrows is an example, and the procedure of sequential extraction need not be the same.

さらに、パターン検出部16は、照合対象パターン抽出部14で抽出した照合対象パターンが所定のパターンに該当するかどうかについて、検出パターン記憶部15に記憶されている検出パターンとの照合を順次行う。以上のように通常検出モードでは、n個の縮小画像データを生成して照合を行う。   Further, the pattern detection unit 16 sequentially collates with the detection pattern stored in the detection pattern storage unit 15 as to whether or not the verification target pattern extracted by the verification target pattern extraction unit 14 corresponds to a predetermined pattern. As described above, in the normal detection mode, n pieces of reduced image data are generated and collated.

次に、ステップS105において、縮小画像A1〜Anにおける照合の結果、所定のパターンを検出したかどうかを判定する。この判定の結果、所定のパターンを検出しなかった場合は、ステップS101に戻り、ステップS101〜S104の処理を繰り返す。一方、ステップS105の判定の結果、所定のパターンを検出した場合は、ステップS106へ進む。   Next, in step S105, it is determined whether or not a predetermined pattern has been detected as a result of collation in the reduced images A1 to An. If the predetermined pattern is not detected as a result of this determination, the process returns to step S101, and the processes of steps S101 to S104 are repeated. On the other hand, if a predetermined pattern is detected as a result of the determination in step S105, the process proceeds to step S106.

例えば、ステップS105において、パターン検出部16が6個目の縮小画像である縮小画像A6で所定のパターンを検出したものとする。この場合、ステップS106において、検出情報記憶部17は、入力画像から見た変倍倍率である縮小画像A6の倍率A6の情報をパターン検出部16から受け取って記憶する。そして、検出情報記憶部17に変倍倍率の情報が記憶されると、画像処理装置1は通常検出モードを終了し、高速検出モードに移行する。   For example, in step S105, it is assumed that the pattern detection unit 16 detects a predetermined pattern in the reduced image A6 that is the sixth reduced image. In this case, in step S106, the detection information storage unit 17 receives information from the pattern detection unit 16 and stores information on the magnification A6 of the reduced image A6, which is a scaling magnification seen from the input image. When the magnification information is stored in the detection information storage unit 17, the image processing apparatus 1 ends the normal detection mode and shifts to the high speed detection mode.

図2(b)は、本実施形態において、高速検出モードにおける所定のパターンを検出する処理手順の一例を示すフローチャートである。
まず、ステップS107において、画像入力部11は、次の最新フレームの画像データを受信する。次に、ステップS108において、ステップS102と同様に画像入力部11は、受信した画像データを入力画像データとして画像メモリ12へ書き込む。
FIG. 2B is a flowchart illustrating an example of a processing procedure for detecting a predetermined pattern in the high-speed detection mode in the present embodiment.
First, in step S107, the image input unit 11 receives image data of the next latest frame. Next, in step S108, as in step S102, the image input unit 11 writes the received image data into the image memory 12 as input image data.

次に、ステップS109において、画像変倍部13は、画像メモリ12に記憶されている入力画像データを読み出し、m(n>m≧1)個の縮小画像データを生成して画像メモリ12に書き込む。縮小画像データを生成するための縮小倍率は、検出情報記憶部17に記憶している変倍倍率から決定する。なお、検出情報記憶部17には、変倍倍率ではなく画像サイズの情報を記憶しておき、その画像サイズから縮小倍率を決定するようにしてもよい。なお、本実施形態では、所定のパターンを検出した縮小画像の変倍倍率が倍率A6であり、倍率A6の情報が検出情報記憶部17に記憶されているものとして説明する。   In step S <b> 109, the image scaling unit 13 reads input image data stored in the image memory 12, generates m (n> m ≧ 1) pieces of reduced image data, and writes the reduced image data in the image memory 12. . The reduction ratio for generating the reduced image data is determined from the scaling ratio stored in the detection information storage unit 17. Note that the detection information storage unit 17 may store image size information instead of the scaling magnification, and determine the reduction magnification from the image size. In the present embodiment, it is assumed that the scaling factor of the reduced image from which the predetermined pattern is detected is the magnification A6, and information on the magnification A6 is stored in the detection information storage unit 17.

例えば、m=1とした時は、画像変倍部13は、検出情報記憶部17に記憶している倍率A6で、入力画像データから縮小画像B1(=縮小画像Bm)のデータを1個生成して画像メモリ12に書き込む。   For example, when m = 1, the image scaling unit 13 generates one piece of reduced image B1 (= reduced image Bm) data from the input image data at the magnification A6 stored in the detection information storage unit 17. Then, the data is written into the image memory 12.

また、m=3とした時は、画像変倍部13は、検出情報記憶部17に記憶している倍率A6の1.25倍の変倍倍率である倍率A5で、入力画像データから縮小画像B1のデータを生成して画像メモリ12に書き込む。そして、この縮小画像B1のデータを画像メモリ12から読み出し、横、縦ともに0.8倍した縮小画像B2のデータを生成して画像メモリ12に書き込む。なお、この変倍倍率は検出情報記憶部17に記憶している倍率A6と同じである。   When m = 3, the image scaling unit 13 reduces the reduced image from the input image data at a magnification A5 that is a magnification of 1.25 times the magnification A6 stored in the detection information storage unit 17. B1 data is generated and written to the image memory 12. Then, the data of the reduced image B1 is read from the image memory 12, and the data of the reduced image B2 that is multiplied by 0.8 in both horizontal and vertical directions is generated and written into the image memory 12. The scaling magnification is the same as the magnification A6 stored in the detection information storage unit 17.

続いて、この縮小画像B2のデータを画像メモリ12から読み出し、横、縦ともに0.8倍した縮小画像B3(=縮小画像Bm)のデータを生成して画像メモリ12に書き込む。この変倍倍率は倍率A7である。このようにm≠1の時は、n個の縮小画像データを生成した時のn個の変倍倍率において、検出情報記憶部17に記憶している変倍倍率を中心にし、それに近い変倍倍率を使用してm個の縮小画像データを生成する。   Subsequently, the data of the reduced image B2 is read from the image memory 12, and the data of the reduced image B3 (= reduced image Bm) which is multiplied by 0.8 in both horizontal and vertical directions is generated and written into the image memory 12. This magnification is A7. As described above, when m ≠ 1, the n scaling factors when the n reduced image data are generated are centered on the scaling factor stored in the detection information storage unit 17, and the scaling factor close to that The m pieces of reduced image data are generated using the magnification.

次に、ステップS110において、照合対象パターン抽出部14は、図3(b)に示すように、縮小画像B1〜Bmの上で所定サイズの矩形領域を矢印で示す方向に移動させながら、この矩形に含まれる部分(画素群)を照合対象パターンとして順次抽出する。そして、パターン検出部16に出力する。パターン検出部16は、照合対象パターン抽出部14で抽出した照合対象パターンが所定のパターンに該当するかどうかについて、検出パターン記憶部15に記憶されている検出パターンとの照合を順次行う。縮小画像データの数がn個より少数のm個である点で、前述のステップS104の処理とは異なっている。以上のように高速検出モードでは、m個の縮小画像データを生成して照合を行う。   Next, in step S110, the verification target pattern extraction unit 14 moves the rectangular area of a predetermined size on the reduced images B1 to Bm in the direction indicated by the arrow as shown in FIG. Are sequentially extracted as a pattern to be collated. Then, the data is output to the pattern detection unit 16. The pattern detection unit 16 sequentially collates with the detection patterns stored in the detection pattern storage unit 15 as to whether or not the collation target pattern extracted by the collation target pattern extraction unit 14 corresponds to a predetermined pattern. This is different from the processing in step S104 described above in that the number of reduced image data is m, which is smaller than n. As described above, in the high-speed detection mode, m pieces of reduced image data are generated and collated.

次に、ステップS111において、縮小画像B1〜Bmにおける照合の結果、所定のパターンを検出したかどうかを判定する。この判定の結果、所定のパターンを検出しなかった場合は、そのまま高速検出モードを終了する。そして、検出情報記憶部17は、記憶している倍率A6の情報を消去して、画像処理装置1は通常検出モードを開始する。一方、ステップS111の判定の結果、所定のパターンを検出した場合は、ステップS112へ進む。   Next, in step S111, it is determined whether or not a predetermined pattern has been detected as a result of collation in the reduced images B1 to Bm. As a result of this determination, if the predetermined pattern is not detected, the high-speed detection mode is terminated as it is. Then, the detection information storage unit 17 deletes the stored information of the magnification A6, and the image processing apparatus 1 starts the normal detection mode. On the other hand, if a predetermined pattern is detected as a result of the determination in step S111, the process proceeds to step S112.

例えば、ステップS111において、パターン検出部16がm=3で、3個目の縮小画像である縮小画像B3(=縮小画像Bm)で所定のパターンを検出したものとする。この場合、ステップS112において、検出情報記憶部17は記憶している倍率A6の情報を消去して、縮小画像B3の入力画像から見た変倍倍率である倍率B3の情報をパターン検出部16から受け取って新規に記憶する。そして、ステップS107に戻り、前述した手順と同様にステップS107〜S111の処理を実行する。   For example, in step S111, it is assumed that the pattern detection unit 16 detects a predetermined pattern in the reduced image B3 (= reduced image Bm) that is the third reduced image when m = 3. In this case, in step S112, the detection information storage unit 17 deletes the stored information on the magnification A6, and the information on the magnification B3, which is the magnification ratio viewed from the input image of the reduced image B3, is obtained from the pattern detection unit 16. Receive and store new. And it returns to step S107 and performs the process of step S107-S111 similarly to the procedure mentioned above.

なお、パターン検出部16が既知の輝度補正処理、濃度補正処理や背景除去処理機能を有し、照合対象パターンに対してこれらの処理を行い、パターン検出部16による照合の精度をさらに高めるようにしてもよい。また、既知の輝度補正処理、濃度補正処理や背景除去処理を有する画像処理部を別途備えるようにして、入力画像又は縮小画像に対してこれらの処理を行い、パターン検出部16による照合の精度をさらに高めるようにしてもよい。   Note that the pattern detection unit 16 has known brightness correction processing, density correction processing, and background removal processing functions, and performs these processing on the pattern to be verified to further increase the accuracy of verification by the pattern detection unit 16. May be. In addition, an image processing unit having a known luminance correction process, density correction process, and background removal process is separately provided, and these processes are performed on the input image or the reduced image, and the accuracy of matching by the pattern detection unit 16 is increased. You may make it raise further.

また、パターン検出部16による照合において、画像の輝度成分のみを使用する構成にしてもよい。この場合、画像変倍部13は、輝度成分のみを抽出して輝度成分のみの縮小画像データを生成するようにしてもよい。   Further, in the collation performed by the pattern detection unit 16, only the luminance component of the image may be used. In this case, the image scaling unit 13 may extract only the luminance component and generate reduced image data of only the luminance component.

以上のように本実施形態においては、検出情報記憶部17に記憶している変倍倍率が存在しない時は、入力画像上における所定の被写体の大きさが不明な条件下で所定のパターンを検出するために十分なn(n≧2)個の縮小画像を使用する。   As described above, in the present embodiment, when there is no scaling factor stored in the detection information storage unit 17, a predetermined pattern is detected under a condition in which the size of a predetermined subject on the input image is unknown. Sufficient n (n ≧ 2) reduced images are used.

ここで、検出情報記憶部17に記憶している変倍倍率が存在しない時とは、最初のフレームを画像入力部11が受信した時を含むこととする。一方で、検出情報記憶部17に記憶している変倍倍率が存在する時は、入力画像上における所定の被写体の大きさが既に判明していることを利用して、所定のパターンを検出するためにm(n>m≧1)個の縮小画像を使用する。   Here, the case where the magnification ratio stored in the detection information storage unit 17 does not exist includes the time when the image input unit 11 receives the first frame. On the other hand, when the scaling magnification stored in the detection information storage unit 17 exists, the predetermined pattern is detected by using the fact that the size of the predetermined subject on the input image is already known. Therefore, m (n> m ≧ 1) reduced images are used.

このように、検出情報記憶部17に記憶している変倍倍率から縮小画像データを生成するための変倍倍率を限定しているため、生成する縮小画像データを少なくするとともに、所定のパターンを検出することができる。そのため、変倍処理数及び照合回数の減少によって演算処理負荷を軽減して、所定の被写体の検出を高速化することができる。   As described above, since the magnification ratio for generating the reduced image data from the magnification ratio stored in the detection information storage unit 17 is limited, the reduced image data to be generated is reduced, and a predetermined pattern is set. Can be detected. For this reason, it is possible to reduce the calculation processing load by reducing the number of scaling processes and the number of collations, thereby speeding up detection of a predetermined subject.

また、変倍処理数を減少させてもm>1にすることによって、所定の被写体の入力画像における大きさが変化した場合においても、検出精度を維持することできる。また、本実施形態の画像処理装置1は外部から画像データを受信する構成で説明したが、撮像装置等の画像データ出力元を画像処理装置1と一体に構成しても、本発明の効果を得ることができるのは言うまでもない。   Moreover, even if the scaling process number is reduced, by setting m> 1, detection accuracy can be maintained even when the size of the input image of a predetermined subject changes. Further, although the image processing apparatus 1 of the present embodiment has been described with the configuration of receiving image data from the outside, the effect of the present invention can be achieved even if the image data output source such as an imaging apparatus is configured integrally with the image processing apparatus 1. It goes without saying that you can get it.

(第2の実施形態)
以下、本実施形態について説明する。図4は、本実施形態の画像処理装置20の構成例を示すブロック図である。まず、本実施形態の画像処理装置20の構成について説明する。
図4において、画像入力部21は、外部の撮像装置2から画像データを受信するためのものである。また、画像入力部21は、特定の通信方式に準拠したマーカーコード付きのプロトコルに適合させた画像データや、JPEG/MPEG4等の圧縮処理された画像データを受信する必要がある場合を想定し、デコード処理機能を有している。
(Second Embodiment)
Hereinafter, this embodiment will be described. FIG. 4 is a block diagram illustrating a configuration example of the image processing apparatus 20 according to the present embodiment. First, the configuration of the image processing apparatus 20 of the present embodiment will be described.
In FIG. 4, the image input unit 21 is for receiving image data from the external imaging device 2. In addition, the image input unit 21 assumes a case where it is necessary to receive image data adapted to a protocol with a marker code compliant with a specific communication method, or compressed image data such as JPEG / MPEG4. It has a decoding processing function.

撮像装置2は、撮影画角を変更可能なズームレンズを通して入射される光をCCD、CMOS等で光電変換してデジタルデータで構成される撮影画像データを生成する汎用のカメラである。撮像装置2は撮影画像データと共に少なくともズーム倍率を含む撮影パラメータを画像処理装置20に対して出力する。そして、撮影パラメータ記憶部28は、撮像装置2から出力された撮影パラメータを受信してパラメータ情報として記憶する。また、撮像装置2と画像処理装置20との間のデータ送受信には、Local Area Network(LAN)のような汎用的なネットワーク回線や専用ケーブルなどが使用される。   The imaging device 2 is a general-purpose camera that generates photographed image data composed of digital data by photoelectrically converting light incident through a zoom lens capable of changing a photographing field angle using a CCD, a CMOS, or the like. The imaging apparatus 2 outputs to the image processing apparatus 20 imaging parameters including at least the zoom magnification together with the captured image data. The shooting parameter storage unit 28 receives the shooting parameters output from the imaging device 2 and stores them as parameter information. For data transmission / reception between the imaging apparatus 2 and the image processing apparatus 20, a general-purpose network line such as a local area network (LAN), a dedicated cable, or the like is used.

画像メモリ22は、RAMなどの読み書き可能な記憶装置で構成されており、画像入力部21で受信した画像データや画像変倍部23で変倍処理した画像データを記憶する。画像変倍部23は、画像メモリ22に記憶された画像データを読み出し、縮小画像データ(変倍画像データ)を生成して画像メモリ22に書き込むためのものである。   The image memory 22 is configured by a readable / writable storage device such as a RAM, and stores the image data received by the image input unit 21 and the image data subjected to the scaling process by the image scaling unit 23. The image scaling unit 23 reads image data stored in the image memory 22, generates reduced image data (magnified image data), and writes the reduced image data in the image memory 22.

照合対象パターン抽出部24は、画像メモリ22に記憶された縮小画像データ上で所定サイズの矩形領域を移動させながら、この矩形に含まれる部分(画素群)を照合対象パターンとして順次抽出して出力する。なお、オリジナル画像も1/1の縮小画像と解釈し、縮小画像に含むことができるものとする。   The collation target pattern extraction unit 24 sequentially extracts and outputs a portion (pixel group) included in the rectangle as a collation target pattern while moving a rectangular area of a predetermined size on the reduced image data stored in the image memory 22. To do. Note that the original image is also interpreted as a 1/1 reduced image and can be included in the reduced image.

検出パターン記憶部25は、入力画像から検出したい所定のパターン(対象物)を検出パターンとして予め記憶しておくためのものである。パターン検出部26は、照合対象パターンが所定のパターンに該当するかどうかについて、検出パターン記憶部25に記憶されている検出パターンとの照合を行う。検出情報記憶部27は、パターン検出部26によって所定のパターンが検出された時に使用された縮小画像の変倍倍率の倍率情報をパターン検出部26から受け取って記憶するためのものである。   The detection pattern storage unit 25 stores a predetermined pattern (object) to be detected from the input image in advance as a detection pattern. The pattern detection unit 26 performs collation with the detection pattern stored in the detection pattern storage unit 25 as to whether or not the collation target pattern corresponds to a predetermined pattern. The detection information storage unit 27 is used to receive and store magnification information of the magnification ratio of the reduced image used when the predetermined pattern is detected by the pattern detection unit 26 from the pattern detection unit 26.

次に、図4に示した各部の動作によってなされる処理について、図5のフローチャートを参照しながら説明する。画像処理装置20は、所定のパターンの検出において通常検出モードと高速検出モードとの2種類の検出モードを有する。そこで、最初は、画像処理装置20は通常検出モードで動作する。   Next, processing performed by the operation of each unit illustrated in FIG. 4 will be described with reference to the flowchart of FIG. The image processing apparatus 20 has two detection modes, a normal detection mode and a high-speed detection mode, for detecting a predetermined pattern. Therefore, at first, the image processing apparatus 20 operates in the normal detection mode.

図5(a)は、本実施形態において、通常検出モードにおける所定のパターンを検出する処理手順の一例を示すフローチャートである。
処理を開始すると、まず、ステップS201において、画像入力部21は画像データを撮像装置2から受信し、撮影パラメータ記憶部28はその画像データに関する撮影パラメータを受信する。
FIG. 5A is a flowchart illustrating an example of a processing procedure for detecting a predetermined pattern in the normal detection mode in the present embodiment.
When the processing is started, first, in step S201, the image input unit 21 receives image data from the imaging device 2, and the imaging parameter storage unit 28 receives imaging parameters relating to the image data.

次に、ステップS202において、画像入力部21は、入力画像データを画像メモリ22へ書き込む。この時、特定の通信方式に準拠したマーカーコード付きのプロトコルに適合させた画像データを受信した場合には、画像入力部21はマーカーコードを除去するなどのデコード処理をして、この処理結果を入力画像データとして画像メモリ22へ書き込む。また、JPEG/MPEG4等の圧縮処理された画像データを受信した場合も、受信した画像データに対して伸長処理等のデコード処理をして、この処理結果を入力画像データとして画像メモリ22へ書き込む。デコード処理が不要な場合は、受信した画像データを入力画像データとして画像メモリ22へ書き込む。また、撮影パラメータ記憶部28は受信した撮影パラメータを記憶する。   Next, in step S <b> 202, the image input unit 21 writes the input image data into the image memory 22. At this time, when image data adapted to a protocol with a marker code conforming to a specific communication method is received, the image input unit 21 performs a decoding process such as removing the marker code, and the processing result is Write to the image memory 22 as input image data. Also, when image data subjected to compression processing such as JPEG / MPEG4 is received, decoding processing such as expansion processing is performed on the received image data, and the processing result is written in the image memory 22 as input image data. When the decoding process is unnecessary, the received image data is written into the image memory 22 as input image data. The shooting parameter storage unit 28 stores the received shooting parameters.

次に、ステップS203において、画像変倍部23は、画像メモリ22に記憶されている入力画像データを読み出し、n(n≧2)個の縮小画像データを生成して画像メモリ22に書き込む。   Next, in step S <b> 203, the image scaling unit 23 reads the input image data stored in the image memory 22, generates n (n ≧ 2) pieces of reduced image data, and writes the reduced image data in the image memory 22.

例えば、入力画像がVGA(横640画素、縦480画素)であるものとする。これを横320画素、縦240画素に縮小して1個目の縮小画像A1のデータを生成して画像メモリ22に書き込む。さらに、この縮小画像A1のデータを画像メモリ22から読み出して、横、縦ともに0.8倍した2個目の縮小画像A2のデータを生成して画像メモリ22に書き込む。以後、n個目の縮小画像Anのデータを生成するまで繰り返し縮小処理を行う。ここで、縮小画像データを生成する時の変倍倍率(入力画像から見た倍率)は一例である。またnの値は入力画像サイズ、検出パターンサイズ等の条件から変更するようにしてもよく、値を固定しておいてもよい。以後、縮小画像A1〜Anのデータを生成した変倍倍率をそれぞれ倍率A1〜Anとする。   For example, it is assumed that the input image is VGA (horizontal 640 pixels, vertical 480 pixels). This is reduced to 320 pixels horizontally and 240 pixels vertically to generate data of the first reduced image A1 and write it to the image memory 22. Further, the data of the reduced image A1 is read from the image memory 22, and the data of the second reduced image A2 that is multiplied by 0.8 both horizontally and vertically is generated and written to the image memory 22. Thereafter, the reduction process is repeatedly performed until data of the nth reduced image An is generated. Here, the scaling ratio (magnification viewed from the input image) when generating the reduced image data is an example. Further, the value of n may be changed based on conditions such as the input image size and the detection pattern size, or the value may be fixed. Hereinafter, the magnifications for generating the data of the reduced images A1 to An are referred to as magnifications A1 to An, respectively.

次に、ステップS204において、照合対象パターン抽出部24は、図6(a)に示すように縮小画像A1〜Anの上で所定サイズの矩形領域を矢印で示す方向に移動させながら、この矩形に含まれる部分(画素群)を照合対象パターンとして順次抽出する。そして、パターン検出部26に出力する。ここで所定サイズとは、例えば、検出パターンと同じサイズで図6に示しているが、縮小画像An以上のサイズで任意に定めることができる。なお、矢印で示されているような手順は一例であり、順次抽出する手順は同じである必要はない。   Next, in step S204, the verification target pattern extraction unit 24 moves the rectangular area of a predetermined size on the reduced images A1 to An in the direction indicated by the arrow as shown in FIG. The included portion (pixel group) is sequentially extracted as a verification target pattern. And it outputs to the pattern detection part 26. Here, the predetermined size is, for example, the same size as the detection pattern shown in FIG. 6, but can be arbitrarily determined with a size equal to or larger than the reduced image An. Note that the procedure as indicated by the arrows is an example, and the procedure of sequential extraction need not be the same.

さらに、パターン検出部26は、照合対象パターン抽出部24で抽出した照合対象パターンが所定のパターンに該当するかどうかについて、検出パターン記憶部25に記憶されている検出パターンとの照合を順次行う。以上のように通常検出モードでは、n個の縮小画像データを生成して照合を行う。   Further, the pattern detection unit 26 sequentially collates with the detection patterns stored in the detection pattern storage unit 25 as to whether or not the verification target pattern extracted by the verification target pattern extraction unit 24 corresponds to a predetermined pattern. As described above, in the normal detection mode, n pieces of reduced image data are generated and collated.

次に、ステップS205において、縮小画像A1〜Anにおける照合の結果、所定のパターンを検出したかどうかを判定する。この判定の結果、所定のパターンを検出しなかった場合は、ステップS201に戻り、ステップS201〜S204の処理を繰り返す。一方、ステップS205の判定の結果、所定のパターンを検出した場合は、ステップS206へ進む。   Next, in step S205, it is determined whether or not a predetermined pattern has been detected as a result of collation in the reduced images A1 to An. As a result of this determination, if a predetermined pattern is not detected, the process returns to step S201, and the processes of steps S201 to S204 are repeated. On the other hand, if a predetermined pattern is detected as a result of the determination in step S205, the process proceeds to step S206.

例えば、ステップS205において、パターン検出部26が6個目の縮小画像である縮小画像A6で所定のパターンを検出したものとする。この場合、ステップS206において、検出情報記憶部27は、入力画像から見た変倍倍率である縮小画像A6の倍率A6の情報をパターン検出部26から受け取って記憶する。そして、検出情報記憶部27に変倍倍率の情報が記憶されると、画像処理装置20は通常検出モードを終了し、高速検出モードに移行する。   For example, in step S205, the pattern detection unit 26 detects a predetermined pattern in the reduced image A6 that is the sixth reduced image. In this case, in step S206, the detection information storage unit 27 receives information from the pattern detection unit 26 and stores information on the magnification A6 of the reduced image A6, which is a magnification ratio seen from the input image. When the magnification information is stored in the detection information storage unit 27, the image processing apparatus 20 ends the normal detection mode and shifts to the high-speed detection mode.

図5(b)は、本実施形態において、高速検出モードにおける所定のパターンを検出する処理手順の一例を示すフローチャートである。
まず、ステップS207において、画像入力部21は次の最新フレームの画像データを撮像装置2から受信し、撮影パラメータ記憶部28はその画像データに関する撮影パラメータを受信する。次に、ステップS208において、ステップS202と同様に画像入力部21は受信した画像データを入力画像データとして画像メモリ22へ書き込む。さらに、撮影パラメータ記憶部28は1つ前のフレームの撮影パラメータに追加するように、最新フレームの撮影パラメータを記憶する。
FIG. 5B is a flowchart illustrating an example of a processing procedure for detecting a predetermined pattern in the high-speed detection mode in the present embodiment.
First, in step S207, the image input unit 21 receives image data of the next latest frame from the imaging device 2, and the imaging parameter storage unit 28 receives imaging parameters related to the image data. Next, in step S208, as in step S202, the image input unit 21 writes the received image data into the image memory 22 as input image data. Further, the shooting parameter storage unit 28 stores the shooting parameters of the latest frame so as to be added to the shooting parameters of the previous frame.

次に、ステップS209において、画像変倍部23は、画像メモリ22に記憶されている入力画像データを読み出し、m(n>m≧1)個の縮小画像データを生成して画像メモリ22に書き込む。縮小画像データを生成するための縮小倍率は、検出情報記憶部27に記憶している変倍倍率と、撮影パラメータ記憶部28に記憶している撮影パラメータ(撮像装置2のズーム倍率)とから決定する。なお、本実施形態では、所定のパターンを検出した縮小画像の変倍倍率が倍率A6であり、倍率A6の情報が検出情報記憶部27に記憶されているものとして説明する。   Next, in step S209, the image scaling unit 23 reads the input image data stored in the image memory 22, generates m (n> m ≧ 1) pieces of reduced image data, and writes the reduced image data in the image memory 22. . The reduction magnification for generating the reduced image data is determined from the scaling magnification stored in the detection information storage unit 27 and the imaging parameter (zoom magnification of the imaging device 2) stored in the imaging parameter storage unit 28. To do. In the present embodiment, it is assumed that the scaling factor of a reduced image in which a predetermined pattern is detected is the magnification A6, and information on the magnification A6 is stored in the detection information storage unit 27.

まず、一例として、m=1の時の動作を説明する。検出情報記憶部27に記憶している倍率A6が0.4倍、1つ前のフレームのズーム倍率が2倍、最新フレームのズーム倍率が5倍であるとする。この時、最新フレームの縮小画像生成用の変倍倍率A6´は下記の式で求める。
A6´=A6×(1つ前のフレームのズーム倍率)÷(最新フレームのズーム倍率)
=0.4×2÷5
=0.16[倍]
First, as an example, the operation when m = 1 will be described. Assume that the magnification A6 stored in the detection information storage unit 27 is 0.4 times, the zoom magnification of the previous frame is 2 times, and the zoom magnification of the latest frame is 5 times. At this time, the magnification A6 ′ for generating the reduced image of the latest frame is obtained by the following equation.
A6 ′ = A6 × (zoom magnification of the previous frame) ÷ (zoom magnification of the latest frame)
= 0.4 × 2 ÷ 5
= 0.16 [times]

画像変倍部23はこの倍率A6´で入力画像データから縮小画像B1(=縮小画像Bm)のデータを1個生成して画像メモリ22に書き込む。なお、画像変倍部23が固定倍しか処理できない構成である時は、倍率A6´とは異なるが、近い値を代用しても構わない。   The image scaling unit 23 generates one piece of reduced image B1 (= reduced image Bm) data from the input image data at this magnification A6 ′ and writes it into the image memory 22. When the image scaling unit 23 is configured to process only fixed magnification, a different value may be used instead of the magnification A6 ′.

次に、m=3である時の例について説明する。検出情報記憶部27に記憶している倍率A6が0.4倍、1つ前のフレームのズーム倍率が2倍、最新フレームのズーム倍率が5倍であるとする。まず、前述したm=1の時の例と同様の手順で倍率A6´を求める。そして、画像変倍部23は、この倍率A6´の1.25倍の変倍倍率で入力画像データから縮小画像B1のデータを生成して画像メモリ22に書き込む。次に、この縮小画像B1のデータを画像メモリ22から読み出し、横、縦ともに0.8倍した縮小画像B2のデータを生成して画像メモリ22に書き込む。この変倍倍率は倍率A6´と同じである。   Next, an example when m = 3 will be described. Assume that the magnification A6 stored in the detection information storage unit 27 is 0.4 times, the zoom magnification of the previous frame is 2 times, and the zoom magnification of the latest frame is 5 times. First, the magnification A6 ′ is obtained by the same procedure as in the above-described example when m = 1. Then, the image scaling unit 23 generates data of the reduced image B1 from the input image data at a scaling factor of 1.25 times the scaling factor A6 ′ and writes the data to the image memory 22. Next, the data of the reduced image B1 is read from the image memory 22, and the data of the reduced image B2 that is multiplied by 0.8 in both horizontal and vertical directions is generated and written to the image memory 22. This magnification is the same as the magnification A6 ′.

続いて、この縮小画像B2のデータを画像メモリ22から読み出し、横、縦ともに0.8倍した縮小画像B3(=縮小画像Bm)のデータを生成して画像メモリ22に書き込む。このようにm≠1の時は、検出情報記憶部27に記憶している変倍倍率と撮影パラメータ記憶部28に記憶している撮影パラメータとから決定した変倍倍率を中心にし、それに近い変倍倍率を使用してm個の縮小画像データを生成する。   Subsequently, the data of the reduced image B2 is read out from the image memory 22, and the data of the reduced image B3 (= reduced image Bm) that is multiplied by 0.8 in both horizontal and vertical directions is generated and written into the image memory 22. As described above, when m ≠ 1, the zoom magnification determined from the zoom magnification stored in the detection information storage unit 27 and the shooting parameter stored in the shooting parameter storage unit 28 is used as a center, and a zoom factor close to that is determined. The m reduced image data are generated using the magnification.

次に、ステップS210において、照合対象パターン抽出部24は、図6(b)に示すように、縮小画像B1〜Bmの上で所定サイズの矩形領域を矢印で示す方向に移動させながら、この矩形に含まれる部分(画素群)を照合対象パターンとして順次抽出する。そして、パターン検出部26に出力する。パターン検出部26は、照合対象パターン抽出部24で抽出した照合対象パターンが所定のパターンに該当するかどうかについて、検出パターン記憶部25に記憶されている検出パターンとの照合を順次行う。縮小画像データの数がn個より少数のm個である点で、前述のステップS204の処理とは異なっている。以上のように高速検出モードでは、m個の縮小画像データを生成して照合を行う。   Next, in step S210, the verification target pattern extraction unit 24 moves the rectangular area of a predetermined size on the reduced images B1 to Bm in the direction indicated by the arrow as shown in FIG. 6B. Are sequentially extracted as a pattern to be collated. And it outputs to the pattern detection part 26. The pattern detection unit 26 sequentially collates with the detection patterns stored in the detection pattern storage unit 25 as to whether the verification target pattern extracted by the verification target pattern extraction unit 24 corresponds to a predetermined pattern. This is different from the processing in step S204 described above in that the number of reduced image data is m, which is smaller than n. As described above, in the high-speed detection mode, m pieces of reduced image data are generated and collated.

次に、ステップS211において、縮小画像B1〜Bmにおける照合の結果、所定のパターンを検出したかどうかを判定する。この判定の結果、所定のパターンを検出しなかった場合は、そのまま高速検出モードを終了する。そして、検出情報記憶部27は、記憶している倍率A6の情報を消去して、画像処理装置20は通常検出モードを開始する。一方、ステップS211の判定の結果、所定のパターンを検出した場合は、ステップS212へ進む。   Next, in step S211, it is determined whether or not a predetermined pattern has been detected as a result of collation in the reduced images B1 to Bm. As a result of this determination, if the predetermined pattern is not detected, the high-speed detection mode is terminated as it is. Then, the detection information storage unit 27 deletes the stored information of the magnification A6, and the image processing apparatus 20 starts the normal detection mode. On the other hand, if a predetermined pattern is detected as a result of the determination in step S211, the process proceeds to step S212.

例えば、ステップS211において、パターン検出部26がm=3で、3個目の縮小画像である縮小画像B3(=縮小画像Bm)で所定のパターンを検出したものとする。この場合、ステップS212において、検出情報記憶部27は記憶している倍率A6の情報を消去して、縮小画像B3の入力画像から見た変倍倍率である倍率B3の情報をパターン検出部26から受け取って新規に記憶する。そして、前述した手順と同様にステップS207〜S211の処理を実行する。   For example, in step S211, it is assumed that the pattern detection unit 26 detects a predetermined pattern in the reduced image B3 (= reduced image Bm) that is the third reduced image when m = 3. In this case, in step S212, the detection information storage unit 27 deletes the stored information on the magnification A6, and the information on the magnification B3, which is the magnification ratio viewed from the input image of the reduced image B3, is obtained from the pattern detection unit 26. Receive and store new. And the process of step S207-S211 is performed similarly to the procedure mentioned above.

本実施形態では、撮影パラメータ記憶部28に2つの撮影パラメータを記憶するものとして説明したが、両撮影パラメータ間の変化量を記憶するようにしてもよい。例えば、1つ前のフレーム及び最新フレームのズーム倍率がそれぞれ2倍と5倍とである時、その変化分である2.5倍という値を記憶するようにしてもよい。その場合は、最新フレームの縮小画像生成用の変倍倍率は(記憶している変倍倍率)÷(変化分)という計算式で求めることができる。   Although the present embodiment has been described on the assumption that two shooting parameters are stored in the shooting parameter storage unit 28, the amount of change between the two shooting parameters may be stored. For example, when the zoom magnifications of the previous frame and the latest frame are 2 times and 5 times, respectively, a value of 2.5 times that is the change may be stored. In that case, the scaling factor for generating the reduced image of the latest frame can be obtained by a calculation formula of (stored scaling factor) / (change).

なお、パターン検出部26が既知の輝度補正処理、濃度補正処理や背景除去処理機能を有し、照合対象パターンに対してこれらの処理を行い、パターン検出部26による照合の精度をさらに高めるようにしてもよい。また、既知の輝度補正処理、濃度補正処理や背景除去処理を有する画像処理部を別途備えるようにして、入力画像又は縮小画像に対してこれらの処理を行い、パターン検出部26による照合の精度をさらに高めるようにしてもよい。   Note that the pattern detection unit 26 has known luminance correction processing, density correction processing, and background removal processing functions, and performs these processing on the pattern to be verified to further increase the accuracy of verification by the pattern detection unit 26. May be. In addition, an image processing unit having a known luminance correction process, density correction process, and background removal process is separately provided, and these processes are performed on the input image or the reduced image, so that the accuracy of matching by the pattern detection unit 26 is improved. You may make it raise further.

また、パターン検出部26による照合において、画像の輝度成分のみを使用する構成にしてもよい。この場合、画像変倍部23は、輝度成分のみを抽出して輝度成分のみの縮小画像データを生成するようにしてもよい。   Further, in the collation performed by the pattern detection unit 26, only the luminance component of the image may be used. In this case, the image scaling unit 23 may extract only the luminance component and generate reduced image data of only the luminance component.

以上のように本実施形態においては、検出情報記憶部27に記憶している変倍倍率が存在しない時は、入力画像上における所定の被写体の大きさが不明な条件下で所定のパターンを検出するために十分なn(n≧2)個の縮小画像を使用する。   As described above, in the present embodiment, when there is no scaling factor stored in the detection information storage unit 27, a predetermined pattern is detected under a condition in which the size of a predetermined subject on the input image is unknown. Sufficient n (n ≧ 2) reduced images are used.

ここで、検出情報記憶部27に記憶している変倍倍率が存在しない時とは、最初のフレームを画像入力部21が受信した時を含むこととする。一方で、検出情報記憶部27に記憶している変倍倍率が存在する時は、入力画像上における所定の被写体の大きさが既に判明していることを利用して、所定のパターンを検出するためにm(n>m≧1)個の縮小画像を使用する。   Here, the time when the magnification ratio stored in the detection information storage unit 27 does not exist includes the time when the image input unit 21 receives the first frame. On the other hand, when the scaling magnification stored in the detection information storage unit 27 exists, a predetermined pattern is detected by using the fact that the size of the predetermined subject on the input image is already known. Therefore, m (n> m ≧ 1) reduced images are used.

この時、検出情報記憶部27に記憶している変倍倍率と撮影パラメータ記憶部28に記憶している撮影パラメータ(ズーム倍率)とから縮小画像データを生成するための変倍倍率を限定する。そのため、撮像装置2のズーム動作によって入力画像における被写体の大きさが変化した場合においても、生成する縮小画像データを少なくするとともに、所定のパターンを検出することができる。さらに、変倍処理数及び照合回数の減少によって演算処理負荷を軽減して、所定の被写体の検出を高速化することができる。   At this time, the scaling magnification for generating the reduced image data is limited from the scaling magnification stored in the detection information storage unit 27 and the imaging parameter (zoom magnification) stored in the imaging parameter storage unit 28. Therefore, even when the size of the subject in the input image changes due to the zoom operation of the imaging device 2, it is possible to reduce the generated reduced image data and detect a predetermined pattern. Further, the calculation processing load can be reduced by reducing the number of scaling processes and the number of collations, and the detection of a predetermined subject can be speeded up.

また、変倍処理数を減少させてもm>1にすることによって、所定の被写体と撮像装置との距離の変化によって入力画像における大きさが変化した場合においても、検出精度を維持することできる。また、本実施形態の画像処理装置20と撮像装置2とが汎用的なネットワーク回線や専用ケーブルなどが使用して接続される構成で説明したが、画像処理装置20と撮像装置2とを一体に構成しても、本発明の効果を得ることができるのは言うまでもない。   Further, even if the scaling processing number is reduced, by setting m> 1, detection accuracy can be maintained even when the size of the input image changes due to a change in the distance between the predetermined subject and the imaging device. . In addition, the image processing apparatus 20 and the imaging apparatus 2 according to the present embodiment have been described as being connected using a general-purpose network line or a dedicated cable. However, the image processing apparatus 20 and the imaging apparatus 2 are integrated. Needless to say, the effects of the present invention can be obtained even if configured.

(第3の実施形態)
以下、本実施形態について説明する。図7は、本実施形態の画像処理装置30の構成例を示すブロック図である。まず、本実施形態の画像処理装置30の構成について説明する。
図7において、画像入力部31は、外部の撮像装置2から画像データを受信するためのものである。また、画像入力部31は、特定の通信方式に準拠したマーカーコード付きのプロトコルに適合させた画像データや、JPEG/MPEG4等の圧縮処理された画像データを受信する必要がある場合を想定し、デコード処理機能を有している。
(Third embodiment)
Hereinafter, this embodiment will be described. FIG. 7 is a block diagram illustrating a configuration example of the image processing apparatus 30 according to the present embodiment. First, the configuration of the image processing apparatus 30 of the present embodiment will be described.
In FIG. 7, an image input unit 31 is for receiving image data from the external imaging device 2. Further, the image input unit 31 assumes a case where it is necessary to receive image data adapted to a protocol with a marker code compliant with a specific communication method, or compressed image data such as JPEG / MPEG4. It has a decoding processing function.

撮像装置2は、撮影画角を変更可能なズームレンズを通して入射される光をCCD、CMOS等で光電変換してデジタルデータで構成される撮影画像データを生成する汎用のカメラである。撮像装置2は撮影画像データと共に少なくともズーム倍率を含む撮影パラメータを画像処理装置30に対して出力する。そして、撮影パラメータ記憶部38は、撮像装置2から出力された撮影パラメータを受信してパラメータ情報として記憶する。撮像装置2と画像処理装置30との間のデータ送受信には、Local Area Network(LAN)のような汎用的なネットワーク回線や専用ケーブルなどが使用される。   The imaging device 2 is a general-purpose camera that generates photographed image data composed of digital data by photoelectrically converting light incident through a zoom lens capable of changing a photographing field angle using a CCD, a CMOS, or the like. The imaging device 2 outputs to the image processing device 30 imaging parameters including at least the zoom magnification together with the captured image data. The shooting parameter storage unit 38 receives the shooting parameters output from the imaging device 2 and stores them as parameter information. For data transmission / reception between the imaging device 2 and the image processing device 30, a general-purpose network line such as a local area network (LAN), a dedicated cable, or the like is used.

画像メモリ32は、RAMなどの読み書き可能な記憶装置で構成されており、画像入力部31で受信した画像データや画像変倍部33で変倍処理した画像データを記憶する。画像変倍部33は、画像メモリ32に記憶された画像データを読み出し、縮小画像データ(変倍画像データ)を生成して画像メモリ32に書き込む。   The image memory 32 is configured by a readable / writable storage device such as a RAM, and stores the image data received by the image input unit 31 and the image data subjected to the scaling process by the image scaling unit 33. The image scaling unit 33 reads the image data stored in the image memory 32, generates reduced image data (magnified image data), and writes the reduced image data in the image memory 32.

照合対象パターン抽出部34は、画像メモリ32に記憶された縮小画像データ上で所定サイズの矩形領域を移動させながら、この矩形に含まれる部分(画素群)を照合対象パターンとして順次抽出して出力する。なお、オリジナル画像も1/1の縮小画像と解釈し、縮小画像に含むことができるものとする。   The matching target pattern extraction unit 34 sequentially extracts and outputs a portion (pixel group) included in the rectangle as a matching target pattern while moving a rectangular area of a predetermined size on the reduced image data stored in the image memory 32. To do. Note that the original image is also interpreted as a 1/1 reduced image and can be included in the reduced image.

検出パターン記憶部35は、入力画像から検出したい所定のパターン(対象物)を検出パターンとして予め記憶しておくためのものである。パターン検出部36は、照合対象パターンが所定のパターンに該当するかどうかについて、検出パターン記憶部35に記憶されている検出パターンとの照合を行う。検出情報記憶部37は、パターン検出部36によって所定のパターンが検出された時に使用された縮小画像の変倍倍率の倍率情報と照合対象パターンの位置情報とをパターン検出部36から受け取って記憶する。さらに、検出情報記憶部37は、照合対象パターンの位置情報を撮像装置2に送信する。   The detection pattern storage unit 35 is for storing in advance a predetermined pattern (object) to be detected from the input image as a detection pattern. The pattern detection unit 36 performs collation with the detection pattern stored in the detection pattern storage unit 35 as to whether or not the collation target pattern corresponds to a predetermined pattern. The detection information storage unit 37 receives from the pattern detection unit 36 and stores the magnification information of the scaling factor of the reduced image and the position information of the verification target pattern that are used when the predetermined pattern is detected by the pattern detection unit 36. . Further, the detection information storage unit 37 transmits the position information of the verification target pattern to the imaging device 2.

次に、図7に示した各部の動作によってなされる処理について、図8のフローチャートを参照しながら説明する。画像処理装置30は、所定のパターンの検出において通常検出モードと高速検出モードとの2種類の検出モードを有する。そこで、最初は、画像処理装置30は通常検出モードで動作するものとする。   Next, processing performed by the operation of each unit shown in FIG. 7 will be described with reference to the flowchart of FIG. The image processing apparatus 30 has two types of detection modes, a normal detection mode and a high-speed detection mode, for detecting a predetermined pattern. Therefore, initially, the image processing apparatus 30 is assumed to operate in the normal detection mode.

図8(a)は、本実施形態において、通常検出モードにおける所定のパターンを検出する処理手順の一例を示すフローチャートである。
処理を開始すると、まず、ステップS301において、画像入力部31は画像データを撮像装置2から受信し、撮影パラメータ記憶部38はその画像データに関する撮影パラメータを受信する。
FIG. 8A is a flowchart illustrating an example of a processing procedure for detecting a predetermined pattern in the normal detection mode in the present embodiment.
When the processing is started, first, in step S301, the image input unit 31 receives image data from the imaging apparatus 2, and the imaging parameter storage unit 38 receives imaging parameters relating to the image data.

次に、ステップS302において、画像入力部31は、入力画像データを画像メモリ32へ書き込む。この時、特定の通信方式に準拠したマーカーコード付きのプロトコルに適合させた画像データを受信した場合には、画像入力部31はマーカーコードを除去するなどのデコード処理をして、この処理結果を入力画像として画像メモリ32へ書き込む。また、JPEG/MPEG4等の圧縮処理された画像データを受信した場合も、受信した画像データに対して伸長処理等のデコード処理をして、この処理結果を入力画像データとして画像メモリ32へ書き込む。デコード処理が不要な場合は、受信した画像データを入力画像データとして画像メモリ32へ書き込む。また、撮影パラメータ記憶部38は受信した撮影パラメータを記憶する。   Next, in step S <b> 302, the image input unit 31 writes the input image data into the image memory 32. At this time, when image data adapted to a protocol with a marker code conforming to a specific communication method is received, the image input unit 31 performs a decoding process such as removing the marker code, and the processing result is Write to the image memory 32 as an input image. Also, when image data that has been subjected to compression processing such as JPEG / MPEG4 is received, the received image data is subjected to decoding processing such as decompression processing, and the processing result is written in the image memory 32 as input image data. When the decoding process is unnecessary, the received image data is written into the image memory 32 as input image data. The shooting parameter storage unit 38 stores the received shooting parameters.

次に、ステップS303において、画像変倍部33は、画像メモリ32に記憶されている入力画像データを読み出し、n(n≧2)個の縮小画像データを生成して画像メモリ32に書き込む。   Next, in step S <b> 303, the image scaling unit 33 reads the input image data stored in the image memory 32, generates n (n ≧ 2) pieces of reduced image data, and writes the reduced image data in the image memory 32.

例えば、入力画像がVGA(横640画素、縦480画素)であるものとする。これを横320画素、縦240画素に縮小して1個目の縮小画像A1のデータを生成して画像メモリ32に書き込む。さらに、この縮小画像A1のデータを画像メモリ32から読み出して、横、縦ともに0.8倍した2個目の縮小画像A2のデータを生成して画像メモリ32に書き込む。以後n個目の縮小画像Anのデータを生成するまで繰り返し縮小処理を行う。ここで、縮小画像データを生成する時の変倍倍率(入力画像から見た倍率)は一例である。また、nの値は入力画像サイズ、検出パターンサイズ等の条件から変更するようにしてもよく、値を固定しておいてもよい。以後、縮小画像A1〜Anのデータを生成した変倍倍率をそれぞれ倍率A1〜Anとする。   For example, it is assumed that the input image is VGA (horizontal 640 pixels, vertical 480 pixels). This is reduced to 320 pixels horizontally and 240 pixels vertically to generate data of the first reduced image A1 and write it to the image memory 32. Further, the data of the reduced image A1 is read from the image memory 32, the data of the second reduced image A2 multiplied by 0.8 both horizontally and vertically is generated and written into the image memory 32. Thereafter, the reduction process is repeatedly performed until data of the nth reduced image An is generated. Here, the scaling ratio (magnification viewed from the input image) when generating the reduced image data is an example. The value of n may be changed based on conditions such as the input image size and the detection pattern size, or the value may be fixed. Hereinafter, the magnifications for generating the data of the reduced images A1 to An are referred to as magnifications A1 to An, respectively.

次に、ステップS304において、照合対象パターン抽出部34は、図6(a)に示すように、縮小画像A1〜Anの上で所定サイズの矩形領域を矢印で示す方向に移動させながら、この矩形に含まれる部分(画素群)を照合対象パターンとして順次抽出する。そして、パターン検出部36に出力する。ここで所定サイズとは、例えば、検出パターンと同じサイズで図6に示しているが、縮小画像An以上のサイズで任意に定めることができる。なお、矢印で示されているような手順は一例であり、順次抽出する手順は同じである必要はない。   Next, in step S304, as shown in FIG. 6A, the verification target pattern extraction unit 34 moves the rectangular area of a predetermined size on the reduced images A1 to An in the direction indicated by the arrow. Are sequentially extracted as a pattern to be collated. And it outputs to the pattern detection part 36. Here, the predetermined size is, for example, the same size as the detection pattern shown in FIG. 6, but can be arbitrarily determined with a size equal to or larger than the reduced image An. Note that the procedure as indicated by the arrows is an example, and the procedure of sequential extraction need not be the same.

さらに、パターン検出部36は、照合対象パターン抽出部34で抽出した照合対象パターンが所定のパターンに該当するかどうかについて、検出パターン記憶部35に記憶されている検出パターンとの照合を順次行う。以上のように通常検出モードでは、n個の縮小画像データを生成して照合を行う。   Further, the pattern detection unit 36 sequentially collates with the detection patterns stored in the detection pattern storage unit 35 as to whether or not the verification target pattern extracted by the verification target pattern extraction unit 34 corresponds to a predetermined pattern. As described above, in the normal detection mode, n pieces of reduced image data are generated and collated.

次に、ステップS305において、縮小画像A1〜Anにおける照合の結果、所定のパターンを検出したかどうかを判定する。この判定の結果、所定のパターンを検出しなかった場合は、ステップS301に戻り、ステップS301〜S304の処理を繰り返す。一方、ステップS305の判定の結果、所定のパターンを検出した場合は、ステップS306へ進む。   Next, in step S305, it is determined whether or not a predetermined pattern has been detected as a result of collation in the reduced images A1 to An. If the predetermined pattern is not detected as a result of this determination, the process returns to step S301 and the processes of steps S301 to S304 are repeated. On the other hand, if a predetermined pattern is detected as a result of the determination in step S305, the process proceeds to step S306.

例えば、ステップS305において、パターン検出部36が6個目の縮小画像である縮小画像A6で所定のパターンを検出したものとする。この場合、ステップS306において、検出情報記憶部37は、入力画像から見た変倍倍率である縮小画像A6の倍率A6と照合対象パターンの位置との情報をパターン検出部36から受け取って記憶する。   For example, in step S305, it is assumed that the pattern detection unit 36 detects a predetermined pattern in the reduced image A6 that is the sixth reduced image. In this case, in step S306, the detection information storage unit 37 receives information from the pattern detection unit 36 and stores information on the magnification A6 of the reduced image A6, which is the magnification ratio viewed from the input image, and the position of the verification target pattern.

次に、ステップS307において、検出情報記憶部37は、縮小画像A6における照合対象パターンの位置と倍率A6とから、入力画像における所定のパターンの位置を算出して、算出結果を検出情報として撮像装置2へ送信する。そして、検出情報記憶部37に変倍倍率の情報が記憶され、検出情報が撮像装置2へ送信されると、画像処理装置30は通常検出モードを終了し、高速検出モードに移行する。   Next, in step S307, the detection information storage unit 37 calculates the position of a predetermined pattern in the input image from the position of the matching target pattern in the reduced image A6 and the magnification A6, and uses the calculation result as detection information. 2 to send. When the magnification information is stored in the detection information storage unit 37 and the detection information is transmitted to the imaging apparatus 2, the image processing apparatus 30 ends the normal detection mode and shifts to the high-speed detection mode.

図8(b)は、本実施形態において、高速検出モードにおける所定のパターンを検出する処理手順の一例を示すフローチャートである。
まず、ステップS308において、画像入力部31は次の最新フレームの画像データを撮像装置2から受信し、撮影パラメータ記憶部38はその画像データに関する撮影パラメータを受信する。次に、ステップS309において、ステップS302と同様に画像入力部31は受信した画像データを入力画像データとして画像メモリ32へ書き込む。さらに、撮影パラメータ記憶部38は1つ前のフレームの撮影パラメータに追加するように、最新フレームの撮影パラメータを記憶する。
FIG. 8B is a flowchart illustrating an example of a processing procedure for detecting a predetermined pattern in the high-speed detection mode in the present embodiment.
First, in step S308, the image input unit 31 receives image data of the next latest frame from the imaging device 2, and the imaging parameter storage unit 38 receives imaging parameters related to the image data. Next, in step S309, as in step S302, the image input unit 31 writes the received image data into the image memory 32 as input image data. Further, the shooting parameter storage unit 38 stores the shooting parameters of the latest frame so as to be added to the shooting parameters of the previous frame.

次に、ステップS310において、画像変倍部33は、画像メモリ32に記憶されている入力画像データを読み出し、m(n>m≧1)個の縮小画像データを生成して画像メモリ32に書き込む。縮小画像データを生成するための縮小倍率は、検出情報記憶部37に記憶している変倍倍率と、撮影パラメータ記憶部38に記憶している撮影パラメータ(撮像装置2のズーム倍率)とから決定する。なお、本実施形態では、所定のパターンを検出した縮小画像の変倍倍率が倍率A6であり、倍率A6の情報が検出情報記憶部37に記憶されているものとして説明する。   Next, in step S <b> 310, the image scaling unit 33 reads the input image data stored in the image memory 32, generates m (n> m ≧ 1) pieces of reduced image data, and writes the reduced image data in the image memory 32. . The reduction magnification for generating the reduced image data is determined from the scaling magnification stored in the detection information storage unit 37 and the imaging parameters (zoom magnification of the imaging device 2) stored in the imaging parameter storage unit 38. To do. In the present embodiment, it is assumed that the scaling factor of the reduced image in which the predetermined pattern is detected is the magnification A6, and information on the magnification A6 is stored in the detection information storage unit 37.

まず、一例としてm=1の時の動作を説明する。検出情報記憶部37に記憶している倍率A6が0.4倍、1つ前のフレームのズーム倍率が2倍、最新フレームのズーム倍率が5倍であるとする。この時、最新フレームの縮小画像生成用の変倍倍率A6´は下記の式で求める。
A6´=A6×(1つ前のフレームのズーム倍率)÷(最新フレームのズーム倍率)
=0.4×2÷5
=0.16[倍]
First, the operation when m = 1 will be described as an example. Assume that the magnification A6 stored in the detection information storage unit 37 is 0.4 times, the zoom magnification of the previous frame is 2 times, and the zoom magnification of the latest frame is 5 times. At this time, the magnification A6 ′ for generating the reduced image of the latest frame is obtained by the following equation.
A6 ′ = A6 × (zoom magnification of the previous frame) ÷ (zoom magnification of the latest frame)
= 0.4 × 2 ÷ 5
= 0.16 [times]

画像変倍部33はこの倍率A6´で入力画像データから縮小画像B1(=縮小画像Bm)のデータを1個生成して画像メモリ32に書き込む。なお、画像変倍部33が固定倍しか処理できない構成である時は、倍率A6´とは異なるが、近い値を代用しても構わない。   The image scaling unit 33 generates one piece of reduced image B1 (= reduced image Bm) from the input image data at this magnification A6 ′ and writes it into the image memory 32. Note that when the image scaling unit 33 is configured to process only a fixed magnification, a different value may be used instead of the magnification A6 ′.

次に、m=3である時の例について説明する。検出情報記憶部37に記憶している倍率A6が0.4倍、1つ前のフレームのズーム倍率が2倍、最新フレームのズーム倍率が5倍であるとする。まず、前述したm=1の時の例と同様の手順で倍率A6´を求める。そして、画像変倍部33は、この倍率A6´の1.25倍の変倍倍率で入力画像データから縮小画像B1のデータを生成して画像メモリ32に書き込む。次に、この縮小画像B1のデータを画像メモリ32から読み出し、横、縦ともに0.8倍して縮小画像B2のデータを生成して画像メモリ32に書き込む。この変倍倍率は倍率A6´と同じである。   Next, an example when m = 3 will be described. Assume that the magnification A6 stored in the detection information storage unit 37 is 0.4 times, the zoom magnification of the previous frame is 2 times, and the zoom magnification of the latest frame is 5 times. First, the magnification A6 ′ is obtained by the same procedure as in the above-described example when m = 1. Then, the image scaling unit 33 generates data of the reduced image B1 from the input image data at a scaling factor of 1.25 times the scaling factor A6 ′, and writes it into the image memory 32. Next, the data of the reduced image B1 is read from the image memory 32, and the data of the reduced image B2 is generated by multiplying the horizontal and vertical values by 0.8, and written into the image memory 32. This magnification is the same as the magnification A6 ′.

続いて、この縮小画像B2のデータを画像メモリ32から読み出し、横、縦ともに0.8倍した縮小画像B3(=縮小画像Bm)のデータを生成して画像メモリ32に書き込む。このようにm≠1の時は、検出情報記憶部37に記憶している変倍倍率と撮影パラメータ記憶部38に記憶している撮影パラメータとから決定した変倍倍率を中心にし、それに近い変倍倍率を使用してm個の縮小画像データを生成する。   Subsequently, the data of the reduced image B2 is read from the image memory 32, and the data of the reduced image B3 (= reduced image Bm) obtained by multiplying both horizontal and vertical by 0.8 is generated and written into the image memory 32. As described above, when m ≠ 1, the zoom magnification determined from the zoom magnification stored in the detection information storage unit 37 and the shooting parameter stored in the shooting parameter storage unit 38 is used as a center, and a zoom factor close to that is determined. The m reduced image data are generated using the magnification.

次に、ステップS311において、照合対象パターン抽出部34は、図6(b)に示すように、縮小画像B1〜Bmの上で所定サイズの矩形領域を矢印で示す方向に移動させながら、この矩形に含まれる部分(画素群)を照合対象パターンとして順次抽出する。そして、パターン検出部36に出力する。パターン検出部36は、照合対象パターン抽出部34が抽出した照合対象パターンが検出パターン記憶部35に記憶されている検出パターンに該当するかどうかについて、順次照合を行う。縮小画像データの数がn個より少数のm個である点で、前述のステップS304の処理とは異なっている。以上のように高速検出モードでは、m個の縮小画像データを生成して照合を行う。   Next, in step S311, the verification target pattern extraction unit 34 moves the rectangular area of a predetermined size on the reduced images B1 to Bm in the direction indicated by the arrow as shown in FIG. Are sequentially extracted as a pattern to be collated. And it outputs to the pattern detection part 36. The pattern detection unit 36 sequentially performs collation as to whether the collation target pattern extracted by the collation target pattern extraction unit 34 corresponds to the detection pattern stored in the detection pattern storage unit 35. This is different from the processing in step S304 described above in that the number of reduced image data is m, which is smaller than n. As described above, in the high-speed detection mode, m pieces of reduced image data are generated and collated.

次に、ステップS312において、縮小画像B1〜Bmにおける照合の結果、所定のパターンを検出したかどうかを判定する。この判定の結果、所定のパターンを検出しなかった場合は、そのまま高速検出モードを終了する。そして、検出情報記憶部37は、記憶している倍率A6の情報を消去して、画像処理装置30は通常検出モードを開始する。一方、ステップS312の判定の結果、所定のパターンを検出した場合は、ステップS313へ進む。   Next, in step S312, it is determined whether or not a predetermined pattern has been detected as a result of collation in the reduced images B1 to Bm. As a result of this determination, if the predetermined pattern is not detected, the high-speed detection mode is terminated as it is. Then, the detection information storage unit 37 deletes the stored information of the magnification A6, and the image processing apparatus 30 starts the normal detection mode. On the other hand, if a predetermined pattern is detected as a result of the determination in step S312, the process proceeds to step S313.

例えば、ステップS312において、パターン検出部36がm=3で、3個目の縮小画像である縮小画像B3(=縮小画像Bm)で所定のパターンを検出したものとする。この場合、ステップS313において、検出情報記憶部37は記憶している倍率A6と照合対象パターンの位置との情報を消去する。そして、縮小画像B3の入力画像から見た変倍倍率である倍率B3と照合対象パターンの位置との情報をパターン検出部36から受け取って新規に記憶する。   For example, in step S312, it is assumed that the pattern detection unit 36 detects a predetermined pattern in the reduced image B3 (= reduced image Bm) which is the third reduced image when m = 3. In this case, in step S313, the detection information storage unit 37 deletes the stored information on the magnification A6 and the position of the pattern to be verified. Then, information on the magnification B3, which is a magnification ratio seen from the input image of the reduced image B3, and the position of the pattern to be collated is received from the pattern detection unit 36 and newly stored.

次に、ステップS314において、検出情報記憶部37は、縮小画像B3における照合対象パターンの位置と倍率B3とから、入力画像における所定のパターンの位置を算出して、算出結果を検出情報として撮像装置2へ送信する。そして、ステップS308に戻り、前述した手順と同様にステップS308〜S312の処理を実行する。   Next, in step S314, the detection information storage unit 37 calculates the position of a predetermined pattern in the input image from the position of the matching target pattern in the reduced image B3 and the magnification B3, and uses the calculation result as detection information. 2 to send. And it returns to step S308 and performs the process of step S308-S312 similarly to the procedure mentioned above.

本実施形態では、撮影パラメータ記憶部38に2つの撮影パラメータを記憶するものとして説明したが、両撮影パラメータ間の変化量を記憶するようにしてもよい。例えば、1つ前のフレーム及び最新フレームのズーム倍率がそれぞれ2倍と5倍とである時、その変化分である2.5倍という値を記憶するようにしてもよい。その場合は、最新フレームの縮小画像生成用の変倍倍率は(記憶している変倍倍率)÷(変化分)という計算式で求めることができる。   Although the present embodiment has been described on the assumption that two shooting parameters are stored in the shooting parameter storage unit 38, the amount of change between both shooting parameters may be stored. For example, when the zoom magnifications of the previous frame and the latest frame are 2 times and 5 times, respectively, a value of 2.5 times that is the change may be stored. In that case, the scaling factor for generating the reduced image of the latest frame can be obtained by a calculation formula of (stored scaling factor) / (change).

なお、パターン検出部36が既知の輝度補正処理、濃度補正処理や背景除去処理機能を有し、照合対象パターンに対してこれらの処理を行い、パターン検出部36による照合の精度をさらに高めるようにしてもよい。また、既知の輝度補正処理、濃度補正処理や背景除去処理を有する画像処理部を別途備えるようにして、入力画像又は縮小画像に対してこれらの処理を行い、パターン検出部36による照合の精度をさらに高めるようにしてもよい。   Note that the pattern detection unit 36 has known brightness correction processing, density correction processing, and background removal processing functions, and performs these processing on the pattern to be verified to further increase the accuracy of verification by the pattern detection unit 36. May be. In addition, an image processing unit having a known luminance correction process, density correction process, and background removal process is separately provided, and these processes are performed on the input image or the reduced image, so that the accuracy of matching by the pattern detection unit 36 is improved. You may make it raise further.

また、パターン検出部36による照合において、画像の輝度成分のみを使用する構成にしてもよい。この場合、画像変倍部33は、輝度成分のみを抽出して輝度成分のみの縮小画像データを生成するようにしてもよい。   Further, in the collation performed by the pattern detection unit 36, only the luminance component of the image may be used. In this case, the image scaling unit 33 may extract only the luminance component and generate reduced image data of only the luminance component.

以上のように、検出情報記憶部37に記憶している変倍倍率が存在しない時は、入力画像上における所定の被写体の大きさが不明な条件下で、検出パターン記憶部35に記憶されている検出パターンを検出するために十分なn(n≧2)個の縮小画像を使用する。   As described above, when the magnification ratio stored in the detection information storage unit 37 does not exist, it is stored in the detection pattern storage unit 35 under the condition that the size of the predetermined subject on the input image is unknown. Sufficient n (n ≧ 2) reduced images are used to detect the detected pattern.

ここで、検出情報記憶部37に記憶している変倍倍率が存在しない時とは、最初のフレームを画像入力部31が受信した時を含むこととする。一方で、検出情報記憶部37に記憶している変倍倍率が存在する時は、入力画像上における所定の被写体の大きさが既に判明していることを利用して、検出パターンを検出するためにm(n>m≧1)個の縮小画像を使用する。   Here, the case where the magnification ratio stored in the detection information storage unit 37 does not exist includes the time when the image input unit 31 receives the first frame. On the other hand, when the scaling factor stored in the detection information storage unit 37 exists, the detection pattern is detected by using the fact that the size of the predetermined subject on the input image has already been determined. M (n> m ≧ 1) reduced images are used.

この時、検出情報記憶部37に記憶している変倍倍率と撮影パラメータ記憶部38に記憶している撮影パラメータ(ズーム倍率)とから縮小画像データを生成するための変倍倍率を限定する。そのため、撮像装置2のズーム動作によって入力画像における被写体の大きさが変化した場合においても、生成する縮小画像データを少なくするとともに、検出パターンを検出することができる。さらに、変倍処理数及び照合回数の減少によって演算処理負荷を軽減して、所定の被写体の検出を高速化することができる。   At this time, the scaling magnification for generating the reduced image data is limited from the scaling magnification stored in the detection information storage unit 37 and the imaging parameter (zoom magnification) stored in the imaging parameter storage unit 38. Therefore, even when the size of the subject in the input image changes due to the zoom operation of the imaging device 2, it is possible to reduce the generated reduced image data and to detect the detection pattern. Further, the calculation processing load can be reduced by reducing the number of scaling processes and the number of collations, and the detection of a predetermined subject can be speeded up.

また、変倍処理数を減少させてもm>1にすることによって、所定の被写体と撮像装置との距離の変化によって入力画像における大きさが変化した場合においても、検出精度を維持することできる。   Further, even if the scaling processing number is reduced, by setting m> 1, detection accuracy can be maintained even when the size of the input image changes due to a change in the distance between the predetermined subject and the imaging device. .

また、所定の被写体を検出して撮像装置2へ入力画像(撮影画像)における所定のパターンの位置の情報を検出情報として送信することによって、撮像装置2による所定の被写体の追尾動作を可能にする。ここで、追尾動作とは、パン機構、チルト機構、ズーム機構、画像切り出し処理等の撮像装置2が有する機能を使用して所定パターンを撮影画像内に捕らえ続けることである。   In addition, by detecting a predetermined subject and transmitting information on the position of a predetermined pattern in the input image (captured image) as detection information to the imaging device 2, the imaging device 2 can perform a tracking operation of the predetermined subject. . Here, the tracking operation is to continue capturing a predetermined pattern in a captured image using functions of the imaging apparatus 2 such as a pan mechanism, a tilt mechanism, a zoom mechanism, and an image cutout process.

追尾動作時、所定の被写体をズームアップすると画角が狭くなり、通常検出モードのままでは、検出に多くの時間がかかって所定の被写体がフレームアウトしてしまう可能性がある。しかしながら、最初に所定のパターンを検出した後で追尾を行うため、既に高速検出モードで所定パターンの検出を行って検出情報を送信して、撮像装置2は所定パターンを撮影画像内に捕らえ続けることができる。   When the predetermined subject is zoomed up during the tracking operation, the angle of view becomes narrow, and in the normal detection mode, the detection may take a long time and the predetermined subject may be out of frame. However, since the tracking is performed after the predetermined pattern is first detected, the predetermined pattern is already detected in the high-speed detection mode and the detection information is transmitted, and the imaging device 2 continues to capture the predetermined pattern in the captured image. Can do.

また、本実施形態の画像処理装置30と撮像装置2とが汎用的なネットワーク回線や専用ケーブルなどが使用して接続される構成で説明したが、画像処理装置30と撮像装置2とを一体に構成しても、本発明の効果を得ることができるのは言うまでもない。また、第1の実施形態のように、撮影パラメータ記憶部を有しない画像処理装置であっても、入力画像データの送信先が特定できる場合には、所定のパターンの位置情報を送信先に送信してもよい。   In addition, the image processing apparatus 30 and the imaging apparatus 2 according to the present embodiment have been described as being connected using a general-purpose network line or a dedicated cable. However, the image processing apparatus 30 and the imaging apparatus 2 are integrated. Needless to say, the effects of the present invention can be obtained even if configured. In addition, even in an image processing apparatus that does not have a shooting parameter storage unit as in the first embodiment, if the transmission destination of input image data can be specified, position information of a predetermined pattern is transmitted to the transmission destination. May be.

(第4の実施形態)
以下、本実施形態について説明する。図9は、本実施形態の画像処理装置40の構成例を示すブロック図である。まず、本実施形態の画像処理装置40の構成について説明する。
図9において、画像入力部41は、画像データを受信するためのものである。また、画像入力部11は、特定の通信方式に準拠したマーカーコード付きのプロトコルに適合させた画像データや、JPEG/MPEG4等の圧縮処理された画像データを受信する必要がある場合を想定して、画像入力部41にデコード処理機能を有している。なお、画像データは、撮像装置で撮影されて生成された撮影画像や、外部の記憶装置内に記憶されている画像などのデータであり、出力元は特定の機器に限定されない。
(Fourth embodiment)
Hereinafter, this embodiment will be described. FIG. 9 is a block diagram illustrating a configuration example of the image processing apparatus 40 according to the present embodiment. First, the configuration of the image processing apparatus 40 of the present embodiment will be described.
In FIG. 9, an image input unit 41 is for receiving image data. Further, it is assumed that the image input unit 11 needs to receive image data adapted to a protocol with a marker code that complies with a specific communication method, or image data that has been subjected to compression processing such as JPEG / MPEG4. The image input unit 41 has a decoding processing function. Note that the image data is data such as a photographed image generated by photographing with an imaging device or an image stored in an external storage device, and the output source is not limited to a specific device.

画像メモリ42は、RAMなどの読み書き可能な記憶装置で構成されており、画像入力部41で受信した画像データや画像変倍部43で変倍処理した画像データを記憶する。画像変倍部43は、画像メモリ42に記憶された画像データを読み出し、縮小画像データ(変倍画像データ)を生成して画像メモリ42に書き込むためのものである。   The image memory 42 is configured by a readable / writable storage device such as a RAM, and stores the image data received by the image input unit 41 and the image data subjected to the scaling process by the image scaling unit 43. The image scaling unit 43 reads the image data stored in the image memory 42, generates reduced image data (magnified image data), and writes it into the image memory 42.

照合対象パターン抽出部44は、画像メモリ42に記憶された縮小画像データ上で所定サイズの矩形領域を移動させながら、この矩形に含まれる部分(画素群)を照合対象パターンとして順次抽出して出力する。なお、オリジナル画像も1/1の縮小画像と解釈し、縮小画像に含むことができるものとする。   The verification target pattern extraction unit 44 sequentially extracts and outputs a portion (pixel group) included in the rectangle as a verification target pattern while moving a rectangular area of a predetermined size on the reduced image data stored in the image memory 42. To do. Note that the original image is also interpreted as a 1/1 reduced image and can be included in the reduced image.

検出パターン記憶部45は、入力画像から検出したい所定のパターン(対象物)を検出パターンとして予め記憶しておくためのものである。パターン検出部46は、照合対象パターンが所定のパターンに該当するかどうかについて、検出パターン記憶部45に記憶されている検出パターンとの照合を行う。さらに、検出した所定のパターンから得られる画素について、画素毎にYUV値に変換する。検出情報記憶部47は、パターン検出部46によって所定のパターンが検出された時に使用された縮小画像の変倍倍率の情報及び色情報をパターン検出部46から受け取って記憶する。   The detection pattern storage unit 45 is for storing in advance a predetermined pattern (object) to be detected from the input image as a detection pattern. The pattern detection unit 46 performs collation with the detection pattern stored in the detection pattern storage unit 45 as to whether or not the collation target pattern corresponds to a predetermined pattern. Further, the pixels obtained from the detected predetermined pattern are converted into YUV values for each pixel. The detection information storage unit 47 receives from the pattern detection unit 46 and stores the information on the magnification ratio and the color information of the reduced image used when the predetermined pattern is detected by the pattern detection unit 46.

次に、図9に示した各部の動作によってなされる処理について、図10のフローチャートを参照しながら説明する。画像処理装置40は、所定のパターンの検出において通常検出モードと高速検出モードとの2種類の検出モードを有する。そこで、最初は、画像処理装置40は通常検出モードで動作するものとする。   Next, processing performed by the operation of each unit illustrated in FIG. 9 will be described with reference to the flowchart of FIG. The image processing apparatus 40 has two types of detection modes, a normal detection mode and a high-speed detection mode, for detecting a predetermined pattern. Therefore, initially, the image processing apparatus 40 is assumed to operate in the normal detection mode.

図10(a)は、本実施形態において、通常検出モードにおける所定のパターンを検出する処理手順の一例を示すフローチャートである。
処理を開始すると、まず、ステップS401において、画像入力部41は、画像データを受信する。この時、特定の通信方式に準拠したマーカーコード付きのプロトコルに適合させた画像データや、JPEG/MPEG4等の圧縮処理された画像データを受信した場合には、受信した画像データに対してデコード処理をする。
FIG. 10A is a flowchart illustrating an example of a processing procedure for detecting a predetermined pattern in the normal detection mode in the present embodiment.
When the process is started, first, in step S401, the image input unit 41 receives image data. At this time, if image data adapted to a protocol with a marker code conforming to a specific communication method or image data compressed by JPEG / MPEG4 is received, the received image data is decoded. do.

次に、ステップS402において、この処理結果を入力画像データとして画像メモリ42へ書き込む。なお、デコード処理が不要な場合は、受信した画像データを入力画像データとして画像メモリ42へ書き込む。   In step S402, the processing result is written in the image memory 42 as input image data. When the decoding process is unnecessary, the received image data is written as input image data into the image memory 42.

次に、ステップS403において、画像変倍部43は、画像メモリ42に記憶されている入力画像データを読み出し、n(n≧2)個の縮小画像データを生成して画像メモリ42に書き込む。   Next, in step S <b> 403, the image scaling unit 43 reads the input image data stored in the image memory 42, generates n (n ≧ 2) pieces of reduced image data, and writes them in the image memory 42.

例えば、入力画像がVGA(横640画素、縦480画素)であるものとする。これを横320画素、縦240画素に縮小して1個目の縮小画像A1のデータを生成して画像メモリ42に書き込む。さらに、この縮小画像A1のデータを画像メモリ42から読み出して、横、縦ともに0.8倍した2個目の縮小画像A2のデータを生成して画像メモリ42に書き込む。以後n個目の縮小画像Anのデータを生成するまで繰り返し縮小処理を行う。ここで、縮小画像データを生成する時の変倍倍率(入力画像から見た倍率)は一例である。また、nの値は入力画像サイズ、検出パターンサイズ等の条件から変更するようにしてもよく、値を固定しておいてもよい。以後、縮小画像A1〜Anのデータを生成した変倍倍率をそれぞれ倍率A1〜Anとする。   For example, it is assumed that the input image is VGA (horizontal 640 pixels, vertical 480 pixels). This is reduced to 320 pixels horizontally and 240 pixels vertically to generate data of the first reduced image A1 and write it to the image memory 42. Further, the data of the reduced image A1 is read from the image memory 42, the data of the second reduced image A2 multiplied by 0.8 in both horizontal and vertical directions is generated and written into the image memory 42. Thereafter, the reduction process is repeatedly performed until data of the nth reduced image An is generated. Here, the scaling ratio (magnification viewed from the input image) when generating the reduced image data is an example. The value of n may be changed based on conditions such as the input image size and the detection pattern size, or the value may be fixed. Hereinafter, the magnifications for generating the data of the reduced images A1 to An are referred to as magnifications A1 to An, respectively.

次に、ステップS404において、照合対象パターン抽出部44は、図3(a)に示すように、縮小画像A1〜Anの上で所定サイズの矩形領域を矢印で示す方向に移動させながら、この矩形に含まれる部分(画素群)を照合対象パターンとして順次抽出する。そして、パターン検出部46に出力する。ここで所定サイズとは、例えば、検出パターンと同じサイズで図3に示しているが、縮小画像An以上のサイズで任意に定めることができる。なお、矢印で示されているような手順は一例であり、順次抽出する手順は同じである必要はない。   Next, in step S404, as shown in FIG. 3A, the collation target pattern extraction unit 44 moves the rectangular area of a predetermined size on the reduced images A1 to An in the direction indicated by the arrow. Are sequentially extracted as a pattern to be collated. And it outputs to the pattern detection part 46. Here, the predetermined size is, for example, the same size as the detection pattern shown in FIG. 3, but can be arbitrarily determined with a size equal to or larger than the reduced image An. Note that the procedure as indicated by the arrows is an example, and the procedure of sequential extraction need not be the same.

さらに、パターン検出部46は、照合対象パターン抽出部44で抽出した照合対象パターンが所定のパターンに該当するかどうかについて、検出パターン記憶部45に記憶されている検出パターンとの照合を順次行う。以上のように通常検出モードでは、n個の縮小画像データを生成して照合を行う。   Further, the pattern detection unit 46 sequentially collates with the detection patterns stored in the detection pattern storage unit 45 as to whether or not the verification target pattern extracted by the verification target pattern extraction unit 44 corresponds to a predetermined pattern. As described above, in the normal detection mode, n pieces of reduced image data are generated and collated.

次に、ステップS405において、縮小画像A1〜Anにおける照合の結果、所定のパターンを検出したかどうかを判定する。この判定の結果、所定のパターンを検出しなかった場合は、ステップS401に戻り、ステップS401〜S404の処理を繰り返す。一方、ステップS405の判定の結果、所定のパターンを検出した場合は、ステップS406へ進む。   Next, in step S405, it is determined whether or not a predetermined pattern has been detected as a result of collation in the reduced images A1 to An. As a result of this determination, if a predetermined pattern is not detected, the process returns to step S401, and the processes of steps S401 to S404 are repeated. On the other hand, if the result of determination in step S405 is that a predetermined pattern is detected, processing proceeds to step S406.

例えば、ステップS405において、パターン検出部46が6個目の縮小画像である縮小画像A6で所定のパターンを検出したものとする。この場合、ステップS406において、検出情報記憶部47は、入力画像から見た変倍倍率である縮小画像A6の倍率A6の情報をパターン検出部46から受け取って記憶する。さらに、パターン検出部46は、検出した所定のパターンから得られる画素について、画素毎にYUV値に変換する。そして、検出情報記憶部47は、色差情報であるU及びV値の上限及び下限からなる色情報をパターン検出部46から受け取って記憶する。そして、検出情報記憶部47に変倍倍率の情報と色情報とが記憶された時、画像処理装置40は通常検出モードを終了し、高速検出モードに移行する。   For example, in step S405, it is assumed that the pattern detection unit 46 detects a predetermined pattern in the reduced image A6 that is the sixth reduced image. In this case, in step S406, the detection information storage unit 47 receives the information of the magnification A6 of the reduced image A6, which is the magnification ratio seen from the input image, from the pattern detection unit 46 and stores it. Further, the pattern detection unit 46 converts pixels obtained from the detected predetermined pattern into YUV values for each pixel. Then, the detection information storage unit 47 receives the color information including the upper and lower limits of the U and V values that are color difference information from the pattern detection unit 46 and stores them. When the magnification information and the color information are stored in the detection information storage unit 47, the image processing apparatus 40 ends the normal detection mode and shifts to the high speed detection mode.

図10(b)は、本実施形態において、高速検出モードにおける所定のパターンを検出する処理手順の一例を示すフローチャートである。
まず、ステップS407において、画像入力部41は次の最新フレームの画像データを受信する。次に、ステップS408において、ステップS402と同様に画像入力部41は、受信した画像データを入力画像データとして画像メモリ42へ書き込む。
FIG. 10B is a flowchart illustrating an example of a processing procedure for detecting a predetermined pattern in the high-speed detection mode in the present embodiment.
First, in step S407, the image input unit 41 receives image data of the next latest frame. Next, in step S408, as in step S402, the image input unit 41 writes the received image data into the image memory 42 as input image data.

次に、ステップS409において、画像変倍部43は、画像メモリ42に記憶されている入力画像データを読み出し、m(n>m≧1)個の縮小画像データを生成して画像メモリ42に書き込む。縮小画像データを生成するための縮小倍率は、検出情報記憶部47に記憶している変倍倍率から決定する。なお、検出情報記憶部47には、変倍倍率ではなく画像サイズの情報を記憶しておき、その画像サイズから縮小倍率を決定するようにしてもよい。なお、本実施形態では、所定のパターンを検出した縮小画像の変倍倍率が倍率A6であり、倍率A6の情報が検出情報記憶部47に記憶されているものとして説明する。   In step S409, the image scaling unit 43 reads the input image data stored in the image memory 42, generates m (n> m ≧ 1) pieces of reduced image data, and writes the reduced image data in the image memory 42. . The reduction ratio for generating the reduced image data is determined from the magnification ratio stored in the detection information storage unit 47. Note that the detection information storage unit 47 may store information on the image size instead of the scaling magnification, and determine the reduction magnification based on the image size. In the present embodiment, it is assumed that the scaling factor of the reduced image from which a predetermined pattern is detected is the magnification A6, and information on the magnification A6 is stored in the detection information storage unit 47.

例えば、m=1とした時は、画像変倍部43は、検出情報記憶部47に記憶している倍率A6で、入力画像データから縮小画像B1(=縮小画像Bm)のデータを1個生成して画像メモリ42に書き込む。   For example, when m = 1, the image scaling unit 43 generates one piece of reduced image B1 (= reduced image Bm) data from the input image data at the magnification A6 stored in the detection information storage unit 47. Then, the data is written into the image memory 42.

また、m=3とした時は、画像変倍部43は、検出情報記憶部47に記憶している倍率A6の1.25倍の変倍倍率である倍率A5で、入力画像データから縮小画像B1のデータを生成して画像メモリ42に書き込む。そして、この縮小画像B1のデータを画像メモリ42から読み出し、横、縦ともに0.8倍して縮小画像B2のデータを生成して画像メモリ42に書き込む。なお、この変倍倍率は検出情報記憶部47に記憶している倍率A6と同じである。   Further, when m = 3, the image scaling unit 43 reduces the reduced image from the input image data at a magnification A5 that is a magnification of 1.25 times the magnification A6 stored in the detection information storage unit 47. B1 data is generated and written to the image memory 42. Then, the data of the reduced image B1 is read from the image memory 42, the data of the reduced image B2 is generated by multiplying the horizontal and vertical values by 0.8 and written into the image memory 42. The scaling magnification is the same as the magnification A6 stored in the detection information storage unit 47.

続いて、この縮小画像B2のデータを画像メモリ42から読み出し、横、縦ともに0.8倍して縮小画像B3(=縮小画像Bm)のデータを生成して画像メモリ42に書き込む。この変倍倍率は倍率A7である。このようにm≠1の時は、n個の縮小画像データを生成した時のn個の変倍倍率において、検出情報記憶部47に記憶している変倍倍率を中心にし、それに近い変倍倍率を使用してm個の縮小画像データを生成する。   Subsequently, the data of the reduced image B2 is read from the image memory 42, and the data of the reduced image B3 (= reduced image Bm) is generated by multiplying both the horizontal and vertical directions by 0.8 and written in the image memory 42. This magnification is A7. As described above, when m ≠ 1, the scaling magnification stored in the detection information storage unit 47 is centered on the scaling magnification of n when the reduced image data of n is generated. The m pieces of reduced image data are generated using the magnification.

次に、ステップS410において、照合対象パターン抽出部44は、図3(b)に示すように、縮小画像B1〜Bmの上で所定サイズの矩形領域を矢印で示す方向に移動させながら、この矩形に含まれる部分(画素群)を照合対象パターンとして順次抽出する。そして、パターン検出部46に出力する。そして、パターン検出部46は、照合対象パターンに対して順次下記の処理を行う。   Next, in step S410, as shown in FIG. 3B, the verification target pattern extraction unit 44 moves the rectangular area of a predetermined size on the reduced images B1 to Bm in the direction indicated by the arrow. Are sequentially extracted as a pattern to be collated. And it outputs to the pattern detection part 46. And the pattern detection part 46 performs the following process sequentially with respect to a collation target pattern.

まず、照合対象パターンにおいて検出情報記憶部47に記憶している色情報のUおよびV値の上限及び下限に含まれる画素を検出する。ここで、UおよびV値の上限及び下限に含まれる画素が一定の割合に満たない照合対象パターンは検出パターン記憶部45に記憶されている検出パターンとの照合を行わないようにする。そして、UおよびV値の上限及び下限に含まれる画素が一定の割合以上の照合対象パターンのみ、所定のパターンに該当するかどうかについて、検出パターン記憶部45に記憶されている検出パターンとの照合を行う。縮小画像データの数がn個より少数のm個である点で、前述のステップS404の処理とは異なっている。以上のように高速検出モードでは、m個の縮小画像データを生成して照合を行う。   First, pixels included in the upper and lower limits of the U and V values of the color information stored in the detection information storage unit 47 in the verification target pattern are detected. Here, collation target patterns in which the pixels included in the upper and lower limits of the U and V values are less than a certain ratio are not collated with the detection patterns stored in the detection pattern storage unit 45. And it is compared with the detection pattern memorize | stored in the detection pattern memory | storage part 45 about whether the pixel contained in the upper limit and lower limit of U and V value corresponds to a predetermined pattern only in the comparison object pattern more than a fixed ratio. I do. This is different from the processing in step S404 described above in that the number of reduced image data is m, which is smaller than n. As described above, in the high-speed detection mode, m pieces of reduced image data are generated and collated.

次に、ステップS411において、縮小画像B1〜Bmにおける照合の結果、所定のパターンを検出したかどうかを判定する。この判定の結果、所定のパターンを検出しなかった場合は、そのまま高速検出モードを終了する。そして、検出情報記憶部47は記憶している倍率A6の情報と色情報とを消去して、画像処理装置40は通常検出モードを開始する。一方、ステップS411の判定の結果、所定のパターンを検出した場合は、ステップS412へ進む。   Next, in step S411, it is determined whether or not a predetermined pattern has been detected as a result of collation in the reduced images B1 to Bm. As a result of this determination, if the predetermined pattern is not detected, the high-speed detection mode is terminated as it is. Then, the detection information storage unit 47 deletes the stored magnification A6 information and color information, and the image processing apparatus 40 starts the normal detection mode. On the other hand, if a predetermined pattern is detected as a result of the determination in step S411, the process proceeds to step S412.

例えば、ステップS110において、パターン検出部46がm=3で、3個目の縮小画像である縮小画像B3(=縮小画像Bm)で所定のパターンを検出したものとする。この場合、ステップS412において、検出情報記憶部47は記憶している倍率A6の情報と色情報とを消去する。そして、縮小画像B3の入力画像から見た変倍倍率である倍率B3の情報と、検出した所定のパターンから得られるUおよびV値の上限及び下限からなる色情報とをパターン検出部46から受け取って新規に記憶する。そして、ステップS407に戻り、前述した手順と同様にステップS407〜S411の処理を実行する。   For example, in step S110, it is assumed that the pattern detection unit 46 detects a predetermined pattern in the reduced image B3 (= reduced image Bm) that is the third reduced image when m = 3. In this case, in step S412, the detection information storage unit 47 deletes the stored magnification A6 information and color information. Then, the pattern detection unit 46 receives information on the magnification B3, which is a scaling magnification viewed from the input image of the reduced image B3, and color information including upper and lower limits of the U and V values obtained from the detected predetermined pattern. And memorize a new one. And it returns to step S407 and performs the process of step S407-S411 similarly to the procedure mentioned above.

本実施形態では、検出した所定のパターンから得られるUおよびV値の上限及び下限からなる色情報を検出情報記憶部47に記憶するようにした。一方、輝度やRGBの色情報を記憶しておき、これらを用いて、検出パターンと照合する照合対象パターンを限定するようにしてもよい。   In the present embodiment, color information including upper and lower limits of U and V values obtained from a detected predetermined pattern is stored in the detection information storage unit 47. On the other hand, luminance and RGB color information may be stored, and these may be used to limit collation target patterns to be collated with detection patterns.

また、本実施形態では、パターン検出部46に既知の輝度補正処理、濃度補正処理や背景除去処理機能を有し、照合対象パターンに対してこれらの処理を行い、パターン検出部46による照合の精度をさらに高めるようにしてもよい。また、既知の輝度補正処理、濃度補正処理や背景除去処理を有する画像処理部を別途備えるようにして、入力画像又は縮小画像に対してこれらの処理を行い、パターン検出部46による照合の精度をさらに高めるようにしてもよい。   In the present embodiment, the pattern detection unit 46 has known brightness correction processing, density correction processing, and background removal processing functions. These processings are performed on the pattern to be verified, and the accuracy of verification by the pattern detection unit 46 is confirmed. You may make it raise further. In addition, an image processing unit having a known luminance correction process, density correction process, and background removal process is separately provided, and these processes are performed on the input image or the reduced image, so that the accuracy of matching by the pattern detection unit 46 is improved. You may make it raise further.

また、パターン検出部46による照合において、画像の輝度成分のみを使用する構成にしてもよい。この場合、画像変倍部43は、輝度成分のみを抽出して輝度成分のみの縮小画像データを生成するようにしてもよい。   Further, in the collation by the pattern detection unit 46, only the luminance component of the image may be used. In this case, the image scaling unit 43 may extract only the luminance component and generate reduced image data of only the luminance component.

以上のように本実施形態では、第1の実施形態と同様に、検出情報記憶部47に記憶している変倍倍率から縮小画像データを生成するための変倍倍率を限定している。これにより、生成する縮小画像データを少なくするとともに、所定のパターンを検出することができる。したがって、変倍処理数及び照合回数の減少によって演算処理負荷を軽減して、所定の被写体の検出を高速化することができる。   As described above, in the present embodiment, as in the first embodiment, the scaling factor for generating reduced image data from the scaling factor stored in the detection information storage unit 47 is limited. Thereby, the reduced image data to be generated can be reduced and a predetermined pattern can be detected. Therefore, it is possible to reduce the calculation processing load by reducing the number of scaling processes and the number of collations, and to speed up detection of a predetermined subject.

さらに、本実施形態では、検出情報記憶部47は検出した所定のパターンから得られるUおよびV値の上限及び下限からなる色情報を記憶する。そして、UおよびV値の上限及び下限に含まれる画素が一定の割合以上の照合対象パターンのみ、検出パターン記憶部45に記憶されている検出パターンとの照合を行うことによって、さらに照合回数が減少する。そのため、演算処理負荷をより軽減して、所定の被写体の検出をさらに高速化することができる。   Further, in the present embodiment, the detection information storage unit 47 stores color information including upper and lower limits of U and V values obtained from the detected predetermined pattern. Further, the number of verifications is further reduced by performing verification with the detection patterns stored in the detection pattern storage unit 45 only for the verification target patterns in which the pixels included in the upper and lower limits of the U and V values exceed a certain ratio. To do. Therefore, it is possible to further reduce the calculation processing load and further increase the speed of detection of a predetermined subject.

また、変倍処理数を減少させてもm>1にすることによって、所定の被写体と撮像装置との距離の変化によって入力画像における大きさが変化した場合においても、検出精度を維持することできる。また、本実施形態の画像処理装置40は外部から画像データを受信する構成で説明したが、撮像装置等の画像データ出力元を画像処理装置40と一体に構成しても、本発明の効果を得ることができるのは言うまでもない。さらに、第2及び第3の実施形態の画像処理装置と組み合わせてもよい。   Further, even if the scaling processing number is reduced, by setting m> 1, detection accuracy can be maintained even when the size of the input image changes due to a change in the distance between the predetermined subject and the imaging device. . The image processing apparatus 40 according to the present embodiment has been described as receiving image data from the outside. However, even if the image data output source such as an imaging apparatus is configured integrally with the image processing apparatus 40, the effect of the present invention is achieved. It goes without saying that you can get it. Furthermore, you may combine with the image processing apparatus of 2nd and 3rd embodiment.

(本発明に係る他の実施形態)
本発明の目的は前述した実施例の機能を実現するソフトウエアのプログラムコードを記録した記録媒体に接続したコンピュータ(またはCPUまたはMPU)が記録媒体に格納されたプログラムコードを読み出し実行することによっても達成される。コンピュータは撮像装置等の画像データ出力元と接続して画像データの受信を行う構成としてもよいし、画像データ出力元と一体に構成してもよい。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することとなり、そのプログラムコードを記憶したコンピュータ読み取り可能な記憶媒体は本発明を構成することになる。
(Other embodiments according to the present invention)
Another object of the present invention is to read and execute the program code stored in the recording medium by a computer (or CPU or MPU) connected to the recording medium recording the software program code for realizing the functions of the above-described embodiments. Achieved. The computer may be configured to connect to an image data output source such as an imaging device to receive image data, or may be configured integrally with the image data output source. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the computer-readable storage medium storing the program code constitutes the present invention.

プログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROM、DVD等を用いることができる。   As a storage medium for supplying the program code, for example, a flexible disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, nonvolatile memory card, ROM, DVD, or the like is used. it can.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでない。そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOperating System(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施例の機能が実現される場合も含まれることは言うまでもない。   In addition, the functions of the above-described embodiments are not only realized by executing the program code read by the computer. This includes the case where the operating system (OS) running on the computer performs part or all of the actual processing based on the instruction of the program code, and the functions of the above-described embodiments are realized by the processing. Needless to say.

さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリにまず書きこまれる。その後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Further, the program code read from the storage medium is first written to a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. After that, based on the instruction of the program code, the CPU of the function expansion board or function expansion unit performs part or all of the actual processing, and the processing of the above-described embodiment is realized by the processing. Needless to say.

本発明の第1の実施形態に係る画像処理装置の構成例を示すブロック図である。1 is a block diagram illustrating a configuration example of an image processing apparatus according to a first embodiment of the present invention. 本発明の第1の実施形態に係る画像処理装置において、所定のパターンを検出するための処理手順の一例を示すフローチャートである。4 is a flowchart illustrating an example of a processing procedure for detecting a predetermined pattern in the image processing apparatus according to the first embodiment of the present invention. 本発明の第1の実施形態において、様々なサイズの縮小画像について照合対象パターンと検出用パターンとを照合する処理を説明する図である。FIG. 6 is a diagram for describing processing for collating a collation target pattern and a detection pattern for reduced images of various sizes in the first embodiment of the present invention. 本発明の第2の実施形態に係る画像処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る画像処理装置において、所定のパターンを検出するための処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence for detecting a predetermined pattern in the image processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態において、様々なサイズの縮小画像について照合対象パターンと検出用パターンとを照合する処理を説明する図である。It is a figure explaining the process which collates a collation target pattern and a pattern for a detection about the reduced image of various sizes in the 2nd Embodiment of this invention. 本発明の第3の実施形態に係る画像処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image processing apparatus which concerns on the 3rd Embodiment of this invention. 本発明の第3の実施形態に係る画像処理装置において、所定のパターンを検出するための処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence for detecting a predetermined pattern in the image processing apparatus which concerns on the 3rd Embodiment of this invention. 本発明の第4の実施形態に係る画像処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image processing apparatus which concerns on the 4th Embodiment of this invention. 本発明の第4の実施形態に係る画像処理装置において、所定のパターンを検出するための処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence for detecting a predetermined pattern in the image processing apparatus which concerns on the 4th Embodiment of this invention.

符号の説明Explanation of symbols

1 画像処理装置
11 画像入力部
12 画像メモリ
13 画像変倍部
14 照合対象パターン抽出部
15 検出パターン記憶部
16 パターン検出部
17 検出情報記憶部
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 11 Image input part 12 Image memory 13 Image scaling part 14 Collation target pattern extraction part 15 Detection pattern storage part 16 Pattern detection part 17 Detection information storage part

Claims (10)

画像データから所定の対象物を検出する画像処理装置であって、
撮像装置から前記画像データを入力する画像入力手段と、
前記画像入力手段によって入力された前記画像データに関する前記撮像装置のズーム倍率を入力するズーム倍率入力手段と、
前記所定の対象物を示す検出パターンを記憶する検出パターン記憶手段と、
前記画像入力手段によって入力された画像データから互いに倍率の異なる複数の変倍画像データを生成する画像変倍手段と、
前記画像変倍手段によって生成された複数の変倍画像データから一部の領域を抽出し、前記抽出した一部の領域と、前記検出パターン記憶手段に記憶された検出パターンとを照合して前記所定の対象物を検出する検出手段とを有し、
前記画像変倍手段は、前記画像入力手段によって入力された第1の画像データから生成された第1の変倍画像データから前記検出手段によって前記所定の対象物が検出された場合は、前記第1の画像データに関するズーム倍率から前記第1の画像データの次に前記画像入力手段によって入力された第2の画像データに関するズーム倍率への変化率と、前記第1の画像データから前記第1の変倍画像データを生成するための倍率とに基づいて、前記第2の画像データから第2の変倍画像データを生成するための倍率を決定するとともに、前記第1の画像データから生成された第1の変倍画像データから前記検出手段によって前記所定の対象物が検出されなかった時よりも少数の1つ以上の第2の変倍画像データを前記第2の画像データから生成することを特徴とする画像処理装置。
An image processing device for detecting a predetermined object from image data,
Image input means for inputting the image data from the imaging device ;
Zoom magnification input means for inputting a zoom magnification of the imaging apparatus relating to the image data input by the image input means;
Detection pattern storage means for storing a detection pattern indicating the predetermined object;
Image scaling means for generating a plurality of scaled image data having different magnifications from the image data input by the image input means;
Extracting a partial area from a plurality of scaled image data generated by the image scaling means, collating the extracted partial area with a detection pattern stored in the detection pattern storage means, and detection means for detecting a predetermined object,
When the predetermined object is detected by the detecting unit from the first scaled image data generated from the first image data input by the image input unit , the image scaling unit is The change rate from the zoom magnification relating to one image data to the zoom magnification relating to the second image data input by the image input means next to the first image data, and the first image data to the first Based on the magnification for generating the scaled image data, the magnification for generating the second scaled image data is determined from the second image data, and the scaled image data is generated from the first image data. generating a small number of one or more second scaled image data than when said predetermined target object is not detected from the second image data by said detection means from the first scaled image data The image processing apparatus according to claim Rukoto.
前記第1の画像データから生成された第1の変倍画像データから前記検出手段によって前記所定の対象物が検出された場合、前記画像変倍手段は、前記第1の画像データに関するズーム倍率から前記第2の画像データに関するズーム倍率への変化率と、前記第1の画像データから前記第1の変倍画像データを生成するための倍率とから算出した倍率を中心として、互いに倍率の異なる複数の第2の変倍画像データを生成することを特徴とする請求項に記載の画像処理装置。 When the predetermined object is detected by the detecting unit from the first scaled image data generated from the first image data , the image scaling unit determines from the zoom magnification relating to the first image data. A plurality of magnifications different from each other around a magnification calculated from a rate of change to the zoom magnification relating to the second image data and a magnification for generating the first scaled image data from the first image data. The image processing apparatus according to claim 1 , wherein the second scaled image data is generated. 前記所定の対象物が検出された変倍画像データにおける前記所定の対象物の位置情報を、前記入力された画像データを生成した撮像装置へ送信する送信手段をさらに有することを特徴とする請求項1又は2に記載の画像処理装置。 Claims, characterized by further comprising a transmitting means for the predetermined object is the position information of the predetermined object in the detected scaled image data, to send to the imaging apparatus generates image data that has been said input Item 3. The image processing apparatus according to Item 1 or 2 . 前記第1の画像データから生成された第1の変倍画像データから前記検出手段によって前記所定の対象物が検出されなかった場合は、前記第1の画像データから生成された第1の変倍画像データと同数の第2の変倍画像データを前記第2の画像データから生成することを特徴とする請求項1〜の何れか1項に記載の画像処理装置。 If the predetermined object is not detected by the detection means from the first scaled image data generated from the first image data, the first scaled scale generated from the first image data the image processing apparatus according to any one of claim 1 to 3, characterized in that to generate the image data and the same number of second scaled image data from the second image data. 画像データから所定の対象物を検出する画像処理方法であって、
撮像装置から前記画像データを入力する画像入力工程と、
前記画像入力工程において入力された前記画像データに関する前記撮像装置のズーム倍率を入力するズーム倍率入力工程と、
前記画像入力工程において入力された画像データから互いに倍率の異なる複数の変倍画像データを生成する画像変倍工程と、
前記画像変倍工程において生成された複数の変倍画像データから一部の領域を抽出し、前記抽出した一部の領域と、前記所定の対象物を示す検出パターンとを照合して前記所定の対象物を検出する検出工程とを有し、
前記画像変倍工程においては、前記画像入力工程において入力された第1の画像データから生成された第1の変倍画像データから前記検出工程において前記所定の対象物が検出された場合は、前記第1の画像データに関するズーム倍率から前記第1の画像データの次に前記画像入力工程において入力された第2の画像データに関するズーム倍率への変化率と、前記第1の画像データから前記第1の変倍画像データを生成するための倍率とに基づいて、前記第2の画像データから第2の変倍画像データを生成するための倍率を決定するとともに、前記第1の画像データから生成された第1の変倍画像データから前記検出工程において前記所定の対象物が検出されなかった時よりも少数の1つ以上の第2の変倍画像データを前記第2の画像データから生成することを特徴とする画像処理方法。
An image processing method for detecting a predetermined object from image data,
An image input step of inputting the image data from the imaging device ;
A zoom magnification input step of inputting a zoom magnification of the imaging device relating to the image data input in the image input step;
An image scaling step for generating a plurality of scaled image data having different magnifications from the image data input in the image input step;
A partial area is extracted from a plurality of scaled image data generated in the image scaling process, the extracted partial area is compared with a detection pattern indicating the predetermined object, and the predetermined area is checked. and a detecting step of detecting an object,
In the image scaling step, when the predetermined object is detected in the detection step from first scaled image data generated from the first image data input in the image input step, The rate of change from the zoom magnification relating to the first image data to the zoom magnification relating to the second image data input in the image input step after the first image data, and the first image data to the first based of on the magnification for generating scaled image data, and determines a magnification for generating a second scaled image data from the second image data is generated from the first image data few of the one or more second scaled image data to the second image data than when said predetermined target object is not detected in the detection step from the first scaled image data An image processing method characterized by al generation.
前記第1の画像データから生成された第1の変倍画像データから前記検出工程において前記所定の対象物が検出された場合、前記画像変倍工程においては、前記第1の画像データに関するズーム倍率から前記第2の画像データに関するズーム倍率への変化率と、前記第1の画像データから前記第1の変倍画像データを生成するための倍率とから算出した倍率を中心として、互いに倍率の異なる複数の第2の変倍画像データを生成することを特徴とする請求項5に記載の画像処理方法。When the predetermined object is detected in the detection step from the first scaled image data generated from the first image data, the zoom magnification for the first image data is detected in the image scaling step. The magnifications are different from each other around the magnification calculated from the rate of change from the first to the second image data to the zoom magnification and the magnification for generating the first scaled image data from the first image data. 6. The image processing method according to claim 5, wherein a plurality of second scaled image data is generated. 前記第1の画像データから生成された第1の変倍画像データから前記検出工程において前記所定の対象物が検出されなかった場合は、前記第1の画像データから生成された第1の変倍画像データと同数の第2の変倍画像データを前記第2の画像データから生成することを特徴とする請求項5又は6に記載の画像処理方法。If the predetermined object is not detected in the detection step from the first zoom image data generated from the first image data, the first zoom image generated from the first image data is detected. The image processing method according to claim 5 or 6, wherein the same number of second scaled image data as image data is generated from the second image data. 画像データから所定の対象物を検出する画像処理装置を制御するためのプログラムであって、
前記画像データを入力する画像入力手順と、
撮像装置から前記画像入力手順において入力された画像データから互いに倍率の異なる複数の変倍画像データを生成する画像変倍手順と、
前記画像入力手順において入力された前記画像データに関する前記撮像装置のズーム倍率を入力するズーム倍率入力手順と、
前記画像変倍手順において生成された複数の変倍画像データから一部の領域を抽出し、前記抽出した一部の領域と、前記所定の対象物を示す検出パターンとを照合して前記所定の対象物を検出する検出手順とをコンピュータに実行させ、
前記画像変倍手順においては、前記画像入力手順において入力された第1の画像データから生成された第1の変倍画像データから前記検出手順において前記所定の対象物が検出された場合は、前記第1の画像データに関するズーム倍率から前記第1の画像データの次に前記画像入力手順において入力された第2の画像データに関するズーム倍率への変化率と、前記第1の画像データから前記第1の変倍画像データを生成するための倍率とに基づいて、前記第2の画像データから第2の変倍画像データを生成するための倍率を決定するとともに、前記第1の画像データから生成された第1の変倍画像データから前記検出手順において前記所定の対象物が検出されなかった時よりも少数の1つ以上の第2の変倍画像データを前記第2の画像データから生成することを特徴とするプログラム。
A program for controlling an image processing device for detecting a predetermined object from image data,
An image input procedure for inputting the image data;
An image scaling procedure for generating a plurality of scaled image data having different magnifications from the image data input in the image input procedure from the imaging device ;
A zoom magnification input procedure for inputting a zoom magnification of the imaging apparatus related to the image data input in the image input procedure;
A partial area is extracted from a plurality of scaled image data generated in the image scaling procedure , and the extracted partial area is collated with a detection pattern indicating the predetermined object to determine the predetermined area to execute a detection step of detecting an object in a computer,
In the image scaling procedure, when the predetermined object is detected in the detection procedure from the first scaled image data generated from the first image data input in the image input procedure, The rate of change from the zoom magnification relating to the first image data to the zoom magnification relating to the second image data input in the image input procedure next to the first image data, and the first image data to the first based of on the magnification for generating scaled image data, and determines a magnification for generating a second scaled image data from the second image data is generated from the first image data few of the one or more second scaled image data to the second image data than when said predetermined target object is not detected in the detection procedure from the first scaled image data Program characterized and Turkey generates al.
前記第1の画像データから生成された第1の変倍画像データから前記検出手順において前記所定の対象物が検出された場合、前記画像変倍手順においては、前記第1の画像データに関するズーム倍率から前記第2の画像データに関するズーム倍率への変化率と、前記第1の画像データから前記第1の変倍画像データを生成するための倍率とから算出した倍率を中心として、互いに倍率の異なる複数の第2の変倍画像データを生成することを特徴とする請求項8に記載のプログラム。When the predetermined object is detected in the detection procedure from the first scaled image data generated from the first image data, the zoom magnification for the first image data is detected in the image scaling procedure. The magnifications differ from each other around a magnification calculated from the rate of change from the first image data to the zoom magnification with respect to the second image data and the magnification for generating the first scaled image data from the first image data. 9. The program according to claim 8, wherein a plurality of second scaled image data are generated. 前記第1の画像データから生成された第1の変倍画像データから前記検出手順において前記所定の対象物が検出されなかった場合は、前記第1の画像データから生成された第1の変倍画像データと同数の第2の変倍画像データを前記第2の画像データから生成することを特徴とする請求項8又は9に記載のプログラム。If the predetermined object is not detected in the detection procedure from the first scaled image data generated from the first image data, the first scaled image generated from the first image data is detected. The program according to claim 8 or 9, wherein the same number of second scaled image data as image data is generated from the second image data.
JP2008258452A 2008-10-03 2008-10-03 Image processing apparatus and image processing method Active JP5247338B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2008258452A JP5247338B2 (en) 2008-10-03 2008-10-03 Image processing apparatus and image processing method
US12/571,658 US8625933B2 (en) 2008-10-03 2009-10-01 Image processing apparatus and method for the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008258452A JP5247338B2 (en) 2008-10-03 2008-10-03 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2010092092A JP2010092092A (en) 2010-04-22
JP5247338B2 true JP5247338B2 (en) 2013-07-24

Family

ID=42075470

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008258452A Active JP5247338B2 (en) 2008-10-03 2008-10-03 Image processing apparatus and image processing method

Country Status (2)

Country Link
US (1) US8625933B2 (en)
JP (1) JP5247338B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008129540A2 (en) * 2007-04-19 2008-10-30 Eyecue Vision Technologies Ltd. Device and method for identification of objects using color coding
JP5247338B2 (en) * 2008-10-03 2013-07-24 キヤノン株式会社 Image processing apparatus and image processing method
JP5746937B2 (en) * 2011-09-01 2015-07-08 ルネサスエレクトロニクス株式会社 Object tracking device
US9111346B2 (en) * 2011-09-13 2015-08-18 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and recording medium
JP5930808B2 (en) * 2012-04-04 2016-06-08 キヤノン株式会社 Image processing apparatus, image processing apparatus control method, and program
US11032480B2 (en) * 2017-01-31 2021-06-08 Hewlett-Packard Development Company, L.P. Video zoom controls based on received information

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6169966B1 (en) * 1996-12-27 2001-01-02 Kabushiki Kaisha Toshiba Apparatus for detecting a moving state of an object
JP2003235035A (en) 2001-12-05 2003-08-22 Hitachi Kokusai Electric Inc Object detecting method, object detecting apparatus employing the same, object tracking method, and object tracking apparatus employing the same
KR100470931B1 (en) * 2001-12-05 2005-02-22 가부시키가이샤 히다치 고쿠사이 덴키 Object tracking method and apparatus using template matching
JP2003346158A (en) * 2002-05-28 2003-12-05 Toshiba Corp Face area tracking method by face image
JP4281338B2 (en) 2002-11-22 2009-06-17 ソニー株式会社 Image detection apparatus and image detection method
EP1710751A1 (en) * 2004-01-06 2006-10-11 Sony Corporation Image processing device and method, recording medium, and program
JP4525089B2 (en) * 2004-01-27 2010-08-18 フジノン株式会社 Auto focus system
JP4373828B2 (en) * 2004-03-22 2009-11-25 富士フイルム株式会社 Specific area detection method, specific area detection apparatus, and program
JP4789526B2 (en) 2005-07-13 2011-10-12 キヤノン株式会社 Image processing apparatus and image processing method
US7783184B2 (en) * 2006-02-15 2010-08-24 Lg Electronics Inc. Optical zoom tracking apparatus and method, and computer-readable recording medium for performing the optical zoom tracking method
JP4843787B2 (en) * 2006-05-11 2011-12-21 国立大学法人 筑波大学 Subject tracking method and apparatus
JP5247338B2 (en) * 2008-10-03 2013-07-24 キヤノン株式会社 Image processing apparatus and image processing method

Also Published As

Publication number Publication date
US20100085385A1 (en) 2010-04-08
JP2010092092A (en) 2010-04-22
US8625933B2 (en) 2014-01-07

Similar Documents

Publication Publication Date Title
JP6106921B2 (en) Imaging apparatus, imaging method, and imaging program
JP4735742B2 (en) Imaging apparatus, strobe image generation method, and program
US9002061B2 (en) Image processing device, image processing method and computer-readable medium
EP2073531A1 (en) Method and apparatus for creating a combined image
US20070222858A1 (en) Monitoring system, monitoring method and program therefor
JP5247338B2 (en) Image processing apparatus and image processing method
JP2016100696A (en) Image processing device, image processing method, and image processing system
JP2004318823A (en) Information display system, information processing apparatus, pointing device and pointer mark displaying method in information display system
US7957633B2 (en) Focus adjusting apparatus and focus adjusting method
CN111246080B (en) Control apparatus, control method, image pickup apparatus, and storage medium
JP2017168982A (en) Imaging apparatus, and control method and program for imaging apparatus
US8699750B2 (en) Image processing apparatus
JP4281338B2 (en) Image detection apparatus and image detection method
JP2013021551A (en) Detection device, detection method, and program
US7835552B2 (en) Image capturing apparatus and face area extraction method
JP5539565B2 (en) Imaging apparatus and subject tracking method
JP2008211534A (en) Face detecting device
JP5451364B2 (en) Subject tracking device and control method thereof
JP2014027580A (en) Imaging device, and image processing method
JP5247419B2 (en) Imaging apparatus and subject tracking method
JP7130375B2 (en) Image processing device, imaging device, image processing method, and program
JP2009130840A (en) Imaging apparatus, control method thereof ,and program
KR101392382B1 (en) Apparatus and method for emboding panorama function of camera in portable terminal
JP6525693B2 (en) Image processing apparatus and image processing method
JP6335064B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND COMPUTER PROGRAM

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111003

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120713

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120724

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120920

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: 20130312

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130409

R151 Written notification of patent or utility model registration

Ref document number: 5247338

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160419

Year of fee payment: 3