KR100779918B1 - Image process apparatus and method using stereo vision - Google Patents

Image process apparatus and method using stereo vision Download PDF

Info

Publication number
KR100779918B1
KR100779918B1 KR1020060094786A KR20060094786A KR100779918B1 KR 100779918 B1 KR100779918 B1 KR 100779918B1 KR 1020060094786 A KR1020060094786 A KR 1020060094786A KR 20060094786 A KR20060094786 A KR 20060094786A KR 100779918 B1 KR100779918 B1 KR 100779918B1
Authority
KR
South Korea
Prior art keywords
image
digital
fpga
decoder
inspection
Prior art date
Application number
KR1020060094786A
Other languages
Korean (ko)
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 KR1020060094786A priority Critical patent/KR100779918B1/en
Application granted granted Critical
Publication of KR100779918B1 publication Critical patent/KR100779918B1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B62LAND VEHICLES FOR TRAVELLING OTHERWISE THAN ON RAILS
    • B62DMOTOR VEHICLES; TRAILERS
    • B62D65/00Designing, manufacturing, e.g. assembling, facilitating disassembly, or structurally modifying motor vehicles or trailers, not otherwise provided for
    • B62D65/005Inspection and final control devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60YINDEXING SCHEME RELATING TO ASPECTS CROSS-CUTTING VEHICLE TECHNOLOGY
    • B60Y2200/00Type of vehicle
    • B60Y2200/10Road Vehicles
    • B60Y2200/11Passenger cars; Automobiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Manufacturing & Machinery (AREA)
  • Chemical & Material Sciences (AREA)
  • Combustion & Propulsion (AREA)
  • Transportation (AREA)
  • Mechanical Engineering (AREA)
  • Image Analysis (AREA)

Abstract

An image processing apparatus for inspecting stereo vision is provided to secure technology of a high speed inspecting system for picture recognition and processing, and to improve productivity of an automobile parts industry by including a decoder, a memory unit, a digital signal processing unit, an encoder, a FPGA and a serial communicating unit. An image processing apparatus for inspecting stereo vision comprises a decoder(10), a memory unit(30), a digital signal processing unit(40), an encoder(50), a FPGA(20) and a serial communicating unit(60). The decoder is inputted with stereo and n pieces of analog pictures of components photographed by n pieces of cameras and converts to a digital picture. The memory unit receives the digital picture from the decoder and stores the digital picture. The digital signal processing unit extracts parallax of the digital picture stored in the memory and inspects if the components are defective. The encoder converts the digital picture processed in the digital signal processing unit into analog, and displays the picture to a monitor. The FPGA transfers a digital video picture from the decoder to the memory unit, and transfers the digital picture processed in the digital signal processing unit to the encoder. The serial communicating unit is connected to the FPGA, and transmits/receives data to/from the outside by a serial communicating method.

Description

스테레오비전 검사용 영상처리장치 및 이를 이용한 검사방법{Image process apparatus and method using stereo vision}Image processing apparatus and method using stereo vision for stereo vision inspection

도 1은 스테레오 카메라의 기하학적 구조를 설명하는 도면이다.1 is a diagram illustrating the geometry of a stereo camera.

도 2는 본 발명의 실시예에 따른 전체 검사 시스템의 구성도이다.2 is a block diagram of the entire inspection system according to an embodiment of the present invention.

도 3은 본 발명의 실시예에 따른 스테레오비전 검사용 영상처리장치의 구성도이다.3 is a block diagram of an image processing apparatus for stereo vision inspection according to an exemplary embodiment of the present invention.

도 4는 도 3에 도시된 디지털 신호 처리부의 상세 구성도이다.4 is a detailed block diagram of the digital signal processor shown in FIG. 3.

도 5는 도 3에 도시된 메모리부와 디지털 신호 처리부의 연결도이다.FIG. 5 is a connection diagram of the memory unit and the digital signal processor shown in FIG. 3.

도 6은 도 3에 도시된 디지털 신호 처리부의 상세 구성도이다.FIG. 6 is a detailed configuration diagram of the digital signal processor shown in FIG. 3.

도 7은 도 3에 도시된 엔코더의 상세 구성도이다.FIG. 7 is a detailed configuration diagram of the encoder shown in FIG. 3.

도 8은 도 3에 도시된 엔코더와 FPGA 및 디지털 신호 처리부의 연결도이다.8 is a connection diagram illustrating an encoder, an FPGA, and a digital signal processor illustrated in FIG. 3.

도 9는 도 3에 도시된 직렬 통신부에 사용되는 듀얼 UART의 블록도이다.9 is a block diagram of a dual UART used in the serial communication unit shown in FIG. 3.

도 10은 도 3에 도시된 직렬 통신부에 사용되는 라인 구동기/수신기인 RS-232의 칩 회로도이다.FIG. 10 is a chip circuit diagram of RS-232 which is a line driver / receiver used in the serial communication unit shown in FIG.

도 11은 도 3에 도시된 직렬통신부의 연결도이다11 is a connection diagram of the serial communication unit illustrated in FIG. 3.

도 12는 도 3에 도시된 입출력부의 연결도이다.FIG. 12 is a connection diagram of the input / output unit shown in FIG. 3.

도 13은 본 발명의 실시예에 따른 부품 검사 알고리즘의 전체 흐름도이다.13 is a general flow diagram of a parts inspection algorithm in accordance with an embodiment of the present invention.

도 14는 도 13의 부품 검사 알고리즘에 대한 타이밍도이다. FIG. 14 is a timing diagram for the part inspection algorithm of FIG. 13.

도 15는 도 13에서 카메라 영상 입력을 위하여 카메라의 수직 동기 신호를 이용하여 수직 인터럽트 동작과정에서의 타이밍도이다.FIG. 15 is a timing diagram in a vertical interrupt operation process using a vertical synchronization signal of a camera for inputting a camera image in FIG. 13.

도 16은 도 13의 부품 검사 알고리즘의 프로그램 흐름도이다.16 is a program flow diagram of the component inspection algorithm of FIG.

도 17a 내지 도 17m은 본 발명의 실시예에 따른 부품 검사를 위한 영상처리장치 및 검사방법을 적용한 영상들을 나타낸 도면들이다.17A to 17M are views illustrating images to which an image processing apparatus and an inspection method for inspecting parts according to an exemplary embodiment of the present invention are applied.

본 발명은 스테레오비전 검사용 영상처리장치 및 이를 이용한 검사방법에 관한 것으로서, 구체적으로는 자동차 부품의 자동화 검사를 통하여 부품 조립의 공정시간을 단축하고 검사의 신뢰도를 향상시키기 위하여 스테레오 카메라 영상을 이용하여 처리할 수 있는 스테레오비전 검사용 영상처리장치와 이를 이용하여 검사 공정 시간을 단축할 수 있는 검사방법에 관한 것이다.The present invention relates to an image processing apparatus for a stereo vision inspection and an inspection method using the same, and specifically, by using a stereo camera image to shorten the process time of assembly and improve the reliability of inspection through the automated inspection of automobile parts. The present invention relates to an image processing apparatus for stereo vision inspection that can be processed, and an inspection method capable of shortening an inspection process time using the same.

자동차 제작 기술의 급속한 발달고 인해 자동차 부품들은 점점 더 복잡하고 정교한 구성으로 진화되고 있다. 이에 따라 부품들의 제조 공정 및 검사 장비가 가져야 할 정확도와 신뢰도의 수준도 함께 높아졌다. 하지만, 국내 중소기업 규모의 생산업체에서는 고가의 장비를 도입하기가 어렵기 때문에 아직까지도 세밀한 검사가 요구되는 부품들 중 다수를 사람이 육안으로 판별하고 있는 실정이다.Rapid advances in automotive manufacturing technology are driving the evolution of automotive components into increasingly complex and sophisticated configurations. The result is an increase in the level of accuracy and reliability that parts manufacturing processes and inspection equipment must have. However, it is difficult for domestic small and medium-sized producers to introduce expensive equipment, so many of the parts that require detailed inspection are still visually identified by humans.

