JPS63187374A - Automatic affine transformation processing system - Google Patents

Automatic affine transformation processing system

Info

Publication number
JPS63187374A
JPS63187374A JP62018452A JP1845287A JPS63187374A JP S63187374 A JPS63187374 A JP S63187374A JP 62018452 A JP62018452 A JP 62018452A JP 1845287 A JP1845287 A JP 1845287A JP S63187374 A JPS63187374 A JP S63187374A
Authority
JP
Japan
Prior art keywords
image
correction
template
rotation correction
necessary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP62018452A
Other languages
Japanese (ja)
Inventor
Yuzo Akiyama
秋山 裕造
Kazunori Fujiwara
和紀 藤原
Hideo Ota
太田 秀夫
Yoshiteru Imada
今田 義照
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.)
Hitachi Ltd
Hitachi Information and Control Systems Inc
Original Assignee
Hitachi Ltd
Hitachi Control Systems 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 Hitachi Ltd, Hitachi Control Systems Inc filed Critical Hitachi Ltd
Priority to JP62018452A priority Critical patent/JPS63187374A/en
Publication of JPS63187374A publication Critical patent/JPS63187374A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

PURPOSE:To perform a rotational correction in an arbitrary direction, by deciding whether it is necessary to perform the rotational correction of 180 deg., and providing a correction means when the correction is needed. CONSTITUTION:By executing template pattern matching in which a template 5 is used on a binary image 1, it is possible to find the number of coincident picture elements at a position coinciding at maximum. Assuming the maximum number of coincidence at the time of executing the matching on a forward facing object 2 as S1, and that of the coincidence at the time of executing the matching on a backward facing object 3 as S2, relation is expressed as S1>S2. At this time, assuming a reference value to discriminate a direction whether it is a forward direction or a backward direction as (t), the (t) is set so as to always satisfy relation S1>t>S2. And it is decided whether the rotational correction of 180 deg. is necessary or not by an algorithm which executes no operation on the binary image 1 if the maximum number of coincidence S at the time of executing the template pattern matching is set as S>t, and executes the rotational correction 4 of 180 deg. with affine transformation if it is S<t, and a means which performs the rotational correction when the correction is needed, is provided.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、画像処理方式の技術分野に係り、特に、画像
処理の自動化に好適なオートアフィン変換処理方式。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to the technical field of image processing methods, and particularly to an auto-affine transformation processing method suitable for automating image processing.

〔従来の技術〕[Conventional technology]

従来の技術においては、2値画像メモリ中の物体を回転
補正する場合には、慣性主軸等により物体の方向を求め
、基準画像の物体の方向との差を、回転補正角として回
転補正を行っていた。しかし。
In conventional technology, when correcting the rotation of an object in a binary image memory, the direction of the object is determined using the principal axis of inertia, etc., and the rotation correction is performed using the difference between the direction of the object in the reference image and the rotation correction angle. was. but.

従来の方式では、方向は判るものの、向きまでは判らな
いため、任意の向きに対する回転については配慮されて
いなかった。
In the conventional method, although the direction is known, the direction is not known, so rotation with respect to an arbitrary direction is not considered.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上記従来技術は、点対称以外の物体において180°以
上物体が回転ズレしている場合についての配慮がされて
おらず、180°以上の回転ズレがある物体を回転補正
した場合、物体は逆向きになるという問題があった。
The above-mentioned conventional technology does not take into consideration the case where the object has a rotational deviation of 180° or more in a non-point symmetric object, and when the rotation of an object with a rotational deviation of 180° or more is corrected, the object is oriented in the opposite direction. There was a problem with becoming.

本発明の目的は、慣性主軸をベースにした回転柚正画に
対し、更に180°の回転補正が必要か否かのチェック
を行い、必要に応じて180’回転補正することにより
、任意の向きの回転補正を実現することにある。また、
本回転補正手段を組み合わせることにより、画像取込み
から認識対象画像作成までの処理の自動化を実現するこ
とにある。
The purpose of the present invention is to check whether or not further rotation correction of 180° is necessary for a rotated original image based on the principal axis of inertia, and to correct the rotation by 180' if necessary. The objective is to realize rotation correction. Also,
By combining this rotation correction means, it is possible to automate the process from image capture to creation of a recognition target image.

〔問題点を解決するための手段〕[Means for solving problems]

