A method for constructing a histogram to improve the signal-to-noise ratio and a laser ranging chip

By calculating and subtracting noise values from time bin counts in time-of-flight systems, the method enhances signal-to-noise ratio and measurement accuracy in high ambient light or high-reflectance scenarios, addressing the issue of saturated time bins.

CN114488175BActive Publication Date: 2025-07-15SHENZHEN ADAPS PHOTONICS TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210074440.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-21
Publication Date
2025-07-15
Estimated Expiration
2042-01-21

AI Technical Summary

Technical Problem

In the case of strong ambient light or high reflectivity objects, the counting statistics of time bin in the prior art can easily reach the upper storage limit, resulting in low signal-to-noise ratio and making it difficult to accurately determine the distance of the target object.

Method used

At the end of the exposure time, the count value of the preset time box in the original histogram data is obtained, the average is calculated as the noise value, and the count value corresponding to each time box in the original histogram data is subtracted from the noise value to obtain the denoised histogram data, and the histogram is drawn.

Benefits of technology

Without increasing the storage space, noise is effectively removed, signal-to-noise ratio and detection accuracy are improved, and signal-to-noise ratio and detection accuracy are ensured that signal data is not lost due to overflow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114488175B_ABST
    Figure CN114488175B_ABST
Patent Text Reader

Abstract

The present invention provides a method for constructing a histogram to improve the signal-to-noise ratio and a laser ranging chip. The method includes: setting a first exposure time, and at the end of the first exposure time, obtaining the count value corresponding to a preset time bin in the original histogram data, and averaging the count values as the noise value, where the count value corresponding to the preset time bin does not exceed a count threshold; subtracting the noise value from the count value corresponding to each time bin in the original histogram data to obtain denoised histogram data; and drawing a histogram according to the denoised histogram data. By calculating the noise value of the original histogram data and subtracting the noise value, the noise of the histogram is effectively reduced and the signal-to-noise ratio is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of distance detection, and in particular, to a method for constructing a histogram to improve the signal-to-noise ratio and a laser ranging chip. Background Art

[0002] Currently, time-of-flight ranging measurements are all based on histogram statistics using time bins. When a detector detects and receives a photon, a TDC (Time-to-Digital Converter) is used to calculate its distance. If the photon belongs to a certain time bin, the value of that time bin is incremented by 1, that is, the original value is read out, incremented by 1, and then written back again. The count value of this time bin is the peak value. This process is repeated until the exposure stops.

[0003] However, when detecting in a strong ambient light environment or when the target object is a high-reflectivity object, the count statistics of each time bin reach the storage upper limit and become full. The full time bins cannot count subsequent photon trigger signals. This means that the peak value cannot be counted to a higher level and the noise may be continuously counted until the exposure stops, resulting in a very low signal-to-noise ratio and making it difficult to determine the true distance of the target object. Summary of the Invention

[0004] In view of the above deficiencies of the prior art, the purpose of the present invention is to provide a method for constructing a histogram to improve the signal-to-noise ratio and a laser ranging chip, so as to reduce the noise during histogram construction and improve the signal-to-noise ratio.

[0005] To achieve the above purpose, the present invention adopts the following technical solutions:

[0006] The first aspect of the present invention provides a method for constructing a histogram to improve the signal-to-noise ratio, including the following steps:

[0007] Set a first exposure time. At the end of the first exposure time, obtain the count value corresponding to a preset time bin in the original histogram data, and average the count value as the noise value, where the count value corresponding to the preset time bin does not exceed the count threshold;

[0008] Subtract the noise value from the count value corresponding to each time bin in the original histogram data to obtain denoised histogram data;

[0009] Draw a histogram based on the denoised histogram data.

[0010] In one embodiment, the step of, at the end of the first exposure time, obtaining the count value corresponding to a preset time bin in the original histogram data and averaging the count value as the noise value specifically includes:

[0011] When the first exposure time is less than the time threshold, at the end of the first exposure time, obtain the count value corresponding to the preset time bin in the original histogram data, and average the count values to obtain the noise value;

