High Recognition Ratio Image Processing Algorithm of Micro Electrical Components in Optical Microscope

In order to process small components of original image under the microscope, firstly, this paper adopts median filtering algorithm to enhance targets; and the targets are sharpened by using lateral inhibition algorithm, the edge of targets is outlined. In order to get reliable target region, adaptive threshold segmentation algorithm is used to extract need target region, and characteristics of target is used to distinguish multiple targets. Based on the chip resistor, one tiny component, in the captured image, we judge if the chip resistor is qualified by calculating the pixels area values. The experimental results show that, the image processing algorithm and qualified detection algorithm is reasonable, which provides the theoretical basis and implementation method of effective target extraction and further qualified test.


Introduction
With the development of manufacturing industry and electronic technology, integration has become a modern manufacturing industry trend [1].In order to meet the needs of integration, small parts and small chips and other components are emerged as the times require.These components have been made in minute size in the process, and just because these components can be made more and more tiny, integration on a large scale can be used in more fields [2].Those produces which imbark integration on a large scale will be more perfect and the function will be more powerful and have more coping strategy for different situation.The usability of those produces will be strengthened.
Because these components size is too small, tiny misoperation in the process will emerge questions in component.If these uncertain components be used in integrated produces, there will be hidden danger in produce.In practical engineering context, qualified test of each component should be done.Based on the fact that compotents have been made in tiny size, image analysis of components need to have the aid of microscope [3]- [4], microscope is used as an auxiliary tool to accomplish amplification of small components.
In order to improve the product reliability of small components etc, this paper uses chip resistors of electrical components as measured object.With the aid of microscopy imaging principle [5], a number of chip resistors are captured.Firstly, the original image is pre-processed and targets are enhanced.The whole processing procedure is finished by using adaptive threshold segmentation algorithm, etc.We adopt reasonable recognition algorithm based on characteristic of chip resistance to accomplish qualified test.

The optical imaging principle on microscope and image acquisition method
In the production process, because the tiny size of chip resistors are done, then the chip resistors image is acquired with the help of microscope to amplify chip resistors image, which will facilitate the next analysis of the image, processing and ultimate qualified test.The imaging schematic is constituted by area array camera and microscope is shown as Figure 1.The tiny measured objects can be amplified through the microscope lens, then the amplified microscopic image of measured objects can be obtained.The amplified microscopic image is conducive to process the targets.The microscopic image is captured by optical lens, the image will be formed on the imaging surface.As shown in Figure 2, the measured objects are located in optical effective region, minute objects are amplified by microscopic optical system.Area array camera captures microscopic image by optical lens of camera.The captured image enters the computer by image acquisition card [6].In the processing of the computer, using image processing algorithm in this paper extracts target region and using high recognition ratio algorithm recognizes target region.The measured objects quality will be tested, the unqualitied objects will be rejected and the qualitied objects will be persisted Image acquisition diagram under microscope is showed as Figure 2.

The high precision image test method for tiny components under optical microscope 3.1 Image processing algorithms for tiny components under microscope
It is necessary to abstract target effectively from image during testing the chip resistors.However, due to these factors effect which are uneven lighting, diffraction effect, camera performance and internal and external noise, the feature of computer captured image is low contrast and blurs edge [7].These features are not conducive to the target final test; therefore, it is need to research a set of effective processing algorithm.
In order to effectively abstract each target in a batch of chip resistors, multiple targets image processing algorithm is studied, the flow chart is shown as Figure 3.
In view of a captured original image, due to the changes of background is slow and irregular, which will obstruct target testing, so we use background suppression algorithm to achieve enhancement of target, which is conducive to test target; The edge contains important information of the target, according to the lateral inhibition principle of human visual to sharpen target [8].Because the noise and target edge show same characteristics, so target is sharpened and noise signal is also enhanced at the same time; In order to get reliable target region 913 information, we adopt the method which is adaptive threshold segmentation to extract target region.This method can remove most of the noise, but a small amount of noise and target will be extracted; In order to remove the influence of noise and distinguish multiple measured targets, and we use the mark clustering algorithm, according to the characteristics of the target, to distinguish multiple targets, and finally we test the marked target quality.

