KR20090092150A - Method of 3d inspection of the object using ccd camera laser beam and apparutus thereof - Google Patents

Method of 3d inspection of the object using ccd camera laser beam and apparutus thereof

Info

Publication number
KR20090092150A
KR20090092150A KR1020080017489A KR20080017489A KR20090092150A KR 20090092150 A KR20090092150 A KR 20090092150A KR 1020080017489 A KR1020080017489 A KR 1020080017489A KR 20080017489 A KR20080017489 A KR 20080017489A KR 20090092150 A KR20090092150 A KR 20090092150A
Authority
KR
South Korea
Prior art keywords
plane
image
camera
dimensional
equation
Prior art date
Application number
KR1020080017489A
Other languages
Korean (ko)
Other versions
KR100941978B1 (en
Inventor
노영식
강희준
서영수
윤승준
Original Assignee
울산대학교 산학협력단
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 울산대학교 산학협력단 filed Critical 울산대학교 산학협력단
Priority to KR1020080017489A priority Critical patent/KR100941978B1/en
Publication of KR20090092150A publication Critical patent/KR20090092150A/en
Application granted granted Critical
Publication of KR100941978B1 publication Critical patent/KR100941978B1/en

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • G01B11/03Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness by measuring coordinates of points
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/245Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures using a plurality of fixed, simultaneously operating transducers
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/25Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object
    • G01B11/2513Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object with several lines being projected in more than one direction, e.g. grids, patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/593Depth or shape recovery from multiple images from stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images

Abstract

A method and a device for 3D location information of a target object using a CCD camera and a laser beam are provided to measure the 3D location information of the target and get the measured data rapidly. A method for 3D location information of a target object using a CCD camera and a laser beam comprises followings. The two-dimensional video of the target object is obtained using the CCD camera for the two-dimensional video(S100). A two-dimension coordinate value toward a metering point of the target object is produced(S106). The camera calibration is performed and the intrinsic factor showing the property of the charge coupled device camera for the laser measurement is produced(S108). The slit laser beam is irradiated in the measurement object body. The beam image is obtained by the charge coupled device camera for the laser measurement(S112). A plane equation and the normal vector of a plane, in which the target object is put, are produced from the obtained beam image(S120). The two-dimension coordinate value about the metering point is converted into 3D coordinate using the intrinsic factor, the plane equation and normal vector(S124).

Description

씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정방법 및 장치{Method of 3D Inspection of the object using CCD camera laser beam and Apparutus thereof}Method and apparatus for measuring 3D position information of an object using a CD camera and a laser beam {Method of 3D Inspection of the object using CCD camera laser beam and Apparutus

본 발명은 레이저 비전 시스템에 관한 것으로서, 보다 상세하게는 2개의 레이저 슬릿 빔 발생기와 2개의 씨씨디 카메라를 이용하여 측정대상 물체의 3차원 위치정보를 산출할 수 있는 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정방법 및 장치에 관한 것이다.The present invention relates to a laser vision system, and more particularly, using a CD camera and a laser beam capable of calculating three-dimensional position information of an object to be measured using two laser slit beam generators and two CD cameras. A method and apparatus for measuring three-dimensional position information of an object are provided.

레이저 비전 시스템(Laser Vision System)이란 현재 생산현장에서 이루어지고 있는 물체의 3차원 정보측정을 접촉식 및 인력에 의한 것이 아니라 레이저 및 씨씨디 카메라 등의 비접촉식 센서를 이용하여 필요한 정보를 검출 및 측정하는 시스템을 말한다. 더 나아가 인력으로 측정할 수 없는 작업환경 속에서도 비전 레이저 시스템이 도입되고 있어 재품의 신뢰도와 생산성을 높여주고 있다. Laser Vision System is a method of detecting and measuring the necessary information using non-contact sensors such as laser and CD cameras, not by contact and manpower, but by measuring the three-dimensional information of objects that are currently being produced at the production site. Say the system. Furthermore, vision laser systems are being introduced in working environments that cannot be measured by manpower, increasing product reliability and productivity.

또한 생산성의 향상을 위한 공장자동화는 보다 고속으로 좋은 제품을 생산할 수 있으며 효과적으로 생산라인의 시스템을 유지, 보수할 수 있는 이점을 가지고 있다. 이러한 공장자동화는 자동화 라인의 개발 점점 가속화되고 있으며 더욱 효율적인 자동화시스템의 도입되고 있다. In addition, the factory automation to improve the productivity can produce a good product at a higher speed and has the advantage of effectively maintaining and repairing the system of the production line. Such factory automation is accelerating the development of automation lines and the introduction of more efficient automation systems.

일반적인 3차원 물체의 정보 측정 방법에는 접촉식과 비접촉식이 있다. 접촉식 방법에는 정밀성은 보장되지만 측정에 많은 시간이 걸리며 또한 고가의 장비가 필요하다. 그리고 비접촉식방법에는 포인트광 방식(Point Beam Projection), 슬릿광 방식(Slit Beam Projection), 그리고 모아레 방식(Moire Method), PMP를 이용한 3차원 형상측정 방식 등이 있다. There are two methods of measuring information of a three-dimensional object, a contact type and a non-contact type. Although the contact method guarantees precision, it takes a lot of time to measure and also requires expensive equipment. The non-contact method includes a point beam projection method, a slit beam projection method, a moire method, a three-dimensional shape measurement method using PMP, and the like.

포인트 광 방식은 한 번에 한 점의 높이만을 측정할 수 있기 때문에 곡면형상을 측정할 경우 센서를 이동시키면서 동시에 센서의 3차원 위치좌표를 읽어야 하기 때문에 고정도의 이동이 가능한 기구부가 필요하게 된다. 슬릿 광 방식은 광삼각법의 원리에 기초한 측정법으로 레이저 광을 집광시킨 후 로드렌즈나 실린더리컬 렌즈로 슬릿 광을 만들어 측정물체에 투영시켜 형상에 따라 변현된 슬릿 광을 얻는다. 이렇게 씨씨디 카메라로 얻어진 슬릿 광 이미지 데이터를 기하학적인 연산을 통하여 형상의 3차원 좌표를 산출하는 방법이다. 모아레 방식은 측정대상물 바로 앞에 규칙적인 줄무늬격자를 두고 한 쪽에서 빛을 비추면 물결무늬의 그림자가 측정물 위에 생기게 되는데 이 무늬를 모아레 무늬라고 한다. 이 무늬는 물체의 형상정보를 가지고 있어서 이를 분석하여 높이 값을 얻게 된다. PMP 방법(위상측정 형상측정법)에서는 영사식 모아레에서 사용하는 위상천이법을 주된 방법으로 하여 우수한 측정정도를 확보하면서 광학계를 대폭 간소화시킨 측정법이다. 하지만 우수한 측정정도에도 불구하고 산업현장에서 구현이 불가능함으로 거의 사용되지 않고 있다. Since the point light method can measure only the height of one point at a time, when measuring the curved shape, it is necessary to move the sensor and simultaneously read the three-dimensional position coordinates of the sensor. The slit light method is a measurement method based on the principle of the optical triangulation method, and after condensing the laser light, the slit light is made by using a rod lens or a cylindrical lens and projected onto the measurement object to obtain the slit light transformed according to the shape. The slit optical image data obtained by the CD camera is a method of calculating three-dimensional coordinates of a shape through geometric calculations. In the moire method, a regular striped grid is placed directly in front of the measurement object, and when light is emitted from one side, a wavy pattern of shadow is formed on the measurement object. This pattern has the shape information of the object and is analyzed to obtain the height value. The PMP method (Phase Measurement Shape Measurement) is a measurement method that greatly simplifies the optical system while ensuring excellent measurement accuracy by using the phase shifting method used in projection type moire as the main method. However, despite its excellent measurement accuracy, it is rarely used because it is impossible to implement in the industrial field.

본 발명은 상술한 바와 같은 종래기술의 문제점을 해결하기 위하여, 산업현장에 적합하면서 자동으로 처리결과를 획득할 수 있는 Slit광을 이용한 레이저 비전 센서(Laser Vision Sensor) 측정방법을 제공하는 것을 목적으로 한다.An object of the present invention is to provide a method for measuring a laser vision sensor using a slit light that can be obtained automatically and suitable for an industrial site, and to automatically obtain a processing result. do.

또한, 본 발명은 자동차 차체 및 부품의 데이터 측정을 다양한 아이템에 대한 대응이 가능하고, 측정 데이터를 신속하게 얻을 수 있으며, 보다 정밀한 측정결과를 가져오도록 하는 고정도, 고속의 레이저 측정 모듈 및 3차원 위치정보 측정방법을 제공하는 것을 다른 목적으로 한다. In addition, the present invention can measure the data of the car body and parts for a variety of items, it is possible to obtain the measurement data quickly, high accuracy, high-speed laser measurement module and three-dimensional to bring more accurate measurement results Another object is to provide a method for measuring location information.

상기한 바와 같은 목적을 달성하기 위해, 본 발명의 바람직한 일 실시예에 따르면, (a) 2차원 영상용 씨씨디 카메라를 이용하여 물체의 2차원 영상을 획득하고, 물체의 측정점에 대한 2차원(x,y) 좌표값을 산출하는 단계; (b) 2개의 레이저 슬릿 빔 발생기로부터 조사되는 레이저 슬릿 빔에 대하여 일정한 각도를 갖도록 설치된 레이저 측정용 씨씨디 카메라의 특성을 나타내는 내부인자를 카메라 캘리브레이션을 수행하여 산출하는 단계; (c) 2개의 레이저 슬릿 빔 발생기를 이용하여 측정대상 물체에 2개의 슬릿 레이저 빔을 조사하고, 상기 레이저 측정용 씨씨디 카메라를 이용해 빔영상을 획득하는 단계; (d) 획득된 빔영상으로부터 물체가 놓인 평면의 평면방정식과 법선벡터를 산출하는 단계; 및 (e) 상기 내부인자와 상기 평면방정식 및 법선벡터를 이용하여 측정점에 대한 2차원 좌표값을 3차원 좌표값으로 변환하는 단계를 포함하는 것을 특징으로 하는 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정방법이 제공된다.In order to achieve the above object, according to a preferred embodiment of the present invention, (a) using a two-dimensional image CD camera for obtaining a two-dimensional image of the object, the two-dimensional ( x, y) calculating coordinate values; (b) calculating and calibrating an internal factor representing a characteristic of the laser measuring CD camera installed at a predetermined angle with respect to the laser slit beams irradiated from the two laser slit beam generators; (c) irradiating two slit laser beams to an object to be measured using two laser slit beam generators and acquiring a beam image using the laser measuring CD camera; (d) calculating a plane equation and a normal vector of the plane on which the object is placed from the obtained beam image; And (e) converting two-dimensional coordinate values of the measurement point into three-dimensional coordinate values using the internal factors, the plane equation, and the normal vector. A three-dimensional position information measuring method is provided.

보다 바람직하게 상술한 (a) 단계는, (a1) 입력된 2차원 영상에 모폴로지 기법을 적용하여 물체의 영상을 추출하는 단계; (a2) 추출된 물체의 영상을 이진화하는 단계; 및 (a3) 이진화 영상에 단면 1차 모멘트를 적용하여 물체의 중심좌표(측정점)를 산출하는 단계를 포함하도록 구성될 수 있다.More preferably, the step (a) may include (a1) extracting an image of an object by applying a morphology technique to the input two-dimensional image; (a2) binarizing an image of the extracted object; And (a3) calculating a center coordinate (measurement point) of the object by applying a cross-sectional primary moment to the binarized image.

또한, 상술한 (d) 단계는, (d1) 빔영상을 이진화하는 단계; (d2) 이진화된 빔영상을 세선화하는 단계; (d3) 세선화된 빔영상에 호프 트랜스폼(Hough Transform) 알고리즘을 적용하여 광원1, 광원2에 대한 영상면 직선방정식을 산출하는 단계; 및 (d4) 광원1의 영상면 직선방정식, 광원2의 영상면 직선방정식, 광원1의 슬릿면 평면방정식, 광원2의 슬릿면 평면방정식, 광원1의 영상면 평면방정식, 광원2의 영상면 평면방정식, 물체면의 평면방정식을 이용하여 물체면의 평면방정식과 법선벡터를 산출하는 단계를 포함하도록 구성될 수 있으며, 이때, 상술한 (d4) 단계는 슬릿면과 영상면 및 물체면이 한 직선에서 만나는 것을 이용하여 물체면의 평면방정식과 법선벡터를 산출하도록 구성될 수 있다. In addition, the step (d) described above, (d1) binarizing the beam image; (d2) thinning the binarized beam image; (d3) calculating an image plane linear equation for light sources 1 and 2 by applying a Hough Transform algorithm to the thinned beam image; And (d4) the image plane linear equation of light source 1, the image plane linear equation of light source 2, the slit plane equation of light source 1, the slit plane equation of light source 2, the image plane plane equation of light source 1, the image plane plane of light source 2 Equation, the plane equation of the object plane may be configured to include the step of calculating the plane equation and the normal vector of the object plane, wherein step (d4) described above is a straight line between the slit plane, the image plane and the object plane It can be configured to calculate the plane equation and normal vector of the object surface using

또한, 상술한 (e) 단계는, (e1) 산출된 법선벡터를 씨씨디 카메라 좌표계에서의 XZ 평면과 YZ 평면에 정사영시켜 각 축으로 회전된 각을 산출하는 단계; (e2) 산출된 회전각과 상기 내부인자를 이용하여 측정점에 대한 2차원(x,y) 좌표값을 3차원(X,Y) 좌표값으로 변환하는 단계; 및 (e3) 변환된 3차원(X,Y) 좌표값을 산출된 물체면의 평면방정식에 대입하여 3차원 Z 좌표값을 산출하는 단계를 포함하도록 구성될 수 있다. In addition, the step (e) described above, (e1) calculating the angle rotated on each axis by orthogonal projection of the calculated normal vector to the XZ plane and YZ plane in the CD camera coordinate system; (e2) converting two-dimensional (x, y) coordinate values for the measurement point into three-dimensional (X, Y) coordinate values using the calculated rotation angle and the internal factor; And (e3) calculating the three-dimensional Z coordinate value by substituting the converted three-dimensional (X, Y) coordinate values into the calculated plane equation of the object plane.

여기서, 상술한 (e2) 단계의 3차원(X,Y) 좌표값은 2차원(x,y) 좌표값이 독립적으로 변환 알고리즘에 적용되어 각각 산출되며, 법선벡터의 x 또는 y의 계수가 음인 경우 3차원(X 또는 Y) 좌표값은, 또는 로 산출되고,Here, the three-dimensional (X, Y) coordinate value of the step (e2) described above is calculated by applying two-dimensional (x, y) coordinate values independently to the conversion algorithm, the coefficient of x or y of the normal vector is negative The three-dimensional (X or Y) coordinate value is or Is calculated as

법선벡터의 x 또는 y의 계수가 양인 경우 3차원(X 또는 Y) 좌표값은, 또는 로 산출되되, 상기 θ2는 씨씨디 카메라의 영상면과 물체면(XZ 평면 또는 YZ 평면)과의 회전각이며, 상기 X' 또는 Y'는 회전각 θ2가 없을 경우의 x 또는 y의 공간 좌표값인 것을 특징으로 할 수 있다.If the coefficient of x or y of the normal vector is positive, the three-dimensional (X or Y) coordinate value is or Θ 2 is the rotation angle between the image plane of the CD camera and the object plane (XZ plane or YZ plane), and X 'or Y' is the space of x or y when there is no rotation angle θ 2. It may be characterized in that the coordinate value.

또한, 본 발명의 다른 바람직한 일 실시예에 따르면,본 발명에 따른 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정장치에 있어서, 측정대상 물체의 2차원 영상을 촬영하여 출력하는 2차원 영상용 씨씨디 카메라; 상기 2차원 영상용 씨씨디 카메라에 수평선상으로 일정한 거리를 두고 설치되어 측정대상 물체에 슬릿 빔을 조사하는 제1광원용 레이저 슬릿 빔 발생기; 상기 2차원 영상용 씨씨디 카메라의 수평선상으로 일정한 거리를 두고 설치되어 측정대상 물체에 슬릿 빔을 조사하는 제2광원용 레이저 슬릿 빔 발생기; 상기 레이저 슬릿 빔 발생기로부터 조사되는 레이저 슬릿 빔에 대하여 일정한 각도를 갖도록 설치되어 슬릿 빔이 조사된 물체의 빔영상을 촬영하여 출력하는 레이저 측정용 씨씨디 카메라; 상기 2차원 영상용 씨씨디 카메라로부터 출력되는 2차원 영상을 분석하여 측정대상 물체의 2차원 중심좌표를 산출하고, 상기 레이저 측정용 씨씨디 카메라에 대한 카메라 캘리브레이션을 수행하여 내부인자를 산출하며, 상기 레이저 측정용 씨씨디 카메라로부터 출력되는 빔영상을 분석하여 물체면의 평면방정식과 법선벡터를 산출하고, 상기 내부인자와 상기 물체면의 평면방정식 및 법선벡터를 이용하여 측정대상 물체의 2차원 중심좌표를 3차원 좌표로 변환하여 출력하는 위치정보 측정부; 및 상기 2차원 영상용 씨씨디 카메라, 상기 레이저 슬릿 빔 발생기, 상기 레이저 측정용 씨씨디 카메라 및 상기 위치정보 측정부를 제어하여 물체의 3차원 위치정보 측정을 수행하는 제어부를 포함하는 것을 특징으로 하는 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정장치가 제공된다.In addition, according to another preferred embodiment of the present invention, in the three-dimensional position information measuring device of the object using the CD camera and the laser beam according to the present invention, the two-dimensional image of the two-dimensional image of the measurement object to output CD camera for imaging; A laser slit beam generator for a first light source installed on the two-dimensional image CD camera at a predetermined distance on a horizontal line to irradiate a slit beam to an object to be measured; A laser slit beam generator for a second light source installed at a predetermined distance on a horizontal line of the two-dimensional image CD camera to irradiate a slit beam to a measurement target object; A CD camera for laser measurement, which is installed to have a predetermined angle with respect to the laser slit beam emitted from the laser slit beam generator and outputs a beam image of an object to which the slit beam is irradiated; Analyzing the two-dimensional image output from the two-dimensional image CD camera for calculating the two-dimensional center coordinates of the object to be measured, and performing the camera calibration for the laser measurement CD camera to calculate the internal factor, Analyze the beam image output from the CD camera for laser measurement to calculate the plane equation and the normal vector of the object plane, and use the internal factors and the plane equation and the normal vector of the object plane to determine the two-dimensional center coordinates of the object to be measured. A location information measuring unit converting the coordinates into three-dimensional coordinates and outputting the converted coordinates; And a control unit configured to control the two-dimensional image CD camera, the laser slit beam generator, the laser measurement CD camera, and the position information measuring unit to perform three-dimensional position information measurement of an object. An apparatus for measuring three-dimensional position information of an object using a digital camera and a laser beam is provided.

이때, 보다 바람직하게 상술한 위치정보 측정부는, 상기 2차원 영상용 씨씨디 카메라로부터 출력되는 2차원 영상에 모폴로지 기법을 적용하여 측정대상 물체의 영상을 추출하고, 추출된 물체의 영상을 이진화한 후, 이진화 영상에 단면 1차 모멘트를 적용하여 물체의 중심좌표(측정점)를 산출하는 중심좌표 산출모듈; 상기 레이저 측정용 씨씨디 카메라의 특성을 나타내는 내부인자를 산출하는 카메라 캘리브레이션 모듈; 상기 레이저 측정용 씨씨디 카메라로부터 출력되는 빔영상을 이진화/세선화처리하여 광원1, 광원2에 대한 영상면 직선방정식을 산출하며, 광원1의 영상면 직선방정식, 광원2의 영상면 직선방정식, 광원1의 슬릿면 평면방정식, 광원2의 슬릿면 평면방정식, 광원1의 영상면 평면방정식, 광원2의 영상면 평면방정식, 물체면의 평면방정식을 이용하여 물체면의 평면방정식과 법선벡터를 산출하는 평면방정식/법선벡터 산출모듈; 및 산출된 물체면의 법선벡터를 씨씨디 카메라 좌표계에서의 XZ 평면과 YZ 평면에 정사영시켜 각 축으로 회전된 각을 산출하고, 산출된 회전각과 상기 내부인자를 이용하여 측정점에 대한 2차원(x,y) 좌표값을 3차원(X,Y) 좌표값으로 변환한 후, 변환된 3차원(X,Y) 좌표값을 산출된 물체면의 평면방정식에 대입하여 3차원 Z 좌표값을 산출하는 좌표변환모듈을 포함하도록 구성될 수 있다.In this case, more preferably, the above-described position information measuring unit extracts an image of an object to be measured by applying a morphology technique to a two-dimensional image output from the two-dimensional image CD camera, and binarizes the extracted object image. A center coordinate calculation module for calculating a center coordinate (measurement point) of the object by applying a cross-sectional primary moment to the binarized image; A camera calibration module for calculating an internal factor representing a characteristic of the CD camera for laser measurement; The beam image output from the laser measuring CD camera is binarized / thinned to calculate an image plane linear equation for the light source 1 and the light source 2, an image plane linear equation for the light source 1, an image plane linear equation for the light source 2, Using the slit plane equation of light source 1, the slit plane equation of light source 2, the image plane plane equation of light source 1, the image plane plane equation of light source 2, and the plane equation of object plane, calculate the plane equation and normal vector of the object plane. A plane equation / normal vector calculation module; And orthogonally project the calculated normal vectors of the object plane to the XZ plane and the YZ plane in the CD camera coordinate system to calculate an angle rotated on each axis, and using the calculated rotation angle and the internal factor, two-dimensional (x) y) After converting the coordinate values to three-dimensional (X, Y) coordinate values, the three-dimensional Z coordinate values are calculated by substituting the converted three-dimensional (X, Y) coordinate values into the plane equation of the calculated object plane. It may be configured to include a coordinate transformation module.

이상에서 살펴본 바와 같이, 본 발명에 따른 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정방법에 따르면 산업현장에 적합하면서 자동으로 처리결과를 획득 가능한 Slit광 측정법을 이용할 수 있다는 장점이 있다.As described above, according to the method for measuring three-dimensional position information of an object using a CD camera and a laser beam according to the present invention, there is an advantage that a slit light measuring method that is suitable for an industrial site and automatically obtains processing results can be used. .

또한, 본 발명에 따르면 기존의 자동차 차체 및 부품의 데이터 측정을 접촉식 센서나 인력에 의한 Sampling 측정 방식을 레이저 비전 센서(Laser Vision Sensor) 측정방법으로 대체하여 다양한 아이템에 대한 대응이 가능하고, 측정 데이터를 신속하게 얻을 수 있으며, 보다 정밀한 측정결과를 얻을 수 있다는 장점이 있다.In addition, according to the present invention by replacing the conventional measurement of the data of the vehicle body and parts with a contact sensor or a sampling method of the manpower by a laser vision sensor measuring method is possible to respond to a variety of items, measurement The advantage is that data can be obtained quickly and more accurate measurement results can be obtained.

또한, 본 발명에 따르면 자동차 차체 및 부품 생산에서 불량을 없애기 위한 각 측정항목들 즉, 모재의 길이, 거리, 두께 및 외경을 정밀하게 측정할 수 있으며, 나아가 자동차 차체 및 부품의 용접품질과 품질의 안정성을 제고할 수 있다는 장점이 있다.In addition, according to the present invention, it is possible to precisely measure the length, distance, thickness and outer diameter of each measurement item, that is, the base material, to eliminate defects in automobile body and parts production, and furthermore, It has the advantage of improving stability.

도 1은 본 발명의 바람직한 일 실시예에 따라 물체의 3차원 위치정보가 측정되는 과정을 도시한 순서도.1 is a flowchart illustrating a process of measuring three-dimensional position information of an object according to an embodiment of the present invention.

도 2a는 본 발명의 바람직한 일 실시예에 따른 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정장치를 이용한 측정시스템의 구조도.Figure 2a is a structural diagram of a measurement system using a three-dimensional position information measuring device of the object using a CD camera and a laser beam according to an embodiment of the present invention.

도 2b는 본 발명의 바람직한 일 실시예에 따른 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정장치의 구성 블록도.Figure 2b is a block diagram of a three-dimensional position information measuring device of the object using a CD camera and a laser beam according to an embodiment of the present invention.

도 3a 내지 3d는 단면 1차 모멘트를 설명하기 위한 개념도 .3A to 3D are conceptual views for explaining the cross-sectional primary moment.

도 4a 내지 4e는 호프 트랜스폼(Hough Transform)을 설명하기 위한 개념도.4A to 4E are conceptual diagrams for describing the Hough Transform.

도 5는 1차원 물체의 원근사영을 나타낸 예시도.5 is an exemplary view showing perspective projection of a one-dimensional object.

도 6a 내지 6d은 물체면과 영상면의 XZ(또는 YZ)평면의 기하학적 구성을 도시한 구성도.6A to 6D are diagrams showing the geometrical configuration of the XZ (or YZ) plane of the object plane and the image plane.

도 7은 본 발명의 바람직한 일 실시예에 따른 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정장치의 기하학적 구성을 도시한 구성도.Figure 7 is a block diagram showing the geometrical configuration of the three-dimensional position information measuring device of the object using a CD camera and a laser beam according to an embodiment of the present invention.

도 8a는 씨씨디 카메라 영상평면에서의 좌표계 설정을 설명하기 위한 개념도.8A is a conceptual diagram illustrating a coordinate system setting in a CD camera image plane.

도 8b는 핀홀 카메라 모델을 설명하기 위한 개념도.8B is a conceptual diagram for explaining a pinhole camera model.

도 9a 내지 9b는 레이저 측정용 씨씨디 카메라를 이용해 획득한 빔영상의 예시도.9A to 9B are exemplary views of beam images obtained by using a CD camera for laser measurement.

도 10은 x축 및 y축으로의 이동량에 따른 이동 오차값과 이동된 위치에서의 평균값을 도시한 도면.FIG. 10 is a diagram showing a moving error value according to the amount of movement on the x and y axes and an average value at the moved position; FIG.

도 11a 내지 11b는 x축 및 y축으로의 이동시 발생하는 이동 오차를 그래프로 도시한 도면.11A to 11B are graphs showing movement errors occurring when moving to the x and y axes.

* 도면의 주요부분에 대한 부호의 설명 *Explanation of symbols on the main parts of the drawings

100 : αβ 회전 스테이지 102 : xyz 스테이지100: αβ rotation stage 102: xyz stage

103 : 높이 게이지 110 : 2차원 영상용 씨씨디 카메라103: height gauge 110: CD camera for two-dimensional video

120 : 제 1 광원용 레이저 슬릿빔 발생기120: laser slit beam generator for the first light source

122 : 제 2 광원용 레이저 슬릿빔 발생기122: laser slit beam generator for the second light source

130 : 레이저 측정용 씨씨디 카메라 130: CD camera for laser measurement

220 : 위치정보 측정부 222 : 중심좌표 산출모듈220: location information measuring unit 222: central coordinate calculation module

224 : 카메라 캘리브레이션 모듈 226 : 평면방정식/법선벡터 산출모듈224: camera calibration module 226: plane equation / normal vector calculation module

228 : 좌표변환모듈228: coordinate transformation module

본 발명에서 추구하는 주된 내용은 3차원 데이터 획득을 위한 레이저 모듈을 설계하고, 이를 이용한 자동차 차체 및 부품의 2, 3차원 데이터 획득 방법, 재구성 및 고속의 해석 방법을 발명하는 것이다. 그의 방법으로 본 발명에서는 자동차 차체에 있는 홀(hole)의 면적 및 슬롯의 간격 등을 얻어내기 위한 기본적인 단계인 공간상의 한 점(목표물의 중심점)의 3D 좌표값을 측정하는 알고리즘을 제시한다. The main contents pursued by the present invention are to design a laser module for three-dimensional data acquisition, and to invent a two- and three-dimensional data acquisition method, a reconstruction and a high-speed analysis method of the vehicle body and parts using the same. In this method, the present invention proposes an algorithm for measuring 3D coordinate values of a point (center point of a target) in space, which is a basic step for obtaining the area of a hole and the spacing of a slot in an automobile body.

레이저 센서를 이용한 3차원 위치 측정 시스템을 구성하기 위해서 본 발명에서는 먼저 씨씨디 카메라를 이용하여 대상물의 2D 이미지를 습득하고 전처리 과정 및 이진화 처리 과정을 거쳐 우리가 원하는 목표물을 대상물에서 분리하고 그 목표물 중심의 2D 좌표를 얻는다. 그리고 슬릿의 레이저 다이오드를 물체에 쏘고 다시 씨씨디 카메라로 받은 빔 영상을 이용하여 대상물의 평면 방정식과 법선벡터(Normal Vector)를 계산하고, 그 평면방정식과 법선벡터를 이용하여 이차원 위치 정보를 3차원 위치 정보로 변환하게 된다.In order to construct a 3D position measurement system using a laser sensor, the present invention first acquires a 2D image of an object using a CD camera, and then separates the desired object from the object through a preprocessing process and a binarization process, and then centers the object. Get the 2D coordinates of. Then, the laser diode of the slit is shot on the object and the plane image and the normal vector of the object are calculated using the beam image received from the CD camera, and the two-dimensional position information is three-dimensional by using the plane equation and the normal vector. The location information is converted.

이렇게 변환된 3차원 위치 정보는 다른 목적을 가진 측정(앞에서 기술한 홀의 면적 및 슬롯의 간격 등)에서 활용되며 그의 기초가 된다. The three-dimensional position information thus converted is utilized and is the basis for other-purpose measurements (such as the hole area and slot spacing described above).

이하에서, 첨부된 도면을 참조하여 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정방법 및 장치에 대한 바람직한 실시예를 상세하게 설명한다.Hereinafter, with reference to the accompanying drawings will be described in detail a preferred embodiment of the method and apparatus for measuring 3D position information of an object using a CD camera and a laser beam.

도 1은 본 발명의 바람직한 일 실시예에 따라 물체의 3차원 위치정보가 측정되는 과정을 도시한 순서도이다. 도 1에 도시된 바와 같이, 본 발명에 따른 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정방법은, 2차원 영상용 씨씨디 카메라(110)를 이용하여 물체의 2차원 영상을 획득하는 단계(S100), 입력된 2차원 영상에 모폴로지 기법을 적용하여 물체의 영상을 추출하는 단계(S102), 추출된 물체의 영상을 이진화하는 단계(S104), 이진화 영상에 단면 1차 모멘트를 적용하여 물체의 중심좌표(측정점)를 산출하는 단계(S106)를 수행하여 2차원 정보를 획득한다. 1 is a flowchart illustrating a process of measuring three-dimensional position information of an object according to an exemplary embodiment of the present invention. As shown in FIG. 1, in the method for measuring three-dimensional position information of an object using a CD camera and a laser beam according to the present invention, a two-dimensional image of an object is obtained by using a two-dimensional image CD camera 110. (S100), extracting an image of an object by applying a morphology technique to the input two-dimensional image (S102), binarizing an image of the extracted object (S104), and applying a cross-sectional first moment to the binarized image. By calculating the center coordinates (measurement point) of the object (S106) to obtain two-dimensional information.

다음으로, 본 발명에 따른 3차원 위치정보가 측정방법은 2개의 레이저 슬릿 빔 발생기(120, 122)로부터 조사되는 레이저 슬릿 빔에 대하여 일정한 각도를 갖도록 설치된 레이저 측정용 씨씨디 카메라(130)의 특성을 나타내는 내부인자를 카메라 캘리브레이션을 수행하여 산출하는 단계(S108), 2개의 레이저 슬릿 빔 발생기(120, 122)를 이용하여 측정대상 물체에 2개의 슬릿 레이저 빔을 조사하고(S110), 레이저 측정용 씨씨디 카메라(130)를 이용해 빔영상을 획득하는 단계(S112), 획득된 빔영상을 이진화하는 단계(S114), 이진화된 빔영상을 세선화하는 단계(S116), 세선화된 빔영상에 호프 트랜스폼(Hough Transform) 알고리즘을 적용하여 광원1, 광원2에 대한 영상면 직선방정식을 산출하는 단계(S118)를 수행하여 3차원 정보를 획득하게 된다. Next, the three-dimensional position information measuring method according to the present invention is characterized in that the CD camera 130 for laser measurement installed so as to have a constant angle with respect to the laser slit beam irradiated from the two laser slit beam generators (120, 122) Computing an internal factor indicating a by performing camera calibration (S108), irradiating two slit laser beams to the measurement target object using the two laser slit beam generators (120, 122) (S110), for laser measurement Acquiring a beam image using the CD camera 130 (S112), binarizing the obtained beam image (S114), thinning the binarized beam image (S116), and hoping on the thinned beam image. By applying a Hough Transform algorithm (S118) to calculate the image plane linear equation for the light source 1, the light source 2 to obtain the three-dimensional information.

다음으로, 본 발명에 따른 3차원 위치정보가 측정방법은 광원1의 영상면 직선방정식, 광원2의 영상면 직선방정식, 광원1의 슬릿면 평면방정식, 광원2의 슬릿면 평면방정식, 광원1의 영상면 평면방정식, 광원2의 영상면 평면방정식, 물체면의 평면방정식과 슬릿면과 영상면 및 물체면이 한 직선에서 만나는 것을 이용하여 물체면의 평면방정식과 법선벡터를 산출한다(S120).Next, the three-dimensional position information measurement method according to the present invention is a linear equation of the image plane of the light source 1, a linear equation of the image plane of the light source 2, a slit plane equation of the light source 1, a slit plane equation of the light source 2, The plane equation of the object plane and the normal vector are calculated using the plane equation of the image plane, the plane equation of the plane of light source 2, the plane equation of the object plane and the slit plane, the image plane and the plane of the object in a straight line (S120).

마지막으로, 본 발명에 따른 3차원 위치정보가 측정방법은 획득된 2차원 정보와 3차원 정보를 이용하여 산출된 법선벡터를 씨씨디 카메라 좌표계에서의 XZ 평면과 YZ 평면에 정사영시켜 각 축으로 회전된 각을 산출하는 단계(S122), 산출된 회전각과 상기 내부인자를 이용하여 측정점에 대한 2차원(x,y) 좌표값을 3차원(X,Y) 좌표값으로 변환하는 단계(S124), 변환된 3차원(X,Y) 좌표값을 산출된 물체면의 평면방정식에 대입하여 3차원 Z 좌표값을 산출하는 단계(S126)를 수행하여 측정대상 물체 중심점의 3차원 좌표를 산출하게 된다.Finally, the method for measuring three-dimensional position information according to the present invention rotates the normal vectors calculated using the obtained two-dimensional information and three-dimensional information on the XZ plane and the YZ plane in the CD camera coordinate system and rotates on each axis. Calculating a calculated angle (S122), converting a two-dimensional (x, y) coordinate value for a measurement point into a three-dimensional (X, Y) coordinate value using the calculated rotation angle and the internal factor (S124), Substituting the converted three-dimensional (X, Y) coordinate values into the calculated plane equation of the object plane to calculate a three-dimensional Z coordinate value (S126) is performed to calculate the three-dimensional coordinates of the center point of the object to be measured.

한편, 도 2b는 본 발명의 바람직한 일 실시예에 따른 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정장치의 구성 블록도이다. 도 2b에 도시된 바와 같이 본 발명의 바람직한 일 실시예에 따른 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정장치는, 측정대상 물체의 2차원 영상을 촬영하여 출력하는 2차원 영상용 씨씨디 카메라(110), 2차원 영상용 씨씨디 카메라(110)에 수평선상으로 일정한 거리를 두고 설치되어 측정대상 물체에 슬릿 빔을 조사하는 제1광원용 레이저 슬릿 빔 발생기(120), 2차원 영상용 씨씨디 카메라(110)의 수평선상으로 일정한 거리를 두고 설치되어 측정대상 물체에 슬릿 빔을 조사하는 제2광원용 레이저 슬릿 빔 발생기(122), 레이저 슬릿 빔 발생기(120, 122)로부터 조사되는 레이저 슬릿 빔에 대하여 일정한 각도를 갖도록 설치되어 슬릿 빔이 조사된 물체의 빔영상을 촬영하여 출력하는 레이저 측정용 씨씨디 카메라(130), 2차원 영상용 씨씨디 카메라(110)로부터 출력되는 2차원 영상을 분석하여 측정대상 물체의 2차원 중심좌표를 산출하고, 레이저 측정용 씨씨디 카메라(130)에 대한 카메라 캘리브레이션을 수행하여 내부인자를 산출하며, 레이저 측정용 씨씨디 카메라(130)로부터 출력되는 빔영상을 분석하여 물체면의 평면방정식과 법선벡터를 산출하고, 내부인자와 물체면의 평면방정식 및 법선벡터를 이용하여 측정대상 물체의 2차원 중심좌표를 3차원 좌표로 변환하여 출력하는 위치정보 측정부(220) 및 2차원 영상용 씨씨디 카메라(110), 레이저 슬릿 빔 발생기(120, 122), 레이저 측정용 씨씨디 카메라(130), 위치정보 측정부(220)를 제어하여 물체의 3차원 위치정보 측정을 수행하는 제어부(210)를 포함할 수 있다.2B is a block diagram illustrating an apparatus for measuring 3D position information of an object using a CD camera and a laser beam according to an exemplary embodiment of the present invention. As shown in FIG. 2B, an apparatus for measuring 3D position information of an object using a CD camera and a laser beam according to an exemplary embodiment of the present invention is for a 2D image photographing and outputting a 2D image of an object to be measured. The laser camera slit beam generator 120 for the first light source, which is installed at the CD camera 110 and the CD camera 110 for two-dimensional image at a constant distance on a horizontal line to irradiate the slit beam to the measurement object, two-dimensional Irradiation from the laser slit beam generator 122 and the laser slit beam generators 120 and 122 for the second light source installed at a constant distance on the horizontal line of the image CD camera 110 to irradiate the slit beam to the measurement object. It is installed to have a certain angle with respect to the laser slit beam is a laser measurement CD camera 130 for recording and outputting the beam image of the object to which the slit beam is irradiated, CD camera for 2D image Analyze the two-dimensional image output from the 110 to calculate the two-dimensional center coordinates of the object to be measured, calculate the internal factors by performing a camera calibration for the laser camera CD camera 130, the seed for laser measurement The plane image and normal vector of the object plane are calculated by analyzing the beam image output from the camera 130, and the two-dimensional center coordinate of the object to be measured is three-dimensional by using the internal equations and the plane equation and normal vector of the object plane. Position information measuring unit 220 and the two-dimensional image CD camera 110, laser slit beam generator 120, 122, the laser measurement CD camera 130, the position information measuring unit It may include a control unit 210 to control the 220 to perform the three-dimensional position information measurement of the object.

이때, 보다 바람직하게 상술한 위치정보 측정부(220)는, 2차원 영상용 씨씨디 카메라(110)로부터 출력되는 2차원 영상에 모폴로지 기법을 적용하여 측정대상 물체의 영상을 추출하고, 추출된 물체의 영상을 이진화한 후, 이진화 영상에 단면 1차 모멘트를 적용하여 물체의 중심좌표(측정점)를 산출하는 중심좌표 산출모듈(222), 레이저 측정용 씨씨디 카메라(130)의 특성을 나타내는 내부인자를 산출하는 카메라 캘리브레이션 모듈(224), 레이저 측정용 씨씨디 카메라(130)로부터 출력되는 빔영상을 이진화/세선화처리하여 광원1, 광원2에 대한 영상면 직선방정식을 산출하며, 광원1의 영상면 직선방정식, 광원2의 영상면 직선방정식, 광원1의 슬릿면 평면방정식, 광원2의 슬릿면 평면방정식, 광원1의 영상면 평면방정식, 광원2의 영상면 평면방정식, 물체면의 평면방정식을 이용하여 물체면의 평면방정식과 법선벡터를 산출하는 평면방정식/법선벡터 산출모듈(226), 산출된 물체면의 법선벡터를 씨씨디 카메라 좌표계에서의 XZ 평면과 YZ 평면에 정사영시켜 각 축으로 회전된 각을 산출하고, 산출된 회전각과 상기 내부인자를 이용하여 측정점에 대한 2차원(x,y) 좌표값을 3차원(X,Y) 좌표값으로 변환한 후, 변환된 3차원(X,Y) 좌표값을 산출된 물체면의 평면방정식에 대입하여 3차원 Z 좌표값을 산출하는 좌표변환모듈(228)을 포함할 수 있다.At this time, more preferably, the above-described position information measuring unit 220 extracts an image of an object to be measured by applying a morphology technique to a two-dimensional image output from the two-dimensional image CD camera 110 and extracts the extracted object. An internal factor representing the characteristics of the center coordinate calculation module 222 and the laser camera CD camera 130 for binarizing the image of the object and applying a cross-sectional primary moment to the binarized image to calculate a center coordinate (measurement point) of the object. A beam calibration output from the camera calibration module 224 and the CD-based camera 130 for laser measurement to calculate the image plane linear equations for the light source 1 and the light source 2 is calculated. Plane linear equation, image plane linear equation of light source 2, slit plane equation of light source 1, slit plane equation of light source 2, image plane equation of light source 1, image plane equation of light source 2, plane of object plane Plane equation / normal vector calculation module 226 for calculating plane equations and normal vectors of object planes using equations, and projecting the normal vectors of the calculated object planes onto the XZ plane and YZ plane in the CD camera coordinate system Calculates the rotated angle, and converts the two-dimensional (x, y) coordinate values for the measurement points into three-dimensional (X, Y) coordinate values using the calculated rotation angle and the internal factor, and then converts the converted three-dimensional ( It may include a coordinate conversion module 228 to calculate the three-dimensional Z coordinate value by substituting the X, Y) coordinate value to the calculated plane equation of the object plane.

이하에서, 첨부된 도 3 내지 11을 참조하여 상술한 바와 같이 구성되는 본 발명에 따른 물체의 3차원 위치측정 방법과 장치의 2차원 정보와 3차원 정보 획득, 2차원-3차원 좌표변환 알고리즘 및 물체의 평면 방정식 및 법선벡터 획득 알고리즘과 실험과정을 상세하게 설명하도록 한다. In the following, two-dimensional information and three-dimensional information acquisition, two-dimensional and three-dimensional coordinate transformation algorithm of the three-dimensional position measurement method and apparatus of the object according to the present invention configured as described above with reference to the attached 3 to 11 and Plane equations of objects, normal vector acquisition algorithms and experimental procedures will be explained in detail.

1. 2차원 정보 획득 과정 - 물체의 중심좌표를 산출하는 과정1. 2D Information Acquisition Process-Calculation of Center Coordinates of Objects

(1-1) 영상의 전처리 과정(1-1) Image Preprocessing

그레이 영상을 처리할 때 있어서 좀 더 선명한 영상을 얻기 위해서는 모폴로지(Morphology) 기법이 적용되어야 한다.When processing gray images, Morphology should be applied to obtain clearer images.

모폴로지 기법이란 형태학적인 접근 기법으로 미리 기하학적 형태를 알고 있는 대상 물체의 정보를 반영하여 영상 내에서 원하는 부분만을 추출해내는 것이다. 모폴로지 기법은 가장 기본적인 연산으로 침식(erosion), 팽창(dilation) 연산이 있으며, 앞의 2가지 연산을 복합적으로 사용하는 제거(opening), 채움(closing) 연산이 있다. 모폴로지 기법을 이용하여 촬영된 2차원 영상으로부터 측정대상 물체의 영상을 특정/추출하는 기법은 이미 공지된 기술을 채택하고 있는 바 더 이상의 상세한 설명은 생략하기로 한다.The morphology technique is a morphological approach to extract only the desired part of the image by reflecting the information of the target object that knows the geometric shape in advance. Morphology techniques include erosion and dilation operations, and opening and closing operations that combine the two previous operations. Since a technique of specifying / extracting an image of an object to be measured from a 2D image photographed using a morphology technique adopts a known technique, a detailed description thereof will be omitted.

(1-2) 영상 이진화 과정(1-2) Image Binarization Process

영상의 직관적인 특징들과 단순화 때문에, 이미지의 이진화는 영상분할의 영역에서 많이 쓰이고 있다. 본 발명에서도 어떤 대상물체에서 측정하고자 하는 목표물을 구분하는 방법으로 영상 이진화를 이용하였다. Because of the intuitive features and simplification of images, the binarization of images is used in the area of image segmentation. In the present invention, image binarization was used as a method of distinguishing a target to be measured from an object.

점 (x,y)를 중심으로 한 이웃의 평균 명암도 이진화된 영상 g(x,y)는 다음과 같이 수학식 1로 정의된다.The average intensity of the neighbors around the point (x, y) is also binarized image g (x, y) is defined by Equation 1 as follows.

여기서 T는 문턱치값(threshold value)이다. 즉, 1로 표시된 화소들은 물체에 해당되고, 0으로 표시된 화소들은 배경에 해당된다. Where T is the threshold value. That is, the pixels indicated by 1 correspond to the object and the pixels indicated by 0 correspond to the background.

T가 오직 f(x,y)(명암값)에만 의존할 경우 이 이진화는 전역적(global)이라 하고 T가 f(x,y)와 g(x,y)에 모두 의존하게 되면 이 이진화는 국부적(local)이라 한다. 또, T가 공간좌표 x와 y에도 의존하면 이 이진화는 동적(dynamic) 또는 적응적(adaptive)이라 한다. 본 발명에서는 기본적인 전역적 이진화방법을 사용하였다. This binarization is global if T only depends on f (x, y) (contrast) and if T depends on both f (x, y) and g (x, y), It is called local. Also, if T also depends on the spatial coordinates x and y, then this binarization is called dynamic or adaptive. In the present invention, a basic global binarization method is used.

다음의 간단한 알고리즘을 이용하여 자동으로 T(threshold value)값을 얻을 수 있다. The following simple algorithm can be used to get the threshold value (T) automatically.

Step 1. T의 초기값을 임의로 선정한다.Step 1. Select the initial value of T arbitrarily.

Step 2. T를 사용하여 영상을 두 개의 그룹으로 분할한다.Step 2. Use T to split the image into two groups.

G1은 명도값이 T보다 큰 모든 픽셀들로 구성되어지고, G2는 명도값이 T보다 작거나 같은 모든 픽셀들로 구성되어진다.G 1 is composed of all pixels whose brightness value is greater than T, and G 2 is composed of all pixels whose brightness value is less than or equal to T.

Step 3. 각 G1과 G2 영역에서 픽셀의 명암도의 평균값 μ1와 μ2를 구한다.Step 3. Find the mean values μ 1 and μ 2 of the intensity of pixels in each G 1 and G 2 region.

Step 4. 새로운 T를 계산한다.Step 4. Calculate the new T.

Step 5. 연속 반복법에서 T의 차이가 미리 정한 변수 T0보다 작을 때까지 단계 2에서 4를 반복한다.Step 5. Repeat steps 2 to 4 until the difference in T is less than the predetermined variable T 0 in the continuous iteration.

(1-3) 중심점 추출 과정(1-3) Center Point Extraction Process

본 발명에서는 측정하고자 하는 대상물의 중심좌표를 얻기 위해 단면 1차 모멘트를 이용하고 있다. 단면 1차 모멘트는 도형의 중심과 구조물의 응력산정 및 안정도를 검토하는데 사용된다.In the present invention, the cross-sectional primary moment is used to obtain the center coordinate of the object to be measured. The cross section primary moment is used to examine the center of the figure and the stress estimation and stability of the structure.

도 3a를 참조하면, 단면을 세분한 미소면적 dA와 X축에서 까지의 dA거리 y,Y축에서 dA까지의 거리 x를 곱하여 전단면에 대하여 합할 때 , 로 되고, 이것을 X축, Y축에 대한 단면 1차 모멘트(Starical moment)라 하고, GX, GY라는 기호로 표시하며, 단위는 길이 단위의 세제곱(m3, cm3)이다.Referring to FIG. 3A, when the sum is obtained for the shear plane by multiplying the small area d A with the cross section and the distance d A from the X axis and the distance x from the Y axis to d A , This is called a cross-sectional first moment (Starical moment) with respect to the X-axis and the Y-axis, and is denoted by the symbols G X and G Y , and the unit is a cube of length unit (m 3, cm 3).

또는, 도 3b와 같이 미소면적을 dA1, dA1,...........,dAn으로 세분화하여 생각할 때, 축에서부터 각각의 미소면적까지 거리를 y1, y2,....,yn과 x1, x2,....,xn이라고 한다면 다음과 같은 수학식 4로 정의될 수도 있다.Alternatively, as shown in FIG. 3B, when the micro area is subdivided into d A1 , d A1 , ..........., d An , the distance from the axis to each micro area is y 1 , y 2 , If n ... and x 1 , x 2 , ...., x n may be defined as Equation 4 below.

도형의 중심 추출 Extract Center of Shape

도 3c를 참조하면, 어느 한 점을 지나는 임의방향의 모든 축에 대한 단면 1차 모멘트가 0이 되는 점을 그 도형의 중심(Center of figure)이라 한다. 도형에 중심은 하나만 존재하고 중심은 임의의 X, Y축에 대하여 단면 1차 모멘트를 구하여 도형의 면적으로 나누어 구한다.Referring to FIG. 3C, the point at which the cross-sectional primary moments for all axes in any direction passing through any one point becomes zero is referred to as a center of figure. There is only one center in the figure, and the center is obtained by dividing the cross section by the area of the figure with respect to arbitrary X and Y axes.

수학식 5에서 A는 도형의 면적이다. 또한 도 3d와 같이 여러 개의 단면 A1, A2, A3,......,An으로 이루어진 집합체의 단면에서는 전단면에 대한 단면 1차 모멘트를 구하여 총면적으로 나누어 수학식 6과 같이 중심의 위치를 구할 수 있다.In Equation 5, A is the area of the figure. In addition, as shown in several cross-section A 1, A 2, A 3 , ......, equation (6) the aggregate of the cross-section consisting of A n divided by the total area, obtain a first cross-sectional moment of inertia about the front end as shown in Figure 3d Find the location of the center.

2. 3차원 정보 획득 과정2. 3D Information Acquisition Process

3차원 정보 습득에 있어서 수행되는 과정은 다음과 같다.The process performed in 3D information acquisition is as follows.

본 발명에 따른 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정방법 및 장치는 레이저 빔 영상 획득 -> 이진화 -> 세선화 -> 호프 트랜스 폼(Hough Transform) -> 평면방정식 및 법선벡터 추출과정을 수행하여 물체의 3차원 정보를 습득하도록 구성된다.The method and apparatus for measuring 3D position information of an object using a CD camera and a laser beam according to the present invention are obtained by obtaining a laser beam image-> binarization-> thinning-> Hough Transform-> plane equation and normal vector It is configured to acquire three-dimensional information of the object by performing the extraction process.

레이저 슬릿빔 발생기(120, 122)로부터 조사된 2개의 레이저 빔이 측정대상 물체에 비춰지면 레이저 측정용 씨씨디 카메라(130)가 그의 영상을 받아오게 된다. 그리고 그 영상은 앞에서 설명한 이진화 처리를 거치게 되고 다시 그 빔 영상을 분석할 수 있도록 세선화(thinning) 과정을 거치게 된다. When the two laser beams irradiated from the laser slit beam generators 120 and 122 are illuminated on the measurement object, the CD camera 130 for laser measurement receives the image thereof. The image is subjected to the binarization process described above, and then thinned to analyze the beam image.

세선화된 레이저 빔은 호프 트랜스폼(Hough Transform)을 통하여 일련의 직선방정식으로 표현되고 이렇게 구해진 직선방정식으로부터 그 대상물의 평면방정식과 법선벡터를 습득하게 된다.The thinned laser beam is represented as a series of linear equations through Hough Transform, and the planar equation and normal vector of the object are acquired from the linear equations thus obtained.

(2-1) 세선화 (Thinning) 과정(2-1) Thinning Process

세선화의 기본적인 개념은 두꺼운 선을 최외각부터 한 겹씩 벗겨나가서 마지막에 남는 선 성분을 추출하는 것이다. 즉 가운데 선을 추출하는 것이다. 이는 레이저 빔의 두터운 이미지를 한 픽셀에 맺히는 직선으로 만들기 위해 본 발명에서 적용되어진다. 세선화는 원래 도형의 연결성은 변화시키지 않고, 선의 원래 형태를 유지하는 것이 중요하다.The basic concept of thinning is to peel off the thick line one layer from the outermost layer and extract the last remaining line component. That is to extract the center line. This is applied in the present invention to make the thick image of the laser beam into a straight line condensed on one pixel. Thinning does not change the connectivity of the original figure, but it is important to maintain the original shape of the line.

구조 요소 B에 의한 집합 A의 세선화는 AⓧB로 표기되며 다음의 수학식 7과 같은 구조 요소의 열에 의해 정의될 수 있다. The thinning of the set A by the structural element B is denoted by AⓧB and may be defined by a column of structural elements as shown in Equation 7 below.

이 과정은 B1으로 한번 통과(one pass)시켜 A를 세선화하고, 그 다음 이 결과를 B2로 한번 통과시켜 세선화하고, 이 과정을 Bn으로 한번 통과시켜 A를 세선화할 때까지 계속된다. 이 전 과정은 더 이상의 변화가 일어나지 않을 때까지 반복된다.This process is one pass through B 1 to thin A, then the result is passed through B 2 once to thin, and this process is passed through B n once to thin A. Continues. This whole process is repeated until no further changes occur.

(2-2) 호프 트랜스폼(Hough Transform)을 이용한 직선 추출 알고리즘(2-2) Straight Line Extraction Algorithm Using Hough Transform

호프 트랜스폼(Hough Transform)은 영상의 윤곽이나 곡선 또는 선이 매개변수로 표현될 수 있는 경우 그것을 검출해 내는데 좋은 효과를 보이는 방법이다.Hough Transform is a good way to detect the contours, curves or lines of an image if it can be represented as a parameter.

◎ 호프 트랜스폼(Hough Transform) ⅠHough Transform I

어떤 직선의 방정식 yi=axi+b위에 존재하는 점 (xi,yi), (xj,yj)의 경우 직선의 방정식을 b=-xia+yi로 쓰고 ab평면(변수공간)에 표현해보면 한점 (a',b')에서 만나게 된다. 여기서 a'와 b'는 xy평면에서 (xi,yi)와 (xj,yj)를 잇는 선의 기울기와 절편이다. 역시 직선의 방정식 yi=axi+b위에 존재하는 모든 점은 ab평면에서 (a',b')를 지나게 된다. 이러한 개념을 첨부된 도 4a(XY 평면)와 도4b(ab 평면 (변수공간))에 나타내었다.For points (x i , y i ) and (x j , y j ) on an equation y i = ax i + b of a straight line, write the equation of the line as b = -x i a + y i Variable space), we meet at one point (a ', b'). Where a 'and b' are the slope and intercept of the line connecting (x i , y i ) and (x j , y j ) in the xy plane. Again, all points on the straight line equation y i = ax i + b pass (a ', b') on the ab plane. This concept is shown in Figures 4a (XY plane) and 4b (ab plane (variable space)).