[0012] When the first exposure time is greater than the time threshold, as long as it is detected that the count value corresponding to one time bin in the original histogram data reaches the upper limit value, obtain the count value corresponding to the preset time bin in the original histogram data, and average the count values to obtain the noise value until the end of the first exposure time.

[0013] In one embodiment, the obtaining the count value corresponding to the preset time bin in the original histogram data and averaging the count values to obtain the noise value includes:

[0014] Obtain the count value corresponding to the preset time bin in the original histogram data, and remove at least one peak from the count values. The preset time bin is several time bins near the right endpoint of the time bin interval;

[0015] Average the count values after removing the peaks to obtain the noise value.

[0016] In one embodiment, the obtaining the count value corresponding to the preset time bin in the original histogram data specifically includes:

[0017] Obtain the original histogram data and confirm the first interval where the signal peak is located;

[0018] Confirm any sub-interval other than the first interval in the time bin interval as the second interval, and the time bins in the second interval are used as the preset time bins.

[0019] In one embodiment, when the number of time bins in the second interval is less than the number threshold, the noise value is a rough value;

[0020] When the number of time bins in the second interval is greater than the number threshold, the noise value is an accurate value.

[0021] In one embodiment, the when the first exposure time is greater than the time threshold, as long as it is detected that the count value corresponding to one time bin in the original histogram data reaches the upper limit value, obtain the count value corresponding to the preset time bin in the original histogram data, and average the count values to obtain the noise value until the end of the first exposure time specifically includes:

[0022] When it is first detected that the count value corresponding to one time bin reaches the upper limit value, obtain the count value corresponding to the preset time bin in the original histogram data, and average the count values to obtain the noise value, and save the noise value as a fixed noise value until the end of the first exposure time.

[0023] In one embodiment, the method further includes: setting a first temporary memory for storing the cumulative value of the noise value calculated each time.

[0024] According to the denoised histogram data and the cumulative value of the noise value, the original histogram data is restored.

[0025] In one embodiment, the method further includes: setting a second temporary memory for storing the carry value of the count corresponding to at least one time bin in the denoised histogram.

[0026] When the cumulative value of the noise value reaches the first maximum value and the count corresponding to any time bin in the denoised histogram data reaches the second maximum value, the carry value of the count corresponding to the time bin is stored in the second temporary memory until the exposure ends.

[0027] In one embodiment, the first maximum value is 2 n -1 where n is the bit width of the first temporary memory; the second maximum value is 2 m -1 where m is the memory bit width corresponding to any time bin in the histogram module.

[0028] A second aspect of the present invention provides a laser ranging chip, including:

[0029] A control module for setting a first exposure time, and at the end of the first exposure time, obtaining the count corresponding to a preset time bin in the original histogram data and averaging the count as the noise value, where the count corresponding to the preset time bin does not exceed the count threshold.

[0030] A histogram module for subtracting the noise value from the count corresponding to each time bin in the original histogram data to obtain denoised histogram data, and drawing a histogram according to the denoised histogram data.

[0031] The beneficial effects of the present invention are: providing a histogram construction method and a laser ranging chip for improving the signal-to-noise ratio. Without using too much storage space, by calculating the noise value and subtracting the noise value from the original histogram data, the waveform of the entire histogram is decreased as a whole, and the signal data is not lost due to overflow, thereby improving the signal-to-noise ratio. Description of the Drawings

[0032] The present invention will be further described below in conjunction with the drawings and embodiments. In the drawings:

[0033] Figure 1 is a flowchart of the histogram construction method for improving the signal-to-noise ratio in an embodiment of the present invention;

[0034] Figure 2Schematic diagram of reading and denoising processing of histogram data in the embodiment of the present invention;

[0035] Figure 3 Comparative diagram of histograms before and after denoising, which is an exemplary one in the embodiment of the present invention;

[0036] Figure 4 Structural diagram of a laser ranging chip in the embodiment of the present invention. Detailed implementation manners

