| Aiming at the problem of realizing real-time automatic detection of the tilt angle of the cylindrical weighing sensor installed under the truck scale platform,this paper proposes a method for measuring the verticality of the cylinder objects by combining electronic measurement with computer vision.The cylindrical weighing sensor is taken as the cylindrical target,and the tilt angle of the cylindrical weighing sensor is the verticality of the cylinder objects.The specific work includes the following aspects.Aiming at the problem of measuring the tilt angle of the cylindrical weighing sensor,a method of measuring using a distance sensor is proposed.Since the cylindrical weighing sensor is located in a narrow and hidden space,four identical distance sensors are arranged equidistantly around the cylindrical weighing sensor.The signal output of the distance sensor is obtained through the signal collector,the mathematical model between the specific tilt angle of the cylindrical weighing sensor and the signal output of the distance sensor is established,and the tilt angle of the cylindrical weighing sensor is calculated using the signal output of the distance sensor.In order to establish a mathematical model between the verticality of the cylinder objects and the output signal quantity of the distance sensor,this paper proposes a method for measuring the verticality of the cylinder objects with monocular vision and single line structured light as well as with monocular vision and double line structured light.For the ellipse fitting problem,two methods,ellipse fitting based on all feature points on the light bar and ellipse fitting based on the centerline of the light bar,are used for experimental comparison.In this paper,we propose a method to calculate the verticality of the cylinder objects based on a single line structured light using the proportional relationship between the long and short axes of the ellipse,by obtaining the long and short axes of the ellipse through the ellipse equation,and calculating the verticality of the cylinder objects using the inverse cosine of the half-short axis over the half-long axis;we also propose a method to calculate the verticality of the cylinder objects based on a two-line structured light using two ellipse center points,according to the position of the two ellipse center points on the cylinder The angle formed by the distance between the column axis of the cylinder and the two structured light planes is calculated as the verticality of the cylinder objects based on the position of the two elliptical center points on the column axis of the cylinder.The experimental results show that the ellipse fitting method based on the center line of the light strip has a great improvement in accuracy compared with the ellipse fitting method directly using all the feature points on the light strip;The method proposed in this paper to calculate the verticality of the cylinder objects based on two ellipse center points using a two-line structured light is more accurate than the method based on the major and minor axes of the ellipse using a single line structured light;The proposed mathematical modeling method determines the optimal model between the output signal of the range sensor and the verticality of the cylinder objects.This method can be applied to the realtime automatic detection of the tilt angle of the cylindrical weighing sensor,and has certain practical application value. |