1. A method for detecting at least one object in an environment by a monitoring system, the method comprising: taking at least one image of the environment by means of an image capturing device in the monitoring system; generating at least one background image of the environment based on the at least one image, the background image comprises a plurality of pixels; dividing the background image into a plurality of pixel blocks; forming at least one data cluster of each pixel block based on at least one feature of the background pixels in the pixel block, wherein the at least one cluster is modeled as a data distribution having a mean value and a standard deviation from the mean value; taking a subsequent image of the environment; comparing each pixel of the subsequent image with the at least one data cluster of the pixel block of the background image corresponding to said pixel to generate a first discrepancy value; comparing said pixel of the subsequent image with the at least one data cluster of at least one further pixel block of the background image to generate a second discrepancy value, wherein the at least one further pixel block is adjacent to the pixel block corresponding to said pixel; determining whether said pixel of the subsequent image is a background pixel or a foreground pixel based on the first discrepancy value and the second discrepancy value; generating a binary map of the subsequent image based on the determined background pixels and the foreground pixels; and marking connected pixels in the binary map corresponding to the foreground pixels to form at least one foreground object, wherein the at least one foreground object is the at least one object detected in the environment.