A direction deviation feedback control method based on matching of feature points of a hook tongue

CN122948858APending Publication Date: 2026-10-20TIANJIN SHICHUANG MASCH MFG CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611314114.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0005]为此,本发明提供一种基于钩舌特征点匹配的方向偏差反馈控制方法,用以克服现有技术中仅针对钩舌销故障进行静态图像识别,缺乏对钩舌本体方向偏差的动态检测与反馈控制能力,且未涉及运动自适应采集及空间误差补偿机制的问题

Benefits of technology

[0016]与现有技术相比,本发明的有益效果在于,本实施例通过融合运动速度、运动加速度与加速度变化率的多维运动状态感知,实现了钩舌到达采集工位时机的精准预测与自适应触发,有效克服了传统固定位置触发方式因速度波动导致的图像采集位置偏移问题;通过引入速度波动峰值预测及加速度修正机制,使图像采集装置能够在钩舌运动速度最平稳的时刻完成触发,从源头抑制了运动模糊的产生;同时,通过建立曝光时间与运动速度的动态关联机制并设定清晰度梯度阈值约束下的安全曝光边界,确保在不同运动速度下均能采集到清晰度满足要求的钩舌图像,显著提升了动态工况下图像采集的可靠性和适应性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention relates to the field of image processing technology, and in particular to a directional deviation feedback control method based on hook tongue feature point matching. The method includes: acquiring the motion state parameters of the hook tongue and predicting the timing of the hook tongue reaching the acquisition station; triggering an image acquisition device to acquire image data and determining the optimal acquisition time based on the image features of the hook tongue contour region; extracting feature regions and evaluating stability of the acquired image data, and selecting the optimal feature matching region; extracting feature points within this region, registering and comparing them with the hook tongue standard model, and calculating the directional deviation of the hook tongue's current pose; acquiring spatial transformation errors to compensate for the directional deviation, obtaining the true directional deviation; and generating control commands based on the true directional deviation to drive the actuator for correction control. This invention achieves high-precision pose deviation feedback control in the dynamic movement of the hook tongue by integrating motion state prediction, dynamic image quality evaluation, and real-time spatial error compensation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a directional deviation feedback control method based on hook tongue feature point matching. Background Technology

[0002] In the manufacturing and maintenance of railway freight car couplers, the coupler tongue, as a critical load-bearing component, directly affects train operation safety due to its machining accuracy and assembly quality. Current technologies typically employ manual visual inspection or machine vision inspection based on fixed templates to control directional deviations during coupler tongue machining or assembly. However, the coupler tongue is in motion during inspection or machining. Traditional image acquisition methods, which use fixed-position triggering for photography, cannot adapt to fluctuations in the coupler tongue's movement speed, easily leading to motion blur or the coupler tongue deviating from the center of the field of view, affecting the accuracy of subsequent feature extraction and pose calculation. Furthermore, the coupler tongue surface often contains interference factors such as oil stains, rust, and uneven lighting. Fixed feature point matching methods are prone to mismatches in these interference areas, resulting in distorted directional deviation calculations. Existing methods also lack a dynamic compensation mechanism for the spatial transformation errors inherent in the vision measurement system itself. Accumulated errors introduced by factors such as temperature drift and mechanical vibration after long-term system operation cannot be effectively eliminated, further reducing the long-term stability and reliability of directional deviation feedback control.

[0003] Chinese Patent Publication No. CN112418323B discloses a method for detecting railway freight car coupler pin faults based on image processing. This method addresses the problem of low accuracy in manually checking for missing or broken coupler pins. The invention retrieves corresponding template images based on the coupler type of two adjacent cars; preprocesses the image of the coupler coupling area and matches and corrects the preprocessed image with the retrieved template image to obtain an initial identification area image for the coupler pin; based on the contour features of the initial identification area image, two images of the coupler pin fault areas to be identified are obtained; the presence of a pin hole in each fault area image is determined. If yes, a fault is identified; if no, an SVM separator model is used to determine whether the coupler pin in the fault area image is broken, thus completing the fault detection. This method is used for detecting coupler pin faults.

[0004] Therefore, the existing technology has the following problems: It only performs static image recognition for hook tongue pin faults, lacks the ability to dynamically detect and control the directional deviation of the hook tongue body, and does not involve motion adaptive acquisition and spatial error compensation mechanisms. Summary of the Invention

[0005] To address this, the present invention provides a directional deviation feedback control method based on hook tongue feature point matching, which overcomes the problems of existing technologies that only perform static image recognition for hook tongue pin faults, lack dynamic detection and feedback control capabilities for hook tongue body directional deviations, and do not involve motion adaptive acquisition and spatial error compensation mechanisms.

[0006] To achieve the above objectives, the present invention provides a directional deviation feedback control method based on hook tongue feature point matching, comprising: Step S1: Obtain the motion state parameters of the hook tongue, predict the timing of the hook tongue reaching the acquisition station based on the motion state parameters, and determine the acquisition parameters of the image acquisition device. Step S2: Based on the acquisition parameters, trigger the image acquisition device to acquire image data of the hook tongue, and determine the optimal acquisition time according to the image features of the hook tongue contour area during the acquisition process; Step S3: Extract feature regions from the acquired image data, evaluate the stability of the extracted feature regions, and select the optimal feature matching region for the current frame based on the stability evaluation results. Step S4: Extract feature points within the optimal feature matching region, register and compare the extracted feature points with the hook tongue standard model, and calculate the directional deviation of the hook tongue's current pose relative to the theoretical pose. Step S5: Obtain the current spatial conversion error, and use the spatial conversion error to compensate for the direction deviation to obtain the corrected true direction deviation; Step S6: Generate control commands based on the actual direction deviation to drive the actuator to correct the movement direction of the hook tongue.

[0007] Further, in step S1, the timing of the hook tongue reaching the acquisition station is predicted based on the motion state parameters, and the acquisition parameters of the image acquisition device are determined, including: Step S11: Obtain the motion speed, motion acceleration, and rate of change of acceleration of the hook tongue from the motion state parameters; Step S12: Determine the moment when the acceleration passes zero based on the trend of the sign change of the acceleration, use the moment when the acceleration passes zero as the reference moment when the speed tends to be stable, and use the acceleration change rate to correct the reference moment, and use the corrected reference moment as the time to predict the arrival at the acquisition station. Step S13: Determine the trigger time of the image acquisition device based on the predicted arrival time at the acquisition station; Step S14: Determine the exposure time of the image acquisition device based on the motion speed.

[0008] Further, in step S2, the optimal acquisition time is determined based on the image features of the hook tongue contour region, including: Step S21: After the hook tongue enters the preset acquisition field of view, multiple frames of dynamic images of the hook tongue are continuously acquired at a predetermined sampling frequency, and the motion speed value and motion acceleration value of the hook tongue are recorded synchronously at the acquisition time of each frame image. Step S22: Extract the subpixel positioning information interval width, effective texture area ratio, and contour matching error value between the imaging contour and the standard projection contour of the hook tongue contour region for each frame of dynamic image; the contour matching error value is the inverse measure of shape fidelity between the imaging contour and the standard projection contour. Step S23: Calculate the local feature density of each frame image using the width of the sub-pixel positioning information interval and the area ratio of the effective texture region; calculate the local deformation severity of each frame image using the contour matching error value and the motion acceleration value, wherein the local deformation severity is positively correlated with both the contour matching error value and the motion acceleration value; generate the acquisition effectiveness coefficient of each frame image based on the ratio of the local feature density to the local deformation severity. Step S24: Among all frames in which the acquisition effectiveness coefficient reaches the preset effectiveness threshold, select the acquisition time corresponding to the lowest motion speed value as the optimal acquisition time, and output the image data of that frame.

[0009] Further, in step S23, the local feature density of each frame image is calculated, including: The number of pixels within the hook tongue contour region whose subpixel positioning information interval width is less than a preset width threshold is determined, and the product of the number of pixels and the area ratio of the effective texture region is used as the local feature density.

[0010] Further, in step S23, the local deformation severity of each frame image is calculated, including: Calculate the contour matching error value between the hook tongue imaging contour and the standard projection contour, use the sum of the contour matching error value and a preset positive coefficient as the deformation penalty factor, and use the product of the deformation penalty factor and the motion acceleration value as the local deformation severity; or, use a monotonically increasing function of the contour matching error value as the deformation penalty factor, and use the product of the deformation penalty factor and the motion acceleration value as the local deformation severity.

