1. A method of detecting objects, including receiving frames of video, initializing of a background with its subsequent correction, calculation of a difference between a current frame and the background, binarization with a threshold frame, spatial filtering, forming zones, and describing a position of objects, comprising the steps of: determining a constant of updating background ρ in each pixel, depending on the detection of an object under a rule: ρ=ρ 1 , if the pixel is classified as the background, ρ=k*ρ 1 , if the pixel is classified as the object, where 0<ρ 1 <1, k is a first factor, 0<=k<=1; calculating the threshold frame by a formula p i =k 1 2 σ i 2 , where k 1 is a second factor, and a variance σ i is updated by a formula σ i 2 =(1−ρ)σ i−1 2 +ρ(ρ i −I i ) 2 , where I i is a current frame, μ i is a current background frame, and i is a number frame; and performing spatial-filtering by shaping the zones detected preliminary in the binarized image.