Abstract: To meet the needs of high-speed, high-precision registration and detection of large-area printed images in actual printing production, a novel printed image detection system was designed. This system uses multiple CCDs to synchronously acquire image information and employs a CPLD in conjunction with a PCI bus to realize image data acquisition and transmission control. A novel image registration algorithm is also used in image preprocessing. The system's related programs and algorithms are implemented using DDK and VC++ programming language. Experiments show that the system basically meets the real-time requirements, and its image registration speed is faster, its accuracy is higher, and its adaptability is stronger, demonstrating certain practical value.
Keywords : Printed image detection; Image acquisition; Image preprocessing; Registration and localization; Matching detection
Chinese Library Classification Number: TS801.9 Document Identification Code: A
Design and implementation of a new kind of printing image detection system
NIU Yi-fan
(Jining College of Technician, Jining 272000, China)
Abstract: In order to meet the needs of high-speed and high-precision registration and detection of large-area printing image in actual printing production, a new kind of printing image detection system is designed. In this system, many CCDs are used to acquire image information simultaneously, and the acquisition and transmission of image data are controlled by CPLD and PCI bus, and a new image registration algorithm is adopted in image preprocessing. The related programs and algorithms of this system are implemented by DDK and VC programming language. The experimental results show that this system meets real-time need basically, its image registration is faster, more accurate and its adaptability is stronger, so it has a certain practical value.
Key words : printing image detection; image acquisition; image preprocessing; registration and positioning; matching and detection
1 Introduction
With the improvement of living standards, people have more and more demand for high-quality and diversified printed materials. Printing companies also face the problem of how to evaluate printing quality more quickly and accurately. Traditional methods of manually inspecting printed materials are affected by subjective and objective factors and cannot complete the inspection task with guaranteed quality and quantity. With the development of computer hardware and software, it has become feasible to use machine vision and digital image processing technology to automatically inspect the surface image quality of printed materials[1]. This technology scans printed images online with a camera. Due to the influence of equipment and environmental factors, the collected images will inevitably be mixed with noise and have rotation, translation or scaling phenomena. In order to eliminate noise and align the standard image with the image to be inspected, the collected image needs to be sent into memory and preprocessed by image processing software such as noise reduction, sharpening enhancement, registration and positioning. Then, feature extraction, matching detection, defect display, analysis and storage are performed to help operators find the cause of the fault and readjust the settings to ensure that defective products do not enter the market, thereby improving the finished product qualification rate and production efficiency of printing.
Since a single camera is only suitable for capturing small-area images, in order to meet the needs of high-speed and high-precision registration and detection of large-area printed images in actual printing production, this paper designs a new printing image detection system. The system uses multiple CCD cameras to synchronously acquire image information from different positions, and uses the logic control function of CPLD[2] in conjunction with the PCI[3] bus to synchronously transmit image data in DMA mode, so that the upper-level application software can process and register the acquired image data in real time. A new image registration algorithm with faster registration speed and higher registration accuracy is adopted. Finally, the superiority and stronger adaptability of the system in terms of image registration speed and registration accuracy are verified by experiments. The related programs and algorithms of the system are implemented by DDK combined with VC language programming.
2 System Design and Development
The printed image inspection system designed in this paper consists of hardware and software components. The hardware design mainly includes the circuit design of the four-channel CCD camera image acquisition card and the logic control function design of the CPLD. The software design includes the low-level device driver design and the high-level application program design. It mainly controls the hardware circuit to realize the acquisition of four-channel CCD image data, preprocessing such as noise reduction and registration, feature extraction, matching detection, defect display, analysis and storage.
2.1 System Hardware Structure Design
The hardware mainly consists of the image acquisition unit and the computer. Its basic structural block diagram is shown in Figure 1 below:
Figure 1 System hardware structure block diagram
Fig.1Hardwarestructurediagramofsystem
The image acquisition section consists of an illumination source, four CCD cameras, and a PCI image acquisition card. The quality of the illumination source directly affects the overall quality of the detection system. The PCI multi-channel acquisition card comprises a PCI interface chip, EEPROM, CPLD logic control chip, high-speed cache (FIFO), and video decoding chip, primarily used for CCD image acquisition, buffering, and transmission. The acquisition card utilizes an S5933 microcontroller to achieve real-time data transmission via DMA. The names, types, and functions of each component in the image acquisition system are shown in Table 1 below.
Table 1. Names, selection types, and functions of each part of image acquisition.
Tab.1Name, selectedtypeandfunctionofeverypartofimageacquisition
Computers are used to control image acquisition, control image data transmission, perform preprocessing such as noise reduction and registration, extract features, perform matching detection, display defects, analyze and store data.
The overall workflow is as follows: The PC application sends a "start acquisition" command to the CPLD logic control circuit via the PCI bus. After receiving the start acquisition command, the CPLD logic control uses a virtual I2C bus control method to control the four video decoders to start decoding. After decoding, the high-speed image data and synchronization signal are synchronously output and buffered at the FIFO data input terminal. When the storage space is about to be full, an interrupt request signal is sent to the PCI bus controller. The PCI bus controller forwards the interrupt signal to the PCI image acquisition card. The PC responds to this interrupt signal and reads the data in the FIFO through the PCI bus controller until the FIFO is empty. The image data is quickly sent to the computer memory via the PCI bus in DMA mode. The application performs preprocessing such as denoising, registration and positioning, feature extraction, matching detection, defect display, analysis and storage as needed.
2.2 System Software Design
The software design of this system comprises two parts: low-level device driver design and high-level application design. For the low-level device driver, we chose the Microsoft DDK as its development environment and used Visual C++ 6.0 to complete its development. This program is mainly used to implement the relevant low-level operations of the PCI interface chip S5933. The high-level application mainly performs preprocessing on the acquired images, such as denoising, registration and localization, feature extraction, matching detection, defect display, analysis and storage. Its related algorithms are also implemented using Visual C++ 6.0.
3. Design, Implementation, and Related Experiments of a Novel Image Registration Algorithm
3.1 Algorithm Design and Implementation
Image registration is a method for matching multiple images in the spatial domain, aligning corresponding pixels in multiple images of the same scene to the same physical location. High-precision image registration is a prerequisite for print quality inspection, directly affecting the success of the entire inspection process. Addressing the shortcomings of existing image registration algorithms, such as slow processing speed, low accuracy, and poor adaptability in specific situations, this system adopts a new image registration algorithm: the improved Plessey corner detection algorithm (the original Plessey corner detection algorithm can be found in reference 4). A corner is an image pixel whose grayscale transformation value is sufficiently high in all directions within its neighborhood. It is a very important image point feature, containing relatively rich two-dimensional structural information in the image, and is also known as an "interest point" or "feature point operator." This algorithm consists of three steps: first, feature point extraction; second, feature point matching; and third, image-to-image transformation. This algorithm uses a corner response function that can more accurately extract corners:
R=det(M)/[tr(M)+ε′], where det(M) is the determinant of the matrix M associated with the autocorrelation function of the image, tr is the sum of the diagonal elements of the matrix, and ε′ is a very small number. At the same time, the window suppression non-maximum method [4], threshold setting [4] and boundary template [4] are used to speed up the corner extraction and improve the rationality of the selected corner points. In addition, the quadratic polynomial ax2+by2+cxy+dx+ey+f=R(x,y) is used to approximate the corner response function R to find the sub-pixel level precise position of the corner point. Then, the bidirectional maximum correlation coefficient [5] is used for coarse matching of feature point pairs, and then the random sampling matching method [6] is used for fine matching of feature point pairs. The normalized coordinate processing is performed to make the algorithm more stable. Finally, the direct linear transformation (DLT) algorithm [7] is used to calculate the accurate and stable projection transformation matrix. Then, the image transformation is completed according to the projection transformation matrix, thereby realizing the image registration and positioning. The whole algorithm is implemented by Visual C++ 6.0 language programming.
3.2 Experiment and Result Comparison
The algorithm is then used to register the two human figures in Figure 2. As can be seen, Figure 2(b) exhibits significant rotation and scaling, thus increasing the difficulty compared to typical human figures. When images are rotated and scaled, the algorithm in reference 8 cannot produce a correct registration image, while experiments demonstrate that the algorithm presented in this paper adapts well to this situation, yielding a stable and accurate registration image. First, 103 and 85 corner points were extracted from the two images respectively. Figure 3 shows the result of coarse matching using the bidirectional maximum correlation coefficient on the two corner point extraction images, resulting in 43 pairs of initial matching points, some of which showed false matches. The coarsely matched corner points from the two images were then superimposed onto a single image, with successfully matched corner points connected by lines. The results show that some false matches still exist (connections inconsistent with the dominant direction). Figure 4 shows the result of refining the coarse matching results using the random sampling coincidence method, yielding 9 pairs of feature points. It can be seen that the false matching pairs have been eliminated, achieving correct matching of feature points. Finally, a well-executed registration image is obtained by performing an inverse mapping transformation on Figure 2(a) based on the projection transformation matrix, as shown in Figure 5.
Figure 2. Character corner point extraction diagram
Fig.2Cornerextractionintheimagesofperson
Figure 3. Coarse matching pairs from the BGCC algorithm.
Fig. 3 Rough matching by BGCC
Figure 4 RANSAC fine-matching pairs
Fig. 4 Exact matching by RANSAC
Figure 5. Results of the character registration.
Fig. 5 Registered image of person
To compare algorithm performance and provide a quantitative evaluation, this paper applies both the improved and unimproved registration algorithms to perform registration experiments on the above-mentioned human images. The original algorithm uses a thresholdless algorithm to extract corner points and does not perform coordinate normalization transformation during matching. The algorithm comparison is shown in Table 2.
Table 2 Comparison of the two algorithms
Tab.2Comparisonbetweentwoalgorithms
Algorithm extracts corner points/pixels, coarse matching feature point pairs, fine matching feature point pairs, matching rate, running time/second, transformation matrix.
The original registration algorithm (289/214791215%8.214) is unstable.
The improved algorithm presented in this paper, 103/8543921%1.025, is relatively stable.
As can be seen from Table 2, compared with the original algorithm, the image registration algorithm in this paper has significantly improved in terms of running time and matching rate (comparison of feature points between fine and coarse matching). Furthermore, the use of normalized coordinates and the DLT algorithm avoids erroneous matching caused by the instability of the transformation matrix during image registration, greatly enhancing the accuracy and practicality of the algorithm.
4. Conclusion
This paper presents a novel printed image detection system, with related programs and algorithms implemented using DDK combined with VC programming language. This system can acquire, process, and analyze multi-channel image data in real time, enabling the transmission of large-capacity image data and high-speed, high-precision registration and detection of large-area printed images, thus enhancing its adaptability and practicality. The system's acquisition card has been fabricated, and its performance has been tested and fully meets design requirements. A dedicated PCI interface control chip was adopted, simplifying the design process and shortening the design cycle. Furthermore, a field-programmable logic device (CPLD) was used to control the PCI, FIFO, virtual I2C, and SA7110, significantly improving the system's integration and automation, shortening the detection and control cycle, and reducing human interference. A new algorithm was employed for image registration, and its superiority was verified through experiments.
References
[1] Gong Xiurui, Liu Xin. Real-time detection technology for printed matter quality [J]. Packaging Engineering, 2003, 24(6): 45-49.
[2] Long Shuying, Wang Bo, Gu Chongyang. Design of a multi-channel data acquisition system based on CPLD [J]. Microcomputer Information, 2006(22)7-2: 203-205.
[3] Xu Tao, Huang Lu, Wang Rongsheng. A high-speed synchronous image acquisition system composed of multiple PCI cards [J]. Computer Engineering and Applications, 2004, 2: 124-126.
[4] C. Harris, M. Stephens. A combined corner and edge detector[C]. Proceedings of the 4th Alvey Vision Conference, UK, 1988.147-151.
[5] Luigi Di Stefano, Stefano Mattoccia, Martino Mola. An efficient algorithm for exhaustive template matching based on normalized cross correlation[C]. Proceedings of the 12th International Conference on Image Analysis and Processing, Los Atamitos CA, USA, 2003.322-327.
[6] Charles V. Stewart. MINPRAN: A new robust estimator for computer vision [J]. IEEE Trans. on Pattern Analysis and Machine Intelligence, 1995, 17(10): 925-938.
[7] Richard Hartley, Andrew Zisserman. Multiple View Geometry in Computer Vision[M]. Cambridge: Cambridge University Press, 2003.23-150.
[8] Zhengyou Zhang, Rachid Deriche, Olivier Faugeras etal. . A robust technique for matching two uncalibrated images through the recovery of the unknown epipolar geometry[R]. INRIA Sophia-Antipolis, 1994.1-38.
Contact Person: Niu Yifan
Email: [email protected]
Mobile phone: 13355370980
Address: Basic Department, Jining Technician College, No. 3166 Chongwen Avenue, High-tech Zone, Jining City, Shandong Province
Postal code: 272000