System and method for detecting appearance defects of automobile commutator based on vision

By designing a vision-based automotive commutator appearance defect detection system, using deep learning and a combination of light sources, the problems of low efficiency and low accuracy of commutator defect detection in the prior art are solved, and efficient and accurate defect detection is achieved.

CN120102565AInactive Publication Date: 2025-06-06HANGZHOU SHENGHENG TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510103990.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-06-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the defect detection of commutator has problems such as low efficiency, low accuracy and low robustness, and it is difficult to ensure high detection speed and accuracy.

Method used

Design a vision-based automotive commutator appearance defect detection system, including industrial cameras, machine vision modules and motion modules, and achieve all-round imaging and high-precision detection through deep learning training models and combination of multiple light sources.

Benefits of technology

It improves the accuracy and efficiency of commutator defect detection, reduces the cost and time of manual identification, and improves the industry level and competitiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120102565A_ABST
    Figure CN120102565A_ABST
Patent Text Reader

Abstract

The invention discloses an automobile commutator appearance defect detection system and method based on vision, and the system comprises an industrial camera responsible for photographing, a machine vision module responsible for a light source, and a motion module responsible for driving the industrial camera to move. Comprising the following steps: S1, placing a charging tray at a detection position; s2, a motion module drives an industrial camera to photograph the workpieces in the charging tray; s3, defect detection is carried out according to the photos obtained in the step S2, and the positions of defective workpieces are recorded; s4, after photographing is completed, defect position information is transmitted to the motion module; and S5, the defective product is grabbed to a designated position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial detection, and in particular to a system and method for detecting appearance defects of automobile commutators based on vision. Background Art

[0002] With the growth of global automobile production, automobile driving safety has received more and more attention. In the automobile production process, the quality of each component directly affects the finishing performance and service life of the automobile. The commutator is an important component of automobile parts. Its function is to alternate the direction of the current in the armature winding to ensure that the direction of the electromagnetic torque remains unchanged. The commutator is widely used in automobile generators, gasoline generators and other fields. The quality of the commutator directly affects the quality of the motor and thus affects driving safety. Therefore, it is very important to control the quality of the commutator.

[0003] At present, manual visual inspection is mainly used in the production process of commutators. Due to the small appearance defects, high-resolution detection instruments are needed for detection. Usually, external lighting is used to magnify the image of the commutator using a visual microscope, and product defects are detected manually through the image. Usually, the effect of manual visual inspection is better, but the detection speed is low. For defects with small area and small damage, it is difficult for the naked eye to directly distinguish them. Manual detection of commutator defects has the problems of low efficiency, low precision and low robustness. It is necessary to design a machine vision detection system and method to improve the detection accuracy of commutator defects.

[0004] Traditional manual inspection of commutator defects has the problems of low efficiency, low precision and low robustness. It is easily affected by the environment and the operator's proficiency, and it is difficult to ensure high inspection speed and accuracy.

[0005] In order to solve the above problems existing in the prior art, the present invention provides a machine vision inspection system and method for an automobile commutator, so as to solve the problem of how to improve the detection accuracy of commutator defects. Summary of the invention

[0006] The object of the present invention is to provide a system and method for detecting appearance defects of automobile commutators based on vision, so as to overcome the deficiencies in the prior art.

[0007] To achieve the above object, the present invention provides the following technical solutions: The present application discloses a system and method for detecting appearance defects of automobile commutators based on vision, including an industrial camera responsible for taking pictures, a machine vision module responsible for light source, and a motion module responsible for driving the industrial camera to move. The system and method include a method for detecting appearance defects of automobile commutators based on vision, including the following steps: S1: Place the tray at the detection position; S2: The motion module drives the industrial camera to take pictures of the workpieces in the tray; S3: perform defect detection based on the photos obtained in S2 and record the position of the defective workpiece; S4: After taking the photo, the defect location information is transmitted to the motion module; S5: Grab the defective product to the designated location.

[0008] Preferably, the machine vision module includes several groups of camera light sources, including front ring light and side oblique light sources at different angles. The combination of several light sources can meet the imaging problem of different defects in all directions.

