A method of calibrating a camera of a vehicle comprising: - obtaining one or more image frames in a video stream from the camera while the vehicle is in motion, wherein the images frames define an image plane; - selecting two or more image points in the image frames; - tracking a motion trajectory of each selected image point in the image frames; - obtaining a plurality of flow vectors based on the motion trajectory tracked; - determining one or more focus of expansion points for the flow vectors in the image plane, wherein each focus of expansion point is defined by x, y coordinates; - identifying a ground plane mask in the image plane; - identifying three or more flow vectors of the obtained flow vectors located in the ground plane mask; - determining an homography matrix configured to relate homogeneous coordinates of two image points of one of the flow vectors located in the ground plane mask; - obtaining one or more plane normal vectors using the homography matrix; - generating a camera calibration matrix comprising a first, a second and a third column by: ∘ determining a first column of the camera calibration matrix based on the obtained focus of expansion points; ∘ determining a third column of the camera calibration matrix based on the obtained plane normal vectors; ∘ determining a second column of the camera calibration matrix corresponding to the cross-product of the first and the third column of the camera calibration matrix; - calibrating the camera using the obtained camera calibration matrix. - obtaining one or more image frames in a video stream from the camera while the vehicle is in motion, wherein the images frames define an image plane; - selecting two or more image points in the image frames; - tracking a motion trajectory of each selected image point in the image frames; - obtaining a plurality of flow vectors based on the motion trajectory tracked; - determining one or more focus of expansion points for the flow vectors in the image plane, wherein each focus of expansion point is defined by x, y coordinates; - identifying a ground plane mask in the image plane; - identifying three or more flow vectors of the obtained flow vectors located in the ground plane mask; - determining an homography matrix configured to relate homogeneous coordinates of two image points of one of the flow vectors located in the ground plane mask; - obtaining one or more plane normal vectors using the homography matrix; - generating a camera calibration matrix comprising a first, a second and a third column by: ∘ determining a first column of the camera calibration matrix based on the obtained focus of expansion points; ∘ determining a third column of the camera calibration matrix based on the obtained plane normal vectors; ∘ determining a second column of the camera calibration matrix corresponding to the cross-product of the first and the third column of the camera calibration matrix; ∘ determining a first column of the camera calibration matrix based on the obtained focus of expansion points; ∘ determining a third column of the camera calibration matrix based on the obtained plane normal vectors; ∘ determining a second column of the camera calibration matrix corresponding to the cross-product of the first and the third column of the camera calibration matrix; - calibrating the camera using the obtained camera calibration matrix. <EOS>