Geometric feature-based motor shaft type identification method

By using a geometric feature-based motor shaft type identification method, the area, perimeter, and ratio features of the motor shaft are extracted using simple image processing and scalar operations. This solves the problems of low identification efficiency and high cost in existing technologies, and achieves efficient and accurate motor shaft identification.

CN121640178APending Publication Date: 2026-03-10XI'AN POLYTECHNIC UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies for motor shaft identification suffer from low efficiency, high labor intensity, and susceptibility to misjudgment. Deep learning-based methods are costly and require high computing resources, while traditional image feature extraction algorithms are computationally intensive and sensitive to lighting and angle.

Method used

A method for identifying motor shaft types based on geometric features is adopted. By extracting the cross-sectional contour of the motor shaft, calculating the area feature value S, the perimeter feature value C, and the ratio feature value K, and matching it with a pre-stored standard model database, the identification is achieved using simple image processing and scalar operations.

Benefits of technology

It achieves efficient and low-cost motor shaft identification with high accuracy, strong robustness, insensitivity to changes in lighting and viewing angle, and is easy to deploy and maintain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121640178A_ABST
    Figure CN121640178A_ABST
Patent Text Reader

Abstract

The invention discloses a geometric feature-based motor shaft type identification method, and aims to solve the problems of low efficiency due to dependence on manual visual inspection or high requirement on computing resources due to dependence on a complex neural network algorithm in the prior art. According to the core scheme, an image of a motor shaft to be recognized is obtained, the contour of the image is extracted, and the area feature value and the perimeter feature value of the image are calculated to serve as first and second judgment features; calculating the ratio of the square of the area characteristic value to the square of the perimeter characteristic value as a third judgment characteristic; matching the first judgment feature, the second judgment feature and the third feature with an area feature value, a perimeter feature value and a feature ratio in a pre-stored standard motor shaft model database; and if the matching is successful, judging that the current motor shaft and the matched standard model are the same type. According to the method, a complex shape recognition problem is converted into stable and efficient scalar ratio calculation by utilizing an internal proportional relation of similar polygons and circles in geometry, and the method has the beneficial effects of being simple in recognition process, low in calculation resource demand and high in recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial automation and machine vision technology, and relates to a method for identifying motor shaft types based on geometric features. Background Technology

[0002] In the automated production process of motor shafts, different types of shaft parts need to be sorted and assembled at specific workstations. The traditional method relies on operators to visually identify and sort the shafts by observing their thickness, length, and other characteristics. This method is inefficient, labor-intensive, and prone to misjudgment due to subjective fatigue.

[0003] With technological advancements, some solutions have begun to employ machine vision-based recognition algorithms. While deep learning-based neural network methods offer high recognition accuracy, they suffer from several drawbacks: First, they require a large amount of labeled training data for model training, resulting in high upfront costs. Second, neural network models are complex, demanding significant hardware computing resources and exhibiting relatively slow inference speeds, making them unsuitable for large-scale deployment in cost-sensitive or real-time-critical industrial environments. Furthermore, some methods attempt to extract complex image features (such as SIFT and SURF) for matching, but these methods still involve substantial computation and are highly sensitive to image quality (e.g., lighting and angle).

[0004] Therefore, there is an urgent need in this field for a motor shaft identification solution that can balance recognition efficiency, accuracy, and low-cost deployment. Summary of the Invention

[0005] The purpose of this invention is to provide a method for identifying motor shaft types based on geometric features, which solves the problems of low efficiency of manual visual inspection or high computational resource requirements of relying on complex neural network algorithms.

[0006] The technical solution adopted in this invention is a motor shaft type identification method based on geometric features, and the specific operation is as follows: S1: Acquire an image of the motor shaft to be identified, and extract the cross-sectional profile of the motor shaft along the axial direction; S2: Calculate the area feature value S and perimeter feature value C of the contour, and use them as the first determination feature and the second determination feature, respectively; S3: Calculate the third determination feature K based on the area feature value S and the perimeter feature value C, where K = C. 2 / S; S4: Match the first determination feature S, the second determination feature C and the third determination feature K with the pre-stored standard model database. The standard model database stores the first determination feature reference value S0, the second determination feature reference value C0 and the third determination feature reference value K0 of each model of standard motor shaft. S5: If two of the three features S, C, and K match the reference value in the database, it means that the current motor shaft to be identified matches the model in the database corresponding to this reference value. Based on the matching result, the model of the current motor shaft is output.