[0009] Preferably, the front ring light includes several fan-shaped components, which are combined to form a circular ring. The shooting process includes several strokes, and several fan-shaped components are lighted in each stroke to form several light sources at different angles and positions, thereby meeting the imaging problem of the same defect at different angles.

[0010] Preferably, the defect detection of the photo in S3 includes the following sub-steps: S31: Pre-train the model with pictures of different defect types; S32: Determine the region of interest of the workpiece to be inspected according to the photo acquired in S2; S33: pre-process the image, set the distribution areas of different defects, and improve the detection accuracy; S34: performing intersection processing on the model obtained through deep learning training in S31 and the set distribution areas of different defects to obtain their connected domains; S35: according to the morphological features of the detected defects, the minimum circumscribed rectangle of the connected domain is obtained, and the contour point sets of different defects are preliminarily screened out through the minimum circumscribed rectangle.

[0011] Preferably, the S31 includes the following sub-steps: S311: Obtain pictures of different defect types; S312: Identify and record the defect position in the image by a marking method; S313: Calculate the image information of the defect area, perform iterative optimization on the model, and obtain the final model.

[0012] Preferably, the S32 includes the following sub-steps: S321: Setting template parameters through images collected by industrial cameras; S322: Locating the center of the workpiece to be inspected by using a template; S323: Calculate and obtain the region of interest of the workpiece to be inspected according to the width and height of the workpiece to be inspected plus a preset parameter one.

[0013] Preferably, the S33 includes the following sub-steps: S33: performing image enhancement processing to increase the contrast between the image and the background, including equalization and linear enhancement processing of the image; S34: performing template matching on the enhanced image and cutting the detection area image; S35: Making judgments based on the images and setting distribution areas of different defects.

[0014] Preferably, S2 also includes the following contents: after the industrial camera takes a picture, the picture is identified and detected to determine whether the current position of the material tray is an empty state. If it is an empty state, the empty position is recorded and the current position is skipped.

[0015] Preferably, S4 also includes the following contents: after taking photos, label each photo and record the position of the current workpiece to be inspected in the material box; after completing the defect detection process of the current workpiece to be inspected, drive the industrial camera to move to the position of the next workpiece to be inspected through the motion module, and return to S2; when all the material trays are inspected, sort them according to the recorded positions of the defective workpieces.

[0016] Preferably, the system includes a motion module, an industrial computer, a machine vision module, an industrial camera, and a control system, and the motion module includes a mechanical slide rail.

[0017] The present application also discloses a vision-based automobile commutator appearance defect detection device, comprising a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the above-mentioned vision-based automobile commutator appearance defect detection method.

[0018] The present application also discloses a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the above-mentioned vision-based automobile commutator appearance defect detection method is implemented.

[0019] Beneficial effects of the present invention: (1) Through the detection of defect locations and deep learning of training models, the detection efficiency can be improved while the detection accuracy can be effectively improved. By using the motion module to drive the industrial camera to take pictures, the accuracy of the picture can be improved and the loss of manpower and material resources consumed by manual identification can be reduced, thereby improving the industry level and competitiveness.

[0020] The features and advantages of the present invention will be described in detail through embodiments in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flow chart of a system and method for visually detecting appearance defects of an automobile commutator according to the present invention; Figure 2 It is a schematic diagram of a vision-based vehicle commutator appearance defect detection device of the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below through the accompanying drawings and embodiments. However, 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 scope of the present invention. In addition, in the following description, the description of known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.

[0023] See also Figure 1 The embodiment of the present invention provides a system and method for visually detecting appearance defects of automobile commutators. After slight modification, the system and method can also be applied to the detection of automobile parts of other similar products.

[0024] The purpose of the present invention is to provide a commutator appearance defect detection method based on vision, so as to realize high-speed, high-precision and high-real-time defect detection of the commutator and overcome the defects of traditional manual visual quality inspection.

[0025] The present invention provides the following technical solution: a vision-based commutator appearance defect detection method, wherein the appearance defect detection mainly includes an industrial camera, a light source and vision software, a robotic arm and control software.

