An efficient approach was proposed for discriminating shadows from moving objects. In the background subtraction stage, moving objects were extracted. Then, the initial classification for moving shadow pixels and foreground object pixels was performed by using color invariant features. In the shadow model learning stage, instead of a single Gaussian distribution, it was assumed that the density function computed on the values of chromaticity difference or bright difference, can be modeled as a mixture of Gaussian consisting of two density functions. Meanwhile, the Gaussian parameter estimation was performed by using EM algorithm. The estimates were used to obtain shadow mask according to two constraints. Finally, experiments were carried out. The visual experiment results confirm the effectiveness of proposed method. Quantitative results in terms of the shadow detection rate and the shadow discrimination rate(the maximum values are 85.79% and 97.56%, respectively) show that the proposed approach achieves a satisfying result with post-processing step.
For calibrating the laser plane to implement 3D shape measurement, an algorithm for extracting the laser stripe with sub-pixel accuracy is proposed. The proposed algorithm mainly consists of two stages: two-side edge detection and center line extraction. First, the two-side edge of laser stripe is detected using the principal component angle-based progressive probabilistic Hough transform and its width is calculated through the distance between these two edges. Secondly, the center line of laser strip is extracted with 2D Taylor expansion at a sub-pixel level and the laser plane is calibrated with the 3D reconstructed coordinates from the extracted 2D sub-pixel ones. Experimental results demonstrate that the proposed method can not only extract the laser stripe at a high speed, nearly average 78 ms/frame, but also calibrate the coplanar laser stripes at a low error, limited to 0.3 mm. The proposed algorithm can satisfy the system requirement of two-side edge detection and center line extraction, and rapid speed, high precision, as well as strong anti-jamming.
To eliminate rotation deviation of sequential images mosaic when measuring linear dimensions of large scale parts with computer vision, a novel algorithm based on the chain code searching method is proposed. After image preprocessing, including image filtering, image segmentation, and edge detection, the chain code length of the contour line can be searched out by the proposed method. Then, the angle from the contour line to the coordinate axis is computed with the length of the contour line. After that, the sequence is rotated in the opposite direction and the rotation deviation is eliminated. It is prepared for the next mosaic of sequences in eliminating shifting deviation. Experiments are carried out on parts with a linear profile rotating angle from 0° to 9°. The results show that compared with the commonly used Hough transform, the new method has higher precision and faster speed, which is important in realizing online high precision measurements of large scale parts with a linear profile.
To segment defects from the quad flat non-lead QFN package surface a multilevel Otsu thresholding method based on the firefly algorithm with opposition-learning is proposed. First the Otsu thresholding algorithm is expanded to a multilevel Otsu thresholding algorithm. Secondly a firefly algorithm with opposition-learning OFA is proposed.In the OFA opposite fireflies are generated to increase the diversity of the fireflies and improve the global search ability. Thirdly the OFA is applied to searching multilevel thresholds for image segmentation. Finally the proposed method is implemented to segment the QFN images with defects and the results are compared with three methods i.e. the exhaustive search method the multilevel Otsu thresholding method based on particle swarm optimization and the multilevel Otsu thresholding method based on the firefly algorithm. Experimental results show that the proposed method can segment QFN surface defects images more efficiently and at a greater speed than that of the other three methods.