Workpiece defect detection method and device based on visual detection
By adopting a visual detection method in workpiece detection, images under different conditions are collected and fusion judgments are performed, the problems of large errors and subjective influences of artificial visual detection are solved, and more efficient and accurate workpiece defects are achieved Test.
Patent Information
- Application Number
- CN202411496185.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-07
AI Technical Summary
The inspection of existing workpiece products mainly relies on manual vision, and there are problems such as large errors and susceptible to personal subjective factors, resulting in inaccurate inspection results and inconsistent quality.
A visual detection-based method is adopted to obtain the position information of the workpiece, images under different visual detection conditions are collected, and defect detection is performed using comparison judgment and fusion judgment methods.
It improves the efficiency and accuracy of workpiece detection, reduces artificial visual errors, and avoids missed and missed inspections of defective workpieces.
Smart Images

Figure CN119395026A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual inspection technology, and in particular to a workpiece defect detection method and device based on visual inspection. Background Art
[0002] Visual inspection refers to the process of converting captured targets into image signals through machine vision products, which are then transmitted to a dedicated image processing system. The image processing system performs various operations on these signals to extract the target's features, and obtains corresponding inspection results by identifying and judging the target's features. Therefore, visual inspection has immeasurable value in detecting defects and preventing defective products from being delivered to consumers.
[0003] At present, most of the workpiece product inspections are still carried out by manual visual inspection, that is, a large number of workers inspect the workpieces visually under incandescent lamps and perform simple grading on them. This method not only has large errors but is also easily affected by personal subjective factors. The inspections of different workers vary greatly. Even the inspection standards of the same person at different times may vary, which may lead to uneven quality of the sorted workpieces. Summary of the invention
[0004] The purpose of the present invention is to provide a workpiece defect detection method and device based on visual inspection, aiming to solve the above-mentioned problems in the prior art.
[0005] An embodiment of the present invention provides a workpiece defect detection method based on visual inspection, comprising:
[0006] Acquire position information of a workpiece to be detected, perform image acquisition on the workpiece to be detected based on the position information, and acquire several groups of detection images of the workpiece to be detected under different visual detection conditions;
[0007] The workpiece defect detection is performed on the several groups of detection images using comparison judgment and fusion judgment methods.
[0008] An embodiment of the present invention provides a workpiece defect detection device based on visual detection, comprising:
[0009] A visual inspection module, used to obtain position information of a workpiece to be inspected, perform image acquisition on the workpiece to be inspected based on the position information, and obtain several groups of inspection images of the workpiece to be inspected under different visual inspection conditions;
[0010] The defect detection module is used to perform workpiece defect detection on the plurality of groups of detection images by using comparison judgment and fusion judgment methods.
[0011] An embodiment of the present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the above-mentioned workpiece defect detection method based on visual inspection when executed by the processor.
[0012] An embodiment of the present invention further provides a computer-readable storage medium, on which a program for implementing information transmission is stored, and when the program is executed by a processor, the steps of the above-mentioned workpiece defect detection method based on visual inspection are implemented.
[0013] The use of the embodiments of the present invention may include the following beneficial effects: The embodiments of the present invention provide a method for visual detection of workpiece defects based on CCD camera images, aiming to improve the efficiency and accuracy of workpiece detection, prevent visual error problems in manual detection, and avoid missed detection and false detection of defective workpieces. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0015] Figure 1 is a flow chart of a workpiece defect detection method based on visual inspection according to an embodiment of the present invention;
[0016] Figure 2 is a flow chart of the detection method processing process of an embodiment of the present invention;
[0017] Figure 3 It is a schematic diagram of a workpiece defect detection device based on visual inspection according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0019] Method Embodiment
[0020] According to an embodiment of the present invention, a method for detecting workpiece defects based on visual inspection is provided. Figure 1 is a flow chart of a workpiece defect detection method based on visual inspection according to an embodiment of the present invention. Figure 1 As shown, the workpiece defect detection method based on visual inspection according to an embodiment of the present invention specifically includes:
[0021] Step S101, obtaining position information of a workpiece to be detected, performing image acquisition on the workpiece to be detected based on the position information, and obtaining several groups of detection images of the workpiece to be detected under different visual detection conditions, specifically includes:
[0022] The position information is converted into three-dimensional coordinates, and whether the workpiece to be detected is within a preset coordinate range is determined according to the three-dimensional coordinates. If so, the current three-dimensional coordinates are used as the pre-inspection position of the workpiece to be detected; if not, the position of the workpiece to be detected is adjusted by a positioning device so that the workpiece to be detected falls within the preset coordinate range, and the adjusted three-dimensional coordinates are used as the pre-inspection position of the workpiece to be detected;
[0023] A CCD camera is used to capture an initial image of the workpiece to be detected at the pre-inspection position to obtain an initial image of the workpiece to be detected, and it is determined whether the clarity of the initial image meets the preset clarity requirement. If so, the initial image is used as the pre-inspection image of the workpiece to be detected; if not, the CCD camera is parameter adjusted so that the image clarity of the workpiece to be detected captured after the parameter adjustment is greater than or equal to the preset clarity requirement, and the image of the current workpiece to be detected is used as the pre-inspection image of the workpiece to be detected; the workpiece matching database is traversed according to the pre-inspection image of the workpiece to be detected to obtain workpiece matching information that is compatible with the workpiece to be detected, and the workpiece matching information is obtained by the pre-inspection image of the workpiece to be detected. Determine the original workpiece point information, improved shape features and change requirement features of the workpiece to be detected through the workpiece matching information, generate feature point information of the workpiece to be detected based on the original workpiece point information, improved shape features and change requirement features, insert or replace points according to the feature point information, obtain final adjustment point information of the workpiece to be detected, adjust the positions of the workpiece to be detected and the CCD camera according to the final adjustment point information through a position adjustment device, and collect images of the adjusted workpiece to be detected, so as to obtain several groups of detection images of the workpiece to be detected under different visual detection conditions;
[0024] The visual inspection conditions include optical effects, CCD camera shooting angle, and application of medium or physical quantity on the workpiece surface;
[0025] Step S102, using a comparison judgment and fusion judgment method to perform workpiece defect detection on the plurality of groups of detection images, specifically includes:
[0026] S51: Acquire a standard feature image of the workpiece to be inspected through a design drawing of the workpiece to be inspected;
[0027] S52: Compare a group of detection images among the several groups of detection images with the standard feature image to determine whether there is a contour deviation of the workpiece to be detected in the group of detection images. If so, extract the contour deviation part of the workpiece to be detected in the group of detection images and calculate the contour deviation amount, and determine whether the contour deviation amount exceeds the specified deviation range. If it exceeds, it indicates that there are suspicious defect features on the surface of the workpiece to be detected in the group of detection images, and mark the position of the suspicious defect feature as a temporary suspicious defect position; if it does not exceed, it indicates that there is no contour deviation that can cause defects on the surface of the workpiece to be detected in the group of detection images, and it is used as the corresponding detection result;
[0028] S53: If not, it indicates that there is no defect in the workpiece to be inspected in the group of inspection images, and it is taken as the corresponding inspection result;
[0029] S54: Repeat steps S52-S53 for other groups of detection images in the plurality of groups of detection images, and perform fusion judgment on the obtained plurality of detection results. If the detection results of two or more groups of detection images are consistent, the detection result is used as the final detection result.
[0030] The method further comprises:
[0031] The detected defective workpieces are randomly inspected. If the inspection result is accurate, no marking is performed; if the inspection result is inaccurate, the defective workpieces are marked as error detections, a false detection report is generated, and the visual inspection conditions are updated according to the false detection report.
[0032] The above technical solution of the embodiment of the present invention is described in detail below in combination with the specific situation of the workpiece defect detection method based on visual inspection in the embodiment of the present invention.
[0033] The embodiment of the present invention provides a method for visually detecting workpiece defects based on CCD camera images, such as Figure 2 As shown, the following steps are included:
[0034] S1: Generate point information, collect the position information of the workpiece, then determine the workpiece point information, and generate the final adjustment point information of the workpiece corresponding to the workpiece to be measured.
[0035] In this step, after obtaining the position information of the workpiece, it is converted into the form of three-dimensional coordinates to determine whether it exceeds the preset coordinate range. If not, the currently obtained three-dimensional coordinate form is used as the pre-inspection position result corresponding to the workpiece to be measured. If so, the placement position of the workpiece to be measured is adjusted by controlling the positioning device so that the corresponding three-dimensional coordinates fall within the preset coordinate range, and the three-dimensional coordinate form at this time is used as the pre-inspection position result corresponding to the workpiece to be measured.
[0036] S2: Visual inspection uses a CCD camera to capture images of the workpiece, adjusts the workpiece angle according to the point information, and performs visual inspection of the workpiece in all directions.
[0037] This step includes a visual inspection module, which captures initial image information corresponding to the workpiece to be measured through the visual inspection module in an initialized state, and determines whether the clarity of the initial image information is not less than a preset clarity range requirement. If so, the initial image information is used as a pre-inspection image result corresponding to the workpiece to be measured, and the next step is entered; if not, the parameters of the visual inspection module are adjusted to achieve a clarity not less than the preset clarity range requirement, and the image corresponding to the workpiece to be measured obtained at this time is used as a pre-inspection image result corresponding to the workpiece to be measured, and the next step is entered; according to the pre-inspection image result corresponding to the workpiece to be measured, the workpiece matching database is traversed to find the workpiece matching information that is compatible with the workpiece to be measured, and it is used as the matching information of the workpiece;
[0038] The original workpiece point information, the improved shape characteristics of the workpiece to be measured and the change requirement characteristics are determined from the workpiece matching information, and feature point information based on the workpiece to be measured is generated accordingly. Points of the original workpiece are inserted or replaced according to the obtained feature point information to obtain the final adjusted point information of the workpiece.
[0039] The workpiece matching information mainly includes various types of workpiece parameters and workpiece detection information, and the original workpiece point information is a type of workpiece detection information;
[0040] Regarding improved shape features: Even for the same type of workpieces, temporary improvements are often made to the workpieces for the purpose of process improvement and functional adaptation. For example, for the trial production of cover sheet metal products, local structural improvements will be made. Therefore, it is necessary to obtain the inspection information of these locally improved parts, and then conduct focused defect detection on these parts. In addition to the improved shape features of the workpiece to be tested, there are also variable demand features, which are features based on temporary manual input. For example, relevant R&D personnel need to focus on inspecting a certain part of the workpiece for safety reasons, and need to pay special attention to whether this part has defects. According to the above-mentioned improved shape features and variable demand features, several feature points based on the workpiece to be tested are adaptively added to ensure all-round detection;
[0041] Determine the original workpiece point information according to the workpiece matching information and add feature points based on the workpiece to be measured, generate the final workpiece adjustment point information corresponding to the workpiece to be measured, and insert or replace the feature points into the original workpiece points, specifically: when the feature point does not overlap with any point of the original workpiece point, and the distance to the adjacent original workpiece point is greater than the preset threshold range, the feature point is selected to be inserted, and the point of the original workpiece point is not changed; when the feature point overlaps with any point of the original workpiece point, or the distance to the adjacent original workpiece point is less than or equal to the preset threshold range, the feature point is selected to be replaced, that is, the corresponding point in the original workpiece point is deleted and the feature point is filled;
[0042] The positioning device is controlled to adjust the position of the workpiece to be measured according to the final adjustment point information of the workpiece, and the position of the visual inspection module is adjusted to achieve omnidirectional image sampling.
[0043] S3: Detection fusion, upload the images collected by the CCD camera and transmit them to the defect detection fusion module. The defect detection fusion module determines the defects of the workpiece to be tested based on at least two sets of detection images under different detection conditions. The detection conditions include optical effects, CCD camera shooting angles, and the application of media or physical quantities on the workpiece surface. In this step, the uploaded images are spliced using image stitching technology to form several feature images based on the same reference object, and the feature images are sorted.
[0044] S4: Marking judgment. When making defect judgment, the surface features of the workpiece to be tested are subjected to defect recognition. If it is determined that there are suspicious defect features on the surface of the workpiece to be tested in the group of detection images, the position where the suspicious defect features are located on the surface of the workpiece to be tested is marked and recorded as a temporary suspicious defect position; then the surface features of the workpiece to be tested in at least one other group of detection images are also subjected to defect recognition. If there are also suspicious defect features on the surface of the workpiece to be tested in the temporary suspicious defect position in at least one other group of detection images, it is determined that there is a defect in the temporary defect position of the workpiece to be tested; if there are no suspicious defect features on the surface of the workpiece to be tested in at least one other group of detection images at the temporary suspicious defect position, it is determined that there is no defect in the temporary defect position of the workpiece to be tested. Use multiple detection modules under different detection conditions to perform visual inspection on the workpiece to be tested, and the defect detection fusion module fuses at least two groups of detection images under different detection conditions to determine the defects of the workpiece to be tested, so that the judgment result is more accurate.
[0045] The specific implementation method is: compare and judge according to the sorting order through the comparison and judgment strategy to obtain the final result. The comparison and judgment strategy is specifically: call the standard feature image converted from the design drawing of the workpiece to be tested, and perform edge detection and local enhancement on the standard feature image to generate a standard feature image for comparison, compare the standard feature image with the feature image currently required to be compared, and judge whether there is a contour deviation. If so, extract the contour deviation part, obtain the contour deviation amount by calculation, and judge whether the contour deviation amount exceeds the standard value calculated by the specified tolerance. If so, it is determined that the feature image currently required to be compared has a contour deviation part that causes defects, and it is used as the corresponding detection result, and then the next step is executed; if not, it is determined that the feature image currently required to be compared has a contour deviation, but does not have a contour deviation part that causes defects, and it is used as the corresponding detection result.
[0046] S5: Comparison and audit: manually check and audit defective workpieces to compare whether the defects are real and accurate, and summarize and report the audit results.
[0047] This step includes a comparison module, which reviews and compares the workpiece defects. If they are accurate, they will not be marked. If they are inaccurate, they will be marked. The marked workpiece inspection information is summarized into a table for reporting, and the defect visual inspection conditions are updated according to the defect information.
[0048] Device Example 1
[0049] According to an embodiment of the present invention, a workpiece defect detection device based on visual detection is provided. Figure 3 Schematic diagram of a workpiece defect detection device based on visual inspection according to an embodiment of the present invention. Figure 3As shown, the workpiece defect detection device based on visual inspection according to an embodiment of the present invention specifically includes:
[0050] The visual inspection module 30 is used to obtain the position information of the workpiece to be inspected, perform image acquisition on the workpiece to be inspected based on the position information, and obtain several groups of inspection images of the workpiece to be inspected under different visual inspection conditions, specifically for:
[0051] The position information is converted into three-dimensional coordinates, and whether the workpiece to be detected is within a preset coordinate range is determined according to the three-dimensional coordinates. If so, the current three-dimensional coordinates are used as the pre-inspection position of the workpiece to be detected; if not, the position of the workpiece to be detected is adjusted by a positioning device so that the workpiece to be detected falls within the preset coordinate range, and the adjusted three-dimensional coordinates are used as the pre-inspection position of the workpiece to be detected;
[0052] A CCD camera is used to capture an initial image of the workpiece to be detected at the pre-inspection position to obtain an initial image of the workpiece to be detected, and it is determined whether the clarity of the initial image meets the preset clarity requirement. If so, the initial image is used as the pre-inspection image of the workpiece to be detected; if not, the CCD camera is parameter adjusted so that the image clarity of the workpiece to be detected captured after the parameter adjustment is greater than or equal to the preset clarity requirement, and the image of the current workpiece to be detected is used as the pre-inspection image of the workpiece to be detected; the workpiece matching database is traversed according to the pre-inspection image of the workpiece to be detected to obtain workpiece matching information that is compatible with the workpiece to be detected, and the workpiece matching information is obtained by the pre-inspection image of the workpiece to be detected. Determine the original workpiece point information, improved shape features and change requirement features of the workpiece to be detected through the workpiece matching information, generate feature point information of the workpiece to be detected based on the original workpiece point information, improved shape features and change requirement features, insert or replace points according to the feature point information, obtain final adjustment point information of the workpiece to be detected, adjust the positions of the workpiece to be detected and the CCD camera according to the final adjustment point information through a position adjustment device, and collect images of the adjusted workpiece to be detected, so as to obtain several groups of detection images of the workpiece to be detected under different visual detection conditions;
[0053] A defect detection module 32 is used to detect workpiece defects by using a comparison judgment and fusion judgment method on the plurality of groups of detection images;
[0054] The device further comprises:
[0055] The detection optimization module is used to perform random inspections on the defective workpieces detected. If the detection result is accurate, no marking is performed; if the detection result is inaccurate, the defective workpiece is marked as an error detection, a false detection report is generated, and the visual inspection conditions are updated according to the false detection report.
[0056] Specifically, a workpiece defect visual detection device based on CCD camera images proposed in an embodiment of the present invention can be refined into an information acquisition module, an optical module, a visual detection module, an angle adjustment module, and a defect detection fusion module.
[0057] The information acquisition module is connected with the optical module, the visual inspection module and the angle adjustment module. The information acquisition module is connected with the transmission module. The information acquisition module is connected with the defect detection fusion module through the transmission module. The information acquisition module performs image acquisition through a CCD camera.
[0058] The angle adjustment module is used to place the workpiece to be measured and adjust the position of the workpiece to be measured.
[0059] The visual inspection module is used to obtain images of the workpiece to be tested in various directions. By cooperating with the optical module, the angle adjustment module and the information acquisition module, it collects information images of the workpiece in various dimensions, thereby detecting the workpiece images under different conditions and angles, greatly improving the detection efficiency and detection accuracy, and realizing intelligent and efficient workpiece detection.
[0060] The defect detection fusion module detects surface defects of the workpiece to be tested in the following types or any combination: foreign matter on the workpiece surface, scratches on the workpiece surface, and chipping on the edge of the workpiece.
[0061] The workpiece defect visual detection device also includes a pre-inspection module, a workpiece matching module, and a point setting module.
[0062] The pre-inspection module is used to collect the captured image output by the visual inspection module and the position information of the workpiece to be measured output by the position detector after the workpiece to be measured is placed on the positioning device, find out the workpiece matching information that matches the workpiece to be measured, and form a pre-inspection result;
[0063] The workpiece matching module is configured to generate workpiece matching information according to the pre-check result output by the pre-check module;
[0064] The point setting module is configured to generate final adjustment point information of the workpiece according to the workpiece matching information output by the workpiece matching module.
[0065] In summary, the embodiments of the present invention have the following beneficial effects:
[0066] 1. The embodiment of the present invention collects information images of various dimensions of the workpiece through the cooperation between the optical module, the angle adjustment module and the information acquisition module in the device, thereby detecting the workpiece images under different conditions and angles, thereby greatly improving the detection efficiency and the detection accuracy, and realizing intelligent and efficient workpiece detection.
[0067] 2. The embodiment of the present invention uses multiple detection modules under different detection conditions to perform visual inspection on the workpiece to be tested. The defect detection fusion module fuses at least two groups of detection images under different detection conditions to determine the defects of the workpiece to be tested, so that the judgment result is more accurate.
[0068] 3. The embodiment of the present invention determines whether there is a contour deviation, and then determines whether the contour deviation exceeds the standard value calculated by the specified tolerance, and then determines whether the feature image that needs to be compared currently has a contour deviation part that causes the defect, and uses it as the corresponding detection result. Such a detection method is more intelligent and accurate.
[0069] Device Example 2
[0070] An embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps described in the method embodiment when executed by the processor.
[0071] Device Example 3
[0072] An embodiment of the present invention provides a computer-readable storage medium, on which a program for implementing information transmission is stored. When the program is executed by a processor, the steps described in the method embodiment are implemented.
[0073] The computer-readable storage medium in this embodiment includes, but is not limited to, ROM, RAM, magnetic disk or optical disk, etc.
[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A workpiece defect detection method based on visual inspection, characterized in that include: Acquire position information of a workpiece to be detected, perform image acquisition on the workpiece to be detected based on the position information, and acquire several groups of detection images of the workpiece to be detected under different visual detection conditions; The workpiece defect detection is performed on the several groups of detection images using comparison judgment and fusion judgment methods.
2. The method according to claim 1, characterized in that: The method further comprises: The detected defective workpieces are randomly inspected. If the inspection result is accurate, no marking is performed; if the inspection result is inaccurate, the defective workpieces are marked as error detections, a false detection report is generated, and the visual inspection conditions are updated according to the false detection report.
3. The method according to claim 1, characterized in that Capturing images of the workpiece to be inspected based on the position information to obtain a plurality of groups of inspection images of the workpiece to be inspected under different visual inspection conditions specifically includes: The position information is converted into three-dimensional coordinates, and whether the workpiece to be detected is within a preset coordinate range is determined according to the three-dimensional coordinates. If so, the current three-dimensional coordinates are used as the pre-inspection position of the workpiece to be detected; if not, the position of the workpiece to be detected is adjusted by a positioning device so that the workpiece to be detected falls within the preset coordinate range, and the adjusted three-dimensional coordinates are used as the pre-inspection position of the workpiece to be detected; A CCD camera is used to capture an initial image of the workpiece to be detected at the pre-inspection position to obtain an initial image of the workpiece to be detected, and it is determined whether the clarity of the initial image meets the preset clarity requirement. If so, the initial image is used as the pre-inspection image of the workpiece to be detected; if not, the CCD camera is parameter adjusted so that the image clarity of the workpiece to be detected captured after the parameter adjustment is greater than or equal to the preset clarity requirement, and the image of the current workpiece to be detected is used as the pre-inspection image of the workpiece to be detected; the workpiece matching database is traversed according to the pre-inspection image of the workpiece to be detected to obtain workpiece matching information that is compatible with the workpiece to be detected, and the workpiece matching information is obtained by the pre-inspection image of the workpiece to be detected. The original workpiece point information, improved shape features and change requirement features of the workpiece to be detected are determined through the workpiece matching information, and the feature point information of the workpiece to be detected is generated based on the original workpiece point information, the improved shape features and the change requirement features. Points are inserted or replaced according to the feature point information to obtain the final adjusted point information of the workpiece to be detected. The workpiece to be detected and the CCD camera are adjusted in position according to the final adjusted point information through a position adjustment device, and image acquisition is performed on the adjusted workpiece to be detected to obtain several groups of detection images of the workpiece to be detected under different visual inspection conditions.
4. The method according to claim 1, characterized in that The visual inspection conditions include optical effects, a CCD camera shooting angle, and application of a medium or physical quantity on the workpiece surface.
5. The method according to claim 1, characterized in that The use of comparison and fusion judgment methods to detect workpiece defects on the plurality of groups of detection images specifically includes: S51: Acquire a standard feature image of the workpiece to be inspected through a design drawing of the workpiece to be inspected; S52: Compare a group of detection images among the several groups of detection images with the standard feature image to determine whether there is a contour deviation of the workpiece to be detected in the group of detection images. If so, extract the contour deviation part of the workpiece to be detected in the group of detection images and calculate the contour deviation amount, and determine whether the contour deviation amount exceeds the specified deviation range. If it exceeds, it indicates that there are suspicious defect features on the surface of the workpiece to be detected in the group of detection images, and mark the position of the suspicious defect feature as a temporary suspicious defect position; if it does not exceed, it indicates that there is no contour deviation that can cause defects on the surface of the workpiece to be detected in the group of detection images, and it is used as the corresponding detection result; S53: If not, it indicates that there is no defect in the workpiece to be inspected in the group of inspection images, and it is taken as the corresponding inspection result; S54: Repeat steps S52-S53 for other groups of detection images in the plurality of groups of detection images, and perform fusion judgment on the obtained plurality of groups of detection results. If the detection results of two or more groups of detection images are consistent, the detection result is used as the final detection result.
6. A workpiece defect detection device based on visual inspection, characterized in that include: A visual inspection module, used to obtain position information of a workpiece to be inspected, perform image acquisition on the workpiece to be inspected based on the position information, and obtain several groups of inspection images of the workpiece to be inspected under different visual inspection conditions; The defect detection module is used to perform workpiece defect detection on the plurality of groups of detection images by using comparison judgment and fusion judgment methods.
7. The device according to claim 6, characterized in that The device further comprises: The detection optimization module is used to perform random inspections on the defective workpieces detected. If the detection result is accurate, no marking is performed; if the detection result is inaccurate, the defective workpiece is marked as an erroneous detection, a false detection report is generated, and the visual inspection conditions are updated according to the false detection report.
8. The device according to claim 6, characterized in that The visual detection module is specifically used for: Convert the position information into three-dimensional coordinates, and determine whether the workpiece to be detected is within a preset coordinate range according to the three-dimensional coordinates, and if so, use the current three-dimensional coordinates as the pre-inspection position of the workpiece to be detected; If not, the position of the workpiece to be detected is adjusted by a position adjustment device so that the workpiece to be detected falls within a preset coordinate range, and the adjusted three-dimensional coordinates are used as the pre-inspection position of the workpiece to be detected; A CCD camera is used to capture an initial image of the workpiece to be detected at the pre-inspection position to obtain an initial image of the workpiece to be detected, and it is determined whether the clarity of the initial image meets the preset clarity requirement. If so, the initial image is used as the pre-inspection image of the workpiece to be detected; if not, the parameters of the CCD camera are adjusted so that the clarity of the image of the workpiece to be detected captured after the parameter adjustment is greater than or equal to the preset clarity requirement, and the current image of the workpiece to be detected is used as the pre-inspection image of the workpiece to be detected; According to the pre-inspection image of the workpiece to be inspected, the workpiece matching database is traversed to obtain the workpiece matching information adapted to the workpiece to be inspected, the original workpiece point information, improved shape features and change requirement features of the workpiece to be inspected are determined through the workpiece matching information, and the feature point information of the workpiece to be inspected is generated based on the original workpiece point information, improved shape features and change requirement features, and points are inserted or replaced according to the feature point information to obtain the final adjusted point information of the workpiece to be inspected, the position of the workpiece to be inspected and the CCD camera is adjusted according to the final adjusted point information by a position adjustment device, and image acquisition is performed on the adjusted workpiece to be inspected to obtain several groups of inspection images of the workpiece to be inspected under different visual inspection conditions.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the workpiece defect detection method based on visual inspection as described in any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an implementation program for information transmission, and when the program is executed by a processor, the steps of the workpiece defect detection method based on visual inspection as described in any one of claims 1 to 5 are implemented.
Citation Information
Cited By
Defect detection method and system for mechanical arm accessory after casting
CN120253849A
Mobile phone shell assembly defect detection method and system
CN120852371A