[0011] Further, in step S3, the optimal feature matching region of the current frame is selected based on the stability evaluation results, including: Step S31: After preprocessing the acquired image data, locate multiple candidate feature regions of the hook tongue in the image based on the geometric prior information of the hook tongue. Step S32: Perform stability evaluation on each candidate feature region and generate stability characterization value for each candidate feature region; Step S33: Sort the stability characterization values ​​of all candidate feature regions in descending order; Step S34: Select the candidate feature region with the highest stability characterization value as the optimal feature matching region for the current frame.

[0012] Further, in step S32, stability evaluation is performed on each candidate feature region to generate a stability characterization value for each candidate feature region, including: Extract the feature point distribution of each candidate feature region in the current frame and the previous frame respectively, and calculate the feature point reprojection error sequence of the candidate feature regions; Calculate the temporal stability factor of the candidate feature region based on the feature point reprojection error sequence; The texture enrichment factor of the candidate feature region is calculated based on the local gray-level entropy value, edge pixel ratio, and local contrast of the candidate feature region. Extract the edge contour of the candidate feature region, calculate the curvature change entropy value of the edge contour, and use the reciprocal of the curvature change entropy value as the geometric complexity factor of the candidate feature region. The temporal stability factor, the texture enrichment factor, and the geometric complexity factor are combined to generate a stability characterization value for the candidate feature region.

[0013] Further, in step S4, the directional deviation of the hook tongue's current pose relative to the theoretical pose is calculated, including: Step S41: Extract several feature points of the hook tongue within the optimal feature matching region to construct the measured feature point set of the current frame; Step S42: Obtain the theoretical feature point set in the standard model of the hook tongue that corresponds to the measured feature point set; Step S43: Spatial registration is performed between the measured feature point set and the theoretical feature point set, and the spatial transformation matrix that minimizes the distance between the measured feature point set and the theoretical feature point set is calculated. Step S44: Extract the directional deviation of the current pose of the hook tongue relative to the theoretical pose from the spatial transformation matrix. The directional deviation includes linear displacement deviation in the spatial orthogonal direction and angular deflection deviation around the spatial orthogonal direction axis.

[0014] Further, in step S5, the spatial transformation error is used to compensate for the direction deviation to obtain the corrected true direction deviation, including: The spatial transformation error of the image acquisition device at the current moment is obtained, and the spatial transformation error includes coordinate rotation error and coordinate translation error; Determine whether the spatial transformation error exceeds a preset error tolerance; If the spatial conversion error does not exceed the preset error tolerance, the direction deviation and the spatial conversion error are transformed inversely to cancel the interference component of the spatial conversion error on the direction deviation, and the corrected true direction deviation is obtained. If the spatial conversion error exceeds the preset error tolerance, a system calibration prompt signal is generated, the actuator correction control is paused, and compensation is re-executed after the spatial conversion error returns to within the preset error tolerance.

[0015] Further, in step S6, a control command is generated based on the actual direction deviation, including: The true directional deviation is decomposed into displacement deviation components along each coordinate axis and angular deviation components around each coordinate axis. Based on the displacement deviation component, the angle deviation component, and the preset control mapping relationship of each motion axis of the actuator, the position compensation amount and attitude compensation amount of each motion axis are generated. The position compensation and attitude compensation of each motion axis are combined into a multi-axis collaborative control command to drive the actuator to perform correction control on the movement direction of the hook tongue.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: This embodiment achieves accurate prediction and adaptive triggering of the timing of the hook tongue arriving at the acquisition station by integrating multi-dimensional motion state perception of motion speed, motion acceleration, and acceleration change rate, effectively overcoming the problem of image acquisition position offset caused by speed fluctuations in the traditional fixed-position triggering method; by introducing a speed fluctuation peak prediction and acceleration correction mechanism, the image acquisition device can complete the triggering at the moment when the hook tongue's motion speed is most stable, suppressing the generation of motion blur from the source; at the same time, by establishing a dynamic correlation mechanism between exposure time and motion speed and setting a safe exposure boundary under the sharpness gradient threshold constraint, it is ensured that hook tongue images with the required sharpness can be acquired at different motion speeds, significantly improving the reliability and adaptability of image acquisition under dynamic working conditions.

[0017] Furthermore, this embodiment achieves adaptive determination of the optimal acquisition time through continuous acquisition of multi-frame dynamic images and an inter-frame optimization mechanism. This adapts to the random fluctuations in the hook tongue's movement speed, ensuring that the acquired images are always in the best imaging state. By introducing multi-dimensional evaluation parameters such as sub-pixel positioning information interval width, effective texture area ratio, and shape fidelity, the acquisition quality of each frame is comprehensively evaluated from three dimensions: positioning accuracy, texture richness, and contour fidelity, overcoming the one-sidedness of single-index evaluation. By constructing the ratio of local feature density to local deformation severity as the acquisition effectiveness coefficient, a trade-off mechanism between effective information content and deformation interference is established, giving the selection of the optimal frame clear physical meaning and improving the scientificity and reliability of the optimal acquisition time determination.

[0018] Furthermore, this embodiment achieves comprehensive screening of candidate feature regions from three dimensions: positioning accuracy stability, texture information richness, and contour structure uniqueness through a comprehensive evaluation of temporal stability factor, texture richness factor, and geometric complexity factor. This effectively eliminates the influence of interference factors such as oil stains, rust, and uneven lighting, making the selection of the optimal feature region have clear multi-dimensional judgment criteria, and significantly improving the anti-interference ability of feature matching and the reliability of pose calculation.

[0019] Furthermore, this embodiment achieves precise quantification of the deviation between the current pose and the theoretical pose of the hook tongue by spatially registering the measured feature point set with the theoretical feature point set and extracting the six-degree-of-freedom direction deviation using the spatial transformation matrix obtained from the registration. This provides accurate deviation input for subsequent correction control. By using the iterative nearest point algorithm or singular value decomposition algorithm for registration, it can adaptively solve the pose deviation under different hook tongue models and different posture conditions, and has wide applicability and stability.

[0020] Furthermore, this embodiment achieves real-time dynamic monitoring of spatial transformation error of the vision measurement system by setting a standard calibration reference and periodically collecting its spatial feature data, effectively eliminating system drift caused by factors such as environmental temperature changes, mechanical vibration, and structural thermal deformation; by performing an inverse transformation operation between the directional deviation and the spatial transformation error, the compensated directional deviation truly reflects the pose error of the hook tongue in the theoretical world coordinate system, avoiding miscompensation caused by the offset of the vision measurement coordinate system itself; by setting a preset error tolerance and pausing correction and triggering calibration when the error exceeds the limit, erroneous correction is prevented when the system is out of alignment, significantly improving the long-term stability and safety of feedback control.

[0021] Furthermore, this embodiment decomposes the true direction deviation into independent displacement and angular deviation components, achieving refined processing of the six-degree-of-freedom deviation. Each component is decoupled, facilitating precise compensation separately. By establishing a control mapping relationship between the deviation components and the motion axes of the actuator, the abstract pose deviation is transformed into specific motion commands for each motion axis of the actuator, achieving seamless integration from deviation detection to motion control. By synthesizing the compensation amounts of each motion axis into multi-axis collaborative control commands, synchronous and coordinated motion between the motion axes of the actuator is ensured, avoiding trajectory deviation and interference problems caused by independent single-axis motion. By setting allowable deviation ranges and timeout judgment mechanisms, the accuracy and reliability of the correction control are guaranteed, improving the system's safety and stability. Attached Figure Description

[0022] Figure 1 This is a flowchart of the directional deviation feedback control method based on hook tongue feature point matching in this embodiment; Figure 2 This is a flowchart illustrating the prediction of the timing of the hook tongue reaching the acquisition station in the directional deviation feedback control method based on hook tongue feature point matching in this embodiment. Figure 3 This is a flowchart illustrating the determination of the optimal acquisition time in the directional deviation feedback control method based on hook tongue feature point matching in this embodiment. Detailed Implementation

[0023] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0024] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0025] Please see Figures 1-3 As shown, Figure 1 This is a flowchart of the directional deviation feedback control method based on hook tongue feature point matching in this embodiment; Figure 2 This is a flowchart illustrating the prediction of the timing of the hook tongue reaching the acquisition station in the directional deviation feedback control method based on hook tongue feature point matching in this embodiment. Figure 3 This is a flowchart illustrating the determination of the optimal acquisition time in the directional deviation feedback control method based on hook tongue feature point matching in this embodiment.

