To satisfy the demand for automatic roadway drivage in mines, a real-time body pose detection system is proposed for the mine-used boom-type roadheader. Utilizing cross lasers and laser targets as information sources, this system first establishes a mathematical model to describe the machine position in space and realizes the precise localization of reference points on targets via the improved Retinex adaptive image enhancement algorithm and maximum wavelet transform module algorithm. It then sets up the machine body position calculating model and makes use of the space matrix transformation method to obtain the yaw, pitch, roll angles, and horizontal and vertical deviations of the roadheader, finally fulfilling the automatic machine pose detection in real time. Based on the preceding theoretical analysis, an experimental platform is built up in laboratory conditions for the purpose of simulating pose changes of the machine inside the tunnel and automatically detecting its position. The experimental results show that the measurement accuracy of angles is within 0.16 deg and the detection precision of displacements is higher than 10 mm, which can satisfy requirements of automatic, precise, and real-time positioning for the roadheader during the process of tunnel construction.