A motor cover plate processing detection system and method based on visual recognition
By acquiring images of scattered and reflected light from the mounting holes of the motor cover plate, and combining annular region segmentation and radial projection analysis, a confidence annular grayscale distribution curve is generated, which solves the problem of detecting hidden cracks in the mounting holes of the motor cover plate and achieves high-precision identification and risk assessment of hidden cracks.
Patent Information
- Application Number
- CN202511678850.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2045-11-17
AI Technical Summary
During the machining process of the motor cover mounting hole area, hidden cracks are difficult to be accurately identified by traditional visual inspection methods. In particular, under the action of tool cutting and fixture stress, micro-level stress concentration is generated on the material surface. Hidden cracks have extremely low contrast under normal lighting and are easily buried by image noise and material texture, resulting in missed detection.
A vision-based method for detecting the processing of motor cover plates was adopted. Scattered light images under dark illumination and reflected light images under axial vertical illumination were acquired. Confidence ring-shaped grayscale distribution curves were generated through annular region segmentation and radial projection analysis. Local variance was compared with the grayscale distribution curves of pre-set qualified products to identify local variance abnormalities of latent cracks. Finally, the risk level of the cracks was determined based on the spatial distribution characteristics.
It enables precise detection of latent cracks in the motor cover mounting hole area, effectively eliminates noise interference, improves the accuracy and reliability of detection, avoids missed detection, and can identify the specific risk level of latent cracks.
Smart Images