上記目的は、慣性主軸により回転補正した2値画像に対
し、テンプレートパターンマツチング、または、テンプ
レートパターンマツチングとの物体の重心、または、マ
ルチウィンドウを用いて得た画像処理結果情報を判定す
ることにより達成される。
The above purpose is to determine image processing result information obtained using template pattern matching, the center of gravity of an object with template pattern matching, or multi-window on a binary image rotationally corrected by the principal axis of inertia. This is achieved by

〔作用〕[Effect]

テンプレートパターンマツチングは、2値画像に対して
、テンプレートの内容と最も一致する点の座標値と一致
画素数を抽出するように動作する。
Template pattern matching operates on a binary image to extract the coordinate values and number of matching pixels of a point that most matches the content of a template.

これによって、座標値や、−数面素数は、2値画像中の
物体が正向きの場合と逆向きの場合とにより値が異なる
ので、向きを判定できる。
As a result, the orientation can be determined because the coordinate values and the -number plane prime number differ depending on whether the object in the binary image is oriented in the forward direction or in the opposite direction.

また、マルチウィンドウは、ウィンドウ内の物体の面積
や端辺座標値を求めるように動作し、これにより、物体
の向きの正逆で値が異なるので向きを判定できる。
Furthermore, the multi-window operates to obtain the area and edge coordinate values of the object within the window, and because the values differ depending on whether the object is oriented in the forward or reverse direction, the orientation can be determined.

〔実施例〕〔Example〕

以下、本発明の詳細な説明する。 The present invention will be explained in detail below.

第3図に、ハードウェア構成を示しており、画像処理装
置14に、対象物51の画像を入力するための映像入力
装置15を接続しており、画像処理を実行する画像処理
プロセッサ13および2値画像を格納する2値画像メモ
リ12を有し、このハードウェアを用いて、以下を実現
する。
FIG. 3 shows a hardware configuration in which a video input device 15 for inputting an image of an object 51 is connected to an image processing device 14, and image processing processors 13 and 2 that execute image processing. It has a binary image memory 12 that stores value images, and uses this hardware to realize the following.

まず、全体の動作について説明する。画像デーダを取込
む手段により取込んだ、画像データを2値化手段により
2値化し、第3図の2値画像メモリ12へ格納する9第
2図に格納した2値の物体画像8の状態を示しており、
物体の方向を求める手段により方向を求め、あらかじめ
求めておいた基準画像6の物体の方向との差から回転補
正する角度を決定し、物体画像8を回転、移動する手段
により回転、移動し、この後、180°の回転が必要か
否かを判定し、補正が必要な場合に再度180°の回転
を行う手段により第3図の基準画像6と同位置、同向き
の画像を得る。
First, the overall operation will be explained. The image data captured by the image data capture means is binarized by the binarization means and stored in the binary image memory 12 shown in FIG. 3. 9 State of the binary object image 8 stored in FIG. 2 It shows
The direction is determined by means for determining the direction of the object, the angle for rotation correction is determined from the difference from the direction of the object in the reference image 6 determined in advance, and the object image 8 is rotated and moved by means for rotating and moving, Thereafter, it is determined whether or not a rotation of 180 degrees is necessary, and if correction is necessary, the image is rotated by 180 degrees again to obtain an image at the same position and in the same direction as the reference image 6 in FIG.

次に、物体の方向を求める手段と回転、移動する手段に
ついて第2図により説明する。物体50の方向は慣性主
軸により求めることができ、回転する角度は、あらかじ
め求めておいた基準の慣性主#7と物体の慣性主@9と
の差により求まる。
Next, the means for determining the direction of the object and the means for rotating and moving the object will be explained with reference to FIG. The direction of the object 50 can be determined by the principal axis of inertia, and the rotation angle is determined by the difference between the reference principal inertia #7 determined in advance and the principal inertia @9 of the object.

このとき、物体の向きが異なっていても、物体の慣性主
軸9は同じであることがあり、回転補正角は回転補正角
θ110または回転補正角θ211との区別ができない
ため、いずれか一方の角度のみでアフィン変換により回
転補正を行う。このとき、′−心)を得る手段を用いる
ことにより、基準画像6との位置ずれを検出し、位置補
正も同時に行う。
At this time, even if the orientation of the object is different, the main axis of inertia 9 of the object may be the same, and the rotation correction angle cannot be distinguished from the rotation correction angle θ110 or the rotation correction angle θ211, so either one of the angles Rotation correction is performed using affine transformation. At this time, by using a means for obtaining ′-center), a positional deviation with respect to the reference image 6 is detected, and positional correction is also performed at the same time.

上記により、回転、位置補正した画像を第1図に示す。FIG. 1 shows an image that has been rotated and position corrected as described above.

