1. A method for detecting an object in an environmental region of a motor vehicle by a camera system of the motor vehicle, the method comprising: providing a first image of the environmental region by a camera of the camera system with illumination of the environmental region using at least one light source of the motor vehicle, such that a shadow of the object caused by the illumination is depicted in the first image; providing a second image of the environmental region by the camera in an inactive state of the light source, wherein in the second image illumination is omitted; providing a subtraction image by subtracting one of the first and second images from another of the first and second images by an image processing device of the camera system; and providing an edge image from the subtraction image and detecting the object based on edges of the edge image by the image processing device, wherein the light source is alternately switched with a predetermined switching frequency greater than 75 Hz between the inactive state and an active state, in which the light source illuminates the environmental region, wherein a sequence of images of the environmental region is provided by the camera and a frame rate of the camera is adjusted depending on the switching frequency.