This article is concerned with on-line counting of harmful insects of certain species in videos in the framework of in situ video-surveillance that aims at the early detection of prominent pest attacks in greenhouse crops. However, the video-processing challenges are numerous and they mainly concern the low spatial resolution and color contrast of the objects of interest in the videos, the outdoor issues and the videoprocessing which needs to be done in quasi-real time. Thus, we propose a solution which makes use of an efficient pattern recognition algorithm to extract the locations of the harmful insects of interest in a video, and when coupled with some video-processings a quick on-line vision solution is achieved, and overall systems sensitiveness and accuracy are substantially increased. The system has been tested off-line against many videos of the whiteflie species (one potential harmful insect), recorded under various in situ conditions (light changes, shadows, presence of ou...