Camera shell detection method and detection system based on machine vision
Through multi-angle image acquisition and FLANN algorithm grouping processing based on machine vision, combined with feature extraction and contour overlap deduplication technology, the problems of low efficiency and limited field of view of traditional camera shell detection methods are solved, and the efficiency of the camera shell is achieved. Accurate inspection and quality assessment.
Patent Information
- Application Number
- CN202510057003.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2045-01-14
AI Technical Summary
Traditional camera shell detection methods are inefficient, have low reliability in results, and have limited field of view of single-angle detection, making it difficult to cover the defects of complex curved surfaces and hidden areas of the shell.
Using a detection method based on machine vision, image data is collected through a multi-angle image acquisition device, and combined with the FLANN algorithm to group the image data link to realize accurate integration and redundant removal of multi-angle images at the same position in the shell. The defect area and depth are calculated using feature extraction and contour overlap deduplication technology, and surface and internal detection are carried out through constant temperature heating and infrared image acquisition technology, and the fusion detection evaluation value is combined for quality evaluation and early warning.
It improves detection coverage and efficiency, ensures the accuracy of detection results, solves the problems of limited field of vision and low manual detection efficiency in traditional detection methods, and achieves comprehensive and efficient detection of the camera case.
Smart Images

Figure CN119477911A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent detection technology, and in particular to a camera housing detection method and detection system based on machine vision. Background Art
[0002] With the rapid development of autonomous driving technology, cameras, as key perception hardware, undertake important functions such as environmental monitoring, obstacle recognition and road marking detection. To ensure the stability and safety of the autonomous driving system, the quality of the camera housing directly affects the durability and image acquisition performance of the equipment, so its detection needs are becoming increasingly important.
[0003] However, the traditional camera housing inspection method requires operators to visually inspect the housing surface and structure or use simple tools. Although this method is intuitive, it is difficult to meet the needs of modern automated production lines due to its low inspection efficiency, high cost, and subject to human subjective factors. Some automated inspection systems use machine vision methods to capture and analyze images of camera housings. However, the field of view of single-angle inspection is limited, and it is easy to miss inspections, especially for defects in complex curved surfaces and hidden areas of the housing that are difficult to cover.
[0004] Therefore, it is necessary to design a camera housing detection method and detection system based on machine vision to solve the problems existing in the current technology. Summary of the invention
[0005] In view of this, the present invention proposes a camera housing detection method and detection system based on machine vision, aiming to solve the problems of low detection efficiency and low reliability of detection results in current camera housing detection.
[0006] In one aspect, the present invention provides a camera housing detection method based on machine vision, comprising: A plurality of image acquisition devices are provided to acquire image data of the shell to be detected to form an image data chain, and feature extraction is performed on each image data in the image data chain to obtain a feature vector of each image data; Processing the image data chain based on the FLANN (Fast Library for Approximate Nearest Neighbors) algorithm, splitting the image data chain into a plurality of sub-data chains, each of which includes image data of multiple angles at the same position of the shell to be detected; Perform defect recognition on each image data in each of the sub-data chains, remove duplicates by contour overlap, and determine the defect area and defect depth of each image data; Obtaining a surface inspection evaluation of the shell to be inspected according to the defect area and the defect depth; The shell to be detected is heated at a constant temperature, an infrared image of the shell to be detected is collected by an infrared image collection device, and an internal detection evaluation of the shell to be detected is determined according to the infrared image; The overall defect value of the shell to be inspected is obtained according to the surface inspection and evaluation and the internal inspection and evaluation, and an inspection warning is performed according to the overall defect value.
[0007] Furthermore, when extracting features from each image data in the image data chain to obtain a feature vector for each image data, the process includes: Convert the image data into a grayscale image, traverse all pixels in the grayscale image, calculate the grayscale value combination between each pixel and its neighboring pixels, fill the combined statistical results into a matrix, and generate a grayscale co-occurrence matrix; Calculating texture features according to the gray level co-occurrence matrix, wherein the texture features include energy, contrast and homogeneity; The texture feature is normalized to obtain the feature vector.
[0008] Furthermore, when calculating the texture features according to the gray level co-occurrence matrix, it includes: The co-occurrence matrix is defined as: ; Where P(i,j) represents the probability of the occurrence of a pixel pair with grayscale values i and j at a given distance d and direction θ, d represents the distance between the pixel pairs, and θ represents the direction angle; The texture feature is calculated by the following formula: ; ; ; Among them, E represents energy, C represents contrast, and H represents homogeneity.
[0009] Furthermore, the image data chain is processed based on the FLANN algorithm to split the image data chain into a plurality of sub-data chains, including: Extracting a feature vector of each image data in the image data chain to form a feature set; Use FLANN to build a fast search index structure and select KD-Tree as the index type; For each of the feature vectors in the set, use FLANN to find a set of feature vectors similar to it, and divide the images that meet the similar conditions into the same sub-data chain; The similar conditions are: ; Among them, Ti and Tj represent the feature vectors of the i-th sub-image and the j-th sub-image respectively. represents the similarity between feature vectors, k represents the kth component of the feature vector, and d represents the dimension of the feature vector.
[0010] Furthermore, deduplication by contour overlap includes: Calculate the defect outline overlap by taking every two image data in the sub-data chain as a group; ; Among them, C1 and C2 represent the defect contours of the two images in the sub-data chain respectively; Comparing the outline overlap with an overlap threshold; When the contour overlap is greater than the overlap threshold, the defects of the two images are determined to be the same defect and the image data with the larger defect contour is retained; when the contour overlap is less than or equal to the overlap threshold, the defects of the two images are determined to be different defects, the two image data are merged, and the defect contour is superimposed.
[0011] Further, when obtaining the surface inspection evaluation of the shell to be inspected according to the defect area and the defect depth, it includes: ; Among them, S1 represents surface inspection evaluation, Az represents the inspection area of the shell to be inspected, Dr represents the maximum depth of the rth defect, Ar represents the area of the rth defect, Dmax represents the maximum thickness of the shell to be inspected, α represents the nonlinear area factor, and the value range of α is [1.1, 1.5]. Qa and Qb represent the area weight and depth weight respectively, and the value range of Qa is [30, 50], and the value range of Qb is [20, 40]. R represents the total number of surface defects.
[0012] Further, when determining the internal detection evaluation of the shell to be detected according to the infrared image, it includes: Collect infrared images from multiple angles to form three-dimensional temperature data of the shell to be detected; Statistically analyzing the deviation value between each point in the three-dimensional temperature data and the neighboring temperature, and when the deviation value is greater than a deviation value threshold, marking the point as an abnormal point; The deviation value is calculated by the following formula: ; in, Indicate point The temperature deviation value, express The standardized temperature value, Indicate point The set of neighboring points of represents the total number of neighborhood points, Represents the sum of the standardized temperature values of the neighborhood points; Starting from the abnormal point, adjacent pixels are traversed to divide the abnormal area until no new abnormal point is detected and all pixels have been traversed, and each internal defect area and the maximum temperature difference of each internal defect are recorded.
[0013] Further, when determining the internal detection evaluation of the shell to be detected according to the infrared image, it includes: ; Wherein, S2 represents the internal inspection evaluation, At represents the volume of the shell to be inspected, Ae represents the volume of the e-th defect, We represents the mean of the standard temperature of the e-th defect, Wmax represents the maximum standard temperature difference, E represents the total number of internal defects, Qc represents the volume weight, and the value range is [30, 50], and Qd represents the temperature weight, and the value range is [10, 20].
[0014] Furthermore, when performing detection and early warning according to the overall defect value, it includes: The overall defect value is calculated by the following formula: ; Where S represents the overall defect value, S1 represents the surface inspection evaluation, S2 represents the internal inspection evaluation, U1 and U2 represent weight coefficients, and U1+U2=1; The overall defect value is compared with a first preset overall defect value and a second preset overall defect value respectively, the first preset overall defect value is smaller than the second preset overall defect value, and a detection warning is performed according to the comparison result; When the overall defect value is less than or equal to the first preset overall defect value, a first-level defect warning is issued; when the overall defect value is greater than the first preset overall defect value and less than or equal to the second preset overall defect value, a second-level defect warning is issued; when the overall defect value is greater than the second preset overall defect value, a third-level defect warning is issued; the first-level defect warning is greater than the second-level defect warning, and the second-level defect warning is greater than the third-level defect warning.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: by setting up a multi-angle image acquisition device and combining the FLANN algorithm to group the image data chain, the accurate integration and redundancy removal of multi-angle images at the same position of the shell are achieved, effectively improving the detection coverage and efficiency. By using feature extraction and contour overlap deduplication technology, the defect area and depth are accurately calculated to avoid repeated detection and ensure the accuracy of the detection results. Combining constant temperature heating and infrared image acquisition technology, a comprehensive detection system for the surface and interior of the shell is constructed. By fusing the surface detection evaluation value and the internal detection evaluation value, the overall defect value is obtained to form a quality assessment and early warning mechanism. It effectively solves the pain points of traditional single-angle detection, such as limited field of view, high missed detection rate and low efficiency of manual detection.
[0016] On the other hand, the present application also provides a camera housing detection system based on machine vision, which is used to apply the above-mentioned camera housing detection method based on machine vision, including: An image acquisition device, used for acquiring image data of the shell to be detected; A constant temperature heating device, used for performing constant temperature heating on the shell to be inspected; An infrared image acquisition device, used for acquiring an infrared image of the shell to be detected; An acquisition unit, which acquires image data of the shell to be detected to form an image data chain, performs feature extraction on each image data in the image data chain, and obtains a feature vector of each image data; A processing unit processes the image data chain based on a FLANN algorithm, and splits the image data chain into a plurality of sub-data chains, each of which includes image data of multiple angles at the same position of the shell to be detected; An identification unit, which performs defect identification on each image data in each of the sub-data chains, removes duplicates by contour overlap, and determines the defect area and defect depth; A surface evaluation unit, which obtains a surface detection evaluation of the shell to be detected according to the defect area and the defect depth; an internal evaluation unit, which determines an internal detection evaluation of the housing to be detected according to the infrared image; The early warning unit obtains the overall defect value of the shell to be inspected according to the surface inspection and evaluation and the internal inspection and evaluation, and performs inspection and early warning according to the overall defect value.
[0017] It is understandable that the above-mentioned camera housing detection method and system based on machine vision have the same beneficial effects, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings: Figure 1 A flowchart of a camera housing detection method based on machine vision provided by an embodiment of the present invention; Figure 2 A structural block diagram of a camera housing detection system based on machine vision provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features described in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0020] In some embodiments of the present application, see Figure 1 As shown, a camera housing detection method based on machine vision includes: S100: setting up a plurality of image acquisition devices, acquiring image data of the shell to be detected to form an image data chain, performing feature extraction on each image data in the image data chain, and obtaining a feature vector of each image data.
[0021] S200: Processing the image data chain based on the FLANN algorithm, splitting the image data chain into a plurality of sub-data chains, each sub-data chain including image data of multiple angles at the same position of the shell to be detected.
[0022] S300: performing defect identification on each image data in each sub-data chain, removing duplicates by contour overlap, and determining the defect area and defect depth.
[0023] S400: Obtaining a surface inspection evaluation of the shell to be inspected according to the defect area and the defect depth.
[0024] S500: The shell to be inspected is heated at a constant temperature, an infrared image of the shell to be inspected is collected by an infrared image collection device, and an internal inspection evaluation of the shell to be inspected is determined according to the infrared image.
[0025] S600: Obtain an overall defect value of the shell to be inspected according to the surface inspection evaluation and the internal inspection evaluation, and perform inspection warning according to the overall defect value.
[0026] Specifically, in S100, by setting up several image acquisition devices, images of the camera housing to be inspected are collected from multiple angles to form an image data chain. The image acquisition device includes a high-resolution industrial camera to ensure that the detailed features of the housing surface can be captured. Feature extraction is performed on each image data, and the extracted features include texture features (such as grayscale co-occurrence matrix parameters), edge features (such as Canny edge detection) and shape features. Each image is converted into a feature vector for subsequent grouping processing and matching calculation. In S200, the FLANN algorithm is used to split the image data chain into several sub-data chains by comparing the similarity of feature vectors. Each sub-data chain contains image data collected from different angles at the same position. The fast nearest neighbor matching of the FLANN algorithm can efficiently process high-dimensional feature data, reduce computational complexity, and ensure the accuracy of the grouping results. In S300, defect recognition is performed on the images in each sub-data chain, and the contour and area of the defect are extracted using a deep learning model (such as a defect classification model based on a convolutional neural network) or a traditional visual algorithm (such as image segmentation and edge detection) during the recognition process. Subsequently, the overlap of contours is calculated to eliminate repeated calculations of the same defect, ensuring that each defect is only counted once in the analysis. At the same time, the defect depth information is calibrated to obtain more accurate surface defect parameters. In S400, the defect area and defect depth calculated in S300 are combined to generate a surface detection evaluation value. By setting weight factors, it is ensured that the evaluation results can reflect the impact of defects on the overall quality. In S500, the shell to be inspected is heated at a constant temperature (usually achieved by a hot plate or infrared heating device), and the temperature distribution data is collected using an infrared imaging device. The infrared image is analyzed, and internal defects are identified by the distribution and number of abnormal temperature points, and the internal defect area and depth are calculated to form an internal detection evaluation value. In S600, the overall defect value of the shell is calculated by fusing the surface detection evaluation value and the internal detection evaluation value, and finally it is determined whether the quality of the shell meets the standard. If the overall defect value exceeds the preset threshold, an early warning prompt is generated.
[0027] It is understandable that the camera housing is comprehensively and efficiently inspected for surface and internal defects by combining multi-angle machine vision and infrared thermal imaging technology. The application of the FLANN algorithm improves the efficiency of multi-angle image grouping and avoids repeated calculations of the same defect; contour overlap deduplication ensures the accuracy and precision of the detection results. At the same time, constant temperature heating combined with infrared image analysis realizes non-destructive internal defect detection, making up for the shortcomings of traditional detection methods in insufficient recognition of internal structures. By combining surface and internal evaluation values, full coverage and intelligent quality inspection is achieved.
[0028] In some embodiments of the present application, when performing feature extraction on each image data in the image data chain to obtain a feature vector of each image data, the process includes: Convert the image data into a grayscale image, traverse all pixels in the grayscale image, calculate the grayscale value combination between each pixel and its neighboring pixels, fill the combined statistical results into the matrix, and generate a grayscale co-occurrence matrix.
[0029] The texture features are calculated based on the gray-level co-occurrence matrix, and the texture features include energy, contrast and homogeneity.
[0030] The texture features are normalized to obtain the feature vector.
[0031] In some embodiments of the present application, when calculating texture features according to the gray level co-occurrence matrix, it includes: The co-occurrence matrix is defined as: ; Among them, P(i,j) represents the probability of the occurrence of a pixel pair with grayscale values i and j at a given distance d and direction θ, d represents the spacing between pixel pairs, and θ represents the direction angle.
[0032] The texture features are calculated by the following formula: ; ; ; Among them, E represents energy, C represents contrast, and H represents homogeneity.
[0033] Specifically, in image processing, the gray-level co-occurrence matrix is a texture feature description method. Its core idea is to quantify the spatial distribution characteristics of texture by counting the spatial relationship between gray values in the image. Convert the input image to a grayscale image to reduce computational complexity. The pixel value in the grayscale image is an integer between 0 and 255, representing the brightness of the pixel. Traverse all pixels in the grayscale image and calculate the gray value combination between each pixel and its neighboring pixels. For example, when the direction angle is 0° (horizontal direction) and the spacing is 1, count the number of occurrences of gray values i and j in all adjacent pixel pairs. Generate a two-dimensional matrix based on the statistical results, where the matrix element P(i,j) represents the probability of the occurrence of a pixel pair with gray values i and j at a given distance and direction. The size of the matrix is L×L, where L is the number of gray levels (usually 256). Multiple texture features are calculated based on the gray-level co-occurrence matrix to capture different texture properties of the image. In order to eliminate the influence of different eigenvalue magnitudes, the energy, contrast and homogeneity are normalized, and the eigenvalues are scaled to the [0,1] interval using a linear normalization method to generate eigenvectors for subsequent processing.
[0034] It can be understood that the grayscale distribution pattern of the image is quantified by the grayscale co-occurrence matrix, and the texture features such as energy, contrast and homogeneity are further calculated to fully describe the texture characteristics of the image. These feature extraction methods combine probability statistics and spatial grayscale distribution relationships to capture subtle changes in surface texture and provide powerful discrimination capabilities for defect detection. In addition, normalization eliminates the dimensional differences between features, ensures the validity and consistency of feature vectors, and improves the performance of subsequent classification algorithms. Through texture feature extraction based on the grayscale co-occurrence matrix, the texture details of the camera housing image are effectively captured. Compared with traditional grayscale or edge features, texture features have stronger noise resistance and discrimination, especially when detecting small scratches, protrusions or irregular textures on the surface. Feature normalization further improves the accuracy and robustness of subsequent feature matching and classification algorithms.
[0035] In some embodiments of the present application, when the image data chain is processed based on the FLANN algorithm and the image data chain is split into several sub-data chains, it includes: The feature vector of each image data in the image data chain is extracted to form a feature set.
[0036] Use FLANN to build a fast search index structure and select KD-Tree as the index type.
[0037] For each feature vector in the set, FLANN is used to find a set of feature vectors similar to it, and images that meet similar conditions are divided into the same sub-data chain.
[0038] Similar conditions are: ; Among them, Ti and Tj represent the feature vectors of the i-th sub-image and the j-th sub-image respectively. represents the similarity between feature vectors, k represents the kth component of the feature vector, and d represents the dimension of the feature vector.
[0039] In some embodiments of the present application, deduplication by contour overlap includes: Every two image data in the sub-data chain are grouped together to calculate the defect contour overlap.
[0040] ; Among them, C1 and C2 represent the defect contours of the two images in the sub-data chain respectively.
[0041] Compare the contour overlap with the overlap threshold.
[0042] When the contour overlap is greater than the overlap threshold, the defects of the two images are determined to be the same defect and the image data with the larger defect contour is retained. When the contour overlap is less than or equal to the overlap threshold, the defects of the two images are determined to be different defects, the two image data are merged, and the defect contours are superimposed.
[0043] In some embodiments of the present application, obtaining a surface inspection evaluation of a shell to be inspected according to a defect area and a defect depth includes: ; Among them, S1 represents surface inspection evaluation, Az represents the inspection area of the shell to be inspected, Dr represents the maximum depth of the rth defect, Ar represents the area of the rth defect, Dmax represents the maximum thickness of the shell to be inspected, α represents the nonlinear area factor, and the value range of α is [1.1, 1.5]. Qa and Qb represent the area weight and depth weight respectively, and the value range of Qa is [30, 50], and the value range of Qb is [20, 40]. R represents the total number of surface defects.
[0044] It is understandable that the FLANN algorithm realizes multi-angle image grouping, ensuring that multi-view images of the same position are classified into the same sub-data chain, solving the problem of missed detection caused by insufficient viewing angle in traditional methods. Combined with contour overlap deduplication, repeated calculation of the same defect is avoided, and the accuracy of the detection results is improved. The surface detection evaluation formula introduces nonlinear factors and weight adjustment mechanisms, which can dynamically adapt to the influence of defect area and depth, providing a quantitative basis for automated quality evaluation.
[0045] In some embodiments of the present application, when determining the internal detection evaluation of the housing to be detected according to the infrared image, it includes: Collect infrared images from multiple angles to form three-dimensional temperature data of the shell to be inspected.
[0046] The deviation value between each point in the three-dimensional temperature data and the neighboring temperature is statistically analyzed. When the deviation value is greater than the deviation value threshold, the point is marked as an abnormal point.
[0047] The deviation value is calculated by the following formula: ; in, Indicate point The temperature deviation value, Indicate point The standardized temperature value, Indicate point The set of neighboring points of represents the total number of neighborhood points, Represents the sum of the standardized temperature values of the neighborhood points.
[0048] Starting from an abnormal point, the adjacent pixels are traversed to divide the abnormal area until no new abnormal points are detected and all pixels have been traversed, and the area of each internal defect and the maximum temperature difference of each internal defect are recorded.
[0049] In some embodiments of the present application, when determining the internal detection evaluation of the housing to be detected according to the infrared image, it includes: ; Wherein, S2 represents the internal inspection evaluation, At represents the volume of the shell to be inspected, Ae represents the volume of the e-th defect, We represents the mean of the standard temperature of the e-th defect, Wmax represents the maximum standard temperature difference, E represents the total number of internal defects, Qc represents the volume weight, and the value range is [30, 50], and Qd represents the temperature weight, and the value range is [10, 20].
[0050] It can be understood that by reconstructing the three-dimensional temperature distribution data using infrared images, the thermal anomaly characteristics inside the shell are fully captured, and the internal defect area and its degree of thermal conductivity anomaly are accurately located by marking the abnormal points and dividing the area with deviation values. The evaluation formula takes into account the influence of defect volume and temperature anomaly. In addition, this embodiment realizes non-destructive testing from external temperature collection to internal defect positioning, which improves the detection accuracy and efficiency.
[0051] In some embodiments of the present application, when performing detection and early warning according to the overall defect value, it includes: The overall defect value is calculated by the following formula: ; Among them, S represents the overall defect value, S1 represents the surface inspection evaluation, S2 represents the internal inspection evaluation, U1 and U2 represent weight coefficients, and U1+U2=1.
[0052] The overall defect value is compared with the first preset overall defect value and the second preset overall defect value respectively. If the first preset overall defect value is smaller than the second preset overall defect value, a detection warning is performed according to the comparison result.
[0053] When the overall defect value is less than or equal to the first preset overall defect value, a first-level defect warning is issued. When the overall defect value is greater than the first preset overall defect value and less than or equal to the second preset overall defect value, a second-level defect warning is issued. When the overall defect value is greater than the second preset overall defect value, a third-level defect warning is issued. The first-level defect warning is greater than the second-level defect warning, and the second-level defect warning is greater than the third-level defect warning.
[0054] It can be understood that by combining the surface inspection evaluation value and the internal inspection evaluation value, a comprehensive shell quality inspection result is provided, and the defects of different degrees are effectively distinguished by weighted calculation and warning threshold. Compared with traditional inspection methods, quantitative defect evaluation is realized, the warning level is more detailed, and the intelligence and reliability of the automated inspection system are improved. In addition, the solution can flexibly adjust the weights and thresholds to meet various inspection needs.
[0055] In the above embodiment, by setting up a multi-angle image acquisition device and combining the FLANN algorithm to group the image data chain, the accurate integration and redundancy removal of multi-angle images of the same position of the shell are achieved, effectively improving the detection coverage and efficiency. By using feature extraction and contour overlap deduplication technology, the defect area and depth are accurately calculated to avoid repeated detection and ensure the accuracy of the detection results. Combining constant temperature heating and infrared image acquisition technology, a comprehensive detection system for the surface and interior of the shell is constructed. By fusing the surface detection evaluation value and the internal detection evaluation value, the overall defect value is obtained to form a quality assessment and early warning mechanism. It effectively solves the pain points of traditional single-angle detection, such as limited field of view, high missed detection rate and low efficiency of manual detection.
[0056] In another preferred embodiment based on the above embodiment, refer to Figure 2 As shown, this embodiment provides a camera housing detection system based on machine vision, which is used to apply the above-mentioned camera housing detection method based on machine vision, including: An image acquisition device, used for acquiring image data of the shell to be detected; A constant temperature heating device, used for constant temperature heating of the shell to be tested; An infrared image acquisition device, used for acquiring an infrared image of the shell to be inspected; An acquisition unit, which acquires image data of the shell to be detected to form an image data chain, performs feature extraction on each image data in the image data chain, and obtains a feature vector of each image data; A processing unit processes the image data chain based on the FLANN algorithm, and splits the image data chain into several sub-data chains, each of which includes image data of multiple angles at the same position of the shell to be detected; The recognition unit performs defect recognition on each image data in each sub-data chain, removes duplicates through contour overlap, and determines the defect area and defect depth; A surface evaluation unit, which obtains a surface inspection evaluation of the shell to be inspected according to the defect area and defect depth; An internal evaluation unit, which determines an internal detection evaluation of the housing to be detected based on the infrared image; The early warning unit obtains the overall defect value of the shell to be inspected based on the surface inspection evaluation and the internal inspection evaluation, and performs inspection and early warning based on the overall defect value.
[0057] It is understandable that by setting up a multi-angle image acquisition device and combining the FLANN algorithm to group the image data chain, the accurate integration and redundancy removal of multi-angle images at the same position of the shell are achieved, effectively improving the detection coverage and efficiency. The defect area and depth are accurately calculated using feature extraction and contour overlap deduplication technology to avoid repeated detection and ensure the accuracy of the detection results. Combining constant temperature heating and infrared image acquisition technology, a comprehensive detection system for the surface and interior of the shell is constructed. By fusing the surface detection evaluation value and the internal detection evaluation value, the overall defect value is obtained to form a quality assessment and early warning mechanism. It effectively solves the pain points of traditional single-angle detection, such as limited field of view, high missed detection rate, and low efficiency of manual detection.
[0058] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0059] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0060] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0061] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A camera housing detection method based on machine vision, characterized in that: include: A plurality of image acquisition devices are provided to acquire image data of the shell to be detected to form an image data chain, and feature extraction is performed on each image data in the image data chain to obtain a feature vector of each image data; Processing the image data chain based on the FLANN algorithm, splitting the image data chain into a plurality of sub-data chains, each of which includes image data of multiple angles at the same position of the shell to be detected; Perform defect recognition on each image data in each of the sub-data chains, remove duplicates by contour overlap, and determine the defect area and defect depth; Obtaining a surface inspection evaluation of the shell to be inspected according to the defect area and the defect depth; The shell to be detected is heated at a constant temperature, an infrared image of the shell to be detected is collected by an infrared image collection device, and an internal detection evaluation of the shell to be detected is determined according to the infrared image; The overall defect value of the shell to be inspected is obtained according to the surface inspection and evaluation and the internal inspection and evaluation, and an inspection warning is performed according to the overall defect value.
2. The camera housing detection method based on machine vision according to claim 1, characterized in that: When extracting features from each image data in the image data chain to obtain a feature vector for each image data, the process includes: Convert the image data into a grayscale image, traverse all pixels in the grayscale image, calculate the grayscale value combination between each pixel and its neighboring pixels, fill the combined statistical results into a matrix, and generate a grayscale co-occurrence matrix; Calculating texture features according to the gray level co-occurrence matrix, wherein the texture features include energy, contrast and homogeneity; The texture feature is normalized to obtain the feature vector.
3. The camera housing detection method based on machine vision according to claim 2, characterized in that: When calculating the texture features according to the gray level co-occurrence matrix, it includes: The co-occurrence matrix is defined as: ; Where P(i,j) represents the probability of the occurrence of a pixel pair with grayscale values i and j at a given distance d and direction θ, d represents the distance between the pixel pairs, and θ represents the direction angle; The texture feature is calculated by the following formula: ; ; ; Among them, E represents energy, C represents contrast, and H represents homogeneity.
4. The camera housing detection method based on machine vision according to claim 1, characterized in that: Processing the image data chain based on the FLANN algorithm and splitting the image data chain into a plurality of sub-data chains includes: Extracting a feature vector of each image data in the image data chain to form a feature set; Use FLANN to build a fast search index structure and select KD-Tree as the index type; For each of the feature vectors in the set, use FLANN to find a set of feature vectors similar to it, and divide the images that meet the similar conditions into the same sub-data chain; The similar conditions are: ; Among them, Ti and Tj represent the feature vectors of the i-th sub-image and the j-th sub-image respectively. represents the similarity between feature vectors, k represents the kth component of the feature vector, and d represents the dimension of the feature vector.
5. The camera housing detection method based on machine vision according to claim 1, characterized in that: When deduplication is performed by contour overlap, it includes: Calculate the defect outline overlap by taking every two image data in the sub-data chain as a group; ; Among them, C1 and C2 represent the defect contours of the two images in the sub-data chain respectively; Comparing the outline overlap with an overlap threshold; When the contour overlap is greater than the overlap threshold, the defects of the two images are determined to be the same defect and the image data with the larger defect contour is retained; when the contour overlap is less than or equal to the overlap threshold, the defects of the two images are determined to be different defects, the two image data are merged, and the defect contour is superimposed.
6. The camera housing detection method based on machine vision according to claim 5, characterized in that: When obtaining the surface inspection evaluation of the shell to be inspected according to the defect area and the defect depth, it includes: ; Among them, S1 represents surface inspection evaluation, Az represents the inspection area of the shell to be inspected, Dr represents the maximum depth of the rth defect, Ar represents the area of the rth defect, Dmax represents the maximum thickness of the shell to be inspected, α represents the nonlinear area factor, and the value range of α is [1.1, 1.5]. Qa and Qb represent the area weight and depth weight respectively, and the value range of Qa is [30, 50], and the value range of Qb is [20, 40]. R represents the total number of surface defects.
7. The camera housing detection method based on machine vision according to claim 6, characterized in that: When determining the internal detection evaluation of the housing to be detected according to the infrared image, it includes: Collect infrared images from multiple angles to form three-dimensional temperature data of the shell to be detected; Statistically analyzing the deviation value between each point in the three-dimensional temperature data and the neighboring temperature, and when the deviation value is greater than a deviation value threshold, marking the point as an abnormal point; The deviation value is calculated by the following formula: ; in, Indicate point The temperature deviation value, express The standardized temperature value, Indicate point The set of neighboring points of represents the total number of neighborhood points, Represents the sum of the standardized temperature values of the neighborhood points; Starting from the abnormal point, adjacent pixels are traversed to divide the abnormal area until no new abnormal point is detected and all pixels have been traversed, and each internal defect area and the maximum temperature difference of each internal defect are recorded.
8. The camera housing detection method based on machine vision according to claim 7, characterized in that: When determining the internal detection evaluation of the housing to be detected according to the infrared image, it includes: ; Wherein, S2 represents the internal inspection evaluation, At represents the volume of the shell to be inspected, Ae represents the volume of the e-th defect, We represents the mean of the standard temperature of the e-th defect, Wmax represents the maximum standard temperature difference, E represents the total number of internal defects, Qc represents the volume weight, and the value range is [30, 50], and Qd represents the temperature weight, and the value range is [10, 20].
9. The camera housing detection method based on machine vision according to claim 8, characterized in that: When the detection and early warning are performed according to the overall defect value, it includes: The overall defect value is calculated by the following formula: ; Where S represents the overall defect value, S1 represents the surface inspection evaluation, S2 represents the internal inspection evaluation, U1 and U2 represent weight coefficients, and U1+U2=1; The overall defect value is compared with a first preset overall defect value and a second preset overall defect value respectively, the first preset overall defect value is smaller than the second preset overall defect value, and a detection warning is performed according to the comparison result; When the overall defect value is less than or equal to the first preset overall defect value, a first-level defect warning is issued; when the overall defect value is greater than the first preset overall defect value and less than or equal to the second preset overall defect value, a second-level defect warning is issued; when the overall defect value is greater than the second preset overall defect value, a third-level defect warning is issued; the first-level defect warning is greater than the second-level defect warning, and the second-level defect warning is greater than the third-level defect warning.
10. A camera housing detection system based on machine vision, applied to the camera housing detection method based on machine vision according to any one of claims 1 to 9, characterized in that: include: An image acquisition device, used for acquiring image data of the shell to be detected; A constant temperature heating device, used for performing constant temperature heating on the shell to be inspected; An infrared image acquisition device, used for acquiring an infrared image of the shell to be detected; An acquisition unit, which acquires image data of the shell to be detected to form an image data chain, performs feature extraction on each image data in the image data chain, and obtains a feature vector of each image data; A processing unit processes the image data chain based on a FLANN algorithm, and splits the image data chain into a plurality of sub-data chains, each of which includes image data of multiple angles at the same position of the shell to be detected; An identification unit, which performs defect identification on each image data in each of the sub-data chains, removes duplicates by contour overlap, and determines the defect area and defect depth; A surface evaluation unit, which obtains a surface detection evaluation of the shell to be detected according to the defect area and the defect depth; an internal evaluation unit, which determines an internal detection evaluation of the housing to be detected according to the infrared image; The early warning unit obtains the overall defect value of the shell to be inspected according to the surface inspection and evaluation and the internal inspection and evaluation, and performs inspection and early warning according to the overall defect value.
Citation Information
Patent Citations
Image-based defect detection method and device, electronic equipment and storage medium
CN117094974A
Data processing method and system for product appearance detection
CN118521225A
Isolated mineral insulated flexible cable detection method and system
CN119044205A
Bridge steel structure welding quality detection device and method
CN119107572A
Substation equipment defect detection system and method based on visual identification
CN119130982A