Abstract:Machine vision was introduced into the vaccine preparation to detect the fertility of middle-stage hatching egg by using the image processing. According to the special requirements that all the infertile eggs should be detected and the original embryos fertility in eggs should not be affected by the detection, the design of imaging system and the method of how to detect the fertility by using the images were proposed. Firstly, images were enhanced and the special quality of shade was detected by multi-scale morphological transformation; secondly, the main blood-vessels in the hatching egg images was extracted by using local adaptive segmentation based on histogram-based WFCM; finally, the fertility by counting the number of the blood-vessels was detected. The method was simulated with 150 images under the Matlab7.0 environment. The detection accuracy rate, undetected error rate and false detected rate were respectively 99.33%, 0% and 0.67%. The detection of a single egg is 0.21s on average. The results showed that the method was efficient, but not sensitive to noise, color of egg shell, nor to the other pollution on the eggshell. It is capable to improve the detection accuracy and efficiency by replacing manual detection in vaccine preparation.