A method, performed by an image-processing device (120, 160), for determining whether or not a transparent protective cover of a video camera comprising a lens-based optical imaging system is partly covered by a foreign object on the protective cover, wherein a focal length of the optical imaging system is adjustable, the method comprising: obtaining a first captured image frame captured by the video camera with a first depth of field, wherein the first captured image frame is captured with a first focal length of the optical imaging system to obtain the first depth of field; obtaining a second captured image frame captured by the video camera with a second depth of field which differs from the first depth of field, wherein the second captured image frame is captured with a second focal length of the optical imaging system to obtain the second depth of field; and determining whether or not the protective cover is partly covered by the foreign object by analysing whether or not the first and second captured image frames (311, 312) are affected by presence of the foreign object on the protective cover such that the difference between the first depth of field and the second depth of field results in a difference in a luminance pattern of corresponding pixels of a first image frame and a second image frame, wherein the first image frame is based on the first captured image frame and the second image frame is based on the second captured image frame; wherein the luminance pattern corresponds to a pattern of a gradient of a relative luminance of the corresponding pixels, wherein the first image frame is obtained by geometrically transforming the first captured image frame, and/or the second image frame is obtained by geometrically transforming the second captured image frame, and wherein it is determined that the protective cover is partly covered by the foreign object if the difference in the luminance pattern is above a threshold. obtaining a first captured image frame captured by the video camera with a first depth of field, wherein the first captured image frame is captured with a first focal length of the optical imaging system to obtain the first depth of field; obtaining a second captured image frame captured by the video camera with a second depth of field which differs from the first depth of field, wherein the second captured image frame is captured with a second focal length of the optical imaging system to obtain the second depth of field; and determining whether or not the protective cover is partly covered by the foreign object by analysing whether or not the first and second captured image frames (311, 312) are affected by presence of the foreign object on the protective cover such that the difference between the first depth of field and the second depth of field results in a difference in a luminance pattern of corresponding pixels of a first image frame and a second image frame, wherein the first image frame is based on the first captured image frame and the second image frame is based on the second captured image frame; wherein the luminance pattern corresponds to a pattern of a gradient of a relative luminance of the corresponding pixels, wherein the first image frame is obtained by geometrically transforming the first captured image frame, and/or the second image frame is obtained by geometrically transforming the second captured image frame, and wherein it is determined that the protective cover is partly covered by the foreign object if the difference in the luminance pattern is above a threshold.