[0007] The invention is further characterized in that, In step S4, if the absolute value of the difference between the first determination feature S and the reference value S0 of the first determination feature is marked as ΔS, ΔC, ΔK; ΔS, ΔC, ΔK will be compared with the reference values ​​S0, C0, K0 respectively. If the difference is less than 1% to 5%, it can be determined as a successful match.

[0008] In step S4, if the first determination feature reference value S0, the second determination feature reference value C0 and the third determination feature reference value K0 corresponding to each model of standard motor shaft stored in the standard model database are the same, then the following supplementary step is performed: S41: Calculate the fourth determination feature of the contour, that is, the centroid coordinates of the contour. S42: Match the fourth determination feature with the corresponding reference value in the standard model database to finally determine the model of the current motor shaft.

[0009] In step S4, if multiple models of motor shafts have the same or similar first, second and third determination feature reference values, then during matching, a fourth determination feature is simultaneously calculated and compared. The fourth determination feature includes the centroid coordinates of the contour for accurate differentiation.

[0010] The step S1 of extracting the contour of the motor shaft specifically includes: preprocessing, binarizing, and contour finding the acquired image to obtain a closed polygonal contour representing the outer edge of the motor shaft.

[0011] The standard model database was created in the early stages of implementation by taking more than three images of different motor shafts from a fixed position using a camera, performing contour lookup and recognition, averaging the collected features, marking them as reference values, and storing them in the database as the standard model database.

[0012] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, performs the steps of the method described above.

[0013] A computer-readable storage medium storing a computer program and first to fourth determination feature reference values, wherein when the program is executed by a processor, it reads four feature reference values ​​and matches them with four feature values ​​calculated by the processor to implement the steps of the above method.

[0014] Compared with the prior art, the technical solution provided by the present invention has the following significant advantages: (1) High efficiency and low cost: The algorithm process is simple, involving only basic image processing and scalar operation, with extremely low computational complexity. It does not require expensive computing hardware such as GPUs and can run in real time on ordinary industrial PLCs or embedded vision controllers, greatly reducing deployment costs.

[0015] (2) High accuracy and robustness: Based on rigorous geometric principles, the extracted features (S,C and S / C ratio) are stable and reliable, and are not sensitive to changes in illumination or slight changes in viewing angle. In production line environments with fixed models, the recognition accuracy is high.

[0016] (3) Easy to implement and maintain: This invention solves the problems of computational complexity and poor real-time performance of traditional image feature extraction algorithms. It does not require the collection of massive amounts of data to train complex neural network models, and the establishment of a standard feature database is simple and quick. When a new shaft type is added to the production line, only a small number of sample images need to be collected to update the database, making maintenance convenient. Attached Figure Description

[0017] Figure 1 This is a flowchart of the motor shaft type identification method provided in the embodiments of the present invention.

[0018] Figure 2 This is a schematic diagram of the standard motor shaft outline in an embodiment of the present invention, showing its typical characteristics of being a combination of polygons and semicircles. Figure 3 This is a flowchart of constructing a standard model database in an embodiment of the present invention.

[0019] Figure 4 This is a schematic diagram of the image acquisition device for identifying motor shafts according to the present invention.

[0020] Figure 5 This is a hardware structure block diagram of the electronic device in an embodiment of the present invention. Detailed Implementation

[0021] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0022] Example 1 Reference Figure 1 This embodiment provides a method for identifying motor shaft type based on geometric features. The specific steps are as follows: Step 101, Image Acquisition: Under fixed lighting conditions, use an industrial camera at a fixed position to photograph the motor shaft to be identified on the conveyor belt, acquiring its grayscale image; Step 102, Contour Extraction: Perform Gaussian filtering to denoise the grayscale image, then use Otsu's method for image binarization, and finally use the contour search algorithm (Suzuki85 algorithm) to extract the largest external contour in the image, i.e., the projected contour of the motor shaft, such as... Figure 2 As shown. Step 103, Feature Calculation: Based on the extracted contour, the pixel area S of the region enclosed by the contour is calculated using Green's formula as the first judgment feature, and the pixel perimeter C of the contour is calculated as the second judgment feature. Subsequently, the third judgment feature K = C is calculated. 2 Step 104, Database Matching: The pre-stored standard model database records the S, C, K reference values ​​for three models (A, B, C) of motor shafts, namely S0_AC0_AK0_A, S0_BC0_BK0_B, and S0_CC0_CK0_C. Calculate the absolute difference between the current S, C, K and S0_AC0_AK0_A, labeled as ΔS, ΔC, and ΔK. Ratio ΔS, ΔC, and ΔK to the reference values ​​S, C, and K respectively. If the ratio for model A is less than 1% to 5%, the current shaft is determined to be model A. The method for determining models B and C is the same as the principle for determining model A.

