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

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP5254545B2
JP5254545B2 JP2006342483A JP2006342483A JP5254545B2 JP 5254545 B2 JP5254545 B2 JP 5254545B2 JP 2006342483 A JP2006342483 A JP 2006342483A JP 2006342483 A JP2006342483 A JP 2006342483A JP 5254545 B2 JP5254545 B2 JP 5254545B2
Authority
JP
Japan
Prior art keywords
mark
image
size
measurement object
projective
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
JP2006342483A
Other languages
Japanese (ja)
Other versions
JP2008151740A (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.)
Sumitomo Mitsui Construction Co Ltd
Original Assignee
Sumitomo Mitsui Construction Co Ltd
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 Sumitomo Mitsui Construction Co Ltd filed Critical Sumitomo Mitsui Construction Co Ltd
Priority to JP2006342483A priority Critical patent/JP5254545B2/en
Publication of JP2008151740A publication Critical patent/JP2008151740A/en
Application granted granted Critical
Publication of JP5254545B2 publication Critical patent/JP5254545B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、被写体の寸法を測定するための画像処理を行なう画像処理装置、及び画像処理方法に関する。     The present invention relates to an image processing apparatus and an image processing method for performing image processing for measuring the size of a subject.

近年、デジタルカメラにて撮影した画像を使って被写体(本明細書において“計測対象物”とする)の寸法を計測するようにした技術が種々の分野で注目されている(例えば、特許文献1参照。)。     In recent years, a technique for measuring the size of a subject (referred to as a “measurement object” in the present specification) using an image taken with a digital camera has attracted attention in various fields (for example, Patent Document 1). reference.).

また、本発明者らも、次のような各工程を実施して寸法測定等を実際に行なっている。
(1) 計測対象物に正対する位置にデジタルカメラを設置
(2) 該デジタルカメラと該計測対象物との距離(撮影距離)を実測
(3) 計測対象物の表面(撮影される側の面)に、所定形状のターゲットマーク(以下、“基準点”とする)を少なくとも4個貼付
(4) 貼付した基準点の位置の測定
(5) 撮影した画像をパソコンに転送
(6) 前記実測して得たデータに基づき、画像の射影変換処理
(7) 画像を使って、計測対象物の寸法を測定
特開2001−133226号公報
In addition, the present inventors have actually performed the dimension measurement and the like by performing the following steps.
(1) Install a digital camera in a position directly opposite the measurement object
(2) Measure the distance (photographing distance) between the digital camera and the measurement object
(3) At least four target marks (hereinafter referred to as “reference points”) of a predetermined shape are affixed to the surface of the measurement object (surface to be photographed).
(4) Measuring the position of the attached reference point
(5) Transfer captured images to a computer
(6) Projective image transformation processing based on the data obtained by actual measurement
(7) Use the image to measure the dimensions of the measurement object
JP 2001-133226 A

しかしながら、上記方法では、撮影距離の実測や、基準点の貼付や、基準点の位置測定等を全ての計測対象物について行なわなければならず、作業が大変であった。     However, in the above method, the actual measurement of the shooting distance, the attachment of the reference point, the position measurement of the reference point, and the like have to be performed for all the measurement objects, which is difficult.

本発明は、寸法測定等のための画像処理を効率的に行なうことのできる画像処理装置を提供することを目的とするものである。     An object of the present invention is to provide an image processing apparatus capable of efficiently performing image processing for dimension measurement or the like.

また、本発明は、寸法測定等のための画像処理を効率的に行なうことのできる画像処理方法を提供することを目的とするものである。     It is another object of the present invention to provide an image processing method capable of efficiently performing image processing for dimension measurement or the like.

請求項1に係る発明は、図1及び図9に例示するものであって、画像に写っている計測対象物(A)が正面を向いて見えるようにする射影変換工程、及び該画像の拡大縮小工程を実施して所定の縮尺のオルソ画像を得る画像処理装置(4)において、
前記計測対象物(A)の正面部分(B)に掲示された状態で写っている第1マーク(3)の画像中の形状から射影変換処理に必要な変換係数を算出する変換係数算出手段(41)と、
前記変換係数算出手段(41)が算出した変換係数に基づき、前記計測対象物(A)が正面を向いた状態となるように画像の射影変換処理を行なう射影変換手段(42)と、
前記第1マーク(3)の画像上での目標サイズを設定する目標サイズ設定手段(43)と、
前記第1マーク(3)の画像上での実際のサイズを算出するマークサイズ算出手段(44)と、
前記目標サイズ設定手段(43)及び前記マークサイズ算出手段(44)からのデータに基づき、前記第1マーク(3)の画像上でのサイズが前記目標サイズに略一致するように画像の拡大又は縮小を行なう拡大縮小処理手段(45)と、を備え
前記目標サイズ設定手段(43)は、
前記第1マーク(3)と略同一形状の基準マーク(13)、及び位置を特定するための少なくとも4個の第2マーク(2A,2B,2C,2D)が、前記計測対象物(A )と略同一形状の基準対象物(A )の正面部分(B )に掲示された状態で写っている画像について、前記第2マーク(2A,2B,2C,2D)の位置及びデジタルカメラから前記基準対象物(A )までの撮影距離(L)の測定結果に基づき、前記基準対象物(A )が正面を向いて見えるように画像の射影変換処理を行なう射影変換部(434)と、
該射影変換処理をした画像について、前記基準マーク(13)の位置を自動認識するマーク認識部(431)と、
該認識した基準マーク(13)の大きさを算出するマークサイズ算出部(432)と、
該算出した基準マーク(13)の大きさを記憶するマークサイズ記憶部(433)と、を有することを特徴とする。
The invention according to claim 1 is illustrated in FIG. 1 and FIG. 9, and a projective transformation step for making the measurement object (A 2 ) shown in the image appear facing the front, In the image processing apparatus (4) that performs an enlargement / reduction process to obtain an ortho-image of a predetermined scale,
Conversion coefficient calculation for calculating a conversion coefficient necessary for projective conversion processing from the shape in the image of the first mark (3) shown in the state posted on the front part (B 2 ) of the measurement object (A 2 ) Means (41);
Projection conversion means (42) for performing a projective conversion process on the image so that the measurement object (A 2 ) faces forward based on the conversion coefficient calculated by the conversion coefficient calculation means (41);
Target size setting means (43) for setting a target size on the image of the first mark (3);
Mark size calculating means (44) for calculating an actual size of the first mark (3) on the image;
Based on the data from the target size setting means (43) and the mark size calculation means (44), the image is enlarged or reduced so that the size of the first mark (3) on the image substantially matches the target size. An enlargement / reduction processing means (45) for performing reduction ,
The target size setting means (43)
The reference mark (13) having substantially the same shape as the first mark (3) and at least four second marks (2A, 2B, 2C, 2D) for specifying the position are the measurement object (A 2). ) And the position of the second mark (2A, 2B, 2C, 2D) and the digital camera in the image posted on the front part (B 1 ) of the reference object (A 1 ) having substantially the same shape as Based on the measurement result of the shooting distance (L) from the reference object (A 1 ) to the reference object (A 1 ), a projective conversion unit (434) that performs a projective conversion process of the image so that the reference object (A 1 ) looks forward )When,
A mark recognition unit (431) for automatically recognizing the position of the reference mark (13) for the image subjected to the projective transformation process;
A mark size calculation unit (432) for calculating the size of the recognized reference mark (13);
A mark size storage unit (433) for storing the size of the calculated reference mark (13) .

請求項2に係る発明は、請求項1に係る発明において、前記第1マーク(3)は、前記計測対象物(A)の表面にて二次元方向に拡がる形状であることを特徴とする。 The invention according to claim 2 is the invention according to claim 1, wherein the first mark (3) has a shape extending in a two-dimensional direction on the surface of the measurement object (A 2 ). .