이에 따라, 사람이 하는 수작업 대신에 머신 비전을 이용하여 시각 검사 장비를 구현하면 검사 공정도 자동화하여 공정의 일관성을 유지할 수 있을 것이다. 따라서, 시각 검사 장비를 도입하여 검사 공정을 자동화하고 검사 시간을 최대한 단축하는 일이 전체 공정 시간을 줄이는 데 중요한 요소가 될 것이다. 또한 검사 포인트도 5~수십가지 및 3차원 검사영역 등 다양하므로 기존 검사장비로는 여러개의 영상 처리 장치가 필요하다. 그러므로 1개의 영상처리장치로 3 차원 영상 및 수십가지의 검사 포인트를 검사할 수 있는 장치가 필요한 현실이다.As a result, implementing vision inspection equipment using machine vision instead of human intervention will automate the inspection process to maintain process consistency. Therefore, the introduction of visual inspection equipment to automate the inspection process and reduce the inspection time as much as possible will be an important factor in reducing the overall process time. In addition, the inspection points also vary from 5 to several dozen and three-dimensional inspection area, so the existing inspection equipment requires multiple image processing devices. Therefore, it is a reality that a device capable of inspecting three-dimensional images and dozens of inspection points with one image processing device is required.

본 발명은 자동차 부품의 자동화 검사를 통하여 부품 조립의 공정 시간을 단축하고 검사의 신뢰도를 향상시키는데 그 목적이 있다.An object of the present invention is to shorten the process time of assembly of parts through the automated inspection of automotive parts and to improve the reliability of the inspection.

본 발명은 자동차 부품을 자동으로 검사하기 위하여 스테레오 카메라 영상을 이용하여 처리할 수 있는 스테레오비전 검사용 영상 처리 장치를 구현하는데 그 목적이 있다.An object of the present invention is to implement an image processing apparatus for stereo vision inspection that can be processed by using a stereo camera image to automatically inspect the automotive parts.

본 발명은 다수의 카메라 및 스테레오 검사용 영상 처리 장치를 이용하여 멀티 프로세싱이 가능한 알고리즘 및 검사방법을 구현하는데 그 목적이 있다.An object of the present invention is to implement a multi-processing algorithm and inspection method using a plurality of cameras and stereo image processing apparatus.

상기 목적을 달성하기 위한 스테레오비전 검사용 영상처리장치는 n개의 카메라로 부품을 촬영한 스테레오 및 n개의 아날로그 영상을 n개의 입력채널로 입력받 아 디지털 영상으로 변환하는 디코더; 상기 디코더로부터 디지털 영상을 입력받아 저장하는 메모리부; 상기 메모리부에 저장된 디지털 영상의 시차를 추출하고 부품의 불량 여부를 검사하는 디지털 신호 처리부; 상기 디지털 신호 처리부에서 영상신호처리된 디지털 영상을 아날로그로 변환하여 모니터로 영상을 디스플레이하는 엔코더; 및 상기 디코더로부터의 디지털 비디오 영상을 상기 메모리부로 전달하고, 상기 디지털 신호 처리부에서 영상신호처리된 디지털 영상을 상기 엔코더로 전달하는 FPGA를 포함하는 것을 특징으로 하는 한다.In order to achieve the above object, a stereo vision inspection image processing apparatus includes a decoder for converting stereo and n analog images of parts photographed by n cameras into n input channels and converting them into digital images; A memory unit for receiving and storing a digital image from the decoder; A digital signal processor extracting parallax of the digital image stored in the memory unit and inspecting whether a component is defective; An encoder for converting the digital signal processed by the digital signal processor into an analog and displaying the image on a monitor; And an FPGA which transmits the digital video image from the decoder to the memory unit and delivers the digital image processed by the digital signal processor to the encoder.

상기 목적은 (a) 입고되는 검사 부품의 영상을 다수의 카메라를 통하여 획득하고 노이즈를 제거하는 단계; (b) 이미 저장된 정상 부품과의 정확한 시차 계산을 위하여 검사 부품의 정확한 위치를 맞추는 단계(image registration); (c) 다수의 카메라로부터 획득한 1 프레임의 영상들을 순차적으로 저장하는 단계; (d) 상기 저장된 영상을 통하여 검사 부품의 시차(disparity)를 계산하는 단계; (e) 이미 저장된 정상 부품과 검사 부품의 시차를 비교하는 단계; 및 (f) 상기 비교 결과(정상/불량)를 출력하는 단계를 포함하는 것을 특징으로 하는 스테레오비전 검사용 영상처리장치를 이용한 검사방법에 의해서도 달성될 수 있다.The object is (a) acquiring an image of the incoming inspection component through a plurality of cameras and removing noise; (b) image registration of the correct position of the inspection component for accurate parallax calculation with the already stored normal component; (c) sequentially storing images of one frame obtained from a plurality of cameras; (d) calculating a disparity of an inspection part based on the stored image; (e) comparing the parallax of the inspection part and the normal part already stored; And (f) outputting the comparison result (normal / poor), which may be achieved by an inspection method using an image processing apparatus for stereo vision inspection.

이하, 본 발명의 바람직한 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, with reference to the accompanying drawings, preferred embodiments of the present invention will be described in detail.

본 발명의 실시예에 따른 스테레오비전 검사용 영상처리장치 및 이를 이용한 검사방법을 설명하기에 앞서 스테레오 영상의 개념에 대하여 살펴본다.Before describing the stereo vision inspection image processing apparatus and the inspection method using the same according to an embodiment of the present invention will be described with respect to the concept of a stereo image.

일반적으로 스테레오 비전(stereo vision)에서 카메라의 기하학적 모델은 두 대의 카메라가 하나의 물체를 바라보고 있는 구조를 가지며 응용분야에 따라 다양한 형태를 나타낸다. 3차원 정보를 2차원의 평면에 표현하는 작업은 공간상의 여러 점들을 영상의 한 점과 대응시켜야 하기 때문에 필연적으로 깊이(depth)정보를 잃어버리게 된다. 깊이 정보를 표현할 수 없는 2차원 영상으로부터 3차원 정보를 복원하는 경우에, 다른 시점에서 촬영된 여러 장의 영상을 이용해 스테레오 정합(stereo matching) 기법을 적용하게 된다.In general, in stereo vision, the geometric model of the camera has a structure in which two cameras look at a single object and show various shapes depending on the application. Representing three-dimensional information on a two-dimensional plane inevitably loses depth information because it is necessary to map several points in space to one point in the image. When restoring 3D information from a 2D image that cannot express depth information, a stereo matching technique is applied using a plurality of images photographed at different viewpoints.

도 1은 스테레오 카메라의 기하학적 구조를 설명하는 도면이다.1 is a diagram illustrating the geometry of a stereo camera.

도 1에와 같이, 스테레오 영상이란 공간상의 한 점을 여러 시점에서 촬영한 영상들을 의미한다. 이 영상들을 이용한 스테레오 정합의 목표는 각 스테레오 영상 내부의 좌표에 대응하는 3차원 공간내 좌표를 구하는 것이다.As shown in FIG. 1, a stereo image refers to images obtained by photographing a point in space from various viewpoints. The goal of stereo matching using these images is to find coordinates in three-dimensional space that correspond to the coordinates inside each stereo image.

도 1을 참조하면, 물체와 카메라와의 거리(depth)를 z라 하면, Z는 아래 수학식 1로 표현될 수 있다.Referring to FIG. 1, when a distance between an object and a camera is z, Z may be expressed by Equation 1 below.

Figure 112006070887347-pat00001
Figure 112006070887347-pat00001

상기 수학식 1에서 dl과 dr의 차이(disparity)를 구할 수 있다면 3차원 공간 내 지점들의 상대적 거리를 구할 수 있고, 초점거리(f)와 기준선(L)의 길이가 알려져 있다면 물체의 Z 좌표를 구할 수 있다.If the difference between dl and dr can be obtained in Equation 1, the relative distances of the points in the three-dimensional space can be obtained, and if the focal length f and the length of the reference line L are known, the Z coordinate of the object is known. You can get it.