[0023] Step 105, Result Output: Send the identification result "Type A" to the PLC controller, and the PLC controls the robotic arm to put the current axis into the Type A material box.

[0024] Example 2 Based on Example 1, assuming that the S0_AC0_AK0_A and S0_BC0_B values ​​of model A and model B are very close and easy to misjudge; then in step 104, when the S, C, K values ​​fall into the common threshold range of A and B, the supplementary judgment process is started. First, calculate the centroid coordinates (X, Y) of the current contour; The specific formula for calculating the centroid coordinates (X, Y) is as follows:

[0025] in, It is the sum of the x-coordinates of all points. ; It is the sum of the y-coordinates of all points. ; Represents the number of points.

[0026] Then, retrieve the centroid coordinate reference values (Xa, Ya) and (Xb, Yb) of shaft type A and shaft type B from the standard database. Due to the geometric shape differences between shaft types A and B, there is a systematic offset in their centroid positions in the image. Finally, calculate the Euclidean distances between the current centroid coordinates (X, Y) and (Xa, Ya) and (Xb, Yb). Select the type with the shorter distance as the final recognition result. By introducing the fourth determination feature, the problem of differentiating similar types is effectively solved.

[0027] Formula for Euclidean distance:

[0028]

[0029] If Da < Db, it can be determined as type A.

[0030] Example 3: This example provides an electronic device for executing the above method, as Figure 4 shown, including at least one processor, a memory, and a computer program stored on the memory and executable by the processor. When the processor executes the program, it implements each step described in Example 1 or 2 above. This electronic device can be an industrial computer, an embedded vision system, or an industrial camera with computing capabilities.

[0031] Example 4 The present invention provides a method for identifying the type of motor shaft based on geometric features. The core inventive point lies in creatively applying the basic geometric principles of similar polygons and similar circles, and finding that for a motor shaft with a fixed shape composed of a combination of polygons and semi - circles / sectors, the ratio of its area (S) to the square of its perimeter (C) (i.e., K = C 2 / S) is a stable and effective classification feature.

[0032] The theoretical basis for this conclusion is as follows: According to the properties of similar polygons, the ratio of their areas is equal to the square of the similarity ratio, and the ratio of their perimeters is equal to the similarity ratio. Therefore, for two similar polygons, there is S1 / S2 = (C1 / C2) 2 , that is, C 2 / S is a constant; and if two polygons are congruent, then the similarity ratio is equal to 1, and at this time C 2 / S = 1. At the same time, the inventor found through in - depth analysis and experiments that in engineering practice, since the motor shaft usually contains arc parts (such as the ends) that also satisfy the above similarity and congruence properties, that is, for similar figures (with semi - circles) S1 / S2 = (C1 / C2) 2 , C 2 / S = , for the same arc C 2Given that S=1, and the actual shape of the motor shaft may be a combination of polygons and circles, analysis shows that S, C, and C can also be used. 2 Using area S as a feature, motor shafts are classified based on image information. Extensive testing has verified that using area S as the first criterion feature, perimeter C as the second feature value, and S / C as the third criterion feature (K) provides better robustness and stability while maintaining discriminative power. This feature is particularly effective in distinguishing different shaft types from images acquired under identical imaging conditions. However, because this criterion is sufficient but not necessary, strict application may be overly sensitive, leading to misclassification of motor shafts with the same third criterion feature (K) but different centroids as the same type. Therefore, a fourth criterion feature, the centroid point, is needed for accurate classification.