[0037] In order to make the technical problems, technical solutions and beneficial effects to be solved in the embodiments of the present invention clearer, the present invention will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0038] It should be noted that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element. In addition, the connection can be for a fixing function or for a circuit connection function.

[0039] It should be understood that the orientation or positional relationship indicated by the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the embodiments of the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention.

[0040] In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present invention, the meaning of "a plurality" is two or more, unless otherwise specifically defined.

[0041] The histogram construction method for improving the signal-to-noise ratio provided by the embodiments of the present invention is applied to a distance detection system based on the time-of-flight (TOF) method. The distance detection system at least includes a control module, a transmission module, and a reception module. The control module is respectively connected to the transmission module and the reception module. Among them, the transmission module is used to transmit a detection beam to a target object, and at least part of the detection beam is reflected by the target object to form a reflected light; the reception module includes a pixel array composed of multiple pixels and is used to receive the reflected light reflected back by the target object; the control module is used to synchronously control the emission and reception of light, perform histogram statistics on the photons received by the reception module by distinguishing time bins, and then calculate the flight time of the photons through the histogram, and further measure the distance of the target object.

[0042] Specifically, the transmission module includes a driver and a light source, etc. The light source can be a light-emitting diode (LED), a laser diode (LD), an edge-emitting laser (EEL), a vertical-cavity surface-emitting laser (VCSEL), etc. The light source emits a detection beam outward under the drive control of the driver. The detection beam can be visible light, infrared light, ultraviolet light, etc. At least part of the detection beam is emitted to the target object, and at least part of the reflected light generated by the detection beam reflected by the target object is received by the reception module.

[0043] The reception module includes a pixel array and reception optical elements, etc. The reception optical elements can be one or a combination of forms such as a lens, a microlens array, a mirror, etc. The reflected light is received through the reception optical elements and guided onto the pixel array. The pixel array includes multiple pixels for collecting photons. In one embodiment, the pixel array is composed of multiple single-photon avalanche photodiodes (SPADs). The SPAD can respond to an incident single photon and output a photon signal indicating the corresponding arrival time of the received photon at each SPAD. Of course, in other embodiments, other photoelectric conversion devices such as avalanche photodiodes, photomultiplier tubes, and silicon photomultiplier tubes can also be used.

[0044] Currently, in the distance measurement of the direct-time-of-flight (d-TOF) method, usually, the control module performs histogram statistics on the photons received by the pixel array by distinguishing the time bins they fall into. For example, when a photon is received by the pixel array, a TDC (time data converter) is used to calculate its distance. If the photon belongs to a certain time bin, the value of that time bin is incremented by "1" for statistics. This reception and statistics process is repeated until the exposure stops.

[0045] Since when the target object is fixed at a certain distance, the count value will be continuously counted in a certain time bin all the time, and the storage space is fixed, the count value of this time bin will eventually reach the full count, which means that the subsequent photon trigger signals corresponding to the target object cannot be counted, while the noise is continuously counted by other time bins that have not reached the full count until the exposure stops, resulting in a very low signal-to-noise ratio and inaccurate detection of the target object distance. In order not to reach the full count, the prior art must increase the bit width of the memory to increase the storage space, which means an increase in area, a slower access speed, and an increase in power consumption; or limit the exposure time without increasing the memory bit width to avoid the full count situation caused by too long exposure time, which will limit the usage scenarios of histogram statistics. Therefore, the following describes how to solve this problem through a histogram construction method applied to this distance detection system, improving the signal-to-noise ratio of the histogram and reducing the hardware power consumption without additional storage space.

[0046] As Figure 1 shown, Figure 1 is a flowchart of a histogram construction method for improving the signal-to-noise ratio in an embodiment of the present invention. The method specifically includes the following steps:

[0047] S101. Set a first exposure time. At the end of the first exposure time, obtain the count value corresponding to a preset time bin in the original histogram data, and average the count value as the noise value. The count value corresponding to the preset time bin does not exceed the count threshold.

