Line laser ranging calibration and calculation method and device, medium and equipment
By using the correspondence table between image height and object distance in the PPM standard file, the calculation process of line laser ranging is simplified, solving the problems of complex calculation and large amount of calculation in the existing technology, and achieving efficient laser ranging. Reduced equipment costs.
Patent Information
- Application Number
- CN202410608060.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2024-08-30
AI Technical Summary
In the existing technology, the solution process of line laser ranging is complex and computationally intensive, resulting in high equipment costs.
Provides a line laser ranging calibration and solution method. By obtaining the correspondence table between the image height of the standard line laser sensor and the object distance, using the PPM standard file lookup table to obtain the actual spatial coordinates of the bright spot, and generating a point cloud image. To obtain the distance of the target object, simplify the solution process and reduce the amount of calculation.
It reduces the complexity and calculation amount of the solution process, improves the solution speed, reduces equipment costs, and significantly improves efficiency when the laser spot bright spots are of an order of magnitude.
Smart Images

Figure CN118566893A
Abstract
Description
Technical Field
[0001] The present application relates to the field of laser ranging technology, and in particular to a method, device, medium and equipment for linear laser ranging calibration and solution. Background Art
[0002] Line laser ranging uses the triangulation method. The laser projects a line laser onto the object to be measured, reads the imaging data back from the camera, and calculates the light spot to obtain the distance to the object on the line laser cross section.
[0003] In the prior art, a laser projects a line laser onto an object to be measured, and imaging data is read from a camera to obtain a laser spot projected by the line laser onto the object to be measured in the mature data; the object distance on the cross section of the line laser is calculated based on the laser spot; the camera is calibrated with a chessboard to obtain camera intrinsic parameters and camera extrinsic parameters; the coordinates corresponding to each bright spot are solved by the triangulation method; and error correction is performed. The number of bright spots that make up the laser spot is large, which requires a huge amount of calculation, and an FPGA is required to perform the above-mentioned solution process. The solution process is complicated and results in high equipment costs.
[0004] Therefore, finding an appropriate linear laser ranging calibration and solution method is a technical problem that needs to be solved urgently by technical personnel in this field. Summary of the invention
[0005] Based on this, it is necessary to propose a linear laser ranging calibration and solution method, device, medium and equipment to solve the problem of large measurement quantity and complex solution process.
[0006] In a first aspect, the present application provides a line laser ranging calibration and solution method, comprising:
[0007] Obtain a calibrated PPM standard file, wherein the PPM standard file includes a corresponding relationship table between an image height of a standard line laser sensor and an object distance, wherein the image height is a measured height of a laser spot projected by the standard line laser sensor on a line laser cross section on the object to be measured, and the object distance is an actual distance between the standard line laser sensor and the object to be measured;
[0008] Obtaining a start signal of a standard line laser sensor, and turning on the standard line laser sensor according to the start signal to project a line laser, wherein the line laser projects a laser image on the surface of the object to be measured;
[0009] Acquire image data of the surface of the object to be measured, and extract coordinate data of bright spots from the image data;
[0010] Input the coordinate data of the bright spot into the calibrated PPM standard file, and obtain the actual spatial coordinates of the bright spot by looking up the table;
[0011] Obtain all bright spot data query results and obtain the point cloud image corresponding to the laser spot, and obtain the distance of the target object.
[0012] In one implementation, the calibrated PPM standard file is a full-resolution PPM file, and the correspondence table includes a one-to-one correspondence between the coordinates of the bright spots on the line laser section in the image data and the actual space coordinates, thereby obtaining a correspondence between the image height of the standard line laser sensor and the object distance, and all bright spots constitute a laser spot.
[0013] In one implementation, the calibration step of the PPM standard file includes:
[0014] Get a line laser sensor;
[0015] Obtain an electric slide, on which a line laser sensor to be calibrated is arranged, and the line laser sensor can move along a slide rail of the electric slide;
[0016] A white board is arranged at one end of the slide rail of the electric slide as the object to be measured, and the white board is arranged vertically on the slide rail;
[0017] Turn on the line laser sensor, and move the line laser sensor from the other end of the slide rail toward the whiteboard at a preset moving speed, and the line laser projects a laser image on the surface of the object to be measured;
[0018] The camera device of the line laser sensor records video at a preset video frame rate.
[0019] In one implementation, the method further includes:
[0020] The video file of the camera device is exported and all video frame images are obtained, and the current actual distance corresponding to each video frame image is calculated according to the preset moving speed and timestamp.
[0021] In one implementation, the method further includes:
[0022] Perform binarization on each video frame image, obtain the coordinates of each bright spot, aggregate all bright spots into a laser spot, calculate the Y coordinate at the center of the laser spot, associate the Y coordinate with the current actual distance, fill in the PPM file and obtain the calibrated PPM standard file.
[0023] In one implementation, the step of obtaining the calibrated PPM standard file further includes:
[0024] The points between the actual distances are supplemented by interpolation to obtain the calibrated PPM standard file.
[0025] In one implementation manner, the preset video frame rate is 60fps to 120fps.
[0026] In a second aspect, the present application provides a linear laser ranging calibration and solution device, comprising:
[0027] Acquire a calibration module, acquire a calibrated PPM standard file, the PPM standard file includes a correspondence table between an image height of a standard line laser sensor and an object distance, the image height is a measured height of a laser spot projected by the standard line laser sensor on a line laser cross section on the object to be measured, and the object distance is an actual distance between the standard line laser sensor and the object to be measured;
[0028] A projection module obtains a start signal of a standard line laser sensor, and turns on the standard line laser sensor according to the start signal to project a line laser, wherein the line laser projects a laser image on the surface of the object to be measured;
[0029] An image data acquisition module is used to acquire image data of the surface of the object to be measured and extract coordinate data of bright spots from the image data;
[0030] A first query module inputs the coordinate data of the bright spot into the calibrated PPM standard file, and obtains the actual spatial coordinates of the bright spot by looking up the table;
[0031] The second query module obtains the query results of all bright spot data and obtains the point cloud image corresponding to the laser spot, and obtains the distance of the target object.
[0032] In a third aspect, the present application provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the method described in any one of the first aspects.
[0033] In a fourth aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method as described in any one of the first aspects.
[0034] According to the line laser distance measurement calibration and solution method, device, medium and equipment provided by the present application, the beneficial effect is that in the present application, by embedding the calibrated PPM standard file in the main control device, the PPM standard file includes a corresponding relationship table between the image height of the standard line laser sensor and the object distance, the image height is the measured height of the laser spot projected by the standard line laser sensor on the object to be measured on the line laser cross section, that is, the image height is the Y coordinate of the laser spot, and the object distance is the actual distance between the standard line laser sensor and the object to be measured; the main control device can be a sweeping robot, a patrol robot, a food delivery robot, etc. When the main control device is working, the standard line laser sensor set in the main control device is turned on, and a laser image is projected on the surface of the object to be measured, the image data of the surface of the object to be measured is obtained, the coordinate data of each bright spot is extracted from the image data, the coordinate data of the bright spot is input into the calibrated PPM standard file, the query results of all bright spot data are obtained, and the point cloud image corresponding to the laser spot is obtained, and the distance of the target object is obtained. The solution process is simple and does not require complex calculations. Especially when the bright spots that make up the laser spot are of large magnitude, the solution process can be greatly reduced and the solution rate can be improved. The equipment cost of the built-in calibration solution method of this application will also be greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 A flow chart of the centerline laser ranging calibration and solution method of this application;
[0037] Figure 2 This is a schematic diagram of the framework of the centerline laser ranging calibration and solution device in this application. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of this application.
[0039] It should be noted that when an element is referred to as being "fixed on" or "set on" another component, it can be directly on the other component or indirectly set on the other component; when a component is referred to as being "connected to" another component, it can be directly connected to the other component or indirectly connected to the other component.
[0040] In the description of the present application, "multiple" or "several" means two or more than two, unless otherwise clearly and specifically defined.
[0041] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which this application can be implemented. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical content disclosed in this application without affecting the effects and purposes that can be achieved by this application.
[0042] In the prior art, a laser projects a line laser onto an object to be measured, and imaging data is read from a camera to obtain a laser spot projected by the line laser onto the object to be measured in the mature data; the object distance on the cross section of the line laser is calculated based on the laser spot; the camera is calibrated with a chessboard to obtain camera intrinsic parameters and camera extrinsic parameters; the coordinates corresponding to each bright spot are solved by the triangulation method; and error correction is performed. The number of bright spots that make up the laser spot is large, which requires a huge amount of calculation, and an FPGA is required to perform the above-mentioned solution process. The solution process is complicated and results in high equipment costs.
[0043] First, see Figure 1 As shown, the present application provides a line laser ranging calibration and solution method, including:
[0044] Step S100, obtaining a calibrated PPM standard file, wherein the PPM standard file includes a corresponding relationship table between an image height of a standard line laser sensor and an object distance, wherein the image height is a measured height of a laser spot projected by the standard line laser sensor on the object to be measured on a line laser cross section, and the object distance is an actual distance between the standard line laser sensor and the object to be measured;
[0045] Step S200, obtaining a start signal of a standard line laser sensor, and turning on the standard line laser sensor according to the start signal to project a line laser, wherein the line laser projects a laser image on the surface of the object to be measured;
[0046] Step S300, acquiring image data of the surface of the object to be measured, and extracting coordinate data of bright spots from the image data;
[0047] Step S400, inputting the coordinate data of the bright spot into the calibrated PPM standard file, and obtaining the actual spatial coordinates of the bright spot by looking up the table;
[0048] Step S500, obtaining all bright spot data query results and obtaining a point cloud image corresponding to the laser spot, and obtaining the distance of the target object.
[0049] It should be noted that in this application, the calibrated PPM standard file is built into the main control device, and the PPM standard file includes a corresponding relationship table between the image height of the standard line laser sensor and the object distance. The image height is the measured height of the laser spot projected by the standard line laser sensor on the object to be measured on the line laser section, that is, the image height is the Y coordinate of the laser spot, and the object distance is the actual distance between the standard line laser sensor and the object to be measured; the main control device can be a sweeping robot, a patrol robot, a food delivery robot, etc. When the main control device is working, the standard line laser sensor set in the main control device is turned on, and a laser image is projected on the surface of the object to be measured, and the image data of the surface of the object to be measured is obtained. The coordinate data of each bright spot is extracted from the image data, and the coordinate data of the bright spot is input into the calibrated PPM standard file, and the query results of all bright spot data are obtained and the point cloud image corresponding to the laser spot is obtained, and the distance of the target object is obtained. The solution process is simple and does not require complex calculations. Especially when the order of magnitude of the bright spots that make up the laser spot is large, the solution process can be greatly reduced, and the solution rate can be improved. The equipment cost of the calibration solution method built into this application will also be greatly reduced.
[0050] In one implementation, the calibrated PPM standard file is a full-resolution PPM file, and the correspondence table includes a one-to-one correspondence between the coordinates of the bright spots on the line laser section in the image data and the actual space coordinates, thereby obtaining a correspondence between the image height of the standard line laser sensor and the object distance, and all bright spots constitute a laser spot.
[0051] It should be noted that the X-coordinate and Y-coordinate of each bright spot are recorded in the PPM standard file, and the image height of the line laser sensor can be obtained. In addition, the image height is related to the actual object distance, and the object distance can be directly calculated through the image height.
[0052] In one implementation, the calibration step of the PPM standard file includes:
[0053] Get a line laser sensor;
[0054] Obtain an electric slide, on which a line laser sensor to be calibrated is arranged, and the line laser sensor can move along a slide rail of the electric slide;
[0055] A white board is arranged at one end of the slide rail of the electric slide as the object to be measured, and the white board is arranged vertically on the slide rail;
[0056] Turn on the line laser sensor, and move the line laser sensor from the other end of the slide rail toward the whiteboard at a preset moving speed, and the line laser projects a laser image on the surface of the object to be measured;
[0057] The camera device of the line laser sensor records video at a preset video frame rate.
[0058] It should be noted that the PPM standard file of this application needs to be calibrated before it can be obtained. Specifically, the accuracy of the line laser sensor is between 0.05 and 0.2 mm, and the range of the line laser sensor is 50 to 300 mm. A 300 mm electric slide is made, and a white board is set at one end of the slide as the object to be measured. The line laser sensor can move along the slide, and the line laser sensor is moved uniformly from 300 mm to 50 mm at a preset moving speed. The preset moving speed is 5 mm / s. During the movement of the online laser sensor, the preset video frame rate is 60fps, and the video resolution is 2560×1440, that is, the entire calibration recording company is completed in 50 seconds. The distance moved by the line laser sensor for each frame is the ratio of the preset moving speed to the preset video frame rate, that is, 5 / 60=0.0833 mm. The distance moved by the online laser sensor for each frame corresponds to each frame of the image.
[0059] In one implementation, the method further includes: exporting a video file of the camera device and acquiring all video frame images, and calculating a current actual distance corresponding to each video frame image according to a preset moving speed and a timestamp.
[0060] It should be noted that all video frames are exported, and the position of the line laser sensor on the slide corresponding to each video frame image is calculated according to the moving speed and the timestamp of each video frame, so as to obtain the actual distance between the line laser sensor and the whiteboard at this time. Each video frame image is corresponded to each actual distance.
[0061] In one of the implementation methods, it also includes: performing a binarization operation on each frame of the video frame image, obtaining the coordinates of each bright spot, aggregating all the bright spots into a laser spot, calculating the Y coordinate at the center of the laser spot, associating the Y coordinate with the current actual distance, filling in the PPM file and obtaining the calibrated PPM standard file.
[0062] It should be noted that the laser spot is composed of various bright spots on the current video frame image. The Y coordinate at the center of the laser spot, that is, the image height of the current video frame image, is calculated using the mean method. The image height is associated with the current actual distance to obtain the calibrated PPM standard file.
[0063] In one implementation manner, the step of obtaining the calibrated PPM standard file further includes: supplementing the points between the actual distances by interpolation to obtain the calibrated PPM standard file.
[0064] It should be noted that the points between the actual distances are supplemented by interpolation method through adjacent image height distances and adjacent actual distances to supplement the PPM standard file.
[0065] In one implementation manner, the preset video frame rate is 60fps to 120fps.
[0066] Second, see Figure 2 As shown, the present application provides a linear laser ranging calibration and solution device, comprising:
[0067] The calibration module 10 is used to obtain a calibrated PPM standard file, wherein the PPM standard file includes a corresponding relationship table between an image height of a standard line laser sensor and an object distance, wherein the image height is a measured height of a laser spot projected by the standard line laser sensor on a line laser cross section on the object to be measured, and the object distance is an actual distance between the standard line laser sensor and the object to be measured;
[0068] The projection module 20 obtains a start signal of the standard line laser sensor, and turns on the standard line laser sensor according to the start signal to project a line laser, wherein the line laser projects a laser image on the surface of the object to be measured;
[0069] An image data acquisition module 30 acquires image data of the surface of the object to be measured and extracts coordinate data of bright spots from the image data;
[0070] The first query module 40 inputs the coordinate data of the bright spot into the calibrated PPM standard file, and obtains the actual spatial coordinates of the bright spot by looking up the table;
[0071] The second query module 50 obtains query results of all bright spot data and obtains a point cloud image corresponding to the laser spot, and obtains the distance of the target object.
[0072] In this application, the calibrated PPM standard file is built into the main control device. The PPM standard file includes a corresponding relationship table between the image height of the standard line laser sensor and the object distance. The image height is the measured height of the laser spot projected by the standard line laser sensor on the object to be measured on the line laser section, that is, the image height is the Y coordinate of the laser spot, and the object distance is the actual distance between the standard line laser sensor and the object to be measured; the main control device can be a sweeping robot, a patrol robot, a food delivery robot, etc. When the main control device is working, the standard line laser sensor set in the main control device is turned on, and a laser image is projected on the surface of the object to be measured, and the image data of the surface of the object to be measured is obtained. The coordinate data of each bright spot is extracted from the image data, and the coordinate data of the bright spot is input into the calibrated PPM standard file, and the query results of all bright spot data are obtained and the point cloud image corresponding to the laser spot is obtained, and the distance of the target object is obtained. The solution process is simple and does not require complex calculations. Especially when the order of magnitude of the bright spots that make up the laser spot is large, the solution process can be greatly reduced, and the solution rate can be improved. The equipment cost of the calibration solution method built into this application will also be greatly reduced.
[0073] In a third aspect, the present application provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the method described in any one of the first aspects.
[0074] In a fourth aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method as described in any one of the first aspects.
[0075] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0076] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0077] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. Line laser ranging calibration and solution method, characterized in that: include: Obtain a calibrated PPM standard file, wherein the PPM standard file includes a corresponding relationship table between an image height of a standard line laser sensor and an object distance, wherein the image height is a measured height of a laser spot projected by the standard line laser sensor on a line laser cross section on the object to be measured, and the object distance is an actual distance between the standard line laser sensor and the object to be measured; Obtaining a start signal of a standard line laser sensor, and turning on the standard line laser sensor according to the start signal to project a line laser, wherein the line laser projects a laser image on the surface of the object to be measured; Acquire image data of the surface of the object to be measured, and extract coordinate data of bright spots from the image data; Input the coordinate data of the bright spot into the calibrated PPM standard file, and obtain the actual spatial coordinates of the bright spot by looking up the table; Obtain all bright spot data query results and obtain the point cloud image corresponding to the laser spot, and obtain the distance of the target object.
2. The line laser ranging calibration and solution method according to claim 1, characterized in that: The calibrated PPM standard file is a full-resolution PPM file, and the correspondence table includes a one-to-one correspondence between the coordinates of the bright spots on the line laser section in the image data and the actual space coordinates, and obtains the correspondence between the image height of the standard line laser sensor and the object distance. All bright spots constitute the laser spot.
3. The line laser ranging calibration and solution method according to claim 1, characterized in that: The calibration steps of the PPM standard file include: Get a line laser sensor; Obtain an electric slide, on which a line laser sensor to be calibrated is arranged, and the line laser sensor can move along a slide rail of the electric slide; A white board is arranged at one end of the slide rail of the electric slide as the object to be measured, and the white board is arranged vertically on the slide rail; Turn on the line laser sensor, and move the line laser sensor from the other end of the slide rail toward the whiteboard at a preset moving speed, and the line laser projects a laser image on the surface of the object to be measured; The camera device of the line laser sensor records video at a preset video frame rate.
4. The line laser ranging calibration and solution method according to claim 3 is characterized in that: Also includes: The video file of the camera device is exported and all video frame images are obtained, and the current actual distance corresponding to each video frame image is calculated according to the preset moving speed and timestamp.
5. The line laser ranging calibration and solution method according to claim 4, characterized in that: Also includes: Perform binarization on each video frame image, obtain the coordinates of each bright spot, aggregate all bright spots into a laser spot, calculate the Y coordinate at the center of the laser spot, associate the Y coordinate with the current actual distance, fill in the PPM file and obtain the calibrated PPM standard file.
6. The line laser ranging calibration and solution method according to claim 5, characterized in that: The step of obtaining the calibrated PPM standard file also includes: The points between the actual distances are supplemented by interpolation to obtain the calibrated PPM standard file.
7. The line laser ranging calibration and solution method according to claim 4, characterized in that: The preset video frame rate is 60fps to 120fps.
8. A linear laser rangefinder calibration and solution device, characterized in that: include: Acquire a calibration module, acquire a calibrated PPM standard file, the PPM standard file includes a correspondence table between an image height of a standard line laser sensor and an object distance, the image height is a measured height of a laser spot projected by the standard line laser sensor on a line laser cross section on the object to be measured, and the object distance is an actual distance between the standard line laser sensor and the object to be measured; A projection module obtains a start signal of a standard line laser sensor, and turns on the standard line laser sensor according to the start signal to project a line laser, wherein the line laser projects a laser image on the surface of the object to be measured; An image data acquisition module is used to acquire image data of the surface of the object to be measured and extract coordinate data of bright spots from the image data; A first query module inputs the coordinate data of the bright spot into the calibrated PPM standard file, and obtains the actual spatial coordinates of the bright spot by looking up the table; The second query module obtains the query results of all bright spot data and obtains the point cloud image corresponding to the laser spot, and obtains the distance of the target object.
9. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.
10. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.
