A defect detection system based on split camera array
By designing a defect detection system based on split camera array, the problem of mismatch between imaging parameter deviation and image information when shooting the same target is solved, the accurate stitching and defect detection of images are achieved, and the quality and stability of the captured images are improved.
Patent Information
- Application Number
- CN202411761064.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-12-03
AI Technical Summary
When the split camera array captures the same target, there is a problem of imaging parameter deviation and image information mismatch, which affects the accuracy of defect detection.
A defect detection system based on split camera array is designed, including an image subcontracting module, a position inspection module, a deviation restriction module, a splicing transformation module and a defect detection module. The system ensures the accuracy of image stitching and detects defects in the image through steps such as image subcontracting, position inspection, deviation limiting and stitching transformation.
Accurate stitching and defect detection of split camera array images is realized, the quality and stability of the captured images are improved, and the workload of later repair is reduced.
Smart Images

Figure CN119254949B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of shooting control, and in particular to a defect detection system based on a split camera array. Background Art
[0002] The split camera array is a camera system that uses multiple independent cameras to form an array. Each camera can work independently. Their image data is merged together through software algorithms to achieve higher resolution and wider viewing angle range imaging effects. It is widely used in wide-angle shooting, augmented reality, 3D measurement and other fields;
[0003] When a split camera array shoots the same target, it is necessary to ensure that the field of view and imaging parameters of each camera are consistent, otherwise the image information may not match or be misaligned, affecting the accuracy of defect detection. When there is a deviation in the imaging parameters of each camera, it is difficult to accurately stitch images of different resolutions.
[0004] In actual operation, the shooting position and shooting angle of independent cameras are easily affected by external forces and slightly offset, resulting in angle deviation of image shooting and deformation of the stitched image. In addition, there may be occlusion or shooting noise in the picture when the camera is shooting, resulting in the image taken by the split camera array being unable to fully capture all the information of the target, causing image defects and affecting the shooting effect. Summary of the invention
[0005] The object of the present invention is to provide a defect detection system based on a split camera array to solve the problems raised in the above background technology.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a defect detection system based on a split camera array, comprising: an image subcontracting module, a position inspection module, a deviation limiting module, a splicing transformation module and a defect detection module;
[0007] The image subcontracting module is used to establish a coordinate system for the shooting environment, determine the setting coordinates and main optical axis direction of each split camera in the array, select the main optical axis direction of one camera as the main direction, arrange the cameras counterclockwise according to the main direction, and combine the images taken by the cameras at adjacent positions at the same time into image pairs, and store the image with higher pixel in the image pair as the first image, and store the image with lower pixel as the second image;
[0008] The position inspection module is used to compare the color of each pixel in the image with the standard color spectrum, and use the position of the inspection result in the standard color spectrum as the chromaticity of the pixel point. According to the camera's viewing angle deviation, the mapping position of the rightmost column of the first image in the second image is calculated. With the mapping position as the center, all the pixels within a preset radius are taken as the overall set, and the pixels in the rightmost column of the first image are taken as the sample set for t-test. If the inspection level is lower than the threshold, it is judged that the alignment is normal, otherwise it is abnormal.
[0009] The deviation limiting module is used to arrange the pixel points in the overall set in descending order according to the distance between the pixel points and the mapping position, remove a fixed number of pixel points in the overall set in turn and repeat the inspection until the inspection level reaches the minimum value, and output the remaining pixel points in the overall set as feature points;
[0010] The splicing transformation module is used to use a line segment fitting tool to fit feature line segments in feature points with a resolution interval of pixel points as a fixed unit, transform the feature line segments so that the feature line segments coincide with the mapping line segments, process the first image according to the same transformation, and splice the first image and the second image with the feature line segments as the splicing line, and output a synthesized image;
[0011] The defect detection module is used to extract the coordinates of each pixel in each row and column of the synthetic image, construct a discrete function of the pixel coordinate sequence number and chromaticity, perform central difference on the discrete function, and check the continuity of the difference function. Points with a continuity interval less than a threshold are used as pre-selected noise points. If there are adjacent noise points in adjacent rows and columns, it is judged that there is an occlusion, otherwise it is judged that there is a shooting defect.
[0012] Further, the image subcontracting module includes: an array positioning unit and an inter-frame combining unit;
[0013] The array positioning unit is used to determine the position and shooting direction of each camera in the array, and sort the cameras according to the shooting direction;
[0014] The inter-frame combination unit is used to extract and pack the images taken by adjacent cameras at the same time and store them in the database as image pairs.
[0015] Furthermore, the position verification module includes: a pixel quantization unit, an edge extraction unit and a probability verification unit;
[0016] The pixel quantization unit is used to quantize the color of each pixel in the image and mark the coordinates of the pixel in a digital form;
[0017] The edge extraction unit is used to calculate the mapping position of the edge of the first image in the second image, and extract pixel points within a fixed range around the mapping position to construct a general set;
[0018] The probability testing unit is used to test the significance of edge pixels in the overall set by taking edge pixels as a sample set.
[0019] Further, the deviation limiting module includes: a sample replacement unit and a feature scatter unit;
[0020] The sample replacement unit is used to replace the pixels in the overall set in sequence until the pixel is taken out to increase the inspection level;
[0021] The feature scatter point unit is used to use the remaining pixel points in the overall set as feature points and mark the positions of the feature points in the free space.
[0022] Furthermore, the splicing transformation module includes: a line segment fitting unit and a deflection synthesis unit;
[0023] The line segment fitting unit is used to fit all feature points in free space using Matlab to form a splicing line;
[0024] The deflection synthesis unit is used to synthesize the images in the image pair according to the splicing line and output the synthesized image.
[0025] Further, the defect detection module includes: a coordinate transformation unit, a center difference unit and a defect output unit;
[0026] The coordinate transformation unit is used to extract the pixel points of each row and each column of the synthesized image and generate a sequence reflecting the chromaticity of the pixel points;
[0027] The central difference unit is used to generate a discrete function for each sequence and calculate the central difference function of the discrete function;
[0028] The defect output unit is used to check the continuity of the differential function, output the continuity discontinuity point as a pre-selected noise point, and determine the defect type of the pre-selected noise point.
[0029] A defect detection method based on a split camera array comprises the following steps:
[0030] Step S1. Identify the position and main optical axis direction of each split camera in the coordinate system, select the shooting direction of one camera as the main direction, arrange the cameras in a counterclockwise order according to the main direction, and combine the images taken by the cameras at adjacent positions at the same time into an image pair;
[0031] Step S2. Verify the chromaticity of each pixel in the image, calculate the mapping position of the edge pixel column of the first image in the image pair in the second image according to the camera's viewing angle deviation, take the pixel points in the edge pixel column of the first image as samples, and perform significance test on all the pixel points within a preset radius of the mapping position as a whole;
[0032] Step S3. When the inspection level is higher than the threshold, a fixed number of pixels are removed from the overall set in order of distance, and the inspection is repeated until the inspection level no longer decreases, and the remaining pixels are output as feature pixels;
[0033] Step S4. Perform distribution fitting on all feature pixel points to obtain stitching line segments, use the stitching line segments as actual mapping line segments of the first image in the second image, perform image stitching synthesis, and output the synthesized image;
[0034] Step S5. Extract the pixel points of each row and column in the composite image to obtain a verification sequence reflecting the chromaticity of the pixel points, generate a discrete function for each verification sequence, perform central difference on the discrete function, output the points with difference function values higher than the threshold as noise points, and determine the type of noise points based on the presence of noise points in adjacent rows and columns.
[0035] Further, step S1 includes:
[0036] Step S11. Establish a three-dimensional coordinate system at the shooting scene, identify the position coordinates of each camera in the split camera array in the coordinate system, and generate the direction vector of the camera by taking the direction facing the camera lens as the positive direction and the camera focal length as the vector modulus;
[0037] Step S12. According to the main shooting content of the camera array, the direction facing the shooting object is selected as the positive direction, and the vector with a unit length of the modulus length is selected as the main direction vector. The counterclockwise horizontal angle between the main direction vector and the direction vectors of each camera is calculated, and the cameras are arranged in ascending order according to the horizontal angle to form a camera sequence.
[0038] Step S13. Combine every two adjacent cameras in the camera sequence to form n-1 camera combinations, where n is the number of split cameras in the array, allocate separate storage space for the cameras in each combination, store images taken by the two cameras in the combination at the same time, and combine them into image pairs;
[0039] The image with higher pixel count in the image pair is stored as the first image, and the image with lower pixel count is stored as the second image.
[0040] Further, step S2 includes:
[0041] Step S21. Select an edge pixel column of the first image, the edge pixel column being located in the overlapped image between the first image and the second image, extract the chromatographic frequency of each pixel point in the edge pixel column, and use the position of the chromatographic frequency in the standard spectroscopic color spectrum as the chromaticity of the pixel point;
[0042] Step S22. Coordinate each pixel point in the edge pixel column to obtain coordinates Q (a, b, c), where a, b and c represent the row position, column position and chromaticity of the pixel point, respectively, and calculate the mapping position P (A, B, C) of the pixel point, where A and B represent the horizontal and vertical coordinates of the mapping point of the pixel point in the second image, respectively, and C represents the actual chromaticity at the position (A, B) of the second image;
[0043] Where A=r·cosθ1-d1+a, B=r·cosθ2-d2+b, r represents the distance between the two cameras taking the first and second images, θ1 and θ2 represent the horizontal angle and vertical angle between the principal optical axes of the two cameras, respectively, and d1 and d2 represent the number of pixel rows and pixel columns in the first image, respectively;
[0044] Step S23. Using the chromaticity of each pixel in the edge pixel column, a sample set {c1, c2, ..., cm} is formed, where m is the number of pixels in the edge pixel column, and cm is the chromaticity of the mth pixel in the edge pixel column;
[0045] Taking the mapping position of each pixel in the edge pixel column in the edge image as the center, obtain the chromaticity of all pixels within the preset radius to form a total set {x1, x2, …, xu}, where u is the number of pixels within the preset radius, and xu is the chromaticity of the u-th pixel;
[0046] Step S24. Perform a significance test on the sample set:
[0047] ;
[0048] Among them, t represents the test level, and Represent the average values of the elements in the sample set and the overall set respectively, and xi represents the i-th element in the overall set.
[0049] Further, step S3 includes:
[0050] Step S31. Determine whether the inspection level is higher than a threshold value. If it is not higher than the threshold value, perform original proportion splicing on the first image and the second image, and output a composite image. If it is higher than the threshold value, go to step S32;
[0051] Step S32. Remove elements from the overall set in descending order of the distance between the pixel point and the nearest mapping position. Each time k elements are removed, a significance test is performed again with the current overall set. If the test level is reduced, k elements are removed here, where k is a preset accuracy. If the test level is increased, all elements in the current overall set are output, and the pixel points corresponding to the elements are marked as feature pixels.
[0052] Further, step S4 includes:
[0053] Step S41. Use a straight line fitting tool to fit the distribution trend of the characteristic pixel points with a line segment, output the fitting result, and use the fitting result line segment as the image splicing line segment;
[0054] Step S42: Using the edge pixel columns of the first image as reference columns, the edge pixel columns are made to coincide with the stitching line segments in the second image, and the stitched image is synthesized and output.
[0055] Further, step S5 includes:
[0056] Step S51. Extract the pixels of each row and column in the composite image, and arrange the chromaticity of the pixels in the order of the rows and columns to form a verification sequence [y1, y2, ..., yj, ..., yg], where g is the number of pixels in the row or column, j is the sequence number, and j∈{1, 2, ..., g}, yj is the chromaticity of the jth pixel in the row or column, and perform steps S52-S53 for each verification sequence;
[0057] Step S52: Generate a discrete function Y(j) so that Y(j)=yj, and perform central difference on the function Y(g):
[0058] ;
[0059] Among them, Y'(j) is the differential function of the discrete function Y(j), and h is the differential accuracy;
[0060] Step S53. Substitute all the values that j can obtain into the differential function Y'(j). When the value of Y'(j) is higher than the preset threshold, the value of the independent variable j at this time is output as an outlier, and the pixel point corresponding to the outlier is marked as a noise point. If noise points exist in adjacent rows or columns at the same time, it is judged that there is an occlusion, otherwise it is judged that there is a shooting defect.
[0061] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0062] 1. The present invention can combine the captured images of cameras at adjacent positions into a splicing pair, and perform a t-test with edge pixels of the first frame image as a sample set and corresponding column pixels of the second frame image as a total set, thereby identifying whether there is an angle deviation in the captured image, ensuring image clarity and stability, and improving the quality of the captured image.
[0063] 2. The present invention can replace pixel points from the corresponding column of the second frame image in sequence to make the inspection result of the remaining pixel points the highest, perform straight line fitting with the replacement points as reference points, deflect the two frames of images according to the stitching line, and restore the source image when the camera has an angle deviation. While improving the compatibility of equipment, it reduces the impact of camera shake on image quality, reduces the workload of later repair, and ensures the reliability of the shooting process.
[0064] 3. The present invention can construct a discrete function of pixel coordinate position and chromaticity, perform central difference on the discrete function, test the continuity of the difference function, identify defective noise and obstructions in the split camera shooting process, save time for image correction and repair, and help improve the overall visual effect of the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0066] Figure 1 It is a structural schematic diagram of a defect detection system based on a split camera array of the present invention;
[0067] Figure 2 It is a schematic diagram of the steps of a corresponding method of a defect detection system based on a split camera array of the present invention. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] See also Figure 1 ,The present invention provides a technical solution: a defect detection system based on a split camera array, comprising: an image subcontracting module, a position inspection module, a deviation limiting module, a splicing transformation module and a defect detection module;
[0070] The image subcontracting module is used to establish a coordinate system for the shooting environment, determine the setting coordinates and main optical axis direction of each split camera in the array, select the main optical axis direction of one camera as the main direction, arrange the cameras counterclockwise according to the main direction, and combine the images taken by the cameras at adjacent positions at the same time into image pairs, and store the image with higher pixel in the image pair as the first image, and store the image with lower pixel as the second image;
[0071] The image subcontracting module comprises: an array positioning unit and an inter-frame combining unit;
[0072] The array positioning unit is used to determine the position and shooting direction of each camera in the array, and sort the cameras according to the shooting direction;
[0073] The inter-frame combination unit is used to extract and pack the images taken by adjacent cameras at the same time and store them in the database as image pairs.
[0074] The position inspection module is used to compare the color of each pixel in the image with the standard color spectrum, and use the position of the inspection result in the standard color spectrum as the chromaticity of the pixel point. According to the camera's viewing angle deviation, the mapping position of the rightmost column of the first image in the second image is calculated. With the mapping position as the center, all the pixels within a preset radius are taken as the overall set, and the pixels in the rightmost column of the first image are taken as the sample set for t-test. If the inspection level is lower than the threshold, it is judged that the alignment is normal, otherwise it is abnormal.
[0075] The position verification module includes: a pixel quantization unit, an edge extraction unit and a probability verification unit;
[0076] The pixel quantization unit is used to quantize the color of each pixel in the image and mark the coordinates of the pixel in a digital form;
[0077] The edge extraction unit is used to calculate the mapping position of the edge of the first image in the second image, and extract pixel points within a fixed range around the mapping position to construct a general set;
[0078] The probability testing unit is used to test the significance of edge pixels in the overall set by taking edge pixels as a sample set.
[0079] The deviation limiting module is used to arrange the pixel points in the overall set in descending order according to the distance between the pixel points and the mapping position, remove a fixed number of pixel points in the overall set in turn and repeat the inspection until the inspection level reaches the minimum value, and output the remaining pixel points in the overall set as feature points;
[0080] The deviation limiting module includes: a sample replacement unit and a feature scatter point unit;
[0081] The sample replacement unit is used to replace the pixels in the overall set in sequence until the pixel is taken out to increase the inspection level;
[0082] The feature scatter point unit is used to use the remaining pixel points in the overall set as feature points and mark the positions of the feature points in the free space.
[0083] The splicing transformation module is used to use a line segment fitting tool to fit feature line segments in feature points with a resolution interval of pixel points as a fixed unit, transform the feature line segments so that the feature line segments coincide with the mapping line segments, process the first image according to the same transformation, and splice the first image and the second image with the feature line segments as the splicing line, and output a synthesized image;
[0084] The splicing transformation module includes: a line segment fitting unit and a deflection synthesis unit;
[0085] The line segment fitting unit is used to fit all feature points in free space using Matlab to form a splicing line;
[0086] The deflection synthesis unit is used to synthesize the images in the image pair according to the splicing line and output the synthesized image.
[0087] The defect detection module is used to extract the coordinates of each pixel in each row and column of the synthetic image, construct a discrete function of the pixel coordinate sequence number and chromaticity, perform central difference on the discrete function, and check the continuity of the difference function. Points with a continuity interval less than a threshold are used as pre-selected noise points. If there are adjacent noise points in adjacent rows and columns, it is judged that there is an occlusion, otherwise it is judged that there is a shooting defect.
[0088] The defect detection module includes: a coordinate transformation unit, a center difference unit and a defect output unit;
[0089] The coordinate transformation unit is used to extract the pixel points of each row and each column of the synthesized image and generate a sequence reflecting the chromaticity of the pixel points;
[0090] The central difference unit is used to generate a discrete function for each sequence and calculate the central difference function of the discrete function;
[0091] The defect output unit is used to check the continuity of the differential function, output the continuity discontinuity point as a pre-selected noise point, and determine the defect type of the pre-selected noise point.
[0092] like Figure 2 As shown, a defect detection method based on a split camera array includes the following steps:
[0093] Step S1. Identify the position and main optical axis direction of each split camera in the coordinate system, select the shooting direction of one camera as the main direction, arrange the cameras in a counterclockwise order according to the main direction, and combine the images taken by the cameras at adjacent positions at the same time into an image pair;
[0094] Step S1 includes:
[0095] Step S11. Establish a three-dimensional coordinate system at the shooting scene, identify the position coordinates of each camera in the split camera array in the coordinate system, and generate the direction vector of the camera by taking the direction facing the camera lens as the positive direction and the camera focal length as the vector modulus;
[0096] Step S12. According to the main shooting content of the camera array, the direction facing the shooting object is selected as the positive direction, and the vector with a unit length of the modulus length is selected as the main direction vector. The counterclockwise horizontal angle between the main direction vector and the direction vectors of each camera is calculated, and the cameras are arranged in ascending order according to the horizontal angle to form a camera sequence.
[0097] Step S13. Combine every two adjacent cameras in the camera sequence to form n-1 camera combinations, where n is the number of split cameras in the array, allocate separate storage space for the cameras in each combination, store images taken by the two cameras in the combination at the same time, and combine them into image pairs;
[0098] The image with higher pixel count in the image pair is stored as the first image, and the image with lower pixel count is stored as the second image.
[0099] Step S2. Verify the chromaticity of each pixel in the image, calculate the mapping position of the edge pixel column of the first image in the image pair in the second image according to the camera's viewing angle deviation, take the pixel points in the edge pixel column of the first image as samples, and perform significance test on all the pixel points within a preset radius of the mapping position as a whole;
[0100] Step S2 includes:
[0101] Step S21. Select an edge pixel column of the first image, the edge pixel column being located in the overlapped image between the first image and the second image, extract the chromatographic frequency of each pixel point in the edge pixel column, and use the position of the chromatographic frequency in the standard spectroscopic color spectrum as the chromaticity of the pixel point;
[0102] Step S22. Coordinate each pixel point in the edge pixel column to obtain coordinates Q (a, b, c), where a, b and c represent the row position, column position and chromaticity of the pixel point, respectively, and calculate the mapping position P (A, B, C) of the pixel point, where A and B represent the horizontal and vertical coordinates of the mapping point of the pixel point in the second image, respectively, and C represents the actual chromaticity at the position (A, B) of the second image;
[0103] Where A=r·cosθ1-d1+a, B=r·cosθ2-d2+b, r represents the distance between the two cameras taking the first and second images, θ1 and θ2 represent the horizontal angle and vertical angle between the principal optical axes of the two cameras, respectively, and d1 and d2 represent the number of pixel rows and pixel columns in the first image, respectively;
[0104] Step S23. Using the chromaticity of each pixel in the edge pixel column, a sample set {c1, c2, ..., cm} is formed, where m is the number of pixels in the edge pixel column, and cm is the chromaticity of the mth pixel in the edge pixel column;
[0105] Taking the mapping position of each pixel in the edge pixel column in the edge image as the center, obtain the chromaticity of all pixels within the preset radius to form a total set {x1, x2, …, xu}, where u is the number of pixels within the preset radius, and xu is the chromaticity of the u-th pixel;
[0106] Step S24. Perform a significance test on the sample set:
[0107] ;
[0108] Among them, t represents the test level, and Represent the average values of the elements in the sample set and the overall set respectively, and xi represents the i-th element in the overall set.
[0109] Step S3. When the inspection level is higher than the threshold, a fixed number of pixels are removed from the overall set in order of distance, and the inspection is repeated until the inspection level no longer decreases, and the remaining pixels are output as feature pixels;
[0110] Step S3 includes:
[0111] Step S31. Determine whether the inspection level is higher than a threshold value. If it is not higher than the threshold value, perform original proportion splicing on the first image and the second image, and output a composite image. If it is higher than the threshold value, go to step S32;
[0112] Step S32. Remove elements from the overall set in descending order of the distance between the pixel point and the nearest mapping position. Each time k elements are removed, a significance test is performed again with the current overall set. If the test level is reduced, k elements are removed here, where k is a preset accuracy. If the test level is increased, all elements in the current overall set are output, and the pixel points corresponding to the elements are marked as feature pixels.
[0113] Step S4. Perform distribution fitting on all feature pixel points to obtain stitching line segments, use the stitching line segments as actual mapping line segments of the first image in the second image, perform image stitching synthesis, and output the synthesized image;
[0114] Step S4 includes:
[0115] Step S41. Use a straight line fitting tool to fit the distribution trend of the characteristic pixel points with a line segment, output the fitting result, and use the fitting result line segment as the image splicing line segment;
[0116] Step S42: Using the edge pixel columns of the first image as reference columns, the edge pixel columns are made to coincide with the stitching line segments in the second image, and the stitched image is synthesized and output.
[0117] Step S5. Extract the pixel points of each row and column in the composite image to obtain a verification sequence reflecting the chromaticity of the pixel points, generate a discrete function for each verification sequence, perform central difference on the discrete function, output the points with difference function values higher than the threshold as noise points, and determine the type of noise points based on the presence of noise points in adjacent rows and columns.
[0118] Step S5 includes:
[0119] Step S51. Extract the pixels of each row and column in the composite image, and arrange the chromaticity of the pixels in the order of the rows and columns to form a verification sequence [y1, y2, ..., yj, ..., yg], where g is the number of pixels in the row or column, j is the sequence number, and j∈{1, 2, ..., g}, yj is the chromaticity of the jth pixel in the row or column, and perform steps S52-S53 for each verification sequence;
[0120] Step S52: Generate a discrete function Y(j) so that Y(j)=yj, and perform central difference on the function Y(g):
[0121] ;
[0122] Among them, Y'(j) is the differential function of the discrete function Y(j), and h is the differential accuracy;
[0123] Step S53. Substitute all the values that j can obtain into the differential function Y'(j). When the value of Y'(j) is higher than the preset threshold, the value of the independent variable j at this time is output as an outlier, and the pixel point corresponding to the outlier is marked as a noise point. If noise points exist in adjacent rows or columns at the same time, it is judged that there is an occlusion, otherwise it is judged that there is a shooting defect.
[0124] Embodiment: There are 2 cameras in the split camera array for shooting. The main optical axes of the two cameras are parallel and located at the same height. The distance between them is 1m. The images taken at the same time constitute an image pair. The edge row of the first image in the image pair is selected. There are 5 pixels in the edge row, and there are 10 pixels in the mapping position range of the second image. After inspection, the inspection level t=1.7 is obtained, which is lower than the preset threshold 2. It is judged that the image has no defects, and the two images are spliced vertically to output a composite image.
[0125] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0126] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A defect detection system based on a split camera array, characterized in that: The system includes the following modules: an image subcontracting module, a position inspection module, a deviation limiting module, a splicing transformation module and a defect detection module; The image subcontracting module is used to identify the position and main optical axis direction of each split camera in the coordinate system, select the shooting direction of one camera as the main direction, arrange the cameras in a counterclockwise order according to the main direction, and combine the images taken by the cameras at adjacent positions at the same time into an image pair; The position verification module is used to verify the chromaticity of each pixel in the image, calculate the mapping position of the edge pixel column of the first image in the image pair in the second image according to the camera's viewing angle deviation, take the pixel points in the edge pixel column of the first image as samples, and perform significance verification on all the pixel points within a preset radius of the mapping position as a whole; The deviation limiting module is used to remove a fixed number of pixel points from the overall set in order of distance when the inspection level is higher than a threshold, and re-inspect until the inspection level no longer decreases, and output the remaining pixel points as feature pixel points; The splicing transformation module is used to perform distribution fitting on all feature pixel points to obtain splicing line segments, use the splicing line segments as actual mapping line segments of the first image in the second image, perform image splicing synthesis, and output the synthesized image; The defect detection module is used to extract the pixel points of each row and column in the synthetic image, obtain a verification sequence reflecting the chromaticity of the pixel points, generate a discrete function for each verification sequence, perform central difference on the discrete function, output the points with difference function values higher than the threshold as noise points, and determine the type of noise points according to the existence of noise points in adjacent rows and columns; The position verification module includes: a pixel quantization unit, an edge extraction unit and a probability verification unit; The pixel quantization unit is used to quantize the color of each pixel in the image and mark the coordinates of the pixel in a digital form; The edge extraction unit is used to calculate the mapping position of the edge of the first image in the second image, and extract pixel points within a fixed range around the mapping position to construct a general set; The probability test unit is used to test the significance of edge pixels in the overall set by taking edge pixels as a sample set; The position verification module is used to implement the following steps: Step S21. Select an edge pixel column of the first image, the edge pixel column being located in the overlapped image between the first image and the second image, extract the chromatographic frequency of each pixel point in the edge pixel column, and use the position of the chromatographic frequency in the standard spectroscopic color spectrum as the chromaticity of the pixel point; Step S22. Coordinate each pixel point in the edge pixel column to obtain coordinates Q (a, b, c), where a, b and c represent the row position, column position and chromaticity of the pixel point, respectively, and calculate the mapping position P (A, B, C) of the pixel point, where A and B represent the horizontal and vertical coordinates of the mapping point of the pixel point in the second image, respectively, and C represents the actual chromaticity at the position (A, B) of the second image; Where A=r·cosθ1-d1+a, B=r·cosθ2-d2+b, r represents the distance between the two cameras taking the first and second images, θ1 and θ2 represent the horizontal angle and vertical angle between the principal optical axes of the two cameras, respectively, and d1 and d2 represent the number of pixel rows and pixel columns in the first image, respectively; Step S23. Using the chromaticity of each pixel in the edge pixel column, a sample set {c1, c2, ..., cm} is formed, where m is the number of pixels in the edge pixel column, and cm is the chromaticity of the mth pixel in the edge pixel column; Taking the mapping position of each pixel in the edge pixel column in the edge image as the center, obtain the chromaticity of all pixels within the preset radius to form a total set {x1, x2, …, xu}, where u is the number of pixels within the preset radius, and xu is the chromaticity of the u-th pixel; Step S24. Perform a significance test on the sample set: ; Among them, t represents the test level, and Represent the average values of the elements in the sample set and the overall set respectively, and xi represents the i-th element in the overall set.
2. The defect detection system based on a split camera array according to claim 1, characterized in that: The image subcontracting module comprises: an array positioning unit and an inter-frame combining unit; The array positioning unit is used to determine the position and shooting direction of each camera in the array, and sort the cameras according to the shooting direction; The inter-frame combination unit is used to extract and pack the images taken by adjacent cameras at the same time and store them in the database as image pairs.
3. The defect detection system based on a split camera array according to claim 2, characterized in that: The image subcontracting module is used to implement the following steps: Step S11. Establish a three-dimensional coordinate system at the shooting scene, identify the position coordinates of each camera in the split camera array in the coordinate system, and generate the direction vector of the camera by taking the direction facing the camera lens as the positive direction and the camera focal length as the vector modulus; Step S12. According to the main shooting content of the camera array, the direction facing the shooting object is selected as the positive direction, and the vector with a unit length of the modulus length is selected as the main direction vector. The counterclockwise horizontal angle between the main direction vector and the direction vectors of each camera is calculated, and the cameras are arranged in ascending order according to the horizontal angle to form a camera sequence. Step S13. Combine every two adjacent cameras in the camera sequence to form n-1 camera combinations, where n is the number of split cameras in the array, allocate separate storage space for the cameras in each combination, store images taken by the two cameras in the combination at the same time, and combine them into image pairs; The image with higher pixel count in the image pair is stored as the first image, and the image with lower pixel count is stored as the second image.
4. The defect detection system based on a split camera array according to claim 3, characterized in that: The deviation limiting module includes: a sample replacement unit and a feature scatter point unit; The sample replacement unit is used to replace the pixels in the overall set in sequence until the pixel is taken out to increase the inspection level; The feature scatter point unit is used to mark the positions of the feature points in the free space by taking the remaining pixel points in the overall set as feature points; The splicing transformation module includes: a line segment fitting unit and a deflection synthesis unit; The line segment fitting unit is used to fit all feature points in free space using Matlab to form a splicing line; The deflection synthesis unit is used to synthesize the images in the image pair according to the splicing line and output the synthesized image.
5. The defect detection system based on a split camera array according to claim 4, characterized in that: The deviation limiting module is used to implement the following steps: Step S31. Determine whether the inspection level is higher than a threshold value. If it is not higher than the threshold value, perform original proportion splicing on the first image and the second image, and output a composite image. If it is higher than the threshold value, go to step S32; Step S32. Remove elements from the overall set in descending order of the distance between the pixel point and the nearest mapping position. Each time k elements are removed, a significance test is performed again with the current overall set. If the test level decreases, k elements are removed here, where k is a preset accuracy. If the test level increases, all elements in the current overall set are output, and the pixel points corresponding to the elements are marked as feature pixels. The splicing transformation module is used to implement the following steps: Step S41. Use a straight line fitting tool to fit the distribution trend of the characteristic pixel points with a line segment, output the fitting result, and use the fitting result line segment as the image splicing line segment; Step S42: Using the edge pixel columns of the first image as reference columns, the edge pixel columns are made to coincide with the stitching line segments in the second image, and the stitched image is synthesized and output.
6. The defect detection system based on a split camera array according to claim 5, characterized in that: The defect detection module includes: a coordinate transformation unit, a center difference unit and a defect output unit; The coordinate transformation unit is used to extract the pixel points of each row and each column of the synthesized image and generate a sequence reflecting the chromaticity of the pixel points; The central difference unit is used to generate a discrete function for each sequence and calculate the central difference function of the discrete function; The defect output unit is used to check the continuity of the differential function, output the continuity discontinuity point as a pre-selected noise point, and determine the defect type of the pre-selected noise point.
7. The defect detection system based on a split camera array according to claim 6, characterized in that: The defect detection module is used to implement the following steps: Step S51. Extract the pixels of each row and column in the composite image, and arrange the chromaticity of the pixels in the order of the rows and columns to form a verification sequence [y1, y2, ..., yj, ..., yg], where g is the number of pixels in the row or column, j is the sequence number, and j∈{1, 2, ..., g}, yj is the chromaticity of the jth pixel in the row or column, and perform steps S52-S53 for each verification sequence; Step S52: Generate a discrete function Y(j) so that Y(j)=yj, and perform central difference on the function Y(j): ; Among them, Y'(j) is the differential function of the discrete function Y(j), and h is the differential accuracy; Step S53. Substitute all the values that j can obtain into the differential function Y'(j). When the value of Y'(j) is higher than the preset threshold, the value of the independent variable j at this time is output as an outlier, and the pixel point corresponding to the outlier is marked as a noise point. If noise points exist in adjacent rows or columns at the same time, it is judged that there is an occlusion, otherwise it is judged that there is a shooting defect.
Citation Information
Patent Citations
Corncob automatic identification method based on significance testing
CN108537267A
Image splicing method based on linear feature invariance and related device
CN118014832A