Commutator hook type visual detection system and method based on light-mechanical hybrid
The optomechanical hybrid commutator hook-type visual inspection system, which combines laser sensors and cameras with rotating front and back side lighting devices, solves the problems of low efficiency and poor accuracy of manual inspection, and achieves efficient and accurate hook-type inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG UNIV OF TECH
- Filing Date
- 2022-12-30
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, commutator hook type detection relies on manual methods, resulting in low detection efficiency, high misjudgment rate, large measurement error, high cost, and poor consistency of detection quality.
A commutator hook-type visual inspection system using optomechanical hybrid technology is employed. This system combines a laser sensor and a camera with a rotating front and back side lighting device to acquire multi-angle images through rotation. The system then combines these images with a hook-type rotation error prediction model for correction measurement, identification, and correction of hook-type parameters.
It improves detection accuracy, reduces detection errors, enables rapid and accurate detection of commutator hook type, and improves detection efficiency and quality consistency.
Smart Images

Figure CN116183495B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual inspection technology for product quality, and in particular to a commutator hook-type visual inspection system and method based on optomechanical hybridization. Background Technology
[0002] Electric motors are essential basic equipment in industry, transportation, national defense, and daily life. As one of the core components of an electric motor, the quality of the commutator directly affects the quality of the motor itself. Visual inspection of the commutator, especially the detection of hook-type defects, is a crucial indicator for evaluating commutator quality and an important step in commutator production.
[0003] Currently, commutator hook type inspection is still done manually. Due to the complex shape and small size of the commutator hook, the inspection efficiency is low, the false judgment rate and the missed detection rate are high. Moreover, the manual measurement method has serious measurement errors. Manual inspection requires a lot of labor, so it has problems such as high cost, large error and poor consistency of inspection quality. Summary of the Invention
[0004] This application provides a commutator hook-type visual inspection system and method based on optomechanical hybrid technology, which solves the problems of high cost, low accuracy and poor consistency of inspection quality in the prior art.
[0005] The first aspect of this application provides a commutator hook-type visual inspection system based on optomechanical hybrid technology, comprising:
[0006] Hook-shaped rotating oblique angle front and back side imaging module and hook-shaped dynamic prediction and correction measurement module;
[0007] The hook-shaped rotating oblique angle front and back side imaging module includes a laser sensor, a camera, and a rotating front and back side lighting device. The laser sensor is electrically connected to the camera, and the camera is electrically connected to the hook-shaped dynamic prediction and correction measurement module. The commutator is placed in the rotating front and back side lighting device. The laser sensor is used to sense changes in the distance between itself and the commutator, generating an electrical signal to trigger the camera to capture images. The camera is used to acquire images of the hook to be detected in a specific direction and send the images to the hook-shaped dynamic prediction and correction measurement module. The specific direction is the direction in which the commutator hooks in the image do not obstruct each other. The rotating front and back side lighting device is used to make the laser sensor and the camera rotate relative to the commutator around the axis of the commutator, and to provide the commutator with a multi-angle integrated beam required for imaging.
[0008] The hook-type dynamic prediction and correction measurement module is connected to the camera and is used to acquire the copper sheet width in the image of the hook type to be detected in the camera. The copper sheet width is input into the hook-type rotation error prediction model to calculate the hook-type rotation error compensation value. The hook-type rotation error prediction model is trained based on the data of copper sheet width and corresponding hook-type rotation error under different shooting angles. The module calculates the hook-type parameters in the image of the hook type to be detected, corrects the current hook-type measurement value with the hook-type rotation error compensation value, obtains the actual hook-type detection value, and determines whether the hook type is qualified based on the actual hook-type detection value.
[0009] Optionally, in the hook-shaped rotating oblique front and back side imaging module, the specific orientation of the camera is as follows:
[0010] The camera's shooting direction is parallel to the surface of a copper sheet, and the angle between the shooting direction and the side of the hook on the copper sheet is not greater than the gap angle; the gap angle is the angle between the line connecting the highest point of the hook on the copper sheet and the lowest point of the adjacent hook and the side of the hook on the copper sheet.
[0011] Optionally, in the hook-shaped rotating oblique angle front and back side imaging module, the specific direction of the camera is as follows: the camera and the commutator hook are on the same horizontal plane, the camera shooting direction is perpendicular to a copper plate on the commutator, and faces the side of the hook adjacent to the copper plate.
[0012] Optionally, the hook-shaped dynamic prediction and correction measurement module is also used to segment the image of the hook-shaped object to be detected and identify the copper sheet on the commutator in the segmented image.
[0013] Optionally, the hook shape dynamic prediction and correction measurement module is also used to establish a coordinate system on the image of the hook shape to be detected, identify the front end region of the unobstructed hook in the image of the hook shape to be detected, and calculate the center point coordinates of the front end region; the center point coordinates are used to calculate the hook shape parameters.
[0014] Optionally, the hook type dynamic prediction and correction measurement module is also used to determine whether the actual value of the hook type detection falls within the preset hook type standard range; if so, the hook type is deemed qualified.
[0015] A second aspect of this application provides a commutator hook-type detection method based on optomechanical hybrid technology, the method being based on the commutator hook-type visual detection system based on optomechanical hybrid technology as described in any one of the first aspects, comprising:
[0016] The image of the hook to be detected is segmented, the adjacent copper pieces of the target hook in the image are identified, and the width of the adjacent copper pieces is obtained.
[0017] Input the width of the copper sheet into the hook-shaped rotation error prediction model to obtain the rotation error compensation value required for the target hook-shaped parameters;
[0018] Identify the front end region of the hook in the image to be detected, obtain the coordinates of the center point of the front end region, and then calculate the hook parameters;
[0019] By combining the hook type parameters with the rotation error compensation value, the actual value of the hook type detection is obtained, and the qualification of the hook is determined.
[0020] Optionally, after identifying the front end region of the hook in the image to be detected and obtaining the coordinates of the center point of the front end region, the hook shape parameters are calculated, specifically including:
[0021] Let F(x) be the front end region of the commutator hook in the image, and calculate the center point coordinates P:(x0,y0) of the front end region of the commutator hook by calculating the centroid of the region. Let L1(x) be the edge of the adjacent copper sheet near the front end region.
[0022] The specific formula for calculating the hook type parameter D1 is as follows:
[0023]
[0024]
[0025] Among them, P ′ Let P be a reference point on the edge of an adjacent copper sheet, and let L1(x) be the line where the inner edges of the adjacent copper sheets meet. Then, calculate P and P'. ′ The distance between them is the hook parameter D1.
[0026] Optionally, inputting the copper sheet width into the hook-shaped rotation error prediction model to obtain the required rotation error compensation value for the target hook-shaped parameters specifically includes:
[0027] The width of the copper sheet in the image is obtained when the camera shooting direction forms different angles with the side of the hook; the copper sheet refers to the copper sheet adjacent to the copper sheet where the hook is located without obstruction;
[0028] Calculate the error between the measured values of the hook shape parameters and the true values of the hook shape in the images at different angles;
[0029] The training and validation sets for the hook rotation error prediction model are generated using the width of the copper sheet and the corresponding hook error value.
[0030] A hook-shaped rotation error prediction model was established using the training set based on the deep support vector regression method. The model was then validated using the validation set. Once the validation accuracy reached a preset threshold, the corresponding model was obtained.
[0031] Optionally, before segmenting the hook-shaped image to be detected, the process further includes:
[0032] Activate the cone-pressing top side rotation module to make the camera, laser sensor, and rotating front and back side light device rotate relative to the commutator around the axis of the commutator; the laser sensor detects the spacing of the commutator, and when the spacing changes, the camera is triggered to take a picture to obtain the image of the hook to be detected that is not blocked by adjacent hooks.
[0033] This application provides a commutator hook-type visual inspection system and method based on optomechanical hybrid technology. The system utilizes a cone-pressed top-side rotation module to rotate the camera, laser sensor, and rotating front and back side lighting device relative to the commutator. When the laser sensor detects a change in spacing, it triggers the camera to capture an image of the hooks from a specific angle, obtaining an unobstructed hook image. In the hook-type dynamic prediction and correction measurement module, a hook-type rotation compensation prediction model predicts the hook-type rotation error present in the image to be inspected, then calculates the hook-type parameters, and corrects these parameters using the rotation error compensation value. The final result is the actual hook-type detection value, which is then used to determine product qualification. This method reduces detection errors, improves detection efficiency, increases detection accuracy, and enables rapid and accurate detection of commutator hook types. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is the first structural schematic diagram of the commutator hook-type vision inspection system based on optomechanical hybrid technology provided in this application;
[0036] Figure 2 A schematic diagram of the rotating front and back side light device structure of the commutator hook-type vision inspection system based on optomechanical hybrid technology provided in this application;
[0037] Figure 3 A schematic diagram showing the setup of the first camera in the commutator hook-type vision inspection system based on optomechanical hybrid technology provided in this application;
[0038] Figure 4 A schematic diagram showing the setup of a second type of camera for the commutator hook-type vision inspection system based on optomechanical hybrid technology provided in this application;
[0039] Figure 5 A schematic diagram illustrating the arrangement of a rotating device in the commutator hook-type vision inspection system based on optomechanical hybrid technology provided in this application;
[0040] Figure 6The detection method of the commutator hook-type vision inspection system based on optomechanical hybrid technology provided in this application;
[0041] Figure 7 The detection process of the commutator hook-type detection method based on optomechanical hybrid technology provided in this application.
[0042] The attached figures are labeled as follows:
[0043] 10. Hook-shaped rotating oblique angle front and back side imaging module; 11. Laser sensor; 12. Camera; 13. Rotating front and back side lighting device; 1301. Forward circular light source; 1302. Conical pressing device; 1303. Lateral strip light source; 1304. Backward circular light source; 1305. Rotating fixed shaft; 1306. Top device; 1307. Support platform; 1308. Baffle; 1309. Driving device; 20. Hook-shaped dynamic prediction correction measurement module; 30. Commutator; 31. Copper sheet; 32. Target hook; 33. Adjacent hooks. Detailed Implementation
[0044] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0045] This application provides a commutator hook-type visual inspection system and method based on optomechanical hybrid technology, which solves the problems of high cost, large error, and poor quality consistency in the manual inspection of commutator hooks in the prior art.
[0046] Please see Figure 1 , Figure 1 This is a schematic diagram of the commutator hook-type visual inspection system and method based on optomechanical hybrid technology provided in this application.
[0047] The first aspect of this embodiment provides a commutator hook-shaped visual inspection system based on optomechanical hybrid technology, including: a hook-shaped rotation angle front and back side imaging module 10, and a hook-shaped dynamic prediction correction measurement module 20.
[0048] The hook-shaped rotating oblique angle front and back side imaging module 10 includes a laser sensor 11, a camera 12, and a rotating front and back side lighting device 13. The laser sensor 11 is electrically connected to the camera 12, and the camera 12 is connected to the hook-shaped dynamic prediction correction measurement module 20. The commutator 30 is placed in the rotating front and back side lighting device 13. The laser sensor 11 is used to sense the change in distance between itself and the commutator 30 and generate an electrical signal to trigger the camera 12 to take a picture. The camera 12 is used to acquire the image of the hook to be detected in a specific direction and send the image of the hook to be detected to the hook-shaped dynamic prediction correction measurement module 20. The specific direction is the direction in which the commutator hooks in the image do not obstruct each other. The rotating front and back side lighting device 13 is used to make the laser sensor 11 and the camera 12 rotate relative to the commutator 30 around the axis of the commutator 30, and to provide the commutator 30 with a multi-angle integrated beam required for imaging.
[0049] It should be noted that multiple copper plates are arranged around the side of the cylinder on the commutator 30, and each copper plate is equipped with a hook. The laser emitted by the laser sensor 11 is directed towards the hook on the commutator. By means of laser ranging, the laser sensor 11 senses the change in the distance between the copper plate or hook on the commutator 30 and the laser sensor 11. When the edge of a hook on the commutator 40 is detected, the laser sensor 11 sends an electrical signal to trigger the camera 12 to take a picture. When the camera 12 is at a specific angle, an unobstructed hook-shaped image is captured.
[0050] Depending on the different settings of the laser sensor 11 and the camera 12, the camera 12 can photograph the hook detected by the laser sensor 11, or it can photograph another hook that is at a certain angle away from the first hook.
[0051] The rotating front and back side lighting device 13 can rotate the laser sensor 11 and camera 12, and can also make the commutator 40 rotate around its axis. Both can achieve relative rotation between the laser sensor 11 and camera 12 and the commutator 30. After the rotating front and back side lighting device 13 is activated, it can achieve that for every hook detected by the laser sensor 11, the camera 12 will acquire an image of a hook. Moreover, the rotating front and back side lighting device 13 adopts a time-division multi-angle light source control strategy to provide the commutator 30 with the multi-angle integrated beam required for imaging.
[0052] The hook-type dynamic prediction and correction measurement module 20 is connected to the camera 12 and is used to acquire the width of the copper sheet in the image of the hook-type to be detected in the camera. The width of the copper sheet is input into the hook-type rotation error prediction model to calculate the hook-type rotation error compensation value. The hook-type rotation error prediction model is trained based on the data of the width of the copper sheet and the corresponding hook-type rotation error under different shooting angles. The module calculates the hook-type parameters in the image of the hook-type to be detected, corrects the current hook-type measurement value with the hook-type rotation error compensation value, obtains the actual value of hook-type detection, and judges whether the hook-type is qualified based on the actual value of hook-type detection.
[0053] It should be noted that there may be a delay in the triggering of the camera 12 by the laser sensor 11, and even if the placement of the laser sensor 11 and the camera 12 in the system is set by the inspectors, there may still be errors, causing distortion in the hook-shaped image and complex rotation, making image restoration and calculation difficult. Therefore, a hook-shaped rotation error prediction model is established to directly predict the required rotation compensation value for the hook-shaped parameters. Since the width of the copper sheet of the commutator 30 changes in the image under different rotation conditions, the width of the copper sheet is related to the hook-shaped rotation error. By using the deep support vector regression method and establishing a model, the hook-shaped rotation error value can be predicted. The hook-shaped dynamic prediction and correction measurement module 20 performs image segmentation on the hook-shaped image to be detected, identifies each copper sheet in the image, and calculates the width of the copper sheet. There may be multiple copper sheets in the hook-shaped image to be detected. The copper sheet used for reference can be selected according to the actual detection situation, and relevant data can be collected to train the hook-shaped rotation error prediction model.
[0054] The hook shape parameters calculated from the image of the hook shape to be detected transmitted by camera 12 are corrected with the hook shape rotation compensation value to obtain the actual value of hook shape detection, thus overcoming the detection error caused by rotation and shooting angle. Finally, the actual value of hook shape detection is checked against the preset hook shape standard range. If the actual value of hook shape detection is within the hook shape standard range, the hook is qualified. The hook shape standard range is set according to the commutator production standard.
[0055] The further hook-type dynamic prediction and correction measurement module is also used to segment the image of the hook to be detected, and identify the copper sheet on the commutator in the segmented image; the hook-type dynamic prediction and correction measurement module is also used to establish a coordinate system on the image of the hook to be detected, identify the front end region of the unobstructed hook in the image of the hook to be detected, and calculate the center point coordinates of the front end region; the center point coordinates are used to calculate the hook-type parameters; the hook-type dynamic prediction and correction measurement module is also used to determine whether the actual value of the hook-type detection falls within the preset hook-type standard range, and if so, the hook-type is judged to be qualified.
[0056] In this embodiment, by rotating the front and back side lighting device 13 to rotate the commutator 40, when the laser sensor 11 detects a change in spacing, it triggers the camera 12 to take a picture of the hook shape from a specific angle to obtain an unobstructed image of the hook shape. In the hook shape dynamic prediction and correction measurement module 20, the rotation compensation value is predicted based on the hook shape rotation error prediction model, and then the hook shape parameters are calculated. The rotation error compensation value is used for correction to obtain the actual value of the hook shape detection. The detection is then performed based on this value, which can reduce the detection error, improve the detection efficiency, increase the detection accuracy, and realize the rapid and accurate detection of the hook shape of the commutator 30.
[0057] The above is a detailed description of the first embodiment of a commutator hook-type visual inspection system based on optomechanical hybrid technology provided in this application. The following is a detailed description of the second embodiment of a commutator hook-type visual inspection system based on optomechanical hybrid technology provided in this application.
[0058] Please see Figure 2 , Figure 2 This is a schematic diagram of the rotating front and back side lighting device. The rotating front and back side lighting device includes a front and back side multi-angle integrated beam module, an upper device 1306, a cone pressing device 1302, a rotating fixed shaft 1305, a support platform 1307, and a commutator 30 mounted on the support platform 1307. The upper device 1306, the cone pressing device 1302, and the rotating fixed shaft 1305 are coaxially arranged, and their axes are perpendicular to the horizontal plane. The cone head of the cone pressing device 1302 points horizontally downward, and the support platform is located horizontally below the cone pressing device 1302. The rotating fixed shaft 1305 passes through the center of the circular light source 1304 facing away from it. The front and back multi-angle integrated beam module includes a front circular light source 1301, a back circular light source 1304, and a lateral strip light source 1303. This structure adopts a time-division multi-angle light source control strategy to form a multi-angle beam, providing suitable light for hook-shaped imaging. The lateral strip light source 1303 is parallel to the axis of the rotation fixed axis 1305 and is on the same horizontal plane as the commutator. The front circular light source 1301 and the back circular light source 1304 are respectively positioned above the cone pressing device 1302 and below the support platform 1307. Specifically, the front circular light source 1301 can be a front spherical / circular / ring light source, and the back circular light source 1304 can be a back spherical / circular / ring light source.
[0059] This embodiment provides a commutator hook-shaped visual inspection system based on optomechanical hybrid technology. Specifically, in the hook-shaped rotation oblique angle front and back side imaging module, the camera acquires the image of the hook to be detected—a hook not obscured by adjacent hooks—in a specific direction as follows:
[0060] Please see Figure 3 , Figure 3 This is a schematic diagram of the setup of a first type of camera in a commutator hook-type visual inspection system based on optomechanical hybrid technology. The shooting direction of the camera 12 is parallel to the plane of a copper sheet 31, and the angle between the shooting direction and the side of the target hook 32 on the copper sheet 31 is not greater than the gap angle; the gap angle is the angle between the line connecting the highest point of the target hook 32 on the copper sheet 31 and the lowest point of the adjacent hook 33, and the side of the hook on the copper sheet.
[0061] It should be noted that the target hook 32 is the hook with the largest side area in the image of the hook to be detected. All hooks in the commutator are distributed around the commutator in the same plane. To avoid occlusion between adjacent hooks 33 when capturing the image, it is necessary to capture the image from the gap between the hooks. Therefore, the image is captured from the upper / lower side of the plane where the hooks are located. Here, "upper / lower side" refers to the side where the target hook 32 is located after the plane is divided by a line. The arrows in the figure indicate the shooting direction, obtaining the camera's shooting optical path from the top / bottom of the adjacent hooks to the top of the target hook 32, avoiding occlusion of the target hook 32 by adjacent hooks. This gap angle can be set according to the actual commutator size.
[0062] Please see Figure 4 , Figure 4 This is a schematic diagram of the setup of a second type of camera in a commutator hook-type visual inspection system based on optomechanical hybrid technology. The camera 12 is on the same horizontal plane as the commutator hook, and the camera's shooting direction is perpendicular to a copper plate on the commutator and faces the side of the hook adjacent to the copper plate 31, which is the target hook 32.
[0063] It should be noted that the target hook 32 is the hook with the largest side area in the image of the hook to be detected. To avoid obstruction, the camera 12 can take pictures from above / below the plane where the commutator hook is located or at the same horizontal plane as the hook. The arrow in the figure indicates the shooting direction.
[0064] Optionally, the commutator hook-shaped visual inspection system and method based on optomechanical hybrid technology further includes: a hook-shaped rotating oblique angle front and back side imaging module; the front and back side multi-angle integrated beam module in the hook-shaped rotating oblique angle front and back side imaging module is specifically disposed on the commutator axis, respectively located on the upper, lower, left and right sides of the commutator, to provide the commutator with a front and back side multi-angle integrated beam.
[0065] It should be noted that the multi-angle integrated beam module on both the front and back sides prevents the shadow cast by the hook from being projected onto adjacent hooks, thus avoiding interference with the camera's image acquisition. The integrated lighting method of the top, bottom, left, and right light sources provides a good lighting environment for both the front and back of the hook-shaped image. Furthermore, a support platform is provided between the commutator and the lower light source, and the support platform is made of a highly transparent material.
[0066] Optionally, a rotating module is provided in the rotating front and back side lighting device to rotate the commutator. The rotating module is specifically a cone-pressing and top-lifting side rotating module. The cone-pressing device and the top-lifting device form a cone-pressing and top-lifting mechanism. After the cone-pressing device and the top-lifting device clamp the commutator and fix it, a stepper motor is used to rotate the commutator. The axis of the stepper motor shaft is collinear with the cone axis of the cone-pressing and top-lifting mechanism. After the stepper motor is started, it can make the commutator rotate.
[0067] The conical pressing and lifting mechanism is used to define the position of the commutator on the stepper motor shaft. In this embodiment, the conical pressing and lifting mechanism presses the commutator with a cylinder. The piston rod of the cylinder moves in the same direction as the stepper motor shaft. A conical pressure hammer is installed at the center of the front end of the piston rod. The pressure hammer presses against the center hole of the commutator to fix the commutator's position on the shaft. When the cylinder retracts, the commutator can leave the detection position, making it easy to replace the next commutator to be tested.
[0068] For further information, please refer to [link / reference]. Figure 5 , Figure 5 This is a schematic diagram of the commutator rotation module in a rotating front and rear side lighting device. Optionally, the rotation module is specifically a side rotation device, including a baffle 1308 and a driving device 1309;
[0069] The driving device 1309 contacts the commutator 30, specifically a belt or rack whose direction of motion is parallel to the plane of the commutator copper plate and perpendicular to the axis of the commutator 30; the included angle between the baffle 1308 and the driving device 1309 is an acute angle, and the baffle 1308 is arranged in the direction of motion of the commutator 30 driven by the driving device, with the acute angle opening facing the commutator 30.
[0070] It should be noted that the arrow in the figure indicates the direction of movement of the driving device 1309. The driving device 1309 drives the commutator 30 to rotate and move, so that the commutator 30 contacts the baffle 1308 in the direction of movement. Finally, the commutator 30 is pressed against the baffle 1308 and the commutator 30 only rotates and does not translate, thereby realizing the relative rotation between the commutator 30 and the camera, laser sensor and rotating front and back side lighting device.
[0071] In this embodiment, by setting the camera position and the rotation device, the optomechanical hybrid commutator hook detection system can capture images of the target hook from an angle that is not obstructed by adjacent hooks, and efficiently and automatically acquire images of each hook of the commutator, so that the hook images contain more lateral information and improve the efficiency and accuracy of image acquisition.
[0072] The above is a detailed description of the second embodiment of a commutator hook-type visual inspection system based on optomechanical hybrid technology provided in this application. The following is a detailed description of a commutator hook-type visual inspection method based on optomechanical hybrid technology provided in the second aspect of this application.
[0073] See Figure 6 This embodiment provides a method for using a commutator hook-type vision inspection system based on optomechanical hybrid technology, specifically including steps S1-S4:
[0074] S1, perform segmentation processing on the hook-shaped image to be detected, identify the adjacent copper pieces of the target hook in the hook-shaped image to be detected, and obtain the width W1 of the adjacent copper pieces.
[0075] It should be noted that threshold segmentation is performed on the image of the hook to be detected to identify the hook in the image based on its contour, and the hook with the largest contour area on the side of the image is taken as the target hook; when the camera acquires the image of the hook side of the commutator, the side of the hook that the camera is shooting towards is the target hook.
[0076] Furthermore, before segmenting the image of the hook to be detected, the method includes: preprocessing the image of each hook to obtain the image of the hook to be detected; the preprocessing includes brightness adjustment and opening / closing operations to avoid interference noise in the acquired image, which would affect the measurement accuracy.
[0077] S2, input the width of the copper sheet into the hook-shaped rotation error prediction model to obtain the rotation error compensation value required for the target hook-shaped parameters.
[0078] It should be noted that the error value is actually equivalent to the rotation error compensation value we need to obtain. We obtain the width of the commutator copper plate in the image under different rotation angles of the camera and the commutator hook, and generate a hook-type error prediction training set and a prediction validation set using the copper plate width and the corresponding error value. We train the hook-type rotation error prediction model using the training set and validate the model using the validation set. When the validation effect reaches a preset threshold, the hook-type rotation error prediction model is obtained.
[0079] Using the training set, a hook-shaped rotation error prediction model is established based on the deep support vector regression method. The prediction effect of the model is verified with the validation set. When the verification result reaches the preset threshold, the model is output.
[0080] Furthermore, the hook-shaped rotation error prediction model is trained based on the width of the copper sheet in the image under different shooting angles and the corresponding hook-shaped parameter error data. Specifically, it involves: obtaining the width of the copper sheet in the image obtained when the camera shooting direction forms different angles with the side of the hook; the copper sheet is the adjacent copper sheet of the copper sheet where the hook is located without the obstruction of adjacent hooks; and calculating the error value between the hook-shaped parameter value and the standard value of the hook shape in the image under different angles.
[0081] After obtaining the rotation error compensation value, the hook-type dynamic prediction correction measurement module of the aforementioned embodiment calculates the hook-type parameters in the image of the hook to be detected, combines the hook-type parameters with the rotation error compensation value to obtain the actual value of the hook detection, and determines whether the hook is qualified, specifically including steps S3-S4:
[0082] S3: Identify the front end region of the hook in the image to be detected, obtain the coordinates of the center point of the front end region, and then calculate the hook parameters.
[0083] It should be noted that the front area is defined by drawing a parallel line along the side of the copper sheet at the point of maximum curvature of the hook. The area furthest from the adjacent copper sheet within the region defined by this parallel line is the front area. Inspectors can determine the actual front area based on the specific hook shape. The hook shape parameter is the distance from the center point to the edge of the adjacent copper sheet closest to the front area, and it should reflect the hook's curvature.
[0084] Furthermore, let F(x) be the front end region of the commutator hook in the image, and let P:(x0,y0) be the center point coordinates of the front end region of the commutator hook. Let L1(x) be the edge of the adjacent copper sheet near the front end region.
[0085] Calculate hook type parameter D1:
[0086]
[0087]
[0088] Among them, P ′ Let P be a reference point on the edge of an adjacent copper sheet, and let L1(x) be the line where the inner edges of the adjacent copper sheets meet. Then, calculate P and P'. ′ The distance between them is the hook parameter D1.
[0089] Furthermore, the width W1 of the copper sheet in S1 mentioned above is:
[0090] W1:=L2(x ′ )-y ′
[0091] L2 represents the edge of the adjacent copper sheet that is furthest from the front end region.
[0092] S4 combines the hook type parameters with the rotation error compensation value to obtain the actual value of the hook type detection, and judges whether the hook type is qualified according to the preset hook type standard range.
[0093] It should be noted that the actual value of the hook type test is checked against the preset hook type standard range. If the actual value of the hook type test is within the hook type standard range, the hook type is qualified and the hook meets the requirements. The hook type standard range is set according to the commutator production standard.
[0094] For further information, please refer to [link / reference]. Figure 7 In a more specific embodiment, prior to the aforementioned step S1, the following steps are also included:
[0095] S101, activate the cone-pressing top side rotation module to make the camera, laser sensor, and rotating front and back side light device rotate relative to the commutator around the axis of the commutator.
[0096] S102 uses a laser sensor to detect the spacing of the commutator. When the spacing changes, the camera is triggered to capture an image of the hook type to be detected that is not obscured by adjacent hooks.
[0097] In this embodiment, by processing the hook-shaped image to be detected, the hook rotation error compensation value in the image is calculated based on the width of adjacent copper sheets using a hook rotation error prediction model. Then, the hook-shaped parameters of the hook in the image are calculated in the detection model. After combining the hook rotation error compensation value and the hook-shaped parameters, the hook detection value is obtained for qualification judgment. This can avoid false detection caused by rotation errors, and the prediction model improves the efficiency of compensation value calculation, thereby improving the reliability and efficiency of commutator hook-shaped detection.
[0098] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0099] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0100] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0101] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0102] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A commutator hook-type visual inspection system based on optomechanical hybrid technology, characterized in that, include: Hook-shaped rotating oblique angle front and back side imaging module and hook-shaped dynamic prediction and correction measurement module; The hook-shaped rotating oblique angle front and back side imaging module includes a laser sensor, a camera, and a rotating front and back side lighting device. The laser sensor is electrically connected to the camera, and the camera is electrically connected to the hook-shaped dynamic prediction and correction measurement module. The commutator is placed in the rotating front and back side lighting device. The laser sensor is used to sense changes in the distance between itself and the commutator, generating an electrical signal to trigger the camera to capture images. Specifically, the laser sensor directs its laser beam towards the hooks on the commutator to sense changes in the distance between the laser sensor and the copper plates or hooks on the commutator. When the edge of a hook on the commutator is identified through the change in distance, the laser sensor emits an electrical signal to trigger the camera to capture images. The camera is used to acquire images of the hooks to be detected in a specific direction and send the images to the hook-shaped dynamic prediction and correction measurement module. The specific direction is the direction in which the commutator hooks in the image do not obstruct each other. The rotating front and back side lighting device is used to make the laser sensor and the camera rotate relative to the commutator around the axis of the commutator, and to provide the commutator with a multi-angle integrated beam required for imaging. The hook-shaped dynamic prediction and correction measurement module is connected to the camera and is used to obtain the width of the copper sheet in the image of the hook to be detected in the camera. The width of the copper sheet is input into the hook-shaped rotation error prediction model to calculate the hook-shaped rotation error compensation value. The hook-shaped rotation error prediction model is trained based on the data of the width of the copper sheet and the corresponding hook rotation error under different shooting angles. Calculate the hook type parameters in the image of the hook to be detected, correct the current hook type parameters with the hook type rotation error compensation value, obtain the actual value of hook type detection, and judge whether the hook is qualified according to the preset hook type standard range.
2. The commutator hook-type visual inspection system based on optomechanical hybrid technology according to claim 1, characterized in that, In the hook-shaped rotating oblique angle front and back side imaging module, the specific orientation of the camera is as follows: The camera's shooting direction is parallel to the surface of a copper sheet, and the angle between the shooting direction and the side of the hook on the copper sheet is not greater than the gap angle; the gap angle is the angle between the line connecting the highest point of the hook on the copper sheet and the lowest point of the adjacent hook and the side of the hook on the copper sheet.
3. The commutator hook-type visual inspection system based on optomechanical hybrid technology according to claim 1, characterized in that, In the hook-shaped rotating oblique angle front and back side imaging module, the specific direction of the camera is as follows: the camera and the commutator hook are on the same horizontal plane, the camera shooting direction is perpendicular to a copper plate on the commutator, and faces the side of the hook adjacent to the copper plate.
4. The commutator hook-type visual inspection system based on optomechanical hybrid technology according to claim 1, characterized in that, The hook-shaped dynamic prediction and correction measurement module is also used to segment the image of the hook to be detected and identify the copper sheet on the commutator in the segmented image.
5. The commutator hook-type visual inspection system based on optomechanical hybrid technology according to claim 1, characterized in that, The hook-type dynamic prediction and correction measurement module is also used to establish a coordinate system on the image of the hook to be detected, identify the front end region of the unobstructed hook in the image of the hook to be detected, and calculate the center point coordinates of the front end region; the center point coordinates are used to calculate the hook-type parameters.
6. The commutator hook-type visual inspection system based on optomechanical hybrid technology according to claim 1, characterized in that, The hook type dynamic prediction and correction measurement module is also used to determine whether the actual value of the hook type detection falls within the preset hook type standard range. If so, the hook is deemed qualified.
7. A commutator hook-type visual inspection method based on optomechanical hybrid technology, said method being based on the commutator hook-type visual inspection system based on optomechanical hybrid technology according to any one of claims 1 to 6, characterized in that, include: The hook-shaped dynamic prediction and correction measurement module is used to segment the image of the hook to be detected, identify the adjacent copper pieces of the target hook in the image of the hook to be detected, and obtain the copper piece width of the adjacent copper pieces. Input the copper sheet width into the hook rotation error prediction model to obtain the rotation error compensation value required for the target hook parameters; Identify the front end region of the hook in the image to be detected, obtain the coordinates of the center point of the front end region, and then calculate the hook shape parameters based on the center point coordinates; By combining the hook type parameters with the rotation error compensation value, the actual value of the hook type detection is obtained, and the qualification of the hook is determined.
8. The commutator hook-type visual inspection method based on optomechanical hybrid technology according to claim 7, characterized in that, The process of identifying the front end region of the hook in the image to be detected, obtaining the center point coordinates of the front end region, and then calculating the hook shape parameters based on the center point coordinates specifically includes: Let F(the area at the front end of the commutator hook in the image) be... ), and calculate the center point coordinates P of the commutator hook front end region obtained from the region center. Let L1 be the edge of the adjacent copper sheet near the front end region. The hook shape parameters are calculated based on the center point coordinates; the specific formula for calculating hook shape parameter D1 is as follows: ( ) in, As a reference point on the edge of the adjacent copper sheet, The line connecting the inner edges of adjacent copper sheets. Point P is at The shortest distance, i.e., the distance from point P to... Projecting upwards; calculating the commutator hook front end region F( Inner edge and The distance between them is the hook parameter D1.
9. The commutator hook-type visual inspection method based on optomechanical hybrid technology according to claim 7, characterized in that, The copper sheet width is input into the hook-shaped rotation error prediction model to obtain the rotation error compensation value required for the target hook-shaped parameters. Specifically, this includes: The width of the copper sheet in the image is obtained when the camera shooting direction forms different angles with the side of the hook; the copper sheet is the adjacent copper sheet of the copper sheet where the hook is located without obstruction; Calculate the error between the measured values of the hook shape parameters and the actual values of the hook shape in the images at different included angles; The training and validation sets for the hook rotation error prediction model are generated using the width of the copper sheet and the corresponding hook error value. A hook-shaped rotation error prediction model was established using the training set based on the deep support vector regression method. The model was then validated using the validation set. Once the validation accuracy reached a preset threshold, the corresponding model was obtained.
10. The commutator hook-type visual inspection method based on optomechanical hybrid technology according to claim 7, characterized in that, Before the hook-shaped dynamic prediction and correction measurement module performs segmentation processing on the hook image to be detected, it also includes: In the hook-shaped rotating oblique angle front and back side imaging module, the rotating front and back side light device is turned on, so that the camera, laser sensor, and rotating front and back side light device rotate relative to the commutator around the axis of the commutator; the laser sensor detects the spacing of the commutator, and when the spacing changes, the camera is triggered to take a picture to obtain the image of the hook to be detected that is not blocked by the adjacent hooks.