[0048] When performing distance detection, set a first exposure time to adjust the length of the time window for receiving photons. At the start of the exposure, emit a laser pulse to the target object. After being reflected by the target object and returning, at least part of the reflected light is received by the pixel unit. As Figure 2 shown, after the pixel unit receives a photon, it is converted into distance information data, i.e., TDC photon trigger data, through a time-to-digital converter (TDC). The TDC is a device that realizes the conversion from time to digital signal, a circuit structure that can accurately measure the time interval between the start pulse signal and the stop pulse signal. The converted TDC photon trigger data can record the flight time of each received optical signal, that is, the time interval between the emission pulse and the reception pulse. By converting and calculating the photon signal through the TDC to confirm the time bin (time bin) into which the photon falls, and then adding 1 to the count value in the storage space corresponding to the time bin address. Different time bins correspond to different addresses in the storage space. Exemplarily, when the storage space is divided into 32 storage addresses, bin0-bin31 can be used to represent each time bin address respectively. Therefore, as the exposure continues, the corresponding count values can be statistically obtained in the storage addresses corresponding to each time bin as the original histogram data.

[0049] In this embodiment, to improve the signal-to-noise ratio of the histogram, instead of directly plotting the histogram based on the original histogram data at the end of the first exposure time, the current noise value is first calculated based on the original histogram data. Specifically, the count values corresponding to the preset time bins in the original histogram data are obtained. The number of preset time bins is at least two, and the count values corresponding to the preset time bins do not exceed the count threshold. That is, at least two count values that do not exceed the count threshold are obtained, and the average of the count values is used as the noise value, avoiding data deviation caused by using a single count value as the noise value. At the same time, the signal intensity of noise removal is also limited by the count threshold, avoiding misjudging valid signals as noise signals and improving the accuracy and reliability of noise acquisition. For example: the count value of the signal peak is 255, and the count threshold is 40. That is, within the entire time bin range, a continuous waveform with a count value less than 40 is found, such as Figure 3 both sides of the signal peak in Figure 3 are noise. The sum of 5 consecutive count values is taken and averaged to obtain the noise value. The count threshold is set according to the signal-to-noise ratio. Assuming that the required signal-to-noise ratio is 6, the count threshold can be set to 40.

[0050] S102. Subtract the noise value from the count value corresponding to each time bin in the original histogram data to obtain denoised histogram data.

[0051] After obtaining the noise value by averaging the count values corresponding to the preset time bins, the count value corresponding to each time bin in the original histogram data, that is, the value of each bin, is subtracted by this noise value, and the original histogram data is subjected to overall denoising processing to obtain denoised histogram data, such as Figure 3 shown. Since the value of each bin has been denoised, the peak in the original histogram data remains the peak after denoising. Therefore, it will not affect the distance calculation of the target object, and the background noise in the original histogram data is effectively removed after subtracting the noise value as a whole, improving the signal-to-noise ratio without increasing the storage space.

[0052] S103. Plot a histogram based on the denoised histogram data.

[0053] A histogram is plotted through the denoised histogram data after subtracting the noise value, such as Figure 3 shown. Curve A is the fitting curve of the histogram plotted by the original histogram data, and curve B is the fitting curve of the histogram plotted by the denoised histogram data. After denoising, the background noise is removed from the whole histogram, the intensity of the noise signal is reduced, and the signal-to-noise ratio and detection accuracy are significantly improved.

[0054] In one embodiment, obtaining the count values corresponding to the preset time bins in the original histogram data and averaging the count values as the noise value includes:

[0055] Obtain the count values corresponding to the preset time bins in the original histogram data, and remove at least one peak from the count values. The preset time bins are several time bins near the right endpoint of the time bin interval;

[0056] Calculate the average of the count values after removing the peaks to obtain the noise value.