정밀한 자동차 부품 중 2차원으로 불량을 판별할 수 없는 부분이 존재한다. 예를 들어, 프레스(Press) 제품 같은 경우 홈의 깊이 부분을 2차원 카메라로는 측정하기 힘들다. 홈의 깊이에 따라 제품의 양품/불량이 판별되므로 이런 경우에는 3차원을 통하여 깊이의 차이 범위가 일정 오차 내에 들어가야 한다. 본 발명의 실시예에서는 2차원으로 판별하기 어려운 검사영역을 스테레오 카메라로 근접하여 3차원으로 촬영 후 검사항목을 비교하여 양품과 불량을 판별하고자 한다.There are some parts of the precision automotive parts that cannot be identified in two dimensions. For example, in press products, the depth of the groove is difficult to measure with a two-dimensional camera. In this case, the range of depth difference should be within a certain error through three dimensions. In the embodiment of the present invention to examine the inspection area that is difficult to determine in two-dimensional proximity to the stereo camera in three dimensions after comparing the inspection items to determine the good or bad.

이하, 본 발명의 실시예에 따른 자동차 부품의 검사를 위한 영상처리장치 및 이를 이용한 검사방법에 대하여 살펴본다.Hereinafter, an image processing apparatus for inspecting an automotive part and an inspection method using the same according to an exemplary embodiment of the present invention will be described.

총 8대의 카메라를 이용하여 부품의 각 영역을 검사하고 또한 부품의 깊이를 통한 검사를 할 수 있도록 두 대의 카메라를 이용하여 시차(disparity)를 추출할 수 있도록 한다. 8대의 카메라는 비디오 신호의 동기를 맞추기 위해 외부 동기가 가능한 산업용 카메라를 사용하고, 근접초점이 가능하도록 접안렌즈를 사용한다. 카메라의 영상을 A/D 변환 후 프레임 메모리에 임시로 저장한다. 프레임 메모리에 저장된 영상은 디지털 신호 처리부(DSP)를 사용하여 시차를 추출하고 검사를 행한다. 전체 검사 시스템의 구성도는 도 2에 나타나 있다. 이 중 본 발명의 실시예에 따른 영상처리장치에 대하여 자세히 살펴본다.A total of eight cameras are used to examine each area of the part, and two cameras can be used to extract disparity to inspect the parts through the depth of the parts. The eight cameras use industrial cameras with external synchronization to synchronize video signals, and eyepieces to allow close focus. The camera's video is temporarily stored in frame memory after A / D conversion. An image stored in the frame memory is extracted by using a digital signal processing unit (DSP) and inspected. A schematic diagram of the entire inspection system is shown in FIG. 2. Among them, an image processing apparatus according to an exemplary embodiment of the present invention will be described in detail.

도 3은 본 발명의 실시예에 따른 스테레오비전 검사용 영상처리장치의 구성도이다.3 is a block diagram of an image processing apparatus for stereo vision inspection according to an exemplary embodiment of the present invention.

도 3을 참조하면, 본 발명의 실시예에 따른 스테레오비전 검사용 영상처리장치는 디코더(Decoder,10), FPGA(Field Programmable Gate Array, 20), 메모리부(Memory,30), 디지털 신호 처리부(DSP,40), 엔코더(Encoder,50), 직렬통신 부(Serial,60) 및 입출력부(I/O부,70)를 포함한다.Referring to FIG. 3, an image processing apparatus for inspecting a stereovision according to an exemplary embodiment of the present invention may include a decoder 10, a field programmable gate array 20, a memory 30, and a digital signal processor. DSP 40, an encoder 50, a serial communication unit 60, and an input / output unit I / O 70.

즉, 비디오 신호는 디코더(10)로 A/D 변환한 후 FPGA(20)를 통해 메모리부(30)에 저장되고 이를 디지털 신호 처리부(40)에서 신호처리한다. 신호처리된 결과는 엔코더(50)로 D/A 변환되어 모니터에 디스플레이된다. 이하, 각 구성요소에 대하여 자세히 살펴본다.That is, the video signal is A / D-converted by the decoder 10 and then stored in the memory unit 30 through the FPGA 20 and processed by the digital signal processor 40. The signal processed result is D / A converted by the encoder 50 and displayed on the monitor. Hereinafter, each component will be described in detail.

디코더(Decoder, 10)는 최대 8대의 카메라로 촬영한 스테레오 영상 및 다수의 아날로그 비디오 영상을 최대 8개의 입력채널로 입력하여 디지털 비디오 신호로 변환시키기 위한 것이다. 본 발명의 실시예에서는 SAA7111 제품을 사용하고, 도 4에 상세 구성도가 나타난 있다. SAA7111 디코더(20)는 4개의 복합 비디오 신호(composite video baseband signal:CVBS) 또는 2개의 Y/C 신호(또는 1개의 Y/C 및 2개의 CVBS신호)를 선택하여 A/D변환 시킨다. 입력신호의 선택, 엘리어싱 방지 필터, A/D 변환기, 자동 클램프(clamp), 자동 이득조정, 클럭발생회로, 디지털 다중-표준 디코더(PAL BGHI, PAL M, PAL N, NTSC M 및 NTSC N), 밝기/명암대비/채도/색상 제어회로 및 칼라포맷 변환회로를 포함하고 있다. 또한 SAA7111 디코더(10)는 4개의 아날로그입력단과 1개의 디지털 비디오 디코더를 가지며, 이 디코더는 PAL 또는 NTSC 신호를 CCLR-601규정의 칼라 비디오신호로 변환시킨다.The decoder 10 is used to input stereo images captured by up to eight cameras and a plurality of analog video images through up to eight input channels and convert them into digital video signals. In the embodiment of the present invention, the SAA7111 product is used, and a detailed configuration diagram is shown in FIG. 4. The SAA7111 decoder 20 selects four composite video baseband signals (CVBS) or two Y / C signals (or one Y / C and two CVBS signals) for A / D conversion. Selection of input signal, anti-aliasing filter, A / D converter, automatic clamp, automatic gain adjustment, clock generation circuit, digital multi-standard decoder (PAL BGHI, PAL M, PAL N, NTSC M and NTSC N) It includes brightness / contrast / saturation / color control circuitry and color format conversion circuitry. The SAA7111 decoder 10 also has four analog input stages and one digital video decoder, which converts PAL or NTSC signals into CCLR-601 compliant color video signals.

FPGA(20)는 논리회로를 프로그램이 가능하도록 설계된 부품으로 모듈과 모듈사이의 데이터 통신 역할을 주로 하며 신호의 변환도 처리가 가능하며, 본 발명에서는 상기 디코더(10)로부터의 디지털 비디오 영상을 메모리부(30)로 전달하고, 디지털 신호 처리부(40)에서 영상신호처리된 디지털 영상을 엔코더(50)로 전달하며, 직렬통신부(60)의 직렬통신방식으로 데이터를 입출력하는 역할을 한다.The FPGA 20 is a component designed to program a logic circuit. The FPGA 20 mainly serves as data communication between modules and processes signals, and in the present invention, the digital video image from the decoder 10 is stored in a memory. The controller 30 transmits the digital image processed by the digital signal processor 40 to the encoder 50, and inputs and outputs data through the serial communication method of the serial communication unit 60.

메모리부(30)는 FPGA(20)로부터 출력되는 디지털 비디오 영상을 저장하는 역할을 한다. 본 발명의 실시예에 사용된 메모리는 SDRAM 및 플래쉬(flash) ROM이며, 메모리부(30)의 용도 및 주소영역은 표 1과 같다. SDRAM인 T8LCM16은 영상처리를 디코더된 디지털 영상데이터를 저장하는 역할을 하고, 주소영역은 0x8000000부터이다. 플래쉬 메모리 중 AT29LV020는 프로그램과 기준영상데이터를 저장하고, HY29LV160은 부트(boot) 프로그램이 내장된다. 이들의 메모리 주소영역은 각각 0x90000000 및 0xA0000000부터이다. I/O용 메모리는 FPGA(20) 내부 메모리를 사용하며 메모리 주소영역은 0xB0000000부터이다. 디지털 신호 처리부(40)에서 사용된 주소영역이 각각 할당되었고, 각 주소영역에 해당하는 메모리가 설정되도록 칩 선택신호 CE0, CE1, CE2 및 CE3이 디지털 신호 처리부(40)에서 발생된다. 외부 메모리의 제어는 디지털 신호 처리부(40) 내부의 EMIF(external memory interface)를 통해 이루어지며, 메모리의 주소, 데이터 및 칩 선택 등이 프로그램에 의해 제어된다.The memory unit 30 stores a digital video image output from the FPGA 20. The memory used in the embodiment of the present invention is an SDRAM and a flash ROM, and the uses and address areas of the memory unit 30 are shown in Table 1 below. The SDRAM T8LCM16 serves to store digital image data decoded for image processing, and the address area is from 0x8000000. Among the flash memories, the AT29LV020 stores programs and reference video data, and the HY29LV160 has a built-in boot program. These memory address areas are from 0x90000000 and 0xA0000000, respectively. The memory for I / O uses the FPGA 20 internal memory and the memory address area is from 0xB0000000. The address areas used in the digital signal processor 40 are allocated, and the chip select signals CE0, CE1, CE2, and CE3 are generated in the digital signal processor 40 so that a memory corresponding to each address area is set. The external memory is controlled through an external memory interface (EMIF) inside the digital signal processor 40, and the memory address, data, and chip selection are controlled by a program.

