A method and system for online inspection of the appearance of the upper flange of an automotive oil pump

By using a multi-mode controllable lighting system and intelligent detection strategies, the problem of detecting minute defects on the flange surface under single illumination has been solved, achieving efficient and accurate flange appearance inspection and improving inspection accuracy and efficiency.

CN120807520BActive Publication Date: 2025-12-02杭州映图智能科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511307701.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-12-02
Estimated Expiration
2045-09-15

AI Technical Summary

Technical Problem

In existing technologies, the use of a single, fixed lighting condition makes it difficult to comprehensively and accurately detect various complex and minute defects on the flange surface, and the randomness in the selection of the detection object leads to a bottleneck in online detection efficiency.

Method used

By employing a multi-mode controllable lighting system, combined with full-scale flange target pre-identification and multi-source image batch acquisition, and through intelligent inspection object selection strategies and dynamic decision models, efficient, accurate, and comprehensive online appearance inspection of the upper flat flange of automotive oil pumps can be achieved.

Benefits of technology

It effectively solves the problem of defects being hidden due to insufficient contrast, shadows, or glare under single illumination, significantly improves the identification accuracy and detection efficiency of minute defects, and ensures full coverage of flanges and optimized resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807520B_ABST
    Figure CN120807520B_ABST
Patent Text Reader

Abstract

This invention discloses an online appearance inspection method and system for the upper flat flange of an automotive oil pump. The method involves clustering to determine the preferred flange type, selecting the flange closest to a reference point as the first inspection target. Then, it collects image datasets of multiple sets of controllable independent light sources activated sequentially. Through reflectivity calculation and multi-light source cross-validation, it identifies the actual defect points and locates the defect-sensitive light source set. Subsequent inspections prioritize flanges with the smallest Euclidean distance to the current object. When the distances are close, a dual-branch dynamic decision model is triggered for selection. After the preferred type is inspected, the last inspected object is used as the new reference for non-preferred types. Finally, the defects are summarized to generate a visual report. The advantages of this invention are that through a multi-mode controllable lighting system, full flange target pre-identification, and batch acquisition of multi-light source images, combined with an intelligent inspection object selection strategy and dynamic decision model, it achieves efficient, accurate, and comprehensive online appearance inspection of the upper flat flange of an automotive oil pump.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flange surface defect detection technology, and more specifically to an online inspection method and system for the appearance of the upper flat flange of an automotive oil pump. Background Technology

[0002] In modern automotive manufacturing, stringent quality requirements permeate every stage of component production. As a core component of the automotive fuel supply system, the performance of the fuel pump directly affects the vehicle's fuel economy, emission standards, and even operational safety. Among these components, the upper flange of the fuel pump, as a critical installation and sealing interface, is particularly important for the integrity and defect-free appearance of its surface. Any minor scratches, dents, stains, or foreign objects can lead to poor assembly, sealing failure, and consequently, serious consequences such as fuel leakage and system malfunctions. Therefore, efficient and accurate visual inspection of the upper flange has become an indispensable quality control checkpoint in the fuel pump flange manufacturing process, and its importance continues to grow with the increasing automation of the automotive industry and the increasingly stringent requirements for product reliability.

[0003] Currently, existing systems typically incorporate fixed-position industrial cameras, simple light sources, and basic image processing algorithms to assist manual labor in performing some repetitive or high-precision identification tasks. For example, by placing a camera at a fixed station and using background or ring light sources, they can roughly identify the flange contour or perform preliminary screening for some obvious large-area defects. These systems improve the objectivity and efficiency of inspection to a certain extent, especially in replacing some repetitive labor. By defining the inspection area and acquiring images under specific lighting conditions, they attempt to make preliminary quality judgments on the flange surface, thus compensating for the shortcomings of purely manual visual inspection and meeting the basic requirements for product quality control during a specific historical period.

[0004] However, under fixed and unidirectional or uniform intensity lighting conditions, the above detection methods can only optimally highlight one type of defect or fail to highlight any defect at all. This may be due to insufficient contrast, shadow occlusion, or excessive reflection (glare), making the defect difficult to identify or even completely hidden. In addition, when there are multiple objects to be inspected, the random selection method will prevent the camera resources or the computing resources of the image processing module from being optimally configured, making it impossible to achieve parallel processing or sequence optimization, thus significantly reducing the overall detection efficiency. Summary of the Invention

[0005] In view of the shortcomings of the existing technology, the purpose of this invention is to overcome the inherent limitations of the existing technology, which makes it difficult to comprehensively and accurately detect various complex and small defects on the flange surface due to a single fixed illumination condition, as well as the bottleneck problem of online detection efficiency caused by the large randomness of the selection of detection objects.