호프 트랜스폼(Hough Transform)은 이런 개념에 누적셀(accumulator cell) 개념을 첨가한다. 셀 좌표 (i,j)는 변수공간에서 좌표 (a,b)를 가지는 사각형에 해당하고, 누적값 A(i,j)를 가진다. 그 다음에 영상 내에 모든 점 (xk,yk)에 대해, 방정식 yk=axk+b 를 이용해 이에 해당하는 b에 대해 풀고, 이 b는 다시 b축에 허용된 각 값에 가장 가까운 값으로 찾아 놓는다. 그리고 그에 해당하는 A(i,j)의 값을 1씩 누적시킨다. 영상의 모든 점에 대하여 이 과정이 끝났을 때, A(i,j)에 Q라는 값은 xy평면에서 y=aix+bj 직선상에 놓인 Q개의 점을 뜻한다. ab평면을 나눈 수는 이 점들의 동일 직선상에 대한 정확도를 의미한다. 상술한 과정을 통해 ab평면이 세분된 도면을 도 4c에 도시하였다. 그러나 이 알고리즘은 직선이 X축 또는 Y축에 가까울수록 매개변수 a, b가 무한대에 가까워져서 구현상에 문제점이 있다.Hough Transform adds the concept of an accumulator cell to this concept. The cell coordinate (i, j) corresponds to a rectangle having coordinates (a, b) in variable space and has a cumulative value A (i, j). Then, for every point (x k , y k ) in the image, solve for the corresponding b using the equation y k = ax k + b, which in turn is the closest to each value allowed for the b-axis. Find it. And the corresponding value of A (i, j) is accumulated by one. When this process is complete for all points in the image, the value of Q in A (i, j) means Q points on a line y = a i x + b j in the xy plane. The number of ab planes divided means the accuracy of these points on the same straight line. The ab plane is broken down through the above-described process is shown in Figure 4c. However, this algorithm has a problem in implementation because the closer the straight line is to the X axis or the Y axis, the closer the parameters a and b are to infinity.

