1. A method of monitoring a scene, the method comprising: receiving image data representing a thermal image captured by a thermal image sensor and a visual image captured by a visual image sensor, the thermal image and the visual image depicting a same view of the scene; detecting objects which have a different temperature than their environment in the visual image and in the thermal image; defining a mask covering a window in the view of the scene; and matching the detected objects between the visual image and the thermal image in order to determine if an object or an object part, inside the mask, is present in both the thermal image and the visual image, and, if so, providing a modified mask by excluding an area occupied by the object or the object part from the mask, wherein matching the detected objects between the thermal and the visual image in order to determine if an object or object part, inside the mask, is present in both the thermal image and the visual image comprises: for pixels in the thermal image where an object is detected, checking if an object is detected in corresponding pixels in the visual image; counting the number of pixels where there is a match for the object; determining a ratio between the number of matching pixels and a total number of pixels belonging to the object detected in the thermal image; and comparing the ratio to a threshold value, and if the ratio is below the threshold value, determining that the object only is present in the thermal image.