[0026] This embodiment provides a direction deviation feedback control method based on hook tongue feature point matching, including: Step S1: Obtain the motion state parameters of the hook tongue, predict the timing of the hook tongue reaching the acquisition station based on the motion state parameters, and determine the acquisition parameters of the image acquisition device. Step S2: Based on the acquisition parameters, trigger the image acquisition device to acquire image data of the hook tongue, and determine the optimal acquisition time according to the image features of the hook tongue contour area during the acquisition process; Step S3: Extract feature regions from the acquired image data, evaluate the stability of the extracted feature regions, and select the optimal feature matching region for the current frame based on the stability evaluation results. Step S4: Extract feature points within the optimal feature matching region, register and compare the extracted feature points with the hook tongue standard model, and calculate the directional deviation of the hook tongue's current pose relative to the theoretical pose. Step S5: Obtain the current spatial conversion error, and use the spatial conversion error to compensate for the direction deviation to obtain the corrected true direction deviation; Step S6: Generate control commands based on the actual direction deviation to drive the actuator to correct the movement direction of the hook tongue.

[0027] In this embodiment, the motion state parameters include, but are not limited to, the instantaneous speed, acceleration, rate of change of acceleration, direction of motion, and real-time distance between the current position of the hook tongue and the acquisition station during the conveying or gripping process; the image acquisition device includes, but is not limited to, any one or more combinations of area scan cameras, line scan cameras, event cameras, or laser contour scanners. The image acquisition device is equipped with an image sensor with a global shutter or rolling shutter and has an active light source module for auxiliary lighting; the acquisition parameters include, but are not limited to, the trigger time, exposure time, gain value, aperture size, and the activation sequence and brightness of the lighting source of the image acquisition device. The actuator includes, but is not limited to, any one of a multi-axis robotic arm, a six-degree-of-freedom motion platform, a servo-driven positioning device, or a pneumatic gripping device.

[0028] In this embodiment, as the hook tongue moves with the conveying device or robotic arm, the speed of the hook tongue is collected in real time by a speed sensor or encoder installed on the hook tongue's movement path. Simultaneously, the motion acceleration is obtained by differentiating the motion speed, and the rate of change of acceleration is obtained by differentiating the motion acceleration. Alternatively, multiple position sensors installed on the hook tongue's movement path record the time when the hook tongue passes each position sensor sequentially. The average motion speed of the hook tongue in each interval is calculated based on the fixed distance between adjacent position sensors and the time difference between them. Then, the motion acceleration and the rate of change of acceleration are obtained by differential calculation of the average motion speed in each interval.

[0029] When a speed sensor is used, it is a rotary encoder mounted on the drive shaft of the conveyor. The instantaneous speed, acceleration, and rate of change of acceleration of the hook tongue are determined by collecting the frequency and phase changes of the encoder pulse signal. When a position sensor is used, it is a photoelectric sensor or proximity switch arranged at intervals along the movement path of the hook tongue. The speed and acceleration changes of the hook tongue in different movement ranges are calculated by recording the time sequence of the hook tongue triggering each sensor.

[0030] It should be noted that the dimensions of all the calculation parameters involved in this method are normalized or dimensionless during multiplication or division to ensure that the calculation results only represent the relative contribution weight of each factor to the target evaluation index, without assigning them specific physical dimensional meanings. Specifically, each individual parameter involved in multiplication and division operations, including but not limited to the width of the subpixel positioning information interval, the proportion of the effective texture region area, the contour matching error value, the motion acceleration value, the reprojection error value, the local grayscale entropy value, the proportion of edge pixels, the local contrast, the curvature change entropy value, and the displacement deviation components and angular deviation components in each coordinate axis direction, are first mapped to a unified numerical range through linear normalization or standard deviation normalization before multiplication and division operations, or transformed into dimensionless relative indicators through ratio transformation. This ensures that the results of each product term, ratio term, and weighted sum term participate in subsequent evaluation and judgment in the form of dimensionless coefficients, avoiding calculation distortion caused by inconsistent dimensions, and ensuring that the method can maintain stable and consistent evaluation and control performance under different working conditions and parameter inputs of different magnitudes.

[0031] Specifically, in step S1, the timing of the hook tongue arriving at the acquisition station is predicted based on the motion state parameters, and the acquisition parameters of the image acquisition device are determined, including: Step S11: Obtain the motion speed, motion acceleration, and rate of change of acceleration of the hook tongue from the motion state parameters; Step S12: Determine the moment when the acceleration passes zero based on the trend of the sign change of the acceleration, use the moment when the acceleration passes zero as the reference moment when the speed tends to be stable, and use the acceleration change rate to correct the reference moment, and use the corrected reference moment as the time to predict the arrival at the acquisition station. Step S13: Determine the trigger time of the image acquisition device based on the predicted arrival time at the acquisition station; Step S14: Determine the exposure time of the image acquisition device based on the motion speed.

[0032] In this embodiment, the movement speed of the hook tongue is acquired in real time by a rotary encoder mounted on the drive shaft of the conveying device. The frequency of the pulse signal output by the encoder is directly proportional to the rotational speed of the drive shaft. The signal processing unit calculates the instantaneous rotational speed of the drive shaft by measuring the number of pulse signals per unit time, and then converts the rotational speed of the drive shaft into the linear velocity of the hook tongue, i.e., the current movement speed value of the hook tongue, based on the transmission ratio between the drive shaft and the conveying mechanism. The motion acceleration is obtained by performing time difference calculation on the velocity value, and the rate of change of acceleration is obtained by performing time difference calculation on the acceleration value.

[0033] First, the current distance between the hook tongue and the center point of the acquisition field of view is obtained. This distance is acquired in real time by a distance sensor positioned in front of the acquisition station. In another implementation, this distance can also be indirectly obtained by a photoelectric sensor positioned at the entrance of the acquisition field of view: when the hook tongue passes the photoelectric sensor, a trigger signal is generated and the trigger time is recorded. The displacement of the hook tongue from the trigger position to the current position is obtained by multiplying the time difference between the current time and the trigger time by the current movement speed. Then, this displacement is subtracted from the fixed distance from the photoelectric sensor to the center point of the acquisition field of view to obtain the current distance value.

[0034] Then, based on the current distance and speed, the base time required for the hook to move at a constant speed to the center of the acquisition field of view is calculated. Based on this, the zero-crossing moment when the acceleration changes from positive to negative or vice versa is determined according to the trend of the acceleration sign. This zero-crossing moment corresponds to the extreme point of the velocity, i.e., the moment when the velocity is most stable. Using this zero-crossing moment as the reference moment, the reference moment is then corrected according to the rate of change of acceleration: when the rate of change of acceleration is positive and large, it indicates that the turning point in the velocity trend will occur earlier, and the reference moment needs to be advanced appropriately; when the rate of change of acceleration is negative and large, it indicates that the turning point in the velocity trend will occur later, and the reference moment needs to be delayed appropriately. The corrected moment is the predicted optimal time to reach the acquisition position, at which the hook's speed is most stable, and the motion blur affecting image acquisition is minimal. The magnitude of the correction is positively correlated with the product of the absolute value of the rate of change of acceleration and the base time. After correction for the rate of change of acceleration, the preliminary predicted moment is obtained.

[0035] A secondary correction is performed on the initial prediction time using motion acceleration. When motion acceleration is positive, it indicates that the velocity is continuously increasing, and the peak velocity fluctuation will arrive earlier; the correction direction is to shift the prediction time forward. When motion acceleration is negative, it indicates that the velocity is continuously decreasing, and the peak velocity fluctuation will arrive later; the correction direction is to shift the prediction time backward. The magnitude of the correction is positively correlated with the absolute value of motion acceleration. The specific correction amount is obtained by multiplying the motion acceleration by a preset time scale constant, which is determined according to the system sampling period.

[0036] After secondary correction of motion acceleration, the final predicted arrival time at the acquisition station is obtained. During the acquisition of the aforementioned current distance value, the distance sensor can be a laser rangefinder or an ultrasonic rangefinder. The photoelectric sensor is positioned at the entrance of the acquisition field of view along the hook tongue's movement path. The fixed distance between the photoelectric sensor and the center point of the acquisition field of view is obtained through measurement and calibration during system installation, with a calibration accuracy of millimeters.

[0037] In this embodiment, the image acquisition device has an inherent response delay from receiving the trigger signal to completing image exposure and outputting image data. This response delay includes signal transmission delay, camera shutter opening delay, and exposure completion feedback delay. Therefore, the actual trigger time of the image acquisition device should be set before the predicted arrival time at the acquisition station, with the advance time equal to the aforementioned inherent response delay. This inherent response delay is obtained through calibration before the image acquisition device leaves the factory. The specific calibration method is as follows: a test trigger signal is sent to the image acquisition device, the time difference between the signal transmission time and the image data output time is recorded, and this is repeated multiple times, with the average value taken as the calibration value of the inherent response delay.

