Automobile oil pump flat gasket appearance detection method and system
By combining multi-angle image acquisition and fusion processing with defect recognition algorithms and dynamically adjusting light source parameters, the problems of inaccurate scratch direction differentiation and notch positioning in existing technologies have been solved, achieving high-precision appearance inspection of automotive oil pump gaskets and improving the accuracy and automation of inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-14
AI Technical Summary
Existing machine vision inspection technology cannot accurately distinguish the direction of scratches and the location of gaps in the appearance inspection of automotive oil pump gaskets, resulting in low inspection accuracy and failing to meet the requirements of high-precision quality control.
By acquiring and fusing multi-angle images, combined with defect recognition algorithms, the system can intelligently distinguish the direction of scratches and accurately locate the geometric parameters of gaps. After flipping, the system can dynamically adjust the light source parameters according to the position offset of the gap to enhance the illumination of the gap area on the reverse side. Finally, the system can generate an appearance inspection report by combining the inspection results of the front and back sides.
It significantly improves the accuracy of scratch classification and the precision of notch positioning, reduces the rate of missed detection and misjudgment, and meets the high-precision quality control requirements of the large-scale production of automotive oil pump gaskets.
Smart Images

Figure CN121431372B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive parts testing technology, specifically to a method and system for visually inspecting automotive oil pump gaskets. Background Technology
[0002] As a key sealing component in the automotive fuel supply system, the appearance quality of the fuel pump gasket directly affects the pump's sealing performance, pressure stability, and service life. Defects such as scratches and gaps can easily lead to fuel leaks and abnormal pressure. Therefore, appearance defect detection is an indispensable quality control step in the gasket production process. With the automotive manufacturing industry moving towards automation and high precision, traditional manual visual inspection methods, due to their subjectivity, susceptibility to fatigue and environmental influences, and low efficiency, are no longer sufficient to meet the quality control needs of large-scale production. Machine vision inspection technology, with its advantages of high efficiency, objectivity, and quantifiability, is gradually becoming the mainstream technical solution for gasket appearance inspection.
[0003] Existing machine vision inspection technology has significant shortcomings in the appearance inspection of automotive oil pump gaskets: On the one hand, it lacks the ability to intelligently distinguish the direction of scratches. Traditional defect recognition algorithms mostly rely on simple edge detection or template matching, which cannot accurately extract the directional features of scratches, making it difficult to reliably distinguish between horizontal and vertical scratches. Furthermore, it is sensitive to the rotational posture during the gasket inspection process, resulting in low scratch classification accuracy and failing to meet the requirements of refined quality control. On the other hand, the accuracy of notch detection is insufficient. Existing inspection systems cannot achieve precise linkage between the positions of notches on the front and back sides, and the light source parameters are mostly fixed. They cannot dynamically adjust the illumination angle and intensity according to the positional shift of the notch after flipping, resulting in blurred imaging of the notch area and low contrast with the background, which easily leads to positioning deviations, missed detections, or misjudgments. Summary of the Invention
[0004] This invention provides a method and system for inspecting the appearance of flat gaskets for automotive oil pumps, which solves the problems of lack of intelligent recognition capability for scratch direction and low detection accuracy of notches in the prior art.
[0005] To achieve the above objectives, one embodiment of the present invention provides a method for inspecting the appearance of a flat gasket for an automotive oil pump, comprising the following steps: Step S1: Illuminating the flat gasket with a light source and acquiring multi-angle images of the front of the flat gasket to generate a first image sequence; fusing the first image sequence to generate a front feature image to highlight defect features; based on the front feature image, performing front defect detection on the flat gasket using a preset defect recognition algorithm to identify scratches and notches on the front and determine the direction of the scratches and the geometric parameters of the notches; Step S2: Flipping the flat gasket and acquiring a reverse positioning image of the flat gasket; based on the reverse positioning image, using the image... The recognition algorithm determines the geometric parameters of the notch on the reverse side of the flat gasket and compares them with the geometric parameters of the notch on the front side to calculate the notch position offset; Step S3: Based on the notch position offset, calculate the adjustment parameters of the light source; According to the adjustment parameters, dynamically adjust the operating parameters of the light source to enhance the illumination of the notch area on the reverse side of the flat gasket; Step S4: Acquire multi-angle images of the reverse side of the flat gasket to generate a second image sequence; Perform fusion processing on the second image sequence to generate a reverse side feature image and perform reverse side defect detection on the flat gasket using the defect recognition algorithm; Step S5: Combine the results of the front side defect detection and the reverse side defect detection to generate the appearance inspection result of the flat gasket.
[0006] Optionally, the process of fusing the first image sequence or the second image sequence to generate a frontal or back feature image includes: registering each image in the image sequence to eliminate pixel position deviations caused by different shooting angles; calculating the grayscale gradient of each pixel in the registered image at the corresponding position in the multi-angle image sequence; dynamically assigning fusion weights to each pixel in different images of the sequence based on the grayscale gradients; and performing pixel-level weighted fusion on the image sequence based on the assigned fusion weights to generate a feature image.
[0007] Optionally, the defect recognition algorithm includes a scratch recognition sub-algorithm and a notch recognition sub-algorithm; the scratch recognition sub-algorithm includes: preprocessing the front or back feature image, identifying linear defect regions in the feature image through multi-scale edge detection; selecting regions that meet preset scratch morphology conditions as scratch candidate regions from the linear defect regions based on their geometric features; for each scratch candidate region, extracting its contour and calculating its minimum bounding rectangle, using the major axis direction of the minimum bounding rectangle as the main direction line of the scratch; calculating the angle between the main direction line and the radial direction of the flat pad, and classifying the scratch into a horizontal scratch or a vertical scratch according to a preset scratch classification standard.
[0008] Optionally, the gap identification sub-algorithm includes: extracting edge contours from the front or back feature image to obtain the complete outer contour of the flat pad; calculating the curvature of the outer contour and locating contour points with curvature values exceeding a preset threshold, identifying continuous contour segments with abnormal curvature as potential gap regions; performing polygon approximation on the potential gap regions and calculating their geometric parameters.
[0009] Optionally, the image recognition algorithm includes: preprocessing the reverse positioning image, extracting the outer circle contour features of the reverse side of the flat gasket, and calculating the reverse center reference based on the outer circle contour features; establishing the coordinate correspondence between the reverse center reference and the flat gasket center reference in the front feature image to form a unified reference coordinate system; determining the candidate regions corresponding to the reverse and front notches in the reference coordinate system based on the geometric parameters of the front notch; and extracting the contour features, size data, and radial distance and circumferential angle of the candidate regions relative to the reverse center reference to obtain the geometric parameters of the flat gasket reverse notch.
[0010] Optionally, the notch position offset includes a circumferential angle offset and a radial distance offset. The calculation process of the notch position offset includes: in the reference coordinate system, comparing the radial distance and circumferential angle of the notch on the reverse side with the corresponding geometric parameters of the notch on the front side one by one, and calculating the circumferential angle deviation value and the radial distance deviation value.
[0011] Optionally, the calculation of the adjustment parameters includes: calculating the incident angle compensation amount of the light source based on the circumferential angle offset in the notch position offset; determining the compensation coefficient of the light source illumination intensity based on the radial distance offset in the notch position offset and in combination with the notch depth and width dimensions in the front feature image; and inputting the incident angle compensation amount and the illumination intensity compensation coefficient of the light source into a preset light source parameter mapping model to obtain the adjustment parameters.
[0012] Optionally, the process of generating the appearance inspection results includes: integrating the front defect inspection results and the back defect inspection results to establish a comprehensive dataset of front and back defects of the flat gasket; comparing each defect parameter in the comprehensive dataset one by one based on the preset appearance qualification threshold of the flat gasket, and filtering out defects that exceed the standard; and statistically analyzing the type, quantity, and location of all defects that exceed the standard as the appearance inspection results.
[0013] On the other hand, a surface inspection system for automotive oil pump gaskets is also provided to implement the aforementioned surface inspection method for automotive oil pump gaskets. The system includes: a material handling and conveying assembly comprising upper and lower conveyor belts for conveying the gasket to the imaging area and flipping it; an end-face appearance station optical assembly comprising multiple cameras and light sources arranged beside the imaging area of the material handling and conveying module for illuminating the gasket from different directions to acquire multi-angle images; an image processing and control unit for generating feature images based on the acquired multi-angle images; further processing the feature images to identify scratches and notches, determine the direction of the scratches, and locate the geometric parameters of the notches, generating front and back defect detection results for the gasket; and calculating the adjustment parameters of the light source based on the geometric parameters of the front notches after the gasket is flipped.
[0014] Optionally, the image processing and control unit further includes a light control subunit and a result synthesis subunit; the light control subunit is used to adjust the operating parameters of the light source to adjust the illumination intensity and illumination angle of the light source; the result synthesis subunit is used to integrate the front and back defect detection results and verify the authenticity of the defects to generate appearance inspection results.
[0015] This invention provides a method and system for inspecting the appearance of automotive oil pump gaskets. It highlights defect features through multi-angle image acquisition and fusion processing from the front, and combines a defect recognition algorithm to intelligently distinguish scratch directions and accurately locate the geometric parameters of notches. After flipping the gasket, the system compares the images from the reverse side to calculate the notch position offset. Based on this offset, the system dynamically adjusts the light source parameters to enhance illumination of the notch area on the reverse side. Subsequently, it fuses multi-angle images from the reverse side and performs defect detection, generating a final report by combining the detection results from both sides. This method effectively solves the core problems of unstable scratch direction differentiation and low notch detection accuracy in existing technologies. It also achieves linked detection of defects from both sides, significantly improving the accuracy of scratch classification and the precision of notch location and imaging. Simultaneously, it ensures the continuity and automation of the inspection process, greatly reducing the missed detection rate and false positive rate, and meeting the high-precision quality control requirements for the large-scale production of automotive oil pump gaskets. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this 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 some embodiments of this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0017] Figure 1 This is a flowchart of the appearance inspection method for automotive oil pump gaskets provided in this embodiment of the invention;
[0018] Figure 2 This is a flowchart of the image fusion processing provided in an embodiment of the present invention;
[0019] Figure 3 This is a flowchart of the defect identification process provided in an embodiment of the present invention;
[0020] Figure 4 This is a flowchart of the calculation of light source adjustment parameters provided in an embodiment of the present invention;
[0021] Figure 5 This is a schematic diagram of the appearance inspection system for automotive oil pump gaskets provided in an embodiment of the present invention;
[0022] Among them, 1. conveyor belt; 2. light source; 3. camera; 4. flat pad. Detailed Implementation
[0023] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0024] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0025] With increasingly stringent quality requirements for key components in the automotive industry and the ever-accelerating pace of intelligent manufacturing production lines, existing methods for inspecting the appearance of flat gaskets suffer from several problems. These include the inherent subjectivity of manual visual inspection leading to inconsistent judgment standards, high false negative rates for low-contrast scratches and micron-level defects using traditional image algorithms, the difficulty of overcoming surface reflection interference with a single light source, and the inefficiency of manual flipping for double-sided inspection. Therefore, developing an automated appearance inspection solution that deeply integrates multi-angle optical imaging, dynamic optical correction, and artificial intelligence recognition is crucial.
[0026] To address this issue, this invention proposes a method and system for inspecting the appearance of flat gaskets based on multi-angle imaging and dynamic light control. It generates high-contrast defect feature images using multi-angle light source technology, utilizes a direction-aware deep learning algorithm to identify scratch directions and locate the geometric parameters of the notch, and dynamically adjusts the light source angle and intensity based on the position offset after flipping to enhance illumination of the notch area on the reverse side. Finally, it generates the appearance inspection result by fusing and verifying the front and back inspection results, forming a closed-loop inspection process from image acquisition, feature enhancement, intelligent recognition to light control optimization, significantly improving inspection accuracy, efficiency, and adaptability to complex defects.
[0027] The following is combined Figures 1-5 This invention is described in detail.
[0028] like Figure 1 As shown, this embodiment of the invention provides a method for inspecting the appearance of a flat gasket for an automotive oil pump, including the following steps: Step S1: Illuminate the flat gasket with a light source and acquire multi-angle images of the front of the flat gasket to generate a first image sequence; perform fusion processing on the first image sequence to generate a front feature image to highlight defect features; based on the front feature image, perform front defect detection on the flat gasket using a preset defect recognition algorithm to identify scratches and gaps on the front and determine the direction of the scratches and the geometric parameters of the gaps; Step S2: Flip the flat gasket and acquire a positioning image of the reverse side of the flat gasket; based on the positioning image of the reverse side, perform image recognition algorithm... Step S3: Determine the geometric parameters of the notch on the reverse side of the flat gasket and compare them with the geometric parameters of the notch on the front side to calculate the notch position offset; Step S4: Calculate the adjustment parameters of the light source based on the notch position offset; Dynamically adjust the operating parameters of the light source according to the adjustment parameters to enhance the illumination of the notch area on the reverse side of the flat gasket; Step S5: Acquire multi-angle images of the reverse side of the flat gasket to generate a second image sequence; Perform fusion processing on the second image sequence to generate a reverse side feature image and perform reverse side defect detection on the flat gasket using the defect recognition algorithm; Step S6: Combine the results of the front side defect detection and the reverse side defect detection to generate the appearance inspection result of the flat gasket.
[0029] Among them, multi-angle images refer to images captured by a camera at different shooting angles around the same end face of the flat gasket, which can comprehensively capture the feature details of defects under different lighting perspectives. Feature images are images that highlight the gray-scale contrast and edge contours between the defect and the background after image sequence fusion processing, and their defect area recognition is higher than that of a single original image. The geometric parameters of the notch include the radial distance of the notch relative to the center reference of the flat gasket, the circumferential angle, the notch opening width, and the notch depth. These are the core parameters for locating the notch position and assessing the degree of defect. The light source adjustment parameters refer to the set of parameters used to dynamically adjust the working state of the light source. The core parameters include the illumination angle compensation value and the illumination intensity adjustment coefficient, which can adapt to the positional offset of the notch on the reverse side.
[0030] The detection method provided in this invention highlights defect features through multi-angle image fusion, combines a defect recognition algorithm to accurately distinguish scratch directions and precisely locate the geometric parameters of notches, and then dynamically adjusts the light source parameters based on the offset of the notch positions on the front and back sides to achieve directional enhanced illumination and accurate detection of the notch area on the back side. Finally, a report is generated by combining the detection results of the front and back sides. This method not only effectively solves the problems of unstable scratch direction distinction, notch positioning deviation, and image blurring in traditional detection, but also constructs a closed-loop process of "acquisition-recognition-positioning-light control-re-detection", which significantly improves the defect recognition accuracy and detection precision, greatly reduces the missed detection rate and false judgment rate, and ensures the automation and continuity of the detection process, adapting to the high-precision quality control requirements of the large-scale production of automotive oil pump gaskets.
[0031] like Figure 2 As shown, preferably, the process of fusing the first image sequence or the second image sequence to generate a frontal or back feature image includes: registering each image in the image sequence to eliminate pixel position deviations caused by different shooting angles; calculating the grayscale gradient of each pixel in the registered image at the corresponding position in the multi-angle image sequence; dynamically assigning fusion weights to each pixel in different images of the sequence based on the grayscale gradients; and performing pixel-level weighted fusion on the image sequence based on the assigned fusion weights to generate a feature image.
[0032] The image registration process employs a feature point matching-based method. By extracting common feature points such as the outer circular contour and central reference of the flat pad in each image, the sequential images are mapped to the same coordinate system, eliminating pixel misalignment caused by differences in shooting angles. Gray-level gradient is used to characterize the rate and direction of gray-level change between a pixel and its neighboring pixels. It is a core indicator reflecting defect edges and detailed features; a larger gradient value indicates a higher degree of distinction between the defect and the background. Dynamic allocation of fusion weights refers to assigning differentiated weights to images from different angles based on the differences in gray-level gradients of the same pixel in each image. Images with higher gradient values correspond to larger weights, ensuring that defect details are more prominent after fusion. Pixel-level weighted fusion involves superimposing gray-level values of corresponding pixels in the registered sequential images according to the assigned weights to generate a single composite image, achieving the fusion and enhancement of defect features from multiple perspectives.
[0033] Specifically, the grayscale gradient is calculated using the Sobel operator, and its calculation formula is as follows:
[0034]
[0035] in, For pixels The grayscale gradient; The gradient component is in the x-direction. The gradient component in the y-direction is obtained by convolution using the Sobel operator.
[0036] Specifically, the dynamic fusion weight allocation formula is as follows:
[0037]
[0038] in, For the pixel in the i-th image The fusion weights; represents the grayscale gradient of the pixel in the i-th image; n is the number of images in the image sequence. This is the sum of the grayscale gradients of the pixel across all image sequences.
[0039] Specifically, the pixel-level weighted fusion method is as follows:
[0040]
[0041] in, For pixels in the fused feature image grayscale value; This represents the grayscale value of the pixel in the k-th original image. For the corresponding fusion weights.
[0042] For example, five multi-angle images of the front of a car oil pump gasket are captured to form the first image sequence. First, image registration is completed by matching the feature points of the outer circle contour of the gasket to eliminate pixel misalignment caused by shooting from different angles. For the pixel (x,y) where a minor scratch is located, the gray value gradient of the point in each image is calculated by the Sobel operator as 20, 45, 68, 52, and 33, respectively. The corresponding weights are calculated as 0.08, 0.18, 0.27, 0.21, and 0.13 according to the dynamic fusion weight allocation formula. Then, the gray values of each image are superimposed by the pixel-level weighted fusion formula to finally generate the front feature image.
[0043] The image fusion processing method proposed in the preferred embodiment of this invention first eliminates pixel deviations from multi-angle shooting by registration, then dynamically allocates fusion weights based on grayscale gradients, and finally performs pixel-level weighted fusion. This effectively solves the problems of blurred defect details in single-view images and incomplete capture of defect features from different angles. It significantly improves the grayscale contrast and edge clarity of defects and backgrounds in feature images, allowing key features such as fine scratches and gap edges to be accurately highlighted. This provides a high-quality image foundation for subsequent defect recognition algorithms, indirectly ensuring the accuracy of scratch direction determination and gap geometric parameter positioning, and improving the reliability of the overall detection process.
[0044] like Figure 3As shown, preferably, the defect recognition algorithm includes a scratch recognition sub-algorithm and a notch recognition sub-algorithm; the scratch recognition sub-algorithm includes: preprocessing the front feature image or the back feature image, and identifying linear defect regions in the feature image through multi-scale edge detection; from the linear defect regions, based on their geometric features, selecting regions that meet the preset scratch morphology conditions as scratch candidate regions; for each scratch candidate region, extracting its contour and calculating its minimum bounding rectangle, using the major axis direction of the minimum bounding rectangle as the main direction line of the scratch; calculating the angle between the main direction line and the radial direction of the flat pad, and classifying the scratch into a horizontal scratch or a vertical scratch according to the preset scratch classification standard.
[0045] Further preferably, the gap recognition sub-algorithm includes: extracting edge contours from the front feature image or the back feature image to obtain the complete outer contour of the flat pad; calculating the curvature of the outer contour and locating contour points with curvature values exceeding a preset threshold, identifying continuous contour segments with abnormal curvature as potential gap regions; performing polygon approximation on the potential gap regions and calculating their geometric parameters.
[0046] Multi-scale edge detection employs a Gaussian difference pyramid, filtering the feature image with Gaussian kernels of different scales and then extracting edges of different sizes through difference operations. This allows for the simultaneous capture of edge features from both fine and wide scratches. Linear defect regions refer to gray-level anomalies in the feature image with a length-to-width ratio ≥ 5 and a continuous linear distribution, distinguishing them from non-scratch defects such as point impurities and surface stains. Preset scratch morphology conditions include: length ≥ 0.5 mm, width ≤ 0.1 mm, and continuity ≥ 80%, used to filter out true scratches from linear defects. The minimum bounding rectangle refers to the rectangle with the smallest area that can completely enclose the candidate scratch region, with its major axis aligned with the scratch extension direction, serving as the core criterion for determining the scratch direction. Scratch classification criteria are: the principal direction angle for vertical scratches is 40° to 140°; the principal direction angle for horizontal scratches is 140° to 180° and 0° to 30°. Edge contour extraction employs the Canny operator combined with morphological closing operations. First, image edges are extracted, then minute gaps are filled and contour burrs are smoothed to obtain a continuous and complete outer contour of the flat pad. The outer contour curvature characterizes the degree of bending of the contour curve. The curvature in the gap region increases significantly due to abrupt contour changes, making it a core feature for gap identification. The pre-set curvature threshold is calibrated experimentally, set at 1.5 times the average curvature of the outer contour of a qualified flat pad, used to distinguish between normal contour fluctuations and abnormal bending caused by gaps. Polygon approximation uses the Douglas-Peucker algorithm, approximating the irregular gap contour with a polyline, reducing the amount of contour data while preserving key shape features, facilitating the calculation of geometric parameters.
[0047] Specifically, when performing defect recognition on front or back feature images, the process begins with scratch detection: after noise reduction preprocessing of the feature image, Gaussian difference pyramid is used to achieve multi-scale edge detection, accurately capturing linear defect regions of different sizes. Then, based on preset shape conditions of "length ≥ 0.5mm, width ≤ 0.1mm, continuity ≥ 80%, aspect ratio ≥ 5", real scratch candidate regions are selected from the linear defects. Subsequently, the complete contour of each candidate region is extracted, and the smallest bounding rectangle that can completely enclose the region is fitted through coordinate operations. The angle between its major axis and the positive x-axis of the image is calculated to determine the principal direction angle. Finally, the scratch is determined to be a horizontal scratch according to the scratch classification criteria. Simultaneously, gap detection is carried out: the Canny operator combined with morphological closing operation is used to extract image edges, fill in small gaps and smooth burrs to obtain the complete outer contour of the flat pad; the curvature value of each point on the outer contour is calculated according to the discrete point curvature formula, and points that exceed 1.5 times the average curvature of qualified flat pads are marked as abnormal curvature points, and continuous abnormal curvature contour segments are selected as potential gap areas; the potential gap areas are approximated by polygons using the Douglas-Peucker algorithm, retaining key shape features, and calculating geometric parameters such as the gap opening width, and finally completing the scratch direction classification and gap geometric parameter localization.
[0048] The defect identification algorithm provided by the preferred embodiment of the present invention can effectively screen out interfering defects such as point impurities and surface stains, accurately distinguish between horizontal and vertical scratches according to a clear angle standard, and completely extract the notch contour and accurately calculate its geometric parameters, which significantly improves the accuracy of scratch direction determination and the precision of notch detection.
[0049] Preferably, the image recognition algorithm includes: preprocessing the reverse positioning image, extracting the outer circular contour features of the reverse side of the flat gasket, and calculating the reverse center reference based on the outer circular contour features; establishing the coordinate correspondence between the reverse center reference and the flat gasket center reference in the front feature image to form a unified reference coordinate system; determining the candidate regions corresponding to the reverse and front notches in the reference coordinate system based on the geometric parameters of the front notch; and extracting the contour features, size data, radial distance, and circumferential angle of the candidate regions relative to the reverse center reference to obtain the geometric parameters of the flat gasket reverse notch.
[0050] The preprocessing of the reverse side positioning image employs Gaussian filtering for noise reduction, followed by grayscale enhancement to improve the contrast between the flat pad and the background, thus eliminating noise interference for subsequent contour extraction. The outer circle contour feature extraction is based on the Hough circle detection algorithm. By identifying the set of pixels in the image that satisfy circular features, the outer circle contour of the reverse side of the flat pad is accurately extracted, with the core being the set of pixel coordinates of the contour. The reverse side center reference is obtained by least-squares fitting of the extracted outer circle contour coordinates, resulting in the coordinates of the outer circle's center. This center is the reverse side center reference, serving as the origin for locating the reverse side notch. A unified reference coordinate system is established, using the front center reference Opositive as the origin. The reverse side center reference Oreverse is then transformed to this coordinate system through coordinate translation, achieving coordinate unification between the front and reverse sides and eliminating reference offset caused by flipping. The reverse side notch candidate region is defined in the unified reference coordinate system with the coordinates of the front notch as the center, and a radius ±Δr is defined. 容 Angle ±Δθ 容 The circular search area accurately pinpoints the possible location of the gap on the opposite side, avoiding blind searching.
[0051] Specifically, the candidate region range under the unified reference coordinate system is as follows: Radial range: r 正 -Δr 容 ≤r 反候选 ≤r 正 +Δr 容 Circumferential range: θ 正 -Δθ 容 ≤θ 反候选 ≤θ 正 +Δθ 容 Among them, r 正 θ 正 The radial distance and circumferential angle of the front notch; Δr 容 , Δθ 容 To preset the fault tolerance range, calibration is performed based on the equipment's imaging accuracy; r 反候选 θ 反候选 The radial and circumferential boundaries of the candidate region for the reverse notch.
[0052] Specifically, the image of the reverse side of the flat pad is first preprocessed with Gaussian filtering for noise reduction and histogram equalization for grayscale enhancement. Then, the discrete point coordinates of the outer circle contour of the reverse side are extracted using the Hough circle detection algorithm, and these coordinates are fitted using the least squares method to obtain the center reference of the reverse side. Subsequently, a unified two-dimensional rectangular coordinate system with the center reference of the front side as the origin is established, and the center reference of the reverse side is incorporated into this coordinate system through coordinate translation to achieve the unification of the references of the front and back sides. Finally, the radial ±Δr is defined with the radial distance and circumferential angle of the front notch as the core. 容 Circumferential ±Δθ 容The fault-tolerant search region is used as the candidate region for the reverse notch. The contour features and size data of this region are extracted, and finally the radial distance, circumferential angle and other geometric parameters of the reverse notch are determined.
[0053] In a preferred embodiment of the present invention, noise interference is eliminated through preprocessing, and the center reference of the reverse side is accurately fitted by combining Hough circle detection and least squares method. Then, a unified reference coordinate system is established to achieve alignment of the front and back coordinates. At the same time, the precise candidate area is delineated based on the front notch parameters. This effectively solves the problems of inconsistent front and back references after the flat gasket is flipped, blind search for the reverse notch, and large positioning deviation. It significantly improves the accuracy and efficiency of determining the geometric parameters of the reverse notch, and provides reliable basic data support for subsequent notch position offset calculation and dynamic adjustment of the light source.
[0054] Preferably, the notch position offset includes a circumferential angle offset and a radial distance offset. The calculation process of the notch position offset includes: in the reference coordinate system, comparing the radial distance and circumferential angle of the notch on the reverse side with the corresponding geometric parameters of the notch on the front side one by one, and calculating the circumferential angle deviation value and the radial distance deviation value.
[0055] Among them, the circumferential angle offset refers to the absolute deviation between the circumferential angle of the notch on the reverse side of the flat gasket and the corresponding circumferential angle of the notch on the front side in a unified reference coordinate system. It reflects the degree of positional offset of the notch in the circumferential direction and is the core basis for subsequent adjustment of the light source illumination angle. The radial distance offset refers to the absolute deviation between the radial distance of the notch on the reverse side of the flat gasket and the corresponding radial distance of the notch on the front side in a unified reference coordinate system. It characterizes the positional offset of the notch in the radial direction and directly affects the adjustment range of the light source illumination intensity. By comparing the notches identified on the front and back sides of the flat gasket one by one, a one-to-one correspondence is established according to the principle of "close position and matching size". Then, the deviation of the radial distance and circumferential angle of each set of corresponding notches is calculated separately to ensure the pertinence of the offset calculation.
[0056] The technical solution provided by the preferred embodiment of the present invention effectively solves the problems of confusion in correspondence and large deviation in offset calculation in multi-notch scenarios. It accurately quantifies the positional offset of the notch after the flat pad is flipped, providing direct and reliable core data for the accurate calculation of subsequent light source adjustment parameters. This ensures the targeting and effectiveness of enhanced illumination in the notch area on the reverse side, and indirectly improves the accuracy of the overall detection process.
[0057] like Figure 4As shown, preferably, the calculation of the adjustment parameters includes: calculating the incident angle compensation amount of the light source based on the circumferential angle offset in the notch position offset; determining the compensation coefficient of the light source illumination intensity based on the radial distance offset in the notch position offset and in combination with the notch depth and width dimensions in the front feature image; and inputting the incident angle compensation amount of the light source and the illumination intensity compensation coefficient into a preset light source parameter mapping model to obtain the adjustment parameters.
[0058] The light source incident angle compensation amount refers to the light source direction correction value calculated based on the circumferential angle offset, used to offset the circumferential position offset of the reverse notch and ensure that the light source incident direction is accurately aligned with the reverse notch area. The light source parameter mapping model is a preset standardized mapping model. Its core function is to convert the "light source incident angle compensation amount + illumination intensity compensation coefficient" into executable operating parameters for the light source, without requiring additional reference parameters, and directly outputting the adjustment results.
[0059] The specific formula for calculating the compensation amount of the incident angle of the light source is as follows:
[0060]
[0061] in, This is the compensation amount for the incident angle of the light source; The circumferential angle compensation coefficient has a value of 0.9 to 1.1. It is calibrated according to the light source angle adjustment accuracy to ensure that the compensation amount matches the offset amount. This represents the circumferential angular offset. The formula for calculating the lighting intensity compensation coefficient is:
[0062]
[0063] in, This is the illumination intensity compensation factor, with a minimum value of 1.0 and a maximum value of ≤3.0, to avoid overexposure; This is the radial offset weighting coefficient, with a value ranging from 0.3 to 0.5, calibrated according to the imaging distance; This is the radial distance offset; The notch depth weighting coefficient ranges from 0.2 to 0.4 and is calibrated based on the impact of notch depth on imaging. The depth of the front notch; This is the notch width weighting coefficient, with a value ranging from 0.1 to 0.2, calibrated based on the influence of the notch width on light reflection; This refers to the width of the notch on the front.
[0064] Specifically, the modeling of the light source parameter mapping model is based on the hardware parameters of the detection system: the light source angle adjustment range / accuracy, intensity adjustment interval, camera imaging parameters, and the material / specification characteristics of the flat pad. The inputs are the light source incident angle compensation amount and the illumination intensity compensation coefficient, and the outputs are the actual illumination angle and actual illumination intensity of the light source. A basic framework in the form of polynomial fitting or lookup table is built. During the training process, flat pad samples covering different circumferential angle offsets of 0°~10°, radial distance offsets of 0~2mm, and different notch depths of 0.1~1mm and widths of 0.1~0.5mm are prepared. Under a standard detection environment, the optimal operating parameters of the light source that make the image of the notch area on the reverse side clearest are tested one by one and the optimal operating parameters of the light source are recorded. Multiple sets of "input parameter - optimal output parameter" data are used as training sets. The model parameters are optimized by least squares method or machine learning algorithm and then solidified into the detection system. During operation, the real-time calculated light source incident angle compensation amount and illumination intensity compensation coefficient are input into the model. The model quickly matches and outputs the corresponding actual illumination angle and actual illumination intensity of the light source through a preset mapping relationship, providing a direct basis for the dynamic adjustment of the light source.
[0065] The preferred embodiment of this invention provides a method for calculating adjustment parameters. This method utilizes a light source parameter mapping model built upon system hardware characteristics and flat gasket material specifications, trained and optimized with sample data of varying offsets and notch sizes. This model rapidly converts the incident angle compensation based on circumferential angle offset, and the illumination intensity compensation coefficient determined by combining radial distance offset and front notch depth / width, into precise light source operating parameters. This effectively solves the problems of notch position shift after flat gasket flipping, light source illumination deviation due to size differences, and poor brightness adaptability. It achieves directional and precise enhanced illumination of the notch area on the reverse side, ensuring clear notch feature imaging and optimal contrast during multi-angle image acquisition on the reverse side. This provides a high-quality image foundation for subsequent reverse feature image fusion and defect identification, significantly improving the accuracy and stability of reverse defect detection and ensuring the high efficiency and reliability of the overall appearance inspection process.
[0066] Preferably, the process of generating the appearance inspection results includes: integrating the front defect inspection results and the back defect inspection results to establish a comprehensive dataset of front and back defects of the flat gasket; comparing each defect parameter in the comprehensive dataset one by one based on the preset appearance qualification threshold of the flat gasket, and filtering out defects that exceed the standard; and counting the types, quantities and locations of all defects that exceed the standard as the appearance inspection results.
[0067] Specifically, the comprehensive dataset for front and back defects refers to a standardized dataset formed by integrating the detection results of defects on the front and back sides. It includes a unique identifier for each defect, the side it belongs to, the defect type, and key parameters to ensure data integrity and traceability. Key parameters include scratch length / width / direction and notch depth / width / location coordinates. The appearance acceptance threshold for flat gaskets is a pre-set judgment benchmark based on industry standards for automotive oil pump flat gaskets, sealing requirements of usage scenarios, and customer quality specifications. It is set according to defect type, including thresholds for scratches (e.g., length ≤ 1mm, width ≤ 0.1mm) and thresholds for notches (e.g., depth ≤ 0.2mm, opening width ≤ 0.3mm). Defects exceeding the standard refer to defects in the comprehensive dataset whose core parameters exceed the corresponding appearance acceptance threshold. Duplicate counts at the same location on both sides must be excluded. Defects are judged by comparing location coordinates; if the projection deviation of the same defect on both sides is ≤ 0.3mm, it is considered the same defect and counted as a single defect exceeding the standard, avoiding duplicate judgments. Appearance inspection results: The final judgment results are presented in the form of a standardized report. The core contents include the conclusion of pass / fail, details of defects exceeding the standard (type, quantity, surface to which they belong, specific parameters, and location coordinates), and image annotations of key defects to facilitate quality traceability and subsequent process optimization.
[0068] For example, after testing a sample of a car oil pump gasket, the integrated dataset of defects on both sides showed: one transverse scratch (length 1.3mm, width 0.08mm, principal direction angle 25°) and one notch (depth 0.25mm, opening width 0.2mm, radial distance 8mm) on the front side; and one vertical scratch (length 0.8mm, width 0.12mm, principal direction angle 85°) on the back side. The projection deviation of the defect positions on both sides was greater than 0.3mm, and there were no duplicate defects. Based on the preset... The acceptable appearance thresholds are: scratch length ≤1mm, width ≤0.1mm, notch depth ≤0.2mm, and opening width ≤0.3mm. After comparison, the front scratch length of 1.3mm and notch depth of 0.25mm exceeded the threshold, and the back scratch width of 0.12mm exceeded the threshold. Finally, three defects exceeding the standard were found. The detection system determined that the sample was unqualified and generated a standardized inspection report containing "unqualified conclusion, type / parameter / location coordinates of the three defects exceeding the standard, and image annotation of the defect area".
[0069] The preferred embodiment of the present invention integrates defect data from both sides, eliminates duplicate judgments, accurately screens out defects exceeding the standard according to the qualified threshold and compiles detailed statistics, effectively avoiding missed judgments and misjudgments, and improving the accuracy and traceability of the test results.
[0070] like Figure 5As shown, this embodiment of the invention also provides an automotive oil pump flat gasket appearance inspection system, comprising: a flipping and conveying assembly, including upper and lower conveyor belts, for conveying the flat gasket to the imaging area and flipping it; an end-face appearance station optical assembly, including two cameras arranged above the flipping and conveying assembly and multiple light sources arranged beside the imaging area, for illuminating the flat gasket from different directions to acquire multi-angle images; an image processing and control unit, for generating feature images based on the acquired multi-angle images; further for processing the feature images to identify scratches and notches and determine the direction of the scratches and the geometric parameters of the notches, generating front and back defect detection results for the flat gasket; and further for calculating the adjustment parameters of the light sources based on the geometric parameters of the front notches after the flat gasket is flipped.
[0071] The image processing and control unit further includes a light control subunit and a result integration subunit; the light control subunit is used to adjust the operating parameters of the light source to adjust the illumination intensity and illumination angle of the light source; the result integration subunit is used to integrate the front and back defect detection results and verify the authenticity of the defects to generate appearance inspection results.
[0072] Specifically, the material handling and conveying assembly consists of two synchronously operating conveyor belts. The upper conveyor belt transports the flat pads to the front imaging area. After falling from the upper conveyor belt to the lower conveyor belt, the flat pads flip over. The lower conveyor belt receives the flipped flat pads and transports them to the reverse imaging area, ensuring the stability and accuracy of the conveying and flipping process. The camera uses an industrial CCD camera, positioned directly above the imaging area, with an angle coverage of 0° to 45°, adapting to multi-angle image acquisition needs. The light source includes multiple 2.5D multi-angle light sources, allowing adjustment of illumination intensity and angle. Front inspection phase: The image processing and control unit sends a command to activate the basic illumination of the light source. The camera simultaneously acquires multi-angle images of the front to generate the first image sequence. The image data is transmitted to the image processing and control unit in real time for fusion and defect detection. Back inspection phase: The light control subunit of the image processing and control unit calculates and adjusts the parameters based on the notch position offset, driving the light source to dynamically adjust the illumination angle and intensity. After completing the enhanced illumination of the back notch area, the camera acquires multi-angle images of the back to generate the second image sequence. The data is transmitted to the image processing and control unit for processing again. The image processing and control unit processes the data based on the offset and adjustment parameter logic and outputs the light source control signal. The result integration subunit receives the front and back defect data processed by the control unit, integrates the dataset according to the standard, compares it with the qualified threshold, counts the defects that exceed the standard, and finally generates a standardized inspection report.
[0073] This invention provides a method and system for inspecting the appearance of automotive oil pump gaskets. Through automated conveying and flipping, multi-angle image fusion from both sides highlights defect features. A precise defect identification algorithm distinguishes between scratches and notches and locates core parameters. After flipping, a unified benchmark is established to calculate the notch offset, dynamically adjusting the light source to enhance illumination on the reverse side. Finally, the inspection results are integrated to screen for defects exceeding standards. This effectively solves the problems of inconsistent inspection benchmarks, ambiguous defect features, and numerous missed and misjudged cases in traditional methods, significantly improving inspection accuracy and automation efficiency. It is suitable for mass production scenarios and ensures traceability of inspection results.
[0074] The above description is merely a preferred embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for visually inspecting the flat gasket of an automotive oil pump, characterized in that, Includes the following steps: Step S1: Illuminate the flat gasket with a light source and acquire multi-angle images of the front of the flat gasket to generate a first image sequence; perform fusion processing on the first image sequence to generate a front feature image to highlight the defect features; Based on the front feature image, the flat gasket is subjected to front defect detection by a preset defect recognition algorithm to identify scratches and gaps on the front and determine the direction of the scratches and the geometric parameters of the gaps. Step S2: Flip the flat gasket and obtain the reverse positioning image of the flat gasket; based on the reverse positioning image, determine the geometric parameters of the notch on the reverse side of the flat gasket through an image recognition algorithm, and compare it with the geometric parameters of the notch on the front side to calculate the notch position offset; the notch position offset includes circumferential angle offset and radial distance offset, and the calculation process of the notch position offset includes: in the reference coordinate system, comparing the radial distance and circumferential angle of the reverse notch with the corresponding geometric parameters of the front notch one by one to calculate the circumferential angle deviation value and the radial distance deviation value; Step S3: Calculate the adjustment parameters of the light source based on the notch position offset; dynamically adjust the operating parameters of the light source according to the adjustment parameters to enhance the illumination of the notch area on the reverse side of the flat pad; the calculation of the adjustment parameters includes: calculating the incident angle compensation amount of the light source based on the circumferential angle offset in the notch position offset; determining the compensation coefficient of the light source illumination intensity based on the radial distance offset in the notch position offset and in combination with the notch depth and width dimensions in the front feature image; inputting the incident angle compensation amount and the illumination intensity compensation coefficient of the light source into a preset light source parameter mapping model to obtain the adjustment parameters; Step S4: Obtain multi-angle images of the reverse side of the flat gasket to generate a second image sequence; perform fusion processing on the second image sequence to generate a reverse side feature image and perform reverse side defect detection on the flat gasket using the defect recognition algorithm; Step S5: Combine the results of the front defect detection and the back defect detection to generate the appearance inspection result of the flat gasket.
2. The method for visual inspection of automotive oil pump gaskets according to claim 1, characterized in that, The process of fusing a first image sequence or a second image sequence to generate a frontal or back feature image includes: The images in the image sequence are registered to eliminate pixel position deviations caused by different shooting angles; Calculate the grayscale gradient of each pixel in the registered image at the corresponding position in the multi-angle image sequence; Based on the grayscale gradient, a fusion weight is dynamically assigned to each pixel in different images of the sequence; Based on the assigned fusion weights, the image sequence is fused at the pixel level to generate a feature image.
3. The method for visual inspection of automotive oil pump gaskets according to claim 1, characterized in that, The defect identification algorithm includes a scratch identification sub-algorithm and a notch identification sub-algorithm; the scratch identification sub-algorithm includes: Preprocess the front or back feature images and identify linear defect regions in the feature images through multi-scale edge detection; From the linear defect region, regions that meet the preset scratch morphology conditions are selected as scratch candidate regions based on their geometric features; For each candidate scratch region, its contour is extracted and its minimum bounding rectangle is calculated. The major axis direction of the minimum bounding rectangle is used as the main direction line of the scratch. Calculate the angle between the main direction line and the radial direction of the flat pad, and classify the scratches into horizontal scratches or vertical scratches according to the preset scratch classification standard.
4. The method for visual inspection of automotive oil pump gaskets according to claim 3, characterized in that, The notch identification sub-algorithm includes: Edge contours are extracted from the front or back feature images to obtain the complete outer contour of the flat pad. The curvature of the outer contour is calculated, and contour points with curvature values exceeding a preset threshold are located. Continuous contour segments with abnormal curvature are identified as potential gap regions. The potential gap region is approximated by a polygon, and its geometric parameters are calculated.
5. The method for visual inspection of automotive oil pump gaskets according to claim 1, characterized in that, The image recognition algorithm includes: The reverse positioning image is preprocessed to extract the outer circle contour features of the reverse side of the flat pad, and the center reference of the reverse side is calculated based on the outer circle contour features. Establish the coordinate correspondence between the center reference of the reverse side and the center reference of the flat pad in the feature image of the front side, and form a unified reference coordinate system; Based on the geometric parameters of the front notch, candidate regions corresponding to the front and back notches are determined in the reference coordinate system. Extract the contour features, size data, radial distance and circumferential angle of the candidate region relative to the center reference of the reverse side to obtain the geometric parameters of the notch on the reverse side of the flat gasket.
6. The method for visual inspection of automotive oil pump gaskets according to claim 1, characterized in that, The process of generating the appearance inspection results includes: By combining the front and back defect detection results, a comprehensive dataset of front and back defects for flat gaskets is established. Based on the preset acceptable threshold for flat gasket appearance, each defect parameter in the comprehensive dataset is compared one by one to filter out defects that exceed the standard. The types, quantities, and locations of all defects exceeding the standards are statistically analyzed and used as the results of the appearance inspection.
7. A system for inspecting the appearance of a flat gasket for an automotive oil pump, employing the method for inspecting the appearance of a flat gasket for an automotive oil pump as described in any one of claims 1-6, characterized in that, include: The flipping and conveying assembly includes upper and lower conveyor belts for conveying flat pads to the imaging area and flipping them. The end-face appearance station optical components include two cameras arranged above the material handling and conveying components and multiple light sources arranged beside the imaging area, which are used to illuminate the flat pad from different directions to acquire multi-angle images. The image processing and control unit is used to generate feature images based on the acquired multi-angle images; it is also used to process the feature images to identify scratches and notches and determine the direction of the scratches and the geometric parameters of the notches, and generate defect detection results for the front and back sides of the flat gasket; it is also used to calculate the adjustment parameters of the light source based on the geometric parameters of the notches on the front side after the flat gasket is flipped.
8. The automotive oil pump flat gasket appearance inspection system according to claim 7, characterized in that, The image processing and control unit further includes a light control subunit and a result integration subunit; the light control subunit is used to adjust the operating parameters of the light source to adjust the illumination intensity and illumination angle of the light source; the result integration subunit is used to integrate the front and back defect detection results and verify the authenticity of the defects to generate appearance inspection results.
Citation Information
Patent Citations
Raw material silicon wafer surface scratch detection method based on machine vision
CN105388162A
Photovoltaic aluminum frame surface defect detection system
CN119125167A
Automatic optical detection method and system based on gasket surface defects
CN119643448A