Figure 112006070887347-pat00002
Figure 112006070887347-pat00002

메모리부(30)와 디지털 신호 처리부(40)와의 연결도는 도 5에 나타나 있다. 데이터 버스는 32비트이며 SDRAM은 16비트의 데이터 라인을 가지고 있으므로 2개를 사용하여 32비트의 데이터를 저장하고 읽을 수 있도록 구성한다. 플래쉬 메모리인 HY29LV160도 동일한 이유로 2개를 사용한다. 주소버스는 디지털 신호 처리부(40)로부터 총 20비트를 사용하지만 메모리의 용량에 따라 각기 달리 사용한다.A connection diagram between the memory unit 30 and the digital signal processor 40 is shown in FIG. 5. The data bus is 32 bits, and the SDRAM has 16 bits of data lines, so two are used to store and read 32 bits of data. The flash memory HY29LV160 also uses two for the same reason. The address bus uses a total of 20 bits from the digital signal processor 40, but differently depending on the capacity of the memory.

디지털 신호 처리부(DSP,40)는 메모리부(30)에 저장된 디지털 비디오 신호의 시차를 추출하고 부품의 불량 여부를 검사한다. 본 발명의 실시예에서 디지털 신호 처리부(40)는 TI사의 TMS320C6711을 사용하였으며, 도 6에 상세히 도시되어 있다. 상기 디지털 신호 처리부(40) 칩은 4개의 유동 소수점 및 고정 소수점 연산용 ALU와 2개의 고정 소수점 전용 ALU, 2개의 유동 소수점 및 고정 소수점 연산용 곱셈기, 32개의 32비트 레지스터를 갖고 있으며, 한 사이클에 32 비트 명령어 8개를 처리할 수 있고, C6000 DSP 제품군의 C6211, C6211B, C6711B와 호환된다. 메모리 맵은 아래 표 2와 같다.The digital signal processor DSP 40 extracts the parallax of the digital video signal stored in the memory 30 and checks whether a component is defective. In the embodiment of the present invention, the digital signal processor 40 uses TI's TMS320C6711, which is shown in detail in FIG. 6. The digital signal processor 40 chip has four floating-point and fixed-point arithmetic ALUs, two fixed-point-only ALUs, two floating-point and fixed-point arithmetic multipliers, and 32 32-bit registers. It can handle eight 32-bit instructions and is compatible with the C6211, C6211B and C6711B of the C6000 DSP family. The memory map is shown in Table 2 below.

Figure 112006070887347-pat00003
Figure 112006070887347-pat00003

엔코더(50)는 영상처리된 디지털 비디오신호를 아날로그로 변환시키고 모니터로 영상을 디스플레이한다. 본 발명의 실시예에서는 SAA7121을 사용하고 이의 블록도는 도 7과 같다. SAA7121 엔코더(50)는 디지털 YUV 비디오데이터를 NTSC 또는 PAL 또는 S-Video신호로 변환한다. 회로는 4:2:2로 다중화된 vhaotdlalus서 라인당 720 유효화소를 가지는 YUV에 적합한 CCIR을 채택한다. 이 소자는 동기/클럭 발생기와 DAC를 내장하고 있다. 모놀리식 CMOS 3.3V(5V) 소자이고, 디지털 PAL/NTSC 엔코더이다. 또한 Y, C 및CVBS의 3개의 DAC를 가지고 있고 시스템 화소 주파수가 13.5MHz이다. 도 8은 엔코더(50)와 FPGA(20) 및 디지털 신호 처리부(40)의 연결도이다.The encoder 50 converts the processed digital video signal into analog and displays an image on a monitor. In an embodiment of the present invention, SAA7121 is used, and a block diagram thereof is shown in FIG. The SAA7121 encoder 50 converts digital YUV video data into an NTSC or PAL or S-Video signal. The circuit adopts a CCIR suitable for YUV with 720 effective pixels per line in a vhaotdlalus multiplexed at 4: 2: 2. The device integrates a sync / clock generator and DAC. It is a monolithic CMOS 3.3V (5V) device and a digital PAL / NTSC encoder. It also has three DACs, Y, C and CVBS, with a system pixel frequency of 13.5MHz. 8 is a connection diagram of the encoder 50, the FPGA 20, and the digital signal processor 40.

직렬통신부(60)는 외부로부터 데이터를 전달받거나 외부로 데이터를 전송하는 역할을 한다. 직렬데이터 전송을 위해서는 송신측에서 병렬데이터를 직렬 데이터로 변환하고 수신측에서는 직렬데이터를 병렬데이터로 변환하는 과정이 필요하다. 직렬데이터 전송방식은 크게 비동기식(asynchronous)전송과 동기식(synchronous) 전송으로 나누어지며, 본 발명의 실시예에서는 비동기식전송을 사용한다. 비동기식 통신 제어기를 일반적으로 UART(Universal Asynchronous Receiver/Transmitter)라 부른다. 본 발명의 실시예에 사용한 UART칩은 TI사의 TL16C752B이고 이의 블록도는 도 9에 상세히 나타나 있다. 이 칩은 3.3V로 동작되며, 64바이트의 FIFO(first input first output)를 가진 듀얼 UART이다.The serial communication unit 60 serves to receive data from the outside or to transmit data to the outside. For serial data transmission, a process of converting parallel data into serial data on the transmitting side and converting serial data into parallel data on the receiving side is required. The serial data transmission method is largely divided into asynchronous transmission and synchronous transmission, and an embodiment of the present invention uses asynchronous transmission. An asynchronous communication controller is commonly referred to as a universal asynchronous receiver / transmitter (UART). The UART chip used in the embodiment of the present invention is TI's TL16C752B, and a block diagram thereof is shown in detail in FIG. The chip operates at 3.3V and is a dual UART with 64 bytes of first input first output (FIFO).

UART에서 나오는 신호는 보통 TTL신호 레벨을 갖기 때문에 노이즈에 약하고 통신거리에 제약이 있다. 직렬 데이터를 원거리로 전송하기 위해 컴퓨터 내부에서 사용하는 신호레벨 보다 안전한 레벨로 변환하는 단계를 거치게 되는데 이를 신호레벨 변환단계라 부른다. 여기서는 단순한 신호레벨의 변환뿐만 아니라 통신상대를 1:1 또는 1:다(多)로 하는데 따르는 회로적인 문제도 고려해야 한다. 이러한 측면에서 선택되는 통신방식으로 RS-232C, RS-422A 및 RS-485 등이 있다. 본 발명의 실시예에서는 직렬데이터의 라인 구동기/수신기(Line driver/receiver)인 RS-232를 사용한다. 본 발명의 실시예에서 사용한 칩은 MAX3232를 사용하였으며, 이의 회로도는 도 10에 나타나 있다. 도 11은 본 발명의 실시예에 따른 직렬통신부의 연결도이다. 이와 관련된 주소 할당은 표 3과 같다.Since the signal coming out of the UART usually has a TTL signal level, it is weak in noise and has a limited communication distance. In order to transmit serial data over a long distance, a step of converting the signal to a level safer than the signal level used in the computer is performed. This is called a signal level conversion step. In addition to the simple conversion of signal levels, the circuit issues involved in making the communication partner 1: 1 or 1: multi must also be considered. Communication methods selected in this respect include RS-232C, RS-422A, and RS-485. In the embodiment of the present invention, RS-232, which is a line driver / receiver, is used. The chip used in the embodiment of the present invention uses a MAX3232, the circuit diagram of which is shown in FIG. 11 is a connection diagram of a serial communication unit according to an embodiment of the present invention. Related address assignments are shown in Table 3.