[0038] The exposure time is determined as follows: Using the exposure time at a reference speed as a reference, the greater the current motion speed relative to the reference speed, the shorter the exposure time; conversely, the smaller the current motion speed relative to the reference speed, the longer the exposure time. Specifically, a reference speed value and a corresponding reference exposure time are obtained beforehand through calibration. The reference speed value is the highest motion speed allowed by the system while meeting image sharpness requirements, and the reference exposure time is the exposure time used to achieve the preset image sharpness requirements under the reference speed conditions. When determining the current exposure time, the product of the reference speed value and the reference exposure time is used as a reference value. This reference value is divided by the current motion speed, and the result is taken as the initial exposure time.

[0039] After determining the initial exposure time, it must be limited to a preset safety range, i.e., compared with preset upper and lower limits. If the initial exposure time exceeds the upper limit, the upper limit is used as the actual exposure time; if the initial exposure time is lower than the lower limit, the lower limit is used as the actual exposure time; if the initial exposure time is between the upper and lower limits, the initial exposure time is used as the actual exposure time. The upper limit of the exposure time is determined as follows: with the hook tongue stationary, gradually increase the exposure time until the grayscale value of the brightest area on the hook tongue surface in the acquired image reaches 95% of the saturated grayscale value of the image sensor. Record this exposure time value, then multiply it by 80% to obtain the safety upper limit, providing a safety margin. The lower limit of the exposure time is determined as follows: under the system's maximum allowed movement speed, gradually decrease the exposure time until the average grayscale gradient amplitude of the hook tongue edge region in the acquired image drops to 10 / 12 of the preset sharpness gradient threshold. Record this exposure time value, then multiply it by 11 / 10 to obtain the safety lower limit, ensuring sufficient margin for edge sharpness. The aforementioned preset sharpness gradient threshold is determined as follows: multiple images of the hook tongue that are manually judged to be sharp under different lighting conditions and different movement speeds are collected, the gray-scale gradient amplitude of the hook tongue edge region in each image is calculated and its distribution is statistically analyzed, and 70% of the statistical distribution mean is used as the preset sharpness gradient threshold.

[0040] This embodiment achieves accurate prediction and adaptive triggering of the hook tongue's arrival at the acquisition station by integrating multi-dimensional motion state perception of motion speed, motion acceleration, and rate of change of acceleration. This effectively overcomes the problem of image acquisition position offset caused by speed fluctuations in traditional fixed-position triggering methods. By introducing a speed fluctuation peak prediction and acceleration correction mechanism, the image acquisition device can complete the triggering at the moment when the hook tongue's motion speed is most stable, suppressing motion blur from the source. At the same time, by establishing a dynamic correlation mechanism between exposure time and motion speed and setting a safe exposure boundary under the sharpness gradient threshold constraint, it ensures that hook tongue images with sufficient sharpness can be acquired at different motion speeds, significantly improving the reliability and adaptability of image acquisition under dynamic working conditions.

[0041] Specifically, in step S2, determining the optimal acquisition time based on the image features of the hook tongue contour region includes: Step S21: After the hook tongue enters the preset acquisition field of view, multiple frames of dynamic images of the hook tongue are continuously acquired at a predetermined sampling frequency, and the motion speed value and motion acceleration value of the hook tongue are recorded synchronously at the acquisition time of each frame image. Step S22: Extract the subpixel positioning information interval width, effective texture area ratio, and contour matching error value between the imaging contour and the standard projection contour of the hook tongue contour region for each frame of dynamic image; the contour matching error value is the inverse measure of shape fidelity between the imaging contour and the standard projection contour. Step S23: Calculate the local feature density of each frame image using the width of the sub-pixel positioning information interval and the area ratio of the effective texture region; calculate the local deformation severity of each frame image using the contour matching error value and the motion acceleration value, wherein the local deformation severity is positively correlated with both the contour matching error value and the motion acceleration value; generate the acquisition effectiveness coefficient of each frame image based on the ratio of the local feature density to the local deformation severity. Step S24: Among all frames in which the acquisition effectiveness coefficient reaches the preset effectiveness threshold, select the acquisition time corresponding to the lowest motion speed value as the optimal acquisition time, and output the image data of that frame.

[0042] Specifically, in step S23, the local feature density of each frame image is calculated, including: The number of pixels within the hook tongue contour region whose subpixel positioning information interval width is less than a preset width threshold is determined, and the product of the number of pixels and the area ratio of the effective texture region is used as the local feature density.

[0043] Specifically, in step S23, the local deformation severity of each frame image is calculated, including: Calculate the contour matching error value between the hook tongue imaging contour and the standard projection contour, use the sum of the contour matching error value and a preset positive coefficient as the deformation penalty factor, and use the product of the deformation penalty factor and the motion acceleration value as the local deformation severity; or, use a monotonically increasing function of the contour matching error value as the deformation penalty factor, and use the product of the deformation penalty factor and the motion acceleration value as the local deformation severity.

[0044] In this embodiment, the predetermined sampling frequency is adaptively set according to the hook tongue's movement speed. Specifically, when the hook tongue's movement speed is greater than a preset speed threshold, the sampling frequency is increased to ensure that a sufficient number of frame images can be acquired for subsequent optimization under high-speed movement conditions; when the hook tongue's movement speed is less than or equal to the preset speed threshold, the sampling frequency is decreased to reduce the amount of data. The preset speed threshold is determined as follows: during the system debugging phase, multiple frames of images are acquired at a normal sampling frequency. When the hook tongue's displacement between image frames exceeds five percent of the hook tongue's own size, it is determined that the sampling frequency is insufficient, and the critical speed value that meets this determination condition is used as the preset speed threshold.

[0045] For the subpixel positioning confidence interval width, a subpixel edge localization algorithm is first used to accurately locate the edges of the hook tongue contour region. This algorithm employs either a gray-moment-based subpixel edge detection method or an interpolation-based subpixel edge thinning method. During subpixel localization, each contour edge point is located within multiple sampling windows. The standard deviation of the localization results for each sampling window is calculated, and this standard deviation is multiplied by a preset confidence coefficient to obtain the subpixel positioning confidence interval width for that edge point. The average subpixel positioning confidence interval width of all edge points within the hook tongue contour region is then taken as the representation value of the subpixel positioning confidence interval width of the hook tongue contour region in that frame image.

[0046] To determine the effective texture area ratio, firstly, the local grayscale gradient magnitude of each pixel within the hook-tongue contour region is calculated. Pixels with gradient magnitudes exceeding a preset gradient threshold are marked as effective texture pixels. Then, the total number of effective texture pixels is counted, and the percentage of this total number to the total number of pixels in the hook-tongue contour region is used as the effective texture area ratio. The preset gradient threshold is determined as follows: multiple images of the hook-tongue surface are acquired, and the grayscale gradient distribution of the hook-tongue region in each image is calculated. Sixty percent of the median of the gradient distribution is used as the preset gradient threshold, which has an upper limit of thirty percent of the maximum grayscale value of the image sensor to prevent the threshold from being too high and resulting in too few effective texture pixels when the illumination is too strong.

[0047] For shape fidelity, the imaging contour of the hook tongue is first extracted, and then coarsely registered with the standard projection contour to ensure they are basically aligned in space. Next, the shortest distance from each point on the imaging contour to the standard projection contour is calculated, and these shortest distances are statistically processed, with the average value used as the contour matching error. After normalizing the contour matching error, the reciprocal of the normalized value is used as the shape fidelity; that is, the smaller the contour matching error, the higher the shape fidelity. The standard projection contour is the theoretical projection contour of the hook tongue standard model on the imaging plane of the image acquisition device. This theoretical projection contour is obtained through projection transformation based on the calibration parameters of the image acquisition device and the spatial orientation of the hook tongue standard model.

[0048] The physical meaning of local feature density is: within the hook tongue contour region, the number of effective texture pixels with sufficiently high positioning accuracy (the width of the sub-pixel positioning information interval is less than the preset width threshold), weighted by the proportion of the effective texture region area. The larger this value, the richer the high-quality feature points available for feature matching in the frame image. The preset width threshold is determined as follows: during the system debugging phase, feature point extraction and matching tests are performed on the same hook tongue image with different sub-pixel positioning accuracy thresholds. The matching accuracy under different threshold conditions is recorded, and the maximum sub-pixel positioning information interval width corresponding to a matching accuracy of 95% is selected as the preset width threshold.

