The present application is based on a prior domestic application, in which priority is claimed in the present patent application under the application number "202311869972.X", application name "ranging method, apparatus, terminal device and storage medium", filed by the law of year 2023, 12, 29, the contents of which are incorporated herein by reference in their entirety.
Disclosure of Invention
The application mainly aims to provide a ranging method, a ranging device, terminal equipment, laser processing equipment and a storage medium, and aims to solve the technical problems of low ranging precision and high cost.
To achieve the above object, the present application provides a ranging method applied to a light peak ranging sensor, comprising the steps of:
determining a reference point of the light peak ranging sensor;
obtaining a corresponding target light intensity waveform in the process that the light peak ranging sensor moves between the object to be measured and the datum point;
and determining a target light intensity wave crest based on the target light intensity wave crest, and obtaining the distance information between the object to be detected and the datum point based on the target light intensity wave crest.
Optionally, the light peak ranging sensor comprises a laser unit and a photosensitive sensing unit,
The step of obtaining a corresponding target light intensity waveform in the process that the light peak ranging sensor moves between the object to be measured and the datum point comprises the following steps:
When the laser unit emits a light beam and the light beam is perpendicular to the object to be measured, the light peak ranging sensor is controlled to move between the object to be measured and the datum point, so that the photosensitive sensing unit detects the target light intensity waveform.
Optionally, the step of controlling the photopeak ranging sensor to move between the object to be measured and the reference point so that the photosensitive sensing unit detects the target light intensity waveform includes:
in the process of controlling the light peak ranging sensor to move between the object to be measured and the datum point, responding to the recognition that the object to be measured enters the range of the light peak ranging sensor, and continuously reading the light intensity value detected by the photosensitive sensing unit;
and determining the target light intensity waveform according to the light intensity value.
Optionally, the photosensitive sensor unit includes a photosensitive sensor and a dark cavity, and the dark cavity is arranged at one end of the detection direction of the photosensitive sensor and is used for isolating other light beams except the detection direction.
Optionally, the extension line of the dark cavity and the light beam emitted by the laser unit are converged at a junction point,
When the light beam emitted by the laser unit falls on the junction, the photosensitive sensor detects the target light intensity peak.
Optionally, the step of determining a target light intensity peak based on the target light intensity waveform includes:
Analyzing the target light intensity waveform to obtain a plurality of light intensity values;
and selecting the light intensity value which accords with a preset peak value condition from the plurality of light intensity values as the target light intensity peak.
Optionally, before the step of obtaining the corresponding target light intensity waveform by changing the height of the light peak ranging sensor when the light peak ranging sensor emits a light beam and the light beam is perpendicular to the object to be measured, the method further includes:
and acquiring an angle between the light beam and the object to be measured, and performing direction calibration according to the angle if the light beam is detected to be not perpendicular to the object to be measured.
Optionally, the distance between the intersection point and the reference point is a first preset distance, and the step of obtaining the distance information between the object to be measured and the reference point based on the target light intensity peak includes:
Determining the moving distance of the light peak ranging sensor when the light peak of the target light intensity occurs;
and adding the moving distance of the light peak ranging sensor to the first preset distance to obtain the distance information between the object to be measured and the datum point.
The embodiment of the application also provides a ranging device, which is applied to the light peak ranging sensor and comprises:
the determining module is used for determining a datum point of the light peak ranging sensor;
The control module is used for obtaining a corresponding target light intensity waveform in the process that the light peak ranging sensor moves between the object to be measured and the datum point;
and the distance calculation module is used for determining a target light intensity wave crest based on the target light intensity wave crest and obtaining distance information between the object to be detected and the datum point based on the target light intensity wave crest.
The embodiment of the application also provides a terminal device, which comprises a memory, a processor and a ranging program stored on the memory and capable of running on the processor, wherein the ranging program realizes the steps of the ranging method when being executed by the processor.
The embodiment of the application also provides laser processing equipment, which comprises:
A slide rail;
The light peak distance sensor comprises a laser unit and a photosensitive sensing unit, and is slidably arranged on the sliding rail;
A communication unit for receiving distance information between the object to be measured and the reference point obtained according to the steps of the ranging method as described above;
And the controller controls the light peak ranging sensor to move on the sliding rail so as to perform ranging processing.
The embodiment of the application also provides a computer readable storage medium, wherein a ranging program is stored on the computer readable storage medium, and the ranging program realizes the steps of the ranging method when being executed by a processor.
The ranging method, the ranging device, the terminal equipment, the laser processing equipment and the storage medium are applied to a light peak ranging sensor, a datum point of the light peak ranging sensor is determined, a corresponding target light intensity waveform is obtained in the process that the light peak ranging sensor moves between an object to be measured and the datum point, a target light intensity peak is determined based on the target light intensity waveform, and distance information between the object to be measured and the datum point is obtained based on the target light intensity peak. Based on the scheme of the application, the light beam of the light peak ranging sensor and the object to be measured are kept in a stable position relationship to realize ranging, namely, when the light beam is emitted by the light peak ranging sensor and is perpendicular to the object to be measured, the light peak ranging sensor is controlled to move between the object to be measured and the datum point to obtain a corresponding target light intensity waveform, the target light intensity peak is determined by analyzing the target light intensity waveform, and further, the distance information between the object to be measured and the datum point is determined, so that the technical problems of low ranging precision and high cost are solved, the ranging precision can be improved, the ranging error is reduced, and the cost is reduced.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The main solution of the embodiment of the application is that the reference point of the light peak ranging sensor is determined, the corresponding target light intensity waveform is obtained in the process that the light peak ranging sensor moves between the object to be measured and the reference point, the target light intensity peak is determined based on the target light intensity waveform, and the distance information between the object to be measured and the reference point is obtained based on the target light intensity peak. Based on the scheme of the application, the light beam of the light peak ranging sensor and the object to be measured are kept in a stable position relationship to realize ranging, namely, when the light beam is emitted by the light peak ranging sensor and is perpendicular to the object to be measured, the light peak ranging sensor is controlled to move between the object to be measured and the datum point to obtain a corresponding target light intensity waveform, the target light intensity peak is determined by analyzing the target light intensity waveform, and further, the distance information between the object to be measured and the datum point is determined, so that the technical problems of low ranging precision and high cost are solved, the ranging precision can be improved, the ranging error is reduced, and the cost is reduced.
The embodiment of the application considers that on one hand, the ultrasonic ranging method is difficult to obtain the distance information of the highest point in a smaller range or the camera triangular ranging method needs to print ranging light spots on the ranging points obliquely so as to lower the ranging precision, and on the other hand, the line laser method is complex in ranging steps or the focusing needle ranging method needs to contact a focusing needle with the ranging points so as to raise the ranging cost.
Therefore, the embodiment of the application starts from solving the practical problems of low ranging precision and high cost, combines the stable vertical light beam formed by the light-emitting unit on the target position of the object to be measured and the sensitivity of the photosensitive sensing unit to the wave band of the light-emitting unit, designs a ranging method for identifying the light intensity wave peak, solves the technical problems of low ranging precision and high cost, improves the ranging precision and reduces the cost.
Specifically, referring to fig. 1, fig. 1 is a schematic functional block diagram of a terminal device to which a ranging apparatus of the present application belongs. The distance measuring device may be a device independent of the terminal device, capable of measuring distance, which may be carried on the terminal device in the form of hardware or software. The terminal equipment can be an intelligent mobile terminal with a data processing function such as a mobile phone and a tablet personal computer, and can also be a fixed terminal equipment or a server with a data processing function.
In this embodiment, the terminal device to which the ranging apparatus belongs at least includes an output module 110, a processor 120, a memory 130, and a communication module 140.
The memory 130 stores an operating system and a ranging program, the ranging device may store a determined reference point of the light peak ranging sensor, a corresponding target light intensity waveform obtained by changing the height of the light peak ranging sensor when the light beam emitted by the light peak ranging sensor is perpendicular to the object to be measured, a target light intensity peak determined based on the target light intensity waveform, and information such as distance information between the object to be measured and the reference point obtained based on the target light intensity peak in the memory 130, and the output module 110 may be a display screen or the like. The communication module 140 may include a WI FI module, a mobile communication module, a bluetooth module, and the like, and communicates with an external device or a server through the communication module 140.
Wherein the ranging procedure in the memory 130, when executed by the processor, performs the steps of:
the ranging method is applied to the light peak ranging sensor, and comprises the following steps of:
determining a reference point of the light peak ranging sensor;
obtaining a corresponding target light intensity waveform in the process that the light peak ranging sensor moves between the object to be measured and the datum point;
and determining a target light intensity wave crest based on the target light intensity wave crest, and obtaining the distance information between the object to be detected and the datum point based on the target light intensity wave crest.
Further, the ranging procedure in the memory 130, when executed by the processor, also implements the following steps:
When the laser unit emits a light beam and the light beam is perpendicular to the object to be measured, the light peak ranging sensor is controlled to move between the object to be measured and the datum point, so that the photosensitive sensing unit detects the target light intensity waveform.
Further, the ranging procedure in the memory 130, when executed by the processor, also implements the following steps:
in the process of controlling the light peak ranging sensor to move between the object to be measured and the datum point, responding to the recognition that the object to be measured enters the range of the light peak ranging sensor, and continuously reading the light intensity value detected by the photosensitive sensing unit;
and determining the target light intensity waveform according to the light intensity value.
Further, the ranging procedure in the memory 130, when executed by the processor, also implements the following steps:
Analyzing the target light intensity waveform to obtain a plurality of light intensity values;
and selecting the light intensity value which accords with a preset peak value condition from the plurality of light intensity values as the target light intensity peak.
Further, the ranging procedure in the memory 130, when executed by the processor, also implements the following steps:
and acquiring an angle between the light beam and the object to be measured, and performing direction calibration according to the angle if the light beam is detected to be not perpendicular to the object to be measured.
Further, the ranging procedure in the memory 130, when executed by the processor, also implements the following steps:
Determining the moving distance of the light peak ranging sensor when the light peak of the target light intensity occurs;
and adding the moving distance of the light peak ranging sensor to the first preset distance to obtain the distance information between the object to be measured and the datum point.
According to the technical scheme, the distance information between the object to be measured and the reference point is obtained by determining the reference point of the light peak ranging sensor, obtaining a corresponding target light intensity waveform in the process that the light peak ranging sensor moves between the object to be measured and the reference point, determining a target light intensity peak based on the target light intensity waveform, and obtaining the distance information between the object to be measured and the reference point based on the target light intensity peak. Based on the scheme of the application, the light beam of the light peak ranging sensor and the object to be measured are kept in a stable position relationship to realize ranging, namely, when the light beam is emitted by the light peak ranging sensor and is perpendicular to the object to be measured, the light peak ranging sensor is controlled to move between the object to be measured and the datum point to obtain a corresponding target light intensity waveform, the target light intensity peak is determined by analyzing the target light intensity waveform, and further, the distance information between the object to be measured and the datum point is determined, so that the technical problems of low ranging precision and high cost are solved, the ranging precision can be improved, the ranging error is reduced, and the cost is reduced.
The method embodiment of the application is proposed based on the above-mentioned terminal equipment architecture but not limited to the above-mentioned architecture.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first exemplary embodiment of a ranging method according to the present application. The ranging method comprises the following steps:
Step S210, determining a datum point of the light peak ranging sensor;
in particular, the reference point may be a fixed point of the system or a position defined as a zero point for determining the distance of other points relative thereto, and the light beam refers to a laser light path emitted by the light peak ranging sensor for measuring the distance between the object and the light peak ranging sensor.
Step S220, obtaining a corresponding target light intensity waveform in the process that the light peak ranging sensor moves between the object to be measured and the datum point;
Specifically, the object to be measured refers to a target object or a target area where ranging is required. May be a specific object or an area, and the relevant measurement data is obtained by measuring the distance between the beam and the object. The target wave crest is obtained by controlling the height of the light peak ranging sensor so that the light beam vertically irradiates the object to be measured, and the light peak ranging sensor detects the light intensity waveform to obtain the target wave crest, wherein the target wave crest is the wave crest formed by reflecting light rays through the object to be measured and has corresponding distance information. The target peak may be the maximum intensity value between the beam and the object for measuring and calculating the distance.
And step S230, determining a target light intensity wave crest based on the target light intensity wave crest, and obtaining the distance information between the object to be detected and the datum point based on the target light intensity wave crest.
Specifically, in the light peak ranging sensor, distance information between the object to be measured and the reference point can be calculated through the target peak and the corresponding height, and the distance information can be information of the position, the size and the relative position of the object to be measured.
The method comprises the steps of lifting a light peak ranging sensor to the highest position, determining a datum point through a limit sensor on a Z axis, ensuring that an elevating piece has an accurate zero point, gradually controlling the whole structure of the light peak ranging sensor to move downwards by using a stepping motor or other driving modes with accurate position control capability, continuously reading the light intensity value of a light beam emitted by the light peak ranging sensor by an embedded code, observing the whole light intensity waveform, and if an object to be detected is in the range of the light peak ranging sensor, along with the continuous descent of the elevating piece, detecting an obvious light intensity peak when a light spot falls at an intersection point by the light peak ranging sensor, and obtaining the distance of the elevating piece relative to the zero point of the Z axis according to the occurrence of the light intensity peak. Distance information between the object to be measured and the Z-axis zero point of the lifting piece can be obtained, so that the specific position of the ranging point (namely the ranging point of the light spot falling on the object to be measured) is determined.
It should be noted that, the light beam may be emitted through the laser unit of the light peak ranging sensor, and the corresponding light intensity waveform may be detected through the photosensitive sensing unit of the light peak ranging sensor, and the embodiment of the present application considers that if the laser unit and the photosensitive sensing unit are too independent, an installation tolerance between the injection processing light spot and the ranging sensor, an expected distance between the movement and the actual distance, and an execution error between the injection processing light spot and the ranging sensor, etc. occur between the two, so that the embodiment of the present application adopts the laser unit as the ranging light spot, avoiding the waste of hardware resources, and improving the focusing precision under the condition of low cost.
Further, step S230, determining a target light intensity peak based on the target light intensity waveform, includes:
Analyzing the target light intensity waveform to obtain a plurality of light intensity values;
and selecting the light intensity value which accords with a preset peak value condition from the plurality of light intensity values as the target light intensity peak.
Specifically, the light intensity values are detected one by one according to a preset peak condition to determine whether the peak condition is met. The peak condition may be a predetermined threshold or other specific rule for determining whether the light intensity value represents a target peak.
According to the technical scheme, the distance information between the object to be measured and the reference point is obtained by determining the reference point of the light peak ranging sensor, obtaining a corresponding target light intensity waveform in the process that the light peak ranging sensor moves between the object to be measured and the reference point, determining a target light intensity peak based on the target light intensity waveform, and obtaining the distance information between the object to be measured and the reference point based on the target light intensity peak. Based on the scheme of the application, the light beam of the light peak ranging sensor and the object to be measured are kept in a stable position relationship to realize ranging, namely, when the light beam is emitted by the light peak ranging sensor and is perpendicular to the object to be measured, the light peak ranging sensor is controlled to move between the object to be measured and the datum point to obtain a corresponding target light intensity waveform, the target light intensity peak is determined by analyzing the target light intensity waveform, and further, the distance information between the object to be measured and the datum point is determined, so that the technical problems of low ranging precision and high cost are solved, the ranging precision can be improved, the ranging error is reduced, and the cost is reduced.
Referring to fig. 3, fig. 3 is a flowchart illustrating a ranging method according to a second exemplary embodiment of the present application. Based on the embodiment shown in fig. 2, the light peak ranging sensor includes a laser unit and a photosensitive sensing unit, and step S220 includes obtaining a corresponding target light intensity waveform during the movement of the light peak ranging sensor between the object to be measured and the reference point, where the step includes:
Step S310, when the laser unit emits a light beam and the light beam is perpendicular to the object to be measured, the light peak ranging sensor is controlled to move between the object to be measured and the reference point, so that the photosensitive sensing unit detects the target light intensity waveform.
It should be noted that, the embodiments of the present application consider low reflectivity and specular reflection scenarios, and therefore rely mainly on finding the light intensity peak to determine the threshold. Even if the reflectivity of the material is poor, the peak algorithm can still accurately identify and judge the position of the relative highest light intensity, so that the search of the critical point has enough accuracy. Even in specular reflection scenes, the present solution can still utilize diffuse reflection at defined angles of the mirror to achieve a certain degree of effect, since the mirror in the real world is generally not a perfect ideal mirror. This means that even if the mirror does not have perfect reflection characteristics, sufficient information can be obtained from diffuse reflection for focusing. Therefore, compared with the traditional camera scheme, the method has the advantages that the effect that red light spots are made on different materials through a crest algorithm and the diffuse reflection is adopted, namely, the method has certain adaptability in darker (high absorptivity), brighter (high reflectivity) and more curved (the focusing surface is not perpendicular to the focusing light spots) scenes, and the influence of the material reflectivity and challenges in specular reflection scenes are overcome.
The light peak distance measuring sensor comprises a laser unit and a photosensitive sensing unit, wherein the laser unit can be a laser light-emitting source and is fixed on the lifting component and used for emitting light beams which are concentrated in energy and perpendicular to an object to be measured downwards so as to form a stable light spot at a target position of the object to be measured, and the photosensitive sensing unit can be a photosensitive sensor and is at a certain oblique angle with the laser light-emitting source and used for reading light intensity changes in a detection direction and converting the light intensity changes into electric signals for measurement and analysis.
Under the condition that the light rays are vertical, the positions of the laser unit and the photosensitive sensing unit are controlled to move downwards to a proper height (for example, the intersection point of the detection directions of the laser unit and the photosensitive sensing unit), and the change of the light intensity signal which can be detected by the photosensitive sensing unit is measured to obtain a target light intensity waveform, wherein the target light intensity waveform can comprise the peak of the highest light intensity, namely the target peak.
Further, in step S310, the controlling the light peak ranging sensor to move between the object to be measured and the reference point, so that the photosensitive sensing unit detects the target light intensity waveform includes:
Step S311, in the process of controlling the light peak ranging sensor to move between the object to be measured and the reference point, continuously reading the light intensity value detected by the photosensitive sensing unit in response to identifying that the object to be measured enters the range of the light peak ranging sensor;
It should be noted that, in the embodiment of the present application, the lowering of the photosensitive sensor unit and the laser unit is exemplified, and in other embodiments, the photosensitive sensor unit and the laser unit may also move horizontally left and right, and the reference point and the moving directions of the photosensitive sensor unit and the laser unit may be flexibly selected according to the position of the object to be measured.
Specifically, the laser unit is used for vertically striking the ranging point, and the photosensitive rod penetrating unit is used for continuously detecting corresponding light intensity data, so that the change of the light intensity is monitored in real time in the descending process, the parameters and the position of the ranging system are dynamically adjusted, and an object to be measured enters the range of the light peak ranging sensor.
For example, before ranging with the light peak ranging sensor, the range of the light peak ranging sensor may be determined, for example, by identifying a number of peaks in the waveform, the effective range of the ranging system may be determined, i.e., the peak of the light intensity waveform represents the location of the ranging point. The specific range of the range can adapt to the requirements of different ranging scenes, and the flexibility and the adaptability of the system are improved.
For example, if the partial light intensity waveform belongs to a comparatively steep case, the span range may be set to a first threshold, that is, a smaller threshold with respect to the history data, and if the partial light intensity waveform belongs to a comparatively gentle case, the span range may be set to a second threshold, that is, a larger threshold with respect to the history data.
Step S312, determining the target light intensity waveform according to the light intensity value;
The method comprises the steps of lifting a structure fixed with a laser light source and a photosensitive sensor to the highest position, determining a datum point through a limit sensor on a Z axis, ensuring that an elevating piece has an accurate zero point, gradually controlling the whole structure to move downwards by using a stepping motor or other driving modes with accurate position control capability, continuously reading a light intensity value detected by the photosensitive sensor by an embedded code, observing the whole light intensity waveform, observing an obvious light intensity peak when a light spot falls on an intersection point by the photosensitive sensor along with the continuous descent of the elevating piece in the range of the light peak ranging sensor if an object to be detected is in the range of the light peak ranging sensor, and searching the light intensity waveform by the embedded code in the link, and finding the distance of the elevating piece relative to the zero point of the Z axis when the light intensity peak occurs. Through the distance, the distance information between the object to be measured and the Z-axis zero point of the lifting piece can be obtained, so that the specific position of the ranging point (namely the ranging point of the light spot falling on the object to be measured) is determined.
It should be noted that, in the worst case, a patch policy may be adopted. Namely, a piece of sticker which can provide a light spot for focusing with better diffuse reflection can be stuck on an object to be measured. By attaching the sticker at a specific position, the focusing accuracy can be improved, and the focusing problem in certain special scenes can be solved, so that extreme cases can be dealt with, and reliable measurement results can be obtained under various environmental conditions.
Further, the photosensitive sensor unit comprises a photosensitive sensor and a dark cavity, wherein the dark cavity is arranged at one end of the photosensitive sensor in the detection direction and is used for isolating other light beams except the detection direction from being detected by the photosensitive sensor.
In the embodiment, a peak ranging system is used for ranging an object to be measured, and referring to fig. 4, fig. 4 is a frame diagram of the peak ranging system of the ranging method of the application, and the frame of the peak ranging system comprises a laser light source 1 for emitting focusing light spots, a photosensitive sensor 2 sensitive to specific wavelengths for detecting the wave bands of the laser light source, a dark cavity 3 for isolating light rays in other directions, an object 4 to be measured, a point 5 to be measured, a junction 6, namely a junction of a light path of the laser light source and an extension line of the dark cavity, and a lifting base 7 for controlling lifting of the laser light source and the photosensitive sensor 2.
Specifically, the photosensitive sensing unit comprises a photosensitive sensor and a dark cavity, wherein the photosensitive sensing unit consists of two main parts, namely the photosensitive sensor and the dark cavity. The photosensor is a device for receiving an optical signal and converting it into an electrical signal, and has high sensitivity and response characteristics. The photosensitive sensor forms a certain oblique angle with the laser light source and is fixed in an oblique dark cavity in the structure body, namely, the dark cavity is positioned at one end of the detection direction of the photosensitive sensor and is used for isolating other light rays except the detection direction. The dark cavity can effectively block the interference of non-target light through the design and the layout of the dark cavity, so that the light from the object to be detected can be detected by the photosensitive sensor.
Illustratively, the extended line of the dark cavity and the light beam emitted by the laser unit are converged at a junction, and when the light beam emitted by the laser unit falls on the junction, the photosensitive sensor detects the target light intensity peak.
The extension line of the dark cavity fixed photosensitive sensor and the red point laser light path are converged at a point in a three-dimensional space, and the positions of the point and the laser light source are kept unchanged all the time due to the structural design. When the light spot emitted by the laser light source falls on the intersection point where the dark cavity is intersected, the photosensitive sensor positioned at the tail end of the dark cavity can observe an extremely strong light intensity peak. By introducing a dark cavity, when the laser spot accurately falls on the object to be measured, the photosensitive sensor can capture the peak signal, thereby providing distance information about the target position. Light rays in other directions are effectively isolated, so that the photosensitive sensor only receives target light rays from a ranging point, the accuracy and stability of measurement are improved, and the anti-interference capability of a ranging system is enhanced.
It should be noted that, in the embodiment of the application, the problem of consistency error of the laser focus is considered, and the calibration is performed in the factory link, so that a stable positional relationship between the intersection point of the pointing direction of the dark cavity and the light path of the laser light source used for focusing and the laser focus used for engraving and cutting can be ensured all the time in the use process of single PI CS hardware. That is, the device can be accurately calibrated at the delivery stage, and the light spot is ensured to be focused at the position corresponding to the laser head, so that a stable focusing effect is obtained.
Illustratively, in the factory step, the collimation and accuracy of the light path are ensured by carefully adjusting the optical elements and mechanical structures of the device. In addition, the various critical components can be calibrated using high precision measurement equipment and calibration tools. The results of the calibration will be recorded and maintained in the MCU firmware of the particular laser head for ready reference during use of the device. Through the calibration process of the factory link, a user can rely on the device to provide an accurate focus position no matter the initial focusing or the subsequent focusing adjustment is carried out when the user uses the device every time. Such stability and reliability are critical to ensuring process quality and improving production efficiency.
According to the scheme, in the process of controlling the light peak ranging sensor to move between the object to be measured and the reference point, the light intensity value detected by the photosensitive sensing unit is continuously read in response to the fact that the object to be measured enters the range of the light peak ranging sensor, the target light intensity waveform is determined according to the light intensity value, the system can flexibly adjust and adapt to different scenes according to actual requirements, light intensity data are continuously collected in the descending process, stability and reliability of the ranging system can be improved, errors and interference are reduced through repeated measurement and waveform analysis, accurate ranging data can be obtained through combining processing of the light intensity waveform detected by the photosensitive sensor and embedded codes in the descending process of controlling the lifting piece, ranging accuracy and controllability are improved, and ranging requirements of different range ranges can be met.
Referring to fig. 5, fig. 5 is a flowchart illustrating a third exemplary embodiment of the ranging method according to the present application. Based on the embodiment shown in fig. 2-4, step S312, determining a range according to the partial light intensity waveform includes:
Step S510, analyzing the target light intensity waveform to obtain a plurality of light intensity values;
Step S520, selecting a light intensity value meeting a preset peak condition from the plurality of light intensity values as the target light intensity peak.
Specifically, a maximum value or a light intensity value greater than a preset threshold value may be selected from the target light intensity waveform as the target light intensity peak.
Optionally, the distance between the intersection point and the reference point is a first preset distance, and the step of obtaining the distance information between the object to be measured and the reference point based on the target light intensity peak includes:
Determining the moving distance of the light peak ranging sensor when the light peak of the target light intensity occurs;
and adding the moving distance of the light peak ranging sensor to the first preset distance to obtain the distance information between the object to be measured and the datum point.
In the embodiment of the application, the distance from the datum point to the intersection point is taken as the first preset distance, the datum point is positioned on the straight line where the light beam is positioned, in the embodiment of the application, the datum point is taken as an example at the tail end of the laser unit, the light beam is emitted by the emitting end of the laser unit and vertically hits the object to be detected, the light sensor observes the target light intensity peak when the light spot falls on the intersection point, the moving distance of the light peak ranging sensor can be determined according to the time when the light spot of the target light intensity peak appears and the moving speed of the light peak ranging sensor, and then the moving distance of the light peak ranging sensor is added with the first preset distance to obtain the distance between the object to be detected and the datum point.
According to the scheme, the light intensity values which meet the preset peak conditions in the light intensity values are selected as the target light intensity peaks, so that the performance of a laser ranging system can be further optimized, accurate ranging data can be obtained, and the ranging accuracy and controllability are improved.
Referring to fig. 6, fig. 6 is a flowchart illustrating a fourth exemplary embodiment of the ranging method according to the present application. Based on the embodiment shown in fig. 2-5, step S220, before the peak ranging sensor emits a light beam and the light beam is perpendicular to the object to be measured, is changed to obtain a corresponding target light intensity waveform by changing the height of the peak ranging sensor, further includes:
Step S610, obtaining an angle between the light beam and the object to be detected, and detecting whether the light beam is perpendicular to the object to be detected;
Specifically, in the light peak ranging sensor, an angle between a light beam and an object to be measured is acquired, and whether the light beam is perpendicular to the object to be measured is detected. By using a suitable sensor or measurement method, the angle of incidence of the light beam with respect to the object to be measured can be obtained. Meanwhile, whether the light beam is correctly aligned with the target position can be determined by detecting whether the light beam is perpendicular to the object to be detected. Such a step may provide critical information about the beam position and direction.
In step S620, if it is detected that the light beam is not perpendicular to the object to be measured, the direction calibration is performed according to the angle.
Specifically, if the light beam is detected not to be perpendicular to the object to be measured, the direction calibration is performed according to the angle. When the angle of the light beam deviates from the vertical direction, deviation of the ranging result may be caused. Through the operation of direction calibration, the direction of the light beam can be adjusted to enable the light beam to be vertically aligned with an object to be measured, and therefore accuracy and precision of distance measurement are improved. The direction calibration can be achieved by adjusting the position or angle of the light source or the ranging system, ensuring the vertical alignment of the light beam with the object to be measured.
According to the scheme, the situation that the direction of the light beam deviates can be found in time by detecting whether the light beam is perpendicular to the object to be measured or not, and the direction calibration is performed, so that flexible adjustment of the position and the direction of the light beam is provided, and the reliability and the stability of a ranging system are ensured.
In addition, an embodiment of the present application further provides a ranging device, where the ranging device is applied to a light peak ranging sensor, and includes:
the determining module is used for determining a datum point of the light peak ranging sensor;
The control module is used for obtaining a corresponding target light intensity waveform by changing the height of the light peak ranging sensor when the light peak ranging sensor emits a light beam and the light beam is perpendicular to an object to be measured;
and the distance calculation module is used for determining a target light intensity wave crest based on the target light intensity wave crest and obtaining distance information between the object to be detected and the datum point based on the target light intensity wave crest.
The present embodiment realizes the principle and implementation process of ranging, please refer to the above embodiments, and the description thereof is omitted herein.
In addition, the embodiment of the application also provides a terminal device, which comprises a memory, a processor and a ranging program stored on the memory and capable of running on the processor, wherein the ranging program realizes the steps of the ranging method when being executed by the processor.
Because the ranging procedure is executed by the processor and all the technical solutions of all the embodiments are adopted, the ranging procedure at least has all the beneficial effects brought by all the technical solutions of all the embodiments and is not described in detail herein.
In addition, an embodiment of the present application further provides a laser processing apparatus, including:
A slide rail;
The light peak distance sensor comprises a laser unit and a photosensitive sensing unit, and is slidably arranged on the sliding rail;
A communication unit for receiving distance information between the object to be measured and the reference point obtained according to the steps of the ranging method as described above;
And the controller controls the light peak ranging sensor to move on the sliding rail so as to perform ranging processing.
Because the laser processing device adopts all the technical schemes of all the embodiments, the laser processing device has at least all the beneficial effects brought by all the technical schemes of all the embodiments, and the description is omitted herein.
In addition, the embodiment of the application also provides a computer readable storage medium, wherein a ranging program is stored on the computer readable storage medium, and the ranging program realizes the steps of the ranging method when being executed by a processor.
Because the ranging procedure is executed by the processor and all the technical solutions of all the embodiments are adopted, the ranging procedure at least has all the beneficial effects brought by all the technical solutions of all the embodiments and is not described in detail herein.
Referring to fig. 7, fig. 7 schematically shows a schematic diagram of a system architecture to which the technical solution of the present application is applied.
As shown in fig. 7, the system architecture 1000 may include a terminal device 1100, a network 1200, and a server 1300. Terminal device 1100 may include a smart phone, tablet, notebook, smart voice interaction device, laser machining device, and the like. The server 1300 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud computing services. The network 1200 may be a communication medium of various connection types capable of providing a communication link between the terminal device 1100 and the server 1300, and may be a wired communication link or a wireless communication link, for example. The system architecture in embodiments of the present application may have any number of terminal devices, networks, and servers, as desired for implementation.
The technical solution provided in the embodiment of the present application may be applied to the terminal device 1100, or may be applied to the server 1300, or may be implemented by the terminal device 1100 and the server 1300 together, which is not limited in particular by the present application. For example, the terminal device 1100 is a ranging device (hereinafter referred to simply as a device), and the server 1300 is a server corresponding to the device.
Compared with the prior art, the ranging method, the device, the terminal equipment, the laser processing equipment and the storage medium are provided, the ranging method is applied to a light peak ranging sensor, a datum point of the light peak ranging sensor is determined, a corresponding target light intensity waveform is obtained in the process that the light peak ranging sensor moves between an object to be measured and the datum point, a target light intensity peak is determined based on the target light intensity waveform, and distance information between the object to be measured and the datum point is obtained based on the target light intensity peak. Based on the scheme of the application, the light beam of the light peak ranging sensor and the object to be measured are kept in a stable position relationship to realize ranging, namely, when the light beam is emitted by the light peak ranging sensor and is perpendicular to the object to be measured, the light peak ranging sensor is controlled to move between the object to be measured and the datum point to obtain a corresponding target light intensity waveform, the target light intensity peak is determined by analyzing the target light intensity waveform, and further, the distance information between the object to be measured and the datum point is determined, so that the technical problems of low ranging precision and high cost are solved, the ranging precision can be improved, the ranging error is reduced, and the cost is reduced.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to perform the method of each embodiment of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.