[0026] The specific process is as follows: the industrial computer is started, and after the system is powered on, the equipment software is started and logged in. The software starts the machine vision module and waits for the motion module to return to the origin position. The material tray is manually placed at the detection position to trigger the detection signal, and the motion module is started. The motion module drives the camera to pass through the material tray loading position and trigger the photo after reaching the position. According to the number of rows and columns of the material box, the module drives the camera to complete the photo taking and processing of the entire commutator in the material tray, and performs defect detection according to the relevant algorithm, and then records the position of the defective workpiece. After the entire material tray is photographed, the defect position information is passed to the motion module, and then the defective products are grabbed into the specified material tray in turn.

[0027] A method for detecting appearance defects of an automobile commutator based on vision comprises the following steps: S1: Place the tray at the detection position; S2: The motion module drives the industrial camera to take pictures of the workpieces in the tray; S3: perform defect detection based on the photos obtained in S2 and record the position of the defective workpiece; S4: After taking the photo, the defect location information is transmitted to the motion module; S5: Grab the defective product to the designated location.

[0028] The machine vision module includes several groups of camera light sources, including front ring light and side oblique light sources at different angles, including low-angle light sources. The combination of several light sources can meet the imaging problems of different defects in all directions.

[0029] In a feasible embodiment, the low-angle light source is 0 degrees.

[0030] In a feasible embodiment, the machine vision module uses two sets of camera light sources to detect various defects of the commutator, including a low-angle light source and a front ring light. The two light sources can solve the problem that different defects are not obvious under one light source. In order to prevent missed detection, the front light source is composed of 4 fan-shaped pieces to form a ring. During the shooting process, 3 pieces are lit separately, and then the light is cycled. This can solve the problem of imaging the same defect at different angles. The camera is installed in the motion module, and the high-speed motion of the motion module is used to take pictures, and then the image is processed by the visual algorithm.

[0031] The front ring light includes a plurality of fan-shaped components, which are combined to form a circular ring. The photographing process includes a plurality of strokes, and a plurality of fan-shaped components are lighted in each stroke to form a plurality of light sources at different angles and positions, so as to meet the imaging problem of the same defect at different angles.

[0032] The defect detection of the photo in S3 includes the following sub-steps: S31: Pre-train the model with pictures of different defect types; S32: Determine the region of interest of the workpiece to be inspected according to the photo acquired in S2; S33: pre-process the image, set the distribution areas of different defects, and improve the detection accuracy; S34: performing intersection processing on the model obtained through deep learning training in S31 and the set distribution areas of different defects to obtain their connected domains; S35: according to the morphological features of the detected defects, the minimum circumscribed rectangle of the connected domain is obtained, and the contour point sets of different defects are preliminarily screened out through the minimum circumscribed rectangle.

[0033] The S31 includes the following sub-steps: S311: Obtain pictures of different defect types; S312: Identify and record the defect position in the image by a marking method; S313: Calculate the image information of the defect area, perform iterative optimization on the model, and obtain the final model.

[0034] The S32 includes the following sub-steps: S321: Setting template parameters through images collected by industrial cameras; S322: Locating the center of the workpiece to be inspected by using a template; S323: Calculate and obtain the region of interest of the workpiece to be inspected according to the width and height of the workpiece to be inspected plus a preset parameter one.

[0035] The S33 includes the following sub-steps: S33: performing image enhancement processing to increase the contrast between the image and the background, including equalization and linear enhancement processing of the image; S34: performing template matching on the enhanced image and cutting the detection area image; S35: Making judgments based on the images and setting distribution areas of different defects.

[0036] The S2 also includes the following contents: after the industrial camera takes a picture, the picture is identified and detected to determine whether the current position of the material tray is in an empty state. If it is in an empty state, the empty position is recorded and the current position is skipped.

[0037] The S4 also includes the following contents: after the photo is taken, each photo is numbered and the position of the current workpiece to be inspected in the material box is recorded; after the defect detection process of the current workpiece to be inspected is completed, the industrial camera is driven by the motion module to move to the position of the next workpiece to be inspected, and returns to the S2; when all the material trays are inspected, the defective workpieces are sorted according to the recorded positions.