[0049] The physical meaning of local deformation severity is: a comprehensive representation of the degree of contour deformation of the hook tongue due to its own movement or external vibration at the moment of acquisition, and the motion acceleration. The larger the value, the more severe the deformation of the image frame, and the less favorable it is for subsequent feature matching. In this embodiment, the local deformation severity is calculated as follows: first, a monotonically increasing function of the contour matching error value (e.g., the error value itself, the square of the error value, or the inverse of the sum of the error value and a preset positive coefficient) is used as the deformation penalty term. Then, the deformation penalty term is multiplied by the motion acceleration value to obtain the local deformation severity. The contour matching error value reflects the degree of spatial deviation of the hook tongue imaging contour from the theoretical contour. When the contour matching error value is large, it indicates that the hook tongue contour has undergone significant deformation due to movement or vibration. At this time, the deformation penalty term increases, the local deformation severity increases accordingly, and the acquisition effectiveness coefficient decreases, thereby effectively suppressing severely deformed images from being selected as the optimal frame. The motion acceleration value reflects the severity of the dynamic impact on the hook tongue at the moment of acquisition. The larger the value, the higher the local deformation severity. In this way, both the contour matching error value and the motion acceleration value are used as positive penalty terms in the calculation of the local deformation severity, ensuring that the validity coefficient can truly reflect the image acquisition quality.

[0050] The ratio of the local feature density to the local deformation severity has the physical meaning of the amount of effective feature information corresponding to a unit deformation severity. The larger this ratio, the more suitable the hook tongue image is as an input image for subsequent feature matching, as it possesses both rich effective feature information and is in a relatively stable deformation state at the acquisition time. The method for determining the preset effectiveness threshold is as follows: During the system debugging phase, the acquisition time of the same batch of hook tongue samples is optimized and subsequent feature matching tests are performed with different effectiveness thresholds. The feature matching success rate and pose calculation accuracy under different threshold conditions are recorded, and the effectiveness threshold-matching success rate curve and the effectiveness threshold-calculation accuracy curve are plotted. The minimum effectiveness coefficient corresponding to a matching success rate of 95% and a calculation accuracy that meets the system requirements is taken as the preset effectiveness threshold.

[0051] Among all frames whose acquisition validity coefficient reaches a preset validity threshold, the acquisition time corresponding to the lowest motion velocity value is selected as the optimal acquisition time. The technical logic of this step is as follows: achieving the acquisition validity coefficient ensures the richness of basic image features and deformation stability. On this basis, selecting the frame with the lowest motion velocity can minimize the risk of motion blur and ensure that the acquired image has the highest edge sharpness, thereby providing the optimal image input quality for subsequent feature extraction and pose calculation.

[0052] This embodiment achieves adaptive determination of the optimal acquisition time through continuous acquisition of multi-frame dynamic images and an inter-frame optimization mechanism. This adapts to the random fluctuations in the hook tongue's movement speed, ensuring that the acquired images are always in the best imaging state. By introducing multi-dimensional evaluation parameters such as sub-pixel positioning information interval width, effective texture area ratio, and shape fidelity, the acquisition quality of each frame is comprehensively evaluated from three dimensions: positioning accuracy, texture richness, and contour fidelity, overcoming the one-sidedness of single-index evaluation. By constructing the ratio of local feature density to local deformation severity as the acquisition effectiveness coefficient, a trade-off mechanism between effective information and deformation interference is established, giving the selection of the optimal frame a clear physical meaning and improving the scientificity and reliability of the optimal acquisition time determination.

[0053] Specifically, in step S3, the optimal feature matching region of the current frame is selected based on the stability evaluation results, including: Step S31: After preprocessing the acquired image data, locate multiple candidate feature regions of the hook tongue in the image based on the geometric prior information of the hook tongue. Step S32: Perform stability evaluation on each candidate feature region and generate stability characterization value for each candidate feature region; Step S33: Sort the stability characterization values ​​of all candidate feature regions in descending order; Step S34: Select the candidate feature region with the highest stability characterization value as the optimal feature matching region for the current frame.

[0054] Specifically, in step S32, stability evaluation is performed on each candidate feature region to generate a stability characterization value for each candidate feature region, including: Extract the feature point distribution of each candidate feature region in the current frame and the previous frame respectively, and calculate the feature point reprojection error sequence of the candidate feature regions; Calculate the temporal stability factor of the candidate feature region based on the feature point reprojection error sequence; The texture enrichment factor of the candidate feature region is calculated based on the local gray-level entropy value, edge pixel ratio, and local contrast of the candidate feature region. Extract the edge contour of the candidate feature region, calculate the curvature change entropy value of the edge contour, and use the reciprocal of the curvature change entropy value as the geometric complexity factor of the candidate feature region. The temporal stability factor, the texture enrichment factor, and the geometric complexity factor are combined to generate a stability characterization value for the candidate feature region.

[0055] In this embodiment, the preprocessing includes at least one or more of the following: grayscale conversion, filtering and denoising, and contrast enhancement. The grayscale conversion converts the acquired color image into a grayscale image. The filtering and denoising uses median filtering or Gaussian filtering to eliminate noise interference introduced during image acquisition. The contrast enhancement uses histogram equalization or adaptive histogram equalization to improve the problem of localized over-darkness or over-brightness on the hook tongue surface caused by uneven illumination.

[0056] The method of locating multiple candidate feature regions of the hook tongue in the image based on the geometric prior information of the hook tongue is as follows: Based on the geometric shape features of the hook tongue standard model, a position distribution template for each feature region of the hook tongue in the image is pre-established. This template records the relative positional relationship and approximate shape and size of the hook tongue pin hole edge region, hook tongue shoulder arc region, hook tongue tail side region, and hook tongue traction surface region within the overall hook tongue contour. In the acquired image, the overall position and orientation of the hook tongue are first determined using template matching or contour detection algorithms. Then, based on the overall position and orientation combined with the position distribution template, the possible location range of each candidate feature region in the image is predicted. Local search and precise localization are performed within this range to ultimately determine the precise location of each candidate feature region in the image.

[0057] The feature point reprojection error sequence is obtained as follows: First feature point set within the current frame's candidate feature region and second feature point set within the same candidate feature region of the previous frame are extracted respectively; feature point matching is performed between the first and second feature point sets to establish a feature point correspondence between the two frames; the inter-frame transformation matrix between the two frames is calculated based on the correspondence; the feature points of the previous frame are reprojected onto the current frame's coordinate system using the inter-frame transformation matrix to obtain reprojected feature points; the Euclidean distance between the reprojected feature points and the actual matched feature points is calculated, and this Euclidean distance is the reprojection error of the feature point; the reprojection errors of all matched feature points within the candidate feature region are statistically analyzed to form the feature point reprojection error sequence for the candidate feature region.

[0058] The temporal stability factor is calculated based on the feature point reprojection error sequence. Specifically, the mean and variance of the reprojection error sequence are calculated, and the reciprocal of the variance is used as the base value of the temporal stability factor. Simultaneously, the proportion of feature points with reprojection errors less than a preset error threshold is used as a stability ratio coefficient. The base value is multiplied by the stability ratio coefficient to obtain the temporal stability factor. The temporal stability factor is negatively correlated with the dispersion of the reprojection error sequence and positively correlated with the proportion of feature points with reprojection errors less than the preset error threshold; that is, the more concentrated and smaller the reprojection errors, the higher the temporal stability factor. The preset error threshold is determined as follows: During system debugging, temporal stability tests are performed on the same hook-and-tongue image sequence with different error thresholds. The accuracy and stability of feature point matching under different threshold conditions are recorded. The maximum error value corresponding to a feature point matching accuracy that is stable above 90% is selected as the preset error threshold.

[0059] The texture enrichment factor is calculated as follows: For each candidate feature region, firstly, the local gray-level entropy value of the region is calculated. This local gray-level entropy value is obtained by performing information entropy calculation on the probability distribution of gray-level values ​​of each pixel within the region. The more dispersed the gray-level distribution, the larger the gray-level entropy value, indicating richer texture information in the region. Then, the edge pixel ratio of the region is calculated, which is the percentage of edge pixels whose gradient magnitude exceeds a preset gradient threshold out of the total number of pixels in the region. Next, the local contrast of the region is calculated, which is the ratio of the difference between the maximum and minimum gray-level values ​​in the region to their sum. After normalizing the local gray-level entropy value, the edge pixel ratio, and the local contrast, the product or weighted sum of these three values ​​is used as the texture enrichment factor of the candidate feature region. The texture enrichment factor is positively correlated with the local gray-level entropy value, the edge pixel ratio, and the local contrast, respectively.

[0060] The calculation process of the geometric complexity factor is as follows: After extracting the edge contours of the candidate feature regions, the edge contours are sampled at equal intervals to obtain multiple contour points. The curvature value at each contour point is calculated, and the probability distribution of the curvature values ​​at each contour point is statistically analyzed to calculate the information entropy value of the curvature value distribution, which is the curvature change entropy value. The larger the curvature change entropy value, the richer the curvature change of the contour, and the more complex and unique the contour geometric structure. The curvature change entropy value is used as the geometric complexity factor, meaning that the geometric complexity factor is positively correlated with the curvature change entropy value.