請求項に係る発明は、画像に写っている計測対象物(A)が正面を向いて見えるようにする射影変換工程(図2のS1参照)、及び該画像の拡大縮小工程(同図のS2参照)を実施して所定の縮尺のオルソ画像を得る画像処理方法において、
前記計測対象物(A)の正面部分(B)に掲示された状態で写っている第1マーク(3)の画像中の形状から射影変換処理に必要な変換係数を算出する工程(図3のS11参照)と、
該算出した変換係数に基づき、前記計測対象物(A)が正面を向いた状態となるように画像の射影変換処理を行なう工程(同図のS12参照)と、
前記第1マーク(3)の画像上での目標サイズを設定する工程(図5のS21参照)と、
前記第1マーク(3)の画像上での実際のサイズを算出する工程(図5のS22参照)と、
前記第1マーク(3)の画像上でのサイズが前記目標サイズに略一致するように画像の拡大又は縮小を行なう工程(図5のS23参照)と、を備え
前記第1マーク(3)の画像上での目標サイズを設定する工程(図5のS21参照)は、
前記第1マーク(3)と略同一形状の基準マーク(13)を、前記計測対象物(A )と略同一形状の基準対象物(A )の正面部分(B )に掲示する工程(図8のS211参照)と、
該正面部分(B )における位置を特定するための第2マーク(2A,2B,2C,2D)を該正面部分(B )に少なくとも4個掲示する工程(図8のS215参照)と、
該掲示した第2マーク(2A,2B,2C,2D)の位置を測定する工程(図8のS216参照)と、
前記基準対象物(A )を前記基準マーク(13)及び前記第2マーク(2A,2B,2C,2D)と共にデジタルカメラ(1)にて撮影する工程(図8のS212参照)と、
該デジタルカメラ(1)から前記基準対象物(A )までの撮影距離(L)を測定する工程(図8のS217参照)と、
前記第2マーク(2A,2B,2C,2D)の位置及び前記撮影距離の測定結果に基づき、前記基準対象物(A )が正面を向いて見えるように前記撮影して得た画像の射影変換処理を行なう工程(図8のS218参照)と、
該射影変換処理した後の画像に写っている基準マーク(13)のサイズを算出すると共に、該算出して得たサイズを前記目標値として記憶させる工程(図8のS213,S214参照)と、からなることを特徴とする。
The invention according to claim 3 is a projective transformation step (see S1 in FIG. 2) that makes the measurement object (A 2 ) reflected in the image appear to face the front, and an enlargement / reduction step (see FIG. 2). In the image processing method for obtaining an ortho-image of a predetermined scale by performing S2)
A step of calculating a conversion coefficient necessary for projective conversion processing from the shape in the image of the first mark (3) shown in the state posted on the front portion (B 2 ) of the measurement object (A 2 ) (FIG. 3 S11), and
Based on the calculated conversion coefficient, a step of performing projective conversion processing of the image so that the measurement object (A 2 ) is in a front-facing state (see S12 in the figure);
Setting a target size on the image of the first mark (3) (see S21 in FIG. 5);
Calculating the actual size of the first mark (3) on the image (see S22 in FIG. 5);
A step of enlarging or reducing the image so that the size of the first mark (3) on the image substantially matches the target size (see S23 in FIG. 5) ,
The step of setting the target size on the image of the first mark (3) (see S21 in FIG. 5)
A step of posting the reference mark (13) having substantially the same shape as the first mark (3 ) on the front portion (B 1 ) of the reference object (A 1 ) having substantially the same shape as the measurement object (A 2 ). (See S211 in FIG. 8);
Second mark for specifying a position on the positive side portion (B 1) (2A, 2B , 2C, 2D) and the step of posting at least four to positive surface portion (B 1) (see S215 in FIG. 8),
A step of measuring the position of the posted second mark (2A, 2B, 2C, 2D) (see S216 in FIG. 8);
Photographing the reference object (A 1 ) with the digital mark (1) together with the reference mark (13) and the second mark (2A, 2B, 2C, 2D) (see S212 in FIG. 8);
Measuring a shooting distance (L ) from the digital camera (1) to the reference object (A 1 ) (see S217 in FIG. 8);
Based on the measurement result of the position of the second mark (2A, 2B, 2C, 2D) and the photographing distance, the projection of the image obtained by photographing so that the reference object (A 1 ) can be seen facing the front. A step of performing a conversion process (see S218 in FIG. 8);
Calculating the size of the reference mark (13) shown in the image after the projective transformation process and storing the calculated size as the target value (see S213 and S214 in FIG. 8); characterized in that it consists of.

請求項に係る発明は、請求項に係る発明において、前記第1マーク(3)は、前記計測対象物(A)の表面にて二次元方向に拡がる形状であることを特徴とする。 The invention according to claim 4 is the invention according to claim 3 , wherein the first mark (3) has a shape that extends in a two-dimensional direction on the surface of the measurement object (A 2 ). .

なお、括弧内の番号などは、図面における対応する要素を示す便宜的なものであり、従って、本記述は図面上の記載に限定拘束されるものではない。     Note that the numbers in parentheses are for the sake of convenience indicating the corresponding elements in the drawings, and therefore the present description is not limited to the descriptions on the drawings.

請求項1,2,5及び6に係る発明によれば、与えられているデータ(目標サイズ)と画像から取得できるデータ(変換係数)とにより必要な画像を取得でき、データ取得のために計測対象物を実測したりする必要が無いため、簡単な作業で効率良く寸法測定等を行なうことができる。     According to the first, second, fifth, and sixth aspects of the present invention, a necessary image can be acquired from given data (target size) and data (conversion coefficient) that can be acquired from the image, and measurement is performed for data acquisition. Since there is no need to actually measure the object, it is possible to perform dimension measurement and the like efficiently with a simple operation.

請求項3,4,7及び8に係る発明によれば、画像を所定の縮尺に拡大又は縮小する際のデータ(目標サイズ)を正確に取得することができ、寸法測定精度を高めることが出来る。     According to the inventions according to claims 3, 4, 7, and 8, data (target size) for enlarging or reducing an image to a predetermined scale can be accurately acquired, and the dimensional measurement accuracy can be increased. .

以下、図1乃至図9に沿って、本発明を実施するための最良の形態について説明する。ここで、図1は、本発明に係る画像処理方法により処理される画像の一例を示す模式図であり、図2は、本発明に係る画像処理方法の全体の流れを示すフローチャート図であり、図3は、射影変換工程の詳細の一例を示すフローチャート図であり、図4は、第1マークが画像処理に伴って変形して行く様子の一例を示す模式図である。また、図5は、拡大縮小工程の詳細の一例を示すフローチャート図であり、図6は、基準対象物を撮影するときの様子を説明するための斜視図であり、図7は、第1マークの目標サイズを設定する工程の一例を示すフローチャート図であり、図8は、第1マークの目標サイズを設定する工程の他の例を示すフローチャート図であり、図9は、本発明に係る画像処理装置の構成の一例を示すブロック図である。     The best mode for carrying out the present invention will be described below with reference to FIGS. Here, FIG. 1 is a schematic diagram illustrating an example of an image processed by the image processing method according to the present invention, and FIG. 2 is a flowchart illustrating an overall flow of the image processing method according to the present invention. FIG. 3 is a flowchart showing an example of details of the projective transformation process, and FIG. 4 is a schematic diagram showing an example of a state in which the first mark is deformed along with the image processing. FIG. 5 is a flowchart showing an example of the details of the enlargement / reduction process, FIG. 6 is a perspective view for explaining a situation when the reference object is photographed, and FIG. 7 is a first mark. FIG. 8 is a flowchart showing another example of the process of setting the target size of the first mark, FIG. 8 is a flowchart showing another example of the process of setting the target size of the first mark, and FIG. 9 is an image according to the present invention. It is a block diagram which shows an example of a structure of a processing apparatus.

本発明に係る画像処理方法は、
・ 画像に写っている計測対象物(例えば、図1に符号Aで示すものの内、一番手前側のもの)が正面を向いて見えるようにする射影変換工程(図2のS1参照)と、
・ 該画像の拡大縮小工程(図2のS2参照)と、
を少なくとも実施するものである。これにより、所定の縮尺のオルソ画像を得ることができるので、計測対象物の所定部分の寸法を測定したり、図面を作成したりすることができる(図1のS3)。なお、上述の射影変換工程と拡大縮小工程とは順番に実施するようにしても、同時に実施するようにしてもどちらでも良い。
An image processing method according to the present invention includes:
· Measurement object contained in the image (for example, among those indicated at A 2 in FIG. 1, the frontmost side ones) and projective transformation process is to appear facing the front (S1 see FIG. 2),
A scaling process of the image (see S2 in FIG. 2);
At least. Thereby, since an ortho image of a predetermined scale can be obtained, it is possible to measure a dimension of a predetermined portion of the measurement object or create a drawing (S3 in FIG. 1). Note that the projective transformation process and the enlargement / reduction process described above may be performed sequentially or may be performed simultaneously.