Figure 112006070887347-pat00004
Figure 112006070887347-pat00004

입출력부(I/O부, 70)는 외부에서 사용자가 데이터를 입력하고, 영상처리장치의 상태를 출력한다. 본 발명의 실시예에서는 D F/F을 이용하여 입출력부(70)를 구성한다. D F/F은 SN74VTH16374를 사용하며, 도 12에 입출력부(70)의 연결도를 도시하였다. 이는 3.3V로 동작하고, 3 상태(state)로 출력되는 16비트의 에지 트리거(edge trigger) D F/F이다. 외부에서의 입력은 8비트이고 디지털 신호 처리부(40) 메모리 맵에서 0x90103000으로 할당되어 있다. 메모리 맵에서 0x90104000으로 할당되어 1번째 및 2번째의 D F/F이 선택되면 LED가 점멸되도록 데이터가 출력된다. 그리고 디지털 신호 처리부(40)에서 주소 0x90105000 및 0x90106000을 설정하면 3번째 D F/F이 선택되어 이의 데이터를 외부로 출력할 수 있다. 상기 입출력부(70)와 관련된 할당 주소는 표 4와 같다.The input / output unit (I / O unit) 70 inputs data from the outside and outputs a state of the image processing apparatus. In the embodiment of the present invention, the input / output unit 70 is configured using D F / F. D F / F uses SN74VTH16374, and a connection diagram of the input / output unit 70 is illustrated in FIG. 12. This is a 16-bit edge trigger D F / F that operates at 3.3V and is output in three states. The external input is 8 bits and assigned to 0x90103000 in the digital signal processor 40 memory map. If the 1st and 2nd D F / F are selected as 0x90104000 in the memory map, data is outputted so that the LED blinks. When the addresses 0x90105000 and 0x90106000 are set by the digital signal processor 40, the third D F / F is selected to output the data to the outside. The assigned addresses associated with the input / output unit 70 are shown in Table 4.

Figure 112006070887347-pat00005
Figure 112006070887347-pat00005

상기와 같은 구성의 영상처리장치를 이용하여 자동차 부품의 검사를 실시하기 위해서는 먼저 두 대의 카메라로부터 획득된 스테레오 영상으로부터 물체의 거리 정보를 나타내는 시차(disparity)를 추출하고, 이를 이용하여 부품의 불량 여부를 판정하는 부품 검사를 행한다.In order to inspect the automotive parts using the image processing apparatus having the above-described configuration, first, the disparity representing the distance information of the object is extracted from the stereo images obtained from the two cameras, and the parts are inspected for defects. A part inspection is performed to determine.

시차를 추출하는 방법은 크게 feature-based 방법과 area-based 방법으로 나눌 수 있다. feature-based 방법은 영상이 가지고 있는 특징점들을 이용하여 시차를 추출하는 방법이고, area-based 방법은 한 화소의 인근 영역으로부터 시차를 계산하는 방법이다. 영상의 특성에 따라서 일반적으로 area-based 방법을 널리 사용하지만, 계산 시간이 많이 걸리는 단점을 가진다. 본 발명의 실시예에서는 area-based 방법을 이용한다. 이러한 area-based 방법에서 왼쪽 영상과 오른쪽 영상을 이용하여 시차 추출하는 방법은 크게 SSD(Sum of Squared Differences) 방법 및 SAD(Sum of Absolute Differences) 방법이 있다. SSD 및 SAD는 각각 다음 식과 같다. 본 발명의 실시예에서는 상기 두 방법 중 부품검사의 시간적인 관계를 고려하여 SAD 방식을 채택한다.The method of extracting parallax can be divided into feature-based and area-based methods. The feature-based method is a method of extracting parallax using feature points of an image, and the area-based method is a method of calculating parallax from a neighboring area of a pixel. In general, the area-based method is widely used according to the characteristics of the image, but it has a disadvantage in that it takes a lot of computation time. In the embodiment of the present invention, an area-based method is used. In this area-based method, parallax extraction using a left image and a right image includes a method of sum of squared differences (SSD) and a sum of absolute differences (SAD). SSD and SAD are as follows. In the embodiment of the present invention, the SAD method is adopted in consideration of the temporal relationship between the parts inspection.

Figure 112006070887347-pat00006
Figure 112006070887347-pat00006

이하, 상기와 같은 스테레오 영상에 대한 시차를 이용하여 부품의 불량 판정방법에 대하여 살펴본다.Hereinafter, a method of determining a failure of a component using parallax for the stereo image as described above will be described.

도 13은 본 발명의 실시예에 따른 부품 검사 알고리즘의 전체 흐름도이다. 13 is a general flow diagram of a parts inspection algorithm in accordance with an embodiment of the present invention.

도 13을 참조하면, 먼저 정상인 부품의 스테레오 영상을 획득한 후(S10), 획득과정에서 얻어질 수 있는 잡음을 제거하기 위하여 저역통과 필터링을 행한다(S11). 이러한 정상 부품의 스테레오 영상에 대하여 시차를 계산하여 영상처리장치의 스테레오 영상과 더불어 메모리(ROM)에 저장한다(S13). Referring to FIG. 13, first, a stereo image of a normal component is acquired (S10), and low pass filtering is performed to remove noise that may be obtained in an acquisition process (S11). The parallax is calculated for the stereo image of the normal component and stored in the memory ROM along with the stereo image of the image processing apparatus (S13).

그 후 공정 작업상 일정한 시간 간격으로 들어오는 테스트 부품에 대하여 불량 판정을 행한다. 즉, 먼저 들어오는 테스트 부품을 카메라를 이용하여 스테레오 영상을 획득한 후(S20), 잡음을 제거하기 위하여 저역 통과 필터링을 행한다(S21).Subsequently, a defect is judged about the test parts coming in at regular time intervals in the process operation. That is, first, a stereo image is obtained from a test component using a camera (S20), and then low pass filtering is performed to remove noise (S21).

다음으로, 이미 저장된 정상 부품과의 정확한 시차 계산을 위하여 정확한 위치를 맞추기 위한 과정(image registration:이미지 등록)을 거친다(S22). 그 후 테스트 부품의 시차를 계산하여(S23), 기존에 저장된 정상 부품의 시차와 비교한다(S35). 만약 차이가 크지 않다면 정상 부품으로 판정하고, 차이가 크다면 불량 부품으로 판정한다(S37).Next, in order to accurately calculate the parallax with respect to the already stored normal parts, a process of adjusting the correct position (image registration) is performed (S22). Then, the parallax of the test component is calculated (S23), and compared with the parallax of the previously stored normal component (S35). If the difference is not large, it is determined as a normal component, and if the difference is large, it is determined as a defective component (S37).

도 14는 도 13의 부품 검사 알고리즘에 대한 타이밍도이다. FIG. 14 is a timing diagram for the part inspection algorithm of FIG. 13.