[0057] In this embodiment, when calculating the noise value, several time bins near the right endpoint of the time bin interval are used as the preset time bins for obtaining the noise. For example, when the time bin interval is bin0 - bin31, several time bins within a preset range before the right endpoint, that is, time bin bin31, are taken as the preset time bins. Since the rightmost time bin corresponds to the farthest distance and usually the target object is not at the farthest position, if there is a signal in the time bins near the rightmost end, it can be regarded as noise. Specifically, five consecutive time bins such as bin26 - bin31 can be taken as the preset time bins. Of course, five discrete time bins such as bin24, bin25, bin27, bin29, and bin30 can also be taken as the preset time bins. This embodiment does not make a limitation on this.

[0058] After obtaining the count values corresponding to the preset time bins near the right endpoint, since the target object may be located far away, the time bins corresponding to the target object signal are then near the right endpoint of the time bin interval, that is, they may be recognized as preset time bins for noise calculation. To avoid misjudging the target object signal as a noise signal, in this embodiment, at least one peak in the count values corresponding to the preset time bins is removed first and then the average is taken to obtain the noise value, so as to improve the accuracy of the noise value calculation. For example: the count value of the signal peak is 255, and the counting threshold is 40. That is, within the entire time bin range, a continuous waveform with a count value less than 40 is searched for. However, usually the noise is about 25, and those greater than 25 and less than 40 may still be small signals. By removing such small peaks first, the calculation of the noise can be more accurate. And even if the target object is not far away and the time bins corresponding to its signal are not recognized as preset time bins, then the peak removal operation at this time only removes the noise peaks and will not have a negative impact on taking the average of multiple count values to obtain the final noise value.

[0059] In one embodiment, obtaining the count values corresponding to the preset time bins in the original histogram data specifically includes:

[0060] Obtain the original histogram data and confirm the first interval where the signal peak is located;

[0061] Confirm any sub - interval other than the first interval in the time bin interval as the second interval, and the time bins in the second interval are used as the preset time bins.

[0062] In this embodiment, when obtaining the count value of the noise signal, first confirm the first interval where the signal peak is located in the original histogram data, that is, the time bin corresponding to the reflected light of the target object falling in. Since the waveform of the usually received reflected light is basically similar to the waveform of the emitted pulse in shape, in order to improve the accuracy of signal peak searching, the position of the signal peak can be confirmed by the method of matching peak searching. For example, first compare the pulse width of the highest peak in the original histogram data with the pulse width of the emitted pulse. If they are inconsistent, identify the highest peak as an invalid peak, and continue to search for the second highest peak for pulse width comparison, and search and match the pulse width in turn until a matching peak with the same pulse width as the emitted pulse is found, which is used as the signal peak.

[0063] This signal peak will correspondingly occupy the first interval in the time bin interval. The time bins within the first interval are the valid count values, and any other arbitrary sub-interval except the first interval can be confirmed as the second interval for noise calculation, that is, the time bins included in the second interval are used as the preset time bins, providing a wider and more reliable data range for the calculation of the noise value.

[0064] Specifically in implementation, the number of time bins in the second interval can be adjusted according to different denoising accuracy requirements. When the number of time bins in the second interval is less than the number threshold, the noise value obtained by averaging the count values corresponding to the time bins in the second interval is a rough value. When the number of time bins in the second interval is greater than the number threshold, the noise value obtained by averaging the count values corresponding to the time bins in the second interval is an accurate value, so that during the denoising process, different precision noise value calculations can be realized based on the length of the second interval, thus balancing the data processing power consumption and the detection accuracy requirements, and can be flexibly applied to various usage scenarios.

[0065] In one embodiment, step S101 includes:

[0066] When the first exposure time is less than the time threshold, at the end of the first exposure time, obtain the count value corresponding to the preset time bin in the original histogram data, and average the count values as the noise value;

[0067] When the first exposure time is greater than the time threshold, as long as it is detected that the count value corresponding to one time bin in the original histogram data reaches the upper limit value, obtain the count value corresponding to the preset time bin in the original histogram data, and average the count values as the noise value until the end of the first exposure time.

[0068] In this embodiment, different noise value acquisition schemes are adopted according to the length of the exposure time to adapt to different application scenarios. When a shorter exposure time is set, that is, the first exposure time is less than the time threshold, since the number of photons received within a short exposure time is limited and the count value is not easily filled up, the count value corresponding to the preset time bin can be obtained and averaged at the end of the first exposure time, so as to efficiently obtain and calculate the corresponding noise value and improve the denoising efficiency.

