[ Background Art ]
For a measured object with a small PIN needle and the like and a certain height on a circuit board, when the line laser 3D contour camera is used for scanning, the area of an imaging light spot is small or the brightness is very dark after the measured object is small or the surface (or the inclined plane) at the top end is reflected, and reflection light spots are easily formed right above or right below the small light spot due to multiple reflections caused by the laser reflected by other objects around the measured object, and when the line laser 3D contour camera is used for contour line point taking, all or part of the reflection light spots are easily adopted for point taking, so that the real light spot (corresponding pixel) of the measured object to be measured is not fully acquired (namely, part or all of the pixel which is really required to be acquired is missing), and the corresponding measurement size of the measured object is failed or wrong.
In view of this problem, the industry also has to mask the reflected light spot to remove noise, but the small measured objects are usually numerous and have small spacing, so that the method is not suitable for setting many masking areas, and other areas needing to be measured are easily masked to cause that imaging cannot be performed, so that the measurement is affected.
[ Invention ]
The invention aims to provide a line scanning laser 3D camera data processing method, which is used for solving the problems that in the prior art, an object which is tiny and has a certain height is measured by using a line scanning laser 3D camera, and a plurality of light spots exist due to multiple reflection, so that measurement errors are caused, or a plurality of shielding areas are not easy to set, so that the influence of reflected light is eliminated.
In order to achieve the above object, the line scanning laser 3D camera data processing method of the present invention is implemented to measure fine objects with a certain height, such as PIN needles, on a circuit board, and the method includes the following steps:
Establishing an X-Z coordinate system by taking the scanning width as the X direction and the measuring height as the Z direction;
setting a preferential acquisition area with a preset size at a set distance from an imaging light spot of a main base surface of a measured object based on the imaging light spot of the main base surface of the measured object;
Acquiring an image of a measured object by using a line scanning laser 3D camera;
According to the collected image data of the measured object, if the same column of pixels in the X direction has only one light spot in the Z direction of the measured height, the light spot is used for carrying out corresponding algorithm point taking, and if two or more light spots exist, the light spot in the preferential collecting area is used for carrying out corresponding algorithm point taking.
Preferably, the preferential collection area is provided with a plurality of preferential collection areas according to different heights of the measured object.
Preferably, the width of the preferential collection area in the X direction is determined according to the distribution position of the measured object to be measured, and the height in the Z direction is determined according to the variation range of the height of the measured object.
Compared with the prior art, the line scanning laser 3D camera data processing method has the advantages that the priority acquisition area is set in the X-Z coordinate system recommended in the X direction by taking the scanning width and the Z direction by taking the measuring height as the Z direction in advance, after the image of the measured object is acquired by using the line scanning laser 3D camera, the corresponding algorithm point taking is carried out by using the light spot if only one light spot exists in the Z direction of the measuring height of the same column of pixels in the X direction in the scanning width direction through judgment, and if two or more light spots exist, the corresponding algorithm point taking is carried out by using the light spot in the priority acquisition area, so that the real data of the measured object can be acquired to the greatest extent, the problem that multiple light spots exist to cause measurement errors is solved, and the problem that multiple shielding areas are not easy to be set when the PIN needle and other small objects with certain heights are measured on a circuit board is solved by the method, so that the influence of reflected light is eliminated.
[ Detailed description ] of the invention
Fig. 1 is a flow chart of a line scanning laser 3D camera data processing method according to the present invention. The line scanning laser 3D camera data processing method is used for measuring tiny objects with a certain height, such as PIN needles and the like, on a circuit board, and comprises the following steps:
Establishing an X-Z coordinate system by taking the scanning width as the X direction and the measuring height as the Z direction;
setting a preferential acquisition area with a preset size at a set distance from an imaging light spot of a main base surface of a measured object based on the imaging light spot of the main base surface of the measured object;
Acquiring an image of a measured object by using a line scanning laser 3D camera;
According to the collected image data of the measured object, in the scanning width direction, if the same column of pixels in the X direction has only one light spot in the measuring height Z direction, the light spot is used for carrying out corresponding algorithm point taking, and if two or more light spots exist, the light spots in the preferential collecting area are used for carrying out corresponding algorithm point taking (for example, corresponding measuring points are selected when the height measurement is carried out).
In a specific implementation, the preferential collection areas are provided with a plurality of preferential collection areas according to different heights of the measured object, for example, when a plurality of electronic elements with PIN needles of different heights exist on the measured object (such as a whole circuit board), the preferential collection areas can be provided corresponding to the PIN needles of different heights, and the light spots corresponding to the preferential collection areas can be preferentially selected according to the method when the light spots are selected for the PIN needles of different heights.
In addition, in the implementation, the width of the preferential collection area in the X direction is determined according to the distribution position of the measured object to be measured, so as to cover the width of the electronic element with the PIN in the X direction, and the height in the Z direction is determined according to the variation range of the height of the measured object, but is not excessively large, so as to avoid light spots formed by unnecessary multiple reflections. And when collecting the light spot of the preferential collection area, whether the light spot is larger or smaller than the light spot outside the preferential collection area is not required to be considered, namely, the traditional mode of comparing and collecting the light spot with larger brightness by utilizing the light spot brightness is not required to be adopted.
Fig. 2 is a schematic diagram showing an image of an object to be measured acquired by the method of the present invention. In fig. 2, an X-Z coordinate system is established with a scanning width being an X direction and a measuring height being a Z direction, after an image of a measured object is acquired by using a line scanning laser 3D camera, a spot image in the height Z direction is generated with each column of pixels on the scanning width, at this time, a spot in the height Z direction formed by multiple reflection exists, wherein the spot is different in height from a spot of the measured object actually required to be acquired in the height Z direction, so that a spot formed by multiple reflection light rays in the height Z direction can be eliminated by presetting a preferential acquisition area, wherein the preferential acquisition area is set at a set distance from an imaging spot of a main base surface of the measured object, and in actual implementation, an imaging spot of the main base surface of the measured object can be acquired first (this is described in detail in the prior art), then a preferential acquisition area is set, according to the acquired image data of the measured object, if the pixel in the same column in the X direction is in the height Z direction, the spot is acquired in the corresponding algorithm is performed, and if the spot is acquired in the corresponding area, and the algorithm is performed by using the two spots. Therefore, the light spots formed by multiple reflection outside the preferential collection area can be eliminated to a great extent, and the light spots with the maximum brightness can be selected only by comparing the brightness of the light spots according to the traditional mode if the light spots formed by multiple reflection are also inside the preferential collection area, but the probability is smaller, so that the influence of the light spots formed by multiple reflection can be reduced as a whole.
In the above steps, when the line scanning laser 3D camera is used to collect the image of the object to be measured and then generate a spot image in the height Z direction with each column of pixels on the scan width, the line scanning laser 3D camera is used to collect the image of the object to be measured and then acquire the height information corresponding to each pixel by using a method such as triangulation, then generate a spot image in the height Z direction with each column of pixels on the scan width, and the spot image usually does not include only one pixel, but may include multiple pixels depending on the accuracy of the pixel, and the multiple pixels form the spot image, which is not described in detail in the prior art.
Compared with the prior art, the line scanning laser 3D camera data processing method has the advantages that the priority acquisition area is set in the X-Z coordinate system recommended in the X direction by taking the scanning width as the X direction and taking the measuring height as the Z direction in advance, after the image of the measured object is acquired by using the line scanning laser 3D camera, if only one light spot exists in the Z direction of the measuring height of the same column of pixels in the X direction of the scanning width, the light spot is used for carrying out corresponding algorithm point taking, if two or more light spots exist, the light spot in the priority acquisition area is used for carrying out corresponding algorithm point taking, so that real data of the measured object can be acquired to the greatest extent, the problem that multiple reflection causes measurement errors due to a plurality of light spots is avoided, and the method can also solve the problem that a plurality of shielding areas are difficult to set when the PIN needle and other fine objects with certain heights are measured on a measuring circuit board, so that the influence of reflected light is eliminated.
It will be understood that equivalents and modifications will occur to those skilled in the art in light of the present invention and their spirit, and all such modifications and substitutions are intended to be included within the scope of the present invention as defined in the following claims.