[0006] Therefore, this invention provides an online inspection method and system for the appearance of the upper flange of an automotive oil pump. By using a multi-mode controllable lighting system, full flange target pre-identification and multi-source image batch acquisition, combined with an intelligent inspection object selection strategy and dynamic decision model, it achieves efficient, accurate and comprehensive online appearance inspection of the upper flange of an automotive oil pump.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] A method for online inspection of the appearance of the upper flange of an automotive oil pump includes the following steps:

[0009] The clustering and screening step involves obtaining an initial panoramic image of the area covered by the camera under ambient light, identifying the coordinate position and orientation information of each flange through target detection based on the initial panoramic image, and then clustering the flanges based on the orientation information of each flange, with the cluster with the most members being the preferred cluster.

[0010] The first inspection object positioning step involves selecting the flange with the smallest distance from the preset reference point from the preferred category as the first inspection object.

[0011] The detection image acquisition step involves obtaining images captured by the camera when several groups of controllable independent light sources above the detection area are activated sequentially, which are then used as an image dataset.

[0012] The first inspection image analysis step involves extracting the first inspection object from the image dataset, calculating the reflectivity to determine the real defect points, and locating the defect-sensitive light source set based on the real defect points.

[0013] In the subsequent inspection object selection step, the flange with the smallest Euclidean distance from the center point of the first inspection object in the preferred category is selected as the candidate inspection object. When there are at least two candidate inspection objects with the same or similar Euclidean distance, the preset dual-branch dynamic decision model is triggered to screen and determine the next inspection object. Defect analysis is performed on the determined next inspection object until all flanges in the preferred category have been fully inspected. Then, the flanges in the non-preferred category are clustered again according to the orientation information. The last flange inspected in the preferred category is used as the new benchmark, and the cluster with the most members is selected for inspection until all flanges in the inspection area have been fully inspected.

[0014] The test results summary step generates a visual report of the defects found in the inspected flanges.

[0015] Furthermore, the initial image analysis step includes a defect identification strategy, which includes:

[0016] The reflectance calculation sub-step extracts pixel-level gray values ​​of the first-inspection object from each image acquired under different independent light sources and calculates its average gray value. It also calculates the normalized reflectance of the first-inspection object under each independent light source based on the intensity of the independent light source.

[0017] The defect localization sub-step uses the normalized reflectance to identify the location of candidate defects in the first inspection object using the reflectance threshold method.

[0018] The multi-light source cross-validation sub-step marks the same pixel location as a candidate defect in images under different independent light sources a certain number of times. If the number of times is greater than or equal to a preset judgment threshold, the location is judged as a real defect point.

[0019] Furthermore, the initial inspection image analysis step also includes a positioning strategy for the defect-sensitive light source set. The positioning strategy includes calculating the gray-level gradient value of the real defect point in each image under different independent light sources, sorting the images according to the gray-level gradient amplitude, and selecting the light sources with the highest gray-level gradient amplitude to form the defect-sensitive light source set.

[0020] Furthermore, the dual-branch dynamic model includes a defect scenario sub-model and a defect-free scenario sub-model. When the first inspection object has a defect, the defect scenario sub-model is triggered to calculate the comprehensive fit score between each candidate object and the first inspection object, and the next inspection object is selected based on the comprehensive fit score. When the first inspection object does not have a defect, the defect-free scenario sub-model is triggered to calculate the comprehensive stability score of each candidate object, and the next inspection object is selected based on the comprehensive stability score.

[0021] Furthermore, the defect scene sub-model performs light source sensitivity weight calculation, reflectivity similarity calculation, and comprehensive fit score calculation. The light source sensitivity weight calculation includes calculating the weight based on the corresponding grayscale gradient values ​​under each independent light source in the defect sensitive light source set. The reflectivity similarity calculation includes calculating the reflectivity of the candidate object under each independent light source, calculating the reflectivity deviation rate between the candidate object and the first object under the same light source at corresponding positions, and calculating the similarity based on the reflectivity deviation rate. The comprehensive fit score calculation includes calculating the comprehensive fit score based on the light source sensitivity weight and reflectivity similarity.

[0022] Furthermore, the defect-free scene sub-model performs coverage balance index calculation, reference light source adaptation calculation, and comprehensive stability score calculation. The coverage balance index calculation includes calculating the average reflectance of the candidate object under each independent light source, calculating the standard deviation of reflectance based on the average reflectance, and then calculating the balance score based on the standard deviation of reflectance. The reference light source adaptation calculation includes determining a set of three reference light sources with the smallest coefficient of variation of reflectance to form a reference light source set, calculating the average difference between the reflectance of the candidate object under each independent light source in the reference light source set and the reflectance of the first-inspection object under the same light source, and calculating the reference adaptation score based on the average difference. The comprehensive stability score calculation includes calculating the comprehensive stability score based on the balance score and the reference adaptation score.

