An onboard camera automatic calibration apparatus comprising: a camera provided on a vehicle to obtain multiple images of surroundings of the vehicle; a motion vector calculation unit configured to determine motion vectors among the multiple images obtained by the camera; a road surface point selection unit configured to select points not less than three on a road surface in a predetermined image among the multiple images and select multiple combinations of two points from among the points not less than three on the road surface; an amount-of-rotation-around-Z-axis calculation unit configured to determine, in a camera coordinate system with an optical axis as a Z axis, an amount of rotation around the Z axis such that the road surface is parallel to an X axis, based on the multiple combinations of the two points selection unit and motion vectors each corresponding to each point of the multiple combinations of the two points; and a coordinate rotation correction unit configured to perform rotation correction around the Z axis for the images obtained by the camera based on the amount of rotation around the Z axis determined by the amount-of-rotation-around-Z-axis calculation unit, wherein the apparatus further comprises: a straight travel judgment unit configured to judge whether the vehicle is travelling straight or not based on the motion vectors, and wherein: the amount-of-rotation-around-Z-axis calculation unit determines the amount of rotation around the Z axis when the straight travel judgment unit judges that the vehicle is travelling straight, and the coordinate rotation correction unit performs the rotation correction around the Z axis for the images when the straight travel judgment unit judges that the vehicle is travelling straight. a camera provided on a vehicle to obtain multiple images of surroundings of the vehicle; a motion vector calculation unit configured to determine motion vectors among the multiple images obtained by the camera; a road surface point selection unit configured to select points not less than three on a road surface in a predetermined image among the multiple images and select multiple combinations of two points from among the points not less than three on the road surface; an amount-of-rotation-around-Z-axis calculation unit configured to determine, in a camera coordinate system with an optical axis as a Z axis, an amount of rotation around the Z axis such that the road surface is parallel to an X axis, based on the multiple combinations of the two points selection unit and motion vectors each corresponding to each point of the multiple combinations of the two points; and a coordinate rotation correction unit configured to perform rotation correction around the Z axis for the images obtained by the camera based on the amount of rotation around the Z axis determined by the amount-of-rotation-around-Z-axis calculation unit, wherein the apparatus further comprises: a straight travel judgment unit configured to judge whether the vehicle is travelling straight or not based on the motion vectors, and wherein: the amount-of-rotation-around-Z-axis calculation unit determines the amount of rotation around the Z axis when the straight travel judgment unit judges that the vehicle is travelling straight, and the coordinate rotation correction unit performs the rotation correction around the Z axis for the images when the straight travel judgment unit judges that the vehicle is travelling straight. a straight travel judgment unit configured to judge whether the vehicle is travelling straight or not based on the motion vectors, and wherein: the amount-of-rotation-around-Z-axis calculation unit determines the amount of rotation around the Z axis when the straight travel judgment unit judges that the vehicle is travelling straight, and the coordinate rotation correction unit performs the rotation correction around the Z axis for the images when the straight travel judgment unit judges that the vehicle is travelling straight. the amount-of-rotation-around-Z-axis calculation unit determines the amount of rotation around the Z axis when the straight travel judgment unit judges that the vehicle is travelling straight, and the coordinate rotation correction unit performs the rotation correction around the Z axis for the images when the straight travel judgment unit judges that the vehicle is travelling straight.