これより、180°回転補正が必要か否か判定し補正が
必要な場合に回転補正する手段の具体的実施例について
説明する。
Hereinafter, a specific embodiment of a means for determining whether or not 180° rotation correction is necessary and performing rotation correction when correction is necessary will be described.

■テンプレートパターンマツチング法 第1−図にテンプレートパターンマツチングを用いた回
転補正手段を示している。2値画像1中の正向き物体2
の形状にのみ一致するテンプレート5をあらかじめ作成
しておき、そのテンブレー1〜5を用いたテンプレート
パターンマツチングを2値画像1に対して実行すると、
最も一致する位置での一致画素数を求めることができる
。正向き物体2に対して実行したときの最大一致数を8
1逆向き物体3に対して実行したときの最大一致数を8
2とすると、その関係はSl>82となる。ここで、正
向きか逆向きかを判別する基準値をtとすると、Sl>
t>Szを常時満足するようにtを設定しておき、2値
画像1に対して、テンプレートパターンマツチングを実
行したときの最大一致数Sが、S)i、ならば何も実行
しないで、S〈tならば180°回転補正4をアフィン
変換で実行するアルゴリズムにより、180°の回転補
正が必要か否か判定し、補正が必要な場合に回転補正す
る手段を実現する。
(2) Template pattern matching method Figure 1 shows a rotation correction means using template pattern matching. Positive object 2 in binary image 1
If you create a template 5 in advance that matches only the shape of , and perform template pattern matching on the binary image 1 using templates 1 to 5,
The number of matching pixels at the most matching position can be determined. The maximum number of matches when executed for the forward facing object 2 is 8.
1 The maximum number of matches when executed for the backward object 3 is 8
2, the relationship becomes Sl>82. Here, if the reference value for determining whether the direction is forward or backward is t, then Sl>
Set t so that t>Sz is always satisfied, and if the maximum number of matches S when performing template pattern matching on binary image 1 is S)i, do nothing. , S<t, an algorithm that executes 180° rotation correction 4 by affine transformation is used to determine whether or not 180° rotation correction is necessary, and to realize means for performing rotation correction when correction is necessary.

■複数テンプレートパターンマツチング法第4図に複数
テンプレートパターンマツチング法を用いた回転補正手
段を示す。正向き画像16中の物体50の各々の箇所に
マツチングする第1テンプレート18、第2テンプレー
ト19および逆向き逆向き画像17中の物体50の各々
の箇所にマツチングする第3テンプレート20、第4テ
ンプレート21をあらかじめ作成しておき、上記■テン
プレートパターンマツチング法と同様にテンプレートパ
ターンマツチングを実行し、各々の最大一致数を判定す
るアルゴリズムにより、180゜の回転補正手段を実現
する。また1本手段には、丁゛\ 、正向き画像16の場合には、第1テンプレートが最も
一致した座標(Xz 、 Yt )と第2テンプレート
が最も一致した座標(Xz 、 Yz )との差異と、
基準画像に対する同2種テンプレートが最も一致した座
標の差異とを比較することにより、基準画像との微小角
ずれをも検出でき、この微小角ずれを補正する効果もあ
る。
(2) Multiple Template Pattern Matching Method FIG. 4 shows a rotation correction means using multiple template pattern matching method. A first template 18 and a second template 19 that match each location of the object 50 in the forward image 16, and a third template 20 and a fourth template that match each location of the object 50 in the reverse image 17. 21 is created in advance, template pattern matching is performed in the same manner as the above-mentioned template pattern matching method, and the 180° rotation correction means is realized by an algorithm that determines the maximum number of matches. In addition, one means is to calculate the difference between the coordinates (Xz, Yt) that most match the first template and the coordinates (Xz, Yz) that most match the second template in the case of the forward-facing image 16. and,
By comparing the coordinate difference between the two types of templates that most closely match the reference image, it is possible to detect even a small angular deviation from the reference image, and there is also the effect of correcting this small angular deviation.