ところで、上述の射影変換工程S1は、
・ 前記計測対象物Aの正面部分Bに掲示された状態で写っている第1マーク3の画像中の形状から射影変換処理に必要な変換係数を算出する工程(図3のS11参照)と、
・ 該算出した変換係数に基づき射影変換処理を行なう工程(図3のS12参照)と、
からなる。変換係数を求めるためには、前記第1マーク3は、デジタルカメラの撮影方向に応じて画像中の形状が変化するものでなければならず、前記計測対象物の表面(正面部分)にて二次元方向に拡がる形状であって、しかも、画像上で認識できる程度の面積でなければならない。該マーク3の形状としては、具体的には、円形や楕円形や多角形(正方形等)を挙げることができる。例えば、第1マークが円形の場合、デジタルカメラの撮影方向によっては図4(a) に示すように扁平した状態に写ることとなる。このような扁平形状をしたマークの中心位置や扁平量等から変換係数が算出され、上述の射影変換処理S12が実施されると該第1マーク3は図4(c) のような円形になる。そのときの射影変換処理S12により、計測対象物A自体は正面を向いた状態に射影変換されることとなる。なお、第1マーク3の画像中の形状(輪郭)は公知のハフ変換により求めると良い。また、この第1マーク3は、前記計測対象物と明確に区別できるような色に着色しておくと良い。具体的には、計測対象物の表面が明色の場合には第1マークの色を暗色にしておくと良く、計測対象物の表面が暗色の場合には第1マークの色を明色にしておくと良い。
By the way, the above-described projective transformation step S1 is performed as follows.
- the measurement object step of calculating a transform coefficients necessary projective transformation processing from the shape of the image of the first mark 3 that is reflected in a state of being posted in the front portion B 2 of the A 2 (see S11 in FIG. 3) When,
A projective transformation process based on the calculated transformation coefficient (see S12 in FIG. 3);
Consists of. In order to obtain the conversion coefficient, the first mark 3 must change in shape in the image according to the shooting direction of the digital camera. It must have a shape that expands in the dimensional direction and has an area that can be recognized on the image. Specific examples of the shape of the mark 3 include a circle, an ellipse, and a polygon (such as a square). For example, when the first mark is circular, depending on the shooting direction of the digital camera, it will appear flat as shown in FIG. When the conversion coefficient is calculated from the center position and flatness of the mark having such a flat shape and the above-described projective conversion processing S12 is performed, the first mark 3 becomes circular as shown in FIG. . The projective transformation step S12 at that time, the measurement object A 2 itself becomes to be projective transformation into a state of facing the front. It should be noted that the shape (contour) of the first mark 3 in the image may be obtained by a known Hough transform. The first mark 3 may be colored in a color that can be clearly distinguished from the measurement object. Specifically, when the surface of the measurement object is light, the first mark may be dark. When the surface of the measurement object is dark, the first mark is light. It is good to keep.

一方、上述の拡大縮小工程S2は、図5に例示するように、
・ 前記第1マーク3の画像上での目標サイズ(つまり、所定の縮尺のオルソ画像における前記第1マーク3の画像上のサイズ)を設定する工程S21と、
・ 前記第1マーク3の画像上での実際のサイズを算出する工程S22と、
・ 前記第1マーク3の画像上でのサイズが前記目標サイズに略一致するように画像の拡大又は縮小を行なう工程S23と、
により実施される。これにより、画像中の第1マーク3は、例えば図4(c)に示すサイズから図4(d) に示すサイズとなるように変更され、これに伴って、オルソ画像自体が適正な縮尺となる。本発明によれば、与えられているデータ(目標サイズ)と画像から取得できるデータ(変換係数)とにより必要な画像を取得でき、データ取得のために計測対象物を実測したりする必要が無いため、簡単な作業で効率良く寸法測定等を行なうことができる。
On the other hand, as described in FIG.
A step S21 of setting a target size on the image of the first mark 3 (that is, a size on the image of the first mark 3 in an ortho image of a predetermined scale);
A step S22 of calculating an actual size of the first mark 3 on the image;
A step S23 for enlarging or reducing the image so that the size of the first mark 3 on the image substantially matches the target size;
Implemented by As a result, the first mark 3 in the image is changed from, for example, the size shown in FIG. 4C to the size shown in FIG. 4D, and accordingly, the ortho image itself has an appropriate scale. Become. According to the present invention, a necessary image can be acquired from given data (target size) and data (conversion coefficient) that can be acquired from an image, and there is no need to actually measure a measurement object for data acquisition. Therefore, it is possible to perform dimension measurement and the like efficiently with a simple operation.

ここで、目標サイズを設定する方法について説明する。この目標サイズの設定は、
・ 前記計測対象物Aと略同一形状の基準対象物(図6の符号A参照)と、
・ 前記第1マーク3と略同一形状であって、前記基準対象物Aの正面部分Bに掲示された基準マーク(同図の符号13参照)と
を用いて行なうと良い。具体的には、以下の工程を実施することにより前記目標サイズの設定を行なうと良い。すなわち、
・ 前記基準対象物Aの正面部分Bに前記基準マーク13を掲示する工程(図7のS211、及び図6参照)
・ 該基準対象物Aを前記基準マーク13と共にデジタルカメラ(好ましくは1200万画素以上の解像度のもの)1にて撮影する工程(図7のS212参照)
・ 該撮影した画像データに基づき、画像に写っている基準マーク13のサイズを算出する工程(同図のS213参照)
・ 該算出して得たサイズを目標値として記憶する工程(同図のS214参照)
Here, a method for setting the target size will be described. This target size setting is
- the measurement object A 2 and the reference object having substantially the same shape as (reference symbol A 1 in FIG. 6),
- wherein a first mark 3 and substantially the same shape may be achieved by means of said reference object A posted reference mark on the front portion B 1 of 1 (reference numeral 13 see drawing). Specifically, the target size may be set by performing the following steps. That is,
The step of posting the reference mark 13 on the front part B 1 of the reference object A 1 (see S211 in FIG. 7 and FIG. 6).
Step of photographing the reference object A 1 together with the reference mark 13 with a digital camera (preferably having a resolution of 12 million pixels or more) 1 (see S212 in FIG. 7)
A step of calculating the size of the reference mark 13 in the image based on the photographed image data (see S213 in the figure)
A step of storing the size obtained by the calculation as a target value (see S214 in the figure)