[0061] The temporal stability factor, texture richness factor, and geometric complexity factor are combined to generate a stability characterization value for the candidate feature region. The combination method involves normalizing each of the three factors, then adding or multiplying the normalized factors to obtain the stability characterization value for the candidate feature region. In another implementation, the weights of the three factors during combination are dynamically adjusted based on the current lighting conditions and motion speed. Specifically, when the lighting conditions are better and the motion speed is more stable, the weights of the texture richness factor and geometric complexity factor are increased, while the weight of the temporal stability factor is relatively decreased; conversely, when the lighting conditions are worse and the motion speed fluctuates more, the weight of the temporal stability factor is increased, while the weights of the texture richness factor and geometric complexity factor are relatively decreased.

[0062] The stability values ​​of each candidate feature region are sorted from highest to lowest, and the candidate feature region with the highest stability value is selected as the optimal feature matching region for the current frame. The technical logic behind this selection is as follows: a higher stability value indicates that the candidate feature region has higher repeatability and anti-jitter capability in the temporal domain, richer texture information and more unique geometric structure in the spatial domain, and the region with the best overall stability is least affected by interference factors such as oil stains, rust, and uneven lighting, and has the best repeatability across different acquisition times. Therefore, selecting this region as the feature input source for subsequent pose calculation can effectively improve the robustness of feature matching and the accuracy of orientation deviation calculation.

[0063] This embodiment achieves comprehensive screening of candidate feature regions from three dimensions: positioning accuracy stability, texture information richness, and contour structure uniqueness through a comprehensive evaluation of temporal stability factor, texture richness factor, and geometric complexity factor. It effectively eliminates the influence of interference factors such as oil stains, rust, and uneven lighting, making the selection of the optimal feature region have clear multi-dimensional judgment criteria, and significantly improving the anti-interference ability of feature matching and the reliability of pose calculation.

[0064] Specifically, in step S4, the directional deviation of the hook tongue's current pose relative to the theoretical pose is calculated, including: Step S41: Extract several feature points of the hook tongue within the optimal feature matching region to construct the measured feature point set of the current frame; Step S42: Obtain the theoretical feature point set in the standard model of the hook tongue that corresponds to the measured feature point set; Step S43: Spatial registration is performed between the measured feature point set and the theoretical feature point set, and the spatial transformation matrix that minimizes the distance between the measured feature point set and the theoretical feature point set is calculated. Step S44: Extract the directional deviation of the current pose of the hook tongue relative to the theoretical pose from the spatial transformation matrix. The directional deviation includes linear displacement deviation in the spatial orthogonal direction and angular deflection deviation around the spatial orthogonal direction axis.

[0065] In this embodiment, step S41, extracting several feature points of the hook within the optimal feature matching region, specifically involves: within the optimal feature matching region, using a feature point extraction algorithm to detect feature points in the image. This feature point extraction algorithm includes, but is not limited to, any one of the following: a feature detection algorithm based on scale-invariant feature transform, a feature detection algorithm based on accelerated robust features, a detection algorithm based on directional fast rotation simplified features, or a maximum stable extremum region detection algorithm based on minimum homogeneity. After feature point detection is completed, all detected feature points are sorted from high to low according to their response intensity. A preset number of feature points with the highest response intensity are selected as the extraction result, constructing the measured feature point set for the current frame. The preset number is determined based on the number of theoretical feature points available in the hook's standard model, ensuring that the number of measured feature points does not exceed the theoretical number of feature points.

[0066] In step S42, the theoretical feature point set corresponding to the measured feature point set in the hook tongue standard model is obtained. Specifically, the hook tongue standard model is a pre-generated three-dimensional digital model of the hook tongue, which contains the three-dimensional coordinate data of each feature region on the hook tongue surface in the model coordinate system. Several standard feature points are pre-marked in the hook tongue standard model, and each standard feature point is distributed in areas such as the edge of the hook tongue pin hole, the shoulder arc, the tail side, and the traction surface. Based on the two-dimensional coordinate position of the measured feature points in the image and the projection parameters of the image acquisition device, standard feature points corresponding to the spatial positions of each measured feature point are searched in the standard model to form a theoretical feature point set.

[0067] In step S43, the measured feature point set and the theoretical feature point set are spatially registered, and a spatial transformation matrix that minimizes the distance between the measured feature point set and the theoretical feature point set is calculated. Specifically, this involves establishing a correspondence between the measured feature point set and the theoretical feature point set, and calculating the spatial transformation matrix using an iterative nearest-point algorithm or a registration algorithm based on singular value decomposition. The spatial transformation matrix includes rotation and translation components, and is used to describe the transformation relationship between the measured feature point set and the theoretical feature point set to achieve optimal alignment after rotation and translation.

[0068] For the registration method using the iterative nearest point algorithm, the specific process is as follows: initialize the spatial transformation matrix as the identity matrix; transform the measured feature point set according to the current spatial transformation matrix; find the closest corresponding point in the theoretical feature point set to the transformed measured feature point, forming corresponding point pairs; construct an error function based on the overall distance between all corresponding point pairs; solve and update the spatial transformation matrix with the goal of minimizing the error function; repeat the above iterative process until the error function converges or the number of iterations reaches the preset upper limit value, and output the final spatial transformation matrix.

[0069] For the registration method using singular value decomposition, the specific process is as follows: calculate the centroid coordinates of the measured feature point set and the theoretical feature point set respectively; decenter the measured feature point set and the theoretical feature point set relative to their respective centroids; construct the covariance matrix based on the two decentered point sets; perform singular value decomposition on the covariance matrix to obtain the rotation matrix; calculate the translation vector based on the rotation matrix and the centroid coordinates; combine the rotation matrix and the translation vector to obtain the spatial transformation matrix.

[0070] In step S44, the directional deviation of the hook tongue's current pose relative to its theoretical pose is extracted from the spatial transformation matrix. Specifically, the spatial transformation matrix consists of a rotation matrix and a translation vector. Linear displacement deviations of the hook tongue in three orthogonal directions in space are extracted from the translation vectors: horizontal displacement deviation, vertical displacement deviation, and forward / backward displacement deviation. Angular deflection deviations of the hook tongue around three orthogonal axes in space are extracted from the rotation matrix: deflection angle deviation, pitch angle deviation, and roll angle deviation. The deflection angle is the rotation angle of the hook tongue around the vertical axis, the pitch angle is the rotation angle of the hook tongue around the horizontal axis, and the roll angle is the rotation angle of the hook tongue around the horizontal axis. These three together constitute the directional deviation of the hook tongue in space.

[0071] This embodiment achieves precise quantification of the deviation between the current pose and the theoretical pose of the hook tongue by spatially registering the measured feature point set and the theoretical feature point set, and extracting the six-degree-of-freedom direction deviation by decomposing the spatial transformation matrix obtained from the registration. This provides accurate deviation input for subsequent correction control. By using the iterative nearest point algorithm or singular value decomposition algorithm for registration, it can adaptively solve the pose deviation under different hook tongue models and different posture conditions, and has wide applicability and stability.

[0072] Specifically, in step S5, the spatial transformation error is used to compensate for the direction deviation to obtain the corrected true direction deviation, including: The spatial transformation error of the image acquisition device at the current moment is obtained, and the spatial transformation error includes coordinate rotation error and coordinate translation error; Determine whether the spatial transformation error exceeds a preset error tolerance; If the spatial conversion error does not exceed the preset error tolerance, the direction deviation and the spatial conversion error are transformed inversely to cancel the interference component of the spatial conversion error on the direction deviation, and the corrected true direction deviation is obtained. If the spatial conversion error exceeds the preset error tolerance, a system calibration prompt signal is generated, the actuator correction control is paused, and compensation is re-executed after the spatial conversion error returns to within the preset error tolerance.

[0073] In this embodiment, obtaining the spatial transformation error of the image acquisition device at the current moment in step S5 specifically involves: setting a standard calibration reference within the field of view of the image acquisition device. The standard calibration reference is fixed on the tooling base and its spatial position is known. The standard calibration reference is a calibration block or calibration sphere with known spatial coordinates, and its surface is provided with multiple easily identifiable feature markers. The spatial coordinates of each feature marker in the theoretical world coordinate system are pre-calibrated using a high-precision measuring device.

[0074] Before each hook-tongue image acquisition or at preset time intervals, spatial feature data of the standard calibration reference is acquired. Specifically, the image acquisition device is controlled to acquire images of the standard calibration reference, and the pixel coordinates of each feature marker point on the standard calibration reference are extracted in the image. Based on the pixel coordinates of each feature marker point and the internal parameters of the image acquisition device, the spatial coordinates of each feature marker point in the visual measurement coordinate system are calculated. The calculated spatial coordinates in the visual measurement coordinate system are compared with the spatial coordinates in the pre-calibrated theoretical world coordinate system, and the coordinate rotation error and coordinate translation error between the visual measurement coordinate system and the theoretical world coordinate system are calculated, which is the spatial transformation error at the current moment.

