A sensor device for calculating a motion of a camera in a vehicle, comprising: the camera, which is configured for capturing a first image at a first position of the camera and a second image at a second position of the camera, a calculation unit, which is configured for: - selecting a point in the first image and identifying said point in the second image, - calculating a displacement of the point based on a shift between the point in the first image and said identified point in the second image, - calculating the motion of the camera without scale based on the displacement of the point, - projecting in a ground calibration plane the point in the first image and projecting in the ground calibration plane said identified point in the second image, characterized in that the calculation unit is further configured for: - calculating a first line in the ground calibration plane between said projected point in the first image and the projected first position of the camera in the ground calibration plane, - calculating a second line in the ground calibration plane between the projected identified point in the second image and the projected second position of the camera in the ground calibration plane, and - calculating a scale of the motion of the camera based on a shift between the first line to the second line in the ground calibration plane and based on the calculated motion of the camera without scale. the camera, which is configured for capturing a first image at a first position of the camera and a second image at a second position of the camera, a calculation unit, which is configured for: - selecting a point in the first image and identifying said point in the second image, - calculating a displacement of the point based on a shift between the point in the first image and said identified point in the second image, - calculating the motion of the camera without scale based on the displacement of the point, - projecting in a ground calibration plane the point in the first image and projecting in the ground calibration plane said identified point in the second image, characterized in that the calculation unit is further configured for: - calculating a first line in the ground calibration plane between said projected point in the first image and the projected first position of the camera in the ground calibration plane, - calculating a second line in the ground calibration plane between the projected identified point in the second image and the projected second position of the camera in the ground calibration plane, and - calculating a scale of the motion of the camera based on a shift between the first line to the second line in the ground calibration plane and based on the calculated motion of the camera without scale. - selecting a point in the first image and identifying said point in the second image, - calculating a displacement of the point based on a shift between the point in the first image and said identified point in the second image, - calculating the motion of the camera without scale based on the displacement of the point, - projecting in a ground calibration plane the point in the first image and projecting in the ground calibration plane said identified point in the second image, - calculating a first line in the ground calibration plane between said projected point in the first image and the projected first position of the camera in the ground calibration plane, - calculating a second line in the ground calibration plane between the projected identified point in the second image and the projected second position of the camera in the ground calibration plane, and - calculating a scale of the motion of the camera based on a shift between the first line to the second line in the ground calibration plane and based on the calculated motion of the camera without scale.