■テンプレートパターンマツチングと重心法第5図にテ
ンプレートパターンマツチングと重心法を用いた回転補
正手段を示す。正向き画像16中の物体50の図示位置
にマツチングする正向き用テンプレート23と逆向き画
像17中の物体50の図示位置にマツチングする逆向き
用テンプレート24をあらかじめ作成しておき、上記■
テンプレートパターンマツチング法と同様にテンプレー
トパターンマツチングを実行し、各々の最大一致数を判
定するアルゴリズムにより、180゜の回転補正手段を
実現する。また、このとき、物体50の重心22を求め
ておき、テンプレートが最も一致した座標との相対位置
関係を、基準画像の相対位置関係と比較することにより
上記■複数テンプレートパターンマツチング法と同じく
微小′浄ずれを補正する効果がある。
■Template pattern matching and centroid method FIG. 5 shows a rotation correction means using template pattern matching and centroid method. A forward template 23 that matches the illustrated position of the object 50 in the forward image 16 and a reverse template 24 that matches the illustrated position of the object 50 in the reverse image 17 are created in advance, and the above
The 180° rotation correction means is realized by an algorithm that executes template pattern matching in the same manner as the template pattern matching method and determines the maximum number of matches. In addition, at this time, the center of gravity 22 of the object 50 is determined and the relative positional relationship with the coordinates where the template most closely matches is compared with the relative positional relationship of the reference image. 'It has the effect of correcting misalignment.

■マルチウィンドウ法 第6図にマルチウィンドウ法を用いた回転補正手段を示
す。正向き画像16中の物体50に対して、図示位置に
第1ウインドウ25、第2ウインドウ26、第3ウイン
ドウ27のウィンドウを設定し、各ウィンドウ内にあ゛
る物体50の面積、端辺座標、重心等の情報を計測し、
基準画像の情報と比較し、判定するアルゴリズムにより
180゜の回転補正手段を実現する。ここで、逆向き画
像17に使用するウィンドウは、正向き画像のウィンド
ウと同じものであり、取得する情報の値が正向きの場合
と異なるため、正逆の判定を可能としている。なお、本
方法においても、微小角ずれを補正する効果がある。
■Multi-window method Figure 6 shows a rotation correction means using the multi-window method. For the object 50 in the forward-facing image 16, a first window 25, a second window 26, and a third window 27 are set at the illustrated positions, and the area and edge coordinates of the object 50 within each window are calculated. , measure information such as center of gravity,
A 180° rotation correction means is realized by an algorithm that makes a decision by comparing information with the reference image. Here, the window used for the reverse image 17 is the same as the window for the forward image, and since the value of the information to be acquired is different from that for the forward image, it is possible to determine whether the image is forward or reverse. Note that this method also has the effect of correcting minute angular deviations.

最後に180°の回転補正を組み合わせた、オートアフ
ィン変換手法の一連の動作について、第7図および第8
図により説明する。第7図は、オートアフィン変換手法
のフロー図であり、本図のツーに従ったイメージ図を第
8図に示す。第8図゛β取込前A画像25.取込前B画
像26および取込画像27で示すように、物体50が、
外力または、自刃で動く、あるいは、映像入力装置が動
くことより、画像処理画面内外に物体50が移動してい
る場合、物体50の面積等が規定内になったとき自動的
に画像を取込み2値化し、取込画像27とする(自動取
込)。取込画像27に対し、物体の方向を求める手段お
よび画像を回転、移動する手段により回転補正画像28
を作成し、上記180aの回転補正が必要か否か判定し
、補正が必要な場合に回転補正する手段により180°
回転補正画像29を作成する。ただし、判定の結果18
0°回転補正が不要な場合には回転補正画像28を最終
画像とする。これにより、画像認識を行うのに最適な画
像を自動的に得ることが可能である。
Finally, Figures 7 and 8 show a series of operations of the autoaffine transformation method that combines 180° rotation correction.
This will be explained using figures. FIG. 7 is a flowchart of the autoaffine transformation method, and FIG. 8 shows an image diagram according to the steps in this figure. Figure 8 A image 25 before β import. As shown in the pre-capturing B image 26 and the captured image 27, the object 50 is
If the object 50 is moving in or out of the image processing screen due to external force, movement by its own blade, or movement of the video input device, the image will be automatically captured when the area etc. of the object 50 falls within the specified range. It is converted into a value and used as a captured image 27 (automatic capture). A rotationally corrected image 28 is created with respect to the captured image 27 by a means for determining the direction of the object and a means for rotating and moving the image.
180°, determines whether or not the rotation correction of the above 180a is necessary, and performs rotation correction if correction is necessary.
A rotation corrected image 29 is created. However, as a result of judgment 18
If 0° rotation correction is not required, the rotation corrected image 28 is set as the final image. Thereby, it is possible to automatically obtain an optimal image for image recognition.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、物体の向きに制約をうけることなく回
転補正ができるので1画像処理装置の適用分野が広がる
効果がある。
According to the present invention, since rotation correction can be performed without being restricted by the orientation of an object, there is an effect that the field of application of one image processing device is expanded.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図および第4図〜第8図は具体的実施例の説明図、
第2図は従来方式の説明図、第3図はハードウェア構成
の説明図である。 1・・・2値画像、2・・・正向き物体、3・・・逆向
き物体、4・・・1.80°回転補正、5・・・テンプ
レート。
FIG. 1 and FIGS. 4 to 8 are explanatory diagrams of specific embodiments,
FIG. 2 is an explanatory diagram of the conventional system, and FIG. 3 is an explanatory diagram of the hardware configuration. 1... Binary image, 2... Forward object, 3... Reverse object, 4... 1.80° rotation correction, 5... Template.