[0023] Furthermore, it also includes a light source consistency verification step. When there is no light source in the detection area, the background image of the detection area captured by the camera under the sequential activation of each independent light source is acquired. The gray value analysis of the background image is performed to calculate the average gray value of the background. It is determined whether the maximum deviation rate between the average gray values ​​of the background generated by each independent light source in the detection area is less than a preset threshold. If not, each independent light source is adjusted so that the maximum deviation rate is less than the preset threshold.

[0024] Furthermore, it also includes a reflectivity reference calibration step, in which a standard defect-free flange is placed in the detection area, flange images are captured by cameras activated sequentially by independent light sources, and the average pixel gray value of the flange images is calculated. Based on the average pixel gray value, the known reflectivity parameters of the flange, and the intensity of the independent light sources, an initial reflectivity reference matrix of reflectivity calibration coefficients is established.

[0025] Furthermore, in the clustering screening step, if multiple clusters have the same maximum number of flanges, the average orientation angle of the clusters with the same number of flanges is compared with the angle between the camera optical axis, and the cluster with the smallest angle is selected as the preferred cluster.

[0026] An online inspection system for the appearance of the upper flange of an automotive oil pump includes:

[0027] The clustering and filtering module acquires an initial panoramic image of the area covered by the camera under ambient light. Based on the initial panoramic image, it identifies the coordinate position and orientation information of each flange through target detection. Then, it clusters the flanges based on the orientation information of each flange and selects the cluster with the most members as the preferred cluster.

[0028] The first inspection object positioning module selects the flange with the smallest distance from the preset reference point from the preferred category as the first inspection object.

[0029] The detection image acquisition module acquires images captured by the camera when several sets of controllable independent light sources above the detection area are activated sequentially, as an image dataset.

[0030] The first inspection image analysis module extracts the first inspection object from the image dataset, calculates the reflectivity to determine the real defect points, and locates the defect-sensitive light source set based on the real defect points.

[0031] The subsequent inspection object selection module selects the flange with the smallest Euclidean distance from the center point of the first inspection object in the preferred category as the candidate inspection object. When there are at least two candidate inspection objects with the same or similar Euclidean distance, the preset dual-branch dynamic decision model is triggered to screen and determine the next inspection object. Defect analysis is performed on the determined next inspection object until all flanges in the preferred category have been fully inspected. Then, the flanges in the non-preferred category are clustered again according to the orientation information. The last flange inspected in the preferred category is used as the new benchmark, and the cluster with the most members is selected for inspection until all flanges in the inspection area have been fully inspected.

[0032] The inspection results summary module generates a visual report of the defects found in the inspected flanges.

[0033] The beneficial effects of this invention are as follows: 1. By sequentially activating the acquired images through multiple sets of controllable independent light sources, and combining strategies such as reflectivity calculation and multi-light source cross-validation, the problem of defects being hidden due to insufficient contrast, shadows, or glare under single fixed illumination is effectively solved. The real defect points need to be cross-validated by multiple light sources, which greatly reduces the false judgment rate. At the same time, by locating the defect-sensitive light source set, the light source conditions that highlight defects are targeted, further improving the identification accuracy of small defects. In addition, through the clustering and screening strategy, the orientation cluster with the largest number of objects is prioritized for detection, reducing invalid detection paths. The first inspection object is selected as the flange closest to the reference point, and subsequent objects are selected based on the principle of minimum Euclidean distance. When the distances are close, a dual-branch dynamic decision model is triggered to realize intelligent sorting of inspection objects, avoiding resource waste caused by random selection and significantly improving the efficiency of online inspection cycle.

[0034] 2. Ensure the uniformity of illumination of each independent light source through light source consistency verification, and establish a standard mapping relationship through reflectivity benchmark calibration to provide a reliable benchmark for reflectivity calculation under different environments. For non-preferred flanges, cluster the last inspected object as the new benchmark for re-inspection to achieve full coverage of flanges without dead angles and adapt to complex inspection scenarios with multiple orientations and multiple numbers of flanges. Attached Figure Description

[0035] Figure 1 This is the overall flowchart of the present invention;

[0036] Figure 2 This is a sub-flowchart of the initial image analysis steps in this invention;

[0037] Figure 3 This is a flowchart of the subsequent detection object selection step in this invention. Detailed Implementation

[0038] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Identical components are denoted by the same reference numerals. It should be noted that the terms "front," "rear," "left," "right," "upper," and "lower" used in the following description refer to directions in the accompanying drawings, and the terms "bottom surface," "top surface," "inner," and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.

