A method for use in extraction of foreground objects in an image stream, the method comprising: providing input image data of a region of interest; providing data indicative of pixel to meter ratios defining distance of objects or regions in said image data from a camera; providing a background model of said region of interest; utilizing said background model and processing each image in said input image data, said processing comprising: determining a background gradient map for pixels in said background model and an image gradient map for pixels in the image; defining a predetermined number of one or more segments in said image and corresponding one or more segments in the background model; said defining comprising determining, according to said data indicative of pixel to meter ratios, one or more distance segments in said image data and defining said predetermined number of one or more segments such that pixels of said one or more segments correspond to one of said one or more distance segments; for each image segment, determining an edge density factor based on a difference between the image and background gradient maps for said segment, and calculating, in accordance with the pixel to meter ratio, a foreground detection threshold based on said edge density factor, thereby enabling use of said foreground detection threshold for classifying each pixel in the segment as being a foreground or background pixel. providing input image data of a region of interest; providing data indicative of pixel to meter ratios defining distance of objects or regions in said image data from a camera; providing a background model of said region of interest; utilizing said background model and processing each image in said input image data, said processing comprising: determining a background gradient map for pixels in said background model and an image gradient map for pixels in the image; defining a predetermined number of one or more segments in said image and corresponding one or more segments in the background model; said defining comprising determining, according to said data indicative of pixel to meter ratios, one or more distance segments in said image data and defining said predetermined number of one or more segments such that pixels of said one or more segments correspond to one of said one or more distance segments; for each image segment, determining an edge density factor based on a difference between the image and background gradient maps for said segment, and calculating, in accordance with the pixel to meter ratio, a foreground detection threshold based on said edge density factor, thereby enabling use of said foreground detection threshold for classifying each pixel in the segment as being a foreground or background pixel. determining a background gradient map for pixels in said background model and an image gradient map for pixels in the image; defining a predetermined number of one or more segments in said image and corresponding one or more segments in the background model; said defining comprising determining, according to said data indicative of pixel to meter ratios, one or more distance segments in said image data and defining said predetermined number of one or more segments such that pixels of said one or more segments correspond to one of said one or more distance segments; for each image segment, determining an edge density factor based on a difference between the image and background gradient maps for said segment, and calculating, in accordance with the pixel to meter ratio, a foreground detection threshold based on said edge density factor, thereby enabling use of said foreground detection threshold for classifying each pixel in the segment as being a foreground or background pixel.