도 14를 참조하면, 먼저 검사 장비에 검사 부품이 들어오면 영상처리장치쪽으로 부품이 완전히 장착되었다는 PLC_end 신호가 입력된다. 그러면 영상처리장치쪽에서 장착된 카메라에 따라 8대의 카메라에 대한 영상 데이터를 디코더(10)를 통하여 메모리부(30)로 1 프레임씩 저장을 한다(select channel(ch1~ch8) & data read). 모든 프레임이 저장되고 나면 1번 카메라의 영상 데이터와 2번 카메라의 영상 데이터를 이용하여 시차를 계산하여 저장한다(disparity calculation). 이를 이용하여 시차 영상 및 부품 영상들에 대한 검사 알고리즘을 통하여 검사를 실시하고(test processing), 각 카메라에 대한 검사 결과 및 부품의 수를 출력 포트 및 직렬 통신을 이용하여 영상 저장 시스템 쪽으로 전송한다(results out(serial). 만약 불량으로 판정되면 출력 포트를 통하여 전송된 신호를 이용하여 영상 저장 장치에 일정한 시간동안 녹화를 행하여 분석할 수 있도록 한다(recording).Referring to FIG. 14, when an inspection component enters the inspection equipment, a PLC_end signal indicating that the component is completely installed is input to the image processing apparatus. Then, the image data of the eight cameras is stored one frame by one frame to the memory unit 30 through the decoder 10 according to the cameras mounted on the image processing apparatus (select channels (ch1 to ch8) & data read). After all the frames are stored, the parallax is calculated and stored using the image data of the first camera and the image data of the second camera (disparity calculation). Test processing is performed using the inspection algorithm for parallax images and component images, and the test results and the number of components for each camera are transmitted to the image storage system using the output port and serial communication ( results out (serial) If it is determined to be defective, the signal transmitted through the output port is used to record and analyze the image storage device for a predetermined time.

도 15는 도 13에서 카메라 영상 입력을 위하여 카메라의 수직 동기 신호를 이용하여 수직 인터럽트 동작과정에서의 타이밍도이다.FIG. 15 is a timing diagram in a vertical interrupt operation process using a vertical synchronization signal of a camera for inputting a camera image in FIG. 13.

도 15를 참조하면, 외부로부터의 입력 신호와 프레임의 상태변화, 비디오 디코더(10)에 대한 신호 등 모든 타이밍은 수직 인터럽트 동작에 따라 수행한다.Referring to FIG. 15, all timings such as an input signal and a state change of a frame and a signal to the video decoder 10 are performed according to the vertical interrupt operation.

검사 장치로부터 PLC-End 신호를 수직 인터럽트 동작마다 체크(START-state)하여 만약 부품의 입고가 완료되면(READ_state) 다음 인터럽트 동작에서 디코더(10) 쪽으로 카메라 채널 선택 신호를 I2C를 통하여 전송(MUXOUT_step)하게 된다. 전송이 완료되면 선택된 카메라로부터 1프레임의 영상을 획득(READING_step)하여 메모리에 저장을 완료하고(FINISH_step), 다음 채널에 대한 선택 신호를 비디오 디코더(10) 쪽으로 다시 전송하여 다음 카메라에 대한 영상을 1프레임 획득하여 전체 8대의 카메라에 대해서 동일한 동작을 반복함으로써 8대의 카메라에 대한 영상을 메모리에 저장하게 된다. 그 다음 시차를 계산한다(DISPARITY-state). The PLC-End signal is checked from the inspection device for each vertical interrupt operation (START-state). If the receipt of parts is completed (READ_state), the camera channel selection signal is transmitted to the decoder 10 through I2C in the next interrupt operation (MUXOUT_step). Done. When the transmission is completed, the image of one frame is acquired from the selected camera (READING_step) to complete the storing in the memory (FINISH_step), and the selection signal for the next channel is transmitted back to the video decoder 10 to transmit the image of the next camera. By acquiring the frame and repeating the same operation for all eight cameras, the images of the eight cameras are stored in the memory. Then calculate the parallax (DISPARITY-state).

입고된 부품이 양품(GOOD) 인지 검사품(TEST)인지에 따라 만약 검사품이면 부품 검사를 행하고(TEST_stat) 검사에 대한 결과를 영상 저장장치로 직렬 통신을 통하여 전송한다. 만약 양품이면 양품에 대한 정보를 플래쉬 롬(ROM)에 저장을 하여(WRITE_state) 다음 검사품에 대한 기준 데이터로 이용한다.According to whether the received part is GOOD or TEST, if the part is inspected, the part is inspected (TEST_stat) and the result of the test is transmitted to the image storage device through serial communication. If it is a good product, information about the good is stored in a flash ROM (WRITE_state) and used as reference data for the next test product.

이러한 동작이 완료되면 장착된 부품을 내보내기 위한 신호를 검사 장비쪽으로 전송한다(END_state). 이렇게 검사가 완료되면, 작업자가 검사 부품을 교환하여 다시 입고시키면 다음 검사를 시행하게 된다.When this operation is completed, a signal is sent to the inspection equipment to export the mounted component (END_state). When the inspection is completed in this way, when the operator replaces the inspection parts and reinserts them, the next inspection is performed.

도 16은 도 13의 부품 검사 알고리즘의 프로그램 흐름도이다.16 is a program flow diagram of the component inspection algorithm of FIG.

도 16을 참조하면, 먼저, 전원이 켜지면 도 2에 도시한 영상처리장치의 디지털 신호 처리부(DSP, 40), RAM, ROM 등의 메모리부(30), FPGA(20) 및 입출력부(I/O, 70)의 주소맵을 설정하고, 영상의 입출력을 담당하는 비디오 디코더(10) 및 엔코더(50)를 초기화하여 영상의 형식 등을 설정한다(시스템 초기화, S100).Referring to FIG. 16, first, when the power is turned on, the digital signal processor (DSP, 40), RAM, ROM, etc., the memory unit 30, the FPGA 20, and the input / output unit I of the image processing apparatus shown in FIG. / O, 70 is set, and the video decoder 10 and encoder 50, which are responsible for the input and output of the video, are initialized to set the format of the video (system initialization, S100).

그 후, 직렬장치 등 주변 장치들을 초기화하고 플래쉬 롬(ROM)으로부터 정상 부품에 대한 영상 데이터 및 시차 데이터를 램(RAM)으로 읽어 들인다(S101). 이는 플래쉬 롬(ROM)과의 속도 차이로 인한 문제 방생을 방지하기 위해 모든 검사는 램(RAM)을 통해 행하기 위함이다.Thereafter, peripheral devices such as a serial device are initialized, and image data and parallax data of a normal component are read from the flash ROM into the RAM (S101). This is to check all the RAM through RAM in order to prevent problems caused by the speed difference with the flash ROM (ROM).

다음, 영상을 받아들이기 위하여 인터럽트를 인에이블(enable)한다(S102). 이때, 인터럽트는 영상의 라인별로 읽기 위한 수평 인터럽트(1570Hz) 신호와 프레임을 구성하기 위한 수직 인터럽트(30Hz) 신호의 인터럽트가 발생한다. 수평 인터럽트 발생시에 디지털 신호 처리부(DSP, 40)의 EDMA 동작을 통하여 비디오 디코더(10)의 입력 FIFO를 통하여 1라인(720 화소)이 메모리로 전송되고, 수직 인터럽트 발생시 1 프레임(480 라인)을 메모리로 받은 상태이므로 데이터 메모리의 위치를 변경 설정하여 다음 프레임의 데이터를 입력받을 수 있도록 한다.Next, to enable the interrupt to enable the image (enable) (S102). At this time, the interrupt generates a horizontal interrupt (1570 Hz) signal for reading the line of the image and a vertical interrupt (30 Hz) signal for composing the frame. When the horizontal interrupt occurs, one line (720 pixels) is transferred to the memory through the input FIFO of the video decoder 10 through the EDMA operation of the digital signal processor (DSP) 40, and one frame (480 lines) is stored when the vertical interrupt occurs. Since the data is received, the data memory location is changed and set so that the data of the next frame can be received.

수직 인터럽트가 동작할 때마다 검사 부품이 입고되었는지를 계속 체크하여(S103), 입고가 완료되면 비디오 디코더(10) 쪽으로 카메라 채널 선택 신호를 전송하고(S104, S105), 선택된 카메라로부터 1프레임의 영상을 획득하여 메모리에 저장한다(S106, S107).Each time the vertical interrupt is operated, it is continuously checked whether the inspection part is received (S103), and when the receipt is completed, the camera channel selection signal is transmitted to the video decoder 10 (S104, S105), and an image of one frame is selected from the selected camera. It is obtained and stored in the memory (S106, S107).

다음, 카메라 채널 선택 신호가 마지막인지 여부를 판단하고(S108), 아니라 면 다음 카메라 채널 선택신호를 받아들여(S109), 디코더(10)로 전송하고 카메라 채널 선택신호를 전송(S105)하고 영상 데이터를 획득하여 메모리에 저장하는 것을 반복한다(S105~S107). 이렇게 반복하여 카메라의 수만큼 채널 선택 신호가 입력되었다면 저장된 영상 데이터를 이용하여 시차를 구한다(S110).Next, it is determined whether the camera channel selection signal is the last (S108). If not, the next camera channel selection signal is received (S109), transmitted to the decoder 10, the camera channel selection signal is transmitted (S105), and the image data. Obtaining and storing it in the memory is repeated (S105 to S107). If the channel selection signal is input as many times as the number of cameras repeatedly, the parallax is obtained using the stored image data (S110).

다음으로, 입고된 부품이 정상품인지 검사품인지 판단하여(S111), 입고된 부품이 정상품인 경우에는 획득된 영상 데이터를 플래쉬 롬(ROM)으로 이동시키고(S112), 검사품인 경우 검사 알고리즘을 통하여 검사를 행한 후(S113), 검사 결과를 영상 저장 장치로 전송(S114)한 다음 부품을 출고하기 위한 출고신호를 PLC쪽으로 전송하여 부품을 출고시킨다(S115).Next, it is determined whether the received part is a regular product or an inspection product (S111). If the received part is a regular product, the acquired image data is moved to a flash ROM (S112), and if the inspection product is an inspection algorithm After the inspection is performed (S113), the inspection result is transmitted to the image storage device (S114), and then the shipment signal for leaving the component is sent to the PLC to release the component (S115).

다음으로 부품의 입고 신호가 있는가를 판단하여(S116), 다른 부품이 입고된다면 상기 단계 S104~S115를 반복하고, 입고되는 부품이 없다면 검사를 종료한다.Next, it is determined whether there is a receipt signal of the part (S116), and if the other part is received, the steps S104 to S115 are repeated, and if no part is received, the inspection is terminated.

위와 같이 검사된 겸사 결과를 전송하기 위한 직렬 통신의 통신 프로토콜은 표 2에서와 같다. Start 코드 데이터 0x02를 먼저 보내고, 검사할 부품의 디바이스 번호를 최대 4개의 문자로 보낸 후 분리코드 0x09를 보내고, 1번부터 8번까지의 카메라 번호와 분리 코드를 보내고, 작업한 부품의 총 개수와 분리 코드를 전송한다. 그런 다음 검사 결과의 상태를 OK 인지, BAD 인지를 전송하고 종료 데이터를 전송하여 검사 결과를 모두 전송하게 된다. 따라서 8대의 카메라를 사용할 경우 총 8번의 직렬 데이터를 전송하게 된다.The communication protocol of serial communication for transmitting the test result of the test as described above is shown in Table 2. Send the start code data 0x02 first, send the device number of the part to be tested in up to 4 characters, then send the separation code 0x09, send the camera number 1 to 8 and the separation code, and the total number of parts Send the separation code. Then, whether the status of the test result is OK or BAD is transmitted, and the end data is transmitted to transmit all the test results. Therefore, when 8 cameras are used, 8 serial data are transmitted.

Figure 112006070887347-pat00007
Figure 112006070887347-pat00007

본 발명의 실시예에 따른 영상처리장치를 구동하고 부품을 검사하기 위한 프로그램의 내용은 아래 표 6과 같다. 모두 7개의 프로그램 소스로 구성되며 이들 프로그램 내부에 포함하는 함수는 표 7과 같다.The contents of the program for driving the image processing apparatus and inspecting the component according to the embodiment of the present invention are shown in Table 6 below. All 7 program sources are included and the functions included in these programs are shown in Table 7.

Figure 112006070887347-pat00008
Figure 112006070887347-pat00008

Figure 112006070887347-pat00009
Figure 112006070887347-pat00009

본 발명의 실시예에 따른 부품 검사를 위한 영상처리장치 및 검사방법을 적용한 영상들을 도 17a 내지 도 17m에 도시된다. 17A to 17M show images to which an image processing apparatus and an inspection method for inspecting parts according to an exemplary embodiment of the present invention are applied.

도 17a는 검사를 위한 기준 영상(Ca1=1번 카메라)이고, 도 17b는 검사를 위한 기준 영상(Ca2)이고, 도 17c는 양품의 영상 및 검사 영역(Ca2)이고, 도 17d는 부품누락불량품의 영상 및 검사영역(Ca2)이고, 도 17e는 기준 영상(도 17b)을 이진화한 영상(Ca2)이고, 도 17f는 양품(도 17c)을 이진화한 영상(Ca2)이고, 도 17g는 불량품(도 17d)을 이진화한 영상(Ca2)이고, 도 17h는 기준영상(도 17e)과 양품영상(도 17f)과의 차영상(Ca2)이고, 도 17i는 기준영상(도 17e)과 불량품영상(도 17g)과의 차영상(Ca2)이고, 도 17j는 접점불량품 영상(Ca1)이고, 도 17k는 접점불량품 영상(Ca2)이고, 도 17l은 기준영상의 합성영상(((도 17a)+(도 17b))/2, 시차(disparity)=6)이며, 도 17m은 불량품영상의 합성영상(((도 17j)+(도 17k))/2, 시차(disparity)=8)이다.FIG. 17A is a reference image for inspection (camera Ca1 = 1), FIG. 17B is a reference image Ca2 for inspection, FIG. 17C is a good image and an inspection region Ca2, and FIG. 17D is a defective part. 17E is an image Ca2 binarized from a reference image (FIG. 17B), FIG. 17F is an image Ca2 binarized with a good product (FIG. 17C), and FIG. 17G is a defective product ( FIG. 17D is a binarized image Ca2, FIG. 17H is a difference image Ca2 between a reference image (FIG. 17E) and a good image (FIG. 17F), and FIG. 17I is a reference image (FIG. 17E) and a defective image ( FIG. 17G is a difference image Ca2 from FIG. 17G), FIG. 17J is a defective contact image Ca1, FIG. 17K is a defective contact image Ca2, and FIG. 17L is a composite image of the reference image (((FIG. 17A) + ( 17B)) / 2, disparity = 6), and FIG. 17M is a composite image (((FIG. 17J) + (FIG. 17K)) / 2, disparity = 8) of defective images.

상기 도 17a 내지 도 17m의 검사 영상에서 나타난 바와 같이 본 발명의 실시예에 따라 검사가 정확하게 이루어지고 있음을 알 수 있다.As shown in the inspection images of FIGS. 17A to 17M, it can be seen that the inspection is performed correctly according to the embodiment of the present invention.

본 발명은 기술적인 측면에서 부품 검사를 위한 스테레오 영상 처리 장치 및 검사 방법을 구현한 것으로서, 영상 인식 및 처리를 위한 고속 검사 시스템의 기술을 확보한다는 효과가 있다. The present invention implements a stereo image processing apparatus and inspection method for component inspection in technical aspects, and has the effect of securing the technology of a high speed inspection system for image recognition and processing.

또한, 본 발명은 경제, 산업적인 측면에서 저가의 스테레오 비전 시스템을 이용하여 마운팅 플레이트 어셈블리 등과 같은 복잡한 자동차 부품을 위한 검사 장 비 및 공정을 구현하였으며, 스테레오 비전 시스템 인터페이스 표준화와 자동차 부품 업계의 생산성 향상 및 인건비 절감의 효과가 있다.In addition, the present invention implements inspection equipment and processes for complex automotive parts such as mounting plate assembly using economical and industrial low cost stereo vision system, standardizes stereo vision system interface and improves productivity of automotive parts industry. And labor costs are reduced.

Claims (10)

n개의 카메라로 부품을 촬영한 스테레오 및 n개의 아날로그 영상을 n개의 입력채널로 입력받아 디지털 영상으로 변환하는 디코더;a decoder for receiving stereo and n analog images of parts photographed by n cameras through n input channels and converting them into digital images; 상기 디코더로부터 디지털 영상을 입력받아 저장하는 메모리부;A memory unit for receiving and storing a digital image from the decoder; 상기 메모리부에 저장된 디지털 영상의 시차를 추출하고 부품의 불량 여부를 검사하는 디지털 신호 처리부;A digital signal processor extracting parallax of the digital image stored in the memory unit and inspecting whether a component is defective; 상기 디지털 신호 처리부에서 영상신호처리된 디지털 영상을 아날로그로 변환하여 모니터로 영상을 디스플레이하는 엔코더; An encoder for converting the digital signal processed by the digital signal processor into an analog and displaying the image on a monitor; 상기 디코더로부터의 디지털 비디오 영상을 상기 메모리부로 전달하고, 상기 디지털 신호 처리부에서 영상신호처리된 디지털 영상을 상기 엔코더로 전달하는 FPGA; 및An FPGA which transfers the digital video image from the decoder to the memory unit and delivers the digital image processed by the digital signal processor to the encoder; And 상기 FPGA와 연결되어 직렬통신방식으로 외부와의 데이터를 송수신하는 직렬 통신부를 포함하는 것을 특징으로 하는 스테레오비전 검사용 영상처리장치.And a serial communication unit connected to the FPGA and transmitting and receiving data to and from the outside in a serial communication method. 삭제delete 제 1 항에 있어서,The method of claim 1, 상기 직렬 통신부는 The serial communication unit 송신측에서 병렬 데이터를 직렬 데이터로 변화하고 수신측에서 직렬데이터를 병렬데이터로 변환하는 FIFO(First Input First Output)를 가진 듀얼 UART(Universal Asynchronous Receiver/Transmitter); 및Dual UART (Universal Asynchronous Receiver / Transmitter) having a first input first output (FIFO) for converting parallel data into serial data on the transmitting side and converting serial data into parallel data on the receiving side; And 상기 듀얼 UART와 연결되어 직렬 데이터를 원거리로 전송하기 위한 RS-232 라인 구동기/수신기(Line driver/receiver)를 포함하는 것을 특징으로 하는 스테레오비전 검사용 영상처리장치.And an RS-232 line driver / receiver connected to the dual UART to transmit serial data over a long distance. 제 1 항에 있어서,The method of claim 1, 상기 FPGA와 연결되어 사용자가 외부에서 데이터를 입력하고 상기 스테레오비전 검사용 영상처리장치의 상태를 출력하기 위한 입출력부를 더 포함하는 것을 특징으로 하는 스테레오비전 검사용 영상처리장치.And an input / output unit connected to the FPGA for inputting data from the outside by the user and outputting a state of the image processing apparatus for the stereovision inspection. 제 4 항에 있어서,The method of claim 4, wherein 상기 입출력부는,The input and output unit, 4개의 D 플립플롭(F/F)이 병렬로 연결되어 상기 FPGA와 연결되는 것을 특징으로 하는 스테레오비전 검사용 영상처리장치.And four D flip-flops (F / F) are connected in parallel and connected to the FPGA. 제 1 항에 있어서,The method of claim 1, 상기 메모리부는,The memory unit, 상기 FPGA로부터 전달되는 디지털 영상데이터를 저장하는 SD램(RAM);SD RAM (RAM) for storing the digital image data transmitted from the FPGA; 프로그램 및 기준영상 데이터를 저장하는 제 1 플래쉬 롬(ROM); 및A first flash ROM (ROM) for storing a program and reference image data; And 부트(boot) 프로그램을 저장하는 제 2 플래쉬 롬(ROM)을 포함하는 것을 특징으로 하는 스테레오비전 검사용 영상처리장치.And a second flash ROM (ROM) for storing a boot program. 삭제delete 삭제delete 삭제delete 삭제delete
KR1020060094786A 2006-09-28 2006-09-28 Image process apparatus and method using stereo vision KR100779918B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060094786A KR100779918B1 (en) 2006-09-28 2006-09-28 Image process apparatus and method using stereo vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060094786A KR100779918B1 (en) 2006-09-28 2006-09-28 Image process apparatus and method using stereo vision

Publications (1)

Publication Number Publication Date
KR100779918B1 true KR100779918B1 (en) 2007-11-29

Family

ID=39080997

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060094786A KR100779918B1 (en) 2006-09-28 2006-09-28 Image process apparatus and method using stereo vision

Country Status (1)

Country Link
KR (1) KR100779918B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130047465A (en) * 2011-10-31 2013-05-08 현대중공업 주식회사 Data communication method for communication module of digital protective relay

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57147040A (en) 1981-03-06 1982-09-10 Omron Tateisi Electronics Co Defect checking device
JPH01247285A (en) * 1988-03-29 1989-10-03 Nissan Motor Co Ltd Method for calibration of work locating device
JPH06308054A (en) * 1993-04-28 1994-11-04 Omron Corp Defect image reproducing device
JPH09210659A (en) * 1996-01-31 1997-08-12 Mitsubishi Heavy Ind Ltd Automatic material-defect inspection device
JP2001099627A (en) 1999-07-23 2001-04-13 Matsushita Electric Works Ltd Image processing system and its constituting method
JP2003262594A (en) 2002-03-08 2003-09-19 Fuji Photo Film Co Ltd Defect inspection machine
JP2005013611A (en) * 2003-06-27 2005-01-20 Olympus Corp Image processing device
KR20050073130A (en) * 2004-01-08 2005-07-13 주식회사 금창 The device for inspecting automobile parts using vision system
KR20050083360A (en) * 2004-02-23 2005-08-26 (주) 나인원 Inspecting method and its machine using multiple optical cameras for mechanical part
KR100570276B1 (en) 2005-10-04 2006-04-11 (주)글로벌링크 Denting test method equipment of anisotropic conductive film

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57147040A (en) 1981-03-06 1982-09-10 Omron Tateisi Electronics Co Defect checking device
JPH01247285A (en) * 1988-03-29 1989-10-03 Nissan Motor Co Ltd Method for calibration of work locating device
JPH06308054A (en) * 1993-04-28 1994-11-04 Omron Corp Defect image reproducing device
JPH09210659A (en) * 1996-01-31 1997-08-12 Mitsubishi Heavy Ind Ltd Automatic material-defect inspection device
JP2001099627A (en) 1999-07-23 2001-04-13 Matsushita Electric Works Ltd Image processing system and its constituting method
JP2003262594A (en) 2002-03-08 2003-09-19 Fuji Photo Film Co Ltd Defect inspection machine
JP2005013611A (en) * 2003-06-27 2005-01-20 Olympus Corp Image processing device
KR20050073130A (en) * 2004-01-08 2005-07-13 주식회사 금창 The device for inspecting automobile parts using vision system
KR20050083360A (en) * 2004-02-23 2005-08-26 (주) 나인원 Inspecting method and its machine using multiple optical cameras for mechanical part
KR100570276B1 (en) 2005-10-04 2006-04-11 (주)글로벌링크 Denting test method equipment of anisotropic conductive film

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130047465A (en) * 2011-10-31 2013-05-08 현대중공업 주식회사 Data communication method for communication module of digital protective relay
KR101685613B1 (en) 2011-10-31 2016-12-13 현대중공업 주식회사 Data communication method for Communication module of digital Protective Relay

Similar Documents

Publication Publication Date Title
GB2569465B (en) Real-time video extensometer
CN106525004A (en) Binocular stereo vision system and depth measuring method
CN108259890B (en) Information acquisition bridging device and image sensor quality automatic detection equipment
US8179448B2 (en) Auto depth field capturing system and method thereof
EP2339292A1 (en) Three-dimensional measurement apparatus and method thereof
CN102589516B (en) Dynamic distance measuring system based on binocular line scan cameras
CN109801590B (en) Multi-receiving-unit automatic configuration method, device and system for LED display screen
JP2015197745A (en) Image processing apparatus, imaging apparatus, image processing method, and program
CN107274368B (en) Compatible vision processing system and method
US11403742B2 (en) Image processing device, image processing method, and recording medium for generating bird's eye synthetic image
US10306199B2 (en) Imaging apparatus, imaging processing method, image processing device and imaging processing system
CN113329219A (en) Multi-output parameter dynamically configurable depth camera
CN102316355A (en) Generation method of 3D machine vision signal and 3D machine vision sensor
KR100779918B1 (en) Image process apparatus and method using stereo vision
CN207910927U (en) A kind of information collection bridge-set and imaging sensor quality automatic checkout equipment
CN103140049B (en) A kind of chip mounter quick positioning system based on FPGA and method
US20130012776A1 (en) Endoscope apparatus
CN213522183U (en) Image stitching system
KR101326095B1 (en) Apparatus for uniting images and method thereof
CN102901732A (en) Method for acquiring and processing enlarged images of fabrics based on digital signal processor (DSP)
JP5967470B2 (en) Inspection device
CN110677636B (en) Extended signal compensation platform
CN110751145B (en) Multi-view image acquisition and preprocessing system and method under complex illumination condition
WO2016089092A1 (en) Device for inspecting quality of thermal imaging and method for inspecting quality of thermal imaging using pre-processed thermographic image
JP2003302354A (en) Appearance inspection method and appearance inspection device for electronic circuit parts, and method for manufacturing electronic circuit parts

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
G170 Publication of correction
FPAY Annual fee payment

Payment date: 20120910

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20131106

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20150128

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20151222

Year of fee payment: 9

LAPS Lapse due to unpaid annual fee