Lightweight wallboard quality detection method and device based on image processing technology
Patent Information
- Application Number
- CN202111256948.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-27
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2041-10-27
AI Technical Summary
专利申请号为CN112326671A的专利,利用红色结构光的3D检测技术对金属板材表面缺陷进行检测,该技术的缺点是对于尺寸较大的运动物体(如宽度大于1000mm)测量精度一般低于5mm,不能满足《GB/T23451-2009建筑隔墙用轻质条板》对墙板尺寸误差,高度尺寸误差1.5mm,宽度尺寸误差2mm的检测精度要求,另外,被检测物的颜色对检测精度有明显影响,深色特别是黑色物体的检测精度会明显下降
[0047]1)本发明设计的标定靶标板既可以做相机的标定使用,还可以用作对线阵相机的扫描线位置调整,兼顾标定和相机调整工具两个功能。
Smart Images

Figure CN114119483B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing and quality inspection technology, specifically relating to a method and device for quality inspection of lightweight building wall panels based on image processing technology. Background Technology
[0002] Quality inspection of lightweight wall panels for building construction is a crucial step in their production and installation. The dimensional errors, surface defects, and the quantity and size of these defects have a significant impact on the quality and safety of buildings. According to GB / T23451-2009 Lightweight Panels for Building Partitions, the main specifications for appearance quality and dimensional deviations include: the number, length, width, and thickness of cracks on the panel surface.
[0003] Traditional manual inspection methods for the aforementioned testing items suffer from drawbacks such as incomplete testing indicators, low accuracy, and high labor intensity. Currently, with the development of computer and image processing technologies, online real-time automatic inspection of lightweight building wall panels using image processing technology can effectively overcome many shortcomings of manual inspection. Patent application CN112326671A utilizes red structured light 3D inspection technology to detect surface defects in metal sheets. However, this technology has a drawback: for large moving objects (e.g., width greater than 1000mm), the measurement accuracy is generally less than 5mm, failing to meet the accuracy requirements of GB / T23451-2009 Lightweight Strip Panels for Building Partitions, which specifies a height error of 1.5mm and a width error of 2mm. Furthermore, the color of the object being inspected significantly affects the inspection accuracy; the accuracy drops noticeably for dark-colored, especially black, objects. Patent application number CN112797900A describes a method for calibrating and measuring the dimensions of a multi-camera imaging system. Although the camera calibration method is simplified compared to binocular cameras, the calibration steps described are still quite difficult for non-professionals. This technology is difficult to promote in the construction industry (the education level of construction workers is generally low). In addition, the method only performs simple dimensional measurements and does not detect surface defects.
[0004] Therefore, overcoming the shortcomings of existing technologies is an urgent problem to be solved in the field of image processing and quality inspection technology. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and device for quality inspection of lightweight wall panels for building based on image processing technology. This method can quickly and efficiently measure and detect dimensional deviations and surface defects of lightweight wall panels for building, and the technical performance achieved meets the technical requirements for dimensional and surface defect detection in GB / T 23451-2009 Lightweight Strip Panels for Building Partitions, and is easy to promote and apply.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] A quality inspection method for lightweight wall panels used in construction based on image processing technology includes the following steps:
[0008] Step (1): The camera is installed directly above the wall panel conveying channel. The camera calibration target plate is placed directly below the camera. Then, the camera calibration target plate is adjusted so that it is on the camera scanning line. Then, the camera calibration target plate is moved upward to different heights from the wall panel conveying surface and taken pictures to obtain several images.
[0009] Step (2): Calculate the image obtained in step (1) to generate the camera calibration relationship polynomial;
[0010] Step (3): Acquire images of the wall panel to be inspected;
[0011] Step (4): Based on the camera calibration relationship polynomial in step (2), the image of the wall panel to be detected captured from directly above is corrected to obtain the corrected image.
[0012] Step (5): Perform edge recognition on the corrected image obtained in step (4) to obtain the accurate wall panel outline area and the actual size of the wall panel to be detected.
[0013] Step (6) involves preprocessing, feature extraction, and feature filtering of the precise wall panel outline area obtained in step (5) to obtain the wall panel surface defect detection results.
[0014] Furthermore, preferably, in step (1), the image of the calibration target plate is a set of rectangular strip patterns with fixed width and spacing, and also includes a subset of parallel images of varying lengths.
[0015] Furthermore, preferably, the specific method of step (2) is as follows:
[0016] (2.1) Take the intersection of the camera lens optical axis and the detection surface as the image coordinate origin. Assume that there is a calibration target image of the same size as the acquired calibration target image at each height position, but without distortion, as the standard image. Assume that the coordinate origin of the standard image coincides with the coordinate origin of the acquired calibration target image. Calculate the midpoint coordinates of each fixed-width rectangle on the calibration target image and the midpoint coordinates of each fixed-width rectangle on the standard image, in pixels.
[0017] (2.2) Using the midpoint coordinates of each fixed-width rectangle calculated in (2.1), calculate the difference between the distance between the midpoint of each rectangle and the origin and the distance between the midpoint of the corresponding rectangle and the origin on the standard image. Use the difference as the correction amount required for the image in the rectangle area. The distance and correction amount mentioned above are measured in pixels.
[0018] (2.3) Calculate all images acquired in step (1) and obtain the correction amount of each rectangular strip area in the scanning width direction corresponding to different heights; take the intersection of the camera lens optical axis and the detection surface as the origin of the coordinates, the scanning line width direction as the coordinate x, and the height of the camera from the wall plate conveying surface when acquiring the image as h. Perform surface fitting on the relationship between the coordinate x of the rectangular strip in the scanning line width direction, the height h of the camera when capturing the image of the rectangular strip, and the corresponding correction amount to obtain the camera calibration relationship polynomial.
[0019] Furthermore, preferably, in step (3), cameras are installed on the left and right sides of the wall panel conveying channel; several images of the left and right sides are collected respectively; and steps (5) and (6) are performed directly on the left and right side images in sequence.
[0020] Furthermore, preferably, the specific method of step (4) is as follows:
[0021] (4.1) Use the formula x0=x+δ to traverse each pixel of the entire image, where: x is the corrected coordinate, x0 is the original image coordinate, and δ is the correction amount obtained through the camera calibration relation polynomial:
[0022] (4.2) For coordinates where x0 is not an integer, round it to the nearest integer.
[0023] (4.3) Assign the pixel value at x0 of each obtained pixel to x.
[0024] Furthermore, preferably, the specific method of step (5) is as follows:
[0025] (5.1) Create an image measurement model, with parameters including the standard length, width, and height of the wall panel to be inspected, and the length, width, and number of rectangular blocks in the measurement model;
[0026] (5.2) Initialize the image measurement model parameters, wherein the length of the rectangular block of the measurement model, after being converted into the actual physical size, shall not be less than 10 mm; the width of the rectangular block of the measurement model shall be 20% to 25% of the length;
[0027] (5.3) Place the rectangular blocks on the contour of the corrected image obtained in step (4) so that the center point of the rectangular block coincides with the contour line; the center distance between two adjacent rectangular blocks is greater than the width of the rectangular block and less than 5 times the width of the rectangular block.
[0028] (5.4) Within each rectangular block, the Canny edge detection algorithm is used to obtain an edge curve. The midpoint of the column coordinates of the edge curve is taken as an edge point. Then, a straight line fitting operation is performed on the edge points of all rectangular blocks to obtain two sets of edge lines for the wall panel. Next, the distance between the two corresponding sides of the two sets of edge lines is calculated and used as the accurate measured length and width of the wall panel, respectively. Note: The camera directly above obtains the length and width, while the cameras on the two sides obtain the length and height.
[0029] Furthermore, preferably, the specific method of step (6) is as follows:
[0030] (6.1) Perform Fourier transform on the wall panel outline area to the frequency domain image, perform Gaussian filtering on the frequency domain image to remove high-frequency features of the image and make the image smoother, and then perform inverse Fourier transform and mean-averaging after filtering.
[0031] (6.2) The processed image and the original image are jointly segmented using the watershed algorithm, and the image is segmented into multiple contour regions;
[0032] (6.3) For the segmented contour regions, calculate the maximum inscribed circle diameter and the minimum circumscribed rectangle length. Use the maximum inscribed circle diameter to represent the width of the crack defect and the minimum circumscribed rectangle length to represent the crack length.
[0033] (6.4) By defining the range of length and width values for crack defects, filter the number of sub-contour regions that meet the defect characteristics;
[0034] (6.5) Determine whether the wall panel is qualified according to the provisions of GB / T23451-2009 Lightweight strip panels for building partitions.
[0035] Furthermore, preferably, the length and width of the crack defect are defined as 50-100mm in length and 0.5-1.0mm in width; if the number of cracks is less than 2, the wall panel length error is less than 5mm, the width error is less than 2mm, and the thickness error is less than 1.5mm, then it is considered qualified.
[0036] This invention also provides a quality inspection device for lightweight building wall panels based on image processing technology, including at least one camera and a light source next to the camera; the camera is connected to an image processor.
[0037] The image processor includes a first processing module, a second processing module, a third processing module, and a wall panel quality detection module;
[0038] Place the camera calibration target plate directly below the camera, then adjust the camera calibration target plate until it is on the camera scanning line, then move the camera calibration target upward to different heights from the wall plate conveying surface and take pictures to obtain several images;
[0039] The first processing module is used to calculate and generate a camera calibration relationship polynomial based on images taken by the camera at different heights.
[0040] The second processing module is used to perform correction processing on the image of the wall panel to be detected captured from directly above, based on the camera calibration relationship polynomial, to obtain the corrected image.
[0041] The third processing module is used to perform edge recognition on the obtained calibrated image to obtain the accurate outline area of the wall panel and the actual size of the wall panel to be detected; if there are images taken from other directions, edge recognition is performed directly.
[0042] The wall panel quality inspection module is used to preprocess, extract, and filter features from the obtained precise wall panel outline area to obtain the wall panel surface defect detection results.
[0043] Furthermore, preferably, there are three cameras, which are respectively installed above, on the left side, and on the right side of the wall panel conveying channel; each camera is equipped with a light source.
[0044] In this invention, for the cameras on the left and right sides, since the thickness of the wall panel is small (the maximum thickness is only 120mm), the lens distortion of the camera can be ignored. The detection steps can start directly from step (3), skipping steps (1), (2), and (4).
[0045] In summary, this invention presents a rapid, fully automated, and non-contact method for surface quality inspection and dimensional measurement of lightweight building wall panels. This method enables rapid and efficient detection of surface quality defects and critical dimensions of wall panels on production lines and construction sites. The equipment requires no calibration after leaving the factory, is simple to use and learn, and requires minimal expertise from operators. Therefore, this method has significant potential for widespread application and substantial engineering implications.
[0046] Compared with the prior art, the beneficial effects of this invention are as follows:
[0047] 1) The calibration target plate designed in this invention can be used for camera calibration and also for adjusting the position of the scan lines of a line scan camera, thus combining the functions of calibration and camera adjustment tool.
[0048] 2) The calibration method of the present invention is simpler, easier to operate and learn, and does not require repeated acquisition of calibration images in multiple poses.
[0049] 3) The coordinate systems of the multiple cameras in this scheme are independent of each other, and the adjustment of the position of a single camera will not affect the detection accuracy and use of the others.
[0050] 4) The invention has comprehensive testing functions, including both size measurement and surface defect detection, and can replace manual labor to meet the quality testing needs of lightweight wall panels on the production line. Attached Figure Description
[0051] Figure 1 This is a structural diagram of the present invention; wherein, 1 is a camera, including three cameras at the top and on the left and right; 2 is a lens assembly, including three lenses at the top and on the left and right; 3 is a light source, including three sets of light sources at the top and on the left and right; 4 is an electrical control cabinet; 5 is an image processor;
[0052] Figure 2 This is a design drawing of the calibration target plate of the present invention; 6 is a rectangular strip of fixed width, 7 is a pattern used for scanning line alignment adjustment, and 8 is the imaging position of the camera scanning line;
[0053] Figure 3 yes Figure 2 Enlarged image of number 7;
[0054] Figure 4 This scheme uses the least squares method for quadratic polynomials:
[0055] δ=p 00 +p 10 x+p 01 h+p 20 x 2 +p 11 xh+p 02 h 2 +p 21 x 2 h+p 12 xh 2 +p 03 h 3 The fitted surface plot, equation coefficients p 00 =7.936*10 -3 p 10 =4.033*10 -8 p 01 = -7.643 * 10 -5 p 20 = -2.444 * 10 -9 p 11 =1.979*10 -10 p 02 = -1.024 * 10 -7 p 21 =4.894*10 -10 p 12 = -2.634 * 10 -12 p 03 =7.008*10 -9 ;
[0056] Figure 5 This is a schematic diagram of a top-mounted camera using a measurement model to measure the length and width of a wall panel; A0 is the original image, A1 is a schematic diagram of the rectangular blocks of the measurement model arranged in the length direction, and A2 is a schematic diagram of the rectangular blocks of the measurement model arranged in the width direction.
[0057] Figure 6 This is the crack defect detection process. B0 is the original image, B1 is the background image after Gaussian filtering and mean processing, B1 and B0 are jointly segmented using the watershed algorithm, and the image is segmented into multiple contour regions; B2 is all the crack regions obtained by the watershed algorithm segmentation; B3 is the sub-contour regions that meet the defect characteristics by filtering B2 based on the length and width range defined for the crack defect (length 50-100mm, width 0.5-1.0mm);
[0058] Figure 7 This is a schematic diagram of the image processor. Detailed Implementation
[0059] The present invention will now be described in further detail with reference to the embodiments.
[0060] Those skilled in the art will understand that the following embodiments are for illustrative purposes only and should not be construed as limiting the scope of the invention. Where specific techniques or conditions are not specified in the embodiments, they are performed in accordance with the techniques or conditions described in the literature in the field or according to the product instructions. Materials or equipment whose manufacturers are not specified are all conventional products that can be obtained by purchase.
[0061] Example 1
[0062] A quality inspection method for lightweight wall panels used in construction based on image processing technology includes the following steps:
[0063] Step (1): The camera is installed directly above the wall panel conveying channel. The camera calibration target plate is placed directly below the camera. Then, the camera calibration target plate is adjusted so that it is on the camera scanning line. Then, the camera calibration target plate is moved upward to different heights from the wall panel conveying surface and taken pictures to obtain several images.
[0064] Step (2): Calculate the image obtained in step (1) to generate the camera calibration relationship polynomial;
[0065] Step (3): Acquire images of the wall panel to be inspected;
[0066] Step (4): Based on the camera calibration relationship polynomial in step (2), the image of the wall panel to be detected captured from directly above is corrected to obtain the corrected image.
[0067] Step (5): Perform edge recognition on the corrected image obtained in step (4) to obtain the accurate wall panel outline area and the actual size of the wall panel to be detected.
[0068] Step (6) involves preprocessing, feature extraction, and feature filtering of the precise wall panel outline area obtained in step (5) to obtain the wall panel surface defect detection results.
[0069] Example 2
[0070] A quality inspection method for lightweight wall panels used in construction based on image processing technology includes the following steps:
[0071] Step (1): The camera is installed directly above the wall panel conveying channel. The camera calibration target plate is placed directly below the camera. Then, the camera calibration target plate is adjusted so that it is on the camera scanning line. Then, the camera calibration target plate is moved upward to different heights from the wall panel conveying surface and taken pictures to obtain several images.
[0072] Step (2): Calculate the image obtained in step (1) to generate the camera calibration relationship polynomial;
[0073] Step (3): Acquire images of the wall panel to be inspected;
[0074] Step (4): Based on the camera calibration relationship polynomial in step (2), the image of the wall panel to be detected captured from directly above is corrected to obtain the corrected image.
[0075] Step (5): Perform edge recognition on the corrected image obtained in step (4) to obtain the accurate wall panel outline area and the actual size of the wall panel to be detected.
[0076] Step (6) involves preprocessing, feature extraction, and feature filtering of the precise wall panel outline area obtained in step (5) to obtain the wall panel surface defect detection results.
[0077] In step (1), the image of the calibration target plate is a set of rectangular strip patterns with fixed width and spacing, and also includes a subset of parallel images of varying lengths.
[0078] The specific method for step (2) is as follows:
[0079] (2.1) Take the intersection of the camera lens optical axis and the detection surface as the image coordinate origin. Assume that there is a calibration target image of the same size as the acquired calibration target image at each height position, but without distortion, as the standard image. Assume that the coordinate origin of the standard image coincides with the coordinate origin of the acquired calibration target image. Calculate the midpoint coordinates of each fixed-width rectangle on the calibration target image and the midpoint coordinates of each fixed-width rectangle on the standard image, in pixels.
[0080] (2.2) Using the midpoint coordinates of each fixed-width rectangle calculated in (2.1), calculate the difference between the distance between the midpoint of each rectangle and the origin and the distance between the midpoint of the corresponding rectangle and the origin on the standard image. Use the difference as the correction amount required for the image in the rectangle area. The distance and correction amount mentioned above are measured in pixels.
[0081] (2.3) Calculate all images acquired in step (1) and obtain the correction amount of each rectangular strip area in the scanning width direction corresponding to different heights; take the intersection of the camera lens optical axis and the detection surface as the origin of the coordinates, the scanning line width direction as the coordinate x, and the height of the camera from the wall plate conveying surface when acquiring the image as h. Perform surface fitting on the relationship between the coordinate x of the rectangular strip in the scanning line width direction, the height h of the camera when capturing the image of the rectangular strip, and the corresponding correction amount to obtain the camera calibration relationship polynomial.
[0082] Example 3
[0083] A quality inspection method for lightweight wall panels used in construction based on image processing technology includes the following steps:
[0084] Step (1): The camera is installed directly above the wall panel conveying channel. The camera calibration target plate is placed directly below the camera. Then, the camera calibration target plate is adjusted so that it is on the camera scanning line. Then, the camera calibration target plate is moved upward to different heights from the wall panel conveying surface and taken pictures to obtain several images.
[0085] Step (2): Calculate the image obtained in step (1) to generate the camera calibration relationship polynomial;
[0086] Step (3): Acquire images of the wall panel to be inspected;
[0087] Step (4): Based on the camera calibration relationship polynomial in step (2), the image of the wall panel to be detected captured from directly above is corrected to obtain the corrected image.
[0088] Step (5): Perform edge recognition on the corrected image obtained in step (4) to obtain the accurate wall panel outline area and the actual size of the wall panel to be detected.
[0089] Step (6) involves preprocessing, feature extraction, and feature filtering of the precise wall panel outline area obtained in step (5) to obtain the wall panel surface defect detection results.
[0090] In step (1), the image of the calibration target plate is a set of rectangular strip patterns with fixed width and spacing, and also includes a subset of parallel images of varying lengths.
[0091] The specific method for step (2) is as follows:
[0092] (2.1) Take the intersection of the camera lens optical axis and the detection surface as the image coordinate origin. Assume that there is a calibration target image of the same size as the acquired calibration target image at each height position, but without distortion, as the standard image. Assume that the coordinate origin of the standard image coincides with the coordinate origin of the acquired calibration target image. Calculate the midpoint coordinates of each fixed-width rectangle on the calibration target image and the midpoint coordinates of each fixed-width rectangle on the standard image, in pixels.
[0093] (2.2) Using the midpoint coordinates of each fixed-width rectangle calculated in (2.1), calculate the difference between the distance between the midpoint of each rectangle and the origin and the distance between the midpoint of the corresponding rectangle and the origin on the standard image. Use the difference as the correction amount required for the image in the rectangle area. The distance and correction amount mentioned above are measured in pixels.
[0094] (2.3) Calculate all images acquired in step (1) and obtain the correction amount of each rectangular strip area in the scanning width direction corresponding to different heights; take the intersection of the camera lens optical axis and the detection surface as the origin of the coordinates, the scanning line width direction as the coordinate x, and the height of the camera from the wall plate conveying surface when acquiring the image as h. Perform surface fitting on the relationship between the coordinate x of the rectangular strip in the scanning line width direction, the height h of the camera when capturing the image of the rectangular strip, and the corresponding correction amount to obtain the camera calibration relationship polynomial.
[0095] In step (3), cameras are installed on the left and right sides of the wall panel conveying channel; several images are captured from the top, left and right sides respectively; steps (5) and (6) are performed directly on the left and right side images in sequence.
[0096] Example 5
[0097] A quality inspection method for lightweight wall panels used in construction based on image processing technology includes the following steps:
[0098] Step (1): The camera is installed directly above the wall panel conveying channel. The camera calibration target plate is placed directly below the camera. Then, the camera calibration target plate is adjusted so that it is on the camera scanning line. Then, the camera calibration target plate is moved upward to different heights from the wall panel conveying surface and taken pictures to obtain several images.
[0099] Step (2): Calculate the image obtained in step (1) to generate the camera calibration relationship polynomial;
[0100] Step (3): Acquire images of the wall panel to be inspected;
[0101] Step (4): Based on the camera calibration relationship polynomial in step (2), the image of the wall panel to be detected captured from directly above is corrected to obtain the corrected image.
[0102] Step (5): Perform edge recognition on the corrected image obtained in step (4) to obtain the accurate wall panel outline area and the actual size of the wall panel to be detected.
[0103] Step (6) involves preprocessing, feature extraction, and feature filtering of the precise wall panel outline area obtained in step (5) to obtain the wall panel surface defect detection results.
[0104] In step (1), the image of the calibration target plate is a set of rectangular strip patterns with fixed width and spacing, and also includes a subset of parallel images of varying lengths.
[0105] The specific method for step (2) is as follows:
[0106] (2.1) Take the intersection of the camera lens optical axis and the detection surface as the image coordinate origin. Assume that there is a calibration target image of the same size as the acquired calibration target image at each height position, but without distortion, as the standard image. Assume that the coordinate origin of the standard image coincides with the coordinate origin of the acquired calibration target image. Calculate the midpoint coordinates of each fixed-width rectangle on the calibration target image and the midpoint coordinates of each fixed-width rectangle on the standard image, in pixels.
[0107] (2.2) Using the midpoint coordinates of each fixed-width rectangle calculated in (2.1), calculate the difference between the distance between the midpoint of each rectangle and the origin and the distance between the midpoint of the corresponding rectangle and the origin on the standard image. Use the difference as the correction amount required for the image in the rectangle area. The distance and correction amount mentioned above are measured in pixels.
[0108] (2.3) Calculate all images acquired in step (1) and obtain the correction amount of each rectangular strip area in the scanning width direction corresponding to different heights; take the intersection of the camera lens optical axis and the detection surface as the origin of the coordinates, the scanning line width direction as the coordinate x, and the height of the camera from the wall plate conveying surface when acquiring the image as h. Perform surface fitting on the relationship between the coordinate x of the rectangular strip in the scanning line width direction, the height h of the camera when capturing the image of the rectangular strip, and the corresponding correction amount to obtain the camera calibration relationship polynomial.
[0109] In step (3), cameras are installed on the left and right sides of the wall panel conveying channel; several images of the left and right sides are collected respectively; and steps (5) and (6) are performed directly on the left and right side images in sequence.
[0110] The specific method for step (4) is as follows:
[0111] (4.1) Use the formula x0=x+δ to traverse each pixel of the entire image, where: x is the corrected coordinate, x0 is the original image coordinate, and δ is the correction amount obtained through the camera calibration relationship polynomial;
[0112] (4.2) For coordinates where x0 is not an integer, round it to the nearest integer.
[0113] (4.3) Assign the pixel value at x0 of each obtained pixel point to x.
[0114] The specific method for step (5) is as follows:
[0115] (5.1) Create an image measurement model, with parameters including the standard length, width, and height of the wall panel to be inspected, and the length, width, and number of rectangular blocks in the measurement model;
[0116] (5.2) Initialize the image measurement model parameters, wherein the length of the rectangular block of the measurement model, after being converted into the actual physical size, shall not be less than 10 mm; the width of the rectangular block of the measurement model shall be 20% to 25% of the length;
[0117] (5.3) Place the rectangular blocks on the contour of the corrected image obtained in step (4) so that the center point of the rectangular block coincides with the contour line; the center distance between two adjacent rectangular blocks is greater than the width of the rectangular block and less than 5 times the width of the rectangular block.
[0118] (5.4) Within each rectangular block, the Canny edge detection algorithm is used to obtain an edge curve. The midpoint of the column coordinates of the edge curve is taken as an edge point. Then, all edge points are subjected to straight line fitting to obtain two sets of wall panel edge lines. Next, the distance between the two sides corresponding to the two sets of edge lines is calculated as the accurate measurement length and width of the wall panel.
[0119] The specific method for step (6) is as follows:
[0120] (6.1) Perform Fourier transform on the wall panel outline area to the frequency domain image, perform Gaussian filtering on the frequency domain image to remove high-frequency features of the image and make the image smoother, and then perform inverse Fourier transform and mean-averaging after filtering.
[0121] (6.2) The processed image and the original image are jointly segmented using the watershed algorithm, and the image is segmented into multiple contour regions;
[0122] (6.3) For the segmented contour regions, calculate the maximum inscribed circle diameter and the minimum circumscribed rectangle length. Use the maximum inscribed circle diameter to represent the width of the crack defect and the minimum circumscribed rectangle length to represent the crack length.
[0123] (6.4) By defining the range of length and width values for crack defects, filter the number of sub-contour regions that meet the defect characteristics;
[0124] (6.5) Determine whether the wall panel is qualified according to the provisions of GB / T23451-2009 Lightweight strip panels for building partitions.
[0125] The length and width of the crack defect are defined as 50-100mm for length and 0.5-1.0mm for width. If the number of cracks is less than 2, the wall panel length error is less than 5mm, the width error is less than 2mm, and the thickness error is less than 1.5mm, it is considered qualified.
[0126] According to the present invention, steps (1) and (2) are not necessary steps for every test. Generally, they only need to be done once after the product is manufactured and installed.
[0127] Example 6
[0128] like Figure 1 and Figure 7 As shown, a quality inspection device for lightweight building wall panels based on image processing technology includes at least one camera 1, with a light source 3 located next to the camera 1; the camera 1 is connected to an image processor 5.
[0129] The image processor includes a first processing module 101, a second processing module 102, a third processing module 103, and a wall panel quality detection module 104;
[0130] Place the camera calibration target plate directly below the camera 1, then adjust the camera calibration target plate until it is on the camera scanning line, then move the camera calibration target upward to different heights from the wall plate conveying surface and take pictures to obtain several images.
[0131] The first processing module 101 is used to calculate and generate a camera calibration relationship polynomial based on images taken by the camera at different heights.
[0132] The second processing module 102 is used to perform correction processing on the image of the wall panel to be detected captured from directly above according to the camera calibration relationship polynomial, so as to obtain the corrected image.
[0133] The third processing module 103 is used to perform edge recognition on the obtained calibrated image to obtain the accurate wall panel outline area and the actual size of the wall panel to be detected; if there are images taken from other directions, edge recognition is performed directly.
[0134] The wall panel quality inspection module 104 is used to preprocess, extract features, and filter features of the obtained precise wall panel outline area to obtain the wall panel surface defect detection results.
[0135] Example 7
[0136] like Figure 1 and Figure 7 As shown, a quality inspection device for lightweight building wall panels based on image processing technology includes at least one camera 1, with a light source 3 located next to the camera 1; the camera 1 is connected to an image processor 5.
[0137] The image processor includes a first processing module 101, a second processing module 102, a third processing module 103, and a wall panel quality detection module 104;
[0138] Place the camera calibration target plate directly below the camera 1, then adjust the camera calibration target plate until it is on the camera scanning line, then move the camera calibration target upward to different heights from the wall plate conveying surface and take pictures to obtain several images.
[0139] The first processing module 101 is used to calculate and generate a camera calibration relationship polynomial based on images taken by the camera at different heights.
[0140] The second processing module 102 is used to perform correction processing on the image of the wall panel to be detected captured from directly above according to the camera calibration relationship polynomial, so as to obtain the corrected image.
[0141] The third processing module 103 is used to perform edge recognition on the obtained calibrated image to obtain the accurate wall panel outline area and the actual size of the wall panel to be detected; if there are images taken from other directions, edge recognition is performed directly.
[0142] The wall panel quality inspection module 104 is used to preprocess, extract features, and filter features of the obtained precise wall panel outline area to obtain the wall panel surface defect detection results.
[0143] There are three cameras 1, which are respectively installed on the top, left and right sides of the wall panel conveying channel; each camera 1 is equipped with a light source 3.
[0144] Application Examples
[0145] like Figure 1 As shown, a quality inspection device for lightweight building wall panels based on image processing technology includes: a camera, a light source, and an image processor. Figure 1 As shown, camera 1, its lens 2, and light source 3 are configured in groups, with the specific number depending on the number of inspection surfaces required. This technical solution uses three groups of cameras, lenses, and light sources, respectively installed above the inspection wall panel conveyor channel and on the left and right sides. The cameras are line-scan industrial cameras, and the light sources are two strip light sources to meet the lighting requirements of the line-scan cameras. The electrical control cabinet 4 is used to control the start and stop of the light sources and the triggering of the cameras.
[0146] The image data acquired by camera 1 is transmitted to image processor 5 via a gigabit network. Image processor 5 is installed on the door panel of electrical control cabinet 4.
[0147] The image processor includes a first processing module 101, a second processing module 102, a third processing module 103, and a wall panel quality inspection module 104, such as... Figure 7 ;
[0148] Place the camera calibration target plate directly below the camera, then adjust the camera calibration target plate until it is on the camera scanning line, then move the camera calibration target upward to different heights from the wall plate conveying surface and take pictures to obtain several images;
[0149] The first processing module 101 is used to calculate and generate a camera calibration relationship polynomial based on images taken by the camera at different heights.
[0150] The second processing module 102 is used to perform correction processing on the image of the wall panel to be detected captured from directly above according to the camera calibration relationship polynomial, so as to obtain the corrected image.
[0151] The third processing module 103 is used to perform edge recognition on the obtained calibrated image to obtain the accurate wall panel outline area and the actual size of the wall panel to be detected; if there are images taken from other directions, edge recognition is performed directly.
[0152] The wall panel quality inspection module 104 is used to preprocess, extract features, and filter features of the obtained precise wall panel outline area to obtain the wall panel surface defect detection results.
[0153] In this embodiment, the core camera components are three line scan cameras from DALSA, Canada. The top camera model is LA-GC-04K05B-00-R, with a line resolution of 4096x2 and a maximum scan frequency of 45kHz. The left and right side cameras model is LA-GC-02K05B-00-R, with a line resolution of 2048x2 and a maximum scan frequency of 45kHz. The uniform motion speed during wall imaging is 0.8m / s. The top camera has a field of view coverage of 700mm, and the left and right side cameras have a coverage width of 200mm. The top camera has a resolution of 0.175mm / pixel, and the left and right side cameras have a resolution of 0.1mm / pixel.
[0154] The detection methods and steps are as follows:
[0155] S1. The camera is installed directly above the wall panel conveying channel. The camera calibration target is placed directly below the camera. The camera calibration target is then adjusted so that it is on the camera scanning line. The camera calibration target is then moved upward to different heights from the wall panel conveying surface and photographed to obtain several images.
[0156] Bundle Figure 2 The target plate is located directly below the camera, utilizing... Figure 2Calibration target plate and Figure 3 Adjust the camera settings until the pattern is visible in the camera image. Figure 3 All the lines of the pattern are used to find the camera scanning line position. After the camera is adjusted, the calibration target plate is placed below the scanning line at heights of 0, 10, 20, 30...190, 200 mm in 10 mm increments, and one image is taken at each position, for a total of 21 images.
[0157] S2. Calculate the camera calibration relationship polynomial based on the image obtained from S1;
[0158] Using the intersection of the camera lens optical axis and the detection surface as the image coordinate origin, and assuming that each high position has a calibration target image of the same size as the acquired image but without distortion, as the standard image, and assuming that the coordinate origin of the standard image coincides with the coordinate origin of the acquired calibration target image, calculate the midpoint coordinates of each fixed-width rectangle on the calibration target image and the midpoint coordinates of each fixed-width rectangle on the standard image, in pixels. Calculate the difference between the distance from the midpoint of each other rectangle to the coordinate origin and the distance from the corresponding midpoint of the rectangle on the standard image to the coordinate origin. Use the difference as the correction amount required for that rectangle area. The distances and correction amounts mentioned above are in pixels. A total of 21 correction amounts are obtained for each corresponding point. The coordinate points corresponding to the 21 images total 21 × 21 = 441 points, as shown in Table 1. Using the least squares method for fitting, the surface equation can be fitted as: δ = p 00 +p 10 x+p 01 h+p 20 x 2 +p 11 xh+p 02 h 2 +p 21 x 2 h+p 12 xh 2 +p 03 h 3 Equation coefficients p 00 =7.936*10 -3 p 10 =4.033*10 -8 p 01 = -7.643 * 10 -5 p 20 = -2.444 * 10 -9 p 11 =1.979*10 -10 p 02 = -1.024 * 10 -7 p 21=4.894*10 -10 p 12 = -2.634 * 10 -12 p 03 =7.008*10 -9 Curved surface graphics such as Figure 4 As shown in the figure. The scan line direction is the x-coordinate, and the h-coordinate is the height of the camera above the wall panel conveyor surface when the image is acquired.
[0159] Table 1
[0160]
[0161]
[0162]
[0163] In this embodiment, the number of calibration target plate patterns (1) is 21, and the number of height positions of the calibration target plate is 21, with one image obtained at each height. These are not limiting parameters of this technology. In specific cases, the number of height positions and the number of calibration target plate patterns (1) can be increased or decreased as needed. The smaller the height change step and the more calibration plate patterns there are, the more accurate the calibration data will be.
[0164] S3. Acquire images of the wall panel to be inspected;
[0165] A wall panel with standard dimensions of 3000mm in length, 600mm in width, and 90mm in height was scanned at a constant speed (0.8m / s) along the scanning line. The scanning frequency of the top camera was set to 4571Hz, and the scanning frequency of the two side cameras was set to 8000Hz. The resolution of the wall panel image obtained from the top was 4096×18284 pixels, and the resolution of the wall panel images obtained from the two sides was 2048×32000 pixels.
[0166] S4. Based on the camera calibration polynomial in S2, perform calibration processing on the image of the wall panel to be detected captured from directly above to obtain the calibrated image. The specific steps are as follows:
[0167] (4.1) Use the formula x0=x+δ to traverse each pixel of the entire image, where: x is the corrected coordinate, x0 is the original image coordinate, and δ is the correction amount obtained through the camera calibration relationship polynomial;
[0168] (4.2) For coordinates where x0 is not an integer, round it to the nearest integer.
[0169] (4.3) Assign the pixel value at x0 of each obtained pixel point to x;
[0170] S5. Perform edge recognition on the corrected image obtained in S4 to obtain the accurate wall panel outline area and the actual size of the wall panel to be detected.
[0171] The specific method for S5 is as follows:
[0172] (5.1) Create an image measurement model file, which includes the standard length, width, and height of the wall panel to be inspected, and the length, width, and number of rectangular blocks in the measurement model;
[0173] (5.2) Initialize the image measurement model parameters, wherein the length of the rectangular block of the measurement model, after being converted into the actual physical size, is greater than 10mm; the width of the rectangular block of the measurement model is 15% to 25% of the length;
[0174] (5.3) Set the rectangular blocks on the contour of the corrected image obtained in step (4), such that the center point of the rectangular blocks falls on the contour line; the center distance between two adjacent rectangular blocks is greater than the width of the rectangular blocks and less than 5 times the width of the rectangular blocks.
[0175] The wall panel to be inspected has the following specifications: 3000mm in length, 600mm in width, and 90mm in height. 3000, 600, and 90 are used as reference values for the distribution and contour of the rectangular blocks in the inspection and measurement model. Rectangular blocks with a width of 20 pixels and a length of 100 pixels (approximately 10mm) are set on the contour of the three faces (top, left, and right). The center point of the rectangular block coincides with the contour line, and the center distance between two adjacent rectangles is 25 pixels.
[0176] (5.4) Within each rectangular block, the Canny edge detection algorithm is used to obtain a segment of edge curve. The midpoint of the column coordinate of the edge curve is taken as an edge point. Then, all edge points are subjected to straight line fitting to obtain two sets of edge lines of the wall panel. Next, the distance between the two sides corresponding to the two sets of edge lines is calculated as the accurate measurement of the wall panel to obtain the length, width and height.
[0177] The measurements in this example are: length: 3001.03mm, width: 599.46mm and height: 89.78mm.
[0178] S6. Perform preprocessing, feature extraction, and feature filtering on the outline area of the wall panel to obtain the surface defect detection results of the wall panel.
[0179] (6.1) Perform Fourier transform on the wall panel outline area to the frequency domain image, perform Gaussian filtering on the frequency domain image to remove high-frequency features of the image and make the image smoother, and then perform inverse Fourier transform and mean-averaging after filtering.
[0180] (6.2) The processed image and the original image are jointly segmented using the watershed algorithm, and the image is segmented into multiple contour regions;
[0181] (6.3) For the segmented contour regions, calculate the maximum inscribed circle diameter and the minimum circumscribed rectangle length. Use the maximum inscribed circle diameter to represent the width of the crack defect and the minimum circumscribed rectangle length to represent the crack length.
[0182] (6.4) By defining the range of length and width values for crack defects, filter the number of sub-contour regions that meet the defect characteristics;
[0183] (6.5) According to the provisions of GB / T23451-2009 Lightweight Panels for Building Partitions, determine whether the wall panel is qualified. The length and width of the crack defect are defined as 50-100mm in length and 0.5-1.0mm in width; if the wall panel has a length error of less than 5mm, a width error of less than 2mm, a height error of less than 1.5mm, and a number of cracks of less than 2, it is considered qualified.
[0184] In this example, the measured dimensions of the wall panel are 1.03 mm in length, 0.66 mm in width, and 0.22 mm in height, with one crack defect. This meets the requirements of the GB / T23451-2009 Lightweight Panels for Building Partitions standard.
[0185] This invention enables the measurement accuracy of length, width, and height to be controlled within ±0.5mm, and the detection accuracy of crack defects is greater than 99.5%. It meets the testing requirements of GB / T23451-2009 Lightweight Panels for Building Partitions.
[0186] This invention presents a rapid, fully automated, non-contact method and apparatus for quality inspection of lightweight building wall panels. It enables rapid and efficient detection of surface quality defects and critical dimensions of wall panels on production lines and construction sites. The equipment requires no calibration, is simple to learn and use, and requires minimal expertise from operators. Therefore, this method has significant potential for widespread application and substantial engineering implications.
[0187] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A method for quality inspection of lightweight building wall panels based on image processing technology, characterized in that, Includes the following steps: Step (1): The camera is installed directly above the wall panel conveying channel. The camera calibration target plate is placed directly below the camera. Then, the camera calibration target plate is adjusted so that it is on the camera scanning line. Then, the camera calibration target plate is moved upward to different heights from the wall panel conveying surface and taken pictures to obtain several images. Step (2): Calculate the image obtained in step (1) to generate the camera calibration relationship polynomial; Step (3): Acquire images of the wall panel to be inspected; Step (4): Based on the camera calibration relationship polynomial in step (2), the image of the wall panel to be detected captured from directly above is corrected to obtain the corrected image; Step (5): Perform edge recognition on the corrected image obtained in step (4) to obtain the accurate wall panel outline area and the actual size of the wall panel to be detected. Step (6) involves preprocessing, feature extraction, and feature filtering of the precise wall panel outline area obtained in step (5) to obtain the wall panel surface defect detection results. The specific method for step (2) is as follows: (2.1) Take the intersection of the camera lens optical axis and the detection surface as the image coordinate origin. Assume that there is a standard image at each height position that is the same size as the acquired calibration target image but without distortion. Assume that the coordinate origin of the standard image coincides with the coordinate origin of the acquired calibration target image. Calculate the midpoint coordinates of each fixed-width rectangle on the calibration target image and the midpoint coordinates of each fixed-width rectangle on the standard image, in pixels. (2.2) Using the coordinates of the midpoint of each fixed-width rectangle calculated in (2.1), calculate the difference between the distance between the midpoint of each rectangle and the origin and the distance between the midpoint of the corresponding rectangle and the origin on the standard image. Use the difference as the correction amount required for the image in the rectangle area. The distance and correction amount mentioned above are measured in pixels. (2.3) Calculation steps (1) Collect all images and obtain the correction amount of each rectangular strip area in the scanning width direction corresponding to different heights; take the intersection of the camera lens optical axis and the detection surface as the origin of the coordinates, the scanning line width direction as the coordinate x, and the height of the camera from the wall plate conveying surface when collecting images as h. Perform surface fitting on the relationship between the coordinate x of the rectangular strip in the scanning line width direction, the height h of the camera when taking the image of the rectangular strip, and the corresponding correction amount to obtain the camera calibration relationship polynomial.
2. The method for quality inspection of lightweight building wall panels based on image processing technology according to claim 1, characterized in that, In step (1), the image of the calibration target plate is a set of rectangular strip patterns with fixed width and spacing.
3. The method for quality inspection of lightweight building wall panels based on image processing technology according to claim 1, characterized in that, In step (3), cameras are installed on the left and right sides of the wall panel conveying channel; several images of the left and right sides are collected respectively; and steps (5) and (6) are performed directly on the left and right side images in sequence.
4. The method for quality inspection of lightweight building wall panels based on image processing technology according to claim 1, characterized in that, The specific method for step (4) is as follows: (4.1) Use the formula x0=x+δ to traverse each pixel of the entire image, where: x is the corrected coordinate, x0 is the original image coordinate, and δ is the correction amount obtained through the camera calibration relationship polynomial; (4.2) For coordinates where x0 is not an integer, round it to the nearest integer. (4.3) Assign the pixel value at x0 of each obtained pixel point to x.
5. The method for quality inspection of lightweight building wall panels based on image processing technology according to claim 1, characterized in that, The specific method for step (5) is as follows: (5.1) Create an image measurement model, with parameters including the standard length, width, and height of the wall panel to be inspected, and the length, width, and number of rectangular blocks in the measurement model; (5.2) Initialize the image measurement model parameters, wherein the length of the rectangular block of the image measurement model, after being converted into physical dimensions, shall not be less than 10 mm; the width of the rectangular block of the measurement model shall be 20%~25% of its length; (5.3) Place the rectangular blocks on the contour of the corrected image obtained in step (4) so that the center point of the rectangular block coincides with the contour line; the center distance between two adjacent rectangular blocks is greater than the width of the rectangular block and less than 5 times the width of the rectangular block. (5.4) Use the Canny edge detection algorithm to obtain an edge curve within each rectangular block. Take the midpoint of the column coordinates of the edge curve as an edge point. Then perform a straight line fitting operation on the edge points of all rectangular blocks to obtain two sets of edges of the wall panel. Then calculate the distance between the two corresponding sides of the two sets, which are used as the accurate measured length and width of the wall panel.
6. The method for quality inspection of lightweight building wall panels based on image processing technology according to claim 1 or 5, characterized in that, The specific method for step (6) is as follows: (6.1) Perform Fourier transform on the wall panel outline area to the frequency domain image, perform Gaussian filtering on the frequency domain image to remove high-frequency features of the image and make the image smoother, and then perform inverse Fourier transform and mean-averaging after filtering. (6.2) The watershed algorithm is used to segment the processed image and the original image together, and the image is segmented into multiple contour regions; (6.3) For the segmented contour regions, calculate the maximum inscribed circle diameter and the minimum circumscribed rectangle length. Use the maximum inscribed circle diameter to represent the width of the crack defect and the minimum circumscribed rectangle length to represent the crack length. (6.4) By defining the range of length and width values for the crack defect, the number of sub-contour regions that meet the defect characteristics is selected; (6.5) Determine whether the wall panel is qualified according to the provisions of GB / T23451-2009 Lightweight strip panels for building partitions.
7. The method for quality inspection of lightweight building wall panels based on image processing technology according to claim 6, characterized in that, The length and width of the crack defect are defined as 50-100mm for length and 0.5-1.0mm for width. If the number of cracks is less than 2, the wall panel length error is less than 5mm, the width error is less than 2mm, and the thickness error is less than 1.5mm, it is considered qualified.
8. A quality inspection device for lightweight building wall panels based on image processing technology applied in the method of claim 1, characterized in that, It includes at least one camera, with a light source located next to the camera; the camera is connected to an image processor; The image processor includes a first processing module, a second processing module, a third processing module, and a wall panel quality detection module; Place the camera calibration target plate directly below the camera, then adjust the camera calibration target plate until it is on the camera scanning line, then move the camera calibration target upward to different heights from the wall plate conveying surface and take pictures to obtain several images; The first processing module is used to calculate and generate a camera calibration relationship polynomial based on images taken by the camera at different heights. The second processing module is used to perform correction processing on the image of the wall panel to be detected captured from directly above, based on the camera calibration relationship polynomial, to obtain the corrected image. The third processing module is used to perform edge recognition on the obtained calibrated image to obtain the accurate outline area of the wall panel and the actual size of the wall panel to be detected; if there are images taken from other directions, edge recognition is performed directly. The wall panel quality inspection module is used to preprocess, extract, and filter features from the obtained precise wall panel outline area to obtain the wall panel surface defect detection results.
9. The apparatus according to claim 8, characterized in that, There are three cameras, which are installed directly above, on the left side, and on the right side of the wall panel conveying channel, respectively; each camera is equipped with a light source.
Citation Information
Patent Citations
Multi-camera plate size measurement method
CN112797900A
Workpiece size detection method and device and storage medium
CN109993800A
Metal plate surface defect detection method based on machine vision
CN112326671A