[0033] like Figure 3 As shown, the standard model database of this invention is constructed in the early stage by setting a camera at a fixed position to collect images of multiple motor shafts of different models, taking more than three images; contour lookup and recognition are performed, the contour perimeter and area value are calculated, and K = C is calculated. 2 / S generates the S, C, and K values ​​for this model. Then, the average of various characteristic values ​​from multiple samplings is calculated, marked as reference values, and stored in the database as a standard model database.

[0034] Example 5 S1: Acquire an image of the motor shaft to be identified, and extract the cross-sectional profile of the motor shaft along the axial direction; S2: Calculate the area feature value S and perimeter feature value C of the contour, and use them as the first determination feature and the second determination feature, respectively; Among them, the perimeter of the outline is an approximate value obtained by sampling and summing the numerical values ​​of the drawn outer contour points, including semicircular arcs, straight segments, keyway edges, etc. S3: Calculate the third judgment feature K based on the area feature value S and the perimeter feature value C; S4: Match the first determination feature S, the second determination feature C and the third determination feature K with the pre-stored standard model database. The standard model database stores the first determination feature reference value S0, the second determination feature reference value C0 and the third determination feature reference value K0 of each model of standard motor shaft. In this embodiment, S0 = 32.26 cm 2 C0 = 53.71 cm, K0 = 89.42 Calculate the absolute values ​​of the differences between the three judgment features S, C, K and the reference values ​​S0, C0, K0 respectively, and label them as ΔS, ΔC, ΔK. Ratios of ΔS, ΔC, ΔK to the reference values ​​S0, C0, K0 respectively are used. If the ratio is less than 1% to 5%, the match is considered successful.

[0035] Regarding the threshold ranges for the three measurements on the A-axis: Area threshold range: (0, 0.32) ~ (0, 1.61) Perimeter threshold range: (0, 0.54) ~ (0, 2.69) Ratio threshold range: (0, 0.89) ~ (0, 4.47) The three thresholds mentioned above represent the difference between the measured value and the reference value. Within this range, the value belongs to the category of the A or B axis model. However, the range varies depending on the size, so each size requires a specific range. Therefore, the difference is compared to the standard value, and this ratio is fixed, for example, less than 1%. By using the difference and ratio method, the range can be unified to less than 1% regardless of the size. If a higher precision is desired, it can be unified to less than 5%.

[0036] S5: If two of the three features S, C, and K match the reference value in the database, it means that the current motor shaft to be identified matches the model in the database corresponding to this reference value. Based on the matching result, the model of the current motor shaft is output.

[0037] Example 6 S1: Acquire an image of the motor shaft to be identified, and extract the cross-sectional profile of the motor shaft along the axial direction; S2: Calculate the area feature value S and perimeter feature value C of the contour, and use them as the first determination feature and the second determination feature, respectively; Among them, the perimeter of the outline is an approximate value obtained by sampling and summing the numerical values ​​of the drawn outer contour points, including semicircular arcs, straight segments, keyway edges, etc. S3: Calculate the third judgment feature K based on the area feature value S and the perimeter feature value C; S4: Match the first determination feature S, the second determination feature C and the third determination feature K with the pre-stored standard model database. The standard model database stores the first determination feature reference value S0, the second determination feature reference value C0 and the third determination feature reference value K0 of each model of standard motor shaft. In this embodiment, S0 = 43.55 cm 2 C0 = 61.40 cm, K0 = 86.57; Calculate the absolute values ​​of the differences between the three judgment features S, C, K and the reference values ​​S0, C0, K0 respectively, and label them as ΔS, ΔC, ΔK. Ratios of ΔS, ΔC, ΔK to the reference values ​​S0, C0, K0 respectively are used. If the ratio is less than 1% to 5%, the match is considered successful.

[0038] Regarding the threshold ranges for the three measurements on the B-axis: Area threshold range: (0, 0.44) ~ (0, 2.18) Perimeter threshold range: (0, 0.61) ~ (0, 3.07) Ratio threshold range: (0, 0.87) ~ (0, 4.33) The three thresholds mentioned above represent the difference between the measured value and the reference value. Within this range, the value belongs to the category of the A or B axis model. However, the range varies depending on the size, so each size requires a specific range. Therefore, the difference is compared to the standard value, and this ratio is fixed, for example, less than 1%. By using the difference and ratio method, the range can be unified to less than 1% regardless of the size. If a higher precision is desired, it can be unified to less than 5%.

