The invention provides an IMU (
inertial measurement unit) and TOF (
time of flight)-based rapid trapezoidal adjustment method and device and a medium thereof, and the method comprises the following steps: step 1, detecting the attitude change of projection equipment in real time by using an
accelerometer and a
gyroscope built in an IMU module, including a
pitch angle
pitch and a roll angle roll; by combining the
accelerometer and the
gyroscope which are arranged in the IMU module and the TOF sensor, the attitude change, including the
pitch angle, the
rolling angle and the
yaw angle, of the projection equipment can be detected in real time, so that the trapezoidal
distortion of a projected image is quickly and accurately adjusted, and meanwhile, the
pitch angle and the
rolling angle are calculated by using data of the
accelerometer, so that the accuracy of the projection equipment is improved. The
yaw angle is estimated through
gyroscope data in combination with a complementary filtering
algorithm, the
yaw angle is further accurately calculated in combination with TOF sensor data, the accuracy of attitude sensing is improved, rapid and accurate trapezoidal adjustment is achieved, the
projection display quality and user experience are remarkably improved, and the method has the advantages of being low in TOF requirement, low in cost, rapid and accurate in following, high in precision and the like. And the use experience is good.