A hub visual positioning method applied to a laser descaling system
By using a wheel hub visual positioning method, combined with a wheel hub template database and spoke window feature information, high-precision, fast, and multi-model compatible positioning of wheel hubs in the laser sandblasting system was achieved. This solved the problem of insufficient positioning accuracy in the laser sandblasting system and improved sandblasting quality and production efficiency.
Patent Information
- Application Number
- CN202511371296.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-24
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-09-24
AI Technical Summary
In existing laser sandblasting systems, the initial positioning accuracy of the wheel hub is insufficient, which leads to deviation of the processing trajectory, affects the sandblasting quality and may cause product scrapping. In addition, traditional manual operation is inefficient, labor-intensive and in harsh environment.
The wheel hub visual positioning method is adopted. By acquiring visual images of the wheel hub, identifying the target wheel hub type, calling the wheel hub template database, detecting the actual calibration point, calculating the attitude deviation, adjusting the posture through a rotating platform, and combining the feature information of the spoke window for fine correction, high-precision positioning is achieved.
It achieves extremely high positioning angle accuracy (within ±0.02°), has the ability to quickly adapt to multiple models, improves the intelligence and robustness of the system, and meets the high cycle time requirements of automated production lines.
Smart Images

Figure CN120871741B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automatic sanding technology in wheel hub processing systems, specifically to a wheel hub visual positioning method applied to a laser sanding system. Background Technology
[0002] The brushing and sanding processes on wheel hub surfaces are important techniques for enhancing product aesthetics, and have traditionally relied heavily on manual labor. While handheld sanding machines offer high flexibility, they also suffer from inherent drawbacks such as low efficiency, high labor intensity, and harsh working environments (dust, noise), making workers more susceptible to various occupational diseases and severely hindering the modernization and upgrading of the industry.
[0003] To overcome the drawbacks of manual processing, a new system has emerged that uses robots to drive laser emitters for automated sandblasting. However, this type of system places extremely high demands on the initial positioning accuracy of the wheel hub. The laser processing path is typically pre-programmed; if the wheel hub's position relative to the robot deviates, it will cause the processing trajectory to shift, severely affecting the sandblasting quality and even leading to product scrap. Therefore, achieving rapid and precise positioning of the wheel hub before processing is a crucial prerequisite for the successful application of automated laser sandblasting. Summary of the Invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, this application aims to provide a wheel hub visual positioning method applied to a laser sandblasting system to improve the quality of automated laser sandblasting;
[0005] The method includes the following steps:
[0006] Obtain a visual image of the wheel hub to be located;
[0007] Based on the visual image, identify the target wheel hub type of the wheel hub to be located;
[0008] The wheel hub template database is invoked and traversed to obtain wheel hub template data corresponding to the target wheel hub type. The wheel hub template data includes the theoretical calibration point, theoretical center point, and structural feature information of the wheel hub.
[0009] The actual calibration point of the wheel hub to be positioned is detected from the visual image;
[0010] Based on the image coordinates of the actual calibration point, the first template coordinates of the theoretical calibration point, the second template coordinates of the theoretical center point, and the structural feature information, the current attitude deviation of the wheel hub to be positioned is calculated.
[0011] Based on the current attitude deviation, the rotating platform is controlled to adjust the position and orientation of the wheel hub to be positioned;
[0012] Repeat the above steps until the current attitude deviation is less than the preset tolerance threshold, and the positioning is completed.
[0013] According to the technical solution provided in this application, the structural feature information includes the feature information of the spoke window of the hub to be positioned; the feature information of the spoke window includes the theoretical coordinates of the window feature points;
[0014] The calculation of the current attitude deviation of the wheel hub to be positioned includes the following steps:
[0015] Calculate the initial deflection reference angle based on the coordinate offset between the actual calibration point and the theoretical calibration point, and the theoretical center point;
[0016] Based on the initial deflection reference angle and the theoretical coordinates of the window feature points, the expected position of the target window region to be analyzed in the visual image is determined.
[0017] Extract the target image features at the expected location, and calculate the window deviation angle based on the target image features. The window deviation angle is the current pose deviation.
[0018] According to the technical solution provided in this application, the step of calculating the window deviation angle based on the target image features includes the following steps:
[0019] The image located in the target window region of the visual image is converted into a grayscale image and then binarized to obtain the processed image;
[0020] Locate and filter the wheel hub window outline in the processed image;
[0021] Based on the visual image, the coordinates of the current wheel hub center point are detected;
[0022] Calculate the coordinates of the center of symmetry of the wheel hub window profile, and calculate the window deviation angle based on the relative positional relationship between the coordinates of the center of symmetry and the coordinates of the current wheel hub center point.
[0023] According to the technical solution provided in this application, the structural feature information also includes the theoretical geometric dimension parameters of each of the spoke windows;
[0024] The process of locating and filtering the wheel hub window outline in the processed image includes the following steps:
[0025] Perform contour search on the processed image to obtain all candidate contours;
[0026] For each candidate profile, calculate multiple Euclidean distances between its corner points and the coordinates of the current hub center point;
[0027] The maximum and minimum distances are calculated from a plurality of Euclidean distances, and the average of the maximum and minimum distances is obtained as the feature reference distance of the candidate contour.
[0028] The feature reference distance is matched with the theoretical geometric dimension parameters of the corresponding window in the wheel hub template data;
[0029] If a match is successful, the candidate contour is determined to be the hub window contour.
[0030] According to the technical solution provided in this application, before determining the expected location of the target window region to be analyzed in the visual image, the method further includes the following steps:
[0031] Based on the hub template data, the theoretical direction vector of each spoke window is obtained, and the theoretical direction vector is the direction from the theoretical center point to the theoretical axis of symmetry of each window;
[0032] By rotating each of the theoretical direction vectors by the initial deflection reference angle, the predicted direction vector of each of the spoke windows in the visual image is calculated.
[0033] Calculate the angle of deviation between each predicted direction vector and the preset reference direction vector;
[0034] The spoke window corresponding to the predicted direction vector with the smallest absolute value of the deviation angle is selected as the first target analysis window;
[0035] Determining the expected location of the target window region to be analyzed in the visual image includes the following steps:
[0036] Based on the theoretical geometric dimensions of the first target analysis window and the current hub center point coordinates, a target rectangular region is delineated in the visual image as the expected location of the target window region.
[0037] According to the technical solution provided in this application, the step of delineating a target rectangular region in the visual image as the expected location of the target window region includes the following steps:
[0038] Based on the theoretical geometric dimension parameters of the first target analysis window, the preset expansion ratio of the reference rectangular region is calculated, and the preset expansion ratio is positively correlated with the absolute value of the initial deflection reference angle.
[0039] Based on the current hub center point coordinates, the predicted direction vector of the first target analysis window, and the expanded size corresponding to the preset expansion ratio, calculate the vertex image coordinates of the four vertices of the base rectangular region after expansion;
[0040] Based on the vertex image coordinates of the four vertices, a corresponding local rectangular region is delineated in the visual image, and the local rectangular region is used as the target rectangular region.
[0041] According to the technical solution provided in this application, after delineating the corresponding local rectangular region in the visual image based on the vertex image coordinates of the four vertices, the method further includes the following steps:
[0042] Image quality assessment is performed on the image within the defined local rectangular region in the visual image, and the local contrast of the local rectangular region is calculated;
[0043] The step of using the local rectangular region as the target rectangular region includes the following steps:
[0044] If the local contrast is greater than or equal to a preset contrast threshold, then the local rectangular region is taken as the target rectangular region.
[0045] According to the technical solution provided in this application, after calculating the local contrast of the local rectangular region, the method further includes the following steps:
[0046] If the local contrast is less than the preset contrast threshold, then the spoke window corresponding to the prediction direction vector with the second smallest absolute value of the deviation angle is taken as the second target analysis window, and the local rectangular area corresponding to the second target analysis window is redefined until the local contrast is greater than or equal to the preset contrast threshold.
[0047] According to the technical solution provided in this application, detecting the coordinates of the current wheel hub center point based on the visual image includes the following steps:
[0048] Edge detection is performed on the visual image to obtain the outer edge contour of the wheel hub;
[0049] An ellipse is fitted to the outer edge profile of the wheel hub to obtain a fitted ellipse.
[0050] Calculate the coordinates of the center point of the fitted ellipse, and use these coordinates as the coordinates of the current wheel hub center point.
[0051] According to the technical solution provided in this application, after setting the center point coordinates as the current wheel hub center point coordinates, the method further includes the following steps:
[0052] Calculate the ratio of the major axis to the minor axis of the fitted ellipse;
[0053] If the ratio of the major axis to the minor axis is greater than a preset ellipticity threshold, it is determined that the wheel hub in the visual image is tilted.
[0054] The control alarm device issues a tilt warning and suspends the positioning process.
[0055] Compared with the prior art, the beneficial effects of this application are as follows:
[0056] I. Achieving Extremely High Positioning Angle Accuracy: Through an iterative strategy of coarse positioning + fine correction, preliminary pose estimation is first performed using calibration points such as bolt holes. Then, structural feature information of the wheel hub (such as spoke windows) is comprehensively utilized for refined angle deviation calculation, ultimately converging the wheel hub's attitude angle deviation to within ±0.02°. This ultra-high angular accuracy ensures a perfect fit between the laser processing trajectory and the wheel hub profile, fundamentally guaranteeing the quality of the sandblasting process.
[0057] II. Capable of Rapid Compatibility with Multiple Wheel Models: By establishing a database containing various wheel hub templates and automatically matching the target wheel hub type during the identification phase, the system can automatically call upon the corresponding model's theoretical data for subsequent calculations. This method eliminates dependence on a single wheel hub model, requiring no change of mechanical tooling or complex reprogramming; simply updating the database ensures compatibility with new vehicle model wheels, greatly improving system flexibility and production efficiency, and enabling mixed-line production of multiple wheel hub models.
[0058] Third, it enhances the intelligence and robustness of the positioning system: This invention integrates multiple steps such as wheel hub type recognition, feature point detection, deviation calculation based on geometric relationships, and closed-loop feedback control. This multi-feature fusion and iterative approximation strategy enables the system to intelligently cope with interference such as changes in ambient lighting and slight occlusion, exhibiting excellent robustness.
[0059] Fourth, it ensures a high production cycle: The entire positioning process, including image acquisition, recognition, calculation and adjustment, can be controlled within a very short time, which is much faster than manual positioning adjustment. It fully matches the high cycle requirements of automated production lines and provides key technical support for realizing the full automation of wheel hub laser sandblasting. Attached Figure Description
[0060] Figure 1 A flowchart illustrating the steps of the wheel hub visual positioning method applied to a laser sandblasting system provided in this application;
[0061] Figure 2 A schematic diagram of the positioning system provided in this application.
[0062] The text labels in the image represent:
[0063] 1. Surface light source; 2. Area scan camera; 3. Wheel hub to be positioned; 4. Rotating platform. Detailed Implementation
[0064] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0065] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0066] Example 1
[0067] As mentioned in the background section, in order to address the problems in the prior art, this application proposes a wheel hub visual positioning method for use in laser sandblasting systems to improve the quality of automated laser sandblasting.
[0068] like Figure 1 As shown, the method includes the following steps:
[0069] S1. Obtain a visual image of the wheel hub 3 to be positioned;
[0070] S2. Based on the visual image, identify the target wheel hub type of the wheel hub 3 to be located;
[0071] S3. Call and traverse the wheel hub template database to obtain wheel hub template data corresponding to the target wheel hub type. The wheel hub template data includes the theoretical calibration point, theoretical center point, and structural feature information of the wheel hub.
[0072] S4. Detect the actual calibration point of the wheel hub 3 to be positioned from the visual image;
[0073] S5. Based on the image coordinates of the actual calibration point, the first template coordinates of the theoretical calibration point, the second template coordinates of the theoretical center point, and the structural feature information, calculate the current attitude deviation of the wheel hub 3 to be positioned.
[0074] S6. Based on the current attitude deviation, control the rotating platform 4 to adjust the position of the wheel hub 3 to be positioned;
[0075] S7. Repeat the above steps until the current attitude deviation is less than the preset tolerance threshold, and the positioning is completed.
[0076] Specifically, this method is based on a positioning system (such as...) Figure 2As shown, the positioning system employs an area array camera 2 mounted directly above the wheel hub, along with a surface light source 1 providing uniform illumination, to acquire a top-view digital image of the wheel hub 3 to be positioned, which is the visual image. The wheel hub 3 to be positioned is placed on a rotating platform 4 at the bottom of the area array camera 2. A deep learning-based image classification algorithm (such as ResNet, MobileNet, or other convolutional neural networks) is used to process the acquired images. The network is first trained on a database containing images of various wheel hubs, learning the characteristics of different wheel hubs (such as the number of holes, spoke shapes, and center cap shapes). During implementation, real-time images are input into the trained model, and the model outputs the wheel hub's model ID, thus identifying the target wheel hub type of the wheel hub 3 to be positioned. The system maintains a template database containing all known wheel hub models. Each template data includes: the ideal coordinates of the theoretical calibration point, usually the center of the wheel hub's valve hole or bolt hole; the ideal coordinates of the theoretical center point, the geometric center of the wheel hub; and structural feature information, including geometric parameters such as the number, angle, and size of the spoke windows. After identifying the model, the system retrieves the corresponding data from the database via SQL query or key-value pair method, serving as the wheel hub template data corresponding to the target wheel hub type. Using machine learning-based feature point detection algorithms (such as HRNet-based keypoint detection) or traditional image processing algorithms (such as Hough circle detection for bolt hole location), the pixel coordinates of actual calibration points such as wheel hub valve holes or bolt holes are accurately located in the image, serving as the actual calibration points. By comparing the coordinates of the actual calibration points with those of the theoretical calibration points, the rigid body transformation (usually a Similarity transformation or Affine transformation) between them is calculated. This transformation includes rotation parameters, where the rotation angle θ is the main attitude deviation. The calculated angle deviation θ is converted into a pulse signal, which drives a high-precision servo motor via a PLC or motion control card, causing the rotating platform 4 to rotate by the corresponding -θ angle to compensate for the deviation. Due to potential minor errors in mechanical transmission and calculation, a single adjustment may not be completely accurate. Therefore, it needs to be repeated, forming a closed-loop feedback system, until the attitude deviation is less than the system's set tolerance (e.g., ±0.02°), at which point the positioning is considered complete.
[0077] In a preferred embodiment, the structural feature information includes the feature information of the spoke window of the hub 3 to be positioned; the feature information of the spoke window includes the theoretical coordinates of the window feature points;
[0078] The calculation of the current attitude deviation of the wheel hub 3 to be positioned includes the following steps:
[0079] Calculate the initial deflection reference angle based on the coordinate offset between the actual calibration point and the theoretical calibration point, and the theoretical center point;
[0080] Based on the initial deflection reference angle and the theoretical coordinates of the window feature points, the expected position of the target window region to be analyzed in the visual image is determined.
[0081] Extract the target image features at the expected location, and calculate the window deviation angle based on the target image features. The window deviation angle is the current pose deviation.
[0082] Specifically, the characteristic information of the spoke windows: In the template database, in addition to the calibration points, theoretical coordinates of window feature points are defined for each spoke window of each type of hub. These feature points are usually key corner points on the window outline, or points on the window's axis of symmetry, with their coordinates defined with the theoretical center of the hub as the origin. Calculating the initial deflection reference angle: Using the actual calibration points and the theoretical calibration points in the template, an optimal rotation angle θ and / or translation amount (Tx, Ty) is solved using the least squares method. This θ is the initial deflection reference angle, providing a rough estimate of how much the hub has deflected. Determining the expected position of the target window region: Based on the calculated initial deflection reference angle θ, the system predicts which spoke window should be in the most favorable observation position (e.g., closest to the top of the image) in the current image. The process of predicting the most favorable observation window is as follows: Based on the initial deflection reference angle θ, the system performs a rotation transformation on the theoretical direction vector of each spoke window to obtain its predicted direction vector in the current image; calculates the angle between each predicted direction vector and the preset reference direction vector (usually the vertically upward vector in the image coordinate system, such as (0, -1)); selects the window with the smallest absolute value of the angle, that is, the window whose direction is closest to the preset reference direction, as the most favorable target window for observation. Then, according to the theoretical size of this window, a rectangular region is delineated in the image. Subsequent processing will focus on this small region to reduce the amount of computation and avoid interference from other regions. Within the delineated rectangular region, fine feature extraction is performed to calculate a more accurate window-based rotation deviation θ1. This angle is the final current attitude deviation.
[0083] This implementation first uses actual calibration points with a wide distribution range for preliminary coarse positioning to quickly estimate the approximate deviation. Then, it utilizes the characteristic of the long side feature of the spoke window being extremely sensitive to minute angular changes for fine correction. By combining the robustness of valve hole positioning with the high precision of window positioning, it ultimately achieves an ultra-high angular positioning accuracy of ±0.02°, which is difficult to achieve with a single feature positioning method.
[0084] In a preferred embodiment, calculating the window deviation angle based on the target image features includes the following steps:
[0085] The image located in the target window region of the visual image is converted into a grayscale image and then binarized to obtain the processed image;
[0086] Locate and filter the wheel hub window outline in the processed image;
[0087] Based on the visual image, the coordinates of the current wheel hub center point are detected;
[0088] Further, the step of detecting the coordinates of the current wheel hub center point based on the visual image includes the following steps:
[0089] Edge detection is performed on the visual image to obtain the outer edge contour of the wheel hub;
[0090] An ellipse is fitted to the outer edge profile of the wheel hub to obtain a fitted ellipse.
[0091] Calculate the coordinates of the center point of the fitted ellipse, and use these coordinates as the coordinates of the current wheel hub center point.
[0092] Specifically, firstly, the acquired high-resolution visual image of the wheel hub is converted from RGB color space to grayscale to simplify processing. Then, the Canny edge detection operator is used to process this grayscale image. The Canny operator is chosen for its excellent low error rate, high localization capability, and ability to suppress false edges. By appropriately setting the parameters of the Gaussian filter, gradient calculation, and dual thresholds (the high threshold is typically set to 100-200, and the low threshold is half of that), the sharp outermost edge of the wheel hub can be clearly extracted. The output of this step is a continuous curve composed of a series of pixels, depicting the outer edge of the wheel hub, i.e., the outer edge contour of the wheel hub. After obtaining the contour point set, the least squares ellipse fitting algorithm is used. The goal of this algorithm is to find an ellipse model such that the sum of the geometric distances from all points on the ellipse to the aforementioned contour point set is minimized (the specific implementation can call a mature computer vision library to automatically complete this process; this function will return a "fitted ellipse" that best represents the shape of the outer edge of the wheel hub). This ellipse is typically defined in the program by parameters such as the coordinates of the center point, the lengths of the major and minor axes, and the rotation angle. This step is based on a key understanding: even if the wheel hub itself is a perfect circle, any slight installation tilt or perspective projection from the camera will cause it to appear as an ellipse on the two-dimensional image plane. Therefore, directly fitting an ellipse rather than forcibly fitting a circle is an objective mathematical description of the physical world, more accurately reflecting the true projection of the wheel hub in the image. The coordinates of the center point of the fitted ellipse are calculated and used as the coordinates of the current wheel hub center point.
[0093] Compared to finding the center using Hough circle detection, this implementation method is invariant to tilt and distortion. Regardless of the wheel hub's tilt, the center of its projected ellipse always corresponds to the projection point of the wheel hub's solid center. Using this point as a reference ensures that subsequent calculations of parameters such as the window deviation angle reflect the true rotational deviation, rather than systematic errors introduced by inaccurate center point measurement. This is one of the key prerequisites for achieving ultra-high precision (≤±0.02°) positioning.
[0094] Calculate the coordinates of the center of symmetry of the wheel hub window profile, and calculate the window deviation angle based on the relative positional relationship between the coordinates of the center of symmetry and the coordinates of the current wheel hub center point.
[0095] Specifically, the image is converted to grayscale and binarized: the target window region in the original RGB color image is converted to a grayscale image, and then binarized using an adaptive thresholding method (such as Otsu's method) or a fixed thresholding method to separate the window region from the background, resulting in a processed image with clear black and white contrast and sharp contours. The wheel hub window contour is located and filtered: a contour finding algorithm (such as the findContours function in OpenCV) is used to extract the contours of all continuous white or black regions from the binary image. Then, based on the geometric features of the contour, such as area, perimeter, and convexity, the contour that best matches the shape of the wheel hub window is selected from all candidate contours. The coordinates of the center of symmetry and the window deviation angle are calculated: for the selected window contour, its geometric center is calculated or its centerline is fitted. The coordinates of this center of symmetry are connected to the coordinates of the current wheel hub center point to form a vector V. In the template, the theoretical axis of symmetry vector of this window should be V0, where the theoretical axis of symmetry refers to the geometric axis of symmetry predefined for each spoke window in the wheel hub template database, typically a radial line passing through the geometric center of the window and pointing towards the center of the wheel hub. The theoretical symmetry axis vector V0 is a vector pointing from the theoretical center point of the hub to a point on the theoretical symmetry axis of the window (such as the center point of the window). Its direction angle has been pre-calibrated in the template database. Specifically, during the template construction stage, the geometric parameters of each window, including the direction and length of the symmetry axis, are obtained through CAD drawings or high-precision measuring equipment, and then its theoretical direction vector V0 is defined. The angle between vectors V and V0 is calculated, and this angle is the window deviation angle.
[0096] In a preferred embodiment, the structural feature information further includes the theoretical geometric dimension parameters of each of the spoke windows;
[0097] The process of locating and filtering the wheel hub window outline in the processed image includes the following steps:
[0098] Perform contour search on the processed image to obtain all candidate contours;
[0099] For each candidate profile, calculate multiple Euclidean distances between its corner points and the coordinates of the current hub center point;
[0100] The maximum and minimum distances are calculated from a plurality of Euclidean distances, and the average of the maximum and minimum distances is obtained as the feature reference distance of the candidate contour.
[0101] The feature reference distance is matched with the theoretical geometric dimension parameters of the corresponding window in the wheel hub template data;
[0102] If a match is successful, the candidate contour is determined to be the hub window contour.
[0103] Specifically, a contour search algorithm is used to obtain all potential contours within the defined rectangular area. These contours may include real window contours, bright spots caused by reflections, stains, background noise, etc., collectively referred to as candidate contours. Euclidean distance is calculated: for each candidate contour, all its corner points (or sampling points on the contour) are traversed, and the distance from each point to the current hub center point (C0) is calculated. x C y The straight-line distance, i.e., the Euclidean distance, is calculated as follows: Feature reference distance calculation: For a candidate contour, the above calculation yields a set of distance values. Find the maximum value (the point farthest from the center on the contour) and the minimum value (the point closest to the center) from this set, and then calculate the arithmetic mean of these two values. This average value is the feature reference distance of the contour. This value cleverly summarizes the size of the contour on the radial scale. Matching with theoretical geometric parameters: Read the theoretical geometric parameters of the current target window from the template data, such as the theoretical radial length L of the window. Compare the feature reference distance of each contour calculated in the previous step with L. If the difference is within a preset error range (e.g., ±3%), the contour is considered to match the target window size. The first successfully matched candidate contour is identified as the hub window contour and used for subsequent calculations.
[0104] This implementation method greatly improves the accuracy and reliability of contour screening, effectively eliminating false contours caused by uneven lighting, slight oil stains, background interference, etc., ensuring that the system can still work stably in complex industrial environments.
[0105] In a preferred embodiment, before determining the expected location of the target window region to be analyzed in the visual image, the method further includes the following steps:
[0106] Based on the hub template data, the theoretical direction vector of each spoke window is obtained, and the theoretical direction vector is the direction from the theoretical center point to the theoretical axis of symmetry of each window;
[0107] By rotating each of the theoretical direction vectors by the initial deflection reference angle, the predicted direction vector of each of the spoke windows in the visual image is calculated.
[0108] Calculate the angle of deviation between each predicted direction vector and the preset reference direction vector;
[0109] The spoke window corresponding to the predicted direction vector with the smallest absolute value of the deviation angle is selected as the first target analysis window;
[0110] Determining the expected location of the target window region to be analyzed in the visual image includes the following steps:
[0111] Based on the theoretical geometric dimensions of the first target analysis window and the current hub center point coordinates, a target rectangular region is delineated in the visual image as the expected location of the target window region.
[0112] Specifically, the theoretical direction vector is obtained as follows: A theoretical direction vector is predefined for each spoke window in the hub template database. For each spoke window, its theoretical direction vector... It is a unit vector pointing from the center of the hub theory to the axis of symmetry of the window theory (usually radial), whose components and The theoretical symmetry axis of the window has been calibrated in the database; it is typically a radial line passing through the geometric center of the window and pointing towards the center of the hub. The direction angle of this vector (the angle with the X-axis of the image coordinate system) is precisely recorded. Calculating the predicted direction vector: After obtaining the initial deflection reference angle θ, the system mathematically rotates the theoretical direction vector of each window by the same angle θ (achieved through rotation matrix operations). The resulting vector is the predicted direction vector V of that window in the current image. pThis operation is equivalent to simulating the physical rotation of a wheel hub in the software, predicting the current orientation of each window. Calculating the deviation angle: The system presets a reference direction vector, typically (0, -1) (i.e., the vertically upward direction in the image coordinate system, pointing towards the 12 o'clock position). The angle Δα between each predicted direction vector and this preset reference direction vector is calculated. This angle visually represents the degree of deviation between the current orientation of each window and the ideal observation direction. Selecting the first target analysis window: The absolute values of the deviation angle Δα corresponding to all windows are compared, and the one with the smallest absolute value is selected. This means that the system automatically selects the window whose orientation is closest to vertically upward (i.e., the most "positive") in the current posture as the first target analysis window. This is because the image distortion of this window is minimal, the features are clearest, and it is most conducive to subsequent detailed analysis. Delineate the target rectangular region: Based on the theoretical geometric dimensions (such as width W and height H) of the selected first target analysis window, and using the direction pointed to by its predicted direction vector as a reference, and with the current hub center point coordinates as the reference origin, delineate a rectangular region (ROI) in the image that exactly encloses the window. This ROI is the expected location of the target window region used for subsequent refined feature extraction.
[0113] In a preferred embodiment, defining the target rectangular region in the visual image as the expected location of the target window region includes the following steps:
[0114] Based on the theoretical geometric dimension parameters of the first target analysis window, the preset expansion ratio of the reference rectangular region is calculated, and the preset expansion ratio is positively correlated with the absolute value of the initial deflection reference angle.
[0115] Based on the current hub center point coordinates, the predicted direction vector of the first target analysis window, and the expanded size corresponding to the preset expansion ratio, calculate the vertex image coordinates of the four vertices of the base rectangular region after expansion;
[0116] Based on the vertex image coordinates of the four vertices, a corresponding local rectangular region is delineated in the visual image, and the local rectangular region is used as the target rectangular region.
[0117] Specifically, the preset expansion ratio is calculated: the system pre-sets a baseline expansion ratio S. base (For example, 1.2, which is a 20% magnification). This ratio will establish a functional relationship with the absolute value of the initial deflection reference angle θ, for example, S = S base+ k * |θ|, where k is an empirically set coefficient. This means that the larger the initial deviation angle, the less accurate the predicted window position may be, and the more severe the perspective distortion may be. Therefore, a larger outward expansion ratio S is needed to ensure that the window outline is completely contained within the ROI. Specifically, the predicted direction vector is predefined in the template database, and the angle of the predicted direction vector refers to the new vector obtained by rotating the theoretical direction vector by an initial deflection reference angle θ (i.e., the predicted direction vector V). p The angle between the predicted direction vector V and the positive X-axis of the image coordinate system is calculated using the following formula: First, calculate the rotated predicted direction vector V. p : , , among which, (V tx V ty The theoretical direction vector components are retrieved from the database, and θ is the initial deflection reference angle. Then, the angle of the predicted direction vector is calculated. : This angle This is the rotation angle required for subsequent coordinate transformations. Further, the process of calculating the image coordinates of the four vertices of the expanded rectangle is as follows: Using the current hub center point (C... x C y Using the theoretical geometric dimensions of the window (width W, height H) and the expansion ratio S as the origin of the coordinate transformation, calculate the actual expanded dimensions W′=W×S, H′=H×S. Define a local coordinate system with the theoretical center of the window as the origin and the coordinate axes parallel to the image coordinate system. In this local coordinate system, the coordinates of the four vertices of an unrotated, axis-aligned reference rectangle are: P1′=(-W′ / 2,-H′ / 2), P2′=(W′ / 2,-H′ / 2), P3′=(W′ / 2,H′ / 2), P4′=(-W′ / 2,H′ / 2). Rotate these four vertices around the origin of the local coordinate system (i.e., the theoretical center of the window) by an angle. The rotation formula is (with vertex as the base) (For example) , Using this formula, we obtain the coordinates of the four vertices after rotation. Since the corresponding point of the local coordinate system origin in the image coordinate system is... Where D is the theoretical distance from the center of the hub to the center of the window, the rotated coordinates are then translated to the image coordinate system: P i = ( , This allows us to calculate the image coordinates of the four vertices P1, P2, P3, and P4 of the expanded rectangle. Delineating the local rectangular region: Based on the calculated image coordinates of the four vertices, determine a tilted (direction consistent with the predicted direction vector) or axis-aligned rectangular region in the image, and define this region as the local rectangular region, which serves as the final target rectangular region.
[0118] This implementation significantly improves the robustness and adaptability of the algorithm. In industrial settings, the initial placement angle of the wheel hub can be highly random. This method ensures that even with large angular deviations, the detection area defined by the system always completely includes the target window, avoiding detection failures caused by features being cut off by region boundaries, thus guaranteeing the success rate and reliability of the positioning process.
[0119] In a preferred embodiment, after delineating the corresponding local rectangular region in the visual image based on the vertex image coordinates of the four vertices, the method further includes the following steps:
[0120] Image quality assessment is performed on the image within the defined local rectangular region in the visual image, and the local contrast of the local rectangular region is calculated;
[0121] The step of using the local rectangular region as the target rectangular region includes the following steps:
[0122] If the local contrast is greater than or equal to a preset contrast threshold, then the local rectangular region is taken as the target rectangular region.
[0123] Specifically, image quality assessment and calculation of local contrast: After delineating a local rectangular region, the system does not immediately perform feature extraction, but first assesses the image quality within that region. The assessment method is to calculate the local contrast of the grayscale image in that region. A common calculation method is the standard deviation method: calculate the standard deviation of the grayscale values of all pixels within the ROI; the larger the standard deviation, the higher the contrast and the better the image quality. If the local contrast is greater than or equal to a preset contrast threshold, it indicates that the image in that region is clear, the features are highly visible, and it meets the requirements for subsequent processing. The system then formally identifies this local rectangular region as the target rectangular region and proceeds to the next step of the feature extraction process.
[0124] Furthermore, after calculating the local contrast of the local rectangular region, the method further includes the following steps:
[0125] If the local contrast is less than the preset contrast threshold, then the spoke window corresponding to the prediction direction vector with the second smallest absolute value of the deviation angle is taken as the second target analysis window, and the local rectangular area corresponding to the second target analysis window is redefined until the local contrast is greater than or equal to the preset contrast threshold.
[0126] Specifically, the analysis window is reselected: if the local contrast is less than the preset contrast threshold, it indicates that the image quality of the area where the currently selected first target analysis window is located is unqualified (e.g., there is severe reflection or shadow). At this point, the system will not terminate with an error, but will initiate a fault-tolerant process. It backtracks to all the deviation angle results calculated in the above steps and selects the spoke window corresponding to the prediction direction vector with the second smallest absolute value as the second target analysis window. The second smallest absolute value of the deviation angle should be understood as: the value located second in the sequence after all the calculated absolute values of the deviation angles are sorted in ascending order of numerical value. This means that the system automatically selected the "second positive" window as the new candidate target. The system then re-defines the region and performs iterative judgment: for this second target analysis window, the system repeats the above steps: based on its direction and size, a new local rectangular region is redefined, and then the local contrast of the new region is recalculated and judged. This process can continue, iterating through the window sequence sorted from smallest to largest deviation angle (e.g., third target, fourth target, etc.) until a window whose corresponding region has a local contrast greater than or equal to the preset contrast threshold is found.
[0127] This implementation enhances the system's stability and practicality in complex and non-ideal industrial environments. It can automatically avoid feature areas damaged by temporary interference (such as changes in lighting or localized oil contamination) and actively seek out usable high-quality features, thereby ensuring the successful completion of the positioning task.
[0128] In a preferred embodiment, after setting the center point coordinates as the current wheel hub center point coordinates, the method further includes the following steps:
[0129] Calculate the ratio of the major axis to the minor axis of the fitted ellipse;
[0130] If the ratio of the major axis to the minor axis is greater than a preset ellipticity threshold, it is determined that the wheel hub in the visual image is tilted.
[0131] The control alarm device issues a tilt warning and suspends the positioning process.
[0132] Specifically, if the ratio of the major axis to the minor axis is greater than the preset ellipticity threshold, it means that the detected ellipse is too flat, and the tilt of the hub has exceeded the range that the system can safely and accurately compensate for through subsequent visual algorithms. At this time, the system logic determines that "the hub is tilted" and issues a tilt warning: When tilt is determined, the system control unit will clearly inform the on-site operator that an anomaly has occurred at the current workstation and immediately interrupt the currently executing positioning process loop. The control program will jump to a safe pause state, stop sending any subsequent motion commands to the rotating platform 4, thereby completely freezing the automated actions of the system and preventing the problem from worsening if it continues to operate in an abnormal state.
[0133] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. The above descriptions are only preferred embodiments of this application. It should be noted that due to the limitations of written expression, while there are objectively infinite specific structures, those skilled in the art can make several improvements, modifications, or changes without departing from the principles of this invention, and can also combine the above technical features in an appropriate manner. These improvements, modifications, changes, or combinations, or the direct application of the inventive concept and technical solution to other situations without modification, should all be considered within the scope of protection of this application.
Claims
1. A wheel hub visual positioning method applied to a laser de-burring system, characterized in that, The method comprises the following steps: acquiring a visual image of a wheel hub (3) to be positioned; identifying a target wheel hub type of the wheel hub (3) to be positioned based on the visual image; calling and traversing a wheel hub template database to obtain wheel hub template data corresponding to the target wheel hub type, the wheel hub template data comprising theoretical calibration points, a theoretical center point of a wheel hub, and structural feature information of the wheel hub; detecting actual calibration points of the wheel hub (3) to be positioned from the visual image; calculating a current attitude deviation of the wheel hub (3) to be positioned based on image coordinates of the actual calibration points, first template coordinates of the theoretical calibration points, second template coordinates of the theoretical center point, and the structural feature information; controlling a rotating platform (4) to adjust the pose of the wheel hub (3) to be positioned according to the current attitude deviation; repeating the above steps until the current attitude deviation is smaller than a preset tolerance threshold, and completing the positioning; the structural feature information comprises feature information of spoke windows of the wheel hub (3) to be positioned; and the feature information of the spoke windows comprises theoretical coordinates of window feature points; the calculation of the current attitude deviation of the wheel hub (3) to be positioned comprises the following steps: calculating an initial deflection reference angle according to the coordinate offset between the actual calibration points and the theoretical calibration points, and the theoretical center point; determining an expected position of a target window region that needs to be analyzed in the visual image based on the initial deflection reference angle and the theoretical coordinates of the window feature points; extracting target image features of the expected position, and calculating a window deviation angle based on the target image features, the window deviation angle being the current attitude deviation.
2. The wheel hub visual positioning method for a laser de-burring system according to claim 1, wherein: the calculation of the window deviation angle based on the target image features comprises the following steps: converting an image located in the target window region in the visual image into a grayscale image and performing binaryzation processing to obtain a processed image; positioning and screening a wheel hub window contour in the processed image; detecting a current wheel hub center point coordinate based on the visual image; calculating a symmetric center coordinate of the wheel hub window contour, and calculating the window deviation angle according to the relative positional relationship between the symmetric center coordinate and the current wheel hub center point coordinate.
3. The wheel hub visual positioning method for a laser de-burring system of claim 2, wherein: the structural feature information further comprises theoretical geometric size parameters of each spoke window; the positioning and screening of the wheel hub window contour in the processed image comprises the following steps: performing contour searching on the processed image to obtain all candidate contours; calculating a plurality of Euclidean distances between each corner point of each candidate contour and the current wheel hub center point coordinate; calculating a maximum distance and a minimum distance from the plurality of Euclidean distances, and taking an average value of the maximum distance and the minimum distance as a feature reference distance of the candidate contour; matching the feature reference distance with the theoretical geometric size parameters of a corresponding window in the wheel hub template data; if the matching is successful, determining that the candidate contour is the wheel hub window contour.
4. The wheel hub visual positioning method for a laser de-burring system of claim 1, wherein: The method further comprises the following steps before determining the expected position of the target window region in the visual image: The method further comprises the following steps before determining the expected position of the target window region in the visual image: Based on the hub template data, a theoretical direction vector of each spoke window is obtained, the theoretical direction vector being a direction from the theoretical center point to a theoretical symmetry axis of each window; Each theoretical direction vector is rotated by the initial deflection reference angle to obtain a predicted direction vector of each spoke window in the visual image; An angle of deviation between each predicted direction vector and a preset reference direction vector is calculated; A spoke window corresponding to the predicted direction vector with the smallest absolute value of the angle of deviation is selected as a first target analysis window; The method further comprises the following steps of determining the expected position of the target window region in the visual image:
5. The wheel hub visual positioning method for a laser de-burring system of claim 4, wherein: A target rectangular region is demarcated in the visual image as the expected position of the target window region according to the theoretical geometric size parameters of the first target analysis window and the current hub center point coordinates. The method further comprises the following steps of demarcating the target rectangular region in the visual image as the expected position of the target window region: Based on the theoretical geometric size parameters of the first target analysis window, a preset expansion ratio of a reference rectangular region is calculated, the preset expansion ratio being positively correlated with the absolute value of the initial deflection reference angle; Four vertex image coordinates of four vertices of the reference rectangular region after expansion are calculated according to the current hub center point coordinates, the predicted direction vector of the first target analysis window, and an expanded size corresponding to the preset expansion ratio; 6. The wheel hub visual positioning method for a laser de-burring system of claim 5, wherein: According to the vertex image coordinates of the four vertices, a corresponding local rectangular region is demarcated in the visual image, and the local rectangular region is taken as the target rectangular region. The method further comprises the following steps after demarcating the corresponding local rectangular region in the visual image according to the vertex image coordinates of the four vertices: An image quality of an image in the demarcated local rectangular region in the visual image is evaluated, and a local contrast of the local rectangular region is calculated. The method further comprises the following steps of taking the local rectangular region as the target rectangular region:
7. The wheel hub visual positioning method for a laser de-burring system of claim 6, wherein: If the local contrast is greater than or equal to a preset contrast threshold, the local rectangular region is taken as the target rectangular region. The method further comprises the following steps after calculating the local contrast of the local rectangular region:
8. The wheel hub visual positioning method for a laser de-burring system of claim 2, wherein: If the local contrast is less than the preset contrast threshold, a spoke window corresponding to a predicted direction vector with a second smallest absolute value of the angle of deviation is taken as a second target analysis window, and a local rectangular region corresponding to the second target analysis window is re-demarcated until the local contrast is greater than or equal to the preset contrast threshold. The method further comprises the following steps of detecting the current hub center point coordinates based on the visual image: An edge of the visual image is detected to obtain a hub outer edge contour; An ellipse fitting is performed on the hub outer edge contour to obtain a fitted ellipse; A center point coordinate of the fitted ellipse is calculated, and the center point coordinate is taken as the current hub center point coordinate.
9. The wheel hub visual positioning method for a laser de-burring system of claim 8, wherein: The method further comprises the following steps after taking the center point coordinate as the current hub center point coordinate: calculating a ratio of major and minor axes of the fitted ellipse; if the ratio of major and minor axes is greater than a preset ellipticity threshold, determining that the hub in the visual image is tilted; controlling an alarm device to issue a tilt warning and pause the positioning process.
Citation Information
Patent Citations
Device and method for positioning wheel hub work piece
CN104123542A
Hub grinding and polishing initial point positioning method based on vision and hub grinding and polishing system
CN116580086A