[0039] S5: If two of the three features S, C, and K match the reference value in the database, it means that the current motor shaft to be identified matches the model in the database corresponding to this reference value. Based on the matching result, the model of the current motor shaft is output.

[0040] Figure 4 This invention relates to a device for acquiring images of a motor shaft. A longitudinal telescopic rod is installed on one side of a measuring platform. A camera is connected to the upper part of the telescopic rod via a connecting rod. A light source is installed on the upper part of the camera. The shaft is placed on the measuring platform for image acquisition. The camera transmits the acquired image information to a controller. Figure 5 As shown, the controller processes the data. The controller includes a memory and a CPU. As an industrial computer / vision controller, it achieves a closed-loop process of image acquisition, processing, and control through modular design. The system's input (camera) is responsible for image data acquisition, and the output (PLC robotic arm, used to grip and place the identified axis) executes control actions. The controller includes a computer program, memory, and processor. It provides algorithms, storage, and support. The camera is responsible for capturing target images and transmitting them to the electronic device via I / O interfaces. The CPU in the electronic device calls the program in memory to process the image. After processing, the electronic device sends control signals to the PLC robotic arm via I / O interfaces. The PLC robotic arm executes actions according to the signals, completing the detection-control closed loop.

[0041] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for recognizing a motor shaft type based on geometric features, characterized by, The specific operation steps are as follows: S1: obtaining an image of a motor shaft to be identified, and extracting a cross-sectional profile of the motor shaft along an axial direction; S2: calculating an area characteristic value S and a perimeter characteristic value C of the profile as a first determination characteristic and a second determination characteristic respectively; S3: Calculate a third decision feature K from the area feature value S and the perimeter feature value C, where K = C / S 2 / S; S4: matching the first determination characteristic S, the second determination characteristic C and the third determination characteristic K with a pre-stored standard model database, wherein the standard model database stores a first determination characteristic reference value S0, a second determination characteristic reference value C0 and a third determination characteristic reference value K0 of each standard motor shaft; S5: among the first determination characteristic S, the second determination characteristic C and the third determination characteristic K, if two of them match the reference values in the database, it indicates that the current motor shaft to be identified matches the model in the database corresponding to the reference values, and the model of the current motor shaft is output according to the matching result.

2. The geometric feature based motor shaft type recognition method of claim 1, wherein: In step S4, the absolute values of the differences between the three determination characteristics S, C and K and the reference values S0, C0 and K0 are calculated respectively and marked as ΔS, ΔC and ΔK; ΔS, ΔC and ΔK will be respectively compared with the reference values S0, C0 and K0, and if the ratio is less than 1%~5%, it is determined as a matching success.

3. The geometric feature-based motor shaft type recognition method of claim 2, wherein, In step S4, if the first determination characteristic reference value S0, the second determination characteristic reference value C0 and the third determination characteristic reference value K0 corresponding to each standard motor shaft stored in the standard model database are the same, the following supplementary steps are performed: S41: calculating a fourth determination characteristic of the profile, i.e. the centroid coordinates of the profile; S42: matching the fourth determination characteristic with the corresponding reference values in the standard model database to finally determine the model of the current motor shaft.

4. The geometric feature-based motor shaft type recognition method of claim 2, wherein, In step S4, if there are multiple motor shafts of the same or similar first, second and third determination characteristic reference values, the fourth determination characteristic including the centroid coordinates of the profile is calculated and compared at the same time during matching to accurately distinguish them.

5. The geometric feature-based motor shaft type recognition method of claim 2, wherein, The profile extraction of the motor shaft in step S1 specifically includes: pre-processing, binarization and profile finding of the obtained image to obtain a closed polygon profile representing the outer edge of the motor shaft.

6. The geometric feature-based motor shaft type recognition method of claim 2, wherein The standard model database is obtained by setting a camera at a fixed position, taking more than 3 images of each motor shaft of different models for profile finding and identification, and then averaging the collected characteristics to mark as reference values and store in the database as the standard model database.

7. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the steps of the method of any one of claims 1 to 6 when executing the program.

8. A computer-readable storage medium having stored thereon a computer program and first to fourth determination characteristic reference values, characterized by The program is executed by the processor to read four characteristic reference values and match them with four characteristic values calculated by the processor to implement the steps of the method of any one of claims 1 to 6.