[0075] The preset time period is determined based on the system operating environment. When the system operating environment temperature change rate exceeds the preset temperature change threshold, the preset time period is shortened; when the system operating environment temperature change rate does not exceed the preset temperature change threshold, the preset time period is extended. The preset temperature change threshold is determined as follows: During the system debugging phase, the drift of the spatial conversion error under different temperature change rates is monitored, and the temperature change rate corresponding to when the spatial conversion error drift exceeds 50% of the maximum allowable error of the system is used as the preset temperature change threshold.

[0076] The preset error tolerance is determined as follows: After the initial system calibration is completed, spatial characteristic data of the standard calibration reference are continuously collected, and the statistical distribution of spatial transformation errors in the multiple collection results is calculated. The preset error tolerance is taken as a preset multiple of the standard deviation of the statistical distribution. Alternatively, the preset error tolerance is determined based on the maximum allowable directional deviation compensation error of the system, specifically: 30% of the maximum allowable directional deviation compensation error of the system is taken as the coordinate rotation error tolerance, and 40% of the maximum allowable directional deviation compensation error of the system is taken as the coordinate translation error tolerance.

[0077] The inverse transformation operation of the directional deviation and the spatial transformation error specifically involves: the spatial transformation error reflecting the rotational and translational offset of the current visual measurement coordinate system relative to the theoretical world coordinate system. Since the directional deviation calculated in step S4 is described in the visual measurement coordinate system, this deviation includes error components introduced by the offset of the visual measurement coordinate system itself. The inverse transformation operation removes the coordinate rotation and translational error components from the directional deviation in reverse, that is, subtracts the error components contributed by the offset of the visual measurement coordinate system from the directional deviation to obtain the true directional deviation of the hook tongue in the theoretical world coordinate system.

[0078] If the spatial transformation error exceeds the preset error tolerance, a system calibration prompt signal is generated, and the correction control of the actuator is paused. Compensation is resumed once the spatial transformation error returns to within the preset error tolerance. Specifically, when the spatial transformation error exceeds the preset error tolerance, it indicates that the visual measurement system has undergone significant deviation due to temperature drift, mechanical vibration, or structural thermal deformation. Continuing to compensate for directional deviation at this time would introduce erroneous compensation into the correction control, exacerbating the directional deviation. Therefore, the system pauses the correction control and prompts the operator to perform system calibration. After the operator performs system calibration, the spatial transformation error returns to within the preset error tolerance, and the system automatically reacquires the spatial transformation error and performs directional deviation compensation. In another implementation, when the spatial transformation error exceeds the preset error tolerance, the system automatically triggers the recalibration process of the visual measurement coordinate system. This involves reacquiring the spatial feature data of the standard calibration reference and updating the transformation relationship between the visual measurement coordinate system and the theoretical world coordinate system. Correction control is automatically resumed after recalibration is completed, without manual intervention.

[0079] This embodiment achieves real-time dynamic monitoring of spatial transformation errors in the vision measurement system by setting a standard calibration reference and periodically collecting its spatial feature data. This effectively eliminates system drift caused by factors such as changes in ambient temperature, mechanical vibration, and structural thermal deformation. By performing an inverse transformation operation between the directional deviation and the spatial transformation error, the compensated directional deviation truly reflects the pose error of the hook tongue in the theoretical world coordinate system, avoiding miscompensation caused by the offset of the vision measurement coordinate system itself. By setting a preset error tolerance and pausing correction and triggering calibration when the error exceeds the tolerance, erroneous correction is prevented when the system is out of alignment, significantly improving the long-term stability and safety of feedback control.

[0080] Specifically, in step S6, a control command is generated based on the actual direction deviation, including: The true directional deviation is decomposed into displacement deviation components along each coordinate axis and angular deviation components around each coordinate axis. Based on the displacement deviation component, the angle deviation component, and the preset control mapping relationship of each motion axis of the actuator, the position compensation amount and attitude compensation amount of each motion axis are generated. The position compensation and attitude compensation of each motion axis are combined into a multi-axis collaborative control command to drive the actuator to perform correction control on the movement direction of the hook tongue.

[0081] In this embodiment, step S6, which involves decomposing the true direction deviation into displacement deviation components along each coordinate axis and angular deviation components around each coordinate axis, specifically involves the following: The true direction deviation is the six-degree-of-freedom deviation vector obtained after spatial transformation error compensation in step S5, including linear displacement deviations in three orthogonal spatial directions and angular deflection deviations around the three orthogonal axes. This six-degree-of-freedom deviation vector is then decomposed along the coordinate axes to obtain three displacement deviation components: horizontal displacement deviation, vertical displacement deviation, and forward / backward displacement deviation; and three angular deviation components: yaw angle deviation, pitch angle deviation, and roll angle deviation. Each deviation component has a clear physical meaning and directional attribute, facilitating subsequent processing and mapping.

[0082] Step S6, which generates position compensation and attitude compensation for each motion axis based on the displacement deviation component, angle deviation component, and the preset control mapping relationship of each motion axis of the actuator, specifically involves: the actuator is a multi-axis motion mechanism, with each motion axis corresponding to translational motion in different spatial directions and rotational motion around different directions. The preset control mapping relationship is pre-stored in the system control parameter table, establishing a correspondence between each deviation component and the motion amount of each motion axis of the actuator. For each deviation component, the compensation direction and compensation magnitude of each motion axis are determined based on the magnitude and direction of the component, combined with the control mapping relationship. Specifically, horizontal displacement deviation is mapped to the position compensation of the horizontal motion axis of the actuator, vertical displacement deviation is mapped to the position compensation of the vertical motion axis of the actuator, and forward / backward displacement deviation is mapped to the position compensation of the forward / backward motion axis of the actuator; yaw angle deviation is mapped to the attitude compensation of the actuator around the vertical rotation axis, pitch angle deviation is mapped to the attitude compensation of the actuator around the horizontal lateral rotation axis, and roll angle deviation is mapped to the attitude compensation of the actuator around the horizontal longitudinal rotation axis.

[0083] The preset control mapping relationship is established as follows: During the initial calibration phase of the system, a known displacement and a known rotation are applied to each motion axis of the actuator. The change in the actual pose of the hook tongue after the motion of each motion axis is measured. The correspondence between the motion of each motion axis and the change in the pose of the hook tongue is recorded to form a control mapping matrix. This matrix is ​​a square matrix with six rows and six columns. Each row corresponds to a deviation component, and each column corresponds to a motion axis of the actuator. The value of each element in the matrix represents the influence coefficient of the corresponding motion axis unit motion on the corresponding deviation component.

[0084] Step S6 involves synthesizing the position compensation and attitude compensation of each motion axis into a multi-axis coordinated control command to drive the actuator to correct the movement direction of the hook tongue. Specifically, this involves: acquiring the current actual position and attitude of each motion axis of the actuator at the current moment; superimposing the position compensation of each motion axis onto the current actual position of the corresponding motion axis to obtain the target position of each motion axis; superimposing the attitude compensation of each motion axis onto the current actual attitude of the corresponding motion axis to obtain the target attitude of each motion axis; and generating a control command sequence that drives the coordinated movement of each motion axis of the actuator based on the target position and target attitude of each motion axis and the kinematic model of the actuator. The control command sequence includes the motion direction, motion speed, and motion acceleration parameters of each motion axis, so that each motion axis of the actuator moves synchronously according to the specified timing and speed, driving the hook tongue to move along the target direction until all components of the actual direction deviation converge within the preset allowable deviation range.

[0085] The preset allowable deviation range is determined as follows: the maximum allowable linear displacement deviation value and the maximum allowable angular deflection deviation value are determined according to the hook tongue processing or assembly process requirements. Eighty percent of the maximum allowable linear displacement deviation value is taken as the upper limit of the allowable deviation range of each linear displacement deviation component, and eighty percent of the maximum allowable angular deflection deviation value is taken as the upper limit of the allowable deviation range of each angular deflection deviation component. Zero is taken as the lower limit of the allowable deviation range of each deviation component, which together constitute the preset allowable deviation range corresponding to each deviation component.

[0086] During the correction control process, the system monitors the changes of each component of the actual directional deviation in real time. When all components converge within the corresponding preset allowable deviation range, the correction control is deemed complete, the actuator stops moving and maintains its current posture. If any deviation component fails to converge within the corresponding preset allowable deviation range within the preset response time, the correction control is deemed to have timed out, the system generates a timeout alarm signal and suspends the correction control.