◎호프 트랜스폼(Hough Transform) ⅡHough Transform II

위의 호프 트랜스폼(Hough Transform) Ⅰ에서 직선이 Y축에 평행해 갈 때 매개변수 a, b가 무한대에 가까워지는 문제점을 해결하기 위해 두 번째 알고리즘을 이용한다. In the Hough Transform I above, a second algorithm is used to solve the problem of the parameters a and b approaching infinity when the straight line is parallel to the Y axis.

직선을 각도 θ와 거리 ρ의 매개변수로 표현하면 수학식 8과 같이 표현될 수 있으며, 여기에 호프 트랜스폼(Hough Transform) Ⅰ에서와 유사한 방법으로 a, b 대신에 θ, ρ를 매개변수로 θρ평면에 매핑(mapping)하여 누적셀 개념에 적용시킨다. 이러한 개념을 도 4d(직선의 정규적 표현)와 도 4e(ρθ평면의 세분)에 도시하였다.If a straight line is expressed as a parameter of angle θ and distance ρ, it can be expressed as Equation 8, and θ and ρ as parameters instead of a and b in the same manner as in Hough Transform I. It is applied to the cumulative cell concept by mapping to θρ plane. This concept is illustrated in FIG. 4D (normal representation of a straight line) and FIG. 4E (subdivision of ρθ plane).