The algorithm of image preprocessing and target enhancement under the microscope
Using the average value of a pixel-domain as the filtering results is the simplest smoothing filtering method, all the coefficient of filtering template are 1.For the 3 3 template, the value of R need to be divided overall coefficient 9.The smoothing filtering has inhibiting effect on noise, but as the result of smoothing filtering, image becomes fuzzier, it can be deemed that the details has a diminution.Due to their small size, targets are easy to drown in background.So the smoothing filtering is unsuitable.This paper uses the median filtering to do image preprocessing.
For a image   y x g , , the output of 2-D median filtering can be written: For the median filtering which uses a n n  template, its output should be greater than or equal to the   2 1 2  n piexl value of the template [7].Normally, if the domain of image is too bright or too dark and size of the domain is smaller than half of the template size, the domain would be eliminated.
The median filtering is a nonlinear signal processing technology based on the order statistical theory; it can effectively suppress the noise, which is a typical nonlinear spatial filtering technology.The median filter can protect well the signal details while removing noise [9].Moreover, the median filter is easy to adaptive, so it can further improve filter performance.It can remove the singularity-grays in image, and due to this feature, median filtering algorithm is usually used for background suppression and image deposing for dim target.
The image border includes important information about images, border is situated the area which has obvious energy difference [10].There are some differences in target and background energies after removing noise, but the energy difference is small, which will causes that sharpening effect is not good.This paper uses sharpening algorithm based on the principle  ISSN: 1693-6930 TELKOMNIKA Vol. 12, No. 4, December 2014: 911 -920 914 of lateral inhibition [11], this sharpening algorithm will be propitious to separated target from background and makes target contour clearly visible, which will enhance the difference between the target and background, image quality will be improved.
Looking every pixel of gray image as a sensor in lateral inhibition network, all light sense unit can be suppressed by neighboring numerous units, so lateral inhibition between numerous units can be shown as: For formula (2), c f is emission frequency of pluses when a light sense unit is shone alone; i y is the emission frequency of pluses after a light sense unit has got the lateral inhibition; ic  is the coefficient of lateral inhibition; oi y is the threshold to generate lateral inhibition [12].Using the formula (2) as a template, we figure out the gray values after every pixel has been suppressed by ambient pixels, the calculated gray value is lateral inhibition value of this pixel, lateral inhibition values from all pixels of image constitute a new gray value matrix, which is called lateral inhibition matrix of image [13].The result of lateral inhibition is not obvious because of the overmuch pixels, inhibitory action is weak when the template is over 7 7  and the computational process will take too long time.So we choose a suitable calculation template which is

5
, that means we consider the centre lateral inhibition effect which is from the ambient 24 pixels.Formula (3) is the computing formula.has got the lateral inhibition from the ambient 24 pixels, are the difference of lateral inhibition coefficient between every point and center point.

The target region detection under the microscope
When the contrast is different everywhere in image, if we only use a fixed global threshold to segment whole image, segmentation results will be affected because global threshold cannot give consideration to contrast of everywhere in image.So we use local threshold which correlates coordinate to segment image.This related with coordinate threshold is also called adaptive threshold.Firstly, the image is decomposed into a series of subimages, these subimages can overlap or just adjoin with others.If subimage is small, the problems caused by shadow or spatial variation of contrast will be less, and then we can calculate a threshold for one subimage.Segmentation is implemented by threshold comparison between every pixel and corresponding subimage [14].
In order to segment target region, this paper adopts adaptive threshold segmentation algorithm.Firstly, the mean value  and variance  of the image are calculated.The image is divided into subimages of same size, and the pixel mean values of every subimage are calculated respectively.The calculation formula for mean value and variance are shown: The thresholds of whole image and subimages are calculated.The calculation formulas are shown: For formula ( 6) and ( 7), m is weight coefficient whose range is from 3 to 10.The selection of segmentation threshold T need abide the following formula: If image has many different regions of grey value, we can select a series of thresholds, and each pixel is divided into the appropriate threshold [15].Selection of image threshold segmentation can be defined as: This will be assigned to the appropriate category to each pixel.The image after threshold segmentation can be defined as: For formula (9),   y x g , is original image.The formula (9) can be estimated and applied at any pixel position.