[0087] This embodiment decomposes the true direction deviation into independent displacement and angular deviation components, achieving refined processing of the six-degree-of-freedom deviation. Each component is decoupled, facilitating precise compensation separately. By establishing a control mapping relationship between the deviation components and the motion axes of the actuator, the abstract pose deviation is transformed into specific motion commands for each motion axis, achieving seamless integration from deviation detection to motion control. By synthesizing the compensation amounts of each motion axis into multi-axis collaborative control commands, synchronous and coordinated motion among the actuator's motion axes is ensured, avoiding trajectory deviation and interference problems caused by independent single-axis motion. By setting allowable deviation ranges and timeout judgment mechanisms, the accuracy and reliability of the correction control are guaranteed, improving the system's safety and stability.

[0088] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.

Claims

1. A directional deviation feedback control method based on hook tongue feature point matching, characterized in that, include: Step S1: Obtain the motion state parameters of the hook tongue, predict the timing of the hook tongue reaching the acquisition station based on the motion state parameters, and determine the acquisition parameters of the image acquisition device. Step S2: Based on the acquisition parameters, trigger the image acquisition device to acquire image data of the hook tongue, and determine the optimal acquisition time according to the image features of the hook tongue contour area during the acquisition process; Step S3: Extract feature regions from the acquired image data, evaluate the stability of the extracted feature regions, and select the optimal feature matching region for the current frame based on the stability evaluation results. Step S4: Extract feature points within the optimal feature matching region, register and compare the extracted feature points with the hook tongue standard model, and calculate the directional deviation of the hook tongue's current pose relative to the theoretical pose. Step S5: Obtain the current spatial conversion error, and use the spatial conversion error to compensate for the direction deviation to obtain the corrected true direction deviation; Step S6: Generate control commands based on the actual direction deviation to drive the actuator to correct the movement direction of the hook tongue.

2. The directional deviation feedback control method based on hook tongue feature point matching according to claim 1, characterized in that, In step S1, the timing of the hook tongue reaching the acquisition station is predicted based on the motion state parameters, and the acquisition parameters of the image acquisition device are determined, including: Step S11: Obtain the motion speed, motion acceleration, and rate of change of acceleration of the hook tongue from the motion state parameters; Step S12: Determine the moment when the acceleration passes zero based on the trend of the sign change of the acceleration, use the moment when the acceleration passes zero as the reference moment when the speed tends to be stable, and use the acceleration change rate to correct the reference moment, and use the corrected reference moment as the time to predict the arrival at the acquisition station. Step S13: Determine the trigger time of the image acquisition device based on the predicted arrival time at the acquisition station; Step S14: Determine the exposure time of the image acquisition device based on the motion speed.

3. The directional deviation feedback control method based on hook tongue feature point matching according to claim 1, characterized in that, In step S2, the optimal acquisition time is determined based on the image features of the hook tongue contour region, including: Step S21: After the hook tongue enters the preset acquisition field of view, multiple frames of dynamic images of the hook tongue are continuously acquired at a predetermined sampling frequency, and the motion speed value and motion acceleration value of the hook tongue are recorded synchronously at the acquisition time of each frame image. Step S22: Extract the subpixel positioning information interval width, effective texture area ratio, and contour matching error value between the imaging contour and the standard projection contour of the hook tongue contour region for each frame of dynamic image; the contour matching error value is the inverse measure of shape fidelity between the imaging contour and the standard projection contour. Step S23: Calculate the local feature density of each frame image using the width of the sub-pixel positioning information interval and the area ratio of the effective texture region; calculate the local deformation severity of each frame image using the contour matching error value and the motion acceleration value, wherein the local deformation severity is positively correlated with both the contour matching error value and the motion acceleration value; generate the acquisition effectiveness coefficient of each frame image based on the ratio of the local feature density to the local deformation severity. Step S24: Among all frames in which the acquisition effectiveness coefficient reaches the preset effectiveness threshold, select the acquisition time corresponding to the lowest motion speed value as the optimal acquisition time, and output the image data of that frame.

4. The directional deviation feedback control method based on hook tongue feature point matching according to claim 3, characterized in that, In step S23, the local feature density of each frame image is calculated, including: The number of pixels within the hook tongue contour region whose subpixel positioning information interval width is less than a preset width threshold is determined, and the product of the number of pixels and the area ratio of the effective texture region is used as the local feature density.

5. The directional deviation feedback control method based on hook tongue feature point matching according to claim 3, characterized in that, In step S23, the local deformation severity of each frame image is calculated, including: Calculate the contour matching error value between the hook tongue imaging contour and the standard projection contour, use the sum of the contour matching error value and a preset positive coefficient as the deformation penalty factor, and use the product of the deformation penalty factor and the motion acceleration value as the local deformation severity; or, use a monotonically increasing function of the contour matching error value as the deformation penalty factor, and use the product of the deformation penalty factor and the motion acceleration value as the local deformation severity.

6. The directional deviation feedback control method based on hook tongue feature point matching according to claim 1, characterized in that, In step S3, the optimal feature matching region of the current frame is selected based on the stability evaluation results, including: Step S31: After preprocessing the acquired image data, locate multiple candidate feature regions of the hook tongue in the image based on the geometric prior information of the hook tongue. Step S32: Perform stability evaluation on each candidate feature region and generate stability characterization value for each candidate feature region; Step S33: Sort the stability characterization values ​​of all candidate feature regions in descending order; Step S34: Select the candidate feature region with the highest stability characterization value as the optimal feature matching region for the current frame.

7. The directional deviation feedback control method based on hook tongue feature point matching according to claim 6, characterized in that, In step S32, stability evaluation is performed on each candidate feature region to generate a stability characterization value for each candidate feature region, including: Extract the feature point distribution of each candidate feature region in the current frame and the previous frame respectively, and calculate the feature point reprojection error sequence of the candidate feature regions; Calculate the temporal stability factor of the candidate feature region based on the feature point reprojection error sequence; The texture enrichment factor of the candidate feature region is calculated based on the local gray-level entropy value, edge pixel ratio, and local contrast of the candidate feature region. Extract the edge contour of the candidate feature region, calculate the curvature change entropy value of the edge contour, and use the reciprocal of the curvature change entropy value as the geometric complexity factor of the candidate feature region. The temporal stability factor, the texture enrichment factor, and the geometric complexity factor are combined to generate a stability characterization value for the candidate feature region.

8. The directional deviation feedback control method based on hook tongue feature point matching according to claim 1, characterized in that, In step S4, the directional deviation of the current pose of the hook tongue relative to the theoretical pose is calculated, including: Step S41: Extract several feature points of the hook tongue within the optimal feature matching region to construct the measured feature point set of the current frame; Step S42: Obtain the theoretical feature point set in the standard model of the hook tongue that corresponds to the measured feature point set; Step S43: Spatial registration is performed between the measured feature point set and the theoretical feature point set, and the spatial transformation matrix that minimizes the distance between the measured feature point set and the theoretical feature point set is calculated. Step S44: Extract the directional deviation of the current pose of the hook tongue relative to the theoretical pose from the spatial transformation matrix. The directional deviation includes linear displacement deviation in the spatial orthogonal direction and angular deflection deviation around the spatial orthogonal direction axis.

9. The directional deviation feedback control method based on hook tongue feature point matching according to claim 1, characterized in that, In step S5, the spatial transformation error is used to compensate for the direction deviation to obtain the corrected true direction deviation, including: The spatial transformation error of the image acquisition device at the current moment is obtained, and the spatial transformation error includes coordinate rotation error and coordinate translation error; Determine whether the spatial transformation error exceeds a preset error tolerance; If the spatial conversion error does not exceed the preset error tolerance, the direction deviation and the spatial conversion error are transformed inversely to cancel the interference component of the spatial conversion error on the direction deviation, and the corrected true direction deviation is obtained. If the spatial conversion error exceeds the preset error tolerance, a system calibration prompt signal is generated, the actuator correction control is paused, and compensation is re-executed after the spatial conversion error returns to within the preset error tolerance.

10. The directional deviation feedback control method based on hook tongue feature point matching according to claim 1, characterized in that, In step S6, a control command is generated based on the actual direction deviation, including: The true directional deviation is decomposed into displacement deviation components along each coordinate axis and angular deviation components around each coordinate axis. Based on the displacement deviation component, the angle deviation component, and the preset control mapping relationship of each motion axis of the actuator, the position compensation amount and attitude compensation amount of each motion axis are generated. The position compensation and attitude compensation of each motion axis are combined into a multi-axis collaborative control command to drive the actuator to perform correction control on the movement direction of the hook tongue.

Citation Information

Patent Citations

  • Image Processing-Based Method for Fault Detection of Coupling Pins in Railway Freight Cars

    CN112418323B