(2-3) 카메라 캘리브레이션(Camera Calibration) 과정(2-3) Camera Calibration Process

정보를 추출하기 전 기본적으로 행해져야하는 카메라 캘리브레이션(Camera Calibration)은 Zhengyou Zhang의 “Camera Calibration with One-Dimensional Object"에 나오는 알고리즘을 적용시켰다. 본 알고리즘을 이용하는 경우 1차원의 물체로 카메라 캘리브레이션(Camera Calibration)을 가능하게 된다. Camera calibration, which should be basically performed before extracting the information, applies an algorithm from Zhengyou Zhang's “Camera Calibration with One-Dimensional Object.” When using this algorithm, the camera calibration is performed with a one-dimensional object. Calibration is possible.

◎기본적인 표기법◎ Basic notation

씨씨디 카메라 상에 맺히는 2D의 점을 m=[u,v]T로 표기하며, 공간상의 3D의 점은 M=[X,Y,Z]T로 표기한다. 그리고 확장벡터는 아래의 수학식 9와 같이 정의된다.The 2D point on the CD camera is represented by m = [u, v] T , and the 3D point in space is represented by M = [X, Y, Z] T. The extension vector is defined as in Equation 9 below.

Wow

공간상의 점 M과 씨씨디 카메라상의 점 m은 원근사영(perspective projection)으로서 다음의 수학식 10과 같은 관계가 성립된다.The point M in space and the point m on the CD camera are perspective projections, and the following equation 10 is established.