High precision identification algorithm of image under the microscope
The quality of target in image is improved by a series of processing which are target enhancement and edge detection etc, the processing result is conducive to extract target and subsequent processing.Captured image contains multiple targets, these targets are distributed in image without rule.In order to correctly extract each target, multiple measured targets need to be distinguished.We adopt mark clustering algorithm [16].Multiple targets, according to their own characteristics, are distinguished.And finally, these marked targets are detected on quality.
Because the magnification and captured angle of microscope are uncertain, when chip resistor is detected on quality, if we only just calculate the area value of solder region on chip resistor to determine whether or not the chip resistor is qualified, the testing result is not accurate [17]- [18].This paper adopts this method, when the pixels area values A 1 and A 2 of solder region which are located on each side of chip resistor are equal, we deem that this chip resistor is qualified.As shown in Figure 4.When image is captured, the captured center is not located in the center of each chip resistor, so there is certain calculation error when the pixels area values A 1 and A 2 of solder region are calculated, the permissible calculation error range is % 10  . So when the pixels area values of solder region is satisfied with formula (10), we deem that the chip resistor is qualified.

The experiment and analysis
In the production process, the tiny chip resistors have been done, we need to have the aid of amplified function of microscope to complete the image acquisition.The captured image is processsed by filtering and edge detection etc.The purpose is to eliminate noise which is generated in process of acquisition and transmission, to make the edge clear and tidy.A series of image processing is essential foundation for the next target extraction.
One original amplified image is captured in this paper which is shown as Figure 5. From the amplified image by microscope, we can see that the iamge has low clarity and noise, the original image needs to be further processed.The clear image is obtained by above a series of processing.According to their own characteristics, multiple targets are distinguished.We adopt image clustering method to label adjacent regions.Every target is extracted.We judge if the chip resistor is qualified by calculating the pixels area values A 1 and A 2. Finally, some unqualified chip resistors are rejected which is shown as Figure 9.
The original image have been processed by above a series of comparison algorithm.It is clear that the effect of median filtered is better than smoothing filtered from processing result.The contrast of the image has improved afrer median filtering, At the same time to remove noise, the details will not be made too fuzzy, which improves image visual effect.The comparison results of edge extraction show that lateral inhibition algorithm can extract the edge and the extracted contour is not deformation, and the extraction effect is better than Sobel operator.Adjacent targets can be effectively distinguished by edge extraction.Target regions have been segmented by adopting adaptive threshold segmentation algorithm.The segmented regions have been processed by high precision identification algorithm, we can obtain image which only contains qualified chip resistances.The experimental result shows the edge of targets have been clear by using image processing algorithm from this paper and the image quality has been improved.We have made several experiments on 100 chip resistances by adopting image processing algorithm and high precision identification algorithm in this paper.Homogeneity of experimental result is nice and inaccurate recognition ratio is low.These algorithms in this paper effectively improves accurate recognition ratio, which provides reliable method for qualified test.

Conclusion
The captured image from microscope exhibits low contrast, poor clarity.In this paper, a series of image processing algorithms are researched, the captured image from microscope is processed by preprocessing algorithm and adaptive threshold segmentation algorithm etc.The solder regions on each side of chip resistor are effectively extracted, and the target qualified detection is accomplished by using qualified detection algorithm.The experimental results show that the algorithm is reasonable and feasible.Good experimental result is achieved.The problem existing microscopic images is solved.The algorithm can be applied in image processing and other similar problems, which will improve the accuracy of similar products.

Figure 2 .
Figure 2. Image acquisition principle under the microscope

Figure 3 .
Figure 3. Image processing algorithm block diagram

P
, gray value after the point  y x P ,