Claims (1)

【特許請求の範囲】 1、画像データを取込む手段と、取込んだ画像データを
2値化する手段と、2値化した画像データを格納する画
像メモリを有し、画像中の物体の方向を求める手段と、
画像を回転・移動する手段より成る画像処理において、
180°の回転補正が必要か否か判定し、補正が必要な
場合に補正する手段を設けたことを特徴とするオートア
フィン変換処理方式。 2、請求の範囲第1項において、自動取込手段を組み合
わせることを特徴とする画像処理のオートアフィン変換
処理方式。
[Claims] 1. A means for capturing image data, a means for binarizing the captured image data, and an image memory for storing the binarized image data; a means to find
In image processing that consists of means for rotating and moving images,
An auto-affine transformation processing method characterized by providing means for determining whether or not a 180° rotation correction is necessary and for correcting the correction when the correction is necessary. 2. An auto-affine transformation processing method for image processing according to claim 1, characterized in that it is combined with an automatic capture means.
JP62018452A 1987-01-30 1987-01-30 Automatic affine transformation processing system Pending JPS63187374A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62018452A JPS63187374A (en) 1987-01-30 1987-01-30 Automatic affine transformation processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62018452A JPS63187374A (en) 1987-01-30 1987-01-30 Automatic affine transformation processing system

Publications (1)

Publication Number Publication Date
JPS63187374A true JPS63187374A (en) 1988-08-02

Family

ID=11972019

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62018452A Pending JPS63187374A (en) 1987-01-30 1987-01-30 Automatic affine transformation processing system

Country Status (1)

Country Link
JP (1) JPS63187374A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7961458B2 (en) 2008-09-01 2011-06-14 Sony Corporation Electronic apparatus and electronic apparatus manufacturing method
CN108871185A (en) * 2018-05-10 2018-11-23 苏州大学 Method, apparatus, equipment and the computer readable storage medium of piece test

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7961458B2 (en) 2008-09-01 2011-06-14 Sony Corporation Electronic apparatus and electronic apparatus manufacturing method
CN108871185A (en) * 2018-05-10 2018-11-23 苏州大学 Method, apparatus, equipment and the computer readable storage medium of piece test
CN108871185B (en) * 2018-05-10 2020-12-29 苏州大学 Method, device and equipment for detecting parts and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN109977770B (en) Automatic tracking shooting method, device, system and storage medium
CN106650682B (en) Face tracking method and device
US9049397B2 (en) Image processing device and image processing method
JP4459788B2 (en) Facial feature matching device, facial feature matching method, and program
JP2012155391A (en) Posture state estimation device and posture state estimation method
US7983453B2 (en) Verification apparatus, verification method and program
EP4060980A1 (en) Method and device for generating vehicle panoramic surround view image
CN111723801B (en) Method and system for detecting and correcting target in fisheye camera picture
CN111507908A (en) Image correction processing method, device, storage medium and computer equipment
CN113393505A (en) Image registration method, visual positioning method, related device and equipment
US8903124B2 (en) Object learning method, object tracking method using the same, and object learning and tracking system
JP2003346158A (en) Face area tracking method by face image
JP2000123186A (en) Object recognizing device
WO2020037466A1 (en) Image matching method and visual system
JP2000123186A5 (en) Object recognition apparatus and object recognition method
JPS63187374A (en) Automatic affine transformation processing system
Chew et al. Panorama stitching using overlap area weighted image plane projection and dynamic programming for visual localization
KR20090115738A (en) Information extracting method, registering device, collating device and program
CN106709942B (en) Panorama image mismatching elimination method based on characteristic azimuth angle
JP3422147B2 (en) Position shift amount detecting device and image measuring device
JP3427230B2 (en) Image processing device
JP2013029996A (en) Image processing device
JP3684606B2 (en) Pattern recognition method
CN112073633B (en) Data processing method and system
JP2002008028A (en) Pattern matching method and device therefor