[0069] When a longer exposure time is set, that is, the first exposure time is greater than the time threshold, since more photons are received within a longer exposure time and the ranging is more accurate, but at this time, the count values in the storage addresses corresponding to each time bin in the storage space are easily filled up and overflow, that is, the count value will reach the upper limit value, which is related to the bit width of the current static memory. To avoid the situation of the count value being filled up, this embodiment detects the situation of the count value being filled up and overflowing in real time during the exposure process. As long as it is detected that the count value corresponding to one time bin in the original histogram data reaches the upper limit value, the noise value calculation process is performed until the end of the first exposure time. That is to say, before the end of the first exposure time, every time it is detected that the count value corresponding to a time bin reaches the upper limit value, the noise value is calculated once and then the denoising process is performed. By continuously obtaining the noise value and performing the denoising process, the situation that the count value corresponding to the time bin is filled up can be effectively avoided, and the signal-to-noise ratio is improved without additionally increasing the storage space, ensuring the accuracy of distance detection.

[0070] In one embodiment, when the first exposure time is greater than the time threshold, as long as it is detected that the count value corresponding to one time bin in the original histogram data reaches the upper limit value, the count value corresponding to the preset time bin in the original histogram data is obtained, and the average of the count values is used as the noise value until the end of the first exposure time. Specifically, it includes:

[0071] When it is first detected that the count value corresponding to a time bin reaches the upper limit value, the count value corresponding to the preset time bin in the original histogram data is obtained, and the average of the count values is used as the noise value, and the noise value is saved as a fixed noise value until the end of the first exposure time.

[0072] In this embodiment, when a longer exposure time is set, if the detection environment is stable, that is, the background noise is fixed, when it is first detected that the count value of a time bin is filled up, the step of obtaining the count value and calculating the noise value is performed, and the noise value calculated for the first time is saved as a fixed noise value. After the denoising process is performed according to the fixed noise value calculated for the first time, if it is subsequently detected that the count value corresponding to a time bin reaches the upper limit value again, there is no need to perform the noise value calculation process again, and the fixed noise value can be directly read for the denoising process until the end of the first exposure time, effectively reducing the data processing amount in the fixed background noise environment and improving the denoising efficiency.

[0073] In one embodiment, the method further includes:

[0074] Set a first temporary memory for saving the cumulative value of the noise value obtained by each calculation;

[0075] Restore the original histogram data according to the denoised histogram data and the cumulative value of the noise value.

[0076] In this embodiment, on the basis of calculating the noise value and performing denoising processing, the cumulative value of the noise value is further stored by dynamically allocating shared storage space. Since the denoised histogram data and the corresponding histogram can obtain the distance signal of the target object after subtracting the noise value from the count value corresponding to each time bin in the original histogram data, but the true signal-to-noise ratio cannot be obtained. By setting a first temporary memory to save the cumulative value of the noise value obtained by each calculation, the distance signal of the target object and the true signal-to-noise ratio can still be obtained without occupying the memory capacity. At the end of the exposure time, read the cumulative value of the noise value in the first temporary memory, and add the cumulative value of the noise value to the count value corresponding to each time bin in the denoised histogram data, then the original histogram data can be restored, and then the original histogram can be drawn and the true signal-to-noise ratio can be obtained. A small amount of dynamically shared storage space is temporarily allocated to solve the problem that the count value of the time bin is easily full, avoid increasing the bit width of the overall memory, and save power consumption and occupied area.

[0077] In one embodiment, the method further includes:

[0078] Set a second temporary memory for saving the carry value of the count value corresponding to at least one time bin in the denoised histogram;

[0079] When the cumulative value of the noise value reaches the first maximum value and the count value corresponding to any time bin in the denoised histogram data reaches the second maximum value, store the carry value of the count value corresponding to the time bin into the second temporary memory until the exposure ends.