[0038] The system consists of a mechanical slide and its control system, an industrial computer, a light source, a camera, etc. The mechanical slide is used to replace the manual picking method. The mechanical movement is combined with the camera and the light source. The mechanical slide moves the camera through the product box, and the camera is photographed and tested during the movement, which reduces the requirements for loading, improves the accuracy and speed of detection, and improves productivity.

[0039] In a feasible embodiment, the visual algorithm image processing includes the following contents: 1) Pre-train the model for images of different defect types. The input size of the trained model is (W+50)*(H+50). The defect positions in the image are marked with colors and the defect types are marked by marking methods. The algorithm calculates the relevant image information of the defect area by marking the colors, records the information of different defects such as chipping and cracks, and then iterates and optimizes the model to obtain a model that meets the requirements.

[0040] 2) During the motion, the camera collects images, sets the template parameters according to the collected images, locates the center of the workpiece through the template, and draws the ROI region of interest of the workpiece to be inspected. For example, if the width and height of the workpiece are W and H, the W and H of the ROI to be inspected are W+50 and H+50 respectively. Among them, 50 is the preset parameter one.

[0041] 3) Image enhancement processing aims to increase the contrast between the image and the background and better extract the features of the commutator. Image enhancement mainly involves equalization and linear enhancement of the image. Where g(x,y) is the processed image, f(x,y) is the input image, and T represents the image enhancement operation. Here, gamma transform is mainly used for image enhancement.

[0042] 4) Cut the detection area image by performing template matching on the enhanced image.

[0043] 5) The pre-processed single commutator image is sent to the image for judgment to set the distribution areas of different defects. For example, a certain type of area is distributed on the inside of the commutator, and some areas only appear on the outside of the commutator. By setting the distribution areas of different defects, the problem of false detection can be effectively avoided.

[0044] 6) The defect type and area location detected by deep learning are intersected with the set different defect distribution areas, U=U1&U2.

[0045] 7) According to the morphological characteristics of the detected defects, the minimum circumscribed rectangle Min_Rotate of the connected domain U is obtained. By setting the minimum and maximum length and width (min_L, min_W, max_L, max_W) and area (min_Aera, max_Aera) of the circumscribed rectangle, the contour point sets of different defects are roughly screened out.

[0046] 8) Label each photograph and record the position of the commutator in the material box during the photographing process.

[0047] 9) After completing the defect detection of a single commutator, move to the next workpiece to take a photo and repeat the process of steps 2-8. When all the boxes are inspected, sort them according to the position of the recorded NG commutators.

[0048] An embodiment of a vision-based automobile commutator appearance defect detection device of the present invention can be applied to any device with data processing capabilities, and the any device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capabilities in which it is located to read the corresponding computer program instructions in the non-volatile memory into the internal memory and run them. From the hardware level, as shown in 2, it is a hardware structure diagram of any device with data processing capabilities in which the vision-based automobile commutator appearance defect detection device of the present invention is located, except Figure 2 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in the embodiment of the device may also include other hardware according to the actual function of the device with data processing capabilities, which will not be described in detail. The implementation process of the functions and effects of each unit in the above device is specifically detailed in the implementation process of the corresponding steps in the above method, which will not be described in detail here.

[0049] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.

[0050] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, a vision-based automobile commutator appearance defect detection device in the above embodiment is implemented.

[0051] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of any device with data processing capability, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), an SD card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capability. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.

[0052] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modification, equivalent substitution or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A system and method for detecting appearance defects of automobile commutators based on vision, characterized in that: It includes an industrial camera responsible for taking pictures, a machine vision module responsible for light source, and a motion module responsible for driving the industrial camera to move. It includes a vision-based appearance defect detection method for an automobile commutator, including the following steps: S1: Place the tray at the detection position; S2: The motion module drives the industrial camera to take pictures of the workpieces in the tray; S3: perform defect detection based on the photos obtained in S2 and record the position of the defective workpiece; S4: After taking the photo, the defect location information is transmitted to the motion module; S5: Grab the defective product to the designated location.

