Disclosure of Invention
The invention mainly aims to provide a monocular vision square steel tube concrete column three-surface detection device and a detection method, aiming at reducing the detection cost of a square steel tube concrete column and improving the detection precision and the working efficiency.
In order to achieve the purpose, the monocular vision square concrete filled tubular column three-surface detection device provided by the invention comprises a workbench capable of bearing a workpiece for placing the square concrete filled tubular column, a detection module which faces the workpiece and is used for detecting the workpiece is placed in front of the workbench, the detection module is electrically connected with a computer, a mirror reflection module which is provided with a mirror surface and is used for reflecting the left side surface and the right side surface of the workpiece is arranged on the top surface of the workbench, and white paper is pasted on the left side surface and the right side surface of the workpiece facing the mirror reflection module.
Preferably, the detection module is a CCD industrial camera for capturing images.
Preferably, the mirror reflection module comprises mirror reflection mechanisms respectively arranged on the left side and the right side of the workpiece, the mirror reflection mechanisms comprise bases arranged on the top surface of the workbench, the top of each base is connected with one end of a translation sliding block in a clamping manner, and the translation sliding blocks can horizontally and linearly move along the clamping position with the top of each base; the other end of the translation sliding block is connected with the middle part of the bracket in a clamping manner, and the bracket can vertically and linearly move along the clamping position of the translation sliding block; the side surface of the bracket facing the workpiece is provided with a horizontal rotating bracket which is pivotally connected with the bottom of the bracket, and the horizontal rotating bracket is provided with an arc-shaped protruding block which is inserted into a top hole of the bracket; the side part of the horizontal rotating bracket is pivotally connected with the vertical rotating bracket, and the vertical rotating bracket is provided with an arc-shaped protruding block which is inserted into a side hole on the other side of the horizontal rotating bracket; the side of the horizontal rotating support facing the workpiece is provided with a mirror surface, and the base is relatively fixed with the translation sliding block, the translation sliding block is fixed with the support, the support is fixed with the horizontal rotating support, and the horizontal rotating support is fixed with the vertical rotating support through screws.
Preferably, the included angles between the specular reflection surface of the specular reflection mechanism and the left side surface or the right side surface of the workpiece are both 0-45 degrees.
Preferably, the included angle between the specular reflection surface of the specular reflection mechanism and the left side surface or the right side surface of the workpiece is 15 degrees.
Preferably, the size of the white paper pasted on the left side surface or the right side surface of the workpiece is 100mm x 100mm, and the bottom end edge of the white paper pasted on the workpiece is 150-200 mm higher than the bottom edge of the workpiece.
The invention also provides a detection method using the device, which comprises the following steps:
1) establishing an image library and a color module classification library;
2) calibrating the CCD industrial camera to obtain internal parameters and distortion parameters of the camera;
3) pressurizing the square concrete filled steel tubular column by an external pressure device, and shooting a workpiece and the specular reflection module by a CCD industrial camera to obtain a corrected target image;
4) dividing the image obtained by shooting in the step 3) into a left side image, a forward surface image and a right side image, and preprocessing the left side image, the forward surface image and the right side image;
5) and matching and comparing the preprocessed image with an image template in a preset image library by utilizing a template matching principle to judge whether cracks exist.
According to the technical scheme, the square concrete filled steel tubular column workpiece is arranged on the top surface of the workbench, the detection module for detecting the workpiece is arranged in front of the workbench, the detection module is electrically connected with the computer, and the mirror reflection modules are arranged on the left side surface and the right side surface of the workpiece, so that the mirror reflection modules reflect the left side surface and the right side surface of the workpiece. The CCD industrial camera of the detection module is used for shooting the front, the left side face and the right side face of the workpiece and sending the shot images to the computer for analysis and judgment so as to analyze whether the workpiece has crack damage or not.
Compared with the prior art, the mirror reflection mechanism in the technical scheme can realize rotation and translation of the mirror surface in the horizontal direction and rotation and translation of the mirror surface in the vertical direction, fine adjustment of the angle and the imaging range of the mirror surface is realized, and the mirror reflection mechanism is applicable to various different experimental environments.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and back … …) are involved in the embodiment of the present invention, the directional indications are only used to explain the relative positional relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indications are changed accordingly.
In addition, if there is a description of "first", "second", etc. in an embodiment of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
The invention provides a monocular vision square steel tube concrete column three-surface detection device.
Referring to fig. 1 and 2, the monocular vision square concrete filled tubular column three-surface detection device of the embodiment of the invention comprises a workbench 1 for placing a square concrete filled tubular column workpiece, a detection module which faces to the workpiece 3 and can be used for detecting the workpiece 3 is placed at a position far away from the front of the workbench 1, the detection module is electrically connected with a computer 7, a mirror reflection module which is provided with a mirror surface and can be used for reflecting the left side surface and the right side surface of the workpiece 3 is arranged on the top surface of the workbench 1, and white paper 2 is pasted on the left side surface and the right side surface of the workpiece 3 facing to the mirror reflection module.
Specifically, a detection module for gathering the image is CCD industry camera 4, and CCD industry camera 4 places in the place ahead of workstation 1 through tripod 5 to CCD industry camera 4's shooting direction is towards work piece 3 front, and CCD industry camera 4 is connected through net twine or wireless wifi mode electricity with computer 7.
Referring to fig. 3 and 4, the specular reflection module includes specular reflection mechanisms disposed on the left and right sides of the workpiece, the specular reflection mechanism 6 of the embodiment includes a base 61 disposed on the top surface of the workbench 1, the top of the base 61 is connected with one end of a translation slider 62 in a clamping manner, the translation slider 62 can move horizontally and linearly along the clamping position of the top of the base 61, one end of the translation slider 62 is connected with the middle of a support 63 in a clamping manner, and the support 63 can move vertically and linearly along the clamping position of the translation slider 62. The side of the bracket 63 near the workpiece 3 is provided with a horizontal rotary bracket 64 pivotally connected to the bottom of the bracket 63, and the horizontal rotary bracket 64 is provided with an arc-shaped protrusion 67 inserted into a top hole of the bracket 63 so that the horizontal rotary bracket 64 can swing about a pivot shaft connected to the bottom of the bracket 63 and the position is determined by the arc-shaped protrusion 67. In addition, the side surface of the horizontal rotating bracket 64 is pivotally connected with the vertical rotating bracket 65, the vertical rotating bracket 65 is provided with an arc-shaped protruding block 67 which is inserted into a side hole at the other side of the horizontal rotating bracket 64, so that the vertical rotating bracket 65 can swing around a pivot shaft connected with the side surface of the horizontal rotating bracket 64, the swing angle of the vertical rotating bracket 65 is determined by the arc-shaped protruding block 67 at the side surface, and meanwhile, the side surface of the horizontal rotating bracket 64 facing the workpiece 3 is provided with a mirror surface. In this embodiment, after the mirror surface of the mirror reflection mechanism 6 is adjusted to a proper position, the base 61 and the translation slider 62, the translation slider 62 and the bracket 63, the bracket 63 and the horizontal rotation bracket 64, and the horizontal rotation bracket 64 and the vertical rotation bracket 65 can be fixed by screws 66, respectively.
Referring to fig. 1 and 2, the left side and the right side of the workpiece 3 are both provided with the specular reflection mechanisms 6, and the specular reflection surfaces of the specular reflection mechanisms 6 and the side surfaces of the workpiece 3 form an included angle of 15 °. In the embodiment of the invention, the size (length, width and height) of a workpiece for testing is 250mm, 250mm and 1450mm, the size of the white paper 2 attached to the left side surface or the right side surface of the workpiece 3 is 100mm and 100mm, the white paper 2 used as a mark is attached to the left side surface and the right side surface of the workpiece 3 in an area which is not easy to crack and can be imaged by the CCD industrial camera 4, and specifically, the bottom edge of the attached white paper 2 is 150-200 mm higher than the bottom edge of the workpiece 3.
It should be noted that the white paper 2 is used for pixel calibration, and an operator can find out the number of pixels included in a unit millimeter in an image by reading the sum of corresponding pixels at two ends of the white paper 2, so as to find out the corresponding relationship between the pixels and the millimeters, so that the paper size of the white paper 2 in the test process is not limited to the above specification of 100mm to 100 mm.
In other embodiments of the present invention, when the angle between the specular reflection surface of the specular reflection mechanism 6 and the side surface of the workpiece 3 is 45 °, after the specular reflection surface reflects, the image of the side surface of the workpiece 3 in the plane mirror is perpendicular to the optical axis of the CCD industrial camera 4, and the image captured by the CCD industrial camera 4 can reflect the surface quality of the side surface of the workpiece 3 most truly. However, because both the left and right sides of the workpiece 3 need to be photographed in place, the single CCD industrial camera 4 has a certain limitation in view angle, which may cause the photographed detection object to exceed the camera view angle range and cause part of the part not to be photographed.
Therefore, referring to fig. 2 and 5, in the embodiment of the present invention, the included angle between the specular reflection surface and the side surface of the workpiece 3 is 15 °, so that after the side surface of the workpiece 3 is subjected to specular imaging by the specular reflection surface of the specular reflection mechanism, the image of the side surface of the workpiece 3 in the plane mirror forms an included angle of 30 ° with the shooting optical axis of the CCD industrial camera 4, so that the side surface width of the workpiece 3 to be measured can be reduced.
Referring to fig. 7, before the detection device of the embodiment of the present invention is used, an image database and a color model classification library need to be established in advance in the computer 7, because the CCD industrial camera 4 utilizes a color model, a template matching principle and an optimization decision-making judgment theory after acquiring a required image, an image database and a color model classification library are established in advance. The color model classification library comprises parameters which the images under different color spaces should have, so that the images are converted to a specific color space before template matching, and the best color component is selected in advance for template matching and crack detection. The image library comprises a crack-free image sample, a crack image template sample meeting normal limiting standards and a crack image template sample not meeting the limiting standards, wherein the samples in the image library need to comprise cracks with different widths and crack templates with different lengths and the same width, and corresponding damage and danger degrees are given at the same time, so that decision judgment can be given correspondingly after template matching is successful.
Referring to fig. 1 and 7, in the detection apparatus according to the embodiment of the present invention, a square concrete filled steel tubular column workpiece 3 is first placed at a middle position of a top surface of a table 1, then a side surface of the workpiece 3 is painted red with red chalk, two pieces of white paper 2 are respectively adhered to a left side surface and a right side surface of the workpiece 3, a specular reflection mechanism 6 is placed on the left side of the workpiece 3, another specular reflection mechanism 6 is placed on the right side of the workpiece 3, and an included angle between the specular reflection surfaces of the two specular reflection mechanisms 6 and the left side surface or the right side surface of the workpiece 3 is 15 °.
The CCD industrial camera 4 is placed right in front of the workpiece 3, the CCD industrial camera 4 is enabled to face the workpiece 3 in the forward direction for shooting, after the position of the CCD industrial camera 4 is calibrated, the workpiece 3 is pressed from the right upper direction to the right lower direction through the externally connected pressure device 8, and the CCD industrial camera 4 shoots the front face of the workpiece 3 and the mirror reflection mechanism 6 and obtains a corrected target image.
The CCD industrial camera 4 sends the shot image to the computer 7 for analysis and processing, the computer 7 divides the picture image shot by the CCD industrial camera 4 into a left side surface part, a main surface part and a right side surface part, and then an R (red) color component in the image is selected from a preset color model classification library, so that the surface of the workpiece and peripheral objects, such as peripheral equipment of an experimental environment, a workbench 1 and the like, can be obviously distinguished from impurities with larger difference with the red color, and image noise is removed. In addition, due to the influence of equipment or shooting environment factors, some noises irrelevant to the image can easily appear in the image, and the noises can be greatly reduced by smoothly removing the noises, so that the subsequent image processing operation is facilitated.
Referring to fig. 6 and 7, after removing the noise in the image, the image is converted into a gray scale image, and then the gray scale enhancement operation is performed on the image, such as increasing the contrast, so that the crack characteristics of the workpiece 3 can be fully highlighted. And then matching the preprocessed target image with the image template in the image database by utilizing a template matching principle, and judging whether cracks exist or not according to the similarity.
Specifically, the target image is traversed by using the image template, the maximum SAD value (sum of absolute differences) in the traversing process is taken as the similarity measure, and the smaller the maximum SAD value is, the more similar the template image and the target image are. The template image with which the target image is most similar can be found by comparing the maximum SAD values between the different template images and the target image. When all SAD values are large and the threshold condition is not satisfied, then no crack is considered to be present.
The calculation formula of the SAD similarity measure is as follows:
in the formula, s is an image to be matched, and t is an image template of M × N. SAD (i, j) is SAD similarity measure which takes the pixel point with the coordinate value of (i, j) as an anchor point in s;
if the similarity degree of the target image and the image template is enough to judge that the characteristic is a crack, further calculating the length and the width of the crack; and if the similarity degree of the target image and the image template is not enough to judge that the characteristic is a crack, outputting to be 0.
And when the crack similarity degree of the target image and the image template is greater than a threshold value, judging that the workpiece has cracks, and detecting the length and the width of the cracks. Because the image is preprocessed by the color component, the gray level of the surface of the workpiece 3 in the image is obviously different from the background gray level, and the crack image can be segmented by selecting a reasonable threshold value to carry out image binarization processing on the image, but some noise may be generated during threshold value segmentation, and the noise can be reduced by edge smoothing processing. After the edge smoothing processing, carrying out edge detection on the image, thinning the edge image, extracting a skeleton, then extracting a plurality of points on the edge of the image, selecting a proper function model according to the shape of the edge, carrying out curve fitting on the plurality of points, and finally obtaining an expression of the edge image.
Referring to fig. 6, 8 and 9, in calculating the crack length and width of the workpiece 3, the length of the crack can be obtained by directly calculating the length of the fitted curve by curve integration for the crack on the front surface of the workpiece 3, and the crack width can be obtained by direct measurement.
When calculating the crack length and width on the side surface of the workpiece 3, the length of the fitted curve cannot be directly taken as the crack length because the image expression is only the projection expression of the crack on the lens.
The expression of the fitted curve is f (y, z) ═ 0, and is a cylindrical surface in the space coordinate system, because
The expression of the side surface of the pillar in the space coordinate system is
The two expressions are combined to obtain a curve expression of the real crack, and then the curve length of the crack can be obtained through curve integration.
In order to obtain the physical value of the relevant parameter in millimeter unit, the pixels in the image need to be calibrated to find the corresponding relationship between the two units. In the step of pixel calibration, a piece of white paper with a known length is placed in a range which can be shot by a camera, and the number of pixel points contained in a unit millimeter in an image can be found out by reading the sum of pixels with corresponding lengths on two ends of the white paper. It should be noted that, after the white paper is projected to the image through the lens, the width in the horizontal direction becomes half of the original width, but the width in the vertical direction does not change, so if the conversion relationship between the pixels and the millimeters is found through the width in the horizontal direction of the white paper, the width of the image needs to be halved, and then the curve length needs to be converted into the actual physical distance, so that the crack length can be obtained. The width of the crack can be directly calculated by calculating the width of the pixel and then converted into the actual physical distance.
According to the technical scheme of the embodiment of the invention, the square steel tube concrete column workpiece 3 is arranged on the top surface of the workbench 1, the detection module for detecting the workpiece 3 is arranged in front of the workbench 1, the detection module is electrically connected with the computer 7, and the mirror reflection modules are arranged on the left side surface and the right side surface of the workpiece 3, so that the mirror reflection module 6 reflects the left side surface and the right side surface of the workpiece 3. The CCD industrial camera 4 of the detection module shoots the front, the left side and the right side of the workpiece 3 and sends the shot images to the computer 7 for analysis and judgment so as to analyze whether the workpiece 3 has crack damage.
Compared with the prior art, the mirror reflection mechanism 6 in the technical scheme of the invention can realize rotation and translation of the mirror surface in the horizontal direction and rotation and translation in the vertical direction, and realize fine adjustment of the angle and the imaging range of the mirror surface, and is suitable for various different experimental environments.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.