Gear detection method and device, computer equipment and storage medium
Through the detection method of gears, the overlapping process of the reference image and the image to be detected is solved, and the problem of not being able to effectively detect the assembly relationship of the two gears in the prior art is realized, and problems such as premature wear or tooth fracture are avoided.
Patent Information
- Application Number
- CN202411986977.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art mainly detects a single gear, and cannot effectively detect the assembly relationship between the two gears, resulting in premature wear or tooth fractures and other problems.
By acquiring the reference image of the standard gear, the state of the gear to be detected is monitored. When the gear to be detected is transferred to the same state as the standard gear, the image of the gear to be detected is collected and overlapped with the reference image to determine whether the assembly relationship of the gear is qualified.
The detection of two meshing gears is realized, which can effectively judge the assembly relationship of the gears and avoid problems such as premature wear or tooth fracture.
Smart Images

Figure CN120008917A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gears, and in particular to a gear detection method, device, computer equipment and storage medium. Background Art
[0002] During the use of gears, basically a single gear is tested. If the gear is still in good condition, it can continue to be used. If the gear is worn and no longer in good condition, it needs to be replaced. However, during use, even if both gears are in good condition, if there is a problem with the assembly, it will still cause premature wear, even worse than tooth breakage and cracking. Summary of the invention
[0003] In view of the shortcomings of the prior art, the present invention proposes a gear detection method, device, computer equipment and storage medium, aiming to solve the problem of only detecting a single gear.
[0004] The technical solution proposed by the present invention is:
[0005] A method for detecting a gear, the method comprising:
[0006] Acquire a reference image, where the reference image is an image of a standard first gear meshing with a standard second gear;
[0007] Acquiring the current state of the standard first gear according to the reference image;
[0008] Monitoring the status of the first gear to be detected and the second gear to be detected;
[0009] If it is monitored that the first gear to be detected rotates to the same state as the current state of the standard first gear, an image to be detected is collected, where the image to be detected is an image of the first gear to be detected meshing with the second gear to be detected;
[0010] Performing a coincidence process on the image to be detected and the reference image;
[0011] If the image to be detected completely overlaps with the reference image, it is determined that the first gear to be detected, the second gear to be detected, and the assembly relationship between the first gear to be detected and the second gear to be detected are all qualified.
[0012] Furthermore, the step of performing a superposition process on the image to be detected and the reference image includes:
[0013] Performing image processing on the image to be detected, and determining whether the contour of the first gear to be detected in the image to be detected overlaps with the contour of the standard first gear in the reference image;
[0014] If yes, determining whether the contour of the second gear to be detected in the image to be detected overlaps with the contour of the standard second gear in the reference image;
[0015] If yes, determining whether the meshing profile of the first gear to be detected and the second gear to be detected in the image to be detected overlaps with the meshing profile of the standard first gear and the standard second gear in the reference image;
[0016] If so, it is considered that the image to be detected completely overlaps with the reference image.
[0017] Further, after the step of determining whether the contour of the first gear to be detected in the image to be detected overlaps with the contour of the standard first gear in the reference image, the method further comprises:
[0018] If not, it is determined that the first gear to be tested is unqualified.
[0019] Further, after the step of determining whether the contour of the second gear to be detected in the image to be detected overlaps with the contour of the standard second gear in the reference image, the method further comprises:
[0020] If not, it is determined that the second gear to be tested is unqualified.
[0021] Further, after the step of determining whether the meshing profile of the first gear to be detected and the second gear to be detected in the image to be detected overlaps with the meshing profile of the standard first gear and the standard second gear in the reference image, the method further comprises:
[0022] If not, it is determined that the assembly relationship between the first gear to be detected and the second gear to be detected is unqualified.
[0023] Further, in the step of determining whether the contour of the first gear to be detected in the image to be detected overlaps with the contour of the standard first gear in the reference image, the step includes:
[0024] Using the center point of the first gear to be detected in the image to be detected and the center point of the standard first gear as positioning points, the first gear to be detected in the image to be detected is superimposed on the standard first gear;
[0025] Determine whether the outlines of the two overlap completely;
[0026] If yes, taking the center point of the first gear to be detected in the image to be detected and the center point of the standard first gear as positioning points, the standard first gear is superimposed on the first gear to be detected in the image to be detected;
[0027] Determine whether the outlines of the two overlap completely;
[0028] If so, it is considered that the contour of the first gear to be detected in the image to be detected overlaps with the contour of the standard first gear in the reference image.
[0029] Furthermore, the step of judging whether the outlines of the two overlap completely includes:
[0030] If not, it is considered that the contour of the first gear to be detected in the image to be detected and the contour of the standard first gear in the reference image do not overlap.
[0031] The present invention also provides a gear detection device, the device comprising:
[0032] A first acquisition module is used to acquire a reference image, where the reference image is an image of a standard first gear meshing with a standard second gear;
[0033] A second acquisition module, used for acquiring the current state of the standard first gear according to the reference image;
[0034] A monitoring module, used for monitoring the states of the first gear to be detected and the second gear to be detected;
[0035] an acquisition module, configured to acquire an image to be detected if it is monitored that the first gear to be detected rotates to the same state as the current state of the standard first gear, wherein the image to be detected is an image of the first gear to be detected meshing with the second gear to be detected;
[0036] A processing module, used for performing a coincidence process on the image to be detected and the reference image;
[0037] A determination module is used to determine that the first gear to be detected, the second gear to be detected, and the assembly relationship between the first gear to be detected and the second gear to be detected are all qualified if the image to be detected completely overlaps with the reference image.
[0038] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the above method when executing the computer program.
[0039] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0040] According to the above technical solution, the beneficial effect of the present invention is as follows: two gears that are meshing are detected, and the objects of detection include the two gears and the assembly relationship of the two gears, thereby solving the problem of only detecting a single gear. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a flow chart of a gear detection method provided by an embodiment of the present invention;
[0042] Figure 2 It is a functional module diagram of a gear detection device provided by an embodiment of the present invention;
[0043] Figure 3 It is a schematic block diagram of the structure of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0045] like Figure 1 As shown, an embodiment of the present invention provides a method for detecting a gear, the method comprising:
[0046] Step S101: Acquire a reference image, where the reference image is an image of a standard first gear meshing with a standard second gear.
[0047] Two standard gears, that is, a standard first gear and a standard second gear, are selected for meshing, and the meshing connection between the standard first gear and the standard second gear is also standard, that is, a standard assembly relationship.
[0048] Step S102: Acquire the current state of the standard first gear according to the reference image.
[0049] The current state of the standard first gear is used as a trigger for capturing an image of the gear to be inspected.
[0050] Step S103: monitor the status of the first gear to be detected and the second gear to be detected.
[0051] The first gear to be detected and the second gear to be detected are in meshing connection, and the rotation of the two is monitored.
[0052] Step S104: if it is monitored that the first gear to be detected rotates to the same state as the current state of the standard first gear, an image to be detected is collected, where the image to be detected is an image of the first gear to be detected meshing with the second gear to be detected.
[0053] When the current state of the first gear to be tested is the same as the current state of the standard first gear, a photo is taken to collect the current image of the first gear to be tested and the second gear to be tested. The angle and focal length of the photo are the same as those of the image of the meshing of the standard first gear and the standard second gear, avoiding errors caused by the photo.
[0054] Step S105: Overlap the image to be detected with the reference image.
[0055] After the image to be detected is obtained, the image to be detected and the reference image are overlapped.
[0056] Step S106: If the image to be detected completely overlaps with the reference image, it is determined that the first gear to be detected, the second gear to be detected, and the assembly relationship between the first gear to be detected and the second gear to be detected are all qualified.
[0057] If the image to be inspected completely overlaps with the reference image, it is considered that the first gear to be inspected, the second gear to be inspected, and the assembly relationship between the first gear to be inspected and the second gear to be inspected are all qualified.
[0058] In this embodiment, step S105 includes:
[0059] Performing image processing on the image to be detected, and determining whether the contour of the first gear to be detected in the image to be detected overlaps with the contour of the standard first gear in the reference image;
[0060] If yes, determining whether the contour of the second gear to be detected in the image to be detected overlaps with the contour of the standard second gear in the reference image;
[0061] If yes, determining whether the meshing profile of the first gear to be detected and the second gear to be detected in the image to be detected overlaps with the meshing profile of the standard first gear and the standard second gear in the reference image;
[0062] If so, it is considered that the image to be detected completely overlaps with the reference image.
[0063] The overlap processing is divided into three steps. The first step is to determine whether the contour of the first gear to be detected overlaps with the contour of the standard first gear. The second step is to determine whether the contour of the second gear to be detected overlaps with the contour of the standard second gear. The third step is to determine whether the meshing contour of the first gear to be detected and the second gear to be detected overlaps with the meshing contour of the standard first gear and the standard second gear.
[0064] In this embodiment, after the step of determining whether the contour of the first gear to be detected in the image to be detected overlaps with the contour of the standard first gear in the reference image, the following steps are included:
[0065] If not, it is determined that the first gear to be tested is unqualified.
[0066] If the profile of the first gear to be tested does not overlap with the profile of the standard first gear, it is considered unqualified.
[0067] In this embodiment, after the step of determining whether the contour of the second gear to be detected in the image to be detected overlaps with the contour of the standard second gear in the reference image, the following steps are included:
[0068] If not, it is determined that the second gear to be tested is unqualified.
[0069] If the profile of the second gear to be tested does not overlap with the profile of the standard second gear, it is considered unqualified.
[0070] In this embodiment, after the step of determining whether the meshing profile of the first gear to be detected and the second gear to be detected in the image to be detected overlaps with the meshing profile of the standard first gear and the standard second gear in the reference image, the method further comprises:
[0071] If not, it is determined that the assembly relationship between the first gear to be detected and the second gear to be detected is unqualified.
[0072] If the meshing profile of the first gear to be tested and the second gear to be tested does not overlap with the meshing profile of the standard first gear and the standard second gear, the assembly relationship is considered unqualified.
[0073] In this embodiment, the step of determining whether the contour of the first gear to be detected in the image to be detected overlaps with the contour of the standard first gear in the reference image includes:
[0074] Using the center point of the first gear to be detected in the image to be detected and the center point of the standard first gear as positioning points, the first gear to be detected in the image to be detected is superimposed on the standard first gear;
[0075] Determine whether the outlines of the two overlap completely;
[0076] If yes, taking the center point of the first gear to be detected in the image to be detected and the center point of the standard first gear as positioning points, the standard first gear is superimposed on the first gear to be detected in the image to be detected;
[0077] Determine whether the outlines of the two overlap completely;
[0078] If so, it is considered that the contour of the first gear to be detected in the image to be detected overlaps with the contour of the standard first gear in the reference image.
[0079] In the judgment of overlapping contours, the first gear to be tested is firstly overlapped on the standard first gear to perform the first judgment, and then the standard first gear is overlapped on the first gear to be tested to perform the second judgment. Only when both judgments are complete overlaps, is it considered that the contour of the first gear to be tested overlaps with the contour of the standard first gear.
[0080] In this embodiment, the step of determining whether the outlines of the two images can be completely overlapped includes:
[0081] If not, it is considered that the contour of the first gear to be detected in the image to be detected does not overlap with the contour of the standard first gear in the reference image.
[0082] like Figure 2 As shown, an embodiment of the present invention provides a gear detection device, which is applied to the above-mentioned gear detection method. The device 1 includes:
[0083] A first acquisition module 11 is used to acquire a reference image, where the reference image is an image of a standard first gear meshing with a standard second gear;
[0084] A second acquisition module 12, used for acquiring the current state of the standard first gear according to the reference image;
[0085] A monitoring module 13, used for monitoring the status of the first gear to be detected and the second gear to be detected;
[0086] The acquisition module 14 is used to acquire an image to be detected if it is monitored that the first gear to be detected rotates to the same state as the current state of the standard first gear, wherein the image to be detected is an image of the first gear to be detected meshing with the second gear to be detected;
[0087] A processing module 15, used for performing a coincidence process on the image to be detected and the reference image;
[0088] The determination module 16 is configured to determine that the first gear to be detected, the second gear to be detected, and the assembly relationship between the first gear to be detected and the second gear to be detected are all qualified if the image to be detected completely overlaps with the reference image.
[0089] like Figure 3 As shown, in an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as shown in FIG. Figure 3As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as a model of a gear detection method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a gear detection method is implemented.
[0090] The processor executes the steps of the gear detection method: acquiring a reference image, wherein the reference image is an image of a standard first gear meshing with a standard second gear;
[0091] Acquiring the current state of the standard first gear according to the reference image;
[0092] Monitoring the status of the first gear to be detected and the second gear to be detected;
[0093] If it is monitored that the first gear to be detected rotates to the same state as the current state of the standard first gear, an image to be detected is collected, where the image to be detected is an image of the first gear to be detected meshing with the second gear to be detected;
[0094] Performing a coincidence process on the image to be detected and the reference image;
[0095] If the image to be detected completely overlaps with the reference image, it is determined that the first gear to be detected, the second gear to be detected, and the assembly relationship between the first gear to be detected and the second gear to be detected are all qualified.
[0096] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.
[0097] The computer device of the embodiment of the present invention detects two gears that are meshing, and the detection objects include the two gears and the assembly relationship between the two gears, thereby solving the problem of only detecting a single gear.
[0098] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a gear detection method is implemented, specifically:
[0099] Acquire a reference image, where the reference image is an image of a standard first gear meshing with a standard second gear;
[0100] Acquiring the current state of the standard first gear according to the reference image;
[0101] Monitoring the status of the first gear to be detected and the second gear to be detected;
[0102] If it is monitored that the first gear to be detected rotates to the same state as the current state of the standard first gear, an image to be detected is collected, where the image to be detected is an image of the first gear to be detected meshing with the second gear to be detected;
[0103] Performing a coincidence process on the image to be detected and the reference image;
[0104] If the image to be detected completely overlaps with the reference image, it is determined that the first gear to be detected, the second gear to be detected, and the assembly relationship between the first gear to be detected and the second gear to be detected are all qualified. The two gears that are meshing are detected, and the objects to be detected include the two gears and the assembly relationship of the two gears, solving the problem of only detecting a single gear.
[0105] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting a gear, characterized in that: The method comprises: Acquire a reference image, where the reference image is an image of a standard first gear meshing with a standard second gear; Acquiring the current state of the standard first gear according to the reference image; Monitoring the status of the first gear to be detected and the second gear to be detected; If it is monitored that the first gear to be detected rotates to the same state as the current state of the standard first gear, an image to be detected is collected, where the image to be detected is an image of the first gear to be detected meshing with the second gear to be detected; Performing a coincidence process on the image to be detected and the reference image; If the image to be detected completely overlaps with the reference image, it is determined that the first gear to be detected, the second gear to be detected, and the assembly relationship between the first gear to be detected and the second gear to be detected are all qualified.
2. The gear detection method according to claim 1, characterized in that: The step of performing a superposition process on the image to be detected and the reference image includes: Performing image processing on the image to be detected, and determining whether the contour of the first gear to be detected in the image to be detected overlaps with the contour of the standard first gear in the reference image; If yes, determining whether the contour of the second gear to be detected in the image to be detected overlaps with the contour of the standard second gear in the reference image; If yes, determining whether the meshing profile of the first gear to be detected and the second gear to be detected in the image to be detected overlaps with the meshing profile of the standard first gear and the standard second gear in the reference image; If so, it is considered that the image to be detected completely overlaps with the reference image.
3. The gear detection method according to claim 2, characterized in that: After the step of determining whether the contour of the first gear to be detected in the image to be detected overlaps with the contour of the standard first gear in the reference image, the method further comprises: If not, it is determined that the first gear to be tested is unqualified.
4. The gear detection method according to claim 2, characterized in that: After the step of determining whether the contour of the second gear to be detected in the image to be detected overlaps with the contour of the standard second gear in the reference image, the method further comprises: If not, it is determined that the second gear to be tested is unqualified.
5. The gear detection method according to claim 2, characterized in that: After the step of determining whether the meshing profile of the first gear to be detected and the second gear to be detected in the image to be detected overlaps with the meshing profile of the standard first gear and the standard second gear in the reference image, the step includes: If not, it is determined that the assembly relationship between the first gear to be detected and the second gear to be detected is unqualified.
6. The gear detection method according to claim 5, characterized in that: The step of judging whether the contour of the first gear to be detected in the image to be detected overlaps with the contour of the standard first gear in the reference image includes: Using the center point of the first gear to be detected in the image to be detected and the center point of the standard first gear as positioning points, the first gear to be detected in the image to be detected is superimposed on the standard first gear; Determine whether the outlines of the two overlap completely; If yes, taking the center point of the first gear to be detected in the image to be detected and the center point of the standard first gear as positioning points, the standard first gear is superimposed on the first gear to be detected in the image to be detected; Determine whether the outlines of the two overlap completely; If so, it is considered that the contour of the first gear to be detected in the image to be detected overlaps with the contour of the standard first gear in the reference image.
7. The gear detection method according to claim 6, characterized in that: The step of judging whether the outlines of the two objects can be completely overlapped includes: If not, it is considered that the contour of the first gear to be detected in the image to be detected does not overlap with the contour of the standard first gear in the reference image.
8. A gear detection device, characterized in that: The device comprises: A first acquisition module is used to acquire a reference image, where the reference image is an image of a standard first gear meshing with a standard second gear; A second acquisition module, used for acquiring the current state of the standard first gear according to the reference image; A monitoring module, used for monitoring the status of the first gear to be detected and the second gear to be detected; an acquisition module, configured to acquire an image to be detected if it is monitored that the first gear to be detected rotates to the same state as the current state of the standard first gear, wherein the image to be detected is an image of the first gear to be detected meshing with the second gear to be detected; A processing module, used for performing a coincidence process on the image to be detected and the reference image; A determination module is used to determine that the first gear to be detected, the second gear to be detected, and the assembly relationship between the first gear to be detected and the second gear to be detected are all qualified if the image to be detected completely overlaps with the reference image.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.