with with

여기서 s는 scale factor이고 [R t]의 R과 t는 카메라 좌표계와 베이스 좌표계의 관계를 나타내는 회전행렬(Rotation Matrix)과 전이행렬(Translation Matrix)이다. Where s is a scale factor and R and t of [R t] are a rotation matrix and a translation matrix indicating the relationship between the camera coordinate system and the base coordinate system.

그리고 는 카메라의 내부행렬로 다음과 같은 인자를 가진다.And Is the internal matrix of the camera and has the following arguments.

(u0,v0) : 중요점의 좌표값(u 0 , v 0 ): Coordinate value of key point

(α,β) : 이미지상에서의 축과 축으로의 scale factor(α, β): Scale factor on axis and axis on image

: 이미지상의 두 개의 축 와 축 사이의 뒤틀림 값 : Warp value between two axes on the image

위에서 정의된 인자를 내부인자로 정의하며 카메라 캘리브레이션(Camera Calibration)의 목적은 이 5개의 내부인자를 결정하는 것이다. The factor defined above is defined as an internal factor, and the purpose of camera calibration is to determine these five internal factors.

그리고, 로 표기하도록 한다.And, It should be written as.

◎ 1차원 물체를 이용한 카메라 캘리브레이션(Camera Calibration)◎ Camera Calibration using 1D Object

기본적인 표현식 Basic expression

세 개의 점으로 구성되고 한점을 고정시킨 공간상의 1차원 물체를 생각해보자. 양 끝점을 A, B로 하고 점 A를 고정점으로 본다. 고정점 A를 기준으로 점 B를 움직인다고 가정하자. 물체의 길이, 즉 점 AB사이의 거리는 다음의 수학식 11과 같이 구하게 된다. Consider a one-dimensional object in space consisting of three points and a fixed point. Make both ends A and B, and see point A as a fixed point. Suppose you move point B with respect to fixed point A. The length of the object, that is, the distance between the points AB is obtained as shown in Equation 11 below.

그리고 점 C의 위치는 다음의 수학식 12와 같이 주어진다.And the position of the point C is given by the following equation (12).

즉, 점 C는 양 끝점 A, B 사이에 존재하는 점이다. 여기서 λA와 λB는 점 A, B의 scale factor이고 이미 알고 있는 값이다. 만약 점 C가 AB의 중점이라면 λAB= 0.5가 될 것이다.That is, the point C is a point existing between the two end points A and B. Where λ A and λ B are the scale factors of points A and B and are known. If point C is the midpoint of AB, then λ A = λ B = 0.5.

도 5는 1차원 물체의 원근사영의 예시도로서, 도 5에서와 같이 공간상의 점 A,B,C와 이미지상의 점 a,b,c와의 관계는 다음의 수학식 13과 같다. FIG. 5 is a diagram illustrating perspective projection of a one-dimensional object, and as shown in FIG. 5, the relationship between points A, B, and C in space and points a, b and c in the image is expressed by Equation 13 below.

여기서 ZA, ZB, ZC는 점 A, B, C의 원점 O와의 거리(깊이)를 나타내는 값으로 알 수 없는 값이다.Z A , Z B , and Z C are values indicating the distance (depth) of the points A, B, and C to the origin O, and are unknown.

위의 수학식 13을 수학식 11에 대입하고 양변에 을 소거하면 다음과 같은 수학식 14가 얻어진다.Substituting Equation 13 above into Equation 11 and changing both sides Equation 14 is obtained by canceling.

그리고 로 양변을 외적을 구하면 아래와 같은 수학식 15가 된다.And The cross product of both sides is given by Equation 15 below.

수학식 15를 ZB로 정리하면 아래와 같은 수학식 16이 된다.If Equation 15 is summarized as Z B , the following Equation 16 is obtained.

그리고 수학식 11에 수학식 13을 적용하면 수학식 17과 같이 된다.In addition, when Equation 13 is applied to Equation 11, Equation 17 is obtained.

수학식 17에 수학식 16에서 도출된 ZB값을 대입하면 다음과 같은 수학식 18을 얻게 된다.Substituting the Z B value derived from Equation 16 into Equation 17, Equation 18 is obtained.

그리고 수학식 18을 양변에 제곱을 하여 표현한 결과는 다음의 수학식 19와 같다. And the result of expressing the equation (18) by the square on both sides is the same as the following equation (19).

여기서 이다.here to be.

여기서 h는 λA와 λB를 알고 있기에 구할 수 있다.Here, h can be obtained because λ A and λ B are known.

하지만 수학식 19에서 ZA의 인자 5개, 총 6개의 모르는 값들을 가지고 있다. 따라서 카메라 캘리브레이션(Camera Calibration)을 위해서는 최소한 1차원 물체의 6개의 이미지가 필요하다.But in equation (19) Z A and It has five arguments of, a total of six unknown values. Therefore, camera calibration requires at least six images of one-dimensional objects.

◇ Closed-Form Solution◇ Closed-Form Solution

수학식 19에서의 을 다음과 같은 수학식 20으로 정의하자.In equation (19) Let be defined by the following equation (20).

여기서 행렬 B는 대칭행렬이기에 아래의 수학식 21과 같이 6D 벡터로 표현이 가능하다.Since matrix B is a symmetric matrix, it can be expressed as a 6D vector as shown in Equation 21 below.

그리고 h=[h1,h2,h3]T, x=Z2 Ab 로 둔다면 수학식 19는 다음의 수학식 21과 같이 정리할 수 있다.If h = [h 1 , h 2 , h 3 ] T , x = Z 2 A b, Equation 19 can be arranged as Equation 21 below.

이 때, 이다At this time, to be

만약 1차원 물체의 이미지가 N개 얻어졌을 경우 수학식 21은 다음의 수학식 22와 같이 표현된다.If N images of the one-dimensional object are obtained, Equation 21 is expressed as Equation 22 below.

1 One

이 때, 이고, 1 = 이다.At this time, And 1 = to be.

수학식 22는 최소자승법(Least-squares solution)에 의해서 다음의 수학식 23과 같이 표현 가능하다.Equation 22 may be expressed by Equation 23 by a least-squares solution.

1One

x=Z2 Ab에서 알지 못하는 인자들을 모두 구할 수 있다.We can find all the unknown factors in x = Z 2 A b.

여기서, 로 두고 풀면 다음의 수학식 24와 같이 내부인자와 ZA값을 유일하게 뽑아낼 수 있다.here, Solving as, it is possible to extract only the internal factor and Z A value as in Equation 24 below.

위의 결과를 수학식 16에 대입해서 ZB를 구할 수 있으며, 역시 수학식 13에 대입하여 점 A, B, C를 구할 수 있다.Z B can be obtained by substituting the above result into Equation 16, and the points A, B, and C can be obtained by substituting Equation 13 as well.

본 발명에서는 상술한 바와 같은 카메라 캘리브레이션 과정을 수행하여 레이저 측정용 씨씨디 카메라(130)의 카메라 특성에 따른 내부인자를 산출하게 된다.In the present invention, by performing the camera calibration process as described above to calculate the internal factors according to the camera characteristics of the CD camera 130 for laser measurement.

3. 2차원-3차원 좌표변환 알고리즘3. 2D-3D coordinate transformation algorithm

본 알고리즘은 씨씨디 카메라 상의 좌표를 목표물이 놓인 평면의 평면방정식을 이용하여 공간상의 좌표로 변환하는 알고리즘이다. 본 발명에서는 목표물의 평면 중심좌표를 공간상의 좌표로 변환하는데 이용된다.This algorithm converts the coordinates on the CD camera to spatial coordinates using the plane equation of the plane on which the target is placed. In the present invention, it is used to convert the planar center coordinates of the target into coordinates in space.

기본 착안점은 목표물의 평면방정식에서 법선벡터를 얻어내 그 법선벡터를 씨씨디 카메라 좌표계에서의 XZ평면과 YZ평면에 정사영 시킴으로서 각 축으로의 회전된 각을 얻어내는 것에 있다. 따라서 씨씨디 카메라 상의 좌표 x, y를 독립적으로 알고리즘에 적용시켜 각각의 공간 좌표를 구하게 된다.The basic focus is on obtaining a normal vector from the plane equation of the target and orthogonally projecting the normal vector to the XZ plane and the YZ plane in the CD camera coordinate system to obtain the rotated angle in each axis. Therefore, each spatial coordinate is obtained by applying coordinates x and y on the CD camera independently to the algorithm.

공간상에서의 평면 방정식은 다음과 같이 유도된다. 한 점 A(x1,y1,z1)을 지나고 에 수직인 평면 a(x-x1)+b(y-y1)+c(z-z1)=0에서 이 식을 정리하면 ax+by+cz-(ax1+by1+cz1)=0이 되고, 여기에서 -(ax1+by1+cz1)은 일정함으로 이를 d로 놓으면 다음의 수학식 25와 같은 평면의 방정식의 일반형을 얻을 수 있다.The planar equation in space is derived as follows. Past a point A (x 1 , y 1 , z 1 ) Summarizing this expression in the plane a (xx 1 ) + b (yy 1 ) + c (zz 1 ) = 0 perpendicular to, we get ax + by + cz- (ax 1 + by 1 + cz 1 ) = 0, In this case,-(ax 1 + by 1 + cz 1 ) is constant, and if d is set to d, the general form of the equation of the plane can be obtained.

그리고 위의 는 법선벡터(normal vector)라고 부른다.And above Is called the normal vector.

본 발명에서는 먼저 평면의 방정식을 얻어내고, 그 식에서 법선벡터를 얻어내 본 알고리즘에 적용시킨다.In the present invention, a plane equation is first obtained, and a normal vector is obtained from the equation and applied to the present algorithm.

법선벡터를 카메라의 광축(Z축)을 기준으로 다른 축과 이루는 평면 즉, XZ축과 YZ축으로 사영시킴으로서 얻어지는 카메라 평면과의 기울기 값(θ)은 도 6a 또는 도 6c와 같은 평면의 평행을 이용하여 얻어진다. 그리고 얻어진 기울기 값은 그림과 같이 두 가지의 경우로 나누어 볼 수 있다. 본 발명은 그 두 가지의 경우를 고려하여 좌표변환 알고리즘을 제안한다. 이하에서는 X(실제 측정대상 물체의 3차원 중심좌표의 X좌표)를 구하기 위해 XZ평면를 기준으로 설명하며, Y(실제 측정대상 물체의 3차원 중심좌표의 Y좌표)를 구하는 알고리즘은 YZ평면상에서 동일한 알고리즘을 이용해 산출되므로 설명을 생략하기로 한다. The inclination value (θ) with the camera plane obtained by projecting the normal vector to the other axis with respect to the optical axis (Z axis) of the camera, that is, the XZ axis and the YZ axis is parallel to the plane as shown in FIG. 6A or 6C. Obtained. The obtained slope can be divided into two cases as shown in the figure. The present invention proposes a coordinate transformation algorithm in consideration of the two cases. The following description is based on the XZ plane to obtain X (X coordinate of the 3D center coordinate of the actual measurement object), and the algorithm for obtaining Y (Y coordinate of the 3D center coordinate of the actual measurement object) is the same on the YZ plane. Since the calculation is performed using an algorithm, description thereof will be omitted.

(3-1) 법선벡터의 x, y의 계수(a or b)가 음일 경우(3-1) Negative coefficients (a or b) of normal vectors are negative

도 6a는 법선벡터의 a(or b)가 음의 수를 가질 때 XZ평면의 양의 방향으로 사영시킨 그림이다. FIG. 6A is a picture projected in the positive direction of the XZ plane when a (or b) of the normal vector has a negative number.

여기서,here,

f : 초점거리f: focal length

h : 원점과 회전이 없는 물체면까지의 수직거리h: vertical distance from the origin to the object surface without rotation

Xh or Yh: 높이가 일 때 카메라가 볼 수 있는 면적의 1/2X h or Y h : 1/2 of the area visible to the camera at height

XC or YC: x or y의 씨씨디 카메라의 좌표값 XC or YC: coordinates of the CD camera of x or y

X' or Y' : 회전각 θ2가 없을 경우의 x or y의 공간 좌표값X 'or Y': Spatial coordinate value of x or y without rotation angle θ 2

X or Y : 회전각 θ2가 있을 경우의 x or y의 공간 좌표값X or Y: Spatial coordinate value of x or y when rotation angle θ 2 is present

이다. 그리고 X'(or Y') 의 값은 다음의 수학식 26과 같이 구해진다.to be. The value of X '(or Y') is obtained as in Equation 26 below.

여기서 X(or Y)를 구하기 위해 굵게 표시된 부분만을 때어내어 보면 도 6b(X의 실제 공간 좌표값)와 같이 표현되어진다. In this case, only the parts shown in bold in order to obtain X (or Y) are expressed as shown in FIG. 6B (the actual spatial coordinate values of X).

여기서 X는 우리가 실제로 구해야 되는 값이다. 그리고 X'는 θ2=0일 경우의 공간 좌표값이며 θ2는 물체와 영상면과의 기울어진 정도를 나타낸다.Where X is the value we actually get. X 'is a spatial coordinate value when θ 2 = 0, and θ 2 represents an inclination degree between an object and an image plane.

