The present invention discloses a device and method of on-line automatic count of fries on the basis of machine vision. The device provided by the invention comprises a red LED backlight, an industrial camera, pipelines, a filter screen, a round plane, an uncovered cylindrical sink, electromagnetic valves, a liquid level meter, a PC machine containing an image acquisition card, a single-chip microcomputer controller and a support. The acquired images are subjected to arithmetic processing such as grey level transformation, Laplace filtering, adaptive median filtering, OTSU threshold segmentation, morphological processing, endpoint refinement and the like and then fry counting through necessary software. The device provided by the invention is able to be continuously and effectively used for a long time under the control of the PC machine, so that deficiencies of traditional manual counting, such as limited working time, low precision, obvious subjective factors and the like, are solved; and the water level may be detected and controlled through the liquid level meter to adapt counting of different fries with different sizes so that different users' counting requirement may be satisfied.