2. The system and method for detecting appearance defects of automobile commutators based on vision as claimed in claim 1, characterized in that: The machine vision module includes several groups of camera light sources, including front ring light and side low-angle light sources at different angles. The combination of several light sources can meet the imaging problem of different defects in all directions.

3. A system and method for visually detecting appearance defects of automobile commutators as claimed in claim 2, characterized in that: The front ring light includes a plurality of fan-shaped components, which are combined to form a circular ring. The photographing process includes a plurality of strokes, and a plurality of fan-shaped components are lighted in each stroke to form a plurality of light sources at different angles and positions, so as to meet the imaging problem of the same defect at different angles.

4. The system and method for visually detecting appearance defects of automobile commutators according to claim 1, characterized in that: The defect detection of the photo in S3 includes the following sub-steps: S31: Pre-train the model with pictures of different defect types; S32: Determine the region of interest of the workpiece to be inspected according to the photo acquired in S2; S33: pre-process the image, set the distribution areas of different defects, and improve the detection accuracy; S34: performing intersection processing on the model obtained through deep learning training in S31 and the set distribution areas of different defects to obtain their connected domains; S35: according to the morphological features of the detected defects, the minimum circumscribed rectangle of the connected domain is obtained, and the contour point sets of different defects are preliminarily screened out through the minimum circumscribed rectangle.

5. The system and method for detecting appearance defects of automobile commutators based on vision as claimed in claim 4, characterized in that: The S31 includes the following sub-steps: S311: Obtain pictures of different defect types; S312: Identify and record the defect position in the image by a marking method; S313: Calculate the image information of the defect area, perform iterative optimization on the model, and obtain the final model.

6. The system and method for detecting appearance defects of automobile commutators based on vision as claimed in claim 4, characterized in that: The S32 includes the following sub-steps: S321: Setting template parameters through images collected by industrial cameras; S322: Locating the center of the workpiece to be inspected by using a template; S323: Calculate and obtain the region of interest of the workpiece to be inspected according to the width and height of the workpiece to be inspected plus a preset parameter one.

7. The system and method for detecting appearance defects of automobile commutators based on vision as claimed in claim 4, characterized in that: The S33 includes the following sub-steps: S33: performing image enhancement processing to increase the contrast between the image and the background, including equalization and linear enhancement processing of the image; S34: performing template matching on the enhanced image and cutting the detection area image; S35: Making judgments based on the images and setting distribution areas of different defects.

8. The system and method for detecting appearance defects of automobile commutators based on vision as claimed in claim 1, characterized in that: The S2 also includes the following contents: after the industrial camera takes a picture, the picture is identified and detected to determine whether the current position of the material tray is in an empty state. If it is in an empty state, the empty position is recorded and the current position is skipped.

9. The system and method for detecting appearance defects of automobile commutators based on vision as claimed in claim 1, characterized in that: The S4 also includes the following contents: after the photo is taken, each photo is numbered and the position of the current workpiece to be inspected in the material box is recorded; after the defect detection process of the current workpiece to be inspected is completed, the industrial camera is driven by the motion module to move to the position of the next workpiece to be inspected, and returns to the S2; when all the material trays are inspected, the defective workpieces are sorted according to the recorded positions.

10. The system and method for detecting appearance defects of automobile commutators based on vision as claimed in claim 1, characterized in that: The system includes a motion module, an industrial computer, a machine vision module, an industrial camera, and a control system, and the motion module includes a mechanical slide rail.

Citation Information

Patent Citations

  • Adjusting module of vertical photographing mechanism

    CN102508395A

  • Detection method and device of surface defect of mechanical part based on machine vision

    CN102680478A

  • Automatic commutator appearance defect online visual detection system

    CN106645189A

  • Method for detecting surface defects of intaglio roller by using 3D photographing technology

    CN112432949A

  • Defect detection system, method and device, equipment and storage medium

    CN112748120A