따라서 구하고자 하는 X는 다음의 수학식 27과 같이 간단히 유도 되어진다.Therefore, X to be obtained is simply derived as in Equation 27 below.

(3-2) 법선벡터의 x, y의 계수(a or b)가 양일 경우(3-2) If the coefficients (a or b) of the normal vectors are positive

첨부된 도 6c는 법선벡터의 a(or b)값이 양의 값을 가질 경우로, XZ평면의 양의 방향으로 사영된 그림을 나타내었다. 6C shows a case in which the a (or b) value of the normal vector has a positive value and is projected in the positive direction of the XZ plane.

위의 그림에서 X(or Y)를 구하기 위해 굵게 표시된 삼각형 부분을 확대하면 도 6d와 같이 나타낼 수 있다. In the above figure, if the enlarged triangle part is enlarged to obtain X (or Y), it may be represented as shown in FIG. 6D.

여기서 α=θ1이고 β=90°-θ2 가 됨을 알 수 있다. 그리고 최종적인 X를 구하기 위해 식을 유도해보면 다음의 수학식 28과 같다.It can be seen that α = θ 1 and β = 90 ° -θ 2 . And to derive the equation to find the final X is the following equation (28).

그리고 도 6c에 의해서 X는 수학식 29와 같이 표현될 수 있다.6C may be expressed by Equation 29.

따라서 구하고자 하는 X는 다음의 수학식 39과 같이 최종적으로 얻어진다.Therefore, X to be obtained is finally obtained as shown in Equation 39 below.

이상의 알고리즘을 카메라상의 좌표 x와 y에 각각 적용시키면 공간상에 법선벡터가 어떻게 존재하던지 관계없이 공간 좌표 X와 Y를 얻을 수 있다. 그리고 공간상의 Z좌표는 변환된 X와 Y의 값을 물체의 평면방정식에 대입하여 구할 수 있다. Applying the above algorithm to the coordinates x and y on the camera, we can obtain the spatial coordinates X and Y regardless of how the normal vector exists in space. The Z coordinate in space can be obtained by substituting the transformed values of X and Y into the plane equation of the object.

따라서 본 알고리즘을 적용하면 우리가 알고 있는 정보, 즉 물체의 평면 방정식을 이용하여 카메라상의 2D 좌표를 공간상의 3D좌표로 변환할 수 있음을 알 수 있다. Therefore, by applying this algorithm, we can convert the 2D coordinates on the camera into 3D coordinates in space using the information we know, that is, the plane equation of the object.

4. 물체의 평면 방정식 및 법선벡터 획득4. Obtain plane equations and normal vectors of objects

라인 및 십자 레이저 형상측정방법은 공간상에 평면의 레이저광과 카메라 사이의 기하광학을 이용하여 측정물체에 따른 궤적의 형상에 의한 3차원 형상을 측정하는 기술이다. 도 2a는 본 발명의 바람직한 일 실시예에 따른 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정장치를 이용한 측정시스템의 구조도이고, 도 7은 본 발명의 바람직한 일 실시예에 따른 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정장치의 기하학적 구성을 도시한 구성도이다.The line and cross laser shape measuring method is a technique for measuring a three-dimensional shape by the shape of a trajectory according to a measurement object using a geometrical optical between a plane laser light and a camera in space. 2A is a structural diagram of a measurement system using a CD camera and a three-dimensional position information measuring apparatus for an object using a laser beam according to an embodiment of the present invention, Figure 7 is a CD according to a preferred embodiment of the present invention This is a configuration diagram showing the geometrical configuration of a three-dimensional position information measuring apparatus of an object using a camera and a laser beam.

도 2a에 도시된 바와 같이, 레이저 슬릿빔 발생기(120, 122)는 물체면에서 100mm 떨어진 2차원 영상용 씨씨디 카메라(110)의 좌측과 우측에 위치하게 된다. 레이저 슬릿빔 발생기(120, 122)가 발광하게 되면 그 빔이 물체면에 반사된다. 그 반사되는 빛을 2차원 영상용 씨씨디 카메라(110)와 같은 높이로 100mm 떨어지고 45° 기울어진 레이저 측정용 씨씨디 카메라(130)를 이용하여 받아들이게 된다. 그리고 도 7의 평면 A와 B를 슬릿면, 평면 C, D를 영상면이라고 정의한다. As shown in FIG. 2A, the laser slit beam generators 120 and 122 are positioned on the left and right sides of the CD camera 110 for a two-dimensional image 100 mm away from an object plane. When the laser slit beam generators 120 and 122 emit light, the beam is reflected on the object plane. The reflected light is received using the laser measuring CD camera 130, which is inclined at 45 ° and dropped 100 mm at the same height as the 2D CD camera 110 for image. In addition, planes A and B of FIG. 7 are defined as slit planes, and planes C and D are image planes.

카메라의 영상선과 평면의 레이저광이 임의각을 가지고 측정단면에서 만나서 형성된 광궤적(profile)영상은 측정단면에 따라 변형된다. 이 변형된 광궤적영상은 측정물체의 삼차원형상 정보를 가지고 있으므로 보정을 통하여 측정단면의 3차원 좌표값을 얻을 수 있다.The optical trajectory (profile) image formed by the image line of the camera and the laser light in the plane meet at the measurement section at an arbitrary angle is transformed according to the measurement section. Since the modified optical trajectory image has three-dimensional shape information of the measurement object, three-dimensional coordinate values of the measurement section can be obtained through correction.

(4-1) 기본 사항(4-1) Basics

먼저 도 7의 기하학적 모델에서 좌표를 설정한다. First, coordinates are set in the geometric model of FIG. 7.

우선 카메라 좌표부터 설정한다.First set the camera coordinates.

도 8a는 씨씨디 카메라 영상평면에서의 좌표계 설정을 설명하기 위한 개념도이다. 카메라의 영상평면에서 얻어지는 디지털 영상좌표계를 살펴보면, 도 8a에서 나타나듯이 영상의 좌측상단을 원점으로 오른쪽의 수평축을 y0축, 아래쪽 수직축을 x0축으로 사용한다. 디지털 영상 좌표계의 단위는 화소 단위를 나타내는 pixel이 된다. 그러나 실제적인 좌표계는 영상평면의 중심 C를 원점으로 하는 좌표계를 쓰고 있다.8A is a conceptual diagram illustrating a coordinate system setting in the CD camera image plane. Referring to the digital image coordinate system obtained from the image plane of the camera, as shown in FIG. 8A, the horizontal axis on the right side is used as the y 0 axis and the lower vertical axis is used as the x 0 axis. The unit of the digital image coordinate system is a pixel representing a pixel unit. However, the actual coordinate system uses a coordinate system whose origin is the center C of the image plane.

도 8b는 핀홀 카메라 모델을 설명하기 위한 개념도로서, 핀홀 카메라의 기본적인 모델을 보여준다. 평면 F를 초점면이라 하고 이 초점면에서 거리 f(초점거리)만큼 떨어진 평면 I를 영상평면이라 한다. 초점면의 좌표계를 도 8b에서와 같이 잡는다면 영상평면의 좌표계를 상하좌우 반전된 좌표계를 가지게 된다. 앞으로 모든 공간상의 좌표는 초점면의 좌표계를 기준좌표계로 두고 인식한다. 영상평면의 2차원 좌표와 초점면에서의 3차원 좌표간의 관계를 나타내보면 다음과 같은 수학식 31이 성립한다. 공간상의 M점 과 영상평면상의 점 m간에는 다음과 같은 관계가 성립한다.  8B is a conceptual diagram illustrating a pinhole camera model, and illustrates a basic model of the pinhole camera. Plane F is called the focal plane and plane I away from this focal plane by the distance f (focal length) is called the image plane. If the coordinate system of the focal plane is taken as shown in FIG. 8B, the coordinate system of the image plane has a coordinate system inverted up, down, left, and right. In the future, all spatial coordinates will be recognized with the coordinate system of the focal plane as the reference coordinate system. The following equation (31) holds for the relationship between two-dimensional coordinates of the image plane and three-dimensional coordinates of the focal plane. The following relationship holds between M points in space and points m in the image plane.

그리고 C점 를 지나는 광축을 따라 초점면에서 거리 f만큼 떨어진 곳에 가상의 영상평면 I'가 존재한다. 이는 영상평면 I를 반전시킨 것과 같은 것으로 가상의 영상평면 I' 에서도 수학식 32와 같은 식이 성립한다. A virtual image plane I 'exists at a distance f away from the focal plane along the optical axis passing through point C. This is the same as inverting the image plane I. In the virtual image plane I ', the equation (32) holds.

즉, 3차원 공간에서의 한 점 M의 2차원 영상좌표 (x,y)는 가상의 영상좌표 (x',y')와 같은 값을 가지는 것이다. 따라서 도 8b에서 보듯이 영상평면 중심 C를 원점으로 왼쪽 수평축을 y', 위쪽 수직축을 x'로 잡은 것이다. 그리고 Z축은 물체를 바라보는 방향으로 잡았다. 본 발명의 레이저 좌표계에서는 도 8b와 같이 레이저 빔이 나아가는 방향을 ZL을 잡았으며, yL은 왼쪽 수평축, 그리고 xL은 오른손 좌표계를 이용하여 나오는 방향으로 잡았다.That is, the two-dimensional image coordinate (x, y) of one point M in the three-dimensional space has the same value as the virtual image coordinate (x ', y'). Therefore, as shown in FIG. 8B, the left horizontal axis is y 'and the upper vertical axis is x' with the image plane center C as the origin. And the Z axis is in the direction of looking at the object. In the laser coordinate system of the present invention, as shown in FIG. 8B, the direction in which the laser beam travels is set to Z L , y L is set to the left horizontal axis, and x L is the direction coming out using the right hand coordinate system.

(4-2) 평면방정식, 법선벡터 산출 알고리즘(4-2) Plane Equation, Normal Vector Calculation Algorithm

(4-2-1) 평면방정식(4-2-1) Plane Equation

어떤 평면상의 일직선상에 있지 않은 세 점의 좌표를 이용하여 A, B, C, D를 구할 때 일반적인 평면의 방정식은 다음과 같은 수학식 33으로 주어진다.When A, B, C, and D are obtained using the coordinates of three points that are not in a straight line on a plane, the general plane equation is given by the following equation (33).

여기서 (x,y,z)는 평면위의 공간상의 점이다. 식을 D로 나누어 세 점에 대해서 풀어보면 다음의 수학식 34와 같이 표현된다.Where (x, y, z) is a spatial point on the plane. Dividing the equation by D and solving for three points is expressed as Equation 34 below.

만약 평면이 원점을 지나지 않을 경우 다음의 수학식 35와 같이 일반식으로 표현가능하다.If the plane does not pass through the origin, it can be expressed by the general formula as shown in Equation 35 below.

, ,

그리고 평면이 원점을 지날 경우(y축이 포함되지 않을 때)에는 다음의 수학식 36과 같이 표현 가능하다. When the plane passes the origin (when the y axis is not included), it can be expressed as Equation 36 below.

, ,

(4-2-2) 물체면 계산(4-2-2) Object plane calculation

본 알고리즘의 착안점은 슬릿면과 영상면, 그리고 물체면이 모두 한 직선에서 만난다는 것이다. 두 개의 레이저에서 발광되는 빔으로 인해 세 면이 만나는 공통 직선은 두 개가 존재하게 된다. 그리고 그 두 개의 직선은 모두 물체면에 포함되게 된다. 따라서 물체면 위의 공통 직선 두 개를 찾아냄으로서 역으로 그 두 직선을 포함하는 평면의 방정식을 찾아내는 것이다. The focus of this algorithm is that the slit plane, the image plane, and the object plane all meet in a straight line. The beam emitted from the two lasers causes two common straight lines to meet each other. Both of these straight lines are included in the object plane. Thus, by finding two common straight lines on an object plane, the equation for the plane containing those two straight lines is conversely found.

알고리즘을 기술하기에 앞서 필요한 표현식을 정리하면 다음과 같다.Before describing the algorithm, the necessary expressions are summarized as follows.

① 광원1의 영상면 직선방정식 : A1x+y+c1=0① Image plane linear equation of light source 1: A 1 x + y + c 1 = 0

② 광원2의 영상면 직선방정식 : A2x+y+c2=0② Linear equation of image plane of light source 2: A 2 x + y + c 2 = 0

③ 광원1의 슬릿면 평면방정식(A) : a1x+b1y+c1z+1=0③ Slit plane equation of light source 1 (A): a 1 x + b 1 y + c 1 z + 1 = 0

④ 광원2의 슬릿면 평면방정식(B) : a2x+b2y+c2z+1=0④ Slit plane equation of light source 2 (B): a 2 x + b 2 y + c 2 z + 1 = 0

⑤ 광원1의 영상면 평면방정식(C) : A1x+y+C1z=0⑤ Plane equation of image plane of light source 1 (C): A 1 x + y + C 1 z = 0

⑥ 광원2의 영상면 평면방정식(D) : A2x+y+C2z=0⑥ Image plane planar equation of light source 2 (D): A 2 x + y + C 2 z = 0

⑦ 물체면의 평면방정식 : amx+bmy+cmz+1=0⑦ Plane equation of object surface: a m x + b m y + c m z + 1 = 0

본 알고리즘은 다음과 같은 과정을 거친다. The algorithm goes through the following process.

Step 1. 광원 1의 영상면과 광원 1의 슬릿면이 만나는 직선을 찾는다.Step 1. Find the straight line where the image plane of light source 1 meets the slit surface of light source 1.

- ⑤식을 ③식에 대입하면 다음의 수학식 37이 도출된다.-Substituting ⑤ into ③, the following equation 37 is derived.

Step 2. 광원 1의 영상면과 물체면이 만나는 직선을 찾는다.Step 2. Find the straight line where the image plane and the object plane of the light source 1 meet.

- ⑤식을 ⑦식에 대입하면 다음의 수학식 38이 도출된다.-Substituting ⑤ into ⑦, the following equation 38 is derived.

Step 3. Step 1과 2에서 구해진 두 직선이 일치하여야 하므로 다음의 수학식 39와 같이 표현 가능하다.Step 3. Since the two lines obtained in Steps 1 and 2 must coincide, it can be expressed as Equation 39 below.

Step 4. 광원 2도 앞의 과정을 반복하면 수학식 40, 41, 42가 얻어진다.Step 4. Repeating the above process for the light source 2, equations 40, 41, and 42 are obtained.

Step 5. 수학식 37, 수학식 38, 수학식 42에서 구해진 연립방정식을 정리하면 아래의 수학식 43과 같다.Step 5. The system of equations obtained from Equations 37, 38, and 42 is summarized as Equation 43 below.

