In order to enhance the adaptability of visual inspection systems to different environmental illuminations and backgrounds in projects, to eliminate the interference owing to various disturbances, such as the noises of inside circuits, the ideal model and the actual situation with the disturbances of noise of a gray transition region of a target edge was investigated and a new self-adaptive method for noise elimination and image segmentation based on a particle filter was proposed. First, the noise particle set of the pixels in the gray transition region of the target edge at the initial time was established, posterior probability density of noise particle was acquired through the recursive Bayesian estimation method, and disturbances on pixels of the gray transition region of the target edge was eliminated. Then, the iterate result of the precise edge position was estimated for the instability of the grey value of pixels in the gray transition region of the target edge. Finally, the geometrical parameters of the target concerned were solved with the computation of the data of the complete contour extracted. Using the method, the angle measurement accuracy is less than 0.0068 degrees, and the standard deviation is 0.00123; the diameter ratio measurement accuracy is less than 0.00057 degrees, and the standard deviation is 8.67215E-5. In conclusion, the proposed algorithm can quickly and precisely achieve the noise elimination and image segmentation.