なお、上述のように基準対象物Aをデジタルカメラ1にて撮影する場合、該基準対象物Aに対してデジタルカメラ1が正対している(つまり、デジタルカメラのCCD面と基準対象物の表面とが平行である)必要があるが、実際には多少の角度ズレが生じてしまう。そこで、次のような工程を実施して目標サイズの設定を行なうと良い。すなわち、
・ 前記基準対象物Aの正面部分Bに前記基準マーク13を掲示する工程(図8のS211、及び図6参照)
・ 該正面部分Bにおける位置を特定するための第2マーク2A,2B,…を該正面部分Bに少なくとも4個掲示する工程(図8のS215、及び図6参照)
・ 該掲示した第2マーク2A,2B,…の位置を測定する工程(図8のS216参照)
・ 前記基準対象物Aを前記基準マーク13及び前記第2マーク2A,2B,…と共にデジタルカメラ1にて撮影する工程(同図のS212参照)
・ 該デジタルカメラ1から前記基準対象物Aまでの撮影距離Lを測定する工程(同図のS217、及び図6参照)
・ 前記第2マーク2A,2B,…の位置及び前記撮影距離Lの測定結果に基づき、前記基準対象物Aが正面を向いて見えるように前記撮影して得た画像の射影変換処理を行なう工程(図8のS218参照)
・ 該射影変換処理した後の画像に写っている基準マーク13のサイズを算出する工程(同図のS213参照)
・ 該算出して得たサイズを前記目標値として記憶する工程(同図のS214参照)
In the case of photographing the reference object A 1 as described above with a digital camera 1, the digital camera 1 is directly opposite to said reference object A 1 (i.e., CCD surface and the reference object in a digital camera However, in practice, a slight angle deviation occurs. Therefore, it is preferable to set the target size by performing the following steps. That is,
A step of posting the reference mark 13 on the front portion B 1 of the reference object A 1 (see S211 in FIG. 8 and FIG. 6).
· Second mark 2A for specifying a position on the positive side portion B 1, 2B, ... a positive surface portion B 1 in at least four posted to step (S215 of FIG. 8, and FIG. 6)
A step of measuring the positions of the posted second marks 2A, 2B,... (See S216 in FIG. 8)
A step of photographing the reference object A 1 together with the reference mark 13 and the second marks 2A, 2B,... With the digital camera 1 (see S212 in the figure)
And processes said digital camera 1 to measure the shooting distance L to the reference object A 1 (S217 in the figure, and see FIG. 6)
· The second mark 2A, 2B, on the basis of ... the position and the measurement results of the shooting distance L, performs projective transformation processing of an image in which the reference object A 1 is obtained by the photographing to look toward the front Process (refer to S218 in FIG. 8)
A step of calculating the size of the reference mark 13 shown in the image after the projective transformation process (see S213 in the figure)
A step of storing the size obtained by the calculation as the target value (see S214 in the figure)

上述のようにした場合には、画像を所定の縮尺に拡大又は縮小する際のデータ(目標サイズ)を正確に取得することができ、寸法測定精度を高めることが出来る。     In the case described above, it is possible to accurately acquire data (target size) for enlarging or reducing an image to a predetermined scale, and to improve the dimension measurement accuracy.

なお、図6に示す第2マーク2A,2B,…は市松模様で四角形形状のものであるが、もちろんこれに限られるものではなく、座標を特定できるマークであれば他の模様及び形状であっても良い。また、上述の第1マーク3や第2マーク2A,2B,…や基準マーク13を対象物に掲示する方法には、いかなる方法を用いても良い。例えば、シート状のマークを対象物の表面に接着剤等で貼付するようにしても、或いは塗料を塗布してマークを形成しても良い。なお、このようなマークを形成する都合上、計測対象物や基準対象物の表面(マークを掲示する側の面)は平坦である必要がある。     The second marks 2A, 2B,... Shown in FIG. 6 have a checkered pattern and a rectangular shape. However, the second marks 2A, 2B,... Are not limited to this. May be. In addition, any method may be used as a method for posting the first mark 3, the second marks 2A, 2B,. For example, a sheet-like mark may be attached to the surface of the object with an adhesive or the like, or a paint may be applied to form the mark. For the convenience of forming such a mark, the surface of the measurement object or the reference object (the surface on which the mark is posted) needs to be flat.

次に、本発明の効果について説明する。     Next, the effect of the present invention will be described.

本発明によれば、上述のような射影変換工程と拡大縮小工程とによって所定の縮尺のオルソ画像(つまり、計測対象物が正面を向いて見えるような画像)が得られるので、該画像を利用して前記計測対象物の寸法を測定したり正面図を作成したりすることができる。また、それらの工程は、与えられた目標データと、前記第1マークについての画像中のデータとを利用した画像上の処理だけで実施することができ、計測対象物についての撮影距離等の実測作業は伴わないので、その分、作業の効率化を図ることができる。例えば、同一形状の製品を量産するような工場においては、基準となる製品(基準対象物)についてのデータ(第2マークの位置や撮影距離)を実測さえすれば、他の製品(計測対象物)についてはそのような実測作業は一切不要となり、非常に効率的に寸法測定等を実施することができる。以下、この点について詳述する。     According to the present invention, an ortho-image of a predetermined scale (that is, an image in which a measurement object is seen facing the front) is obtained by the projection conversion process and the enlargement / reduction process as described above. Thus, the dimensions of the measurement object can be measured and a front view can be created. In addition, these steps can be performed only by processing on the image using the given target data and the data in the image for the first mark, and the actual measurement of the shooting distance etc. for the measurement object Since no work is involved, work efficiency can be improved accordingly. For example, in a factory that mass-produces products with the same shape, as long as the data (position of the second mark and shooting distance) for the reference product (reference object) is measured, other products (measurement object) ) Is not required at all, and dimension measurement or the like can be performed very efficiently. Hereinafter, this point will be described in detail.

いま、計測対象物Aを撮影するときの撮影距離が、基準対象物Aを撮影するときの撮影距離Lと一致していないと、両画像に写っている計測対象物A及び基準対象物Aの大きさ(画像上の大きさ)が異なってしまい、計測対象物Aの寸法測定(図2のS3)にも大きな誤差を生じてしまう。一方、このような問題を解消すべく撮影距離を完全に一致させようとすると、撮影の度に撮影距離を実測しなければならず、時間や手間が掛かってしまう。特に、計測対象物Aが大型の重量物である場合には撮影距離を一致させる作業は大きな困難を伴う。本発明によれば、実際の撮影距離が一致していなくても画像上の処理で両画像に写っている計測対象物A及び基準対象物Aの大きさ(画像上の大きさ)を一致させることができるので、計測対象物Aの寸法測定を精度良く行なうことができる。また、第2マークの位置や撮影距離の実測作業は1回だけ(前記基準対象物Aについてのみ)行なえば良く、計測対象物Aを撮影する際には不要であるため、時間や手間が掛からず、作業の効率化を図ることができる。さらに、各計測対象物についての実測作業が不要となることから、測定誤差等の人為的ミスも回避できる。 Now, shooting distance when shooting a measurement object A 2 is and does not match the shooting distance L when taking reference object A 1, the measurement object A 2 and the reference object is reflected in both images The size of the object A 1 (the size on the image) is different, and a large error is generated in the dimension measurement of the measurement object A 2 (S3 in FIG. 2). On the other hand, if it is attempted to make the shooting distances completely coincide with each other in order to solve such a problem, it is necessary to actually measure the shooting distance every time shooting is performed, which takes time and labor. In particular, the work of matching the shooting distance when the measurement object A 2 is the weight of the large involves great difficulties. According to the present invention, the sizes (sizes on the image) of the measurement object A 2 and the reference object A 1 that appear in both images by the processing on the images even if the actual shooting distances do not match. it is possible to match the dimension measurement of the measurement object a 2 can be accurately. Moreover, since actual work position and shooting distance of the second mark only once (the reference object A 1 for only) may be carried out, when taking a measurement object A 2 is not required, the time and effort Therefore, work efficiency can be improved. Furthermore, since an actual measurement operation for each measurement object is not required, a human error such as a measurement error can be avoided.

次に、上述の画像処理方法を実施するのに最適な画像処理装置について説明する。     Next, an image processing apparatus optimal for carrying out the above-described image processing method will be described.

本発明に係る画像処理装置は、画像に写っている計測対象物Aが正面を向いて見えるようにする射影変換工程(図2のS1)、及び該画像の拡大縮小工程(図2のS2)を実施するものである。該画像処理装置にて処理を行なうことのできる画像は、図1に例示するように、計測対象物Aをほぼ正面側から撮影したものであって、しかも、第1マーク3が該計測対象物Aの正面部分Bに掲示された状態で写っているものである。 The image processing apparatus according to the present invention, the projective transformation process (S1 in FIG. 2), and scaling process of the image measurement object is reflected in the image A 2 is visible facing the front (in FIG. 2 S2 ). The image that can be processed by the image processing apparatus is an image of the measurement object A 2 taken almost from the front side as illustrated in FIG. 1, and the first mark 3 is the measurement object. in which is reflected in a state of being posted in the front portion B 2 of the object a 2.

該画像処理装置は、図9に符号4で例示するものであって、以下の各手段を備える。すなわち、
・ 前記第1マーク3の画像中の形状(例えば、図4(a) 参照)から射影変換処理に必要な変換係数を算出する変換係数算出手段41(図3のS11参照)
・ 前記変換係数算出手段41が算出した変換係数に基づき射影変換処理を行なう射影変換手段42(図3のS12参照)
・ 前記第1マーク3の画像上での目標サイズを設定する目標サイズ設定手段43(図5のS21参照)
・ 前記第1マーク3の画像上での実際のサイズを算出するマークサイズ算出手段44(同図のS22参照)
・ 前記目標サイズ設定手段43及び前記マークサイズ算出手段44からのデータに基づき、前記第1マーク3の画像上でのサイズが前記目標サイズに略一致するように画像の拡大又は縮小を行なう拡大縮小処理手段45(同図のS23参照)
The image processing apparatus is exemplified by reference numeral 4 in FIG. 9 and includes the following units. That is,
Conversion coefficient calculation means 41 (see S11 in FIG. 3) that calculates a conversion coefficient necessary for projective conversion processing from the shape of the first mark 3 in the image (for example, see FIG. 4A).
Projective conversion means 42 for performing projective conversion processing based on the conversion coefficient calculated by the conversion coefficient calculation means 41 (see S12 in FIG. 3)
Target size setting means 43 for setting a target size on the image of the first mark 3 (see S21 in FIG. 5)
Mark size calculation means 44 for calculating the actual size of the first mark 3 on the image (see S22 in the figure)
Based on data from the target size setting unit 43 and the mark size calculation unit 44, the image is enlarged or reduced so that the size of the first mark 3 on the image substantially matches the target size. Processing means 45 (see S23 in the figure)

ところで、前記目標サイズ設定手段43による目標サイズの設定は、所定の画像データ(具体的には、正面部分Bに上述の基準マーク13が掲示された前記基準対象物Aの画像データ)を用いて行なうと良い。その場合、目標サイズ設定手段43は、
・ 画像における基準マーク13の位置を自動認識するマーク認識部431と、
・ 該認識した基準マーク13の大きさを算出するマークサイズ算出部432と、
・ 該算出した基準マーク13の大きさを記憶するマークサイズ記憶部433と、
により構成すると良い。
By the way, the setting of the target size by the target size setting means 43 is based on predetermined image data (specifically, image data of the reference object A 1 on which the reference mark 13 is posted on the front portion B 1 ). It is good to use. In that case, the target size setting means 43
A mark recognition unit 431 that automatically recognizes the position of the reference mark 13 in the image;
A mark size calculation unit 432 that calculates the size of the recognized reference mark 13;
A mark size storage unit 433 that stores the size of the calculated reference mark 13;
It is good to comprise.

なお、上述のように基準対象物Aをデジタルカメラ1にて撮影する場合、該基準対象物Aに対してデジタルカメラ1が正対している(つまり、デジタルカメラのCCD面と基準対象物の表面とが平行である)必要があるが、実際には多少の角度ズレは残ってしまう。そのような場合の目標サイズの設定には、以下のデータを用いると良い。
・ 正面部分に上述の基準マーク13及び第2マーク2A,…が掲示された前記基準対象物Aの画像データ
・ 各第2マーク2A,…の位置データ
・ デジタルカメラ1から前記基準対象物Aまでの撮影距離Lの実測データ
In the case of photographing the reference object A 1 as described above with a digital camera 1, the digital camera 1 is directly opposite to said reference object A 1 (i.e., CCD surface and the reference object in a digital camera However, in practice, some angle deviation remains. The following data is preferably used for setting the target size in such a case.
Image data of the reference object A 1 on which the reference mark 13 and the second mark 2A,... Are posted on the front portion. Position data of each second mark 2A,. Measurement data of shooting distance L up to 1

そして、前記目標サイズ設定手段43には射影変換処理を行なう射影変換部434を設けておいて、前記第2マーク2A,…の位置及び前記撮影距離Lの測定結果に基づき、前記基準対象物Aが正面を向いて見えるように前記撮影して得た画像の射影変換を行なうようにすると良い。この場合、前記マーク認識部431は、射影変換後の基準マーク13の位置を自動認識するようにすると良い。 The target size setting means 43 is provided with a projective conversion unit 434 for performing a projective conversion process, and based on the measurement results of the position of the second marks 2A,. It is preferable to perform projective transformation of the image obtained by photographing so that 1 appears to face the front. In this case, it is preferable that the mark recognition unit 431 automatically recognizes the position of the reference mark 13 after projective transformation.

本実施例では、図6に示すようにPCセグメント(基準対象物)Aをデジタルカメラ1にて撮影すると共に所定のデータ(基準点2A,…の位置データや、撮影距離Lのデータ)を測定し、そのデータを用いて他のPCセグメント(図1の符号A参照)についての画像処理を行なった。以下、具体的に説明する。
(1) 1つ目のPCセグメント(基準対象物)Aについて作業
(1-1) デジタルカメラ1のセット、及び撮影距離の測定
In this embodiment, the predetermined data with the PC segment (reference object) A 1 as shown in FIG. 6 photographed by a digital camera 1 (reference point 2A, ... position data and the data of the shooting distance L) of measured to perform image processing for the other PC segment (see reference numeral a 2 in FIG. 1) using the data. This will be specifically described below.
(1) Work on the first PC segment (reference object) A1
(1-1) Set the digital camera 1 and measure the shooting distance

まず、図6に示すように、1つ目のPCセグメントAにほぼ正対するようにデジタルカメラ1をセットし、該デジタルカメラ1とPCセグメントAとの間の撮影距離Lを測定した。なお、本実施例においては、後述のようにセグメントの輪郭抽出を行なうので、セグメントAの背後には所定色のシート(不図示)を配置して、セグメントの輪郭を認識し易いようにした。
(1-2) 基準点(第2マーク)2の貼付、及び貼付位置の測定
First, as shown in FIG. 6, to set the digital camera 1 so as to substantially directly opposite to the first PC segment A 1, to measure the shooting distance L between the digital camera 1 and the PC segment A 1. In this embodiment, since the segment outline is extracted as described later, a sheet of a predetermined color (not shown) is arranged behind the segment A 1 so that the outline of the segment can be easily recognized. .
(1-2) Affixing the reference point (second mark) 2 and measuring the affixing position

一方、このPCセグメントAの正面(デジタルカメラ1により撮影される側の面)Bには基準点2A,2B,…を4つ貼付し、それらの位置関係を実測し座標を求めた。具体的には、
・ 左下の基準点2Bを原点としてその座標を(0,0)とし、
・ 左下の基準点2Bから右下の基準点2Dを通る仮想線をx軸とし(図11参照)、
・ 該右下の基準点2Dの座標(x,0)を求め、
・ 該x軸に直交する仮想線をy軸として、左上の基準点2Aの座標(x,y)と右上の基準点2Cの座標(x,y)を求めた。
(1-3) 円形マーク(基準マーク)13の貼付
On the other hand, the PC segment A 1 of the front (the surface to be photographed by a digital camera 1) reference point 2A in B 1, 2B, ... and four stuck, was determined by actually measuring their positional relationship coordinates. In particular,
・ The reference point 2B in the lower left is the origin and its coordinates are (0, 0).
An imaginary line passing from the lower left reference point 2B to the lower right reference point 2D is defined as the x axis (see FIG. 11),
Find the coordinates (x 1 , 0) of the reference point 2D in the lower right,
The coordinates (x 2 , y 2 ) of the upper left reference point 2A and the coordinates (x 3 , y 3 ) of the upper right reference point 2C were obtained using the virtual line orthogonal to the x axis as the y axis.
(1-3) Affixing the circular mark (reference mark) 13

次に、直径が30cmの円形マーク13をセグメントAの正面Bに4つ貼付した。
(1-4) 撮影、及び画像取り込み
Next, four circular marks 13 having a diameter of 30 cm were attached to the front face B 1 of the segment A 1 .
(1-4) Shooting and image capture

その後、デジタルカメラ1にて1つ目のPCセグメントAを撮影し、その画像データをパソコン(画像処理装置)に取り込んだ。この際、基準マークの形状、寸法、各基準点2A,…の座標、及び測定した撮影距離L等のデータは、キーボードやマウス等の入力手段を使ってパソコンに入力した。 Then, taking the PC segment A 1 of first by a digital camera 1, captured the image data to the PC (image processing apparatus). At this time, data such as the shape and size of the reference mark, the coordinates of each reference point 2A,..., And the measured shooting distance L were input to a personal computer using an input means such as a keyboard or a mouse.

パソコン内ではレンズの歪補正を行なった。図10の符号100をカメラのレンズとし、符号101をカメラのCCD面とすると、レンズ100に歪が無ければ、角度θで入射した光は、光軸とCCD面101との交点Iから、距離(r−d)だけ離れた点Iθに像が結ばれる。しかし、実際には、レンズ歪(ラジアルディストーション)のため、点Iθからdだけずれた点I’θに像が結ばれ、そのズレ量dは、次式で現わされる。

Figure 0005254545
In the PC, lens distortion was corrected. When the reference numeral 100 in FIG. 10 is a camera lens and the reference numeral 101 is a CCD surface of the camera, if the lens 100 is not distorted, the light incident at an angle θ is from the intersection I 0 between the optical axis and the CCD surface 101. An image is formed at a point separated by a distance (rd) . However, in actuality, due to lens distortion (radial distortion), an image is formed at a point I ′ θ that is shifted from the point I θ by d, and the deviation d is expressed by the following equation.
Figure 0005254545

本実施例では、一定間隔に印刷されたドットパターンと、デジタルカメラで撮影して得られるデジタル化されたドットパターン(歪んだドットパターン)とを比較することで上述の係数a,a,a,aを算出した。
(1-5) 射影変換処理
In the present embodiment, the above-described coefficients a 1 , a 2 , and the like are obtained by comparing a dot pattern printed at regular intervals with a digitized dot pattern (distorted dot pattern) obtained by photographing with a digital camera. a 3 and a 4 were calculated.
(1-5) Projective transformation processing

次に、上述の各データ(各基準点2A,…の座標や、撮影距離L等)に基づき、
・ カメラの位置(主点位置)
・ 傾き(PCセグメントの面とCCD面との傾き角)
が算出される。そして、それらのデータは射影変換部434に入力され、オルソ画像が得られる(図12参照)。
(1-6) 円形マーク13のサイズ(目標サイズ)の測定
Next, based on the above-mentioned data (coordinates of each reference point 2A,..., Shooting distance L, etc.)
・ Camera position (main point position)
・ Inclination (Inclination angle between PC segment surface and CCD surface)
Is calculated. These data are input to the projective transformation unit 434 to obtain an ortho image (see FIG. 12).
(1-6) Measuring the size (target size) of the circular mark 13

以上のようにしてオルソ画像が取得されると、マーク認識部431が円形マーク13の位置を自動認識し、マークサイズ算出部432がそのサイズ(例えば、直径の画素数)を算出し、マークサイズ記憶部433がそのサイズをメモリする。なお、上述のような円形マーク13の位置認識は自動で行なうようにしても、オペレータがマウスを使って位置を指示するようにしても良い。二値化処理等により円形マーク13の中心座標を求めることができる。
(1-7) その他の処理
When the ortho image is acquired as described above, the mark recognizing unit 431 automatically recognizes the position of the circular mark 13, the mark size calculating unit 432 calculates the size (for example, the number of pixels of the diameter), and the mark size. The storage unit 433 stores the size. The position recognition of the circular mark 13 as described above may be performed automatically, or the operator may indicate the position using a mouse. The center coordinates of the circular mark 13 can be obtained by binarization processing or the like.
(1-7) Other processing

その後、パソコン画面上で、PCセグメントAのエッジを含む矩形領域を図13に符号110で示すように指定すると、各矩形領域は二値化処理され、エッジが点群で抽出される(図14(a) 参照)。この点群から直線近似を行ない(図14(b) 参照)、直線のパラメータが計算される。その後、図15に示すような交点120の座標が計算される。オペレータが寸法計測箇所を画面上で指定すると(図16の黒塗り部参照)、具体的な寸法(例えば、600mmや630mmなど)が算出される。
(2) 2つ目以降のPCセグメント(計測対象物)Aについての作業
(2-1) PCセグメントのセット
Then, on the PC screen, specifying a rectangular region including the edge of the PC segment A 1 as shown by reference numeral 110 in FIG. 13, each rectangular region is binarized, edges are extracted by the point cloud (Fig. 14 (a)). Straight line approximation is performed from this point group (see FIG. 14B), and straight line parameters are calculated. Thereafter, the coordinates of the intersection 120 as shown in FIG. 15 are calculated. When the operator designates a dimension measurement location on the screen (see a black portion in FIG. 16), specific dimensions (for example, 600 mm, 630 mm, etc.) are calculated.
(2) Work on the second and subsequent PC segments (measurement objects) A 2
(2-1) PC segment set

上記(1-4)
の後、つまり、1つ目のPCセグメントAの撮影が終了すると、該1つ目のPCセグメントAをカメラ1の前から取り除き、その替わりに2つ目のPCセグメントAを置く。この際、2つ目のPCセグメントAは、1つ目のPCセグメントAが置かれていた位置に置くようにし、また、2つ目のPCセグメントAの傾斜状態は、1つ目のPCセグメントAの傾斜状態と出来るだけ同じになるようにする。つまり、1つ目のPCセグメントAのときの撮影距離と2つ目のPCセグメントAのときの撮影距離とが大体等しくなるようにし、2つ目のPCセグメントAの表面とカメラCCD面との傾斜角が、1つ目のPCセグメントAの表面とカメラCCD面との傾斜角と大体等しくなるようにする。なお、撮影距離の測定や基準点の貼付(及びその位置測定)は1つ目のPCセグメントAに対して行なったが、2つ目のPCセグメントAに対しては行なわない。
(2-2) 円形マーク(第1マーク)3の貼付
Above (1-4)
After that, when photographing of the first PC segment A 1 is completed, the first PC segment A 1 is removed from the front of the camera 1 and a second PC segment A 2 is placed instead. At this time, the second PC segment A 2 is placed at the position where the first PC segment A 1 was placed, and the inclined state of the second PC segment A 2 is the first PC segment A 2. just as the same can as the inclined state of the PC segment a 1. In other words, the shooting distance for the first PC segment A 1 and the shooting distance for the second PC segment A 2 are set to be approximately equal, and the surface of the second PC segment A 2 and the camera CCD are set. The inclination angle with respect to the surface is set to be approximately equal to the inclination angle between the surface of the first PC segment A1 and the camera CCD surface. Note that the measurement of the shooting distance and the attachment of the reference point (and the position measurement thereof) were performed on the first PC segment A1, but not on the second PC segment A2.
(2-2) Affixing the circular mark (first mark) 3

1つ目のセグメントと同様に行なう。なお、貼付する位置は、1つ目のセグメントのときの貼付位置と大体同じとする。
(2-3) 撮影、及び画像取込み
Perform in the same way as the first segment. Note that the position to be applied is substantially the same as the position to be applied for the first segment.
(2-3) Shooting and image capture

デジタルカメラ1にて撮影し、その画像データはパソコンに転送した。
(2-4) 射影変換工程(図2のS1参照)
The image was taken with the digital camera 1 and the image data was transferred to a personal computer.
(2-4) Projective transformation process (see S1 in Fig. 2)

1つ目のPCセグメントAでは撮影距離L等のデータにより射影変換処理を行なったが、2つ目以降のPCセグメントAでは以下のようにして射影変換処理を行なった。 In the first PC segment A 1 , projection conversion processing was performed using data such as the shooting distance L, but in the second and subsequent PC segments A 2 , projection conversion processing was performed as follows.

まず、円形マーク3の位置の自動認識を行なう。この際、二値化処理を行なえば、円形マーク3の中心座標が求まり、1つ目のセグメントAの円形マーク13の中心座標に対するズレ量(x、y方向の座標ズレ)を求めることができる。次に、公知のハフ変換を用いて、円形マーク3の画像上の形状(例えば、図4(a) に示すような扁平した楕円形状)の輪郭を抽出する。そして、マーク3の重心位置(例えば、x座標やy座標)や変形量等(扁平量や扁平方向(角度))を求め(図3のS11)、それらの値を下記射影変換式に代入して画像の射影変換を行なう(同図のS12)。 First, automatic recognition of the position of the circular mark 3 is performed. At this time, if binarization processing is performed, the center coordinate of the circular mark 3 is obtained, and the amount of deviation (the coordinate deviation in the x and y directions) of the first segment A1 with respect to the center coordinate of the circular mark 13 is obtained. it can. Next, the contour of the shape of the circular mark 3 on the image (for example, a flat oval shape as shown in FIG. 4A) is extracted using a known Hough transform. Then, the position of the center of gravity of the mark 3 (for example, the x coordinate and the y coordinate) and the deformation amount (flat amount and flat direction (angle)) are obtained (S11 in FIG. 3), and those values are substituted into the following projective transformation formula. Then, the projective transformation of the image is performed (S12 in the figure).

この射影変換の様子を図17に沿って詳述する。この図17では、射影変換の様子を説明し易くするため、第1マークとして円形ではなく正方形のものを示している(符号23G参照)。符号23A及び23Bは、x軸の回りに回転したときの形状を示し、符号23C,23Dは、y軸の回りに回転したときの形状を示し、符号23E,23Fは、z軸の回りに回転したときの形状を示している。     This projective transformation will be described in detail with reference to FIG. In FIG. 17, in order to easily explain the state of projective transformation, the first mark is not a circle but a square (see reference numeral 23G). Reference numerals 23A and 23B indicate shapes when rotated around the x axis, reference numerals 23C and 23D indicate shapes when rotated around the y axis, and reference numerals 23E and 23F rotate around the z axis. The shape is shown.

例えば、マークが符号23A又は23Bに示すような形状だとすると、下式によって射影変換を行なう。

Figure 0005254545
For example, if the mark has a shape as indicated by reference numeral 23A or 23B, projective transformation is performed by the following equation.
Figure 0005254545

また、マークが符号23C又は23Dに示すような形状だとすると、下式によって射影変換を行なう。

Figure 0005254545
If the mark has a shape as indicated by reference numeral 23C or 23D, projective transformation is performed by the following equation.
Figure 0005254545

さらに、マークが符号23E又は23Fに示すような形状だとすると、下式によって射影変換を行なう。

Figure 0005254545
Further, if the mark has a shape as indicated by reference numeral 23E or 23F, projective transformation is performed by the following equation.
Figure 0005254545

上述のような処理を順次繰り返すことにより、マークは符号23Gに示すような正方形となり、PCセグメントの画像はオルソ画像となる。
(2-5) 画像の拡大縮小処理
By sequentially repeating the above processing, the mark becomes a square as indicated by reference numeral 23G, and the PC segment image becomes an ortho image.
(2-5) Image scaling

上述のような射影変換処理を行なうことにより、画像上のマーク3は図4(c) に示すような円形になる。ところで、2つ目のPCセグメントAをデジタルカメラ1で撮影するに当たっては、1つ目のセグメントのときとほぼ同じ撮影距離となるように注意を払っているものの、完全に一致しているという保証は無く、したがって、1つ目の画像の縮尺と2つ目以降の画像の縮尺とが一致しているどうかの保証は無い。そこで、本実施例では、前記マーク3のサイズ調整を行なうことにより画像の縮尺を一致させた。具体的には、以下の処理を行なった。すなわち、
・ 自動抽出されたマーク3のサイズ(直径の画素数)をマークサイズ算出手段44が算出
・ 拡大縮小処理手段45が、該サイズと前記目標サイズとに基づき画像を拡大又は縮小
(2-6) その他の処理
By performing the projective transformation process as described above, the mark 3 on the image becomes a circle as shown in FIG. By the way, when photographing the second PC segment A2 with the digital camera 1, although attention is paid so that the photographing distance is almost the same as that of the first segment, they are completely coincident with each other. There is no guarantee, and therefore there is no guarantee that the scale of the first image matches the scale of the second and subsequent images. Therefore, in this embodiment, the scale of the image is matched by adjusting the size of the mark 3. Specifically, the following processing was performed. That is,
The mark size calculation means 44 calculates the size (number of pixels of the diameter) of the automatically extracted mark 3. The enlargement / reduction processing means 45 enlarges or reduces the image based on the size and the target size.
(2-6) Other processing

その後、1つ目のPCセグメントAのときのデータに基づき、PCセグメントAのエッジを含む矩形領域が自動指定され、1つ目のときと同様に、
・ 二値化処理
・ 点群によるエッジの抽出(図14(a) 参照)
・ 直線近似(図14(b) 参照)
・ 直線のパラメータの算出
・ 交点座標の計算(図15 参照)
・ 寸法の自動算出(図16参照)
等が行なわれた。
Then, based on the data when the first PC segment A 1, a rectangular region including the edge of the PC segment A 2 is automatically specified, as in the case of the first,
・ Binarization processing ・ Edge extraction by point cloud (see Fig. 14 (a))
・ Linear approximation (see Fig. 14 (b))
・ Calculation of straight line parameters ・ Calculation of intersection coordinates (see Fig. 15)
・ Automatic calculation of dimensions (see Fig. 16)
Etc. were performed.

図1は、本発明に係る画像処理方法により処理される画像の一例を示す模式図である。FIG. 1 is a schematic diagram showing an example of an image processed by the image processing method according to the present invention. 図2は、本発明に係る画像処理方法の全体の流れを示すフローチャート図である。FIG. 2 is a flowchart showing the overall flow of the image processing method according to the present invention. 図3は、射影変換工程の詳細の一例を示すフローチャート図である。FIG. 3 is a flowchart showing an example of details of the projective transformation process. 図4は、第1マークが画像処理に伴って変形して行く様子の一例を示す模式図である。FIG. 4 is a schematic diagram illustrating an example of a state in which the first mark is deformed along with image processing. 図5は、拡大縮小工程の詳細の一例を示すフローチャート図である。FIG. 5 is a flowchart showing an example of details of the enlargement / reduction process. 図6は、基準対象物を撮影するときの様子を説明するための斜視図である。FIG. 6 is a perspective view for explaining a state when the reference object is photographed. 図7は、第1マークの目標サイズを設定する工程の一例を示すフローチャート図である。FIG. 7 is a flowchart showing an example of a process for setting the target size of the first mark. 図8は、第1マークの目標サイズを設定する工程の他の例を示すフローチャート図である。FIG. 8 is a flowchart showing another example of the process for setting the target size of the first mark. 図9は、本発明に係る画像処理装置の構成の一例を示すブロック図である。FIG. 9 is a block diagram showing an example of the configuration of the image processing apparatus according to the present invention. 図10は、レンズの歪補正を説明するための模式図である。FIG. 10 is a schematic diagram for explaining lens distortion correction. 図11は、1つ目のPCセグメント(基準対象物)の画像の一例を示す模式図である。FIG. 11 is a schematic diagram illustrating an example of an image of the first PC segment (reference object). 図12は、1つ目のPCセグメントについてのオルソ画像の一例を示す模式図である。FIG. 12 is a schematic diagram illustrating an example of an ortho image for the first PC segment. 図13は、1つ目のPCセグメント画像について二値化処理のための領域を指定する様子を示す模式図である。FIG. 13 is a schematic diagram showing a state in which an area for binarization processing is designated for the first PC segment image. 図14(a) は、PCセグメントのエッジを点群で抽出する様子の一例を示す模式図であり、図14(b)は、その点群を直線近似する様子の一例を示す模式図である。FIG. 14 (a) is a schematic diagram showing an example of a state in which the edge of a PC segment is extracted by a point group, and FIG. 14 (b) is a schematic diagram showing an example of a state in which the point group is linearly approximated. . 図15は、上述の処理により検出したPCセグメントのエッジの交点を算出する様子の一例を示す模式図である。FIG. 15 is a schematic diagram illustrating an example of a state of calculating the intersection of the PC segment edges detected by the above-described processing. 図16は、寸法計測を行なう領域を指定した様子の一例を示す模式図である。FIG. 16 is a schematic diagram illustrating an example of a state in which an area for dimension measurement is designated. 図17は、射影変換の様子を説明するための模式図である。FIG. 17 is a schematic diagram for explaining the state of projective transformation.

符号の説明Explanation of symbols

1 デジタルカメラ
2A,2B,2C,2D 第2マーク
3 第1マーク
4 画像処理装置
13 基準マーク
41 変換係数算出手段
42 射影変換手段
43 目標サイズ設定手段
44 マークサイズ算出手段
45 拡大縮小処理手段
431 マーク認識部
432 マークサイズ算出部
433 マークサイズ記憶部
434 射影変換部
基準対象物
計測対象物
正面部分
正面部分
L 撮影距離
DESCRIPTION OF SYMBOLS 1 Digital camera 2A, 2B, 2C, 2D 2nd mark 3 1st mark 4 Image processing apparatus 13 Reference mark 41 Conversion coefficient calculation means 42 Projection conversion means 43 Target size setting means 44 Mark size calculation means 45 Enlargement / reduction processing means 431 Mark Recognition unit 432 Mark size calculation unit 433 Mark size storage unit 434 Projection conversion unit A 1 reference object A 2 measurement object B 1 front part B 2 front part L shooting distance

Claims (4)

画像に写っている計測対象物が正面を向いて見えるようにする射影変換工程、及び該画像の拡大縮小工程を実施して所定の縮尺のオルソ画像を得る画像処理装置において、
前記計測対象物の正面部分に掲示された状態で写っている第1マークの画像中の形状から射影変換処理に必要な変換係数を算出する変換係数算出手段と、
前記変換係数算出手段が算出した変換係数に基づき、前記計測対象物が正面を向いた状態となるように画像の射影変換処理を行なう射影変換手段と、
前記第1マークの画像上での目標サイズを設定する目標サイズ設定手段と、
前記第1マークの画像上での実際のサイズを算出するマークサイズ算出手段と、
前記目標サイズ設定手段及び前記マークサイズ算出手段からのデータに基づき、前記第1マークの画像上でのサイズが前記目標サイズに略一致するように画像の拡大又は縮小を行なう拡大縮小処理手段と、
を備え
前記目標サイズ設定手段は、
前記第1マークと略同一形状の基準マーク、及び位置を特定するための少なくとも4個の第2マークが、前記計測対象物と略同一形状の基準対象物の正面部分に掲示された状態で写っている画像について、前記第2マークの位置及びデジタルカメラから前記基準対象物までの撮影距離の測定結果に基づき、前記基準対象物が正面を向いて見えるように画像の射影変換処理を行なう射影変換部と、
該射影変換処理をした画像について、前記基準マークの位置を自動認識するマーク認識部と、
該認識した基準マークの大きさを算出するマークサイズ算出部と、
該算出した基準マークの大きさを記憶するマークサイズ記憶部と、
を有することを特徴とする画像処理装置。
In an image processing apparatus for performing a projective transformation process that makes a measurement object reflected in an image look facing the front, and an enlargement / reduction process of the image to obtain an ortho image of a predetermined scale,
Conversion coefficient calculation means for calculating a conversion coefficient necessary for projective conversion processing from the shape in the image of the first mark that is reflected in a state posted on the front part of the measurement object;
Based on the conversion coefficient calculated by the conversion coefficient calculation means, a projective conversion means for performing a projective conversion process of the image so that the measurement object is in a front-facing state;
Target size setting means for setting a target size on the image of the first mark;
Mark size calculating means for calculating an actual size of the first mark on the image;
An enlargement / reduction processing means for enlarging or reducing the image so that the size of the first mark on the image substantially matches the target size based on data from the target size setting means and the mark size calculation means;
Equipped with a,
The target size setting means includes
The reference mark having substantially the same shape as the first mark and at least four second marks for specifying the positions are shown in a state where they are posted on the front part of the reference object having substantially the same shape as the measurement object. A projective transformation that performs a projective transformation process on the image so that the reference object looks front-facing based on the position of the second mark and the measurement result of the shooting distance from the digital camera to the reference object. And
A mark recognition unit that automatically recognizes the position of the reference mark for the image subjected to the projective transformation process;
A mark size calculation unit for calculating the size of the recognized reference mark;
A mark size storage unit for storing the size of the calculated reference mark;
An image processing apparatus comprising:
前記第1マークは、前記計測対象物の表面にて二次元方向に拡がる形状である、
ことを特徴とする請求項1に記載の画像処理装置。
The first mark has a shape extending in a two-dimensional direction on the surface of the measurement object.
The image processing apparatus according to claim 1.
画像に写っている計測対象物が正面を向いて見えるようにする射影変換工程、及び該画像の拡大縮小工程を実施して所定の縮尺のオルソ画像を得る画像処理方法において、
前記計測対象物の正面部分に掲示された状態で写っている第1マークの画像中の形状から射影変換処理に必要な変換係数を算出する工程と、
該算出した変換係数に基づき、前記計測対象物が正面を向いた状態となるように画像の射影変換処理を行なう工程と、
前記第1マークの画像上での目標サイズを設定する工程と、
前記第1マークの画像上での実際のサイズを算出する工程と、
前記第1マークの画像上でのサイズが前記目標サイズに略一致するように画像の拡大又は縮小を行なう工程と、
を備え
前記第1マークの画像上での目標サイズを設定する工程は、
前記第1マークと略同一形状の基準マークを、前記計測対象物と略同一形状の基準対象物の正面部分に掲示する工程と、
該正面部分における位置を特定するための第2マークを該正面部分に少なくとも4個掲示する工程と、
該掲示した第2マークの位置を測定する工程と、
前記基準対象物を前記基準マーク及び前記第2マークと共にデジタルカメラにて撮影する工程と、
該デジタルカメラから前記基準対象物までの撮影距離を測定する工程と、
前記第2マークの位置及び前記撮影距離の測定結果に基づき、前記基準対象物が正面を向いて見えるように前記撮影して得た画像の射影変換処理を行なう工程と、
該射影変換処理した後の画像に写っている基準マークのサイズを算出すると共に、該算出して得たサイズを前記目標値として記憶させる工程と、
からなることを特徴とする画像処理方法。
In an image processing method for obtaining an ortho-image of a predetermined scale by performing a projective transformation process that makes a measurement object shown in an image look front-facing, and an enlargement / reduction process of the image,
Calculating a conversion coefficient required for projective conversion processing from the shape in the image of the first mark that is reflected in a state posted on the front part of the measurement object;
Based on the calculated conversion coefficient, performing a projective conversion process of the image so that the measurement object is in a front-facing state;
Setting a target size on the image of the first mark;
Calculating an actual size of the first mark on the image;
Enlarging or reducing the image so that the size of the first mark on the image substantially matches the target size;
Equipped with a,
The step of setting a target size on the image of the first mark includes:
Posting a reference mark having substantially the same shape as the first mark on a front portion of the reference object having substantially the same shape as the measurement object;
Posting at least four second marks on the front portion for specifying the position in the front portion;
Measuring the position of the posted second mark;
Photographing the reference object together with the reference mark and the second mark with a digital camera;
Measuring a shooting distance from the digital camera to the reference object;
Based on the measurement result of the position of the second mark and the shooting distance, performing a projective transformation process of the image obtained by shooting so that the reference object looks facing the front;
Calculating the size of the reference mark in the image after the projective transformation process, and storing the size obtained by the calculation as the target value;
An image processing method characterized by comprising the.
前記第1マークは、前記計測対象物の表面にて二次元方向に拡がる形状である、
ことを特徴とする請求項に記載の画像処理方法。
The first mark has a shape extending in a two-dimensional direction on the surface of the measurement object.
The image processing method according to claim 3 .
JP2006342483A 2006-12-20 2006-12-20 Image processing apparatus and image processing method Active JP5254545B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006342483A JP5254545B2 (en) 2006-12-20 2006-12-20 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006342483A JP5254545B2 (en) 2006-12-20 2006-12-20 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2008151740A JP2008151740A (en) 2008-07-03
JP5254545B2 true JP5254545B2 (en) 2013-08-07

Family

ID=39654042

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006342483A Active JP5254545B2 (en) 2006-12-20 2006-12-20 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP5254545B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6176598B2 (en) * 2012-07-25 2017-08-09 国立大学法人金沢大学 Dimension measurement program, dimension measurement apparatus, and dimension measurement method
JP6166409B1 (en) * 2016-03-16 2017-07-19 ヤフー株式会社 Image processing apparatus, image processing method, and image processing program
JP6745252B2 (en) * 2017-09-20 2020-08-26 株式会社日立ビルシステム Brake lining diagnostic system and brake lining diagnostic device
JP7262927B2 (en) 2018-03-30 2023-04-24 キヤノン株式会社 Image processing device, image processing method and program
JP7419846B2 (en) 2020-02-04 2024-01-23 日産自動車株式会社 Liquid level detection method and liquid level detection device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0961121A (en) * 1995-08-25 1997-03-07 Sumitomo Electric Ind Ltd Dimension measuring device and method
JPH09229633A (en) * 1996-02-22 1997-09-05 Jisendou:Kk Curtain size measuring method
JP4138145B2 (en) * 1999-04-07 2008-08-20 株式会社トプコン Image forming apparatus
JP2002304597A (en) * 2001-04-04 2002-10-18 Sakana Ryutsu Net:Kk System for recognizing handwritten numeric information entered in container box
JP2004205222A (en) * 2002-12-20 2004-07-22 Matsushita Electric Works Ltd Distance measuring apparatus
JP2005023498A (en) * 2003-07-01 2005-01-27 Burein:Kk Method for ordering custom-made glove and computer for receiver of order used for the same

Also Published As

Publication number Publication date
JP2008151740A (en) 2008-07-03

Similar Documents

Publication Publication Date Title
CN111243032B (en) Full-automatic detection method for checkerboard corner points
CN110276808B (en) Method for measuring unevenness of glass plate by combining single camera with two-dimensional code
CN111260731B (en) Self-adaptive detection method for checkerboard sub-pixel level corner points
JP5480914B2 (en) Point cloud data processing device, point cloud data processing method, and point cloud data processing program
CN106683137B (en) Artificial mark based monocular and multiobjective identification and positioning method
JP6067175B2 (en) Position measuring apparatus and position measuring method
CN109827521B (en) Calibration method for rapid multi-line structured optical vision measurement system
CN107767456A (en) A kind of object dimensional method for reconstructing based on RGB D cameras
WO2011011353A2 (en) Stereoscopic form reader
WO2007091604A1 (en) Three-dimensional-object detecting device
CN110926330B (en) Image processing apparatus, image processing method, and program
JP5254545B2 (en) Image processing apparatus and image processing method
CN110033407B (en) Shield tunnel surface image calibration method, splicing method and splicing system
CN106815866B (en) Calibration method of fisheye camera, calibration system and target thereof
JP4270949B2 (en) Calibration chart image display device, calibration device, and calibration method
JP2012510235A (en) Image processing for curve correction
CN112767497A (en) High-robustness calibration device based on circular calibration plate and positioning method
JP6172432B2 (en) Subject identification device, subject identification method, and subject identification program
JP4859061B2 (en) Image correction method, correction program, and image distortion correction apparatus
CN108961187B (en) Label cambered surface image correction method
CN107680035B (en) Parameter calibration method and device, server and readable storage medium
CN106815872B (en) Monocular vision space positioning method based on conical projection transformation
CN109902695B (en) Line feature correction and purification method for image pair linear feature matching
JP2011107878A (en) Position detection apparatus and position detection method
CN114998571A (en) Image processing and color detection method based on fixed-size marker

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090805

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110803

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110816

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111014

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120306

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120426

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130418

R150 Certificate of patent or registration of utility model

Ref document number: 5254545

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20160426

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250