Step 6. 수학식 43에서 행렬의 계수행렬이 정방형이 아님으로 수두 인벌스(Pseudo Inverse)를 이용하여 를 구한다.Step 6. In Equation 43 Since the coefficient matrix of the matrix is not square, using Pseudo Inverse Obtain

Step 7. 법선벡터는 이다.Step 7. The normal vector to be.

이상의 알고리즘으로 두 개의 라인 레이저(슬릿빔)를 물체에 쏘고 다시 그 빛을 얻는 과정을 기하학적으로 분석하여 공간상에 놓여있는 물체의 평면 방정식과 법선벡터를 얻어낼 수 있다. With the above algorithm, we can geometrically analyze the process of shooting two line lasers (slit beams) on the object and obtaining the light again, and obtain the plane equation and normal vector of the object lying in space.

5. 실험결과5. Experimental Results

도 2a는 본 발명의 바람직한 일 실시예에 따른 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정장치를 이용한 측정시스템의 구조도이다.FIG. 2A is a structural diagram of a measurement system using a three-dimensional position information measuring apparatus for an object using a CD camera and a laser beam according to an embodiment of the present invention.

도 2a에 도시된 바와 같이, 먼저 2차원 영상용 씨씨디 카메라(110)의 양옆에 밀착되어 두 개의 레이저 슬릿빔 발생기(라인 레이저)(120, 122)가 고정된다. 그리고 그 밑으로 측정하고자 하는 물체를 5자유도로 10μm단위로 위치 변화 가능한 x, y, z 스테이지(102)를 두고 그 위에 씨씨디 카메라의 x축 y축으로 회전을 할 수 있는 α, β 스테이지(100)를 설치하였다. 그리고 2차원 영상용 씨씨디 카메라(110)와 수평선상으로 10mm 떨어진 위치에 x축으로 45° 회전된 레이저 측정용 씨씨디 카메라(130)를 설치하였다. 각 카메라(110, 130)와 레이저(120, 122)의 높이는 20μm 단위로 측정 가능한 높이 게이지로 측정하였다. 그리고 스테이지가 놓여질 바닥은 완전평면으로 제작한 정반이 놓여있다.As shown in FIG. 2A, two laser slit beam generators (line lasers) 120 and 122 are fixed to the sides of the CD camera 110 for two-dimensional images. And the x, y, z stage (102) that can change the position of the object to be measured under 10 degrees of freedom with 5 degrees of freedom, and the α, β stage that can rotate on the x-axis y-axis of the CD camera on it ( 100) was installed. The CD camera 130 for laser measurement rotated by 45 ° on the x-axis was installed at a position 10 mm away from the two-dimensional image CD camera 110. The heights of the cameras 110 and 130 and the lasers 120 and 122 were measured by a height gauge that can be measured in units of 20 μm. The floor on which the stage is to be placed lies in a fully-planned surface.

실험에 사용된 각 장치는 다음과 같다. Each device used in the experiment is as follows.

-. 씨씨디 카메라(110, 130) : 640×480 pixel, 0.117mm resolution, 2EA-. CD camera (110, 130): 640 × 480 pixel, 0.117mm resolution, 2EA

-. 레이저(120, 122) : ClassⅢb type, 655 wavelength, 2EA-. Lasers 120 and 122: Class IIIb type, 655 wavelength, 2EA

-. 광 필터 : 640~660 wavelength, 2EA-. Optical filter: 640 ~ 660 wavelength, 2EA

-. 완전평면 정반 : 가로 550mm × 세로 310mm × 높이 300mm-. Complete Flat Plate: 550mm × 310mm × 300mm

-. x, y, z 스테이지(102) : 각 축으로 10mm 이동, 10의 정밀도-. x, y, z stage (102): 10mm shift in each axis, precision of 10

-. α, β 스테이지(100) : 축 ±10°, 축 ±10° 이동, 전직도 0.05mm/스트록-. α, β stage 100: axis ± 10 °, axis ± 10 ° movement, straightness 0.05mm / stroke

(5.1) 라인 레이저(슬릿빔)를 이용한 3차원 정보 획득 실험(5.1) 3D information acquisition experiment using line laser (slit beam)

도 9a는 씨씨디 카메라로 반사되는 레이저의 영상을 획득한 영상이다. 위에서 설명한 바와 같이 물체면과 45°의 기울기를 가지고 영상을 획득하였다. 그리고 도 9b은 광 필터를 장착하여 측정하고자 하는 레이저 라인만을 획득한 영상이다.9A is an image obtained by the image of the laser reflected by the CD camera. As described above, images were acquired with an inclination of 45 ° with the object plane. 9B is an image obtained by acquiring only a laser line to be measured by mounting an optical filter.

도 9b의 영상에서 두 개의 직선을 추출하여 영상에서 x축으로 120pixel, 360pixel과 만나는 점을 찾으면 다음과 같다. When two straight lines are extracted from the image of FIG. 9B and found to meet 120 pixels and 360 pixels on the x-axis in the image, they are as follows.

1번 레이저 : P1 = (120 , 173) P2 = (360 , 171)Laser 1: P1 = (120, 173) P2 = (360, 171)

2번 레이저 : P3 = (120 , 412) P4 = (360 , 419)Laser No. 2: P3 = (120, 412) P4 = (360, 419)

Step 1 : 위에서 얻어진 4개의 점이 한 평면에 포함된다는 점을 이용하여 광원 1의 평면 방정식을 얻어낼 수 있다. Step 1: Using the fact that the four points obtained above are included in one plane, the plane equation of light source 1 can be obtained.

평면 방정식의 일반형 : General form of plane equation:

0.089x-0.0125-0.097z+1=00.089x-0.0125-0.097z + 1 = 0

Step 2 : Step 1과 같은 방법으로 광원2의 평면방정식 의 평면 방정식을 구하면 다음과 같다. Step 2: In the same way as in Step 1, the plane equation of the plane equation of the light source 2 is obtained as follows.

0.20x-0.115y-0.055+1=00.20x-0.115y-0.055 + 1 = 0

Step 3 : 광원 1의 영상 평면 : Step 3: Image plane of light source 1:

-0.7125x+y-0.1632=0-0.7125x + y-0.1632 = 0

Step 4 : 광원 2의 영상 평면 : Step 4: Image plane of light source 2:

-1.745x+y-0.382z=0-1.745x + y-0.382z = 0

Step 5 : 물체면의 평면방정식 : Step 5: Plane Equation of Object Surface:

따라서 물체면의 평면 방정식은 다음과 같이 주어진다.Thus, the plane equation of the object plane is given by

이에 따른 평면의 Normal Vector는 다음과 같다.The normal vector of the plane is as follows.

(5.2) 좌표변환 알고리즘 실험(5.2) Coordinate transformation algorithm experiment

본 실험에서는 평면방정식과 법선벡터를 구했다는 가정 하에서 2차원의 좌표를 3차원 좌표로 변환하는 실험을 시행하였다. In this experiment, an experiment was performed to convert two-dimensional coordinates to three-dimensional coordinates under the assumption that plane equations and normal vectors were obtained.

실험에 사용된 법선벡터는 N=(0.001, 0.001, 106.55)로 설정하였다. The normal vector used in the experiment was set to N = (0.001, 0.001, 106.55).

그리고 측정된 홀 중심점의 절대적인 위치를 알지 못하기 때문에 각 축으로의 상대적인 변이량에 대한 오차 실험을 실시하였다. 그리고 영상을 9등분을 하여 홀의 중심이 각 영역에 있을 때의 실험도 실시하였다. And since we do not know the absolute position of the measured hole center point, we conducted an error test for the relative amount of variation in each axis. The experiment was also conducted when the center of the hole was in each area by dividing the image into nine equal parts.

법선벡터를 고정시킨 상태에서 물체의 홀의 중심을 이동시키면서 그 실험값을 얻어낸다. 최초 측정되는 홀의 중심을 기준값으로 설정하고 +0.5mm씩 x축 및 y축 방향으로 이동시키면서 홀의 중심의 3차원 좌표를 10회 측정하였다. The experimental value is obtained by moving the center of the hole of the object with the normal vector fixed. The three-dimensional coordinates of the center of the hole were measured ten times while the center of the hole to be initially measured was set as a reference value and moved in the x- and y-axis directions by +0.5 mm.

도 10은 x축 및 y축으로의 이동량에 따른 이동 오차값과 이동된 위치에서의 평균값을 도시한 도면이고, 도 11a 내지 11b는 x축 및 y축으로의 이동시 발생하는 이동 오차를 그래프로 도시한 도면이다.FIG. 10 is a diagram illustrating a movement error value according to the movement amount on the x-axis and a y-axis and an average value at the moved position, and FIGS. 11A to 11B are graphs of the movement error occurring when moving on the x-axis and the y-axis One drawing.

도 10과 11을 참조하면, 위의 실험 결과 x축으로의 이동, y축으로의 이동시 모두 조금의 오차가 발생하였다. 이는 초점길이의 정확도가 떨어진다는 점과 2차원 이미지용 씨씨디 카메라(110)의 평면이 기울어져 법선벡터가 평면의 법선벡터와 완전히 일치하지 않았고 그리고 각 축으로의 이동이 정확히 이루어지지 않기 때문에 발생한 오차이다. 그리고 디지털 계측기가 아닌 아날로그 계측기의 사용으로 정확한 눈금을 읽는데 힘든 점도 들 수 있다. 하지만 이런 오차가 있음에도 불구하고 그 오차의 정도가 μm단위로 일정하며 기준값을 잘 따라가는 것을 볼 수 있다. 이는 정확한 카메라 캘리브레이션 적용과 정확한 법선벡터가 산출된다면 오차를 줄일 수 있다. 그리고 실제 실험 모듈의 제작을 통하여 그 이외의 오차의 원인(축의 뒤틀림, 주위 밝기로 인한 목표물 인식 오차)을 제거할 수 있다. Referring to FIGS. 10 and 11, as a result of the above experiment, some errors occurred in both the movement on the x-axis and the movement on the y-axis. This is because the accuracy of the focal length is inferior and the plane of the CD camera 110 for the two-dimensional image is inclined so that the normal vector does not coincide with the normal vector of the plane, and the movement in each axis is not performed correctly. Error. Also, the use of analog instruments, rather than digital ones, can make it difficult to read the correct scale. However, despite this error, the degree of the error is constant in μm and it can be seen that the reference value is well followed. This can reduce errors if the correct camera calibration is applied and the correct normal vector is calculated. In addition, it is possible to eliminate the cause of the error (axis distortion, target recognition error due to ambient brightness) through the manufacture of the actual experimental module.

상기한 본 발명의 바람직한 실시예는 예시의 목적을 위해 개시된 것이고, 본 발명에 대해 통상의 지식을 가진 당업자라면 본 발명의 사상과 범위 안에서 다양한 수정, 변경 및 부가가 가능할 것이며, 이러한 수정, 변경 및 부가는 하기의 특허청구범위에 속하는 것으로 보아야 할 것이다.Preferred embodiments of the present invention described above are disclosed for purposes of illustration, and those skilled in the art will be able to make various modifications, changes and additions within the spirit and scope of the present invention. Additions should be considered to be within the scope of the following claims.

Claims (8)