Figure CN121147217B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of visual inspection technology, and more specifically, to a visual recognition-based motor cover plate processing and inspection system and method. Background Technology
[0002] Visual inspection originated from the cross-development of computer vision and artificial intelligence. Traditional methods rely on manually designed features and image processing algorithms to complete localization, measurement and defect identification in a controlled environment, but their generalization ability is limited. In recent years, with the breakthroughs in deep learning, especially convolutional neural networks (CNN), visual inspection has achieved revolutionary progress. Driven by large-scale data, the model can automatically learn complex features and significantly surpass traditional methods in terms of accuracy and robustness. The current technology has been widely used in industrial quality inspection, autonomous driving, medical imaging and security monitoring, becoming an indispensable key technology support for realizing intelligence and automation.
[0003] In existing visual inspection, the process begins by acquiring digital images of the target using sensors such as industrial cameras, converting them into a two-dimensional pixel matrix, and then preprocessing them using image processing algorithms to improve the signal-to-noise ratio and highlight key features. Feature extraction is then performed on the preprocessed image, and finally, a classifier or decision model is used to analyze the extracted features and output the target detection result. However, in the visual recognition-based inspection of motor cover plate processing, the machining of the edge area of the motor cover plate mounting holes is prone to microscopic stress concentration due to tool cutting and fixture stress. This stress concentration can lead to hidden cracks on the material surface (hidden cracks have extremely low contrast with normal texture under normal lighting, and the resulting grayscale changes are submerged in image noise and the inherent texture of the material), resulting in missed detection of hidden cracks in the motor cover plate mounting hole area. Therefore, how to accurately detect hidden cracks in the motor cover plate mounting hole area during the motor cover plate processing has become a challenge for the industry. Summary of the Invention
[0004] This application provides a vision-based motor cover plate processing and inspection system and method, which can accurately detect hidden cracks in the mounting hole area of the motor cover plate during the processing of the motor cover plate.
[0005] In a first aspect, this application provides a method for processing and inspecting motor cover plates based on visual recognition, comprising the following steps:
[0006] Acquire images of scattered light in the motor cover mounting hole area under dark illumination conditions and reflected light under axial vertical illumination conditions;
[0007] perform annular region segmentation on the scattered light image, and extract gray scale distribution features of a plurality of concentric annular regions with the center of the mounting hole as the center during the annular region segmentation, and then perform radial projection analysis on the motor cover plate mounting hole region according to all the gray scale distribution features to obtain an annular gray scale distribution curve of the motor cover plate mounting hole region;
[0008] perform radial coordinate constraint on the annular gray scale distribution curve based on the geometric center coordinates of the motor cover plate mounting hole in the reflected light image to generate a confidence annular gray scale distribution curve;
[0009] perform local variance comparison between the confidence annular gray scale distribution curve and a preset qualified product gray scale distribution curve, and then identify a local variance abnormal section in the confidence annular gray scale distribution curve representing the existence of an implicit crack in the motor cover plate mounting hole;
[0010] identify a risk level of the existence of an implicit crack in the motor cover plate mounting hole region based on the spatial distribution characteristics of the local variance abnormal section on the confidence annular gray scale distribution curve.
[0011] In some embodiments, the annular region segmentation on the scattered light image and the extraction of the gray scale distribution features of the plurality of concentric annular regions with the center of the mounting hole as the center during the annular region segmentation specifically include:
[0012] position the geometric center coordinates of the motor cover plate mounting hole according to the edge contour of the motor cover plate mounting hole in the scattered light image;
[0013] set an inner radius threshold, an outer radius threshold and a ring width interval parameter of the annular region based on the geometric center coordinates, and then determine the radial distribution range of the plurality of concentric annular regions;
[0014] perform annular region segmentation on the scattered light image according to the radial distribution range to obtain a plurality of concentric annular regions with the center of the motor cover plate mounting hole as the center;
[0015] extract gray scale features for each concentric annular region to obtain the corresponding gray scale distribution features of each concentric annular region.
[0016] In some embodiments, the radial projection analysis on the motor cover plate mounting hole region according to all the gray scale distribution features to obtain the annular gray scale distribution curve of the motor cover plate mounting hole region specifically includes:
[0017] set an angle parameter for the radial projection analysis on the motor cover plate mounting hole region;
[0018] projecting and comparing the gray scale distribution features of each concentric ring-shaped region in the angle direction based on the angle parameter to obtain a local gray scale contrast value of each ring-shaped region at a corresponding angle;
[0019] constructing a two-dimensional gray scale distribution matrix with the radius value of each concentric ring-shaped region as the horizontal coordinate and the local gray scale contrast value at the corresponding angle as the vertical coordinate;
[0020] statistically averaging the two-dimensional gray scale distribution matrix in the angle direction to obtain a gray scale contrast sequence continuously distributed along the radial direction;
[0021] curve fitting the gray scale contrast sequence continuously distributed along the radial direction to obtain a ring-shaped gray scale distribution curve of the motor cover plate mounting hole region.
[0022] In some embodiments, the radial coordinate constraint of the ring-shaped gray scale distribution curve based on the geometric center coordinates of the motor cover plate mounting hole in the reflected light image generates a confidence ring-shaped gray scale distribution curve, specifically including:
[0023] extracting the geometric center coordinates of the motor cover plate mounting hole in the reflected light image as the reference center coordinates;
[0024] calculating the radial offset of the reference center coordinates and the mounting hole geometric center coordinates corresponding to the ring-shaped gray scale distribution curve;
[0025] correcting the radial coordinates of the ring-shaped gray scale distribution curve based on the radial offset to obtain a radial coordinate sequence corrected by offset;
[0026] performing effectiveness screening on the radial coordinate sequence corrected by offset based on a preset radial coordinate confidence threshold to obtain radial coordinates meeting the confidence constraint condition;
[0027] reconstructing a confidence ring-shaped gray scale distribution curve according to the radial coordinates meeting the confidence constraint condition.
[0028] In some embodiments, the confidence ring-shaped gray scale distribution curve is locally compared with a preset qualified product gray scale distribution curve to further identify a local variance abnormal section in the confidence ring-shaped gray scale distribution curve representing the existence of hidden cracks in the motor cover plate mounting hole, specifically including:
[0029] determining a local comparison unit of local variance comparison, the local comparison unit including a sliding window size and a sliding step length;
[0030] calculating the local variance value of the confidence ring-shaped gray scale distribution curve and the local variance reference value of the corresponding qualified product gray scale distribution curve in each local comparison unit;
[0031] calculate a variance difference between the local variance value and a local variance reference value in each local comparison unit;
[0032] identify a local comparison unit that exceeds a difference threshold according to a variance difference corresponding to the local comparison unit;
[0033] determine a local variance abnormal section representing the existence of a hidden crack in the motor cover plate mounting hole according to the local comparison units that continuously exceed the difference threshold.
[0034] In some embodiments, the scattered light image of the motor cover plate mounting hole region under dark field illumination conditions and the reflected light image under axial vertical illumination conditions are collected by an industrial camera.
[0035] In some embodiments, the risk level includes three risk levels: high, medium and low.
[0036] In a second aspect, the present application provides a motor cover plate processing detection system based on visual recognition, comprising:
[0037] The acquisition module is configured to collect a scattered light image of the motor cover plate mounting hole region under dark field illumination conditions and a reflected light image under axial vertical illumination conditions.
[0038] The processing module is configured to perform annular region segmentation on the scattered light image, extract gray scale distribution features of a plurality of concentric annular regions with the center of the mounting hole as the center during annular region segmentation, and then perform radial projection analysis on the motor cover plate mounting hole region according to all the gray scale distribution features to obtain an annular gray scale distribution curve of the motor cover plate mounting hole region.
[0039] The processing module is further configured to perform radial coordinate constraint on the annular gray scale distribution curve based on the geometric center coordinates of the motor cover plate mounting hole in the reflected light image to generate a confidence annular gray scale distribution curve.
[0040] The processing module is further configured to perform local variance comparison between the confidence annular gray scale distribution curve and a preset qualified product gray scale distribution curve, and then identify a local variance abnormal section in the confidence annular gray scale distribution curve representing the existence of a hidden crack in the motor cover plate mounting hole.
[0041] The execution module is configured to identify a risk level of the existence of a hidden crack in the motor cover plate mounting hole region based on the spatial distribution characteristics of the local variance abnormal section on the confidence annular gray scale distribution curve.
[0042] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a code, and the processor is configured to acquire the code and execute the above-mentioned motor cover plate processing detection method based on visual recognition.
[0043] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the motor cover plate processing detection method based on visual recognition.
[0044] The technical scheme provided by the embodiments of the present application has the following beneficial effects:
[0045] In the motor cover plate processing detection system and method based on visual recognition provided by the present application, firstly, the scattered light image of the motor cover plate mounting hole region under dark field illumination condition and the reflected light image under axial vertical illumination condition are collected; secondly, the annular region segmentation is performed on the scattered light image, and the gray scale distribution features of a plurality of concentric annular regions with the mounting hole center as the center are extracted in the annular region segmentation process; then, the radial projection analysis is performed on the motor cover plate mounting hole region according to all the gray scale distribution features, and the annular gray scale distribution curve of the motor cover plate mounting hole region is obtained; further, the radial coordinate constraint is performed on the annular gray scale distribution curve based on the geometric center coordinates of the motor cover plate mounting hole in the reflected light image, and the confidence annular gray scale distribution curve is generated; then, the confidence annular gray scale distribution curve is compared with the preset qualified product gray scale distribution curve in terms of local variance, and then the local variance abnormal section in the confidence annular gray scale distribution curve representing the existence of the hidden crack of the motor cover plate mounting hole is identified; finally, the risk level of the existence of the hidden crack of the motor cover plate mounting hole region is identified based on the spatial distribution features of the local variance abnormal section on the confidence annular gray scale distribution curve.
[0046] Therefore, this application can accurately detect hidden cracks in the mounting hole area of the motor cover plate during the processing of the motor cover plate. First, by acquiring scattered light images of the mounting hole area under dark illumination and reflected light images under axial perpendicular illumination, the high sensitivity of the scattered light to surface fine structures and the high accuracy of the reflected light for geometric center positioning can be utilized, providing comprehensive and complementary image data support for subsequent detection. Second, by performing annular segmentation and extracting grayscale distribution features from the scattered light images, radial projection analysis can be conducted, transforming discrete image pixel information into a continuous and quantifiable annular grayscale distribution curve. This effectively eliminates the interference of noise and uneven illumination during the processing of the mounting hole area of the motor cover plate, highlighting the grayscale variation law in the radial direction of the mounting hole. Furthermore, the geometric center coordinates located through the reflected light images... By applying radial coordinate constraints to the annular grayscale distribution curve, center positioning deviations can be corrected, invalid data can be filtered, and a highly reliable annular grayscale distribution curve can be generated, providing an accurate benchmark for subsequent comparisons. Then, the confidence curve and the qualified product curve are compared locally to identify local variance anomalous sections, overcoming the limitation of global comparison in capturing subtle local anomalies. This enables precise location of grayscale fluctuation anomalies corresponding to latent cracks, avoiding the probability of missing latent cracks on the surface of the motor cover mounting hole due to tool cutting and fixture stress. Finally, the risk level of latent cracks in the motor cover mounting hole area is identified based on the spatial distribution characteristics of local variance anomalous sections on the confidence annular grayscale distribution curve. In summary, the technical solution provided in this application can accurately detect latent cracks in the motor cover mounting hole area during the motor cover processing. Attached Figure Description
[0047] Figure 1 This is an exemplary flowchart of a vision recognition-based motor cover processing and inspection method according to some embodiments of this application;
[0048] Figure 2 This is an exemplary flowchart illustrating the determination of grayscale distribution features according to some embodiments of this application;
[0049] Figure 3 This is a schematic diagram of the structure of a vision recognition-based motor cover processing and inspection system according to some embodiments of this application;
[0050] Figure 4 This is a schematic diagram of the structure of a computer device that implements a vision recognition-based motor cover plate processing and inspection method according to some embodiments of this application. Detailed Implementation
[0051] To better understand the technical solution of this application, the technical solution of this application will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0052] Reference Figure 1 The figure is an exemplary flow chart of a visual recognition-based motor cover plate processing detection method according to some embodiments of the present application, which mainly includes the following steps:
[0053] In step S101, the scattered light image of the motor cover plate mounting hole region under dark field illumination conditions and the reflected light image under axial vertical illumination conditions are collected.
[0054] In specific implementation, the scattered light image of the motor cover plate mounting hole region under dark field illumination conditions and the reflected light image under axial vertical illumination conditions are collected by an industrial camera. Specifically, in the dark field illumination mode, a parallel light source is arranged around the upper side of the motor cover plate mounting hole region, so that the light is tangentially irradiated on the surface of the motor cover plate mounting hole region, and the scattered light image of the motor cover plate mounting hole region under dark field illumination conditions is collected by the industrial camera. Then, in the axial vertical illumination mode, the vertical light source coaxially arranged with the camera optical axis through the beam splitter is switched on, so that the light is vertically incident on the surface of the motor cover plate mounting hole region, and the reflected light image of the motor cover plate mounting hole region under axial vertical illumination conditions is collected by the industrial camera.
[0055] It should be noted that the scattered light image in the present application refers to the image of the motor cover plate mounting hole region collected under dark field illumination conditions. In the scattered light image, the perfect flat area is displayed as dark, and the area with microscopic unevenness (such as hidden cracks and scratches) will be displayed as bright pixel points or patterns due to the scattering effect of light. The scattered light image can be used to highlight the morphology of microscopic defects of the motor cover plate mounting hole region. The reflected light image in the present application refers to the image of the motor cover plate mounting hole region collected under axial vertical illumination conditions. The reflected light image can clearly present the macroscopic geometric features, edges and position information of the surface of the measured object.
[0056] It should be further noted that the motor cover plate mounting hole region in the present application refers to the hole on the motor cover plate for fixed connection with other components through bolts and the annular pressure-bearing surface around the hole. The image of the motor cover plate mounting hole region is acquired, because the motor cover plate mounting hole region is prone to produce hidden cracks that are difficult to be found by naked eye due to stress concentration during processing and use. These microscopic defects can seriously affect the structural integrity and safe operation of the motor. By acquiring the image under specified illumination conditions, the scattering signal of the crack to the light can be sharply captured by dark field illumination, so as to convert the hidden defects into visual image features, thereby providing a data basis for subsequent automatic and high-precision defect recognition based on image analysis.
[0057] In step S102, the scattered light image is subjected to annular region segmentation, and the gray scale distribution features of a plurality of concentric annular regions with the mounting hole center as the center are extracted in the annular region segmentation process, and then the motor cover mounting hole region is subjected to radial projection analysis according to all the gray scale distribution features, and the annular gray scale distribution curve of the motor cover mounting hole region is obtained.
[0058] In some embodiments, referring to Figure 2 As shown in the figure, which is an exemplary flow chart for determining gray scale distribution features according to some embodiments of the present application, the annular region segmentation of the scattered light image and the extraction of the gray scale distribution features of a plurality of concentric annular regions with the mounting hole center as the center in the annular region segmentation process can be implemented by the following steps:
[0059] In step S1021, the geometric center coordinates of the motor cover mounting hole are obtained according to the edge contour positioning of the motor cover mounting hole in the scattered light image;
[0060] In step S1022, the inner radius threshold, outer radius threshold and ring width interval parameters of the annular region are set based on the geometric center coordinates, and then the radial distribution range of the plurality of concentric annular regions is determined;
[0061] In step S1023, the annular region segmentation processing is performed on the scattered light image according to the radial distribution range, and a plurality of concentric annular regions with the motor cover mounting hole center as the center are obtained;
[0062] In step S1024, the gray scale features of each concentric annular region are extracted, and the gray scale distribution features corresponding to each concentric annular region are obtained.
[0063] In a specific implementation, first, Gaussian filtering preprocessing is performed on the scattered light image to eliminate noise interference, and a Canny operator in image processing is used to perform edge detection on the preprocessed scattered light image to obtain an edge profile of the motor cover plate mounting hole. Then, a Hough circle transformation is performed on the detected edge profile to perform circular fitting to locate the geometric center coordinates of the motor cover plate mounting hole. The geometric center coordinates refer to the center position coordinates of the motor cover plate mounting hole in an image pixel coordinate system. Second, based on the obtained geometric center coordinates, the distance from the inner edge of the mounting hole to the geometric center coordinates is calculated as the inner radius threshold of the annular region, the distance from the outer edge of the mounting hole to the geometric center coordinates is calculated as the outer radius threshold of the annular region, and the ring width interval of equidistant segmentation is set according to actual requirements. Then, the ring width interval is used to segment the inner radius threshold and the outer radius threshold to determine the radial distribution range of the plurality of concentric annular regions. The radial distribution range refers to the interval between the starting value and the ending value of the radius of each concentric annular region in the radial direction, which is used to clearly define the spatial coverage range of each annular region. Then, the distance from the pixel coordinates in the scattered light image to the geometric center is marked as the same region if the distance falls within the corresponding radial distribution range, and the annular region segmentation processing is performed on the scattered light image to obtain a plurality of concentric annular regions with the center of the motor cover plate mounting hole as the center. The concentric annular region refers to a ring-shaped image sub-region with the same ring width and sequentially increasing radius with the mounting hole geometric center as the common center. Finally, a gray scale statistical analysis method is used to calculate the gray scale mean value in each concentric annular region as the corresponding gray scale distribution feature of the corresponding concentric annular region.
[0064] It should be noted that the gray scale distribution feature in this application refers to an index that can reflect the change of the pixel gray scale value in the concentric annular region. By determining the gray scale distribution feature, basic data input can be provided for subsequent radial projection analysis, so that the gray scale change rule in the radial direction of the mounting hole can be intuitively presented through the annular gray scale distribution curve. At the same time, the gray scale distribution feature can also effectively amplify the local gray scale abnormal signal caused by the hidden crack. The hidden crack can destroy the uniformity of the mounting hole surface, causing a significant fluctuation in the gray scale statistics of the corresponding region. The gray scale distribution feature can quantify this fluctuation and provide a clear comparison benchmark for subsequent local variance comparison with the gray scale distribution curve of the qualified product, ensuring accurate identification of the local variance abnormal section.
[0065] In some embodiments, radial projection analysis is performed on the motor cover plate mounting hole region according to all the gray scale distribution features to obtain the annular gray scale distribution curve of the motor cover plate mounting hole region, which is implemented by the following steps:
[0066] An angle parameter for radial projection analysis of the motor cover plate mounting hole region is set.
[0067] projecting and contrasting the gray scale distribution characteristics of each concentric ring-shaped region in the angle direction based on the angle parameter, to obtain a local gray scale contrast value of each ring-shaped region at a corresponding angle;
[0068] taking the radius value of each concentric ring-shaped region as the horizontal coordinate and the local gray scale contrast value at the corresponding angle as the vertical coordinate, a two-dimensional gray scale distribution matrix is constructed;
[0069] statistically averaging the two-dimensional gray scale distribution matrix in the angle direction to obtain a gray scale contrast sequence continuously distributed along the radial direction;
[0070] curve fitting is performed on the gray scale contrast sequence continuously distributed along the radial direction to obtain a ring-shaped gray scale distribution curve of the motor cover plate mounting hole region.
[0071] In a specific implementation, first, the angle parameter for radial projection analysis of the motor cover plate mounting hole region can be set based on the annular structure characteristics of the motor cover plate mounting hole, and the angle parameter can be set as an angle interval of 3°, which refers to the angle interval for defining the radial projection; an integral projection algorithm is adopted, and second, each concentric annular region is decomposed into a plurality of radial projection lines in the angle direction based on the set angle parameter, the average value of the gray values of the corresponding concentric annular region is calculated along each radial projection line, and the calculated gray average value is taken as the projection gray value of the corresponding concentric annular region on the radial projection line; the projection gray value of the concentric annular region on the radial projection line is calculated by difference with the corresponding gray distribution characteristics, to obtain the local gray contrast value of the concentric annular region at the corresponding angle, which refers to the deviation value between the gray distribution characteristics of the concentric annular region and the gray values of different radial projection lines, and is used to reflect the change intensity of the local gray in the projection direction; the radius value of each concentric annular region is taken as the horizontal coordinate, and the local gray contrast value sequence at the corresponding angle is taken as the vertical coordinate, and all the different angle projection gray values corresponding to the radius are arranged in a row-column rule to construct a two-dimensional gray distribution matrix, which refers to a matrix structure with radius and angle as two-dimensional indexes and local gray contrast value as elements, and the local gray contrast value sequence refers to the set of local gray contrast values at different angles under the same radius, that is, the radius of one concentric annular region corresponds to one local gray contrast value sequence; then, a statistical average algorithm is adopted to perform arithmetic average calculation on the local gray contrast value sequence corresponding to the same radius in the two-dimensional gray distribution matrix to obtain the average local gray contrast value at different radii, and all the average local gray contrast values are arranged in the gray contrast sequence which is continuously distributed along the radial direction according to the corresponding radius size, which refers to the set of average local gray contrast values arranged in the increasing order of the radius value of the concentric annular region; a least squares fitting algorithm is adopted to perform curve fitting on the gray contrast sequence which is continuously distributed along the radial direction, with the radial position as the independent variable and the average local gray contrast value in the gray contrast sequence as the dependent variable, to obtain the annular gray distribution curve of the motor cover plate mounting hole region.
[0072] It should be noted that the annular gray distribution curve in the present application refers to a smooth curve that can intuitively reflect the change trend of the gray value of the mounting hole along the radial direction. The determination of the annular gray distribution curve can convert the microscopic crack morphology recognition problem originally performed in the two-dimensional image space and susceptible to noise interference into the accurate capture of the gray feature in the one-dimensional signal dimension. This conversion condenses and amplifies the radial crack features originally scattered and blurred on the image into a region with significant changes on the annular curve, thereby providing data basis for clearly characterizing the existence of the motor cover plate processing defects.
[0073] In step S103, the annular gray scale distribution curve is radially constrained based on the geometric center coordinates of the motor cover plate mounting hole in the reflected light image, and a confidence annular gray scale distribution curve is generated.
[0074] It should be noted that the reflected light image in the present application is collected under the condition of axial vertical illumination, and the light is vertically incident to the surface of the motor cover plate mounting hole along the camera optical axis, which can clearly and stably present the macro geometric profile and edge features of the mounting hole, and maximally reduce the interference of the surface micro texture or defects (such as hidden cracks) on the edge extraction, and then the highly reliable geometric center coordinates can be obtained through the edge detection and circular fitting algorithm. In comparison, the scattered light image depends on the scattering effect of light by the surface micro unevenness under dark field illumination, although it can effectively highlight defects such as hidden cracks, but the imaging result is greatly affected by the defect distribution, which may lead to distortion or blur of the extracted mounting hole edge profile, and then introduces the center positioning error. Therefore, the center coordinates positioned by the reflected light image are used as the reference to correct the annular gray scale distribution curve, which can effectively eliminate the systematic positioning deviation of the scattered light image due to the defect sensitivity, and ensure that the radial coordinate system relied on subsequent gray scale analysis is accurately aligned with the real physical position of the mounting hole.
[0075] In some embodiments, the step of generating the confidence annular gray scale distribution curve based on the geometric center coordinates of the motor cover plate mounting hole in the reflected light image radially constraining the annular gray scale distribution curve is implemented by the following steps:
[0076] Extracting the geometric center coordinates of the motor cover plate mounting hole in the reflected light image as the reference center coordinates;
[0077] Calculating the radial offset of the reference center coordinates and the mounting hole geometric center coordinates corresponding to the annular gray scale distribution curve;
[0078] Based on the radial offset, the radial coordinates of the annular gray scale distribution curve are corrected to obtain a radial coordinate sequence after offset correction;
[0079] Based on the preset radial coordinate confidence threshold, the radial coordinate sequence after offset correction is effectively screened to obtain radial coordinates meeting the confidence constraint condition;
[0080] According to the radial coordinates meeting the confidence constraint condition, a confidence annular gray scale distribution curve is reconstructed.
[0081] In a specific implementation, first, the edge profile of the motor cover plate mounting hole is detected from the reflected light image by using a Canny operator in image processing, and a Hough circle transformation is performed on the edge profile to fit a circle, so as to extract the geometric center coordinates of the motor cover plate mounting hole in the reflected light image as the reference center coordinates, which refer to the center position coordinates of the motor cover plate mounting hole in the reflected light image. Second, the straight-line distance and the direction vector between the reference center coordinates and the mounting hole geometric center coordinates corresponding to the annular gray distribution curve are calculated by using an Euclidean distance formula, so as to obtain the radial offset of the reference center coordinates and the mounting hole center coordinates corresponding to the annular gray distribution curve. The radial offset refers to the index of the spatial offset and the offset direction of the two center coordinates, and the offset is described by the straight-line distance between the reference center coordinates and the mounting hole center coordinates corresponding to the annular gray distribution curve, and the offset direction is described by the direction vector between the reference center coordinates and the mounting hole center coordinates corresponding to the annular gray distribution curve. Further, according to the coordinate correction principle, the offset corresponding to the radial offset is vector superimposed with each original radial coordinate of the annular gray distribution curve, so as to obtain a radial coordinate sequence after offset correction. The radial coordinate sequence after offset correction refers to a set of coordinate points arranged in a radial order after center offset correction. A radial coordinate confidence threshold is preset according to the detection accuracy requirement or is set according to expert knowledge, the offset correction of each radial coordinate point in the radial coordinate sequence after offset correction is compared with the radial coordinate confidence threshold by using a threshold comparison method, the radial coordinate points whose offset correction is within the radial coordinate confidence threshold range are retained, and a radial coordinate meeting a confidence constraint condition is obtained. The radial coordinate meeting the confidence constraint condition and the corresponding gray value refer to a radial coordinate whose position accuracy after correction meets the detection requirement. The radial coordinate points meeting the confidence constraint condition and the corresponding average local gray contrast value are completed by using an existing linear interpolation algorithm, and a confidence annular gray distribution curve is constructed through curve smoothing processing.
[0082] It should be noted that the confidence annular gray distribution curve in the present application refers to a curve after center offset correction, which can reflect the actual radial gray variation law of the motor cover plate mounting hole. The determination of the confidence annular gray distribution curve can eliminate the system error caused by the center positioning deviation of the mounting hole in the surface scattering light image, filter the invalid data and random interference in the radial coordinates, correct the original annular gray distribution curve to a gray variation reference with accurate matching with the actual physical position of the motor cover plate mounting hole and reliable data, and make the gray distribution law of the mounting hole along the radial direction more consistent with the actual surface state, so as to provide a high-precision and high-credibility reference carrier for the subsequent local variance comparison with the pre-stored qualified product gray distribution curve, and ensure the accuracy, stability and reliability of the entire motor cover plate mounting hole hidden crack detection process.
[0083] In step S104, the confidence ring-shaped gray distribution curve is compared with a preset qualified product gray distribution curve in terms of local variance, and then a local variance abnormal section in the confidence ring-shaped gray distribution curve representing the existence of the implicit crack of the motor cover plate mounting hole is identified.
[0084] In some embodiments, the comparison of the confidence ring-shaped gray distribution curve with the preset qualified product gray distribution curve in terms of local variance to identify the local variance abnormal section in the confidence ring-shaped gray distribution curve representing the existence of the implicit crack of the motor cover plate mounting hole is implemented by the following steps:
[0085] A local comparison unit for local variance comparison is determined, and the local comparison unit includes a sliding window size and a sliding step length.
[0086] In each local comparison unit, a local variance value of the confidence ring-shaped gray distribution curve and a local variance reference value of the corresponding qualified product gray distribution curve are calculated.
[0087] The variance difference amount of the local variance value and the local variance reference value in each local comparison unit is calculated.
[0088] According to the variance difference amount corresponding to each local comparison unit, a local comparison unit exceeding the difference amount threshold is identified.
[0089] According to the local comparison units continuously exceeding the difference amount threshold, a local variance abnormal section representing the existence of the implicit crack of the motor cover plate mounting hole is determined.
[0090] It should be noted that the preset qualified product gray distribution curve in the present application refers to the confidence ring-shaped gray distribution curve corresponding to the qualified motor cover plate mounting hole region without an implicit crack. Specifically, a large number of scatter light images of the qualified motor cover plate mounting hole regions confirmed to have no implicit crack are collected, the scatter light images are subjected to ring region segmentation and radial projection analysis to generate the confidence ring-shaped gray distribution curve, and the generated confidence ring-shaped gray distribution curve is taken as the preset qualified product gray distribution curve and is pre-stored in the motor cover plate monitoring database to provide a comparison standard for subsequent detection.
[0091] In a specific implementation, first, the maximum extension length of the hidden crack in the historical motor cover plate mounting hole region is taken as the sliding window size in the local comparison unit of the local variance comparison, and the fixed interval is set as the sliding step according to actual needs, and then the local comparison unit of the local variance comparison is obtained, which refers to the combination of the sliding window and the moving interval for performing local variance calculation; second, the confidence ring-shaped gray distribution curve is aligned with the preset qualified product gray distribution curve according to the existing curve alignment method, and the local variance value of the confidence ring-shaped gray distribution curve and the local variance reference value of the corresponding qualified product gray distribution curve are calculated by using the variance calculation method, the qualified product gray distribution curve refers to the local curve corresponding to the local comparison unit on the preset qualified product gray distribution curve, the preset qualified product gray distribution curve can be obtained from the motor cover plate monitoring database, the local variance value refers to the variance of the average local gray contrast value in the corresponding local comparison unit of the confidence ring-shaped gray distribution curve, and the local variance reference value refers to the variance of the average local gray contrast value in the corresponding local comparison unit of the qualified product gray distribution curve, which is used as a reference standard for judging normal gray fluctuation; further, the local variance value in each local comparison unit is operated with the local variance reference value by using the absolute difference value calculation method, and the variance difference amount in each local comparison unit is obtained, the variance difference amount refers to the variance difference value of the confidence ring-shaped gray distribution curve and the qualified product gray distribution curve in the same local unit, which represents the gray fluctuation difference degree of the two; then, the variance difference amount corresponding to each local comparison unit is compared with the difference amount threshold one by one by using the threshold comparison method, and the local comparison unit exceeding the difference amount threshold is identified, the difference amount threshold can be set according to actual needs or set according to expert knowledge, which is not limited here, and the local comparison unit exceeding the difference amount threshold refers to the curve segment unit whose variance difference amount exceeds the preset standard, which is determined as a suspicious section that may have hidden cracks; finally, the existing connected region analysis method is used to judge the continuity of all local comparison units exceeding the difference amount threshold, and the locally adjacent and continuously distributed local comparison units are merged to obtain the local variance abnormal section representing that the motor cover plate mounting hole has hidden cracks.
[0092] It should be noted that the local variance anomaly section in the present application refers to the area corresponding to the surface of the motor cover plate mounting hole with hidden cracks. Specifically, it is the radial section (corresponding to the area in the two-dimensional image of the motor cover plate mounting hole) in the confidence ring gray distribution curve where the local variance is significantly different from the qualified product benchmark and continuously distributed. The prior art mainly uses global variance comparison to identify hidden cracks in the motor cover plate mounting hole. In the present scheme, a flexible local comparison unit is constructed by sliding window size and step length, combined with the quantitative difference calculation of local variance value and qualified product local variance benchmark value, and based on the essential characteristic that hidden cracks are continuously distributed in the physical space, the connected region analysis method is used to merge the comparison units that continuously exceed the threshold value, which not only solves the problem of local subtle gray fluctuation caused by the difficulty of traditional global comparison in capturing hidden cracks, but also avoids the defect of misjudgment of isolated abnormal points as cracks, and can effectively lock the continuous radial section directly corresponding to the hidden cracks, greatly improving the pertinence and accuracy of the identification of hidden cracks in the motor cover plate mounting hole.
[0093] In step S105, the risk level of the motor cover plate mounting hole area existing hidden cracks is identified based on the spatial distribution characteristics of the local variance anomaly section on the confidence ring gray distribution curve.
[0094] In some embodiments, the identification of the risk level of the motor cover plate mounting hole area existing hidden cracks based on the spatial distribution characteristics of the local variance anomaly section on the confidence ring gray distribution curve is implemented by the following steps:
[0095] Extract the spatial distribution characteristics of the local variance anomaly section, and quantitatively process the spatial distribution characteristics to generate a set of standardized spatial feature evaluation parameters;
[0096] Obtain the risk grading threshold range corresponding to each spatial feature evaluation parameter in the set of spatial feature evaluation parameters;
[0097] Compare each spatial feature evaluation parameter in the set of spatial feature evaluation parameters with the corresponding risk grading threshold range respectively to obtain the risk score of each spatial feature evaluation parameter;
[0098] Based on the influence weight of each spatial feature evaluation parameter on the risk level of hidden cracks, the weighted sum of all risk scores is obtained to obtain the risk index of the motor cover plate mounting hole area existing hidden cracks;
[0099] Compare the risk index with the preset risk level judgment threshold to identify the risk level of the motor cover plate mounting hole area existing hidden cracks.
[0100] In specific implementation, firstly, the spatial distribution features of the local variance abnormal section are extracted from the confidence annular gray distribution curve, including the radial extension length and the radial distribution density, i.e. the starting radial coordinate and the ending radial coordinate of the local variance abnormal section are identified, the radial extension length of the local variance abnormal section is calculated through the coordinate difference, and then the radial distribution density is obtained by dividing the radial extension length by the total radial coverage length of the motor cover plate mounting hole. Subsequently, the minimum maximum normalization is used to map the radial extension length and the radial distribution density in the spatial distribution features to a unified 0 to 1 interval to generate a set of standardized spatial feature evaluation parameters, which refers to the parameter set after the normalization of the radial extension length and the radial distribution density in the spatial distribution features. Secondly, the risk classification threshold range corresponding to each spatial feature evaluation parameter in the spatial feature evaluation parameter set is obtained from the motor cover plate monitoring database, which is based on the statistical analysis results of a large number of qualified products and different risk level samples with hidden cracks, combined with the use safety requirements and industry standards of the motor cover plate, and is pre-set, which will not be described here. The risk classification threshold range refers to the numerical interval of the spatial feature evaluation parameter that distinguishes different risk levels, and includes three risk classification threshold ranges of high, medium and low, which are used to define the risk degree of a single parameter. The motor cover plate monitoring database refers to a database for storing data related to the motor cover plate processing process. Further, each spatial feature evaluation parameter in the spatial feature evaluation parameter set is matched with the corresponding risk classification threshold range one by one. When the spatial feature evaluation parameter falls into the corresponding high risk classification threshold range, the risk score of the spatial feature evaluation parameter is 0.3. When the spatial feature evaluation parameter falls into the corresponding medium risk classification threshold range, the risk score of the spatial feature evaluation parameter is 0.2. When the spatial feature evaluation parameter falls into the corresponding low risk classification threshold range, the risk score of the spatial feature evaluation parameter is 0.1, and further obtain a risk score of each spatial feature evaluation parameter. In other embodiments, the risk score of each spatial feature evaluation parameter can be determined in other ways, which are not limited herein. The risk score refers to the risk level corresponding to the spatial feature evaluation parameter. Then, based on the influence weight of each spatial feature evaluation parameter on the risk level of the hidden crack, the weighted sum of all risk scores is obtained to obtain the risk index of the motor cover plate mounting hole region with hidden cracks. The influence weight of each spatial feature evaluation parameter on the risk level of the hidden crack can be set according to expert knowledge or actual needs. The risk index refers to the risk level of the motor cover plate mounting hole region with hidden cracks. Finally, the calculated risk index is compared and analyzed with the preset risk level determination threshold value, and the risk level of the motor cover plate mounting hole region with hidden cracks is determined according to the threshold interval where the risk index falls. The risk level includes three risk levels: high, medium and low. The preset risk level determination threshold value can be set according to actual needs or learned by machine learning of a large number of risk indexes of the motor cover plate mounting hole region with hidden cracks to set three risk level determination threshold values including high, medium and low, which are not limited herein.
[0101] It should be noted that the risk level in the present application refers to the classification result of the influence degree of hidden cracks on the safety of motor cover plate mounting hole processing, which is used to provide a direct basis for product quality determination.
[0102] In addition, another aspect of the present application provides a motor cover plate processing detection system based on visual recognition, which is described with reference to Figure 3 The figure is a structural schematic diagram of a motor cover plate processing detection system based on visual recognition according to some embodiments of the present application. The motor cover plate processing detection system based on visual recognition includes a collection module 201, a processing module 202 and an execution module 203, which are described as follows:
[0103] The collection module 201 is mainly used to collect the scattered light image of the motor cover plate mounting hole region under dark field illumination and the reflected light image under axial vertical illumination in the present application.
[0104] The processing module 202 is mainly used to divide the annular region of the scattered light image and extract the gray scale distribution features of multiple concentric annular regions with the mounting hole center as the center during the annular region division in the present application. Then, the radial projection analysis of the motor cover plate mounting hole region is performed according to all the gray scale distribution features to obtain the annular gray scale distribution curve of the motor cover plate mounting hole region.
[0105] The processing module 202 is further configured to perform radial coordinate constraint on the ring-shaped gray distribution curve based on the geometric center coordinates of the motor cover plate mounting hole in the reflected light image, to generate a confidence ring-shaped gray distribution curve.
[0106] In addition, the processing module 202 is further configured to perform local variance comparison between the confidence ring-shaped gray distribution curve and a preset qualified product gray distribution curve, to identify a local variance abnormal section in the confidence ring-shaped gray distribution curve representing the existence of the hidden crack of the motor cover plate mounting hole.
[0107] The execution module 203 is mainly configured to identify the risk level of the existence of the hidden crack of the motor cover plate mounting hole region based on the spatial distribution characteristics of the local variance abnormal section on the confidence ring-shaped gray distribution curve.
[0108] In addition, the present application further provides a computer device, which comprises a memory and a processor, the memory stores codes, and the processor is configured to acquire the codes and execute the above-mentioned visual recognition-based motor cover plate processing detection method.
[0109] In some embodiments, with reference to Figure 4 The figure is a structural schematic diagram of a computer device for implementing the visual recognition-based motor cover plate processing detection method according to some embodiments of the present application. The visual recognition-based motor cover plate processing detection method in the above-mentioned embodiments can be implemented by the computer device shown in the figure, which comprises at least one processor 301, a communication bus 302, a memory 303 and at least one communication interface 304. Figure 4
[0110] The processor 301 can be a general central processing unit (CPU), an application-specific integrated circuit (ASIC) or one or more processors for controlling the execution of the visual recognition-based motor cover plate processing detection method in the present application.
[0111] The communication bus 302 can be used to transmit information between the above-mentioned components.
[0112] The memory 303 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM), or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk or other magnetic storage device, or any other medium capable of storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this. The memory 303 can exist independently, and is connected to the processor 301 through the communication bus 302. The memory 303 can also be integrated with the processor 301.
[0113] The memory 303 is configured to store program codes for implementing the solutions of the present application, and the processor 301 is configured to control the execution. The processor 301 is configured to execute the program codes stored in the memory 303. The program codes can include one or more software modules. The determination of the motor cover plate processing detection method based on visual recognition in the above embodiments can be implemented by one or more software modules in the program codes of the processor 301 and the memory 303.
[0114] The communication interface 304 is configured to communicate with other devices or communication networks, such as an Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc., using any transceiver-like device.
[0115] In a specific implementation, as an embodiment, the computer device can include a plurality of processors, each of which can be a single-CPU processor or a multi-CPU processor. The processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0116] The computer device described above can be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the computer device can be a desktop computer, a laptop computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device. The embodiments of the present application do not limit the type of the computer device.
[0117] In addition, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the motor cover plate processing detection method based on visual recognition.
[0118] Although the preferred embodiments of the present application have been described, those skilled in the art who are informed of the basic inventive concept can make additional changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0119] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.
Claims
1. A visual recognition-based motor cover plate processing detection method, characterized in that, The method comprises the following steps: Collecting a scattered light image of a motor cover plate mounting hole region under dark field illumination and a reflected light image under axial vertical illumination; Performing annular region segmentation on the scattered light image, and extracting gray scale distribution features of a plurality of concentric annular regions with the center of the mounting hole as the center during the annular region segmentation, and then performing radial projection analysis on the motor cover plate mounting hole region according to all the gray scale distribution features to obtain an annular gray scale distribution curve of the motor cover plate mounting hole region; Constraining the radial coordinates of the annular gray scale distribution curve based on the geometric center coordinates of the motor cover plate mounting hole in the reflected light image to generate a confidence annular gray scale distribution curve; Performing local variance comparison between the confidence annular gray scale distribution curve and a preset qualified product gray scale distribution curve, and then identifying a local variance abnormal section in the confidence annular gray scale distribution curve representing the existence of hidden cracks in the motor cover plate mounting hole; Identifying the risk level of the existence of hidden cracks in the motor cover plate mounting hole region based on the spatial distribution features of the local variance abnormal section on the confidence annular gray scale distribution curve; The radial projection analysis on the motor cover plate mounting hole region according to all the gray scale distribution features to obtain the annular gray scale distribution curve of the motor cover plate mounting hole region specifically comprises: Setting an angle parameter for radial projection analysis of the motor cover plate mounting hole region; projecting and comparing the gray scale distribution features of each concentric annular region in the angle direction based on the angle parameter to obtain a local gray scale contrast value of each annular region at the corresponding angle; constructing a two-dimensional gray scale distribution matrix with the radius value of each concentric annular region as the horizontal coordinate and the local gray scale contrast value at the corresponding angle as the vertical coordinate; performing statistical average processing in the angle direction on the two-dimensional gray scale distribution matrix to obtain a radially continuously distributed gray scale contrast sequence; performing curve fitting on the radially continuously distributed gray scale contrast sequence to obtain the annular gray scale distribution curve of the motor cover plate mounting hole region; The radial coordinate constraint of the annular gray scale distribution curve based on the geometric center coordinates of the motor cover plate mounting hole in the reflected light image to generate a confidence annular gray scale distribution curve specifically comprises: Extracting the geometric center coordinates of the motor cover plate mounting hole in the reflected light image as the reference center coordinates; calculating the radial offset of the reference center coordinates and the mounting hole geometric center coordinates corresponding to the annular gray scale distribution curve; modifying the radial coordinates of the annular gray scale distribution curve based on the radial offset to obtain a radial coordinate sequence after offset correction; performing effectiveness screening on the radial coordinate sequence after offset correction based on a preset radial coordinate confidence threshold to obtain radial coordinates meeting the confidence constraint condition; and reconstructing the confidence annular gray scale distribution curve according to the radial coordinates meeting the confidence constraint condition.
2. The method of claim 1, wherein, The annular region segmentation on the scattered light image and the extraction of the gray scale distribution features of a plurality of concentric annular regions with the center of the mounting hole as the center during the annular region segmentation specifically comprise: Positioning the geometric center coordinates of the motor cover plate mounting hole according to the edge profile of the motor cover plate mounting hole in the scattered light image; Setting the inner radius threshold, outer radius threshold and ring width interval parameters of the annular region based on the geometric center coordinates, and then determining the radial distribution range of a plurality of concentric annular regions; According to the radial distribution range, performing annular region segmentation processing on the scattered light image to obtain a plurality of concentric annular regions with the motor cover plate mounting hole center as the center; Extracting the gray scale features of each concentric annular region to obtain the gray scale distribution features corresponding to each concentric annular region.
3. The method of claim 1, wherein, The confidence annular gray scale distribution curve is compared with the preset qualified product gray scale distribution curve in terms of local variance, and then the local variance abnormal section in the confidence annular gray scale distribution curve representing the existence of the hidden cracks of the motor cover plate mounting hole is identified, which specifically includes: Determining a local comparison unit of local variance comparison, the local comparison unit includes a sliding window size and a sliding step length; In each local comparison unit, the local variance value of the confidence annular gray scale distribution curve and the local variance reference value of the corresponding qualified product gray scale distribution curve are calculated; The variance difference between the local variance value and the local variance reference value in each local comparison unit is calculated; According to the variance difference corresponding to each local comparison unit, the local comparison unit exceeding the difference threshold is identified; According to the local comparison units continuously exceeding the difference threshold, the local variance abnormal section representing the existence of the hidden cracks of the motor cover plate mounting hole is determined.
4. The method of claim 1, wherein, The scattered light image of the motor cover plate mounting hole region under dark field illumination condition and the reflected light image under axial vertical illumination condition are collected by an industrial camera.
5. The method of claim 1, wherein, The risk level includes three risk levels of high, medium and low.
6. A visual recognition-based motor cover plate processing detection system for performing the visual recognition-based motor cover plate processing detection method according to any one of claims 1 to 5, characterized by, The system includes: The acquisition module is configured to collect a scattered light image of a motor cover plate mounting hole region under dark field illumination condition and a reflected light image under axial vertical illumination condition; The processing module is configured to perform annular region segmentation on the scattered light image, extract gray scale distribution features of a plurality of concentric annular regions with the mounting hole center as the center during the annular region segmentation, and then perform radial projection analysis on the motor cover plate mounting hole region according to all the gray scale distribution features to obtain an annular gray scale distribution curve of the motor cover plate mounting hole region; The processing module is further configured to perform radial coordinate constraint on the annular gray scale distribution curve based on the geometric center coordinates of the motor cover plate mounting hole in the reflected light image to generate a confidence annular gray scale distribution curve; The processing module is further configured to compare the confidence annular gray scale distribution curve with a preset qualified product gray scale distribution curve in terms of local variance, and then identify a local variance abnormal section in the confidence annular gray scale distribution curve representing the existence of hidden cracks of the motor cover plate mounting hole; The execution module is configured to identify the risk level of the motor cover plate mounting hole region existing hidden cracks based on the spatial distribution characteristics of the local variance abnormal section on the confidence annular gray scale distribution curve.
7. A computer device, comprising: The computer device comprises a memory and a processor, the memory stores a code, and the processor is configured to acquire the code and execute the motor cover plate processing detection method based on visual identification according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising: The computer program is executed by the processor to implement the motor cover plate processing detection method based on visual identification according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method for detecting surface defects of dustproof cover of bearing based on machine vision
CN102636490A
System and method for measuring parameters of measured object based on single longitudinal mode laser
CN114963977A