Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a fault detection method and a fault detection system for cold-rolled strip steel wire flying equipment based on point cloud,
the aim of the invention can be achieved by the following technical scheme:
s1, performing S1; scanning detection equipment through a data acquisition device to obtain scanning light, reflecting the scanning light to a 3D point cloud scanning sensor through a steel belt, and acquiring point cloud data through the 3D point cloud scanning sensor;
s2: performing direct filtering processing on the point cloud data to eliminate a background and obtain interference-free data, performing radius filtering analysis on the interference-free data to obtain connected data, and performing downsampling processing on the connected data to obtain modeling data;
s3: fusing the modeling data with a visible light image, establishing a 3D point cloud visible light fusion scene, setting a monitoring area in the 3D point cloud visible light fusion scene, and setting a space virtual detection frame in the monitoring area;
s4: and counting the number of the point cloud data in the space virtual detection frame to serve as a detection value, presetting a safety threshold and an alarm threshold, judging the detection value, the safety threshold and the alarm threshold, returning to a normal operation signal if the detection value is smaller than the safety threshold, returning to process an early warning information signal if the detection value is larger than the safety threshold and smaller than the alarm threshold, and returning to emergency processing alarm signal if the detection value is larger than the alarm threshold.
Specifically, the data acquisition device is an RGB camera and a laser radar, and acquires data in the same direction.
Specifically, the step S2 specifically includes the following steps:
setting a value range for each dimension of the point cloud data, judging whether the value of each point in the point cloud data in the current dimension is in the corresponding value range or not by traversing the point cloud data, if yes, reserving the point, otherwise, deleting the point, and forming the reserved point into the non-interference data;
setting a neighborhood radius and a neighbor point threshold value, traversing the non-interference data, judging whether the number of neighbor points of each point of the non-interference data in the neighborhood radius is larger than the neighbor point threshold value, if yes, reserving the point, if not, deleting the point, and forming the reserved point into communication data;
and establishing a 3D voxel grid through the connected data, and substituting the grid centroid of each point falling in the 3D voxel grid with the point to obtain modeling data.
Specifically, the step S3 specifically includes the following steps:
solving a conversion matrix by adopting a matching calibration mode for the data collected by the laser radar and the RGB camera, wherein a calculation formula is as follows:,
wherein U is the abscissa of the pixel point of the RGB camera, V is the ordinate of the pixel point of the RGB camera, M is a transformation matrix, U is the radius of the laser radar coordinate system, V is the azimuth angle of the laser radar coordinate system, and W is the polar angle of the laser radar coordinate system;
converting the 3D point cloud data into coordinates on an RGB image through the conversion matrix and obtaining RGB color information;
establishing a 3D point cloud visible light fusion scene by the RGB image coordinates, the RGB color information and the modeling data;
and establishing a cuboid detection frame with a fixed size at the spatial origin of the 3D point cloud visible light fusion scene.
Specifically, the step S4 specifically includes the following steps:
converting the points of the 3D point cloud data into RGB image coordinates to obtain space coordinates, and converting the space coordinates into a detection frame coordinate system to obtain detection coordinates, wherein a conversion formula is as follows:,
wherein Q is a detection coordinate, R is a rotation matrix, T is a translation vector, and P is a space coordinate;
and when the detection coordinates are in the detection frame, counting the number of detection points in the detection frame as detection values.
The fault detection system comprises a scanning module, a scanning data processing module, a monitoring analysis module and a fault detection module;
the scanning module is used for scanning the detection equipment to obtain scanning light, reflecting the scanning light to the 3D point cloud scanning sensor through the steel belt, and acquiring point cloud data through the 3D point cloud scanning sensor;
the scanning data processing module is used for performing direct filtering processing on the point cloud data to eliminate the background and obtain interference-free data, performing radius filtering analysis on the interference-free data to obtain connected data, and performing downsampling processing on the connected data to obtain modeling data;
the monitoring analysis module is used for fusing the modeling data with the visible light image, establishing a 3D point cloud visible light fusion scene, setting a monitoring area in the 3D point cloud visible light fusion scene, and setting a space virtual detection frame in the monitoring area;
the fault detection module is used for counting the quantity of the point cloud data in the space virtual detection frame, presetting a safety threshold and an alarm threshold, judging the detection value, the safety threshold and the alarm threshold, returning to a normal operation signal if the detection value is smaller than the safety threshold, returning to process an early warning information signal if the detection value is larger than the safety threshold and smaller than the alarm threshold, and returning to emergency processing alarm signal if the detection value is larger than the alarm threshold.
The beneficial effects of the invention are as follows:
(1) Scanning is carried out on detection equipment through an RGB camera and a laser radar to obtain scanning light, the scanning light is reflected to a 3D point cloud scanning sensor through a steel belt, point cloud data are acquired through the 3D point cloud scanning sensor, the ambient brightness during detection is improved, measurement characteristics are directly determined, the imaging effect of the detection equipment is improved, the data processing process is simplified, and the stability and reliability of data transmission are guaranteed.
(2) The 3D point cloud visible light fusion scene is established by fusing the point cloud data with the visible light image, a three-dimensional detection frame is arranged in the 3D fusion scene, and the problems of equipment surface warping, blocking and the like are quantitatively represented by calculating the 3D point cloud data in the detection frame, so that the complexity of an identification system is reduced, and the positioning, measuring and identifying precision of the system is improved.
Detailed Description
In order to further describe the technical means and effects adopted by the invention for achieving the preset aim, the following detailed description is given below of the specific implementation, structure, characteristics and effects according to the invention with reference to the attached drawings and the preferred embodiment.
Referring to fig. 1, a fault detection method for a cold-rolled strip steel wire flying device based on point cloud specifically includes the following steps:
s1, performing S1; scanning detection equipment through a data acquisition device to obtain scanning light, reflecting the scanning light to a 3D point cloud scanning sensor through a steel belt, and acquiring point cloud data through the 3D point cloud scanning sensor;
s2: performing direct filtering processing on the point cloud data to eliminate a background and obtain interference-free data, performing radius filtering analysis on the interference-free data to obtain connected data, and performing downsampling processing on the connected data to obtain modeling data;
s3: fusing the modeling data with a visible light image, establishing a 3D point cloud visible light fusion scene, setting a monitoring area in the 3D point cloud visible light fusion scene, and setting a space virtual detection frame in the monitoring area;
s4: and counting the number of the point cloud data in the space virtual detection frame to serve as a detection value, presetting a safety threshold and an alarm threshold, judging the detection value, the safety threshold and the alarm threshold, returning to a normal operation signal if the detection value is smaller than the safety threshold, returning to process an early warning information signal if the detection value is larger than the safety threshold and smaller than the alarm threshold, and returning to emergency processing alarm signal if the detection value is larger than the alarm threshold.
Specifically, the data acquisition device is an RGB camera and a laser radar, and acquires data in the same direction.
Specifically, the step S2 specifically includes the following steps:
setting a value range for each dimension of the point cloud data, judging whether the value of each point in the point cloud data in the current dimension is in the corresponding value range or not by traversing the point cloud data, if yes, reserving the point, otherwise, deleting the point, and forming the reserved point into the non-interference data;
setting a neighborhood radius and a neighbor point threshold value, traversing the non-interference data, judging whether the number of neighbor points of each point of the non-interference data in the neighborhood radius is larger than the neighbor point threshold value, if yes, reserving the point, if not, deleting the point, and forming the reserved point into communication data;
and establishing a 3D voxel grid through the connected data, and substituting the grid centroid of each point falling in the 3D voxel grid with the point to obtain modeling data.
In this embodiment, PCL open source library is used to process point cloud data, points within a range of values no longer preset in a specified dimension are filtered, a filter object pass is created through PCL:: passchrough < PCL::: pointXYZ > pass, filtering is performed in various axis directions using pass.setFilterFieldName ("pos") settings, a filtering range is set through pass.setFilterLimits (min, max), PCL:: radio outlieRemoval < PCL::: pointXYZ > filters are used for filtering results to achieve a radius filtering function, based on the above analysis, a 3D voxel grid is created on the input point cloud using PCL::: voxel < PCL:: pointXYZ > filters, points within each grid are approximately represented by the centroid of the grid, and the PCL PointPointXud 2 class is used to preserve the point cloud.
Specifically, the step S3 specifically includes the following steps:
solving a conversion matrix by adopting a matching calibration mode for the data collected by the laser radar and the RGB camera, wherein a calculation formula is as follows:,
wherein U is the abscissa of the pixel point of the RGB camera, V is the ordinate of the pixel point of the RGB camera, M is a transformation matrix, U is the radius of the laser radar coordinate system, V is the azimuth angle of the laser radar coordinate system, and W is the polar angle of the laser radar coordinate system;
converting the 3D point cloud data into coordinates on an RGB image through the conversion matrix and obtaining RGB color information;
establishing a 3D point cloud visible light fusion scene by the RGB image coordinates, the RGB color information and the modeling data;
and establishing a cuboid detection frame with a fixed size at the spatial origin of the 3D point cloud visible light fusion scene.
Specifically, the step S4 specifically includes the following steps:
converting the points of the 3D point cloud data into RGB image coordinates to obtain space coordinates, and converting the space coordinates into a detection frame coordinate system to obtain detection coordinates, wherein a conversion formula is as follows:,
wherein Q is a detection coordinate, R is a rotation matrix, T is a translation vector, and P is a space coordinate;
and when the detection coordinates are in the detection frame, counting the number of detection points in the detection frame as detection values.
In this embodiment, the internal parameters of the RGB camera need to be acquired, the conversion from the laser radar coordinate system to the RGB camera coordinate system is realized by means of the rotation matrix and the translation vector, the internal parameters of the RGB camera, the rotation matrix and the translation vector are combined into three rows and four columns of M matrices, more than 6 groups of object points [ U, V, W ] scanned by the laser radar are used to correspond to the points [ U, V ] on the visible light RGB image, and the M matrices are solved. Setting basic parameters of a detection frame, namely length, width and height, changing the size of the detection frame by modifying the parameters, setting a position difference value of coordinates of a detection type center point as a translation vector, setting each angle of rotation of the detection frame by the center point as a rotation matrix, reversely pushing out the rotation matrix and the translation vector through the M matrix and an internal reference matrix, converting the rotation matrix and the translation vector obtained by the mode when converting the point cloud data into a coordinate system of the detection frame, and counting the number of point clouds in the detection frame.
The fault detection system comprises a scanning module, a scanning data processing module, a monitoring analysis module and a fault detection module;
the scanning module is used for scanning the detection equipment to obtain scanning light, reflecting the scanning light to the 3D point cloud scanning sensor through the steel belt, and acquiring point cloud data through the 3D point cloud scanning sensor;
the scanning data processing module is used for performing direct filtering processing on the point cloud data to eliminate the background and obtain interference-free data, performing radius filtering analysis on the interference-free data to obtain connected data, and performing downsampling processing on the connected data to obtain modeling data;
the monitoring analysis module is used for fusing the modeling data with the visible light image, establishing a 3D point cloud visible light fusion scene, setting a monitoring area in the 3D point cloud visible light fusion scene, and setting a space virtual detection frame in the monitoring area;
the fault detection module is used for counting the quantity of the point cloud data in the space virtual detection frame, presetting a safety threshold and an alarm threshold, judging the detection value, the safety threshold and the alarm threshold, returning to a normal operation signal if the detection value is smaller than the safety threshold, returning to process an early warning information signal if the detection value is larger than the safety threshold and smaller than the alarm threshold, and returning to emergency processing alarm signal if the detection value is larger than the alarm threshold.
In the embodiment, a monitoring device is arranged between a welding machine and a steel structure, a scanning module adopts an RGB camera and a laser radar to collect data simultaneously, two pieces of equipment are placed in the same direction, the collected data are uploaded to an industrial personal computer through a sensor, the industrial personal computer processes the scanning data, the industrial personal computer is provided with a ubuntu environment, and a program is written to link a PCL3D point cloud library to preprocess the scanning data; reconstructing a three-dimensional scene by using an SfM algorithm, counting and judging the quantity of the point cloud data transmitted in real time in a detection frame, returning an early warning instruction, and analyzing the early warning instruction by an industrial personal computer to send a safety signal; the industrial personal computer transmits data to the operation terminal and the server of the PLC room through a network, the server can manage a plurality of sets of detection devices, and the operation terminal can check real-time data and abnormal early warning historical data of any set of detection devices at any time.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The present invention is not limited to the above embodiments, but is capable of modification and variation in detail, and other modifications and variations can be made by those skilled in the art without departing from the scope of the present invention.