(a) 2차원 영상용 씨씨디 카메라를 이용하여 물체의 2차원 영상을 획득하고, 물체의 측정점에 대한 2차원(x,y) 좌표값을 산출하는 단계;(a) acquiring a two-dimensional image of the object by using a two-dimensional image CD camera and calculating a two-dimensional (x, y) coordinate value for the measurement point of the object; (b) 2개의 레이저 슬릿 빔 발생기로부터 조사되는 레이저 슬릿 빔에 대하여 일정한 각도를 갖도록 설치된 레이저 측정용 씨씨디 카메라의 특성을 나타내는 내부인자를 카메라 캘리브레이션을 수행하여 산출하는 단계;(b) calculating and calibrating an internal factor representing a characteristic of the laser measuring CD camera installed at a predetermined angle with respect to the laser slit beams irradiated from the two laser slit beam generators; (c) 2개의 레이저 슬릿 빔 발생기를 이용하여 측정대상 물체에 2개의 슬릿 레이저 빔을 조사하고, 상기 레이저 측정용 씨씨디 카메라를 이용해 빔영상을 획득하는 단계;(c) irradiating two slit laser beams to an object to be measured using two laser slit beam generators and acquiring a beam image using the laser measuring CD camera; (d) 획득된 빔영상으로부터 물체가 놓인 평면의 평면방정식과 법선벡터를 산출하는 단계; 및(d) calculating a plane equation and a normal vector of the plane on which the object is placed from the obtained beam image; And (e) 상기 내부인자와 상기 평면방정식 및 법선벡터를 이용하여 측정점에 대한 2차원 좌표값을 3차원 좌표값으로 변환하는 단계를 포함하는 것을 특징으로 하는 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정방법.(e) converting a two-dimensional coordinate value of a measurement point into a three-dimensional coordinate value by using the inner factor, the plane equation, and a normal vector. Dimensional location information measurement method. 제1항에 있어서,The method of claim 1, 상기 (a) 단계는,In step (a), (a1) 입력된 2차원 영상에 모폴로지 기법을 적용하여 물체의 영상을 추출하는 단계;(a1) extracting an image of an object by applying a morphology technique to the input two-dimensional image; (a2) 추출된 물체의 영상을 이진화하는 단계; 및(a2) binarizing an image of the extracted object; And (a3) 이진화 영상에 단면 1차 모멘트를 적용하여 물체의 중심좌표(측정점)를 산출하는 단계를 포함하는 것을 특징으로 하는 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정방법.(a3) A method of measuring three-dimensional position information of an object using a CD camera and a laser beam, comprising: calculating a center coordinate (measurement point) of the object by applying a cross-sectional primary moment to the binarized image. 제1항에 있어서,The method of claim 1, 상기 (d) 단계는, In step (d), (d1) 빔영상을 이진화하는 단계;(d1) binarizing the beam image; (d2) 이진화된 빔영상을 세선화하는 단계;(d2) thinning the binarized beam image; (d3) 세선화된 빔영상에 호프 트랜스폼(Hough Transform) 알고리즘을 적용하여 광원1, 광원2에 대한 영상면 직선방정식을 산출하는 단계; 및(d3) calculating an image plane linear equation for light sources 1 and 2 by applying a Hough Transform algorithm to the thinned beam image; And (d4) 광원1의 영상면 직선방정식, 광원2의 영상면 직선방정식, 광원1의 슬릿면 평면방정식, 광원2의 슬릿면 평면방정식, 광원1의 영상면 평면방정식, 광원2의 영상면 평면방정식, 물체면의 평면방정식을 이용하여 물체면의 평면방정식과 법선벡터를 산출하는 단계를 포함하는 것을 특징으로 하는 하는 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정방법.(d4) Image plane linear equation of light source 1, image plane linear equation of light source 2, slit plane equation of light source 1, slit plane equation of light source 2, image plane plane equation of light source 1, image plane plane equation of light source 2 And calculating a plane equation and a normal vector of the object plane by using a plane equation of the object plane. 3D position information measuring method of an object using a CD camera and a laser beam. 제3항에 있어서,The method of claim 3, 상기 (d4) 단계는 슬릿면과 영상면 및 물체면이 한 직선에서 만나는 것을 이용하여 물체면의 평면방정식과 법선벡터를 산출하는 것을 특징으로 하는 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정방법.In the step (d4), the three-dimensional position of the object using a CD camera and a laser beam is calculated by calculating a plane equation and a normal vector of the object plane by using the slit plane, the image plane, and the object plane meet in a straight line. How information is measured. 제1항에 있어서,The method of claim 1, 상기 (e) 단계는,In step (e), (e1) 산출된 법선벡터를 씨씨디 카메라 좌표계에서의 XZ 평면과 YZ 평면에 정사영시켜 각 축으로 회전된 각을 산출하는 단계;(e1) calculating the angle rotated on each axis by orthogonally projecting the calculated normal vector to the XZ plane and the YZ plane in the CD camera coordinate system; (e2) 산출된 회전각과 상기 내부인자를 이용하여 측정점에 대한 2차원(x,y) 좌표값을 3차원(X,Y) 좌표값으로 변환하는 단계; 및(e2) converting two-dimensional (x, y) coordinate values for the measurement point into three-dimensional (X, Y) coordinate values using the calculated rotation angle and the internal factor; And (e3) 변환된 3차원(X,Y) 좌표값을 산출된 물체면의 평면방정식에 대입하여 3차원 Z 좌표값을 산출하는 단계를 포함하는 것을 특징으로 하는 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정방법.(e3) calculating the three-dimensional Z coordinate value by substituting the converted three-dimensional (X, Y) coordinate values into the calculated plane equation of the calculated object plane. 3D location information measurement method. 제5항에 있어서,The method of claim 5, 상기 (e2) 단계의 3차원(X,Y) 좌표값은 2차원(x,y) 좌표값이 독립적으로 변환 알고리즘에 적용되어 각각 산출되며,The three-dimensional (X, Y) coordinate values of the step (e2) is calculated by applying two-dimensional (x, y) coordinate values independently to the conversion algorithm, 법선벡터의 x 또는 y의 계수가 음인 경우 3차원(X 또는 Y) 좌표값은,If the coefficient of x or y of the normal vector is negative, the three-dimensional (X or Y) coordinate value is 또는 로 산출되고, or Is calculated as 법선벡터의 x 또는 y의 계수가 양인 경우 3차원(X 또는 Y) 좌표값은,If the coefficient of x or y of the normal vector is positive, the three-dimensional (X or Y) coordinate value is 또는 로 산출되되, or Calculated as 상기 θ2는 씨씨디 카메라의 영상면과 물체면(XZ 평면 또는 YZ 평면)과의 회전각이며, 상기 X' 또는 Y'는 회전각 θ2가 없을 경우의 x 또는 y의 공간 좌표값인 것을 특징으로 하는 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정방법.Θ 2 is a rotation angle between the image plane of the CD camera and an object plane (XZ plane or YZ plane), and X 'or Y' is a spatial coordinate value of x or y when there is no rotation angle θ 2. 3D position information measurement method of an object using a CD camera and a laser beam. 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정장치에 있어서,In the three-dimensional position information measuring device of the object using a CD camera and a laser beam, 측정대상 물체의 2차원 영상을 촬영하여 출력하는 2차원 영상용 씨씨디 카메라;A two-dimensional CD camera for photographing and outputting a two-dimensional image of an object to be measured; 상기 2차원 영상용 씨씨디 카메라에 수평선상으로 일정한 거리를 두고 설치되어 측정대상 물체에 슬릿 빔을 조사하는 제1광원용 레이저 슬릿 빔 발생기;A laser slit beam generator for a first light source installed on the two-dimensional image CD camera at a predetermined distance on a horizontal line to irradiate a slit beam to an object to be measured; 상기 2차원 영상용 씨씨디 카메라의 수평선상으로 일정한 거리를 두고 설치되어 측정대상 물체에 슬릿 빔을 조사하는 제2광원용 레이저 슬릿 빔 발생기;A laser slit beam generator for a second light source installed at a predetermined distance on a horizontal line of the two-dimensional image CD camera to irradiate a slit beam to a measurement target object; 상기 레이저 슬릿 빔 발생기로부터 조사되는 레이저 슬릿 빔에 대하여 일정한 각도를 갖도록 설치되어 슬릿 빔이 조사된 물체의 빔영상을 촬영하여 출력하는 레이저 측정용 씨씨디 카메라;A CD camera for laser measurement, which is installed to have a predetermined angle with respect to the laser slit beam emitted from the laser slit beam generator and outputs a beam image of an object to which the slit beam is irradiated; 상기 2차원 영상용 씨씨디 카메라로부터 출력되는 2차원 영상을 분석하여 측정대상 물체의 2차원 중심좌표를 산출하고, 상기 레이저 측정용 씨씨디 카메라에 대한 카메라 캘리브레이션을 수행하여 내부인자를 산출하며, 상기 레이저 측정용 씨씨디 카메라로부터 출력되는 빔영상을 분석하여 물체면의 평면방정식과 법선벡터를 산출하고, 상기 내부인자와 상기 물체면의 평면방정식 및 법선벡터를 이용하여 측정대상 물체의 2차원 중심좌표를 3차원 좌표로 변환하여 출력하는 위치정보 측정부; 및Analyzing the two-dimensional image output from the two-dimensional image CD camera for calculating the two-dimensional center coordinates of the object to be measured, and performing the camera calibration for the laser measurement CD camera to calculate the internal factor, Analyze the beam image output from the CD camera for laser measurement to calculate the plane equation and the normal vector of the object plane, and use the internal factors and the plane equation and the normal vector of the object plane to determine the two-dimensional center coordinates of the object to be measured. A location information measuring unit converting the coordinates into three-dimensional coordinates and outputting the converted coordinates; And 상기 2차원 영상용 씨씨디 카메라, 상기 레이저 슬릿 빔 발생기, 상기 레이저 측정용 씨씨디 카메라 및 상기 위치정보 측정부를 제어하여 물체의 3차원 위치정보 측정을 수행하는 제어부를 포함하는 것을 특징으로 하는 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정장치.And a controller configured to control the two-dimensional image CD camera, the laser slit beam generator, the laser measurement CD camera, and the position information measuring unit to perform three-dimensional position information measurement of an object. 3D position information measuring device of an object using a camera and a laser beam. 제7항에 있어서,The method of claim 7, wherein 상기 위치정보 측정부는,The location information measuring unit, 상기 2차원 영상용 씨씨디 카메라로부터 출력되는 2차원 영상에 모폴로지 기법을 적용하여 측정대상 물체의 영상을 추출하고, 추출된 물체의 영상을 이진화한 후, 이진화 영상에 단면 1차 모멘트를 적용하여 물체의 중심좌표(측정점)를 산출하는 중심좌표 산출모듈;The image of the object to be measured is extracted by applying a morphology technique to the two-dimensional image output from the two-dimensional image CD camera, the image of the extracted object is binarized, and the cross-sectional first moment is applied to the binarized image. A center coordinate calculation module for calculating a center coordinate of the measurement point; 상기 레이저 측정용 씨씨디 카메라의 특성을 나타내는 내부인자를 산출하는 카메라 캘리브레이션 모듈;A camera calibration module for calculating an internal factor representing a characteristic of the CD camera for laser measurement; 상기 레이저 측정용 씨씨디 카메라로부터 출력되는 빔영상을 이진화/세선화처리하여 광원1, 광원2에 대한 영상면 직선방정식을 산출하며, 광원1의 영상면 직선방정식, 광원2의 영상면 직선방정식, 광원1의 슬릿면 평면방정식, 광원2의 슬릿면 평면방정식, 광원1의 영상면 평면방정식, 광원2의 영상면 평면방정식, 물체면의 평면방정식을 이용하여 물체면의 평면방정식과 법선벡터를 산출하는 평면방정식/법선벡터 산출모듈; 및The beam image output from the laser measuring CD camera is binarized / thinned to calculate an image plane linear equation for the light source 1 and the light source 2, an image plane linear equation for the light source 1, an image plane linear equation for the light source 2, Using the slit plane equation of light source 1, the slit plane equation of light source 2, the image plane plane equation of light source 1, the image plane plane equation of light source 2, and the plane equation of object plane, calculate the plane equation and normal vector of the object plane. A plane equation / normal vector calculation module; And 산출된 물체면의 법선벡터를 씨씨디 카메라 좌표계에서의 XZ 평면과 YZ 평면에 정사영시켜 각 축으로 회전된 각을 산출하고, 산출된 회전각과 상기 내부인자를 이용하여 측정점에 대한 2차원(x,y) 좌표값을 3차원(X,Y) 좌표값으로 변환한 후, 변환된 3차원(X,Y) 좌표값을 산출된 물체면의 평면방정식에 대입하여 3차원 Z 좌표값을 산출하는 좌표변환모듈을 포함하는 것을 특징으로 하는 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원 위치정보 측정장치.Orthogonal projection of the calculated vector of the object plane to the XZ plane and YZ plane in the CD camera coordinate system to calculate the angle rotated on each axis, and using the calculated angle of rotation and the internal factor two-dimensional (x, y) After converting the coordinates to 3D (X, Y) coordinates, the 3D Z coordinates are calculated by substituting the converted 3D (X, Y) coordinates into the plane equation of the calculated object plane. 3D position information measuring apparatus for an object using a CD camera and a laser beam, characterized in that it comprises a conversion module.
KR1020080017489A 2008-02-26 2008-02-26 Method of 3D Inspection of the object using CCD camera laser beam and Apparutus thereof KR100941978B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080017489A KR100941978B1 (en) 2008-02-26 2008-02-26 Method of 3D Inspection of the object using CCD camera laser beam and Apparutus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080017489A KR100941978B1 (en) 2008-02-26 2008-02-26 Method of 3D Inspection of the object using CCD camera laser beam and Apparutus thereof

Publications (2)

Publication Number Publication Date
KR20090092150A true KR20090092150A (en) 2009-08-31
KR100941978B1 KR100941978B1 (en) 2010-02-11

Family

ID=41209314

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080017489A KR100941978B1 (en) 2008-02-26 2008-02-26 Method of 3D Inspection of the object using CCD camera laser beam and Apparutus thereof

Country Status (1)

Country Link
KR (1) KR100941978B1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101126626B1 (en) * 2010-03-02 2012-03-26 한국과학기술원 System and Method for large-scale 3D reconstruction
KR101296780B1 (en) * 2011-02-15 2013-08-14 계명대학교 산학협력단 Obstacle Detecting system using of laser, and method thereof
KR101337625B1 (en) * 2012-03-16 2013-12-05 삼성중공업 주식회사 A blasting inspection system
KR20190086951A (en) * 2018-01-15 2019-07-24 주식회사 스트리스 System and Method for Calibration of Mobile Mapping System Using Terrestrial LiDAR
CN112180362A (en) * 2019-07-05 2021-01-05 北京地平线机器人技术研发有限公司 Conversion pose determination method and device between radar and camera and electronic equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103196371A (en) * 2013-03-29 2013-07-10 南京工业大学 Method and system for conducting initiative real-time three-dimensional measurement on large compartment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100577954B1 (en) * 2004-03-17 2006-05-10 강영준 Apparatus and method for the non-contact adaptive dimension measurement
WO2006135040A1 (en) * 2005-06-17 2006-12-21 Omron Corporation Image processing device and image processing method performing 3d measurement

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101126626B1 (en) * 2010-03-02 2012-03-26 한국과학기술원 System and Method for large-scale 3D reconstruction
KR101296780B1 (en) * 2011-02-15 2013-08-14 계명대학교 산학협력단 Obstacle Detecting system using of laser, and method thereof
KR101337625B1 (en) * 2012-03-16 2013-12-05 삼성중공업 주식회사 A blasting inspection system
KR20190086951A (en) * 2018-01-15 2019-07-24 주식회사 스트리스 System and Method for Calibration of Mobile Mapping System Using Terrestrial LiDAR
CN112180362A (en) * 2019-07-05 2021-01-05 北京地平线机器人技术研发有限公司 Conversion pose determination method and device between radar and camera and electronic equipment
CN112180362B (en) * 2019-07-05 2024-04-23 北京地平线机器人技术研发有限公司 Method and device for determining conversion pose between radar and camera and electronic equipment

Also Published As

Publication number Publication date
KR100941978B1 (en) 2010-02-11

Similar Documents

Publication Publication Date Title
CN110288642B (en) Three-dimensional object rapid reconstruction method based on camera array
Orteu et al. Multiple-camera instrumentation of a single point incremental forming process pilot for shape and 3D displacement measurements: methodology and results
Xu et al. Line structured light calibration method and centerline extraction: A review
KR100941978B1 (en) Method of 3D Inspection of the object using CCD camera laser beam and Apparutus thereof
Shi et al. A simultaneous calibration technique of the extrinsic and turntable for structured-light-sensor-integrated CNC system
WO2007015059A1 (en) Method and system for three-dimensional data capture
CN107167073A (en) A kind of three-dimensional rapid measurement device of linear array structure light and its measuring method
Liu et al. A novel stereo vision measurement system using both line scan camera and frame camera
Yang et al. Flexible and accurate implementation of a binocular structured light system
CN109307483A (en) A kind of phase developing method based on structured-light system geometrical constraint
CN107110644A (en) Three-dimensional (3D) testing standard
Fernandez et al. Planar-based camera-projector calibration
CN106500625A (en) A kind of telecentricity stereo vision measuring apparatus and its method for being applied to the measurement of object dimensional pattern micron accuracies
CN111353997B (en) Real-time three-dimensional surface defect detection method based on fringe projection
Li et al. Stereo vision based automated solder ball height and substrate coplanarity inspection
CN112525106B (en) Three-phase machine cooperative laser-based 3D detection method and device
Solav et al. Duodic: 3d digital image correlation in Matlab
Lee et al. Machine vision system for curved surface inspection
Zexiao et al. A novel approach for the field calibration of line structured-light sensors
Chen et al. Field-of-view-enlarged single-camera 3-D shape reconstruction
Tehrani et al. A new approach to 3D modeling using structured light pattern
Hongsheng et al. Three-dimensional reconstruction of complex spatial surface based on line structured light
CN113432558A (en) Device and method for measuring irregular object surface area based on laser
KR100379948B1 (en) Three-Dimensional Shape Measuring Method
CN111612071A (en) Deep learning method for generating depth map from shadow map of curved surface part

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee