Development of a Multifunctional Online Inspection Experimental Platform Based on Machine Vision
2026-04-06 07:28:43··#1
[Abstract]: This paper proposes a development scheme for a multifunctional online inspection experimental platform based on machine vision. It introduces the hardware and software structure and working principle of the vision inspection platform based on the Matrox Cornoa2 image acquisition card and the PULNIX TM6703 camera, and elaborates on the cooperative application of the image acquisition card and camera and software development. 1 Introduction In recent decades, the manufacturing industry has made tremendous progress in new materials, new processes, and new equipment. Many traditional inspection technologies can no longer meet the needs of modern manufacturing, manifested in: the lack of corresponding inspection methods for many new products; the inability of many traditional inspection methods to provide real-time, online, and non-contact inspection; and the significantly improved inspection accuracy of modern products. The progress of modern manufacturing requires the research of new product inspection technologies. Among the various technologies already studied, vision inspection technology has outstanding advantages such as non-contact operation, high speed, suitable accuracy, and strong anti-interference ability, showing broad application prospects in practice. The construction of this experimental platform is aimed at various industrial inspection objects, studying the application of machine vision systems in different environments. 2. Basic Principles of Machine Vision Online Inspection The basic principle of a machine vision-based online inspection system is as follows: First, an image of the object to be inspected moving on a high-speed production line is acquired through a vision sensor. After the image is transmitted to the computer, the computer uses dedicated image processing software to detect, measure, analyze, and judge the object. The hardware structure of the multi-functional inspection experimental platform is shown in Figure 1. The basic modules of the machine vision online inspection system include: a transmission device, a dedicated LED light source, an image acquisition module, and an electrical control module. 3. Design of the Motion Control Section of the Multi-functional Inspection Experimental Platform The purpose of building a multi-functional experimental platform is to simulate various industrial inspection environments; therefore, the design of the motion control section should also be able to simulate various industrial production lines. In this system, the motion control section adopts a control mode of industrial PC + motion control card + stepper motor. The motion control card is the MPC01 from a stepper motor company. It is equipped with many powerful and feature-rich motion control software tools and function libraries. The MPC01 motion function library is used for secondary development. Users only need to write the required user interface program using C/C++ or Visual Basic and link it with the MPC01 motion library to develop their own control system. 4. Dedicated LED Light Sources The light source has a crucial impact on image quality. Considering that this experimental platform will be used to inspect various items, several dedicated LED lighting schemes have been developed to adapt to different objects being inspected. Straight-ring type is used for workpieces requiring stable illumination and clear images; narrow-angle type is used for transparent or low-contrast workpieces; rod type is used for transparent, smooth, and gold-plated surfaces; dome type is used for uneven or curved surfaces, printed lettering on metal sheets, or cavities on curved surfaces; backlit type is used for transparent materials or liquids; coaxial type is used for smooth, electroplated, and low-reflection surfaces. 5. High-Speed Image Acquisition System The image acquisition section will acquire motion images on the production line. The quality of the acquired images directly affects the overall inspection efficiency. The image acquisition section is mainly performed by a CCD camera. The CCD camera captures image signals, which are then acquired by an image acquisition card. This experimental setup uses two cameras in different positions to inspect the objects: one overhead and one side, allowing for multi-directional inspection of some objects. The camera uses the Pulnix TM6703, and the capture card is the Matrox Corona II. 5.1 The Matrox Corona II image capture card is an image controller manufactured by Matrox Graphics Inc., capable of acquiring interlaced/progressive scan component RGB signals and single/dual-channel black and white analog video signals; 3-channel 10-bit A/D converters; 24-bit RS-422/LVDS digital interface; acquisition rate up to 30MHz in analog mode, 25MHz in RS-422 digital mode, and 40MHz in LVDS digital mode; connection to 2 RGB or 6 analog black and white video signals; 32-bit/33MHz PCI bus master mode; real-time acquisition and storage on the expansion board; simultaneously supports analog VGA and independent digital VGA or TV output. 5.2 The Pulnix TM6703 CCD camera is a 1/2-inch, 648×484 sensor with a shutter speed of 1/60/32000s and asynchronous reset function. When the VINIT pulse is applied, the camera's scan is reset and the CCD is cleared. In asynchronous mode and under the action of an external VINIT high-level signal, the asynchronous function will be automatically selected, and signal reading will be disabled until a trigger occurs. The following are the three modes of asynchronous camera reset: (1) External VINIT with pulse width control: The shutter speed is controlled by the pulse width; (2) Fast internal trigger mode: When the falling edge of VINIT is the same as that of the external HD, there is no delay in signal capture; otherwise, there will be a delay of 0 to 1 HD; (3) Slow internal trigger mode: The shutter speed can be selected from 1/250 to 1/2000s. If the falling edge of VINIT and the external HD are the same and integral charging is started, the camera will discharge on the falling edge of VINIT. The output delay depends on the selected shutter speed. Figure 2 shows the camera timing diagram. 5.3 Camera and acquisition card cooperation The output signals of both cameras are controlled and transmitted to the acquisition card through the RS232C serial port. Matrox acquisition cards have dedicated DCF configuration files for different camera inputs. The camera has three configuration modes: hardware trigger, software trigger, and continuous acquisition. To improve CPU utilization efficiency, a photoelectric sensor is installed at each detection position. When an object passes by, the photoelectric sensor is triggered, and its output signal serves as the external trigger signal for the camera to acquire a frame of image. In this mode, the trigger mode in the camera's DCF configuration file is set to hardware trigger. This means the camera only triggers acquisition when an object passes by; otherwise, it remains in a waiting state. Figure 3 shows the timing diagram for the acquisition card under external trigger mode. 6. Software Development of the Image Acquisition System. The Matrox image acquisition card comes with MIL library functions, making secondary software development in VC++ very convenient. Using MIL library functions, an application object is first allocated, which is equivalent to creating the control and execution environment for image processing. Multiple systems can be created under the application object, and multiple data buffers, digitizers, and displays can be created under each system. Image files are read into the data buffer, the buffer is assigned to an array, and image processing is achieved by processing the array. After associating the image data with the display data, it can be displayed on the specified control or form. 7. Workflow of the Online Inspection Platform The multi-functional inspection platform must be able to simulate the online inspection function of an industrial production line. First, the software sends a command to the PLC via serial port to start the production line; the item to be inspected is placed on the production line and enters the inspection cabinet, triggering the camera's photoelectric sensor. Since the acquisition card operates in external trigger mode, when the photoelectric sensor is triggered, the output photoelectric pulse signal is transmitted to the image acquisition card, which acquires an image and sends it to the buffer, thus completing the image acquisition process. Then, the image processing software reads the data in the buffer for display, calculation, and judgment, checking whether the item to be inspected is qualified. Unqualified items will trigger the rejection device, removing them from the production line. 8. Conclusion To adapt to the inspection of various industrial products, the cameras and acquisition cards selected for the multi-functional inspection experimental platform are highly flexible. In terms of hardware platform construction, the positional structure of the camera, light source, and photoelectric sensor is also highly flexible, facilitating the inspection of products of various shapes and sizes. The construction of this platform provides a good foundation for dedicated vision inspection systems applied in specific industrial environments.