A method, detection device, and storage medium for detecting defects on the surface of a steel plate.
By dividing the steel plate into grids and using machine vision technology to obtain the defective surface collection of steel plates, the shortcomings of manual detection in the prior art are solved, and efficient, automated and high-precision steel plate detection is achieved.
Patent Information
- Application Number
- CN202211578851.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-12-07
AI Technical Summary
In the prior art, steel plate inspection has problems such as high labor intensity, easy to cause missed inspection, inability to adapt to the production environment of high-speed units, and low detection accuracy.
By dividing the steel plate to be tested into T·A grids, the set of depressed defect points of the steel plate is obtained, and the set of defect surfaces is obtained based on the adjacent relationship between the grid and the grid corresponding to the depressed defect points. Machine vision technology is used for inspection to achieve automation and high precision.
It improves the automation and comprehensiveness of steel plate inspection, adapts to the production environment of high-speed units, and significantly improves the detection accuracy and reduces manual errors.
Smart Images

Figure CN115791802B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual measurement technology, and in particular to a method, a detection device and a storage medium for detecting a defective surface of a steel plate. Background Art
[0002] Steel plate surface inspection is mainly used to detect discontinuity defects on the surface of steel plates (such as pits, scratches, flaws, etc.). The detection methods include manual experience detection method, non-destructive testing technology based on electromagnetic induction and ultrasound.
[0003] At present, the detection method of large steel plates mainly uses manual visual methods. Due to the requirements of production rhythm, the manual visual method cannot detect the bottom surface of the steel plate, so it cannot fully cover the upper and lower surfaces of the tested steel plate; and the manual visual detection method cannot perform numerical measurement of the discontinuity of the steel plate surface. It is necessary to increase the process and use special instruments to measure the numerical value before performing steel plate grading operations. Therefore, the current detection of large steel plates has problems such as high labor intensity, easy to cause missed detection, inability to adapt to the production environment of high-speed units, and low detection accuracy. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method, a detection device and a storage medium for detecting defective surfaces of steel plates in view of the above-mentioned deficiencies in the prior art, so as to at least solve the problems existing in the related art such as high labor intensity, easy omissions, inability to adapt to the production environment of high-speed units, and low detection accuracy of manual visual steel plate detection.
[0005] In a first aspect, the present invention provides a method for detecting defective surfaces of steel plates, comprising: dividing the steel plate to be tested into T·A grids, wherein T is the total number of scanning moments, and A is the total number of sampling points on the upper surface or lower surface of the steel plate to be tested at each scanning moment; obtaining a set of concave defect points of the steel plate to be tested, and obtaining a grid corresponding to each concave defect point in the set of concave defect points, wherein the grid is marked as (t, i), t=0,1,2,…,T, i=0,1,2,…,A; obtaining the defective surface to which each concave defect point in the set of concave defect points belongs according to the grid corresponding to each concave defect point and the adjacent relationship between the grids, so as to obtain a set of defective surfaces.
[0006] Preferably, the method of obtaining a set of concave defect points of the tested steel plate specifically includes: obtaining the steel plate thickness corresponding to all sampling points of the tested steel plate; determining whether each sampling point among all the sampling points is a concave defect point one by one according to the difference between the steel plate thickness corresponding to the sampling point and the target thickness, so as to obtain a determination result of each sampling point; and obtaining a set of sampling points whose determination results are concave defect points, so as to obtain a set of concave defect points of the tested steel plate.
[0007] Preferably, the step of obtaining the steel plate thickness corresponding to all sampling points of the tested steel plate specifically includes:
[0008] Obtain the coordinate data of the sampling points on the upper and lower surfaces of the steel plate being tested Where p = u represents the upper surface of the steel plate under test, and p = d represents the lower surface of the steel plate under test. The steel plate thickness corresponding to all sampling points is calculated according to the following formula:
[0009]
[0010] in, is the Z-axis data in the coordinate data of the sampling point on the surface of the steel plate being tested, It is the Z-axis data in the coordinate data of the sampling point on the lower surface of the steel plate being tested.
[0011] Preferably, the step of obtaining the grid corresponding to each concave defect point in the concave defect point set specifically includes: The t value and i value of each concave defect point in the concave defect point set are respectively obtained; and the grid corresponding to each concave defect point is respectively determined according to the t value and i value of each concave defect point.
[0012] Preferably, the method of obtaining the defect surface to which each concave defect point in the concave defect point set belongs based on the grids corresponding to each concave defect point and the adjacent relationship between the grids to obtain a defect surface set specifically includes: storing the grids corresponding to each concave defect point in the concave defect point set into a first queue; extracting the grids in the first queue one by one as the central grid, and traversing other grids adjacent to the central grid until the grids with adjacent relationship in the first queue are connected in series to form a second queue, wherein one second queue corresponds to one defect surface, and the second queue is used to represent the defect surfaces to which a group of concave defect points with adjacent relationship belong; obtaining a set of non-adjacent second queues to obtain a defect surface set.
[0013] Preferably, after obtaining the defect surface set, the method for detecting defect surfaces of steel plates further comprises: calculating the area of each defect surface in the defect surface set according to the following formula:
[0014]
[0015] Wherein, L represents the step length of the steel plate in the Y-axis direction at each scanning moment, W represents the scanning length covered by each scanning camera, N represents the total number of sampling points of each scanning camera at each scanning moment, and l(k) represents the number of grids in the second queue.
[0016] Preferably, after obtaining the defect surface set, the method for detecting defect surfaces of steel plates further comprises: selecting grids corresponding to the minimum values of t and i from each second queue as positioning points of corresponding defect surfaces; and determining the coordinate values of the X-axis and Y-axis of the positioning points according to the following formula to locate the position of each defect surface:
[0017] y=t·L, (3)
[0018] x=(i+0.5)·W / N (4).
[0019] In a second aspect, the present invention further provides a device for detecting defective surfaces of steel plates, comprising a dividing module, a first acquisition module and a second acquisition module.
[0020] The division module is used to divide the steel plate to be tested into T·A grids, wherein T is the total number of scanning moments, and A is the total number of sampling points on the upper surface or lower surface of the steel plate to be tested at each scanning moment.
[0021] The first acquisition module is connected to the division module, and is used to obtain a set of concave defect points of the tested steel plate, and obtain a grid corresponding to each concave defect point in the set of concave defect points, wherein the grid is marked as (t, i), t = 0, 1, 2, ..., T, i = 0, 1, 2, ..., A.
[0022] The second acquisition module is connected to the first acquisition module and is used to acquire the defect surface to which each concave defect point in the concave defect point set belongs according to the grids corresponding to each concave defect point and the adjacent relationship between the grids to obtain a defect surface set.
[0023] Preferably, the first acquisition module includes a first acquisition unit and a first determination unit.
[0024] The first acquisition unit is used to obtain the thickness of the steel plate corresponding to the concave defect point. The t value and i value of each concave defect point in the concave defect point set are respectively obtained.
[0025] The first determining unit is connected to the first acquiring unit and is used to determine the grid corresponding to each concave defect point according to the t value and i value of each concave defect point.
[0026] Preferably, the second acquisition module comprises a storage unit, a series connection unit and a second acquisition unit.
[0027] The storage unit is used to store the grid corresponding to each concave defect point in the concave defect point set into the first queue.
[0028] A series connection unit is connected to the storage unit and is used to extract grids in the first queue one by one as the central grid, and traverse other grids adjacent to the central grid until the grids with adjacent relationships in the first queue are connected in series to form a second queue, wherein one second queue corresponds to one defect surface, and the second queue is used to represent the defect surface to which a group of concave defect points with adjacent relationships belong.
[0029] The second acquisition unit is connected to the series connection unit and is used to acquire a non-adjacent second queue set to obtain a defective surface set.
[0030] Preferably, the device for detecting defective surfaces of steel plates further includes an area calculation module.
[0031] The area calculation module is connected to the second acquisition module and is used to calculate the area of each defective surface in the defective surface set according to the following formula:
[0032]
[0033] Wherein, L represents the step length of the steel plate in the Y-axis direction at each scanning moment, W represents the scanning length covered by each scanning camera, N represents the total number of sampling points of each scanning camera at each scanning moment, and l(k) represents the number of grids in the second queue.
[0034] Preferably, the device for detecting defective surfaces of steel plates further includes a positioning module.
[0035] The positioning module is used to select the grid corresponding to the minimum value of t and i from each second queue as the positioning point of the corresponding defective surface, and to determine the X-axis and Y-axis coordinate values of the positioning point according to the following formula to locate the position of each defective surface:
[0036] y=t·L, (3)
[0037] x=(i+0.5)·W / N (4).
[0038] In a third aspect, the present invention further provides a detection device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the method for detecting a defective surface of a steel plate as described in the first aspect.
[0039] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for detecting a defective surface of a steel plate as described in the first aspect is implemented.
[0040] The detection method, detection device and storage medium of the steel plate defect surface provided by the present invention divide the steel plate to be tested into T·A grids according to the scanning time and the number of sampling points, and establish a mapping relationship between the concave defect points of the steel plate to be tested and the grids, and then obtain a grid set with an adjacent relationship according to the grids corresponding to the concave defect points and the adjacent relationship between the grids to obtain a concave defect surface set. Among them, a conventional visual device (such as a camera) is used to scan the steel plate to be tested. Compared with the manual visual method, this method of detecting the defect surface of steel plates in industrial production based on machine vision has the characteristics of higher degree of automation, comprehensive detection, adaptability to the production environment of high-speed units, and high detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a schematic flow chart of a method for detecting a defective surface of a steel plate according to Embodiment 1 of the present invention;
[0042] Figure 2 A schematic diagram of a grid of a steel plate according to Example 1 of the present invention;
[0043] Figure 3 This is a structural schematic diagram of a steel plate detection system according to Embodiment 1 of the present invention;
[0044] Figure 4 A schematic diagram of a world coordinate system according to Embodiment 1 of the present invention;
[0045] Figure 5 A schematic diagram of a defect point grid adjacent to each other in embodiment 1 of the present invention;
[0046] Figure 6 This is a schematic structural diagram of a device for detecting a defective surface of a steel plate according to Embodiment 2 of the present invention;
[0047] Figure 7 This is a schematic diagram of the structure of a detection device according to Example 3 of the present invention. DETAILED DESCRIPTION
[0048] In order to enable those skilled in the art to better understand the technical solution of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0049] It should be understood that the specific embodiments and drawings described herein are only used to explain the present invention rather than to limit the present invention.
[0050] It can be understood that, in the absence of conflict, the various embodiments of the present invention and the various features in the embodiments can be combined with each other.
[0051] It can be understood that, for the convenience of description, the drawings of the present invention only show the parts related to the present invention, while the parts irrelevant to the present invention are not shown in the drawings.
[0052] It can be understood that each unit and module involved in the embodiments of the present invention may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units and modules may be integrated into one physical structure.
[0053] It can be understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of the present invention may occur in an order different from that marked in the drawings.
[0054] It is understood that the flowcharts and block diagrams of the present invention illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the various embodiments of the present invention. Each box in the flowchart or block diagram may represent a unit, module, program segment, or code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or may be implemented by a combination of hardware and computer instructions.
[0055] It can be understood that the units and modules involved in the embodiments of the present invention can be implemented by software or hardware. For example, the units and modules can be located in a processor.
[0056] Embodiment 1:
[0057] like Figure 1 As shown, this embodiment provides a method for detecting a defective surface of a steel plate, comprising:
[0058] Step 101, dividing the steel plate to be tested into T·A grids, wherein T is the total number of scanning moments, and A is the total number of sampling points on the upper surface or lower surface of the steel plate to be tested at each scanning moment.
[0059] In this embodiment, the steel plate to be tested is divided into T·A grids according to the scanning time of the camera and the number of camera sampling points. Figure 2 As shown, the number of grids of the tested steel plate is T·A, a total of T rows are scanned, and the number of sampling points in each row is A, that is, A columns.
[0060] Step 102, obtain a set of concave defect points of the tested steel plate, and obtain a grid corresponding to each concave defect point in the set of concave defect points, wherein the grid is marked as (t, i), t = 0, 1, 2, ..., T, i = 0, 1, 2, ..., A.
[0061] In this embodiment, a set of concave defect points of the measured steel plate can be obtained according to the steel plate thickness of the sampling points or the grayscale value of the sampling points, and a mapping relationship between the concave defect points and the grid is established.
[0062] Specifically, the method of obtaining a set of concave defect points of the tested steel plate includes: obtaining the steel plate thickness corresponding to all sampling points of the tested steel plate; judging one by one whether each sampling point among all the sampling points is a concave defect point according to the difference between the steel plate thickness corresponding to the sampling point and the target thickness, so as to obtain a judgment result of each sampling point; obtaining a set of sampling points whose judgment results are concave defect points, so as to obtain a set of concave defect points of the tested steel plate.
[0063] In this embodiment, when the steel plate thickness corresponding to the sampling point is less than the target thickness, the sampling point can be judged as a concave defect point. However, since the steel plate under test may experience mechanical vibration during the detection process, in order to improve the detection accuracy, the first threshold is set to the tolerance thickness within the target thickness range. Specifically, it is determined whether the steel plate thickness corresponding to the sampling point is less than or equal to the difference between the target thickness and the first threshold; in response to the steel plate thickness corresponding to the sampling point being less than or equal to the difference between the target thickness and the first threshold, the sampling point is determined to be a concave defect point. For example, the first threshold is set to Th, and combined with the thickness requirements of steel plate production, when the following conditions are met, the sampling point is determined to be a concave defect point:
[0064]
[0065] If the value of H is 1 cm and the value of Th is 0.2 cm, when the thickness of the sampling point is less than or equal to 0.8 cm, it is judged as a concave defect point.
[0066] Optionally, the step of obtaining the steel plate thickness corresponding to all sampling points of the steel plate under test specifically includes: obtaining the coordinate data of the sampling points on the upper surface and the lower surface of the steel plate under test; Where p = u represents the upper surface of the steel plate under test, and p = d represents the lower surface of the steel plate under test. The steel plate thickness corresponding to all sampling points is calculated according to the following formula:
[0067]
[0068] in, is the Z-axis data in the coordinate data of the sampling point on the surface of the steel plate being tested, It is the Z-axis data in the coordinate data of the sampling point on the lower surface of the steel plate being tested.
[0069] In this embodiment, the Figure 3The steel plate detection system shown obtains the coordinate data of the sampling points on the upper surface and the lower surface of the steel plate to be tested. The steel plate detection system includes an image acquisition device 11, a camera calibration software 12 and a data analysis software 13. The image acquisition device 11 is used to acquire image data of the upper surface and the lower surface of the steel plate to be tested. The camera calibration software 12 is connected to the image acquisition device 11 and is used to perform data preprocessing on the acquired image data. The data analysis software 13 is connected to the camera calibration software 12 and is used to calculate the thickness standard deviation of the steel plate to be tested based on the preprocessed image data, and evaluate the thickness uniformity of the steel plate to be tested based on the thickness standard deviation. Optionally, the image acquisition device includes an array camera and an acquisition signal controller. The array camera is connected to the acquisition signal controller and is used to acquire image data of the upper surface and the lower surface of the steel plate to be tested according to the acquisition signal sent by the acquisition signal controller, and output the first coordinate of the sampling point, wherein the first coordinate is in a coordinate system with the position of the array camera as the origin. The acquisition signal controller is provided with an acquisition signal cycle, and the acquisition signal controller is used to send an acquisition signal to the array camera according to the acquisition signal cycle, wherein the acquisition signal cycle is the ratio of the steel plate step length L (unit: meter) to the steel plate transmission rate S (unit: meter / second), that is, the time interval for the acquisition signal controller to send the acquisition signal is: τ=L / S (unit: second), that is, the array camera scans and collects data once every interval τ. Specifically, the array camera includes two groups of linear scanning cameras. The two groups of linear scanning cameras are used to be fixed at the upper and lower parts of the detection gate, respectively, and respectively maintain a preset shooting distance with the corresponding surface of the steel plate to be tested, wherein the multiple linear scanning cameras in the group jointly cover the width of the steel plate to be tested through a cascade of equipment. A group of three-dimensional (3D) linear scanning cameras are installed at the upper and lower parts of the detection gate (i.e., above and below the steel plate to be tested) to collect image data, and the upper (or lower) cameras are cascaded to cover the entire width of the steel plate to be tested. Each camera covers a straight line range of a certain length, and the six cameras cover the width of the steel plate to be tested through a cascaded device. The number of cameras is determined by the width of the steel plate to be tested (or other objects to be tested) and the scanning range of the camera (for example, when the image data acquisition coverage width of each 3D camera is 0.45 meters and the width of the steel plate to be tested is 4.2 meters, a total of 18 to 20 3D cameras are required to cover the width of the upper and lower surfaces of the entire steel plate to be tested through a cascaded device). When the resolutions of the cascaded cameras are different, according to the different resolutions of the cameras, each camera obtains a set of coordinates of the pixel points of the steel plate to be tested within the coverage range, and outputs the first coordinate of the steel plate to be tested as a coordinate system based on the position of each camera as the origin. The first coordinate is written as: Wherein p=u or p=d, u represents the camera above the upper surface of the steel plate under test, d represents the camera below the lower surface of the steel plate under test, t=0,1,2,...T represents the sampling time, j=0,1,2,...M represents the camera index ID, k=0,1,2,...N represents the index ID of each camera collecting N sampling points each time, all cameras are uniformly controlled by the acquisition signal controller, and when the acquisition signal controller sends an acquisition signal, all cameras start to shoot and collect image data of the steel plate under test at the same time. Optionally, the image acquisition device also includes a rate controller and a roller bed. The rate controller is connected to the roller bed, and the rate controller is provided with a steel plate transmission rate, which is used to control the rotation speed of the roller bed according to the steel plate transmission rate. The roller bed is used to place the steel plate under test and rotate according to the rotation speed to transmit the steel plate under test. In this embodiment, the rate controller and the acquisition signal controller are controlled and coordinated by the rate matching software. The camera calibration software includes a coordinate conversion module. The coordinate conversion module is used to convert the first coordinate of the sampling point output by each camera into the world coordinate system according to the relative position relationship of each camera in the array camera to obtain the converted acquisition data. Preferably, if Figure 4 As shown in the figure, the origin O of the world coordinate system is a corner of the steel plate to be measured (such as Figure 3 One corner of the object to be inspected is the unified coordinate origin O), its X-axis is parallel to the camera array composed of each camera, its Y-axis is parallel to the transmission direction of the steel plate to be inspected, and its Z-axis is perpendicular to the XOY plane. The converted coordinate data is: Where i = j·N+k, j is the camera index, i takes values of 0, 1, 2, ... A, A = M·N+N M Indicates the total number of sampling points on any surface of the steel plate being tested at each scanning moment, N M ≤M represents the number of sampling points of the last camera that photographs any surface of the steel plate under test. It should be noted that the origin of the world coordinate system is not limited to a corner of the steel plate under test in this embodiment. By converting the data collected by each camera into the collected data in the same coordinate system, the subsequent calculation of the thickness of the steel plate under test is facilitated and the accuracy of the calculation result is guaranteed.
[0070] Optionally, the obtaining of the grid corresponding to each concave defect point in the concave defect point set specifically includes: The t value and i value of each concave defect point in the concave defect point set are respectively obtained; and the grid corresponding to each concave defect point is respectively determined according to the t value and i value of each concave defect point.
[0071] In this embodiment, according to When determining the concave defect point, the scanning time t value corresponding to the steel plate thickness and the index i value of the sampling point are determined. The t value and i value correspond to the row value and column value of the grid respectively, so the grid corresponding to the concave defect point is determined. For example, initialize a matrix G∈C(T×A) , each element in the matrix G is false, indicating whether each grid is a defect point. After obtaining the set of concave defect points, each element in the matrix G corresponding to the concave defect point is set to true. The accuracy of defect point positioning can be improved by locating the concave defect point position through the grid position.
[0072] Step 103 , according to the grids corresponding to each concave defect point and the adjacent relationship between the grids, the defect surface to which each concave defect point in the concave defect point set belongs is obtained to obtain a defect surface set.
[0073] In this embodiment, since the concave defect point is a separate sampling point, adjacent (or continuous) concave defect points constitute a defect surface.
[0074] Specifically, according to the grids corresponding to each concave defect point and the adjacent relationship between the grids, the defect surface to which each concave defect point in the concave defect point set belongs is obtained to obtain the defect surface set, including: storing the grids corresponding to each concave defect point in the concave defect point set into a first queue; extracting the grids in the first queue one by one as the central grid, and traversing other grids adjacent to the central grid until the grids with adjacent relationship in the first queue are connected in series to form a second queue, wherein one second queue corresponds to one defect surface, and the second queue is used to represent the defect surfaces to which a group of concave defect points with adjacent relationship belong; obtaining a set of non-adjacent second queues to obtain a defect surface set.
[0075] In this embodiment, in order to improve the detection accuracy of the concave defect surface, the grid is used to uniquely identify the concave defect point. In addition, multiple groups of continuous grids are identified one by one in combination with the adjacent relationship of the grids, and a group of continuous grids is formed into a second queue, and one second queue corresponds to one concave defect surface, so that the steel plate defect surface can be detected more simply and accurately. In this embodiment, the first queue is queue J, and the second queue is queue R(k), where k is a positive number, and Figure 5 , an example of obtaining the defect surface to which each concave defect point in the concave defect point set belongs to, so as to obtain a defect surface set, includes S1-S6:
[0076] S1, such as Figure 5As shown, the grid with background color represents the grid corresponding to the concave defect point, and the grid without background color represents the grid corresponding to the sampling point without concave defect. For the first time, the (4,3) grid is extracted from queue J and put into queues Q(1) and R(1), and the (4,3) grid is deleted from queue J. The (4,3) grid is taken as the center grid, and a circle of grids adjacent to it is traversed. The number of grids in a circle is eight, and the (4,3) grid is deleted from queue Q(1). The (4,4) grid and the (5,4) grid are put into queues Q(1) and R(1) in turn, and the (4,4) grid and the (5,4) grid are deleted from queue J, so that the queue J stores the set of defect points that are not assigned to the defect surface. Among them, R(k) is used to store the grid set of the kth defect surface, and Q(k) is used to store the defect points in the kth defect surface that have not yet been traversed and analyzed for the surrounding grids;
[0077] S2, the second time, the first grid (4,4) in queue Q(1) is taken as the center grid, and the surrounding grids are traversed. Grid (4,4) is deleted from queue Q(1). Since grids (4,3) and (5,4) are already in queue R(1), they are skipped and grid (5,5) is put into queues Q(1) and R(1), and grid (5,5) is deleted from queue J.
[0078] S3, for the third time, the first grid (5,4) in queue Q(1) is used as the center grid, and the grids surrounding it are traversed. Grid (5,4) is deleted from queue Q(1). Since grids (4,3), (4,4) and (5,4) are already in queue R(1), they are skipped.
[0079] S4, the fourth time, the first grid (5,5) in queue Q(1) is taken as the center grid, and the grids surrounding it are traversed. Grid (5,5) is deleted from queue Q(1). Since grids (4,4) and (5,4) are already in queue R(1), they are skipped.
[0080] S5, the fifth queue Q(1) is empty, select the next (8,8) grid from queue J, repeat steps S1-S4, and finally generate queue R(2).
[0081] In S6, there are 4 grids in the R(1) queue, namely (4,3), (4,4), (5,4) and (5,5), representing the first defective surface; there are 3 grids in the R(2) queue, namely (8,8), (9,8) and (9,9), representing the second defective surface.
[0082] Optionally, after obtaining the defect surface set, the method for detecting defect surfaces of steel plates further comprises: calculating the area of each defect surface in the defect surface set according to the following formula:
[0083]
[0084] Wherein, L represents the step length of the steel plate in the Y-axis direction at each scanning moment, W represents the scanning length covered by each scanning camera, N represents the total number of sampling points of each scanning camera at each scanning moment, and l(k) represents the number of grids in the second queue.
[0085] In this embodiment, marking the concave defect points based on the grid can improve the detection accuracy, so determining the area of the defect surface by the grid area can also improve the detection accuracy.
[0086] Optionally, after obtaining the defect surface set, the method for detecting defect surfaces of steel plates further includes: selecting grids corresponding to the minimum values of t and i from each second queue as positioning points of corresponding defect surfaces; and determining the coordinate values of the X-axis and Y-axis of the positioning points according to the following formula to locate the position of each defect surface:
[0087] y=t·L, (3)
[0088] x=(i+0.5)·W / N (4).
[0089] Wherein, L is the step length of the steel plate in the Y-axis direction at each scanning moment, W represents the scanning length covered by each scanning camera, and N represents the total number of sampling points of each scanning camera at each scanning moment.
[0090] The detection method of the steel plate defect surface of this embodiment divides the steel plate to be tested into T·A grids according to the scanning time and the number of sampling points, and establishes a mapping relationship between the concave defect points of the steel plate to be tested and the grids, and then obtains a grid set with an adjacent relationship according to the grids corresponding to the concave defect points and the adjacent relationship between the grids, so as to obtain a set of concave defect surfaces. Among them, a conventional visual device (such as a camera) is used to scan the steel plate to be tested. Compared with the manual visual method, this method of detecting the defect surface of the steel plate in industrial production based on machine vision has the characteristics of high degree of automation, comprehensive detection, adaptability to the production environment of high-speed units, and high detection accuracy. The position of the concave defect point is located by the grid position, which can improve the accuracy of defect point positioning. In addition, the grids corresponding to multiple groups of continuous defect points are identified one by one in combination with the adjacent relationship of the grids, and a group of continuous grids are formed into a second queue, and a second queue corresponds to a concave defect surface, so that the steel plate defect surface can be detected more simply and accurately. Furthermore, marking the concave defect points based on the grid can improve the detection accuracy, so determining the area of the defect surface by the grid area can also improve the detection accuracy. Finally, since the steel plate under test may have mechanical vibration during the detection process, in order to improve the detection accuracy, the first threshold is set to the tolerance thickness within the target thickness range.
[0091] Embodiment 2:
[0092] like Figure 6 As shown, this embodiment provides a device for detecting defective surfaces of steel plates, including a dividing module 61 , a first acquiring module 62 and a second acquiring module 63 .
[0093] The division module 61 is used to divide the steel plate to be tested into T·A grids, wherein T is the total number of scanning moments, and A is the total number of sampling points on the upper surface or lower surface of the steel plate to be tested at each scanning moment.
[0094] The first acquisition module 62 is connected to the division module 61, and is used to obtain a set of concave defect points of the tested steel plate, and obtain a grid corresponding to each concave defect point in the set of concave defect points, wherein the grid is marked as (t, i), t = 0, 1, 2, ..., T, i = 0, 1, 2, ..., A.
[0095] In this embodiment, it is used to obtain a set of concave defect points of the tested steel plate according to the steel plate thickness of the sampling points or the grayscale value of the sampling points, and establish a mapping relationship between the concave defect points and the grid.
[0096] The second acquisition module 63 is connected to the first acquisition module 62, and is used to acquire the defect surface to which each concave defect point in the concave defect point set belongs according to the grids corresponding to each concave defect point and the adjacent relationship between the grids, so as to obtain a defect surface set.
[0097] Optionally, the first acquisition module is used to obtain the steel plate thickness corresponding to all sampling points of the tested steel plate, and to determine whether each sampling point among all the sampling points is a concave defect point one by one according to the difference between the steel plate thickness corresponding to the sampling point and the target thickness, so as to obtain the determination result of each sampling point, and to obtain a set of sampling points whose determination results are concave defect points, so as to obtain a set of concave defect points of the tested steel plate.
[0098] In this embodiment, when the thickness of the steel plate corresponding to the sampling point is less than the target thickness, the sampling point can be judged as a concave defect point. However, since the steel plate under test may experience mechanical vibration during the detection process, in order to improve the detection accuracy, the first threshold is set to the tolerance thickness within the target thickness range. The first acquisition module is used to determine whether the thickness of the steel plate corresponding to the sampling point is less than or equal to the difference between the target thickness and the first threshold, and to determine that the sampling point is a concave defect point in response to the thickness of the steel plate corresponding to the sampling point being less than or equal to the difference between the target thickness and the first threshold. For example, the first threshold is set to Th, and combined with the thickness requirements of steel plate production, the sampling point is determined to be a concave defect point when the following conditions are met:
[0099]
[0100] If the value of H is 1 cm and the value of Th is 0.2 cm, when the thickness of the sampling point is less than or equal to 0.8 cm, it is judged as a concave defect point.
[0101] Optionally, the first acquisition module is also used to acquire the coordinate data of the sampling points on the upper surface and the lower surface of the steel plate being tested. Wherein, p=u represents the upper surface of the steel plate under test, p=d represents the lower surface of the steel plate under test, and is used to calculate the steel plate thickness corresponding to all sampling points according to the following formula:
[0102]
[0103] in, is the Z-axis data in the coordinate data of the sampling point on the surface of the steel plate being tested, It is the Z-axis data in the coordinate data of the sampling point on the lower surface of the steel plate being tested.
[0104] In this embodiment, the method used is as follows: Figure 3The steel plate detection system shown obtains the coordinate data of the sampling points on the upper surface and the lower surface of the steel plate to be tested. The steel plate detection system includes an image acquisition device 11, a camera calibration software 12 and a data analysis software 13. The image acquisition device 11 is used to acquire image data of the upper surface and the lower surface of the steel plate to be tested. The camera calibration software 12 is connected to the image acquisition device 11 and is used to perform data preprocessing on the acquired image data. The data analysis software 13 is connected to the camera calibration software 12 and is used to calculate the thickness standard deviation of the steel plate to be tested based on the preprocessed image data, and evaluate the thickness uniformity of the steel plate to be tested based on the thickness standard deviation. Optionally, the image acquisition device includes an array camera and an acquisition signal controller. The array camera is connected to the acquisition signal controller and is used to acquire image data of the upper surface and the lower surface of the steel plate to be tested according to the acquisition signal sent by the acquisition signal controller, and output the first coordinate of the sampling point, wherein the first coordinate is in a coordinate system with the position of the array camera as the origin. The acquisition signal controller is provided with an acquisition signal cycle, and the acquisition signal controller is used to send an acquisition signal to the array camera according to the acquisition signal cycle, wherein the acquisition signal cycle is the ratio of the steel plate step length L (unit: meter) to the steel plate transmission rate S (unit: meter / second), that is, the time interval for the acquisition signal controller to send the acquisition signal is: τ=L / S (unit: second), that is, the array camera scans and collects data once every interval τ. Specifically, the array camera includes two groups of linear scanning cameras. The two groups of linear scanning cameras are used to be fixed at the upper and lower parts of the detection gate, respectively, and respectively maintain a preset shooting distance with the corresponding surface of the steel plate to be tested, wherein the multiple linear scanning cameras in the group jointly cover the width of the steel plate to be tested through a cascade of equipment. A group of three-dimensional (3D) linear scanning cameras are installed at the upper and lower parts of the detection gate (i.e., above and below the steel plate to be tested) to collect image data, and the upper (or lower) cameras are cascaded to cover the entire width of the steel plate to be tested. Each camera covers a straight line range of a certain length, and the six cameras cover the width of the steel plate to be tested through a cascaded device. The number of cameras is determined by the width of the steel plate to be tested (or other objects to be tested) and the scanning range of the camera (for example, when the image data acquisition coverage width of each 3D camera is 0.45 meters and the width of the steel plate to be tested is 4.2 meters, a total of 18 to 20 3D cameras are required to cover the width of the upper and lower surfaces of the entire steel plate to be tested through a cascaded device). When the resolutions of the cascaded cameras are different, according to the different resolutions of the cameras, each camera obtains a set of coordinates of the pixel points of the steel plate to be tested within the coverage range, and outputs the first coordinate of the steel plate to be tested as a coordinate system based on the position of each camera as the origin. The first coordinate is written as: Wherein p=u or p=d, u represents the camera above the upper surface of the steel plate under test, d represents the camera below the lower surface of the steel plate under test, t=0,1,2,...T represents the sampling time, j=0,1,2,...M represents the camera index ID, k=0,1,2,...N represents the index ID of each camera collecting N sampling points each time, all cameras are uniformly controlled by the acquisition signal controller, and when the acquisition signal controller sends an acquisition signal, all cameras start to shoot and collect image data of the steel plate under test at the same time. Optionally, the image acquisition device also includes a rate controller and a roller bed. The rate controller is connected to the roller bed, and the rate controller is provided with a steel plate transmission rate, which is used to control the rotation speed of the roller bed according to the steel plate transmission rate. The roller bed is used to place the steel plate under test and rotate according to the rotation speed to transmit the steel plate under test. In this embodiment, the rate controller and the acquisition signal controller are controlled and coordinated by the rate matching software. The camera calibration software includes a coordinate conversion module. The coordinate conversion module is used to convert the first coordinate of the sampling point output by each camera into the world coordinate system according to the relative position relationship of each camera in the array camera to obtain the converted acquisition data. Preferably, if Figure 4 As shown in the figure, the origin O of the world coordinate system is a corner of the steel plate to be measured (such as Figure 3 One corner of the object to be inspected is the unified coordinate origin O), its X-axis is parallel to the camera array composed of each camera, its Y-axis is parallel to the transmission direction of the steel plate to be inspected, and its Z-axis is perpendicular to the XOY plane. The converted coordinate data is: Where i = j·N+k, j is the camera index, i takes values of 0, 1, 2, ... A, A = M·N+N M Indicates the total number of sampling points on any surface of the steel plate being tested at each scanning moment, N M ≤M represents the number of sampling points of the last camera that photographs any surface of the steel plate under test. It should be noted that the origin of the world coordinate system is not limited to a corner of the steel plate under test in this embodiment. It is used to convert the data collected by each camera into the collected data in the same coordinate system, which is convenient for the subsequent calculation of the thickness of the steel plate under test and ensures the accuracy of the calculation results.
[0105] Optionally, the first acquisition module includes a first acquisition unit and a first determination unit.
[0106] The first acquisition unit is used to obtain the thickness of the steel plate corresponding to the concave defect point. The t value and i value of each concave defect point in the concave defect point set are respectively obtained.
[0107] The first determining unit is connected to the first acquiring unit and is used to determine the grid corresponding to each concave defect point according to the t value and i value of each concave defect point.
[0108] Optionally, the second acquisition module includes a storage unit, a series connection unit and a second acquisition unit.
[0109] The storage unit is used to store the grid corresponding to each concave defect point in the concave defect point set into the first queue.
[0110] A series connection unit is connected to the storage unit and is used to extract grids in the first queue one by one as the central grid, and traverse other grids adjacent to the central grid until the grids with adjacent relationships in the first queue are connected in series to form a second queue, wherein one second queue corresponds to one defect surface, and the second queue is used to represent the defect surface to which a group of concave defect points with adjacent relationships belong.
[0111] The second acquisition unit is connected to the series connection unit and is used to acquire a non-adjacent second queue set to obtain a defective surface set.
[0112] In this embodiment, the detection accuracy of the concave defect surface is improved by using a grid to uniquely identify the concave defect point. In addition, it is used to identify multiple groups of continuous grids one by one in combination with the adjacent relationship of the grids, and a group of continuous grids is formed into a second queue, and one second queue corresponds to one concave defect surface, so as to more easily and accurately detect the steel plate defect surface. In this embodiment, the first queue is queue J, the second queue is queue R(k), where k is a positive number, and Figure 5 , the example second acquisition module is used to obtain the defect surface to which each concave defect point in the concave defect point set belongs, so as to obtain the process of the defect surface set:
[0113] like Figure 5 As shown, the grid with background color represents the grid corresponding to the concave defect point, and the grid without background color represents the grid corresponding to the sampling point without concave defect. The first time is used to extract the (4,3) grid from queue J and put it into queues Q(1) and R(1), and delete the (4,3) grid from queue J. The (4,3) grid is used as the center grid to traverse a circle of grids adjacent to it. The number of grids in a circle is eight, and the (4,3) grid is deleted from queue Q(1). The (4,4) grid and the (5,4) grid are put into queues Q(1) and R(1) in turn, and the (4,4) grid and the (5,4) grid are deleted from queue J, so that the queue J stores the defect point set that does not belong to the defect surface. Among them, R(k) is used to store the grid set of the kth defect surface, and Q(k) is used to store the defect points in the kth defect surface that have not yet been traversed and analyzed for the surrounding grids.
[0114] The second time, the first grid (4,4) in queue Q(1) is used as the center grid to traverse the surrounding grids adjacent to it and delete the (4,4) grid from queue Q(1). Since the (4,3) grid and the (5,4) grid are already in queue R(1), they are skipped and not processed. The grid (5,5) is placed in queues Q(1) and R(1), and the (5,5) grid is deleted from queue J.
[0115] The third time, the first grid (5,4) in queue Q(1) is used as the center grid to traverse the surrounding grids adjacent to it, and the (5,4) grid is deleted from queue Q(1). Since the (4,3) grid, the (4,4) grid, and the (5,4) grid are already in queue R(1), they are skipped and not processed.
[0116] The fourth time, the first grid (5,5) in queue Q(1) is used as the center grid to traverse the surrounding grids adjacent to it, and the (5,5) grid is deleted from queue Q(1). Since both the (4,4) grid and the (5,4) grid are already in queue R(1), they are skipped and not processed.
[0117] The fifth time, queue Q(1) is empty and is used to select the next (8,8) grid from queue J. The above process is repeated and finally used to generate queue R(2).
[0118] There are 4 grids in the R(1) queue, namely (4,3), (4,4), (5,4) and (5,5), representing the first defective surface. There are 3 grids in the R(2) queue, namely (8,8), (9,8) and (9,9), representing the second defective surface.
[0119] Optionally, the device for detecting defective surfaces of steel plates further includes an area calculation module 64 .
[0120] The area calculation module 64 is connected to the second acquisition module 63 and is used to calculate the area of each defective surface in the defective surface set according to the following formula:
[0121]
[0122] Wherein, L represents the step length of the steel plate in the Y-axis direction at each scanning moment, W represents the scanning length covered by each scanning camera, N represents the total number of sampling points of each scanning camera at each scanning moment, and l(k) represents the number of grids in the second queue.
[0123] Optionally, the device for detecting defective surfaces of steel plates further includes a positioning module.
[0124] A positioning module, connected to the second acquisition module, is used to select grids corresponding to the minimum values of t and i from each second queue as positioning points of the corresponding defective surface.
[0125] And, used to determine the X-axis and Y-axis coordinate values of the positioning point according to the following formula to locate the position of each defect surface:
[0126] y=t·L, (3)
[0127] x=(i+0.5)·W / N (4).
[0128] Embodiment 3:
[0129] like Figure 7 As shown, this embodiment provides a detection device, including a memory 71 and a processor 72, wherein the memory 71 stores a computer program, and the processor 72 is configured to run the computer program to implement the method for detecting the defective surface of a steel plate as described in Example 1.
[0130] Embodiment 4:
[0131] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for detecting a defective surface of a steel plate as described in Embodiment 1 is implemented.
[0132] The detection device for the defective surface of the steel plate of Example 2, the detection device of Example 3 and the computer-readable storage medium of Example 4 are used to divide the steel plate to be tested into T·A grids according to the scanning time and the number of sampling points, and to establish a mapping relationship between the concave defect points of the steel plate to be tested and the grids, and to obtain a grid set with an adjacent relationship according to the grids corresponding to the concave defect points and the adjacent relationship between the grids, so as to obtain a set of concave defect surfaces. Among them, it is used to scan the steel plate to be tested using conventional visual equipment (such as a camera). Compared with manual vision, this device for detecting the defective surface of the steel plate in industrial production based on machine vision has the characteristics of high degree of automation, comprehensive detection, adaptability to the production environment of high-speed units, and high detection accuracy. It is used to locate the position of the concave defect point by the grid position, which can improve the accuracy of defect point positioning. In addition, it is used to identify the grids corresponding to multiple groups of continuous defect points one by one in combination with the adjacent relationship of the grids, and a group of continuous grids constitute a second queue, and a second queue corresponds to a concave defect surface, so as to detect the defective surface of the steel plate more simply and accurately. Furthermore, the grid-based method for identifying concave defect points can improve detection accuracy, and the method for determining the area of defect surfaces through the grid area can also improve detection accuracy. Finally, since the steel plate under test may experience mechanical vibration during the detection process, in order to improve detection accuracy, the first threshold is set to a tolerance thickness within the target thickness range.
[0133] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A method for detecting defective surfaces of steel plates, characterized in that: include: The steel plate to be tested is divided into T·A grids, where T is the total number of scanning moments, and A is the total number of sampling points on the upper or lower surface of the steel plate to be tested at each scanning moment; Obtain a set of concave defect points of the tested steel plate, and obtain a grid corresponding to each concave defect point in the set of concave defect points, wherein the grid is marked as (t, i), t = 0, 1, 2, ..., T, i = 0, 1, 2, ..., A; According to the grids corresponding to each concave defect point and the adjacent relationship between the grids, the defect surface to which each concave defect point in the concave defect point set belongs is obtained to obtain a defect surface set; The step of obtaining a set of concave defect points of the tested steel plate specifically includes: Obtain the steel plate thickness corresponding to all sampling points of the tested steel plate; According to the difference between the steel plate thickness corresponding to the sampling point and the target thickness, determine whether each sampling point among all the sampling points is a concave defect point one by one to obtain the determination result of each sampling point; Obtaining a set of sampling points whose determination results are concave defect points, so as to obtain a set of concave defect points of the tested steel plate; The obtaining of the grid corresponding to each concave defect point in the concave defect point set specifically includes: According to the thickness of the steel plate corresponding to the concave defect point Respectively obtain the t value and i value of each concave defect point in the concave defect point set; Determine the grid corresponding to each concave defect point according to the t value and i value of each concave defect point; The step of obtaining the defect surface to which each concave defect point in the concave defect point set belongs according to the grids corresponding to each concave defect point and the adjacent relationship between the grids, so as to obtain the defect surface set, specifically includes: Storing the grid corresponding to each concave defect point in the concave defect point set into a first queue; Extract the grids in the first queue one by one as the central grid, and traverse other grids adjacent to the central grid until the grids in the first queue with adjacent relationships are connected in series to form a second queue, wherein one second queue corresponds to one defect surface, and the second queue is used to represent the defect surface to which a group of concave defect points with adjacent relationships belong; A non-adjacent second queue set is obtained to obtain a defect surface set.
2. The method for detecting defective surfaces of steel plates according to claim 1, characterized in that: The step of obtaining the steel plate thickness corresponding to all sampling points of the steel plate under test specifically includes: Obtain the coordinate data of the sampling points on the upper and lower surfaces of the steel plate being tested Wherein, p=u represents the upper surface of the steel plate under test, p=d represents the lower surface of the steel plate under test, u represents the camera above the upper surface of the steel plate under test, and d represents the camera below the lower surface of the steel plate under test; Calculate the steel plate thickness corresponding to all sampling points according to the following formula: in, is the Z-axis data in the coordinate data of the sampling point on the surface of the steel plate being tested, It is the Z-axis data in the coordinate data of the sampling point on the lower surface of the steel plate being tested.
3. The method for detecting defective surface of a steel plate according to claim 1, characterized in that: After obtaining the defect surface set, the method further includes: The area of each defective surface in the defective surface set is calculated according to the following formula: Wherein, L represents the step length of the steel plate in the Y-axis direction at each scanning moment, W represents the scanning length covered by each scanning camera, N represents the total number of sampling points of each scanning camera at each scanning moment, and l(k) represents the number of grids in the second queue.
4. The method for detecting defective surface of a steel plate according to claim 1, characterized in that: After obtaining the defect surface set, the method further includes: Select the grids corresponding to the minimum values of t and i from each second queue as the positioning points of the corresponding defective surface; Determine the X-axis and Y-axis coordinate values of the positioning point according to the following formula to locate the position of each defect surface: y=t·L, (3) x=(i+0.5)·W / N (4).
5. A device for detecting defective surfaces of steel plates, characterized in that: It includes a division module, a first acquisition module and a second acquisition module, The division module is used to divide the steel plate to be tested into T·A grids, where T is the total number of scanning moments, and A is the total number of sampling points on the upper or lower surface of the steel plate to be tested at each scanning moment. The first acquisition module is connected to the division module and is used to obtain a set of concave defect points of the tested steel plate and obtain a grid corresponding to each concave defect point in the set of concave defect points, wherein the grid is marked as (t, i), t = 0, 1, 2, ..., T, i = 0, 1, 2, ..., A, A second acquisition module, connected to the first acquisition module, is used to acquire the defect surface to which each concave defect point in the concave defect point set belongs according to the grids corresponding to each concave defect point and the adjacent relationship between the grids, so as to obtain a defect surface set; The first acquisition module is specifically used to obtain the steel plate thickness corresponding to all sampling points of the tested steel plate; determine whether each sampling point among all sampling points is a concave defect point one by one according to the difference between the steel plate thickness corresponding to the sampling point and the target thickness, so as to obtain the determination result of each sampling point; and obtain a set of sampling points whose determination results are concave defect points, so as to obtain a set of concave defect points of the tested steel plate; The first acquisition module includes a first acquisition unit and a first determination unit. The first acquisition unit is used to obtain the thickness of the steel plate corresponding to the concave defect point. Respectively obtain the t value and i value of each concave defect point in the concave defect point set, A first determining unit, connected to the first acquiring unit, for determining the grid corresponding to each concave defect point according to the t value and i value of each concave defect point; The second acquisition module includes a storage unit, a series connection unit and a second acquisition unit. A storage unit is used to store the grid corresponding to each concave defect point in the concave defect point set into a first queue, A series connection unit is connected to the storage unit and is used to extract grids in the first queue one by one as the central grid, and traverse other grids adjacent to the central grid until the grids in the first queue with adjacent relationships are connected in series to form a second queue, wherein one second queue corresponds to one defect surface, and the second queue is used to represent the defect surface to which a group of concave defect points with adjacent relationships belong. The second acquisition unit is connected to the series connection unit and is used to acquire a non-adjacent second queue set to obtain a defective surface set.
6. The device for detecting defective surface of a steel plate according to claim 5, characterized in that: Also includes area calculation module, The area calculation module is connected to the second acquisition module and is used to calculate the area of each defective surface in the defective surface set according to the following formula: Wherein, L represents the step length of the steel plate in the Y-axis direction at each scanning moment, W represents the scanning length covered by each scanning camera, N represents the total number of sampling points of each scanning camera at each scanning moment, and l(k) represents the number of grids in the second queue.
7. The device for detecting defective surface of a steel plate according to claim 5, characterized in that: Also includes positioning module, A positioning module is used to select the grid corresponding to the minimum value of t and i from each second queue as the positioning point of the corresponding defective surface. And, used to determine the X-axis and Y-axis coordinate values of the positioning point according to the following formula to locate the position of each defect surface: y=t·L, (3) x=(i+0.5)·W / N(4).
8. A detection device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the method for detecting a defective surface of a steel plate as described in any one of claims 1 to 4.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for detecting a defective surface of a steel plate as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Steel plate scratch detection method and device and storage medium
CN115728240A