[0039] Because detection methods operate under fixed, unidirectional, or uniform intensity lighting conditions, they can only optimally highlight one type of defect or fail to highlight any defect at all. This may be due to insufficient contrast, shadow occlusion, or excessive reflection, making the defect difficult to identify or even completely hidden. Furthermore, when multiple objects are to be inspected, random selection can lead to suboptimal allocation of camera resources or image processing module computing resources, preventing parallel processing or sequence optimization and significantly reducing overall detection efficiency. Therefore, this invention designs an online inspection method for the appearance of the upper flat flange of an automotive oil pump. In terms of equipment layout, a detection area is configured, with a camera fixedly positioned directly above it. The cameras can be rationally distributed according to the area of ​​the detection area. This invention uses a single camera as an example. In addition, several sets of independent and controllable light sources are also set above the detection area. This invention uses eight sets of independent light sources as an example. These eight sets of independent light sources are coaxially arranged and distributed around the detection area, forming eight directional beams at fixed angles to each other for subsequent image acquisition and analysis.

[0040] Based on the above equipment layout, the testing method is as follows: Figure 1 As shown, it includes the following steps:

[0041] Step 1: Initialization and parameter calibration of the detection system. First, the position of the camera and independent light source is adjusted, calibrated and positioned so that the optical axis of the camera is perpendicular to the plane of the detection area. Each flange is manually checked to ensure that it does not overlap and that the plane of the flange is completely exposed.

[0042] Subsequently, a light source consistency check is performed. When there is no flange to be tested in the detection area, eight independent light sources are controlled to light up sequentially. When each independent light source lights up sequentially, the camera captures a background image of the corresponding detection area. Then, grayscale value analysis is performed on the background images collected under the illumination of each independent light source, and the average pixel grayscale value of each background image is calculated. When the maximum deviation rate between the average background grayscale values ​​of the eight independent light sources in the detection area is greater than a preset threshold, the current output of each independent light source is adjusted to ensure that the light intensity and uniformity of all independent light sources in the initial state are highly consistent.

[0043] Finally, reflectivity benchmark calibration is performed. A known, standard, and defect-free flange is placed at a preset calibration position within the inspection area. Eight independent light sources are activated sequentially and individually. For each independent light source activated, the camera acquires an image of the flange. The acquired image contains the background of the inspection area. At this point, an individual image containing the entire flange can be segmented based on existing target detection and contour analysis, and its average pixel grayscale value is extracted. Prior to this, the reflectivity parameters of the standard flange have been pre-measured. Therefore, based on the known reflectivity parameters of the standard flange and the calibration intensity parameters of the corresponding light sources, an initial reflectivity benchmark matrix containing the reflectivity calibration coefficients of the eight independent light sources is established. This matrix describes the mapping relationship between the actual reflectivity characteristics of the standard flange and the grayscale values ​​captured by the camera under different independent light source conditions, and serves as the calibration benchmark for the subsequent calculation of the reflectivity of the flange under test.

[0044] Step 2, Initial panoramic image acquisition. First, panoramic image acquisition is performed. With all independent light sources turned off and only one ambient light turned on, or any independent light source turned on randomly, an initial panoramic image covering the entire detection area is captured by the camera.

[0045] Next, image preprocessing is performed. The panoramic image is denoised using a Gaussian filtering algorithm to smooth the image and effectively suppress random noise. Then, a contrast-limited adaptive histogram equalization algorithm is applied to the denoised image to divide the image into multiple non-overlapping small regions and perform histogram equalization independently in each region. This processing significantly enhances the local grayscale difference between the flange target and the background, especially for areas where there may be uneven lighting or shadows, improving the clarity of the flange outline and facilitating subsequent accurate extraction.

[0046] Step 3: Full flange target identification. The pre-processed panoramic image is processed using an edge detection algorithm to extract flange edges. The extracted closed contours undergo geometric feature analysis and selection: First, the area and perimeter of each closed contour are calculated. Contours with similar areas are selected based on the preset actual flange dimensions. Second, the roundness of each selected contour is calculated, and contours with similar roundness are selected. Contours meeting both criteria are accurately identified as the flange target on the upper plane of the automotive oil pump. For each identified flange target, the precise center point coordinates of the flange's center hole are calculated using geometric moments. Subsequently, by applying the minimum bounding rectangle algorithm to the outer contour of the flange, the angle between the longer side of the rectangle and the horizontal axis is calculated. The included angle Defined as the current orientation parameter of the flange, the unique identifier, precise location coordinates and orientation information of all identified flanges are recorded and stored in memory, where the unique identifier reflects the flange's ID.

[0047] Step four, initial inspection object location and screening: First, based on their orientation characteristics, select the flanges with the largest number and similar orientations as the primary inspection objects. Then, based on the recorded orientation angles of all flanges... A density-based clustering algorithm is used in... At least includes within the degree range Only when the flanges form a cluster will they face an angle. Using features for clustering, the algorithm will automatically cluster orientation angles within a preset threshold. Flanges within the specified range are grouped into the same cluster. After clustering, the number of flanges in each cluster is counted, and the cluster with the most flanges is selected as the preferred cluster. If multiple clusters have the same maximum number of flanges, the average orientation angle of these clusters with the same number of flanges is compared with the angle between the average orientation angle and the camera optical axis. This angle is usually defined as perpendicular to the detection plane, corresponding to 0 degrees or 90 degrees in the image coordinate system. The cluster with the smallest angle is selected as the preferred cluster. The purpose is to prioritize flanges that are highly aligned with the camera optical axis and have relatively small image distortion and reflection interference, thereby providing a more stable image basis for subsequent defect detection.