[0080] In this embodiment, if the cumulative value of the noise value is too large and reaches the first maximum value, specifically, the first maximum value is 2 n -1, where n is the bit width of the first temporary memory, that is, the cumulative value in the first temporary memory has been full, then the operation of subtracting the noise is no longer performed, but the count values corresponding to each time bin are directly added, and when the count value corresponding to any time bin in the denoised histogram data reaches the second maximum value, carry storage is realized through the second temporary memory. Specifically, the second maximum value is 2 m -1, where m is the memory bit width corresponding to any time bin in the histogram module.

[0081] That is to say, if there is still a full count situation in the denoised histogram data after noise reduction, the carry value of the count value corresponding to the time bin that has been fully counted is stored in the second temporary memory until the exposure ends.

[0082] When drawing the histogram, the count value of each time bin in the denoised histogram data is correspondingly added with the carry value in the second temporary memory and the cumulative value of the noise value in the first temporary memory, so as to restore the original histogram data, and then draw the original histogram and obtain the true signal-to-noise ratio. Due to the long exposure time, the count value will become larger and larger and will definitely overflow. For objects with long exposure time, short distance, and high reflectivity, the present embodiment has a very good effect. With a small amount of dynamic shared storage space, ranging and calculating the signal-to-noise ratio can be achieved without increasing additional static storage space. Through software calculation, both the signal and the noise are retained, and the software method replaces the overall improvement of the bit width and storage capacity of the static memory, effectively saving area and cost.

[0083] It should be noted that there is not necessarily a certain order between the above steps. Those of ordinary skill in the art can understand according to the description of the embodiments of the present invention that in different embodiments, the above steps can have different execution orders, that is, they can be executed in parallel, or they can be exchanged and executed, etc.

[0084] The present invention also correspondingly provides a laser ranging chip, as Figure 4 shown, Figure 4 is a structural diagram of a laser ranging chip in an embodiment of the present invention, including a control module 401 and a histogram module 402. The control module is electrically connected to the histogram module. The control module 401 is used to set a first exposure time. When the first exposure time ends, obtain the count value corresponding to a preset time bin in the original histogram data, and average the count value as the noise value, and the count value corresponding to the preset time bin does not exceed the count threshold; the histogram module 402 is used to subtract the noise value from the count value corresponding to each time bin in the original histogram data to obtain denoised histogram data, and draw a histogram according to the denoised histogram data. Since the above method embodiments have introduced the noise acquisition and denoising processes in detail, reference can be made to the corresponding method embodiments above, and details will not be described here.

[0085] In summary, the present invention provides a method for constructing a histogram to improve the signal-to-noise ratio and a laser ranging chip. The method includes: setting a first exposure time, and at the end of the first exposure time, obtaining the count value corresponding to a preset time bin in the original histogram data, and averaging the count values as the noise value, where the count value corresponding to the preset time bin does not exceed a count threshold; subtracting the noise value from the count value corresponding to each time bin in the original histogram data to obtain denoised histogram data; and drawing a histogram based on the denoised histogram data. By calculating the noise value of the original histogram data and subtracting the noise value, the noise of the histogram is effectively reduced and the signal-to-noise ratio is improved.

[0086] The above content is a further detailed description of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is only limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several equivalent substitutions or obvious variations can be made, and as long as the performance or use is the same, they should all be regarded as belonging to the protection scope of the present invention.

Claims

1. A method for constructing a histogram to improve the signal-to-noise ratio, characterized in that, The method includes the following steps: Set a first exposure time. At the end of the first exposure time, obtain the count value corresponding to a preset time bin in the original histogram data, and average the count values as the noise value, where the count values corresponding to the preset time bin do not exceed a count threshold; Subtract the noise value from the count value corresponding to each time bin in the original histogram data to obtain denoised histogram data; Draw a histogram based on the denoised histogram data; The step of, at the end of the first exposure time, obtaining the count value corresponding to the preset time bin in the original histogram data and averaging the count values as the noise value specifically includes: When the first exposure time is less than a time threshold, at the end of the first exposure time, obtain the count value corresponding to the preset time bin in the original histogram data and average the count values as the noise value; When the first exposure time is greater than the time threshold, as long as it is detected that the count value corresponding to one time bin in the original histogram data reaches the upper limit value, obtain the count value corresponding to the preset time bin in the original histogram data and average the count values as the noise value until the first exposure time ends.

