Plate defect detection method and device, electronic equipment and storage medium
Through the linear laser and surface array industrial camera, the laser lines of the plate are detected, the edge point set is extracted and the laser line is fitted, which solves the problems of low efficiency and strong subjectivity of plate defect detection in the existing technology, and realizes the automation of plate defect detection and accuracy.
Patent Information
- Application Number
- CN202411354053.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-26
AI Technical Summary
Existing plate defect detection methods mainly rely on manual testing, which are low in efficiency, low in automation and strong subjectivity, making it difficult to ensure the accuracy of the detection results, and especially cannot effectively detect defects with edge bands higher or lower than the surface of the plate.
The edge band of the plate is tilted by a linear laser, and the laser line image is obtained through the surface array industrial camera, the edge point set is extracted, the laser line is fitted, and the laser line is detected based on the laser line and the quality inspection value.
The automation and intelligence of sheet defect detection is realized, the detection efficiency is improved, the subjective problem of manual inspection is avoided, the accuracy of the detection results is ensured, and the fitting defects of the edge band can be detected efficiently and accurately.
Smart Images

Figure CN119269525A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of industrial visual intelligent detection technology, in particular to the field of plate production quality detection, and more particularly to a plate defect detection method, device, electronic equipment and storage medium. Background Art
[0002] In the process of plate processing, there are cases where the edge band is higher or lower than the plate surface due to imperfect process or poor incoming materials. This defect will affect the quality of the plate and its finished product. Therefore, it is very necessary to perform defect detection on the plate after edge banding.
[0003] In current technology, the main means of defect detection for panels is manual inspection, in which humans judge whether the fit between the edge banding and the panel meets the standard based on a given quality inspection specification for the fit between the edge banding and the panel. This detection method is not only inefficient and has a low degree of automation, but is also highly subjective, making it difficult to ensure the accuracy of the detection results. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present disclosure provide a plate defect detection method, device, electronic device and storage medium.
[0005] According to one aspect of the present disclosure, there is provided a method for detecting defects in a plate, comprising:
[0006] Acquire an image of a plate to be inspected, wherein the image of the plate includes a plate edge band portion and a laser line generated by a line laser obliquely irradiating a plate surface with the plate edge band portion;
[0007] Acquire an edge point set of the laser line in the plate image;
[0008] A laser straight line is obtained based on the edge point set fitting;
[0009] Based on the laser straight line, the edge point set and the quality inspection gauge value, it is detected whether the plate corresponding to the plate image has defects.
[0010] According to another aspect of the present disclosure, there is provided a defect detection device for a plate, comprising:
[0011] An acquisition module, used for acquiring an image of a plate to be detected, wherein the image of the plate includes a plate edge band portion and a laser line generated by a line laser obliquely irradiating a plate surface of the plate edge band portion;
[0012] An extraction module, used for obtaining an edge point set of the laser line in the plate image;
[0013] A fitting module, used for fitting a laser straight line based on the edge point set;
[0014] The detection module is used to detect whether the plate corresponding to the plate image has defects based on the laser straight line, the edge point set and the quality inspection gauge value.
[0015] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0016] Processor; and
[0017] Memory for storing programs,
[0018] The program includes instructions, which, when executed by the processor, enable the processor to execute the defect detection method for the plate material according to the aforementioned aspect.
[0019] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the defect detection method for a plate material according to the aforementioned aspect.
[0020] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program implements the defect detection method of the plate material described in the aforementioned aspect when executed by a processor.
[0021] One or more technical solutions provided in the embodiments of the present disclosure obtain an image of a plate to be detected, the plate image includes the plate edge band portion and the laser lines generated by the plate surface of the plate edge band portion irradiated by a line laser obliquely, and obtain the edge point set of the laser lines in the plate image, and obtain a laser straight line based on the edge point set fitting, and then detect whether the plate corresponding to the plate image has defects based on the laser straight line, the edge point set and the quality inspection gauge value. The solution of the present disclosure is adopted, and the laser lines generated by the plate surface of the plate edge band portion irradiated by a line laser are used to perform plate defect detection, which realizes the automation and intelligence of plate defect detection, improves the detection efficiency, and avoids the problem of strong subjectivity of manual detection, ensuring the accuracy of the detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Further details, features and advantages of the present disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0023] FIG1( a ) shows a schematic diagram of an edge band being higher than the surface of the board;
[0024] FIG1( b ) shows a schematic diagram of the edge band being below the surface of the board;
[0025] Figure 2A flow chart of a method for detecting defects of a plate according to an exemplary embodiment of the present disclosure is shown;
[0026] FIG3( a ) is a top view showing the relative positional relationship between a camera and a line laser according to an exemplary embodiment of the present disclosure;
[0027] FIG3( b ) is a left side view showing the relative positional relationship between a camera and a line laser according to an exemplary embodiment of the present disclosure;
[0028] FIG4( a ) shows a partial schematic diagram of an image of a plate having a low edge defect;
[0029] FIG4( b ) shows a partial schematic diagram of an image of a plate with a high edge sealing defect;
[0030] FIG4( c ) shows a schematic diagram of an image of a defect-free plate;
[0031] Figure 5 A flow chart showing a defect detection method for a plate material according to another exemplary embodiment of the present disclosure is shown;
[0032] Figure 6 A flow chart showing a method for detecting defects of a plate according to another exemplary embodiment of the present disclosure is shown;
[0033] Figure 7 A flow chart showing a method for detecting defects of a plate material according to another exemplary embodiment of the present disclosure is shown;
[0034] Figure 8 A flow chart of a method for detecting defects of a plate according to another exemplary embodiment of the present disclosure is shown;
[0035] Fig. 9 A schematic block diagram of a defect detection device for a plate material according to an exemplary embodiment of the present disclosure is shown;
[0036] Fig.10 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0037] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0038] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0039] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0040] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0041] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0042] As a component of a product, the quality of the board affects the quality of the product. For example, home board is used to make home products such as desks, cabinets, and dressing tables. The quality of the home board affects the quality of the home products. In the processing and manufacturing of boards, due to imperfect workmanship or poor incoming materials, the edge banding may be higher than the board surface (as shown in Figure 1(a)) or lower than the board surface (as shown in Figure 1(b)) during the edge banding process. If the quality of the board after edge banding is not inspected and it is used as part of the finished product, the appearance quality of the finished product will be poor.
[0043] At present, the automation level of defect detection in the production process of panels is low. The current detection method mainly adopts manual detection, which is inefficient. Although there are given quality inspection regulations for the fit between the edge banding and the panel, if the edge banding is lower or higher than the panel surface by more than 0.2mm, it is a defect. However, if it relies on manual inspection, the accuracy of the defect detection results is difficult to guarantee because each employee's judgment criteria are slightly different and highly subjective, resulting in the inability to ensure excellent product quality.
[0044] In current technology, although there are machine vision methods to detect the fit between edge banding and board, the existing detection method is to take a vertical picture of the board in a direction parallel to the board surface, and then detect defects by deep learning instance segmentation. This method requires more image samples for training, and can only detect defects where the edge band is lower than the board surface, but not where the edge band is higher than the board surface. It also requires more computing resources and computing time during calculations, and in order to meet the production speed of the board production line, it is necessary to use a high-performance processor (such as a GPU) to accelerate the reasoning process of the deep learning model, which increases the cost of the detection equipment.
[0045] In view of the above problems, the present disclosure provides a defect detection method for a plate material, which is used to solve the problem of detecting the edge banding quality during the plate production process. The method uses a line laser to obliquely illuminate the portion of the plate surface containing the edge banding, and uses an array industrial camera to obtain an image containing the laser line, and then uses the acquired image to detect whether the plate material has a high defect or a low defect in the edge banding. In the image processing algorithm part, first find the edge point set of the laser line in the image, then filter out the point set that can be used to fit a straight line, and fit a straight line based on these filtered point sets, and then divide the origin point set according to the distance in the horizontal and vertical directions, and set some conditions for edge banding high / low defect detection to achieve plate defect detection. With this solution, efficient and accurate detection of edge banding defects can be achieved through simple image processing, without requiring more computing resources and computing time, and without additional detection costs, which can effectively improve the production efficiency and quality of the plate production line.
[0046] The following describes the plate defect detection method, device, electronic device and storage medium provided by the present disclosure with reference to the accompanying drawings.
[0047] Figure 2 A flow chart of a plate defect detection method according to an exemplary embodiment of the present disclosure is shown. The method can be executed by a plate defect detection device provided in an embodiment of the present disclosure, wherein the device can be implemented using software and / or hardware and can generally be integrated into electronic devices, such as computers and servers.
[0048] like Figure 2 As shown, the defect detection method of the plate may include the following steps:
[0049] Step 101 , obtaining an image of a plate to be inspected, wherein the image of the plate includes an edge band portion of the plate and laser lines generated on the surface of the plate when a line laser obliquely irradiates the edge band portion of the plate.
[0050] A line laser is a laser light source that produces a linear beam. It can emit a continuous, parallel laser beam that is usually narrow in width and long in length.
[0051] In the disclosed embodiment, a line laser can be used to illuminate the surface of a board material (e.g., a home furnishing board) at a board edge band portion, and then a camera (e.g., an area array industrial camera) can be used to capture an image of the board material obliquely illuminated by the line laser to obtain a board image, wherein the obtained board image includes the board edge band portion and the laser lines generated by the line laser.
[0052] In actual industrial applications, the positions of the image acquisition device and the line laser can be fixed to facilitate detection. In an optional embodiment of the present disclosure, the camera used to acquire the image of the plate is installed in a manner parallel to the plane of the plate, and the angle between the line laser and the optical axis of the camera is within a preset angle range (e.g., 25 degrees to 60 degrees), and the angle between the laser line presented by the line laser on the surface of the plate and the edge of the plate is greater than the preset angle (e.g., the preset angle is 85 degrees), that is, the laser line presented by the line laser on the surface of the plate is perpendicular or nearly perpendicular to the edge of the plate.
[0053] The line laser can be installed on the left or right side of the camera, and when collecting the image of the plate, the camera and the line laser can be installed only on one side of the plate to be inspected for image acquisition, or the camera and the line laser can be installed on the upper and lower sides of the plate to collect images corresponding to the upper and lower surfaces of the plate. For example, FIG3(a) shows a top view of the relative position relationship of the camera and the line laser of an exemplary embodiment of the present disclosure, and FIG3(b) shows a left view of the relative position relationship of the camera and the line laser of an exemplary embodiment of the present disclosure. As shown in FIG3(a) and FIG3(b), the line laser is installed on the upper and lower sides of the plate to be inspected, and it is tilted to illuminate the surface of the plate containing the edge band portion, and the area array camera is installed on the upper and lower sides of the plate in a manner parallel to the plane of the plate, and plane mirrors are used on the upper and lower sides of the plate to reflect the areas irradiated by the laser to the cameras on both sides, so as to respectively collect images of the upper and lower surfaces of the plate containing the laser lines and the edge band portion of the plate. It can be understood that the defect detection method provided by the present disclosure is applicable to both the images of the upper surface and the lower surface of the plate. That is, the plate image acquired by the present disclosure can be an image of the upper surface of the plate or an image of the lower surface of the plate. It can be understood that in this embodiment, the size of the plate image is related to the resolution of the camera used. For example, if the camera resolution used is 720*540, the size of the acquired plate image is 720 (width)*540 (height). The present disclosure does not limit the size of the plate image.
[0054] In an optional embodiment of the present disclosure, after the plate image is acquired, the plate image may be preprocessed to improve the efficiency and accuracy of subsequent image processing. It should be noted that the preprocessing may include multiple methods, which are not limited here. For example, the preprocessing may include image denoising, image enhancement, and image segmentation.
[0055] Step 102: Obtain edge point sets of laser lines in the plate image.
[0056] In the embodiment of the present disclosure, in the acquired plate image, the plate and the background are imaged in black, while the laser line is brighter and appears in white. For example, taking the line laser installed on the right side of the camera as an example, the image of the plate with low edge defects is shown in Figure 4(a), the image of the plate with high edge defects is shown in Figure 4(b), and the image of the plate without defects is shown in Figure 4(c). It can be understood that Figure 4(a) to Figure 4(c) Only the local content of the plate image of the plate edge band portion actually captured by the camera is shown. Therefore, according to the pixel values of different pixels in the plate image, the edge point set of the laser line in the plate image can be identified, and the edge point set includes multiple edge points. Among them, the currently commonly used edge detection algorithm (such as Sobel operator, Prewitt operator) can be used to obtain the edge point set of the laser line in the plate image, and the present disclosure does not limit this.
[0057] In an optional implementation of the present disclosure, edge detection may be performed on the entire plate image to determine the edge point set of the laser line.
[0058] In another optional embodiment of the present disclosure, a detection area including laser lines can be first determined in the plate image, and edge detection can be performed on the detection area to determine the edge point set of the laser lines in the detection area, thereby improving the edge detection efficiency by performing edge point detection on only part of the image area. The position of the detection area in the plate image can be manually pre-set, and only needs to be set once when the installation position and angle of the camera and line laser remain unchanged, which is highly convenient; the detection area can also be automatically determined from the plate image by an algorithm.
[0059] Step 103, obtaining a laser straight line based on the edge point set fitting.
[0060] In the embodiment of the present disclosure, after the edge point set is determined, a laser straight line can be obtained by fitting based on the edge point set. There are many methods for fitting based on the edge point set, which are not limited here.
[0061] As an example, the edge point set can be fitted by a commonly used fitting algorithm to generate a laser straight line. For example, a random sample consensus algorithm (RANSAC) can be used to filter out a point set that can be used to fit a straight line from the edge point set, and then a straight line fitting method (such as the least squares method, the gradient descent method) can be used to fit the laser straight line.
[0062] As another example, the edge point set can also be input into a fitting model to generate a laser straight line. The fitting model can be trained in advance and stored in a storage space of the electronic device to facilitate retrieval and use when needed.
[0063] Step 104 , based on the laser straight line, the edge point set and the quality inspection gauge value, detect whether the plate corresponding to the plate image has defects.
[0064] Among them, the quality inspection value is the critical value for determining whether the plate corresponding to the plate image has a high / low edge defect. The quality inspection value can be pre-set by the user according to the actual detection requirements, or converted according to the user's preset physical inspection value, wherein the physical inspection value can be limited by the user according to the actual design needs or detection requirements. The unit of the physical inspection value is usually millimeter. For example, if the physical inspection value is set to 0.2mm, it means that the edge defect is defined as the edge band being higher than the plate surface by more than 0.2mm, and the edge defect is defined as the edge band being lower than the plate surface by more than 0.2mm; the quality inspection value is the pixel inspection value, and the unit is pixel. The physical inspection value can be converted into the quality inspection value by the following formula (1):
[0065]
[0066] In the above formula (1), th is the physical gauge, acc is p is the pixel accuracy of the camera, θ is the angle between the laser and the camera, and th p The pixel gauge value is obtained by converting the physical gauge value, that is, the quality gauge value.
[0067] In one possible implementation, inspectors can set quality inspection values according to the type of board material or usage scenario, thereby controlling the inspection accuracy. This can be applicable to different types of board materials or different usage scenarios, thereby improving the practicality of the disclosed solution.
[0068] As an example, when detecting whether a plate corresponding to a plate image has defects based on a laser straight line, an edge point set and a quality inspection gauge value, the edge point set can be divided into two subsets located on both sides of the straight line based on the laser straight line, namely a left subset and a right subset, and the left subset and the right subset are used to detect whether there is a high edge defect or a low edge defect, wherein the left subset is used to detect a high edge defect or a low edge defect, which is related to the relative position of the line laser relative to the camera. If the line laser is installed on the right side of the camera, the turning direction of the high edge defect in the plate image is to the left, and the left subset is used to detect the high edge defect, and the right subset is used to detect the low edge defect; if the line laser is installed on the left side of the camera, the turning direction of the high edge defect in the plate image is to the right, and the right subset is used to detect the high edge defect, and the left subset is used to detect the low edge defect. Assuming that the left subset is used to detect high edge defects and the right subset is used to detect low edge defects, it can be detected whether the distance from the edge point closest to the laser line in the left subset to the laser line is greater than the quality inspection gauge value. If so, it is determined that the plate corresponding to the plate image has a high edge defect. If the distance from the edge point farthest from the laser line in the right subset to the laser line is greater than the quality inspection gauge value, it is determined that the plate corresponding to the plate image has a low edge defect.
[0069] The defect detection method of the plate of the embodiment of the present disclosure obtains the plate image to be detected, the plate image includes the plate edge band portion and the laser line generated by the line laser obliquely irradiating the plate edge band portion, and obtains the edge point set of the laser line in the plate image, and obtains a laser straight line based on the edge point set fitting, and then detects whether the plate corresponding to the plate image has defects based on the laser straight line, the edge point set and the quality inspection gauge value. The scheme of the present disclosure is adopted, and the laser line generated by the line laser irradiating the plate edge band portion of the plate surface is used to perform plate defect detection, which realizes the automation and intelligence of plate defect detection, improves the detection efficiency, and avoids the problem of strong subjectivity of manual detection, ensuring the accuracy of the detection result.
[0070] In an optional embodiment of the present disclosure, Figure 5 As shown, in Figure 2 Based on the illustrated embodiment, step 102 may include the following sub-steps:
[0071] Step 201, obtaining preset ROI area location information.
[0072] The region of interest (ROI) in an image is an area that needs special attention or processing. In image processing and computer vision, ROI is usually used to specify the sub-image portion for further analysis or operation. The ROI region position information may include various forms, which are not limited here. For example, the ROI region position information may include the coordinate information of the four vertices of the ROI region, or the ROI region position information may include the center point coordinates and the length and width of the region.
[0073] As an example, the ROI region position information may be set to include the upper left corner coordinates and the lower right corner coordinates, and the ROI region determined in the plate image is a rectangle defined by the ROI region position information.
[0074] It should be noted that the ROI area position information can be changed according to the imaging position of the laser line in the plate image, and there is no limitation on the flexible adjustment. When the installation position and angle of the camera and the laser line remain unchanged, the ROI area position information can remain unchanged after being set.
[0075] Step 202: Based on the ROI area position information, determine the ROI area in the plate image, where the ROI area includes the laser line.
[0076] In the disclosed embodiment, using the acquired ROI region position information, a ROI region can be determined in the plate image, and the ROI region includes laser lines.
[0077] As an example, assuming that the ROI area position information includes the upper left corner coordinates (275, 150) and the lower right corner coordinates (365, 350), the rectangular ROI area determined in the plate image has the upper left corner coordinates (275, 50) and the lower right corner coordinates (365, 350) in the plate image, where the upper left corner of the plate image is the origin of the pixel coordinate system, the horizontal right direction is the positive direction of the x-axis, and the vertical downward direction is the positive direction of the y-axis, so each pixel in the plate image has a unique fixed coordinate.
[0078] Step 203 , searching in the ROI area according to the target direction to determine the edge point set of the laser line, wherein the target direction is related to the relative position of the line laser with respect to the camera for collecting the plate image.
[0079] It should be noted that the target direction is designed in advance and can be changed according to the actual relative position of the line laser relative to the camera that collects the plate image, and no limitation is made here. For example, the target direction can be from right to left or from left to right. If the relative position of the line laser relative to the camera is that the line laser is located on the right side of the camera, the target direction is from left to right; if the relative position of the line laser relative to the camera is that the line laser is located on the left side of the camera, the target direction is from right to left.
[0080] In this embodiment, when determining edge points in the edge point set, a search may be performed in the ROI region according to the target direction to obtain a plurality of edge points constituting the edge point set.
[0081] The defect detection method of the plate in the embodiment of the present disclosure obtains the preset ROI area position information, determines the ROI area in the plate image based on the ROI area position information, and then searches in the ROI area according to the target direction to determine the edge point set of the laser line. Therefore, by searching and determining the edge point set in the determined ROI area, the range of edge point detection is narrowed, which can improve image processing efficiency and reduce background interference.
[0082] In an optional embodiment of the present disclosure, Figure 6 As shown, based on the above embodiment, step 104 may include the following sub-steps:
[0083] Step 301 : determining a first edge point from an edge point set, where the first edge point is an endpoint of a target end in the edge point set, and the target end is a starting end in a target direction.
[0084] For example, assuming that the line laser is installed on the right side of the camera, the target direction is from left to right, the starting end of the target direction is the left end, and the target end is the left end. Then the first edge point determined is the left end point in the edge point set, that is, the first edge point is the point with the smallest coordinate value in the x-coordinate direction in the edge point set. Assuming that the line laser is installed on the left side of the camera, the target direction is from right to left, the target end and the starting end of the target direction are the right end, then the first edge point determined is the right end point in the edge point set, that is, the first edge point is the point with the largest coordinate value in the x-coordinate direction in the edge point set.
[0085] Step 302, determining whether a first distance from a first edge point to a laser line is greater than a quality inspection gauge value.
[0086] In the embodiment of the present disclosure, after the first edge point is determined, the distance from the first edge point to the laser straight line may be calculated (referred to as the first distance for ease of description and distinction).
[0087] As an example, the first distance is the vertical distance from the first edge point to the laser line. The first distance can be determined by the distance formula from a point to a line, or the number of pixels passed by the perpendicular line from the first edge point to the laser line can be counted as the first distance.
[0088] Next, it can be determined whether the first distance is greater than the quality inspection value. If so, step 303 is executed; if the first distance is not greater than the quality inspection value, step 305 is executed.
[0089] Step 303, when the first distance is greater than the quality inspection gauge value, determine a first point set located on the target side of the laser line from the edge point set, wherein the target side is opposite to the relative position of the line laser with respect to the camera for collecting the plate image.
[0090] For example, assuming that the relative position of the line laser with respect to the camera for collecting the plate image is that the line laser is installed on the right side of the camera, then the target side is the left side, and the edge points located on the left side of the laser line are determined from the edge point set to form the first point set. assuming that the relative position of the line laser with respect to the camera for collecting the plate image is that the line laser is installed on the left side of the camera, then the target side is the right side, and the edge points located on the right side of the laser line are determined from the edge point set to form the first point set.
[0091] In an optional embodiment of the present disclosure, in order to reduce the number of edge points that need to be processed, when determining the first point set, the lower endpoint of the edge point set (i.e., the point with the largest coordinate value in the y-coordinate direction of the edge point set, which is the point closest to the edge band) can be determined according to the coordinates of each edge point in the edge point set, and a preset number of edge points (in order to ensure the accuracy, stability, and rapidity of defect detection, the preset number can generally be selected as any value between 40-80, for example, the preset number is 50) are obtained upward from the lower endpoint to form a candidate abnormal point set, that is, the candidate abnormal point set contains a preset number of edge points with larger y-coordinate values. Afterwards, the points located on the target side of the laser line and whose distance to the laser line is greater than the quality inspection value are determined from the candidate abnormal point set to form the first point set. In this way, the abnormal points that contribute most to the detection of high defects in edge banding can be screened out from the edge point set, reducing the amount of data processing for high defect detection in edge banding.
[0092] Step 304: Based on the first point set, detect whether the plate corresponding to the plate image has a high edge defect.
[0093] In the embodiment of the present disclosure, after the first point set is determined, it can be detected based on the first point set whether the plate corresponding to the plate image has a high edge defect.
[0094] As an example, the number of pixels included in the first point set may be counted. If the number of pixels included in the first point set is greater than a preset threshold, it is determined that the plate corresponding to the plate image has a high edge defect.
[0095] Step 305 : determining a second edge point from the edge point set, where the second edge point is an endpoint of the edge point set opposite to the target end.
[0096] In the embodiment of the present disclosure, if the first distance from the first edge point to the laser line is less than or equal to the quality inspection value, a second edge point is determined from the edge point set, and the second edge point is the endpoint of the edge point set opposite to the target end.
[0097] For example, assuming that the line laser is installed on the right side of the camera, the target direction is from left to right, the starting end of the target direction is the left end, the target end is the left end, and the end opposite to the target end is the right end, then the second edge point determined is the right end point in the edge point set, that is, the second edge point is the point with the largest coordinate value in the x-coordinate direction in the edge point set. Assuming that the line laser is installed on the left side of the camera, the target direction is from right to left, the target end and the starting end of the target direction are the right end, then the second edge point determined is the left end point in the edge point set, that is, the second edge point is the point with the smallest coordinate value in the x-coordinate direction in the edge point set.
[0098] Step 306, determining whether the second distance from the second edge point to the laser line is greater than the quality inspection gauge value.
[0099] It should be noted that in the embodiment of the present disclosure, the distance from the second edge point to the laser straight line (referred to as the second distance for ease of description and distinction) is calculated in a similar manner to the first distance in the aforementioned embodiment, and will not be repeated here.
[0100] Step 307: when the second distance is greater than the quality check gauge value, determine a second point set located on the opposite side of the target side of the laser line from the edge point set.
[0101] In the embodiment of the present disclosure, if the second distance is not greater than the quality inspection gauge value, it can be determined that the plate corresponding to the plate image does not have high edge defects and low edge defects. If the second distance is greater than the quality inspection gauge value, a second point set located on the opposite side of the laser straight line target side is determined from the edge point set.
[0102] For example, assuming that the relative position of the line laser with respect to the camera for collecting the plate image is that the line laser is installed on the right side of the camera, then the target side is the left side, the opposite side of the target side is the right side, and the edge points located on the right side of the laser line are determined from the edge point set to form the second point set. assuming that the relative position of the line laser with respect to the camera for collecting the plate image is that the line laser is installed on the left side of the camera, then the target side is the right side, the opposite side of the target side is the left side, and the edge points located on the left side of the laser line are determined from the edge point set to form the second point set.
[0103] In an optional embodiment of the present disclosure, in order to reduce the number of edge points that need to be processed, when determining the second point set, the lower endpoint of the edge point set (i.e., the point with the largest coordinate value in the y-coordinate direction of the edge point set, which is the point closest to the edge band) can be determined according to the coordinates of each edge point in the edge point set, and a preset number of edge points (the preset number can be any value from 40 to 80, for example, the preset number is 50) are obtained upward from the lower endpoint to form a candidate abnormal point set, that is, the candidate abnormal point set contains a preset number of edge points with smaller y-coordinate values. Afterwards, the points located on the opposite side of the target side of the laser line and whose distance to the laser line is greater than the quality inspection gauge value are determined from the candidate abnormal point set to form the second point set. In this way, the abnormal points that contribute most to the low-defect detection of edge banding can be screened out from the edge point set, reducing the amount of data processing for low-defect detection of edge banding.
[0104] Step 308: Based on the second point set, detect whether the plate corresponding to the plate image has a low edge defect.
[0105] In the embodiment of the present disclosure, after the second point set is determined, it can be detected based on the second point set whether the plate corresponding to the plate image has a low edge defect.
[0106] As an example, the number of pixels included in the second point set may be counted. If the number of pixels included in the second point set is greater than a preset threshold, it is determined that the plate corresponding to the plate image has a low edge defect.
[0107] The defect detection method of the plate of the embodiment of the present invention determines a first edge point from an edge point set, judges whether a first distance from the first edge point to the laser line is greater than a quality inspection gauge value, determines a first point set located on a target side of the laser line from the edge point set for high edge defect detection when the first distance is greater than the quality inspection gauge value, determines a second edge point from the edge point set for low edge defect detection when the first distance is less than or equal to the quality inspection gauge value, and determines a second point set located on an opposite side of the target side of the laser line from the edge point set for low edge defect detection when the second distance from the second edge point to the laser line is greater than the quality inspection gauge value. Thus, it is possible to detect whether the plate has high edge defects or low edge defects, thereby improving the comprehensiveness and flexibility of plate defect detection.
[0108] In an optional embodiment of the present disclosure, Figure 7 As shown, in Figure 6 Based on the illustrated embodiment, step 304 may include the following sub-steps:
[0109] Step 401, segmenting the first point set to obtain a plurality of first sub-point sets.
[0110] As an example, the minimum rectangle containing the first point set may be divided into a preset number to obtain multiple rectangular sub-regions, and all points contained in a rectangular sub-region constitute a first sub-point set, thereby obtaining multiple first sub-point sets.
[0111] As another example, the first point set can be divided into multiple first sub-point sets by the following steps: S1, the first point in the first point set (the point with the smallest horizontal coordinate and / or the smallest vertical coordinate) is taken as the current point; S2, the horizontal distance (i.e., the difference in x-coordinate value) and the vertical distance (i.e., the difference in y-coordinate value) between the current point and the next point adjacent to it are calculated; S3, when the horizontal distance is less than or equal to the preset horizontal distance threshold and the vertical distance is less than or equal to the preset vertical distance threshold, the current point and the next point are divided into the same candidate sub-point set; S4, when the horizontal distance is greater than the horizontal distance threshold or the vertical distance is greater than the vertical distance threshold, the current point and the next point are divided into different candidate sub-point sets; S5, the next point is taken as the current point; S6, the above steps S2-S5 are repeated until all points in the first point set are traversed, and multiple candidate sub-point sets are obtained as multiple first sub-point sets. That is, among the points contained in each first sub-point set, the horizontal distance between any two adjacent points is not greater than the horizontal distance threshold and the vertical distance is not greater than the vertical distance threshold. In this way, edge points with close distances are divided into the same sub-point set, ensuring the accuracy of the segmentation results.
[0112] Step 402, traverse each first sub-point set to detect whether the first sub-point set meets the edge banding high defect condition, wherein the edge banding high defect condition is that the number of edge points in the first sub-point set is greater than a first threshold, and the first sub-point set is located in the area where the edge band portion of the plate is located.
[0113] The first threshold value may be set according to actual needs, or may be obtained through a large number of experimental tests.
[0114] In this embodiment, after obtaining multiple first sub-point sets, each first sub-point set can be traversed in turn to detect whether the first sub-point set meets the preset edge banding high defect condition. If the number of edge points included in a first sub-point set is greater than the first threshold, and the first sub-point set is located in the area where the edge band portion of the plate is located, it is determined that the first sub-point set meets the edge banding high defect condition.
[0115] It should be noted that, in this embodiment, the first sub-point set is located in the area where the edge band portion of the board is located, which means that the coordinates of all points in the first sub-point set fall within the preset area, wherein the preset area is the area where the edge band portion of the board is located. When the camera and the line laser are installed, the position of the board edge band in the furniture board image is basically fixed, and there may be slight changes. Therefore, according to the position of the board edge band in the furniture board image, a preset area can be pre-set to represent the area where the board edge band portion of the furniture board image is located, and then the coordinates of each point in the first sub-point set are compared with the preset area to determine whether the coordinates of all points in the first sub-point set fall within the preset area. If so, it is determined that the first sub-point set is located in the area where the edge band portion of the board is located. Alternatively, it is also possible to only determine whether the point with the smallest y coordinate and the point with the largest y coordinate in the first sub-point set are both located in the preset area. If so, it is determined that the first sub-point set is located in the area where the edge band portion of the board is located. The present disclosure does not limit the use of any judgment method.
[0116] Step 403 : when at least one first sub-point set among the plurality of first sub-point sets satisfies the edge sealing high defect condition, it is determined that the plate corresponding to the plate image has the edge sealing high defect.
[0117] In the embodiment of the present disclosure, by detecting whether each first sub-point set satisfies the high edge defect condition, it can be determined whether there is a first sub-point set that satisfies the high edge defect condition in multiple first sub-point sets. If at least one first sub-point set in multiple first sub-point sets satisfies the high edge defect condition, it is determined that the plate corresponding to the plate image has a high edge defect. If each first sub-point set in multiple first sub-point sets does not satisfy the high edge defect condition, steps 305 to 308 are executed to detect whether there is a low edge defect in the plate corresponding to the plate image.
[0118] For some boards, there is no edge banding defect itself, but the shape of its edge band part in the board image is very similar to the edge banding defect, so there may be a problem of being mistakenly detected as having an edge banding defect. In order to ensure the accuracy of edge banding defect detection, in an optional embodiment of the present disclosure, it can be preliminarily determined that the board corresponding to the board image has an edge banding defect when there is at least one first sub-point set that meets the edge banding defect condition, and further determine whether the first sub-point set that meets the edge banding defect condition is a true edge banding defect. Specifically, when there is at least one first sub-point set that meets the edge banding defect condition in multiple first sub-point sets, the coordinates of each point in the target first sub-point set that meets the edge banding defect condition are obtained; according to the coordinates of each point in the target first sub-point set, the upper endpoint with the smallest ordinate value in the target first sub-point set is determined; according to the coordinates of the upper endpoint and the preset image size, the board-strip bonding image is cropped from the board image; based on the pixel value of each row of the board-strip bonding image, the target pixel value of each row is determined; when the difference between the first target pixel value and the second target pixel value is greater than or equal to the preset value, it is determined that the board corresponding to the board image has an edge banding defect.
[0119] The preset image size may be, for example, 30*20. When determining the strip-joined portion, the area including the strip-joined portion is obtained by extending 10 pixels upward and downward and 15 pixels left and right from the upper end point. Then, the area is cropped to obtain a 30*20 strip-joined image. For the cropped strip-joined image, the target pixel value of the corresponding row is determined based on the pixel value of each row. For example, the sum of the pixel values of all pixels in the same row (or the mean of the pixel values of the pixels in the same row) may be used as the target pixel value of the row.
[0120] In this embodiment, the selection of the first target pixel value and the second target pixel value can be preset according to actual needs. After a large number of experimental tests, it is concluded that the first target pixel value can be the second largest value among all target pixel values, and the second target pixel value can be the second smallest value among all target pixel values, so as to avoid the problem of unstable results caused by imaging interference when selecting the maximum and minimum values among the target pixel values. The second largest and the second smallest values among the target pixel values are selected as the first target pixel value and the second target pixel value, which ensures that the selected data has a large difference while ensuring the stability of the data, thereby ensuring the stability and accuracy of the detection results. Among them, the difference between the first target pixel value and the second target pixel value can be expressed by the difference between the two, or by the ratio between the two, and the present disclosure does not limit this.
[0121] The defect detection method for the plate of the embodiment of the present disclosure divides the first point set into multiple first sub-point sets, traverses each first sub-point set, and detects whether the first sub-point set satisfies the high edge defect condition, wherein the high edge defect condition is that the number of edge points in the first sub-point set is greater than a first threshold value and the first sub-point set is located in the area where the edge band portion of the plate is located. When at least one first sub-point set in multiple first sub-point sets satisfies the high edge defect condition, it is determined that the plate corresponding to the plate image has a high edge defect, thereby realizing the detection of high edge defects in the plate.
[0122] Furthermore, in an optional embodiment of the present disclosure, after determining that the plate corresponding to the plate image has a high edge defect, the maximum value of the horizontal coordinate, the minimum value of the horizontal coordinate, the maximum value of the vertical coordinate and the minimum value of the vertical coordinate can be determined according to the coordinates of each point in the first sub-point set that meets the high edge defect condition, and four corner points are determined in the plate image based on the maximum value of the horizontal coordinate, the minimum value of the horizontal coordinate, the maximum value of the vertical coordinate and the minimum value of the vertical coordinate, and then a high edge defect bounding box is generated in the plate image based on the four corner points. In this way, the visualization of the high edge defect in the plate image is realized, providing a reference for correcting the defect.
[0123] In an optional embodiment of the present disclosure, Figure 8 As shown, in Figure 6 Based on the illustrated embodiment, step 308 may include the following sub-steps:
[0124] Step 501, segment the second point set to obtain a plurality of second sub-point sets.
[0125] As an example, the minimum rectangle containing the second point set may be divided into a preset number to obtain multiple rectangular sub-regions, and all points contained in a rectangular sub-region constitute a second sub-point set, thereby obtaining multiple second sub-point sets.
[0126] As another example, the traversal can be started from the first point in the second point set (the point with the smallest horizontal coordinate and / or the smallest vertical coordinate), and the first point is taken as the current point. The following rules are used to divide the points to obtain multiple second sub-point sets: if the horizontal distance between the current point and the next adjacent point is not greater than the horizontal distance threshold (for example, 6), and the vertical distance is not greater than the vertical distance threshold (for example, 3), then the two points are considered to belong to the same sub-point set, and then the next point of the current point is taken as the current point, and the sub-point set division is continued according to the above rules; if a point p is encountered, and its positional relationship with the current point does not meet the above conditions, then point p is considered to not belong to the same sub-point set as the current point, then the current second sub-point set division is completed, and point p is taken as the current point to continue to divide the remaining points in the second point set according to the above rules until the current point is the last point in the second point set, and the traversal is completed to obtain multiple second sub-point sets.
[0127] Step 502, traverse each second sub-point set to detect whether the second sub-point set meets the edge banding low defect condition, wherein the edge banding low defect condition is that the number of edge points in the second sub-point set is greater than a second threshold, and the second sub-point set is located in the area where the edge band portion of the plate is located.
[0128] The second threshold value can be set according to actual needs, or obtained through a large number of experimental tests.
[0129] In this embodiment, after obtaining multiple second sub-point sets, each second sub-point set can be traversed in turn to detect whether the second sub-point set meets the preset edge banding low defect condition. If the number of edge points included in a second sub-point set is greater than the second threshold value, and the second sub-point set is located in the area where the edge band portion of the plate is located, it is determined that the second sub-point set meets the edge banding high defect condition.
[0130] It should be noted that, in this embodiment, the second sub-point set is located in the area where the edge band portion of the board is located, which means that the coordinates of all points in the second sub-point set fall within the preset area, wherein the preset area is the area where the edge band portion of the board is located. When the camera and the line laser are installed, the position of the board edge band in the furniture board image is basically fixed, and there may be slight changes. Therefore, according to the position of the board edge band in the furniture board image, a preset area can be pre-set to represent the area where the board edge band portion of the furniture board image is located, and then the coordinates of each point in the second sub-point set are compared with the preset area to determine whether the coordinates of all points in the second sub-point set fall within the preset area. If so, it is determined that the second sub-point set is located in the area where the edge band portion of the board is located. Alternatively, it is also possible to only determine whether the point with the smallest y coordinate and the point with the largest y coordinate in the second sub-point set are both located in the preset area. If so, it is determined that the second sub-point set is located in the area where the edge band portion of the board is located. The present disclosure does not limit the use of which judgment method.
[0131] Step 503: when at least one of the plurality of second sub-point sets satisfies the edge sealing low defect condition, it is determined that the plate corresponding to the plate image has the edge sealing low defect.
[0132] In the embodiment of the present disclosure, by detecting whether each second sub-point set satisfies the low-defect condition for edge banding, it can be determined whether there is a second sub-point set that satisfies the low-defect condition for edge banding among the multiple second sub-point sets. If at least one second sub-point set among the multiple second sub-point sets satisfies the low-defect condition for edge banding, it is determined that the plate corresponding to the plate image has a low-defect for edge banding. If each second sub-point set among the multiple second sub-point sets does not satisfy the low-defect condition for edge banding, it is determined that the plate corresponding to the plate image does not have a low-defect for edge banding either.
[0133] Furthermore, in an optional embodiment of the present disclosure, after determining that the plate corresponding to the plate image has a low edge defect, the maximum value of the horizontal coordinate, the minimum value of the horizontal coordinate, the maximum value of the vertical coordinate and the minimum value of the vertical coordinate can be determined according to the coordinates of each point in the second sub-point set that meets the low edge defect condition, and four corner points are determined in the plate image based on the maximum value of the horizontal coordinate, the minimum value of the horizontal coordinate, the maximum value of the vertical coordinate and the minimum value of the vertical coordinate, and then a low edge defect bounding box is generated in the plate image based on the four corner points. In this way, the visualization of the low edge defect in the plate image is realized, providing a reference for correcting the defect.
[0134] The defect detection method of the plate in the embodiment of the present invention obtains multiple second sub-point sets by segmenting the second point set, traverses each second sub-point set, and detects whether the second sub-point set meets the low edge defect condition. The low edge defect condition is that the number of edge points in the second sub-point set is greater than a second threshold and the second sub-point set is located in the area where the edge band portion of the plate is located. When at least one second sub-point set in multiple second sub-point sets meets the low edge defect condition, it is determined that the plate corresponding to the plate image has a low edge defect, thereby realizing the detection of low edge defects in the plate.
[0135] The exemplary embodiments of the present disclosure also provide a defect detection device for a plate material. Fig. 9 A schematic block diagram of a defect detection device for a plate according to an exemplary embodiment of the present disclosure is shown. Fig. 9 As shown, the plate defect detection device 60 includes: an acquisition module 610 , an extraction module 620 , a fitting module 630 and a detection module 640 .
[0136] The acquisition module 610 is used to acquire an image of a plate to be detected, wherein the image of the plate includes a plate edge band portion and a laser line generated by a line laser obliquely irradiating the plate surface of the plate edge band portion;
[0137] An extraction module 620 is used to obtain an edge point set of the laser line in the plate image;
[0138] A fitting module 630, configured to obtain a laser straight line based on the edge point set by fitting;
[0139] The detection module 640 is used to detect whether the plate corresponding to the plate image has defects based on the laser straight line, the edge point set and the quality inspection gauge value.
[0140] Optionally, the extraction module 620 is further configured to:
[0141] Get the preset ROI area location information;
[0142] Based on the ROI area position information, determining a ROI area in the plate image, wherein the ROI area includes the laser line;
[0143] The edge point set of the laser line is determined by searching in the ROI region according to the target direction, wherein the target direction is related to the relative position of the line laser with respect to the camera that captures the plate image.
[0144] Optionally, the detection module 640 includes:
[0145] A first determining unit is used to determine a first edge point from the edge point set, where the first edge point is an endpoint of a target end in the edge point set, and the target end is a starting end of the target direction;
[0146] A first judging unit, used to judge whether a first distance from the first edge point to the laser straight line is greater than a quality inspection gauge value;
[0147] a second determining unit, configured to determine, when the first distance is greater than the quality inspection gauge value, a first point set located on a target side of the laser line from the edge point set, wherein the target side is opposite to a relative position of the line laser relative to a camera for acquiring the plate image;
[0148] The edge sealing high defect detection unit is used to detect whether the plate corresponding to the plate image has an edge sealing high defect based on the first point set.
[0149] Optionally, the second determining unit is further configured to:
[0150] Determine a lower endpoint of the edge point set according to the coordinates of each edge point in the edge point set;
[0151] Starting from the lower endpoint, a preset number of continuous edge points are acquired upward to form a candidate abnormal point set;
[0152] Points located on the target side of the laser line and whose distance to the laser line is greater than the quality inspection value are determined from the candidate abnormal point set to form the first point set.
[0153] Optionally, the edge banding high defect detection unit is also used for:
[0154] Segmenting the first point set to obtain a plurality of first sub-point sets;
[0155] Traversing each of the first sub-point sets, detecting whether the first sub-point set meets the edge banding high defect condition, wherein the edge banding high defect condition is that the number of edge points in the first sub-point set is greater than a first threshold, and the first sub-point set is located in the area where the edge band portion of the plate is located;
[0156] When at least one of the plurality of first sub-point sets satisfies the edge sealing high defect condition, it is determined that the plate corresponding to the plate image has an edge sealing high defect.
[0157] The edge banding high defect detection unit is further used to segment the first point set through the following steps:
[0158] S1, taking the first point in the first point set as the current point;
[0159] S2, calculating the horizontal distance and the vertical distance between the current point and the next adjacent point;
[0160] S3, when the horizontal distance is less than or equal to a preset horizontal distance threshold and the vertical distance is less than or equal to a preset vertical distance threshold, dividing the current point and the next point into the same candidate sub-point set;
[0161] S4, when the horizontal distance is greater than the horizontal distance threshold or the vertical distance is greater than the vertical distance threshold, dividing the current point and the next point into different candidate sub-point sets;
[0162] S5, taking the next point as the current point;
[0163] S6, repeating the above steps S2-S5 until all points in the first point set are traversed, and obtaining multiple candidate sub-point sets as multiple first sub-point sets.
[0164] Optionally, the edge banding high defect detection unit is also used for:
[0165] In the case that at least one of the plurality of first sub-point sets satisfies the edge sealing high defect condition, obtaining the coordinates of each point in the target first sub-point set that satisfies the edge sealing high defect condition;
[0166] According to the coordinates of each point in the target first sub-point set, determine the upper endpoint with the smallest ordinate value in the target first sub-point set;
[0167] Cutting out a plate-strip bonding image from the plate image according to the coordinates of the upper endpoint and a preset image size;
[0168] Determining a target pixel value for each row based on the pixel value for each row of the strip lamination image;
[0169] When the difference between the first target pixel value and the second target pixel value is greater than or equal to the preset value, it is determined that the plate corresponding to the plate image has a high edge defect.
[0170] Optionally, the plate defect detection device 60 further includes a first marking module, which is used to:
[0171] According to the coordinates of each point in the first sub-point set that meets the edge sealing high defect condition, determine the maximum value of the abscissa, the minimum value of the abscissa, the maximum value of the ordinate, and the minimum value of the ordinate;
[0172] Based on the maximum abscissa value, the minimum abscissa value, the maximum ordinate value, and the minimum ordinate value, four corner points are determined in the plate image;
[0173] A high edge defect bounding box is generated in the plate image based on the four corner points.
[0174] Optionally, the detection module 640 further includes:
[0175] A third determining unit is used to determine a second edge point from the edge point set when the first distance is less than or equal to the quality inspection gauge value, or when none of the plurality of first sub-point sets satisfy the edge sealing high defect condition, the second edge point being an endpoint of an end of the edge point set opposite to the target end;
[0176] A second judging unit, used for judging whether a second distance from the second edge point to the laser straight line is greater than the quality inspection gauge value;
[0177] a fourth determining unit, configured to determine, from the edge point set, a second point set located on an opposite side of the target side of the laser line when the second distance is greater than the quality inspection gauge value;
[0178] The edge banding low defect detection unit is used to detect whether the plate corresponding to the plate image has an edge banding low defect based on the second point set.
[0179] Optionally, the edge banding low defect detection unit is also used for:
[0180] Segmenting the second point set to obtain a plurality of second sub-point sets;
[0181] Traversing each of the second sub-point sets, detecting whether the second sub-point set meets the edge banding low defect condition, wherein the edge banding low defect condition is that the number of edge points in the second sub-point set is greater than a second threshold, and the second sub-point set is located in the area where the edge band portion of the plate is located;
[0182] When at least one of the plurality of second sub-point sets satisfies the edge sealing low defect condition, it is determined that the plate corresponding to the plate image has an edge sealing low defect.
[0183] Optionally, the plate defect detection device 60 further includes a second marking module, which is used to:
[0184] According to the coordinates of each point in the second sub-point set that meets the edge sealing low defect condition, determine the maximum value of the abscissa, the minimum value of the abscissa, the maximum value of the ordinate, and the minimum value of the ordinate;
[0185] Based on the maximum abscissa value, the minimum abscissa value, the maximum ordinate value, and the minimum ordinate value, four corner points are determined in the plate image;
[0186] An edge banding low-defect bounding box is generated in the plate image based on the four corner points.
[0187] Optionally, the camera used to capture the image of the plate is installed parallel to the plane of the plate, the angle between the line laser and the optical axis of the camera is within a preset angle range, and the angle between the laser line presented by the line laser on the surface of the plate and the edge of the plate is greater than the preset angle.
[0188] The defect detection device for a plate provided in the embodiment of the present disclosure can execute any defect detection method for a plate applicable to an electronic device provided in the embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. The contents not fully described in the embodiment of the device of the present disclosure can refer to the description in any method embodiment of the present disclosure.
[0189] The exemplary embodiments of the present disclosure further provide an electronic device, comprising: a processor; and a memory storing a program, wherein the program comprises instructions, and when the instructions are executed by the processor, the defect detection method of a plate material as described in any embodiment of the present disclosure is implemented.
[0190] The exemplary embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions, when executed by a processor of a computer, are used to cause the computer to execute the defect detection method for a plate material as described in any embodiment of the present disclosure.
[0191] An exemplary embodiment of the present disclosure further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to execute the defect detection method for a plate material as described in any embodiment of the present disclosure.
[0192] refer to Fig.10 , a block diagram of an electronic device 1100 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0193] like Fig.10 As shown, the electronic device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1108 into a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the electronic device 1100 can also be stored. The computing unit 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0194] Multiple components in the electronic device 1100 are connected to the I / O interface 1105, including: an input unit 1106, an output unit 1107, a storage unit 1108, and a communication unit 1109. The input unit 1106 can be any type of device that can input information to the electronic device 1100, and the input unit 1106 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device. The output unit 1107 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 1108 can include but is not limited to a disk, an optical disk. The communication unit 1109 allows the electronic device 1100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0195] The computing unit 1101 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1101 performs the various methods and processes described above. For example, in some embodiments, the defect detection method of the plate may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1100 via the ROM 1102 and / or the communication unit 1109. In some embodiments, the computing unit 1101 may be configured to perform the defect detection method of the plate by any other appropriate means (e.g., by means of firmware).
[0196] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0197] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0198] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0199] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0200] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0201] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0202] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting defects in a plate, characterized in that: The method comprises: Acquire an image of a plate to be inspected, wherein the image of the plate includes a plate edge band portion and a laser line generated by a line laser obliquely irradiating a plate surface with the plate edge band portion; Acquire an edge point set of the laser line in the plate image; A laser straight line is obtained based on the edge point set fitting; Based on the laser straight line, the edge point set and the quality inspection gauge value, it is detected whether the plate corresponding to the plate image has defects.
2. The defect detection method of a plate material according to claim 1, characterized in that: The step of obtaining the edge point set of the laser line in the plate image includes: Get the preset ROI area location information; Based on the ROI area position information, determining a ROI area in the plate image, wherein the ROI area includes the laser line; The edge point set of the laser line is determined by searching in the ROI region according to the target direction, wherein the target direction is related to the relative position of the line laser with respect to the camera that captures the plate image.
3. The defect detection method of the plate material according to claim 2, characterized in that: The detecting whether the plate corresponding to the plate image has defects based on the laser straight line, the edge point set and the quality inspection gauge value includes: Determine a first edge point from the edge point set, where the first edge point is an endpoint of a target end of the edge point set, and the target end is a starting end of the target direction; Determine whether a first distance from the first edge point to the laser straight line is greater than a quality inspection gauge value; In the case where the first distance is greater than the quality inspection gauge value, determining a first point set located on the target side of the laser line from the edge point set, wherein the target side is opposite to the relative position of the line laser with respect to the camera that captures the plate image; Based on the first point set, it is detected whether the plate corresponding to the plate image has a high edge defect.
4. The defect detection method of the plate material according to claim 3, characterized in that: The step of determining a first point set located on the target side of the laser line from the edge point set comprises: Determine a lower endpoint of the edge point set according to the coordinates of each edge point in the edge point set; Starting from the lower endpoint, a preset number of edge points are acquired upward to form a candidate outlier point set; Points located on the target side of the laser line and whose distance to the laser line is greater than the quality inspection value are determined from the candidate abnormal point set to form the first point set.
5. The defect detection method of a plate material according to claim 3, characterized in that: The detecting, based on the first point set, whether the plate corresponding to the plate image has a high edge defect includes: Segmenting the first point set to obtain a plurality of first sub-point sets; Traversing each of the first sub-point sets, detecting whether the first sub-point set meets the edge banding high defect condition, wherein the edge banding high defect condition is that the number of edge points in the first sub-point set is greater than a first threshold, and the first sub-point set is located in the area where the edge band portion of the plate is located; When at least one of the plurality of first sub-point sets satisfies the edge sealing high defect condition, it is determined that the plate corresponding to the plate image has an edge sealing high defect.
6. The defect detection method of a plate material according to claim 5, characterized in that: The step of segmenting the first point set to obtain a plurality of first sub-point sets includes: S1, taking the first point in the first point set as the current point; S2, calculating the horizontal distance and the vertical distance between the current point and the next adjacent point; S3, when the horizontal distance is less than or equal to a preset horizontal distance threshold and the vertical distance is less than or equal to a preset vertical distance threshold, dividing the current point and the next point into the same candidate sub-point set; S4, when the horizontal distance is greater than the horizontal distance threshold or the vertical distance is greater than the vertical distance threshold, dividing the current point and the next point into different candidate sub-point sets; S5, taking the next point as the current point; S6, repeating the above steps S2-S5 until all points in the first point set are traversed, and obtaining multiple candidate sub-point sets as multiple first sub-point sets.
7. The defect detection method of a plate material according to claim 5, characterized in that: When at least one of the plurality of first sub-point sets satisfies the edge sealing high defect condition, determining that the plate corresponding to the plate image has an edge sealing high defect includes: In the case that at least one of the plurality of first sub-point sets satisfies the edge sealing high defect condition, obtaining the coordinates of each point in the target first sub-point set that satisfies the edge sealing high defect condition; According to the coordinates of each point in the target first sub-point set, determine the upper endpoint with the smallest ordinate value in the target first sub-point set; Cutting out a plate-strip bonding image from the plate image according to the coordinates of the upper endpoint and a preset image size; Determining a target pixel value for each row based on the pixel value for each row of the strip lamination image; When the difference between the first target pixel value and the second target pixel value is greater than or equal to the preset value, it is determined that the plate corresponding to the plate image has a high edge defect.
8. A defect detection device for a plate, characterized in that: The device comprises: An acquisition module, used for acquiring an image of a plate to be detected, wherein the image of the plate includes a plate edge band portion and a laser line generated by a line laser obliquely irradiating a plate surface of the plate edge band portion; An extraction module, used for obtaining an edge point set of the laser line in the plate image; A fitting module, used for fitting a laser straight line based on the edge point set; The detection module is used to detect whether the plate corresponding to the plate image has defects based on the laser straight line, the edge point set and the quality inspection gauge value.
9. An electronic device, comprising: processor; as well as Memory for storing programs, It is characterized in that the program includes instructions, and when the instructions are executed by the processor, the processor executes the defect detection method for the plate material as described in any one of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the defect detection method for a plate material as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Board edge sealing defect detection equipment
CN110579480A
Method and apparatus for detecting edge sealing effect of board
CN110658200A
Method for detecting edge sealing defect of plate based on image, related equipment and storage medium
CN114820594A
Detection device and plate edge sealing defect detection system
CN115266576A
Bamboo cane defect detection method based on line laser image and terminal
CN115908412A
Cited By
Plate edge sealing defect online detection method and device based on machine vision
CN120219294A