Abstract This paper conducted research and technical analysis on the implementation of the visual system, researched and developed a seed level discrimination visual system based on virtual instruments, and discussed the application of digital image processing algorithms.
Keywords: virtual instrument, computer vision, image processing, PCI bus
With the continuous development of computer technology, PC-based vision systems become more economical and practical. High-power Pentium processors with MMX, rugged operating systems, PCI local buses, and image acquisition software and hardware based on virtual instruments with user-friendly interfaces make the performance of today's vision application systems far beyond what previous systems can match, and the cost But it keeps declining.
In the past, the establishment of PC vision systems was completed jointly by system integrators, OEMs, and the company's internal vision system development group. Today, new technologies and image processing software based on virtual instruments allow users to develop computer vision application systems that meet most application requirements at very low costs.
The virtual instrument vision application system can provide process monitoring, information concentration and feedback control for the automation system. The laboratory automation and image processing system can use filtering and analysis technology to determine the number of cells and the qualification of biological materials. In fact, today's PC-based vision systems are able to perform more complex inspection tasks with unprecedented efficiency, flexibility, consistency, reliability and data throughput capabilities.
1 Requirements for PC performance of visual systems based on virtual instruments
1.1 PCI local bus
The high-speed data throughput capability of the PCI bus can well meet the needs of image acquisition, making it an ideal solution for real-time image acquisition. Because each image frame may contain up to 400KB of data, high-speed transmission of this data is critical for real-time display and analysis. PCI not only easily meets this requirement, but can further provide its bandwidth for integration with other data acquisition devices. By using the ASIC DMA controller, the PCI image acquisition board can fully utilize the bandwidth of the PCI bus without occupying CPU time to achieve the purpose of real-time acquisition, display and analysis processing.
PCI (Peripheral Component Interconnect, Peripheral Component Interconnect) was originally a high-performance extended bus structure developed by Intel to replace ISA and EISA. It has stronger signal adaptability than the VESA local bus and has been widely adopted as a PC and workstation industry standard. The maximum data transfer rate it can theoretically provide is 132MB/s, and 64-bit PCI can reach 267MB/s, which is enough to meet the needs of high-definition television (HDTV) signals and real-time three-dimensional virtual reality (3DVR). needs. Since PCI supports the "Plug and Play (PnP)" automatic configuration function, the configuration of the plug-in image acquisition board becomes more convenient. The setting of all its resource requirements is handled by the BIOS when the system is initially started. There is no need for users to perform cumbersome switch and jumper operations.
Currently, PCI bus-based data acquisition/image acquisition (DAQ/LMAQ) products have greatly improved the performance of computer vision systems. The PCI bus can reach a transfer rate of 132Mb/s. Because transmitting data at this rate will severely consume CPU time and ultimately affect system performance, DAQ/IMAQ manufacturers designed ASIC chips for PCI-based DAQ/IMAQ transmitters. For example, NI's MITE chip uses DMA technology to not only achieve the highest transfer rate of PCI, but also to pass non-contiguous memory buffers without applying for CPU time.
1.2 MMX technology
Intel's MMX technology improves the performance of vision software and effectively increases image processing speed. For most visual software functions, the execution speed of Pentium processors with MMX is 200% to 400% higher than that of Pentium processors without MMX. This is because MMX technology contains a large number of general instructions, which enhances the processing power of the PC and is compatible with The original Intel architecture maintains complete compatibility. Moreover, MMX technology is also fully compatible with various existing operating systems and application software. The use of MMX technology has significant performance gains for most image acquisition visual functions such as filtering, threshold processing, operations, logic and morphology.
2 Software processing and analysis
Digital image processing is the key to the visual system. In the virtual instrument system, all this is achieved through computer software. At present, the most widely used virtual instrument development platforms at home and abroad are NI's LabVIEW and LabWindows/CVI. IMAQ Vision, based on these two softwares, provides complete image processing function libraries or functional modules for these two platforms, such as various edge detection operators, automatic threshold processing, various morphological algorithms, filters, FFT, etc. , this library contains a large number of currently proven successful theoretical algorithms, allowing users to quickly develop excellent image processing and analysis systems suitable for their profession without professional programming experience.
3 Seed level discrimination visual system
3.1 System configuration
The seed grade identification vision system based on computer vision is mainly used for the automatic counting and geometric size characteristics determination of a large number of seeds. The use of this system improves the measurement accuracy and efficiency. Its basic software and hardware configuration is:
Hardware: color CCD, PCI-IMAQ-1408 image acquisition board (NI product), PC Pentium II/233 computer;
Software development tools: LabWindows/CVI, IMAQ Vision
Operating system: Windows NT 4.0.
3.2 Image acquisition
The process of image acquisition is the process of analog-to-digital conversion of the standard video signal (PAL or NTSC format) from the CCD by the image acquisition board, and the quantized data is transferred to the computer memory through the PCI bus.
3.3 Image processing
3.3.1 Median filtering
Image information is often interfered by various noise sources during the collection process. These noises often appear as some isolated pixels on the image. This can be understood as the grayscale of the pixels is spatially related, that is, the grayscale of the noise point pixels is related to their grayscale. Neighboring pixels are significantly different. If this interference is not filtered, it will affect future image area segmentation, analysis, and judgment.
Compared with usual linear filters (such as low-pass filters), non-linear filters can better solve certain image processing problems. The most useful of them are called ordering filters, which can be adjusted and used out of the box in IMAQ Vision. . Median filter is a type of sorting filter. It can not only suppress noise, filter out pulse interference and image scanning noise, but also overcome the blurring of image details caused by linear filters and maintain image edge information. The idea of median filtering is to take a moving matrix template and perform the following processing:
1Set the filter template size, such as 5×5 template;
2Roam the template in the picture and coincide the center of the template with a certain pixel position in the picture;
3Read the grayscale value of each corresponding pixel under the template;
4Arrange these grayscale values in a row from small to large;
5Find the middle one among these values;
6Assign this intermediate value to the pixel corresponding to the center of the template.
It can be seen from the above process that the main function of the median filter is to change the pixels with a larger grayscale difference from the surrounding pixel values to values close to the surrounding pixel values, thereby eliminating isolated noise points.
The above median filtering method is only used for grayscale images. IMAQ Vision can extend it to the processing of color images. The processing method is:
(1) Extract red, green, and blue color palettes from the original 32-bit color image. R, G, and B in a color image in IMAQ Vision are represented by a 32-bit integer. The second eight bits are the R value, the third eight bits are the G value, and the fourth eight bits are the B value. As shown below.
(2) Perform median filtering on the red, green, and blue palettes (8 bits) respectively. Compared with the low-pass linear filter, the median filter can attenuate random noise without blurring the boundaries, ensuring accurate grain size characteristics.
(3) The processed red, green, and blue palettes replace the hue template of the original image according to the corresponding bit operations to generate a new 32-bit color image with noise removed.
3.3.2 Binarization processing of color images
The use of RGB threshold processing algorithm instead of the commonly used grayscale threshold algorithm can ensure that the system has higher-precision threshold operation results. Even in poor lighting conditions, binary images with good processing quality can still be obtained. Using the traditional grayscale threshold algorithm requires a large grayscale difference between the target object and the background of the original image to achieve better processing results, so it must have higher requirements for the lighting environment. Experiments have proven that this method is simple and effective, and lays a very good foundation for subsequent processing, but it also requires time to manually adjust the three-color thresholds.
3.3.3 Hole filling processing
Holes may appear inside the target area of the binary image after threshold processing. The reasons may be due to lighting conditions, lack of obvious difference in pixel values between the background and the target, unreasonable threshold selection, etc. Its processing idea is the closure algorithm of mathematical morphology. After the filling process, the holes inside the target area (the kernel) are filled.
3.3.4 Region segmentation
It is difficult to obtain accurate regional segmentation results only by using threshold processing. Figure 2 is the grayscale histogram along the straight line L in the image in Figure 1. Among them, six points A, B, C, E, F, and G all have large grayscale jumps, while the jump amplitude of point D is small. Obviously, with D Selecting a threshold value will cause image distortion, and accurate grain characteristics cannot be obtained; and selecting A, B, C, E, F, G grayscale values lower than D as the detection threshold can obtain a more accurate grain edge, but it cannot The edge information existing at point D is detected. Therefore, when threshold processing cannot meet the requirements, morphological algorithms need to be used to segment the image.
Image segmentation is the process of dividing digital images into disjoint (non-overlapping) regions and is the basis of pattern recognition. Regional segmentation is achieved
A method of image segmentation that assigns each pixel to each object or region. Once objects are separated, they can be measured and classified.
Through the above processing—filtering, binarization, hole filling, etc., the system lays the foundation for correct region segmentation. The principle of region segmentation is the "on" algorithm. First, determine the connectivity criterion as 8-connected (the result of 8-connected is closer to human perception), take the structural element as a 7×7 matrix template, and the middle position of the matrix is the origin of the structural element.
After four consecutive corrosions, the grains were completely separated, as shown in Figure 3(b). At this point, the image contains a total of 31 objects.
IMAQ Vision performs edge detection before etching to obtain the complete target edge, and then expands the seed image to the edge after etching. In this way, complete image segmentation is ensured while maintaining the original object edges without any loss.
3.3.5 Filtering
In actual situations, on-site seeds will contain a large number of tiny-sized debris, such as A and B in Figure 3(a) and (b) . There may also be spots in the background. If they are not removed during image processing, they will be mistakenly detected. For grains and as a statistical sample. The filtering process is based on the size of the target object, and its basic idea is the corrosion algorithm of mathematical morphology. After IMAQ Vision performs several erosions, it also restores the uneroded grain objects to their pre-erosion shape to ensure their edge information.
After filtering out tiny impurities, the seeds are color-coded (Figure 4) and feature statistics are performed, including the area, circumference, long diameter, short diameter, centroid coordinates and other data of each grain. Processing ends.
With the development of computer technology, especially PCI bus technology, MMX technology and network technology, real-time image acquisition visual systems based on virtual instruments are more and more widely used in the field of test measurement and control. Current Pentium MMX/PII/PIII PCs and workstations are equipped with multiple PCI expansion slots and AGP video cards. New operating systems such as Windows95/98 support "plug and play", and map board developers are also constantly developing and improving drivers. software and modular vision software to provide users with a more powerful API and a better application system development platform, making the virtual instrument vision system using the PC bus solution flexible, easy to use, powerful, and with good scalability and maintainability. and performance-price ratio, so it is being accepted by more and more users.
Previous article:Clock chip DS1302 and its application in data recording
Next article:An automatic detection system for thin film circuit faults
- Popular Resources
- Popular amplifiers
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- Tektronix Industrial Application Standard and High-Speed Interface Test Solutions
- Ora Good Cat “chip replacement incident”: How big is the gap between the two chips?
- 【NUCLEO-L552ZE Review】+ Bluetooth communication experiment (1)
- Sigma-Delta ADC Digital Filter Types
- Remote upgrade of HuaDa MCU HC32L110
- Explanation of the stack pointer register SP of msp430
- Qorvo at CES 2020: Innovative Solutions for 5G, IoT, Wi-Fi 6 and V2X
- dsp28335 Ecap Summary
- AD automatically adds test points
- iTOP-3399 development board Linux system modify boot LOGO