2. The method for constructing a histogram for improving the signal-to-noise ratio according to claim 1, characterized in that, The step of obtaining the count value corresponding to the preset time bin in the original histogram data and averaging the count values as the noise value includes: Obtain the count value corresponding to the preset time bin in the original histogram data, and remove at least one peak value from the count values, where the preset time bin is several time bins near the right endpoint of the time bin interval; Average the count values after removing the peak values to obtain the noise value.

3. The method for constructing a histogram to improve the signal-to-noise ratio according to claim 1, wherein The step of obtaining the count value corresponding to the preset time bin in the original histogram data specifically includes: Obtain the original histogram data and confirm the first interval where the signal peak is located; Confirm any sub-interval other than the first interval in the time bin interval as the second interval, and the time bins in the second interval are used as the preset time bins.

4. The method for constructing a histogram to improve the signal-to-noise ratio according to claim 3, wherein When the number of time bins in the second interval is less than a number threshold, the noise value is a rough value; When the number of time bins in the second interval is greater than the number threshold, the noise value is an accurate value.

5. The histogram construction method for improving the signal-to-noise ratio according to claim 1, characterized in that, The step of, when the first exposure time is greater than the time threshold, as long as it is detected that the count value corresponding to one time bin in the original histogram data reaches the upper limit value, obtaining the count value corresponding to the preset time bin in the original histogram data and averaging the count values as the noise value until the first exposure time ends specifically includes: When it is first detected that the count value corresponding to one time bin reaches the upper limit value, obtain the count value corresponding to the preset time bin in the original histogram data and average the count values as the noise value, and save the noise value as a fixed noise value until the first exposure time ends.

6. The method for constructing a histogram for improving the signal-to-noise ratio according to any one of claims 1-5, characterized in that, The method further includes: setting a first temporary memory for saving the cumulative value of the noise value calculated each time; Restore the original histogram data according to the denoised histogram data and the cumulative value of the noise value.

7. The method for constructing a histogram for improving the signal-to-noise ratio according to claim 6, wherein The method further includes: setting a second temporary memory for storing a carry value of the count value corresponding to at least one time bin in the denoised histogram; When the cumulative value of the noise value reaches a first maximum value and the count value corresponding to any one time bin in the denoised histogram data reaches a second maximum value, the carry value of the count value corresponding to the time bin is stored in the second temporary memory until the exposure ends.

8. The method for constructing a histogram for improving the signal-to-noise ratio according to claim 7, characterized in that, The first maximum value is 2 n -1 where n is the bit width of the first temporary memory; the second maximum value is 2 m -1 where m is the memory bit width corresponding to any time bin in the histogram module.

9. A laser ranging chip, characterized in that, It includes: A control module, configured to set a first exposure time, and at the end of the first exposure time, obtain the count value corresponding to a preset time bin in the original histogram data, and average the count value as the noise value, where the count value corresponding to the preset time bin does not exceed a count threshold; wherein, when the first exposure time is less than a time threshold, at the end of the first exposure time, obtain the count value corresponding to a preset time bin in the original histogram data, and average the count value as the noise value; When the first exposure time is greater than the time threshold, as long as it is detected that the count value corresponding to one time bin in the original histogram data reaches the upper limit value, obtain the count value corresponding to a preset time bin in the original histogram data, and average the count value as the noise value until the first exposure time ends; A histogram module, configured to subtract the noise value from the count value corresponding to each time bin in the original histogram data to obtain denoised histogram data, and draw a histogram according to the denoised histogram data.

Citation Information

Patent Citations

  • Method for processing histogram, distance measurement system and distance measurement equipment

    CN112731425A