Indoor navigation for micro aerial vehicles (MAVs) is challenging in GPS signal-obstructed indoor corridor environments. Position and heading estimation for a MAV is required to navigate without colliding with obstacles. The connected components algorithm and k-means clustering algorithm have been integrated for line and vanishing point detection in the corridor image frames to estimate the position and heading of the MAV. The position of the vanishing point indicates the position of the MAV (centre, left or right) in the corridor. Furthermore, the Euclidean distance between the image centre and mid-pixel coordinates at the last row of the image and the detected vanishing point pixel coordinates in the successive corridor image frames are used to compute the heading of the MAV. When the MAV deviates from the corridor centre, the position and heading measurement can send a suitable control signal to the MAV and align the MAV at the centre of the corridor. When compared with a grid-based vanishing point detection method heading accuracy of ±1⋅5°, the k-means clustering-based vanishing point detection is suitable for real-time heading measurement for indoor MAVs with an accuracy of ±0⋅5°.