Method for positioning reinforcing mesh
Technical Field
The invention relates to the technical field of building construction equipment, in particular to a method for positioning a reinforcing mesh.
Background
At present, no scheme with low cost and reliability can accurately position the position of a steel bar in the bundling and welding industry of a steel bar mesh, the prior art adopts a 3D vision camera, a 3D line scanning laser or a 2D camera and a line scanning ranging laser to position, and the prior art also has a scheme of a 2D camera and a common light source with low cost, but has the defects of poor stability and great hidden danger.
The positioning is carried out by adopting a 3D vision camera, a 3D laser scanner or a 2D camera and a line scanning ranging laser, and the defects of high cost and long time consumption exist, so that the method is not suitable for large-scale popularization.
The traditional 2D camera and the front light or the side light have the defects of high requirement consistency on the background color and the material color of a site, strict requirement on the site environment and unstable final effect.
Disclosure of Invention
The invention provides a method for positioning a reinforcing mesh, aiming at reliably positioning and detecting various types of reinforcing meshes on the premise of low cost and stability and avoiding the conditions of machine collision or defective products in the welding or bundling and steel mesh typesetting processes.
The invention provides a method for positioning a reinforcing mesh, which comprises the following steps:
s1, judging the position of a single steel bar: emitting line laser to the direction of the single steel bar, wherein height difference exists between the single steel bar and the background platform in camera imaging after the line laser is reflected, and then judging the relative position of the steel bar in a single direction;
s2, determining the coordinates of a plurality of steel bars: emitting a plurality of line lasers to a reinforcing steel bar net to form an array, defining a cross point coordinate of the line lasers as a reference origin point coordinate, and obtaining a cross point of a single reinforcing steel bar and the line lasers and/or a relative position coordinate of the cross point between the reinforcing steel bars through imaging positioning calculation in a vision camera;
s3, determining the relative heights of the multiple steel bars: and calculating the height difference of the corresponding steel bars relative to the background platform by judging the position difference of the laser breakpoints on the same line.
As a further improvement of the present invention, the step S1 includes:
s11, reflecting light rays of a background platform by line laser, and calculating a first distance between a line laser emission point and the background platform in camera imaging;
s12, reflecting the light of the single steel bar by the line laser, and calculating a second distance between the light emitting point of the line laser and the single steel bar in camera imaging;
and S13, subtracting the first distance from the second distance to calculate the height difference between the steel bar and the background platform.
The height difference between the steel bar and the background platform is calculated by subtracting the distance of the light reflected by the single steel bar from the distance of the light reflected by the background platform, so that the height of the single steel bar is known, the height of the single steel bar is easily obtained and calculated in camera imaging, and the positioning effect is simply and quickly realized.
As a further improvement of the present invention, the step S1 further includes:
and S14, respectively calculating the height difference of a plurality of pixel points on a single steel bar, and calculating the relative spatial position of the steel bar in a single direction. The single steel bar is composed of a plurality of pixel points, so that the spatial position relation of the single steel bar can be comprehensively positioned by calculating the height difference of the pixel points.
As a further improvement of the present invention, the step S2 includes:
s21, emitting a plurality of transverse line lasers parallel to an X axis and a plurality of vertical line lasers parallel to a Y axis to the reinforcing mesh, wherein the plurality of transverse line lasers and the plurality of vertical line lasers are crossed to form a mesh array of a plane coordinate system, and a cross point of one transverse line laser and one vertical line laser is used as a reference origin point coordinate;
s22, determining the coordinates of the intersection point of the single steel bar and the line laser: when the transverse line laser and a single steel bar are crossed, taking the Y-axis coordinate of the transverse line laser as the Y-axis coordinate value of the single steel bar, calculating the distance between the crossed point and the transverse line laser in camera imaging, and superposing the X-axis coordinate of the transverse line laser as the X-axis coordinate value of the crossed point; when the vertical line laser and a single steel bar are crossed, taking the X-axis coordinate of the vertical line laser as the X-axis coordinate value of the single steel bar, calculating the distance between the crossed point and the vertical line laser in camera imaging, and superposing the Y-axis coordinate of the vertical line laser as the Y-axis coordinate value of the crossed point;
s23, determining coordinates of cross points among the steel bars: determining a plurality of steel bars which are intersected together, respectively obtaining the axis coordinates of the intersection point of the corresponding single steel bar and the line laser, and calculating the axis coordinate value of the intersection point between the steel bars.
When the steel bar intersection is preliminarily or roughly positioned, the coordinates of the intersection points of the steel bars intersected with the line laser can be defined as the coordinate values of the steel bar intersection points, so that the rough preliminary positioning is realized.
As a further improvement of the present invention, the step S23 further includes:
s231, determining two vertically crossed reinforcing steel bars which are respectively a transverse reinforcing steel bar parallel to an X axis and a vertical reinforcing steel bar parallel to a Y axis, respectively taking a Y-axis coordinate of a cross point of the transverse reinforcing steel bar and a vertical line laser, taking an X-axis coordinate of a cross point of the vertical reinforcing steel bar and a transverse line laser, and executing S232 or S233;
s232, taking the Y-axis coordinate of the cross point of the transverse steel bar and the vertical laser as the Y-coordinate value of the cross point of the two steel bars, calculating the distance difference of the X-axis coordinate according to the space position proportion of the cross point of the two steel bars relative to the cross point of the vertical laser, and superposing the X-axis coordinate of the cross point of the vertical steel bar and the transverse laser as the X-coordinate value of the cross point of the two steel bars;
and S233, taking the X-axis coordinate of the vertical steel bar and the transverse laser intersection as the X-coordinate value of the two steel bar intersections, calculating the distance difference of the Y-axis coordinate according to the space position proportion of the two steel bar intersections relative to the transverse laser intersection, and superposing the Y-axis coordinate of the transverse steel bar and the vertical laser intersection as the Y-coordinate value of the two steel bar intersections.
The distance difference is obtained according to the spatial position proportion, and then the corresponding coordinate values are superposed, so that the coordinates of the steel bar intersection can be accurately corrected, the error caused by defining the coordinates of the intersection by only the corresponding reference point coordinates under the condition that the steel bar is slightly bent is avoided, and further accurate spatial positioning is achieved.
As a further improvement of the present invention, the step S3 includes:
s31, calculating the pixel value difference of the line laser breakpoint relative to the reference origin in the plane coordinate axis direction through vision, defining a pixel value to represent a distance value in the Z axis direction, and superposing the space position proportion of the line laser breakpoint relative to the reference origin to obtain the distance difference of the Z axis coordinate, so as to obtain the height coordinate of the line laser breakpoint. The space position proportion is calculated to obtain the Z-axis distance difference, and then the corresponding Z-axis coordinate value is superposed, so that the Z coordinate of the steel bar intersection can be accurately corrected, and the occurrence of errors is avoided.
As a further improvement of the present invention, in step S31, the distance difference of the Z-axis coordinate is the sum of the height of the bottom of the steel bar from the background platform and the diameter of the steel bar. In the condition of camera reflection imaging, the sum of the diameters of the steel bars can be superposed by the height of the bottom of the steel bar from the background platform to be used as the Z coordinate value of a pixel point on the steel bar.
As a further improvement of the invention, the line laser is a common cross line laser, or a grid line laser, or a point front plane laser. The line laser modes are all vertical line laser intersection or standard line laser intersection, so that the coordinates of the positioning points on the steel bar intersection points or other steel bars can be conveniently evaluated, the calculation under the photo effect is simple and convenient, and the effect of quick and accurate positioning is achieved.
As a further improvement of the invention, the camera imaging judgment process is that the 2D camera takes pictures and images, the reflection condition of each part of the line laser in the pictures is analyzed, and the relative position of the reinforcing steel bar is judged. The 2D camera with lower cost is adopted, the effect of needing the 3D camera to complete is achieved through judgment of the laser reflection part of the matching line of the imaging photo, and the overall cost of the equipment is reduced.
The invention has the beneficial effects that: the method adopts a mode that different heights can form different section differences under laser projection to form obvious visual characteristics, so that sampling and judgment are convenient for visual software, and meanwhile, the strong light and the singleness of laser enable visual imaging and algorithm effects to be optimized; and the common line laser is low in cost and convenient to maintain, and the overall cost of the equipment is reduced.
Drawings
FIG. 1 is a schematic diagram of a camera and line laser emission configuration according to the present invention;
fig. 2 is a schematic diagram of the positioning of the reinforcing mat by the line laser according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments.
The first embodiment is as follows:
as shown in fig. 1 to 2, the method adopts a 2D camera in combination with a common cross line laser or a grid line laser or a point array surface laser, and takes a picture by the camera to analyze the light reflection condition of each part of the laser in the picture, so as to judge the accurate relative position of the steel bar 1.
The method comprises the following steps:
s1, judging the position of a single steel bar 1: emitting line laser 2 to the direction of the single steel bar 1, wherein height difference exists between the single steel bar 1 and a background platform in camera imaging after the line laser 2 is reflected, and then judging the relative position of the steel bar 1 in a single direction;
s2, determining the coordinates of a plurality of steel bars 1: emitting a plurality of line lasers 2 to a reinforcing mesh to form an array, defining the coordinates of a cross point of the line lasers 2 as the coordinates of a reference origin, and obtaining the coordinates of the cross point of a single reinforcing steel bar 1 and the line lasers 2 and/or the coordinates of the relative position of the cross point between the reinforcing steel bars 1 through imaging and positioning calculation in a vision camera;
s3, determining the relative heights of the multiple steel bars 1: and calculating the height difference of the corresponding steel bar 1 relative to the background platform by judging the position difference of the laser breakpoints on the same line.
Wherein, step S1 includes:
s11, reflecting light rays of a background platform by the line laser 2, and calculating a first distance between an emitting point of the line laser 2 and the background platform in camera imaging;
s12, reflecting the light of the single steel bar 1 by the line laser 2, and calculating a second distance between the emitting point of the line laser 2 and the single steel bar 1 in camera imaging;
s13, subtracting the first distance from the second distance to calculate the height difference between the steel bar 1 and the background platform;
and S14, respectively calculating the height difference of a plurality of pixel points on the single steel bar 1, and calculating the relative spatial position of the steel bar in a single direction.
Example two:
as shown in fig. 1 to 2, in the first embodiment, the step S2 includes:
s21, emitting a plurality of transverse line lasers parallel to an X axis and a plurality of vertical line lasers parallel to a Y axis to the reinforcing mesh, wherein the plurality of transverse line lasers and the plurality of vertical line lasers are crossed to form a mesh array of a plane coordinate system, and a cross point of one transverse line laser and one vertical line laser is used as a reference origin point coordinate;
s22, determining the coordinate of the intersection point of the single steel bar 1 and the line laser 2: when the transverse line laser intersects with the single steel bar 1, taking the Y-axis coordinate of the transverse line laser as the Y-axis coordinate value of the single steel bar 1, calculating the distance between the intersection point and the transverse line laser in camera imaging, and superposing the X-axis coordinate of the transverse line laser as the X-axis coordinate value of the intersection point; when the vertical line laser intersects with the single steel bar 1, taking the X-axis coordinate of the vertical line laser as the X-axis coordinate value of the single steel bar 1, calculating the distance between the intersection point and the vertical line laser in camera imaging, and superposing the Y-axis coordinate of the vertical line laser as the Y-axis coordinate value of the intersection point;
s23, determining coordinates of cross points among the steel bars: determining a plurality of steel bars 1 which are intersected together, respectively obtaining the axis coordinate of the intersection point of the corresponding single steel bar 1 and the line laser, and calculating the axis coordinate value of the intersection point between the steel bars.
Wherein, step S23 further includes:
s231, determining two vertically crossed reinforcing steel bars 1, wherein the two reinforcing steel bars 1 are respectively a transverse reinforcing steel bar parallel to an X axis and a vertical reinforcing steel bar parallel to a Y axis, respectively taking Y-axis coordinates of a laser intersection point of the transverse reinforcing steel bar and a vertical line and X-axis coordinates of a laser intersection point of the vertical reinforcing steel bar and the transverse line, and executing S232 or S233;
s232, taking the Y-axis coordinate of the cross point of the transverse steel bar and the vertical laser as the Y-coordinate value of the cross point of the two steel bars, calculating the distance difference of the X-axis coordinate according to the space position proportion of the cross point of the two steel bars relative to the cross point of the vertical laser, and superposing the X-axis coordinate of the cross point of the vertical steel bar and the transverse laser as the X-coordinate value of the cross point of the two steel bars;
and S233, taking the X-axis coordinate of the vertical steel bar and the transverse laser intersection as the X-coordinate value of the two steel bar intersections, calculating the distance difference of the Y-axis coordinate according to the spatial position proportion of the two steel bar intersections relative to the transverse laser intersection, and superposing the Y-axis coordinate of the transverse steel bar and the vertical laser intersection to be used as the Y-coordinate value of the two steel bar intersections.
Example three:
as shown in fig. 1 to 2, in the first embodiment, the step S3 includes:
s31, calculating the pixel value difference of the line laser breakpoint relative to the reference origin in the plane coordinate axis direction through vision, defining a pixel value to represent a distance value in the Z axis direction, and superposing the space position proportion of the line laser breakpoint relative to the reference origin to obtain the distance difference of the Z axis coordinate, so as to obtain the height coordinate of the line laser breakpoint. And the distance difference of the Z-axis coordinate is the sum of the height of the bottom of the steel bar from the background platform and the diameter of the steel bar.
Example four:
as shown in fig. 1 to 2, in the specific embodiment, the method performs the following processes when positioning the reinforcing mesh:
s1: judging the position of a single steel bar 1: because the background platform and the reinforcing steel bar 1 have a certain height difference, the laser is reflected and then imaged in the camera to have a certain height difference, and then the unidirectional relative position of the reinforcing steel bar 1 can be judged.
S2: and (3) determining the coordinates of the steel bar 1: and determining the relative position of the single steel bar 1 and the intersection point of the steel bars according to the X \ Y direction.
As shown in fig. 2, the line laser cross point a coordinate is defined as a reference origin coordinate (X =0, Y =0, Z = 0), and other point coordinates may be calculated by visual positioning. A. The J points are respectively the cross points of the line laser, and the G points are the cross points of the two steel bars 1. C. E, F, I points are the crossing points of the line laser and the steel bar, the four crossing points show the visual effect of the segment in the photo image, therefore, the Y coordinate of the E point is taken in the process of calculating the G point coordinate, and the X coordinate of the C, I point is taken as the calculated value.
The coordinates of the bundled point location G (xG, yG, zG) are obtained as shown in fig. 2, where in xG, X represents the coordinate in the X direction, G represents the coordinate point code, and so on.
Thus, it is calculated that the X-axis coordinate of the G point is xG = (xC + (yE/yJ) (xI-xC), and the Y-axis coordinate of the G point is yG = yE.
S3: and (3) determining the relative height of the steel bar 1: the height difference of the current steel bar 1 relative to the background platform can be calculated by judging the position difference of the laser breakpoint section of the same line.
For example, the Z-direction coordinate zG of the point G needs to be determined: assuming that the diameter of the steel bar is known to be R, the height of the bottom of the steel bar from the background platform is known to be K, the pixel value difference M of the point C in the Y direction relative to the point a is calculated by vision, and at this time, the pixel value M represents the Z-axis distance value of (R + K), and then the Z-axis distance M = (R + K)/M represented by a single pixel value in the Y direction is obtained, so that: zG = M + (yE/yJ) (zl-zC)).
In summary, the G point coordinates can be obtained as follows:
xG=(xC+(yE/yJ)(xI-xC))
yG=yE
zG=M*m+(yE/yJ)(zI-zC))。
s4: more line lasers 2 can be added to form the array, thereby judging more required characteristics.
The method adopts the common line laser and the array line laser to realize the simple 3D positioning method for the vision of the position of the reinforcing mesh. The mode that different heights can form different section differences under laser projection is adopted to form obvious visual characteristics, so that sampling and judgment are facilitated for visual software, and meanwhile, the strong light and the singleness of laser enable visual imaging and algorithm effects to be optimized; and the common line laser is low in cost and convenient to maintain, and the overall cost of the equipment is reduced.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.