An online sheet detection method and system
By using machine vision inspection methods, the dimensions and hole positions of highly reflective and matte materials are inspected, solving the problem of low accuracy in traditional manual inspection and realizing efficient and accurate material inspection on automated production lines.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDU TIANHENG SMART MFG TECH CO LTD
- Filing Date
- 2023-04-17
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional manual inspection of board dimensions and hole positions suffers from low accuracy and efficiency, making it difficult to meet the needs of automated production lines, especially for boards with different materials and varying surface characteristics.
Machine vision inspection methods are used to detect the size and hole positions of high-reflective and matte materials respectively. By segmenting the region, extracting the contour, smoothing and transforming the coordinates, and combining the blob region segmentation algorithm to identify the label region, automated online inspection is achieved.
It improves the accuracy and efficiency of plate size and hole position detection, effectively filters noise points, reduces the impact of material differences, ensures detection accuracy and speed, and enables efficient detection in automated production lines.
Smart Images

Figure CN116428981B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sheet metal testing technology, and in particular to an online sheet metal testing method and system. Background Technology
[0002] In the production of custom furniture, insufficient dimensional accuracy severely impacts installation and aesthetic appeal. The most crucial steps determining board precision are the cutting, correction, and edge banding processes. Therefore, dimensional inspection of the boards is essential for ensuring the quality of each piece. In the traditional furniture industry, dimensional inspection after edge banding relies on manual sampling. However, manual sampling cannot guarantee accurate measurement of all products, and for large boards, the inspection accuracy falls far short of 0.5mm. This results in low efficiency, long inspection times, and inconsistent accuracy of inspection tools (measuring tape), making it unsuitable for automated production lines.
[0003] Machine vision inspection methods can solve these kinds of problems currently existing in factories. Compared with manual inspection methods, machine vision inspection has significant advantages such as being non-contact, highly accurate, and fast. The sheet metal inspection system tests matrix-type sheets of varying sizes. The materials of different sheets vary, resulting in differences in surface color and texture. Furthermore, the sheet surface and edge banding may differ in material, and the edge banding has rounded corners, significantly reducing the accuracy of existing machine vision-based inspection algorithms. Therefore, improving the accuracy of inspection algorithms to meet customer requirements is a pressing technical problem that needs to be solved. Summary of the Invention
[0004] The purpose of this invention is to overcome the problems of the prior art and provide an online plate material testing method and system.
[0005] The objective of this invention is achieved through the following technical solution: an online sheet material inspection method, which includes a size inspection step and / or a hole position inspection step. The size inspection includes a size inspection sub-step for high-reflective sheet materials and / or a size inspection sub-step for matte sheet materials; the hole position inspection includes a hole position inspection sub-step for high-reflective sheet materials and / or a hole position inspection sub-step for matte sheet materials.
[0006] The dimensional inspection of highly reflective sheet materials includes: performing region segmentation and contour extraction on the inspection image to obtain the edge outline of the sheet material; and performing coordinate transformation on the edge outline to obtain the physical dimensional information of the sheet material.
[0007] The dimension inspection of matte material sheets includes: performing region segmentation and contour extraction on the inspection image to obtain the edge outline of the sheet; smoothing the edge outline of the sheet and fitting the optimal outline; and performing coordinate transformation on the optimal outline to obtain the physical dimension information of the sheet.
[0008] The hole location detection of high reflective sheet materials includes: performing region segmentation processing on the detection image to determine the sheet material region; performing contour extraction processing on the sheet material region and filtering according to preset contour targets to determine the hole location contours of the sheet material; and calculating the physical hole location information of the sheet material based on the hole location contours.
[0009] Hole location detection of matte material sheets includes: performing region segmentation processing on the detection image to determine the sheet area; performing contour extraction processing on the sheet area and filtering according to preset contour targets to determine the hole location contours of the sheet; performing contour smoothing processing on the hole location contours to obtain the optimal hole location contours; and calculating the physical hole location information of the sheet based on the optimal hole location contours.
[0010] In one example, the region segmentation and contour extraction processing of the detected image includes:
[0011] Thresholding is applied to the detected image to filter out board material areas, and the board material areas are converted into board material outlines.
[0012] The outline of the board is sequentially expanded and contracted to extract the edge outline image of the board.
[0013] Shape fitting is performed on the edge contour image to obtain the edge contour of the board.
[0014] In one example, the filtering based on a preset contour target includes:
[0015] The extracted contours are filtered according to the preset contour targets to obtain preliminary contours that meet the length characteristics;
[0016] The initial outline is filtered for roundness to obtain a circular outline;
[0017] The circular contour is fitted to obtain the hole contour of the plate.
[0018] In one example, the contour smoothing process for the hole location includes:
[0019] The average gray value K1 is obtained by calculating the average gray value of the hole contour image.
[0020] The histogram method is used to find the binarization threshold k2 of the hole location contour image;
[0021] The average gray value K1 and the binarization threshold k2 are averaged to obtain the binarization threshold.
[0022] The hole contour image is binarized to obtain the optimal hole contour.
[0023] In one example, the method further includes a plate material determination step:
[0024] Calculate the average gray value of the board area. If the average gray value is greater than or equal to the threshold, it is a high-gloss board; if the average gray value is less than the threshold, it is a matte board.
[0025] In one example, the method further includes:
[0026] Identify the label region of the target image;
[0027] The label area is identified to obtain the standard size information and standard hole position information of the board material;
[0028] Determine whether the physical dimensions and hole positions of the board are qualified based on the standard size information and standard hole position information.
[0029] In one example, determining the label region of the target image includes the following steps:
[0030] A blob region segmentation algorithm is used to obtain the black rectangular region of the high-brightness board image, and then the label region is determined; and / or,
[0031] The blob region segmentation algorithm is used to obtain the white rectangular region of the dark material board image, and then the label region is determined.
[0032] It should be further noted that the technical features corresponding to the above examples can be combined or replaced to form new technical solutions.
[0033] The present invention also includes a storage medium storing computer instructions thereon, which, when executed, perform the steps of the online board material testing method formed by any or more of the above examples.
[0034] The present invention also includes a terminal comprising a memory and a processor, wherein the memory stores computer instructions executable on the processor, and the processor executes the steps of the online board material inspection method formed by any or more of the above examples when executing the computer instructions.
[0035] The present invention also includes an online sheet material inspection system, the system comprising a central computing control unit, the central computing control unit integrating a size detection module and / or a hole position detection module; the size detection module includes a high-reflectivity sheet material size detection sub-module and / or a matte material sheet material size detection sub-module; the hole position detection module includes a high-reflectivity sheet material hole position detection sub-module and / or a matte material sheet material hole position detection sub-module;
[0036] The high-reflectivity sheet size detection submodule is used to perform region segmentation and contour extraction on the detection image to obtain the edge outline of the sheet; and to perform coordinate transformation on the edge outline to obtain the physical size information of the sheet.
[0037] The matte material sheet size detection submodule is used to perform region segmentation and contour extraction on the detection image to obtain the edge outline of the sheet; smooth the edge outline of the sheet and fit the best outline; perform coordinate transformation on the best outline to obtain the physical size information of the sheet.
[0038] The high-reflectivity sheet metal hole location detection submodule is used to perform region segmentation processing on the detection image to determine the sheet metal region; to perform contour extraction processing on the sheet metal region and filter it according to the preset contour target to determine the hole location contour of the sheet metal; and to calculate the physical hole location information of the sheet metal based on the hole location contour.
[0039] The hole location detection submodule for matte material sheets is used to perform region segmentation processing on the detection image to determine the sheet area; perform contour extraction processing on the sheet area and filter according to the preset contour target to determine the hole location contour of the sheet; perform contour smoothing processing on the hole location contour to obtain the optimal hole location contour; and calculate the physical hole location information of the sheet based on the optimal hole location contour.
[0040] In one example, the system further includes:
[0041] The positioning detection unit, connected to the central computing and control unit, is used to detect the position information of the board on the conveyor belt;
[0042] The image acquisition unit, connected to the central computing and control unit, is used to acquire image information of the plates on the conveyor belt.
[0043] In one example, the image acquisition unit includes a first image acquisition module and / or a second image acquisition module;
[0044] The first image acquisition module is used to acquire target images required for tag recognition, including a line scan camera and a high-brightness light source. The line scan camera is installed vertically to the conveyor belt, and the high-brightness light source is installed at a 35°-50° angle to the conveyor belt.
[0045] The second image acquisition module is used to acquire the detection images required for size detection and / or hole position detection. It includes a wide-field line scan camera and a custom light source. The wide-field line scan camera is installed vertically to the conveyor belt, and the custom light source is installed at an angle of 85°-95° to the conveyor belt.
[0046] It should be further noted that the technical features corresponding to the above system examples can be combined or replaced to form new technical solutions.
[0047] Compared with the prior art, the beneficial effects of the present invention are:
[0048] 1. In one example, the present invention performs size detection and hole position detection processing on boards of different materials respectively, so as to take into account boards of different colors and roughness, effectively filter noise points in images of different materials, reduce the impact of different materials on image segmentation, contour extraction and other algorithms, thereby ensuring the accuracy of size and hole position detection.
[0049] 2. In one example, the board outline is expanded and contracted sequentially, which can eliminate the gray value change in the middle area of the board caused by the chamfered arc of the edge sealing area, thereby accurately extracting the edge outline image of the board; at the same time, the edge outline extraction combined with shape fitting can better preserve the weak sub-pixel edges, thereby improving the detection accuracy.
[0050] 3. In one example, filtering the hole contour by length features and roundness can effectively filter out interfering information. Finally, round contour fitting can effectively and realistically capture the hole contour.
[0051] 4. In one example, contour smoothing can reduce the influence of background features on the hole contour and ensure the accuracy of hole detection.
[0052] 5. In one example, using the blob region segmentation algorithm to determine the rectangular region corresponding to the label can greatly improve the label detection efficiency and reduce the detection time overhead.
[0053] 6. In one example, a high-brightness light source installed at a 35°-50° angle to the board material is used for illumination, which helps to separate the board material from the background of the black conveyor belt to the greatest extent, reducing the difficulty of subsequent segmentation of the foreground target (board material) and the background; a custom light source installed at an almost 90° angle to the board material can solve the problem that about 30% of the dark edge banding tape is very similar to the background of the conveyor belt, which is beneficial for subsequent image segmentation processing and ensures detection speed and detection accuracy. Attached Figure Description
[0054] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings, which are used to provide a further understanding of the present application and constitute a part of the present application. The same reference numerals are used in these drawings to denote the same or similar parts. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application.
[0055] Figure 1 This is a flowchart of a size detection and hole position detection method in an example of the present invention;
[0056] Figure 2 This is a flowchart of a size detection method in an example of the present invention;
[0057] Figure 3 This is a flowchart of a hole position detection method in an example of the present invention;
[0058] Figure 4 This is a flowchart of a QR code detection method in an example of the present invention;
[0059] Figure 5 Here is a flowchart of a preferred example online detection method of the present invention;
[0060] Figure 6 This is a schematic diagram of the installation of a line scan camera and a high-brightness light source in one example of the present invention;
[0061] Figure 7 This is a schematic diagram of the installation of a wide-field line scan camera and a custom light source in one example of the present invention;
[0062] Figure 8 This is a preferred example system block diagram of the present invention.
[0063] In the diagram: 1-Sheet material; 2-Conveyor belt; 3-Line scan camera; 4-High-brightness light source; 5-Wide-format line scan camera; 6-Custom light source. Detailed Implementation
[0064] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] In the description of this invention, it should be noted that the directions or positional relationships indicated by terms such as "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer" are based on the directions or positional relationships shown in the accompanying drawings. They are used only for the convenience of describing this invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention. Furthermore, the use of ordinal numbers (e.g., "first and second," "first to fourth," etc.) is for distinguishing objects and is not limited to this order, and should not be construed as indicating or implying relative importance.
[0066] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0067] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0068] In one example, an online sheet material inspection method includes a size inspection step and / or a hole position inspection step, preferably including both a size inspection step and a hole position inspection step. The two inspection steps can be executed simultaneously or sequentially (size inspection first or hole position inspection first). Similarly, the size inspection sub-steps for high-reflective sheets and matte sheets can also be executed simultaneously or sequentially, as can the hole position inspection sub-steps for high-reflective sheets and matte sheets. Figure 1 As shown, the implementation steps of the detection method in this example are as follows:
[0069] S11: Perform the dimensional inspection sub-step for high-reflectivity sheet materials;
[0070] S12: Perform the dimensional inspection sub-step for matte material sheets;
[0071] S21: Perform the hole position detection sub-step for high reflective sheet materials;
[0072] S22: Perform the hole position detection sub-step for matte material sheets.
[0073] Furthermore, the dimensional inspection of high-reflectivity sheets includes:
[0074] S111: Perform region segmentation and contour extraction on the detected image to obtain the edge contour of the board.
[0075] S112: Perform coordinate transformation on the edge contour to obtain the physical dimension information of the board. Here, the physical dimension information is the actual dimension information, including the length and width of the board, etc.
[0076] Further, for the coordinate transformation, a corresponding coordinate system needs to be established. Preferably, the length and width directions of the conveyor belt or the board are used as the x-axis and y-axis directions.
[0077] Among them, the detected image is a high-definition image including the board, and the detected image generally also includes background information, such as the conveyor belt, environmental information, etc. The conveyor belt background is included in the detected image because it is preferred to collect the board image on the conveyor belt online, and then perform the above-mentioned size detection and hole position detection methods. According to the detection results, it is determined whether the size, hole position, etc. of the board are qualified, so as to achieve the automated production and detection of the board. Further
[0078] Further, the size detection of the matte material board includes:
[0079] S121: Perform region segmentation and contour extraction on the detected image to obtain the edge contour of the board.
[0080] S122: Smooth the edge contour of the board and fit to obtain the best contour.
[0081] S123: Perform coordinate transformation on the best contour to obtain the physical dimension information of the board.
[0082] As an option, the region segmentation can be implemented by the threshold segmentation method, that is, to separate the background image and the target image (board image). The contour extraction preferably performs contour extraction on the binary image. Of course, contour extraction can also be achieved based on the boundary tracking method.
[0083] Further, the hole position detection of the highly reflective board includes:
[0084] S211: Perform region segmentation on the detected image to determine the board region.
[0085] S212: Perform contour extraction on the board region and screen according to the preset contour target to determine the hole position contour of the board.
[0086] S213: Calculate the physical hole position information of the board according to the hole position contour. Here, the physical hole position information is the actual hole position information, including the inner hole diameter, outer hole diameter, inner hole circumference, outer hole circumference, hole coordinate information, etc.
[0087] Furthermore, the hole position detection of matte material sheets includes:
[0088] S221: Perform region segmentation processing on the detected image to determine the board material region;
[0089] S222: Extract the contour of the board area and filter it according to the preset contour target to determine the hole contour of the board; wherein, the preset contour target is set according to the outer contour of the hole, and preferably the preset contour is a range value rather than a custom one.
[0090] S223: Perform contour smoothing on the hole position contour to obtain the optimal hole position contour;
[0091] S224: Calculate the physical hole position information of the plate based on the optimal hole position profile.
[0092] Of course, hole position detection can directly determine the board area based on the area segmentation processing results of size detection, thereby saving computation time.
[0093] In this example, the present invention performs size detection and hole position detection processing on boards of different materials respectively, so as to take into account boards of different colors and roughness, effectively filter noise points in images of different materials, reduce the impact of different materials on image segmentation, contour extraction and other algorithms, thereby ensuring the accuracy of size and hole position detection.
[0094] This invention aims to rapidly and accurately identify the appearance dimensions and hole positions on boards of different materials, and calculate the relevant physical spatial geometric relationships, thereby replacing the traditional manual sampling and measurement method. In one example, the processing of the detection image, including region segmentation and contour extraction, includes:
[0095] a. Threshold the detected image to filter the board area and convert the board area into the board outline;
[0096] b. The outline of the board is expanded and contracted sequentially to extract the edge outline image of the board;
[0097] c. Perform shape fitting processing on the edge contour image to obtain the edge contour of the board.
[0098] Preferably, the procedure further includes:
[0099] Set the direction of the sheet material production line as the y-axis and the horizontal direction as the X-axis to establish an actual physical coordinate system.
[0100] Preferably, for highly reflective sheet materials, the first step is to perform smoothing filtering on the acquired image, segment the sheet material area using a fixed threshold (e.g., 35), and then perform opening operations on the segmented sheet material area to filter edge noise, selecting the area with the largest area as the sheet material area. Simultaneously, the area is converted into a contour. Since the edge sealing area of the sheet material has a 45-degree chamfered arc, the brightness will differ slightly from the grayscale value of the central area. The previously extracted contour is first dilated by 10 pixels (dilation_rectangle1), then eroded by 10 pixels (erosion_rectangle1) to obtain the central area as the recognition area for accurate edge extraction. The central area is then cropped as the edge contour image, which further reduces the image computation workload. The Canny operator is used to perform edge filtering on the edge contour image to calculate the sub-pixel contour edge. Rectangle fitting is then performed on the extracted sub-pixel edges to fit a high-precision rectangular contour of the sheet material edge. At this point, the length and width pixels of the sheet material rectangle are converted to the actual physical length and width according to the calibration accuracy conversion relationship.
[0101] Preferably, for matte materials, the edge extraction method is basically the same as that for high-reflectivity materials, except that after obtaining the middle area, the image needs to be enhanced by scale_image (the enhancement coefficient will decrease as the average gray value of the middle area increases) to increase the contrast of the edge contour. The extraction of the image contour (edge outline contour) also adopts the cany algorithm, extracting the edge contour in a sub-pixel manner, and smoothing the extracted edge contour (contour smoothing operator smooth_contours_xld). Finally, the smoothed contour is fitted to obtain the best rectangular contour (moment fitting smoothing operator fit_rectangle2_contour_xld) to further improve the detection accuracy.
[0102] The aforementioned size detection method aims to find the optimal edge, and noise removal and preservation are well balanced. It can also preserve weaker sub-pixel edges well, while the detection processing speed is relatively fast.
[0103] As an option, three different parameters (such as image pixel parameters) are adaptively used for contour edge extraction to calculate three different contours. The average value of multiple contour measurements is used as the final actual measurement value to further improve detection accuracy.
[0104] In one example, filtering based on a preset contour target includes:
[0105] a. The extracted contours are filtered according to the preset contour targets to obtain preliminary contours that meet the length characteristics;
[0106] b. Perform roundness screening on the preliminary outline to obtain a circular outline;
[0107] c. Fit the circular contour to obtain the hole contour of the plate.
[0108] Preferably, for highly reflective sheet materials, the first step involves segmenting the sheet material area using the dimensional information obtained from size detection. The segmented sheet material image is then reduced by 20 pixels to decrease noise at the contour edges. A differential-based sharpening algorithm is used to extract sub-pixel contours from the reduced image. The extracted contours are first filtered based on a set contour length, and those meeting the length requirement are then filtered based on a set roundness. The resulting contours are highly rounded. Finally, the obtained rounded contours are fitted to a single circular contour, and the center point and radius of the hole are calculated. The distances of the obtained hole center coordinates to the previously set x and y coordinate axes are measured, and the relative coordinates of the circular hole to the coordinate axes are calculated accordingly.
[0109] Preferably, for matte-finish boards, the hole detection method is basically the same as the above-mentioned high-reflectivity board detection method. The only difference is that after acquiring the segmented board image, an adaptive image smoothing process needs to be added, that is, the hole contour is smoothed.
[0110] Preferably, the contour smoothing process for the hole location includes:
[0111] The average grayscale value (intensity) of the segmented image is calculated to obtain the average grayscale value K1. Simultaneously, a histogram method is used to find the binarization threshold k2 (the histogram method selects the binarization threshold mainly by identifying the two highest peaks in the image, and then taking the threshold value at the lowest point of the valley between the two peaks). Finally, a threshold of (k1+k2) / 2 is used to binarize the image, converting the grayscale image into a binary image. The method for detecting circular holes in the high-brightness board is repeated, and the coordinates of all holes are calculated sequentially. Finally, using the converted data of the physical dimensions calibrated by size measurement, the relative physical coordinate data of the holes in the board are obtained by converting all the corresponding pixel coordinate information.
[0112] In one example, the method also includes a board material determination step:
[0113] The average grayscale value of the board area is calculated. If the average grayscale value is greater than or equal to a threshold, it is a high-gloss board; if the average grayscale value is less than the threshold, it is a matte board. The threshold can be a range value, such as 250-255, preferably 255. Combining the above examples, the preferred size detection method of the present invention is obtained as follows: Figure 2 As shown, it includes the following steps:
[0114] S11': Obtain the inspection image of the board material;
[0115] S12': Perform threshold segmentation on the detected image to determine the board material region;
[0116] S13': Calculate the average gray value of the board area, and determine whether the average gray value is greater than or equal to the threshold. If yes, proceed to step S14'; otherwise, proceed to step S15'.
[0117] S14': Perform region segmentation and contour extraction on the detected image to obtain the edge outline of the board; calculate the center distance between opposite edges based on the edge outline and perform coordinate transformation to obtain the physical dimension information of the board;
[0118] S15': Perform region segmentation and contour extraction on the detected image to obtain the edge outline of the board material; smooth the edge outline of the board material, and calculate the board material dimensions L1 and W1 (length) and L2 and W2 (width) using rectangle fitting and least squares method, respectively. The weight of rectangle fitting is 0.7, and the weight of least squares method is 0.3. Of course, the weight coefficients can be adaptively adjusted.
[0119] The preferred method for pore position detection in this invention is as follows: Figure 3 As shown, it includes the following steps:
[0120] S21': Obtain sheet material size information;
[0121] S22': Perform region segmentation processing on the board image to determine the board region;
[0122] S23': Calculate the average gray value of the board area, and determine whether the average gray value is greater than or equal to the threshold. If yes, proceed to step S24'; otherwise, proceed to step S25'.
[0123] S24': Extract the contour of the board area and filter it according to the preset contour target to determine the hole contour of the board; calculate the hole diameter and centerline point, and output the relative position and diameter of the hole;
[0124] S25': Extract the contour of the board area and filter it according to the preset contour target to determine the hole contour of the board; smooth the hole contour and calculate the hole size r1 and coordinates (x1, y1) and hole size r2 and coordinates (x2, y2) using circle fitting and maximum inscribed circle fitting, respectively. The weight of circle fitting is 0.3 and the weight of inscribed circle fitting is 0.7. Of course, the weight coefficients can be adaptively adjusted.
[0125] In one example, the detection method also includes:
[0126] S01: Determine the label area of the target image; where both the target image and the detection image are for collecting the material on the conveyor belt, the only difference being that they are collected by different image acquisition devices.
[0127] S02: Identify the label area and obtain the standard size information and standard hole position information of the board; among them, the standard size information and standard hole position information are the design targets of the board, namely the design size information and design hole position information.
[0128] S03: Determine whether the physical dimensions and physical hole positions of the board are qualified based on the standard dimension information and standard hole position information.
[0129] The label area can be a barcode area or a QR code area; in this example, a QR code area is preferred. Standard size information and standard hole position information are pre-stored target size information, generally provided by the customer. When the difference between the standard size information and the physical size information exceeds a threshold range, the material is considered non-compliant. In this case, the conveyor control system can separate and pick out the non-compliant material for secondary processing or discard it. Similarly, when the difference between the standard hole position information and the physical hole position information exceeds a threshold range, the material is considered non-compliant. The conveyor control system can also separate and pick out the non-compliant material, thus achieving automatic online detection and sorting.
[0130] In one example, determining the label region of a target image includes the following steps:
[0131] A blob region segmentation algorithm is used to obtain the black rectangular region of the high-brightness board image, and then the label region is determined; and / or,
[0132] The blob region segmentation algorithm is used to obtain the white rectangular region of the dark material board image, and then the label region is determined.
[0133] To address the issue of inconsistent label placement, rapid label location is necessary before barcode reading. This invention first employs an intensity image processing algorithm to calculate the grayscale distribution range of different colored boards and background areas. Preferably, as... Figure 4 As shown, determining the label region of the target image specifically includes:
[0134] The average grayscale value of the background area of the conveyor belt is stable within the range of 20 grayscale values. Simultaneously, it's crucial to ensure that the grayscale value of the image presented on the surfaces of various colors of the boards is consistently above 35 grayscale values under the current lighting angle. At this point, a threshold segmentation image processing algorithm can be used to stably segment the board area. After stably segmenting the board area, it needs to be cropped, and the average grayscale value (gray_mean) of the current area is calculated. Since the label (white background, black text) is directly cropped under the current lighting conditions, the average grayscale value of the current area is calculated to be around 252. If the gray_mean is greater than 252, the current board is determined to be a highly reflective board; otherwise, it is determined to be a dark-colored board. For highly reflective boards, the label background color and the board color grayscale range are basically the same. Therefore, it is necessary to first extract the board area as the detection area, and then use adaptive thresholding to filter out black dark areas in the image of the detection area. Dark areas may be interference areas such as label character areas or through holes on the board. These dark areas are processed by connected image algorithms, followed by image processing such as closing operations. Then, the label character areas are filtered out using roundness and area features. According to the characteristics of QR codes, after the closing operation, it is basically a standard rectangle. Finally, the QR code area on the label is extracted using the rectangle image algorithm. Finally, the label area is cropped as the QR code image for recognition, thereby shortening the QR code recognition time.
[0135] For dark-colored boards, the average grayscale range of the label area is larger than that of the board background area. First, the extracted board area is smoothed and filtered to remove noise such as gray dust. Then, the extracted board area is segmented with a fixed threshold. The segmented image is processed by opening and closing operations. Since the label is a standard rectangle of fixed size, the label area is selected by features such as rectangularity and size. Finally, the extracted individual label areas are read and recognized using QR codes.
[0136] Combining the above examples yields the most preferred example of the present invention, such as... Figure 5 As shown, the detection method at this time includes the following steps:
[0137] S1': Determine the label area of the target image, identify the label area, and obtain the standard size information and standard hole position information of the board;
[0138] S2': Perform the dimensional inspection step;
[0139] S3': Compare the standard size information with the physical size information to determine whether the board size is qualified; if not qualified, proceed to the manual sorting channel; if qualified, proceed to step S4'.
[0140] S4': Perform the hole position detection step;
[0141] S5': Compare the standard hole position information with the physical hole position information to determine whether the hole position of the board is qualified; if it is not qualified, it enters the manual sorting channel; if it is qualified, it enters the corresponding board batch channel to complete the automatic online detection of the board.
[0142] As an option, when performing the size detection step in step S2', the plate area acquisition step can be omitted, and the plate area acquired in S1' can be used directly. Similarly, when performing the hole position detection step in step S4', the plate area acquisition step can be omitted, and the plate area acquired in S1' or S2' can be used directly, preferably the plate area acquired in the size detection step, to ensure image precision and facilitate target feature extraction.
[0143] This application also includes a storage medium having the same inventive concept as the online board material testing method comprising any or more of the above examples, wherein computer instructions are stored thereon, which, when executed, perform the steps of the above-described online board material testing method.
[0144] Based on this understanding, the technical solution of this embodiment, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0145] This application also includes a terminal having the same inventive concept as the online board material inspection method comprising any or more of the above examples, including a memory and a processor. The memory stores computer instructions executable on the processor, which, when executing the computer instructions, performs the steps of the online board material inspection method described above. The processor may be a single-core or multi-core central processing unit or a specific integrated circuit, or one or more integrated circuits configured to implement the present invention.
[0146] In the embodiments provided by this invention, the functional units can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. This invention also includes an online sheet metal inspection system, which includes a central computing control unit, preferably expandable into a control subsystem. In this example, the central computing control unit preferably includes an interconnected host computer and a slave computer (PLC), with the host computer integrating a size detection module and / or a hole position detection module, preferably integrating both. The size detection module includes a high-reflectivity sheet metal size detection submodule and / or a matte material sheet metal size detection submodule, preferably including both; the hole position detection module includes a high-reflectivity sheet metal hole position detection submodule and / or a matte material sheet metal hole position detection submodule, preferably including both.
[0147] The high-reflectivity sheet size detection submodule is used to perform region segmentation and contour extraction on the detection image to obtain the edge outline of the sheet; and to perform coordinate transformation on the edge outline to obtain the physical size information of the sheet.
[0148] Furthermore, the matte material sheet size detection submodule is used to perform region segmentation and contour extraction processing on the detection image to obtain the edge outline of the sheet; to smooth the edge outline of the sheet and fit the optimal outline; and to perform coordinate transformation processing on the optimal outline to obtain the physical size information of the sheet.
[0149] Furthermore, the high-reflectivity sheet metal hole location detection submodule is used to perform region segmentation processing on the detection image to determine the sheet metal region; to perform contour extraction processing on the sheet metal region and to filter it according to the preset contour target to determine the hole location contour of the sheet metal; and to calculate the physical hole location information of the sheet metal based on the hole location contour.
[0150] Furthermore, the matte material board hole position detection submodule is used to perform region segmentation processing on the detection image to determine the board area; perform contour extraction processing on the board area and filter according to the preset contour target to determine the hole position contour of the board; perform contour smoothing processing on the hole position contour to obtain the optimal hole position contour; and calculate the physical hole position information of the board based on the optimal hole position contour.
[0151] Furthermore, in this example, the host computer and / or slave computer determine whether the current board's dimensions and hole positions are qualified based on the label recognition results, size detection results, and hole position detection results. If they are not qualified, an alarm is issued. Preferably, the host computer can be connected to a sorting system, which is connected to an actuator such as a robot. By controlling the robot, unqualified boards are sorted from the conveyor belt, improving the automation level of the entire system. More preferably, the host computer can control the robot to intelligently classify qualified boards for the same customer and send the channel signal data to the slave computer (PLC) via TCP communication. The sorting mechanism then performs the corresponding sorting actions. Unqualified products are automatically sorted to the manual re-inspection channel.
[0152] In one example, the central computing control unit also integrates a label recognition unit to determine the label area of the target image; the label area is recognized to obtain the standard size information and standard hole position information of the board.
[0153] In one example, the system also includes a positioning detection unit and an image acquisition unit, both connected to the lower-level machine in the central computing control unit. The positioning detection unit detects the position information of the board material on the conveyor belt and feeds this information back to the lower-level machine. Preferably, the positioning detection unit can be a pair of photoelectric through-beam sensors, with the photoelectric transmitter and receiver positioned at opposite ends of the conveyor belt. When no board material passes the current position, the photoelectric receiver can receive the photoelectric signal emitted by the photoelectric transmitter; when a board material passes the current position, the photoelectric receiver cannot receive the photoelectric signal emitted by the photoelectric transmitter. At this time, the lower-level machine determines that the board material has passed the current photoelectric through-beam sensor position based on the feedback information from the photoelectric receiver, and controls the image acquisition unit to start working, acquiring the image of the board material, i.e., the detection image.
[0154] In one example, the system also includes a speed detection unit connected to the lower-level computer in the central computing control unit, used to detect the real-time running speed of the sheet material on the conveyor belt. Preferably, the speed acquisition unit is an encoder mounted on the conveyor belt.
[0155] In one example, the image acquisition unit includes a first image acquisition module and / or a second image acquisition module;
[0156] The first image acquisition module is used to acquire the target image required for label (QR code) recognition. Specifically, such as... Figure 6As shown, the first image acquisition module includes a DALSA 2K line scan camera 3, a high-brightness light source 4, etc. The line scan camera 3 is installed perpendicular to the conveyor belt 2, and the high-brightness light source 4 is installed at a 45° angle to the plate 1 on the conveyor belt 2. Specifically, when selecting a specific model of a black and white line scan barcode reader, the camera resolution, maximum acquisition frequency, and other parameters are considered first. The resolution of the line scan camera refers to the number of pixels when acquiring a line of images horizontally. This parameter directly determines the horizontal accuracy. The higher the resolution, the clearer the acquired image, and the higher the accuracy for size measurement. However, for QR code reading, higher image accuracy is not always better. Higher image accuracy results in a larger data volume and a longer QR code retrieval time. Based on the principle that 2-4 pixels per QR code dot is the optimal pixel distribution for QR code recognition, and combined with the actual physical size detection width of 800mm, the pixel count range is calculated to be 1600-3200. Considering the transmission rate parameter, a 2K resolution line scan camera is preferred for QR code reading and recognition. The purpose of selecting a high-brightness light source is to maximize the separation between the detection material and the black conveyor belt background. The 45-degree angle of the light source is primarily to address the issue of approximately 30% of dark-colored materials being very similar to the conveyor belt background, especially materials like black rubber, thus reducing the difficulty of subsequent segmentation between the foreground target (material) and the background. Close-range installation of the high-brightness light source ensures sufficient stable and high-quality images of both the background and the material. The workflow of the line scan camera, encoder, high-brightness light source, host computer, slave computer, and photoelectric sensor is as follows:
[0157] The second image acquisition module is used to acquire the detection images required for size detection and hole position detection, such as... Figure 7As shown, the system includes an 8K wide-format line scan camera 5, a custom light source 6, etc. The wide-format line scan camera 5 is installed perpendicularly to the conveyor belt 2, and the custom light source 6 is installed at a 90° angle to the plate 1 on the conveyor belt 2. Specifically, when selecting a specific model of a black-and-white line scan camera, parameters such as camera resolution and maximum acquisition frequency are considered first. The higher the resolution, the clearer the acquired image, and the higher the accuracy of size measurement. Combining the actual physical size detection width of 800mm and the requirement for a detection accuracy of 0.1mm, the pixel count range is calculated to be 8000. However, the selection of the lens faces two problems: first, high depth of field: compatibility with 18mm and 25mm thickness plates; second, low distortion: reducing lateral systematic errors in size measurement. To address these issues, this invention selects a wide-format line scan camera, which is rare in the market. Because the lateral pixel photosensitive units of the wide-format camera are evenly distributed in physical position, the distortion problem caused by the lens in traditional methods is completely avoided. Due to the unique imaging height of the wide-format camera, this invention employs a custom-designed light source to maximize the separation between the inspected material and the black conveyor belt background. The installation angle is almost 90 degrees, aiming to address the issue of approximately 30% of dark-colored edge banding tape being very similar to the conveyor belt background, especially for materials like black rubber. This facilitates subsequent image segmentation processing, ensuring both inspection speed and accuracy. Furthermore, the close-range installation of the custom-designed light source guarantees sufficiently stable and high-quality images of both the background and the material.
[0158] By combining the above system examples, a preferred embodiment of the detection system of the present invention is obtained, such as... Figure 8As shown, the system includes a central computing control unit, a positioning and detection unit, a speed acquisition unit, a line scan camera, and a wide-field line scan camera. The central computing control unit is connected to the execution mechanism via a sorting system. The line scan camera is located upstream of the conveyor belt, and the wide-field line scan camera is located downstream. The sheet material passes through the line scan camera first and then the wide-field line scan camera. The line scan camera, along with a pair of photoelectric through-beam sensors (front-end sensors), works with the host computer and the slave computer to achieve 2D image positioning and detection of the sheet material. The wide-field line scan camera (middle detection camera), along with another pair of photoelectric through-beam sensors (middle sensors), works with the host computer and the slave computer to achieve size detection and hole position detection of the sheet material. When the sheet material flows into the detection line, the first end of the sheet material blocks the photoelectric through-beam sensor at the front station, immediately triggering the line scan camera to start acquiring images. The camera's acquisition speed changes in real-time according to the encoder's acquisition of the conveyor belt speed. When the middle sensor detects that the sheet material has left, it stops acquiring images and sends the image data acquired by the image sensor to the host computer. Since the QR code labels are randomly affixed to the surface of the board, the label area needs to be initially located across the entire board area. Then, the image of the located area is used for QR code recognition. The recognized QR code information is then queried from a database to obtain the theoretical standard dimensions, standard hole positions, and sorting window information for the board. If the QR code label is damaged or missing, making the board unrecognizable, it is directly classified to the manual re-test window. As the board passes through the intermediate sensor, it triggers the dimensional measurement line scan camera to begin acquiring images. The acquisition speed is determined by the encoder's real-time acquisition speed. Once the intermediate sensor detects the board has left, it stops acquiring images and transmits the acquired image data to the host computer. Due to the high-precision detection requirements, higher accuracy of the dimensional detection results is needed; achieving this requires ensuring high-quality image signals. The size detection module and hole position detection module in the host computer execute image processing detection algorithms to calculate the actual physical size information and physical hole position information of the board. Finally, based on the factory's actual set allowable deviation range, it judges whether the board size and hole position are qualified. At the same time, combined with the type of board, it determines the current board's outflow channel signal and sends it to the lower computer to perform the corresponding diversion operation.
[0159] The sheet metal inspection system provided by this invention features high inspection efficiency and accuracy. It can automatically classify, screen, and track sheet metal products, improving the accuracy of full-inspection, reducing repetitive workload for employees, and replacing some manual labor. Simultaneously, it can promptly detect, judge, and sort products without labels, or with incorrect dimensions or hole positions, and provide background alarms. It also assists the backend system in statistically evaluating and assessing production volume and quality across different shifts and employee numbers.
[0160] The above detailed embodiments are a description of the present invention. It should not be considered that the specific embodiments of the present invention are limited to these descriptions. For those skilled in the art, several simple deductions and substitutions can be made without departing from the concept of the present invention, and all of these should be considered to fall within the protection scope of the present invention.
Claims
1. An online method for testing sheet materials, characterized in that: It includes a size inspection step and a hole position inspection step. The size inspection includes a size inspection sub-step for high reflective sheet materials and a size inspection sub-step for matte sheet materials. Hole position detection includes sub-steps for hole position detection of high reflective sheet materials and sub-steps for hole position detection of matte sheet materials; Dimensional inspection of high-reflectivity sheets includes: The detected image is processed by region segmentation and contour extraction to obtain the edge outline of the board material; The physical dimensions of the sheet material are obtained by performing coordinate transformation on the edge outline. Dimensional inspection of matte sheet materials includes: The detected image is processed by region segmentation and contour extraction to obtain the edge outline of the board material; The edge contour of the board is smoothed, and the length L1 and width W1 of the board and the length L2 and width W2 of the board are calculated by rectangle fitting and least squares method respectively. The weight of rectangle fitting and the weight coefficient of least squares method are adaptively adjusted to obtain the best contour. The optimal shape contour is subjected to coordinate transformation to obtain the physical dimensional information of the sheet material; Hole position detection of high reflectivity sheets includes: The detected image is segmented to determine the board material region; The contour of the board area is extracted and filtered according to the preset contour target to determine the contour of the hole position of the board. Calculate the physical hole position information of the plate based on the hole position profile; Hole position inspection of matte material sheets includes: The detected image is segmented to determine the board material region; The contour of the board area is extracted and filtered according to the preset contour target to determine the contour of the hole position of the board. The hole contour is smoothed, and the hole size r1 and coordinates (x1, y1) and hole size r2 and coordinates (x2, y2) are calculated by using circle fitting and maximum inscribed circle fitting, respectively. The weights of circle fitting and maximum inscribed circle fitting are adaptively adjusted to obtain the optimal hole contour. Calculate the physical hole position information of the plate based on the optimal hole position profile; The process of region segmentation and contour extraction of the detected image includes: Thresholding is applied to the detected image to filter out board material areas, and the board material areas are converted into board material outlines. The outline of the board is sequentially expanded and contracted to extract the edge outline image of the board. The edge contour image is fitted to obtain the edge contour of the board. The contour smoothing process for the hole location includes: The average gray value K1 is obtained by calculating the average gray value of the hole contour image. The histogram method is used to find the binarization threshold k2 of the hole location contour image; The average gray value K1 and the binarization threshold k2 are averaged to obtain the binarization threshold. The hole location contour image is binarized to obtain the optimal hole location contour; The method also includes a plate material determination step: Calculate the average gray value of the board area. If the average gray value is greater than or equal to the threshold, it is a high-reflectivity board; if the average gray value is less than the threshold, it is a matte material board.
2. The online plate testing method according to claim 1, characterized in that: The filtering based on the preset contour target includes: The extracted contours are filtered according to the preset contour targets to obtain preliminary contours that meet the length characteristics; The initial outline is filtered for roundness to obtain a circular outline; The circular contour is fitted to obtain the hole contour of the plate.
3. The online plate testing method according to claim 1, characterized in that: The method further includes: Identify the label region of the target image; The label area is identified to obtain the standard size information and standard hole position information of the board material; Determine whether the physical dimensions and hole positions of the board are qualified based on the standard size information and standard hole position information.
4. The online plate testing method according to claim 3, characterized in that: Determining the label region of the target image includes the following steps: The blob region segmentation algorithm is used to obtain the black rectangular region of the highly reflective sheet image, and then the label region is determined. The white rectangular region of the matte material image is obtained using the blob region segmentation algorithm, and then the label region is determined.
5. An online board material inspection system, characterized in that: The system includes a central computing control unit, which integrates a size detection module and a hole position detection module; the size detection module includes a high-reflectivity sheet material size detection submodule and a matte material sheet material size detection submodule; the hole position detection module includes a high-reflectivity sheet material hole position detection submodule and a matte material sheet material hole position detection submodule. The high-reflectivity sheet size detection submodule is used to perform region segmentation and contour extraction processing on the detection image to obtain the edge outline of the sheet. The physical dimensions of the sheet material are obtained by performing coordinate transformation on the edge outline. The matte material sheet size detection submodule is used to perform region segmentation and contour extraction processing on the detection image to obtain the edge outline of the sheet; the edge outline of the sheet is smoothed, and the sheet size length L1 and width W1, and the sheet size length L2 and width W2 are calculated by rectangle fitting and least squares method respectively. The rectangle fitting weight and least squares method weight coefficient are adaptively adjusted to fit the best outline. The optimal shape contour is subjected to coordinate transformation to obtain the physical dimensional information of the sheet material; The high-reflectivity sheet metal hole location detection submodule is used to perform region segmentation processing on the detection image to determine the sheet metal region; to perform contour extraction processing on the sheet metal region and filter it according to the preset contour target to determine the hole location contour of the sheet metal; and to calculate the physical hole location information of the sheet metal based on the hole location contour. The hole location detection submodule for matte material sheets is used to perform region segmentation processing on the detection image to determine the sheet area; to extract the contour of the sheet area and filter it according to the preset contour target to determine the hole location contour of the sheet; to perform contour smoothing processing on the hole location contour, and to calculate the hole location size r1 and coordinates (x1, y1) and hole location size r2 and coordinates (x2, y2) using circle fitting and maximum inscribed circle fitting respectively, with adaptive adjustment of the circle fitting weight and maximum inscribed circle fitting weight coefficients to obtain the optimal hole location contour; and to calculate the physical hole location information of the sheet based on the optimal hole location contour. The process of region segmentation and contour extraction of the detected image includes: Thresholding is applied to the detected image to filter out board material areas, and the board material areas are converted into board material outlines. The outline of the board is sequentially expanded and contracted to extract the edge outline image of the board. The edge contour image is fitted to obtain the edge contour of the board. The contour smoothing process for the hole location includes: The average gray value K1 is obtained by calculating the average gray value of the hole contour image. The histogram method is used to find the binarization threshold k2 of the hole location contour image; The average gray value K1 and the binarization threshold k2 are averaged to obtain the binarization threshold. The hole location contour image is binarized to obtain the optimal hole location contour; The central computing and control unit is also used to determine the board material: Calculate the average gray value of the board area. If the average gray value is greater than or equal to the threshold, it is a high-reflectivity board; if the average gray value is less than the threshold, it is a matte material board.
6. The online sheet metal inspection system according to claim 5, characterized in that: The system also includes: The positioning detection unit, connected to the central computing and control unit, is used to detect the position information of the board on the conveyor belt; The image acquisition unit, connected to the central computing and control unit, is used to acquire image information of the plates on the conveyor belt.
7. The online sheet metal inspection system according to claim 6, characterized in that: The image acquisition unit includes a first image acquisition module and a second image acquisition module; The first image acquisition module is used to acquire target images required for tag recognition, including a line scan camera and a high-brightness light source. The line scan camera is installed vertically to the conveyor belt, and the high-brightness light source is installed at a 35°-50° angle to the conveyor belt. The second image acquisition module is used to acquire the detection images required for size detection and hole position detection. It includes a wide-field line scan camera and a custom light source. The wide-field line scan camera is installed vertically to the conveyor belt, and the custom light source is installed at an angle of 85°-95° to the conveyor belt.