主权项 |
1. A method for detecting a mounting posture of an in-vehicle camera, in which the in-vehicle camera is mounted to the vehicle such that a specific part of the vehicle is included in an imaging range, and a picked-up image is received from the in-vehicle camera so as to determine whether or not a mounting posture of the in-vehicle camera is proper, the method comprising:
an image input step of receiving the picked-up image; a distortion correction step correcting distortion of the received picked-up image; a vertical line detection step of detecting a vertical line relative to a road surface, from the picked-up image that has been subjected to distortion correction; a vanishing point calculation step of calculating a vanishing point of a group of the detected vertical lines; a roll angle calculation step of calculating, as a roll angle of the in-vehicle camera, a rotation angle around a Z axis of the in-vehicle camera, in a case where the calculated vanishing point of the group of vertical lines overlaps a center line of the image relative to an X direction; a pitch angle calculation step of calculating, as a pitch angle of the in-vehicle camera, a rotation angle around an X axis of the in-vehicle camera, in a case where the calculated vanishing point of the group of vertical lines corresponds to infinity; a reference line calculation step of detecting a boundary line between the specific part and the road surface from the picked-up image that has been subjected to the distortion correction, and calculating a reference line of the vehicle on the basis of the detected boundary line; and a yaw angle calculation step of calculating, as a yaw angle of the in-vehicle camera, a rotation angle around a Y axis of the in-vehicle camera, in a case where the calculated reference line of the vehicle is parallel to an image X axis, wherein the roll angle of the in-vehicle camera, the pitch angle of the in-vehicle camera, and the yaw angle of the in-vehicle camera are outputted as a mounting posture of the in-vehicle camera. |