[0048] Then, the first inspection target is determined in the preferred class. This is done by setting the point directly below the camera's viewpoint as a reference point, calculating the Euclidean straight-line distance from the center point of all flanges in the preferred class to this reference point, and selecting the flange with the smallest distance as the first inspection target, denoted as . .

[0049] Step 5: Image acquisition and determination of the first inspection target. Then, flange image acquisition is performed, and eight independently controllable light sources are activated sequentially in a loop. Whenever an independent light source is activated, the camera immediately captures a corresponding image containing all flanges at high resolution. This process is repeated eight times to obtain a dataset of eight images under different lighting conditions for all identified flanges within the detection area. These image datasets, after initial position calibration, are stored to ensure that the basic parameters of all candidate flanges can be used for the selection of the next inspection target during subsequent flange selection and refined inspection processes. This avoids the analysis overhead caused by random selection and significantly improves the overall cycle time efficiency of online inspection. The image acquisition in this inspection mainly targets the first inspection target. .

[0050] Step six, initial image analysis, such as... Figure 2 As shown, firstly, in the image dataset ( Each image Extracting the first inspection object In the initial inspection of the subject Reflectance calculation is performed, specifically by extracting pixel-level grayscale values ​​and calculating their average grayscale value. Light source intensity calibrated according to light source consistency Calculate the first inspection object Normalized reflectance under each independent light source , Normalization ensures that under different light source intensities, The reflectivity value can objectively reflect its surface characteristics and is not affected by the power fluctuation of the light source itself.

[0051] Secondly, the first inspection object Defect identification and cross-validation for each image ,according to The reflectance data is used to identify abnormal regions through the reflectance threshold method, which is a current technology. ,in, The average reflectivity of a standard defect-free flange. The standard deviation of the reflectivity of a standard flange, for any pixel. reflectivity If less than The lower limit, such as displaying low-reflection areas like dents or scratches, or greater than If the upper limit of the reflectivity is high, such as burrs or foreign objects, then the pixel is marked as a candidate defect location. To improve the robustness of defect identification, multi-light source cross-validation is used: the number of times the same pixel location or within a preset pixel neighborhood is marked as a candidate defect in eight images from different independent light sources is counted. If the count reaches or exceeds a preset judgment threshold, the location is judged as a real defect point, and its relative coordinates in the flange coordinate system are accurately recorded. This multi-source cross-validation effectively reduces false alarms that may be caused by shadows, glare, or local reflection characteristics under single illumination conditions.

[0052] Then, a defect-sensitive light source set is performed. For each identified real defect point, its grayscale gradient value under eight independent light source images is calculated. Specifically, a 3x3 Sobel operator is used to convolve the local image of the defect region, calculating its gradient components in the horizontal and vertical directions, and then synthesizing the gradient magnitude. The larger the gradient magnitude, the higher the contrast and the clearer the edge of the defect under that light source. Then, the defects are sorted according to the magnitude of their gradient magnitudes, and the top gradient values ​​are selected. Independent light sources, forming a defect-sensitive light source set This light source collection Precisely indicated for The information about which light sources provide the best contrast for the specific defect type detected will be used for subsequent flange inspections with similar defect characteristics.

[0053] Finally, for the first inspection object Image data labeling and logical elimination are achieved by setting a [missing information - likely a typo]. The binary mask corresponding to the contour region is used to update its state from "to be detected" to "detected." This means that when acquiring eight sets of images for the next detection object, the first object is automatically masked within the detection area captured by the camera, preventing it from being obscured in subsequent detection loops. Repeated processing and identification ensure that each flange is inspected only once.

[0054] Step 7, selection of subsequent detection targets, such as Figure 3 As shown, firstly, selection is made from the preferred class, and the center point of the remaining flanges is calculated relative to the first inspection object. The Euclidean distance between the center points is used to select the flange with the smallest Euclidean distance as the next candidate for detection. If multiple flanges have similar Euclidean distances, the bi-branch dynamic decision model will be automatically activated for further screening to make the optimal decision.

[0055] The dual-branch dynamic decision-making model includes a defect scenario sub-model and a defect-free scenario sub-model. Specifically, when the first inspected object has a defect, the defect scenario sub-model is triggered. A comprehensive fit score is then performed based on the defect scenario sub-model, starting with a weighting of light source sensitivity. Calculation based on the defect sensitivity light source set determined by the first inspection object. Extract the defect in Each independent light source The corresponding grayscale gradient value Calculate weights Among them, weight Accurately reflects each light source To assess the sensitivity to this specific defect, light sources with higher gradient values ​​are assigned greater weight, ensuring a bias towards high-contrast light sources in subsequent evaluations; secondly, reflectivity similarity is assessed. Calculations are performed for each candidate flange that is close in distance. Reflectance under eight independent light sources that have been collected Calculate the reflectance deviation rate between the original object and the corresponding position under the same light source. Then calculate the similarity. , The value range is [0,1], and the larger the value, the more likely it is to be a candidate flange. In the light source The more similar the flange is to the first inspection object in terms of reflectivity pattern, the better; finally, a comprehensive fit score and selection are performed, and the results for each candidate flange are calculated. Overall compatibility score The summation is performed on the set of defect-sensitive light sources. All light sources ,choose The highest-scoring candidate flange is selected as the next target for inspection. This score quantifies the similarity of the reflectance patterns between the candidate flange and the already inspected defective flange under key lighting conditions. If there is a similarity... For the same candidate flange, further comparison is made with the light source that has the highest weight in the defect-sensitive light source set. Below, each candidate flange Value, select The largest flange is selected as the next target for inspection. The aim is to accurately select flanges that are most likely to share similar defects, thereby improving the efficiency and accuracy of the inspection.

[0056] When the initial inspection item is defect-free, the defect-free scenario branch sub-model is triggered. A comprehensive stability score is then calculated based on the defect-free scenario branch sub-model, starting with the coverage balance index. Calculate, calculate each candidate flange Mean reflectance under eight independent light sources Then the standard deviation of its reflectance is calculated. Standard deviation The smaller the value, the more uniform and stable the reflectivity distribution of the flange surface under different lighting conditions, resulting in a higher uniformity score. The calculation formula is ,in The value range is (0,1], and a larger value indicates better uniformity; secondly, the performance of the reference light source adaptation is evaluated. Calculations are performed to determine a set of reflectivity variation coefficients (the ratio of the standard deviation to the mean) from a pre-established historical inspection data set containing a large number of defect-free flanges. The three smallest reference light sources, such as, , forming a reference light source set These light sources typically represent the most stable and predictable illumination conditions for a defect-free flange, calculating the reflectivity for each candidate flange. In reference light source set Each light source Reflectivity The reflectivity of the first inspection object under the corresponding light source average deviation Benchmark Adaptation Score ,in The value range is [0,1]. A larger value indicates a better fit between the candidate flange and the reference reflectivity mode, meaning a smaller deviation between its surface characteristics and those of a normal flange. Finally, a comprehensive stability score and selection are performed, and the values ​​for each candidate flange are calculated. Overall stability score The weight of 0.5 can be dynamically adjusted according to the actual light stability requirements of the production environment. For example, it can be appropriately increased when the ambient light is unstable. Weighting, then selecting The highest-scoring candidate flange is selected as the next test target. This score quantifies the surface uniformity and baseline fit of the candidate flange. If any issues exist... For the same candidate flange, the mean reflectance deviation from that of the first inspection object is further calculated. The flange with the smallest deviation is selected to ensure a smooth transition in the testing process and the continuity of parameters.

[0057] In the preferred category, select the candidate object for defect analysis, always based on the first inspection object, and the inspection process is consistent with the inspection process of the first inspection object, until the last flange in the preferred category is inspected, then it is necessary to jump to the inspection of the non-preferred flange.

[0058] Step 8, Non-preferred flange inspection: First, perform benchmark switching and initial object selection, using the last flange to be inspected in the preferred class. As the new benchmark, calculate the center point of all flanges in the secondary selection class and... The Euclidean distance between the center points is used to select the flange with the smallest distance as the first inspection object in the secondary selection category. The purpose is to maximize the use of the current spatial positioning of the inspection system, reduce invalid image cropping, and maintain the continuity of the inspection process.

[0059] Then iterative testing is performed. The testing process for secondary and all other non-preferred flanges is the same as the aforementioned process, that is, the neighbor-first selection principle and the two-branch dynamic decision model are followed to select the test objects in sequence, access their pre-collected multi-mode image data, perform reflectivity calculation, defect identification and cross-validation, until all flanges in the test area have been fully tested.

[0060] Step nine involves outputting and summarizing the test results. For each inspected flange, record its unique identification information, such as center point coordinates and orientation angle, as well as the precise location of all identified defects. This can be combined with a defect type matching model for precise defect matching. Then, generate a visual inspection report containing the original flange image, precise labeling of defect locations, identification of defect types, and a distribution map of defects on the flange surface, intuitively displaying the density and type distribution of defects. Simultaneously, all inspection data is exported in a structured data format, including the unique identifier of each flange, the precise coordinates of all identified defects, detailed defect types, the set of sensitive light sources that caused the defects, and reflectivity data under each light source. This ensures the comprehensiveness, traceability, and practicality of the inspection results, providing accurate and quantifiable data support for quality control and process improvement on the production line.

[0061] Correspondingly, the present invention also provides an online inspection system for the appearance of the upper flange of an automotive oil pump, comprising:

[0062] The clustering and filtering module acquires an initial panoramic image of the area covered by the camera under ambient light. Based on the initial panoramic image, it identifies the coordinate position and orientation information of each flange through target detection. Then, it clusters the flanges based on the orientation information of each flange and selects the cluster with the most members as the preferred cluster.

[0063] The first inspection object positioning module selects the flange with the smallest distance from the preset reference point from the preferred category as the first inspection object.

[0064] The detection image acquisition module acquires images captured by the camera when several sets of controllable independent light sources above the detection area are activated sequentially, as an image dataset.

[0065] The first inspection image analysis module extracts the first inspection object from the image dataset, calculates the reflectivity to determine the real defect points, and locates the defect-sensitive light source set based on the real defect points.

[0066] The subsequent inspection object selection module selects the flange with the smallest Euclidean distance from the center point of the first inspection object in the preferred category as the candidate inspection object. When there are at least two candidate inspection objects with the same or similar Euclidean distance, the preset dual-branch dynamic decision model is triggered to screen and determine the next inspection object. Defect analysis is performed on the determined next inspection object until all flanges in the preferred category have been fully inspected. Then, the flanges in the non-preferred category are clustered again according to the orientation information. The last flange inspected in the preferred category is used as the new benchmark, and the cluster with the most members is selected for inspection until all flanges in the inspection area have been fully inspected.

[0067] The inspection results summary module generates a visual report of the defects found in the inspected flanges.

[0068] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principle of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for online inspection of the appearance of the upper flange of an automotive oil pump, characterized in that: Includes the following steps: The clustering and screening step involves obtaining an initial panoramic image of the area covered by the camera under ambient light, identifying the coordinate position and orientation information of each flange through target detection based on the initial panoramic image, and then clustering the flanges based on the orientation information of each flange, with the cluster with the most members being the preferred cluster. The first inspection object positioning step involves selecting the flange with the smallest distance from the preset reference point from the preferred category as the first inspection object. The detection image acquisition step involves obtaining images captured by the camera when several groups of controllable independent light sources above the detection area are activated sequentially, which are then used as an image dataset. The first inspection image analysis step involves extracting the first inspection object from the image dataset, calculating the reflectivity to determine the real defect points, and locating the defect-sensitive light source set based on the real defect points. The subsequent inspection object selection steps involve selecting the flange with the smallest Euclidean distance from the center point of the first inspection object in the preferred category as the candidate inspection object. When there are at least two candidate inspection objects with the same or similar Euclidean distance, a preset bi-branch dynamic decision model is triggered to screen and determine the next inspection object. Defect analysis is then performed on the determined next inspection object until all flanges in the preferred category have been fully inspected. Then, flanges in the non-preferred categories are clustered again based on orientation information, and the last flange inspected in the preferred category is used as the new benchmark. The cluster with the largest number of flanges is selected for inspection until all flanges in the inspection area have been fully inspected. The bi-branch dynamic decision model includes a defect scenario sub-model and a defect-free scenario sub-model. When the first inspection object has a defect, the defect scenario sub-model is triggered to calculate the comprehensive fit score between each candidate inspection object and the first inspection object. The next inspection object is selected based on the comprehensive fit score. When the first inspection object does not have a defect, the defect-free scenario sub-model is triggered to calculate the comprehensive stability score of each candidate inspection object. The next inspection object is selected based on the comprehensive stability score. The test results summary step generates a visual report of the defects found in the inspected flanges.

2. The method for online inspection of the appearance of the upper flange of an automotive oil pump according to claim 1, characterized in that: The initial inspection image analysis step includes a defect identification strategy, which includes: The reflectance calculation sub-step extracts pixel-level gray values ​​of the first-inspection object from each image acquired under different independent light sources and calculates its average gray value. It also calculates the normalized reflectance of the first-inspection object under each independent light source based on the intensity of the independent light source. The defect localization sub-step uses the normalized reflectance to identify the location of candidate defects in the first inspection object using the reflectance threshold method. The multi-light source cross-validation sub-step marks the same pixel location as a candidate defect in images under different independent light sources a certain number of times. If the number of times is greater than or equal to a preset judgment threshold, the location is judged as a real defect point.

3. The method for online inspection of the appearance of the upper flange of an automotive oil pump according to claim 2, characterized in that: The initial inspection image analysis step also includes a defect-sensitive light source set localization strategy. The localization strategy includes calculating the gray-level gradient value of the real defect point in each image under different independent light sources, sorting the gray-level gradient values, and selecting the light sources with the highest gray-level gradient values ​​to form the defect-sensitive light source set.

4. The method for online inspection of the appearance of the upper flange of an automotive oil pump according to claim 1, characterized in that: The defect scene sub-model performs light source sensitivity weight calculation, reflectivity similarity calculation, and comprehensive fit score calculation. The light source sensitivity weight calculation includes calculating the weight based on the grayscale gradient value corresponding to each independent light source in the defect sensitive light source set. The reflectance similarity calculation includes calculating the reflectance of the candidate object under each independent light source, calculating the reflectance deviation rate between the candidate object and the first object under the same light source at corresponding positions, and calculating the similarity based on the reflectance deviation rate; the comprehensive fit score calculation includes calculating the comprehensive fit score based on the light source sensitivity weight and reflectance similarity.

5. The method for online inspection of the appearance of the upper flange of an automotive oil pump according to claim 4, characterized in that: The defect-free scene sub-model performs coverage balance index calculation, reference light source adaptation calculation, and comprehensive stability score calculation. The coverage balance index calculation includes calculating the average reflectance of the test object under each independent light source, calculating the standard deviation of reflectance based on the average reflectance, and then calculating the balance score based on the standard deviation of reflectance. The calculation of the reference light source adaptation includes determining a set of three reference light sources with the smallest coefficient of variation of reflectance to form a reference light source set, calculating the average difference between the reflectance of the candidate object under each independent light source in the reference light source set and the reflectance of the first-inspection object under the same light source, and calculating the reference adaptation score based on the average difference. The comprehensive stability score calculation includes calculating the comprehensive stability score based on the balance score and the benchmark fit score.

6. The method for online inspection of the appearance of the upper flange of an automotive oil pump according to claim 2, characterized in that: It also includes a light source consistency verification step. When there is no light source in the detection area, the background image of the detection area captured by the camera is obtained by each independent light source in turn. The gray value analysis of the background image is performed to calculate the average gray value of the background. It is determined whether the maximum deviation rate between the average gray values ​​of the background generated by each independent light source in the detection area is less than a preset threshold. If not, each independent light source is adjusted so that the maximum deviation rate is less than the preset threshold.

7. The method for online inspection of the appearance of the upper flange of an automotive oil pump according to claim 6, characterized in that: It also includes a reflectivity reference calibration step, in which a standard defect-free flange is placed in the detection area, flange images are captured by cameras activated by independent light sources in sequence, and the average pixel gray value of the flange images is calculated. Based on the average pixel gray value, the known reflectivity parameters of the flange, and the intensity of the independent light sources, an initial reflectivity reference matrix of reflectivity calibration coefficients is established.

8. The method for online inspection of the appearance of the upper flange of an automotive oil pump according to claim 7, characterized in that: In the clustering screening step, if multiple clusters have the same maximum number of flanges, the average orientation angle of the clusters with the same number of flanges is compared with the angle between the average orientation angle and the camera optical axis, and the cluster with the smallest angle is selected as the preferred cluster.

9. An online inspection system for the appearance of the upper flange of an automotive oil pump, characterized in that: include: The clustering and filtering module acquires an initial panoramic image of the area covered by the camera under ambient light. Based on the initial panoramic image, it identifies the coordinate position and orientation information of each flange through target detection. Then, it clusters the flanges based on the orientation information of each flange and selects the cluster with the most members as the preferred cluster. The first inspection object positioning module selects the flange with the smallest distance from the preset reference point from the preferred category as the first inspection object. The detection image acquisition module acquires images captured by the camera when several sets of controllable independent light sources above the detection area are activated sequentially, as an image dataset. The first inspection image analysis module extracts the first inspection object from the image dataset, calculates reflectivity to determine the real defect points, and locates the defect-sensitive light source set based on the real defect points. The subsequent inspection object selection module selects the flange with the smallest Euclidean distance from the center point of the first inspection object as the candidate inspection object in the preferred category. When there are at least two candidate inspection objects with the same or similar Euclidean distance, a preset bi-branch dynamic decision model is triggered to screen and determine the next inspection object. Defect analysis is performed on the determined next inspection object until all flanges in the preferred category have been fully inspected. Then, flanges in the non-preferred category are clustered again according to orientation information. The last flange inspected in the preferred category is used as the new benchmark, and the cluster with the most members is selected for inspection until all flanges in the inspection area have been fully inspected. The bi-branch dynamic decision model includes a defect scenario sub-model and a defect-free scenario sub-model. When the first inspection object has a defect, the defect scenario sub-model is triggered to calculate the comprehensive fit score between each candidate inspection object and the first inspection object. The next inspection object is selected based on the comprehensive fit score. When the first inspection object does not have a defect, the defect-free scenario sub-model is triggered to calculate the comprehensive stability score of each candidate inspection object. The next inspection object is selected based on the comprehensive stability score. The inspection results summary module generates a visual report of the defects found in the inspected flanges.

Citation Information

Patent Citations

  • Snow pressing vehicle appearance defect detection method based on vision under complex background

    CN113160192A

  • Electronic control silicone oil clutch image analysis system based on big data

    CN119205651A