1. A method of detecting objects in images obtained from a video camera, wherein the video camera is detachably connected to a computer having a memory, the method comprising: receiving, by the computer, frames of video from the video camera, wherein the computer is programmed to perform steps of: initializing a background with zero values or a first frame received by the computer; determining a constant of updating ρ for updating the background for each pixel of the frames of video, depending on detection of an object according to a rule, wherein for a pixel classified as the background, ρ=ρ 1 , wherein for a pixel classified as the object, ρ=k*ρ 1 , where 0<ρ 1 <1, k is a first factor, 0<=k<1; updating the background using the ρ, wherein the smaller the ρ that is chosen, the longer time an object takes to be incorporated into the background; calculating a difference frame for each pixel, the difference frame indicating an absolute difference between a current frame and the background; 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 of frame; performing binarization of an image of the video to obtain a binary frame after the step of calculating the threshold frame, by comparing the threshold frame and the calculated difference frame, wherein a result of the comparison is either a zero value in the binary frame or a non-zero value in the binary frame; performing spatial-filtering by creating pre-detection zones including respective areas of connected pixels having the non-zero value in the binary frame, wherein the computer is further programmed to perform steps of: filtering the pre-detection zones; dividing into sections of equal width the pre-detection zones remaining after filtering; and forming tracking zones from the sections having a ratio of overlapping to a zone of predetermined width and height that exceeds a specified threshold.