CN114494086A - Memory-saving histogram construction method and device and laser ranging chip - Google Patents

Memory-saving histogram construction method and device and laser ranging chip Download PDF

Info

Publication number
CN114494086A
CN114494086A CN202111682038.8A CN202111682038A CN114494086A CN 114494086 A CN114494086 A CN 114494086A CN 202111682038 A CN202111682038 A CN 202111682038A CN 114494086 A CN114494086 A CN 114494086A
Authority
CN
China
Prior art keywords
tdc
data
channels
histogram
encoded
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111682038.8A
Other languages
Chinese (zh)
Other versions
CN114494086B (en
Inventor
杨东
张超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Adaps Photonics Technology Co ltd
Original Assignee
Shenzhen Adaps Photonics Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Adaps Photonics Technology Co ltd filed Critical Shenzhen Adaps Photonics Technology Co ltd
Priority to CN202111682038.8A priority Critical patent/CN114494086B/en
Publication of CN114494086A publication Critical patent/CN114494086A/en
Application granted granted Critical
Publication of CN114494086B publication Critical patent/CN114494086B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/06Systems determining position data of a target
    • G01S17/08Systems determining position data of a target for measuring distance only
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Electromagnetism (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Optical Radar Systems And Details Thereof (AREA)

Abstract

The invention provides a memory-saving histogram construction method, a memory-saving histogram construction device and a laser ranging chip, wherein the method comprises the following steps: selecting TDC photon trigger data of N channels as data to be encoded of 1 macro-pixel, wherein each channel corresponds to at least one pixel unit, and each macro-pixel corresponds to a storage space; the TDC photon trigger data of N channels are encoded and stored in storage spaces corresponding to TDC address data, a plurality of storage addresses of each storage space are represented by time boxes, and the data stored by the address of each time box is the sum of the encoded TDC photon trigger data of the N channels; decoding the encoded data in the storage space to obtain accumulated TDC photon trigger data of each channel; and constructing a histogram of each channel according to the accumulated TDC photon trigger data of each channel. By constructing the data to be encoded of the macro-pixels, encoding and storing the data and then decoding the data to construct the histogram, the scale of a storage circuit of the histogram is effectively reduced, and the storage space is saved.

Description

Memory-saving histogram construction method and device and laser ranging chip
Technical Field
The invention relates to the technical field of distance detection, in particular to a method and a device for constructing a histogram and a laser ranging chip, which can save memory.
Background
A distance detection technique based on a time of flight (TOF) method measures the distance of a target object by actively illuminating the target object using a modulated light source (e.g., a laser), and then capturing the reflected light with a sensor sensitive to the laser wavelength. The distance measuring technology is widely applied to the industries of robots, consumer electronics, self-energy security and monitoring, industry 4.0, automobiles and the like.
At present, the distance measurement based on flight time is to find time distance information corresponding to a histogram peak value through histogram statistics as a final measured distance. However, the histogram statistics of macro-pixels composed of each pixel or a plurality of pixels is performed, which may cause the scale of the storage circuit for histogram statistics to be too large and the power consumption to be large. Furthermore, as the requirements for resolution and power consumption of the distance sensor are increased in the future, the statistical storage of the histogram becomes a bottleneck.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, an object of the present invention is to provide a method and an apparatus for constructing a histogram, which can save memory, and a laser ranging chip, so as to save the statistical storage space of the histogram.
In order to achieve the purpose, the invention adopts the following technical scheme:
the first aspect of the present invention provides a memory-saving histogram constructing method, which includes the following steps:
selecting TDC photon trigger data of N channels as data to be encoded of 1 macro-pixel, wherein each channel corresponds to at least one pixel unit, and each macro-pixel corresponds to a storage space;
the TDC photon trigger data of N channels are encoded and then stored in storage spaces corresponding to TDC address data, the storage spaces are used for storing encoded data corresponding to macro pixels, a plurality of storage addresses of each storage space are represented by time boxes, and the data stored by each time box address is the sum of the encoded TDC photon trigger data of N channels;
decoding the encoded data in the storage space to obtain accumulated TDC photon trigger data of each channel;
and constructing a histogram of each channel according to the accumulated TDC photon trigger data of each channel.
In one embodiment, the storing TDC photon trigger data of N channels into corresponding storage spaces after being encoded includes:
distributing corresponding pseudo-random codes for N channels in the macro-pixel, wherein the self-correlation and the cross-correlation of each pseudo-random code are strong;
and after the TDC photon trigger data of the corresponding channel is coded according to each pseudo-random code, storing the TDC photon trigger data into a storage space corresponding to the TDC address data.
In an embodiment, the encoding the TDC photon trigger data of the corresponding channel according to each pseudo-random code, and then storing the TDC photon trigger data into the storage space corresponding to the TDC address data specifically includes:
determining TDC photon trigger data of N channels, namely TDC address data which needs to be stored respectively, namely time box addresses;
and accumulating the pseudo-random codes of all channels needing to be stored in the same time box address, and writing the pseudo-random codes into the corresponding time box address in the storage space.
In one embodiment, the pseudo-random code is a Barker code, an M-sequence, a Gold code, or a Hadamard-Walsh sequence.
In one embodiment, all of the macropixels are pseudo-randomly encoded in the same set.
In one embodiment, the decoding the encoded data in the storage space to obtain the accumulated TDC photon trigger data of each channel includes:
constructing a reference histogram;
respectively carrying out coding modulation of N channels on the reference histogram to obtain coding reference histograms of the N channels;
performing correlation operation processing on the encoding reference histograms of the N channels and the encoding data in the storage space respectively;
and filtering the correlation operation results of the N channels to obtain the accumulated TDC photon trigger data of each channel.
In one embodiment, the encoding parameters used in the decoding process for each channel are the same as the encoding parameters used in the encoding process.
A second aspect of the present invention provides a memory-saving histogram constructing apparatus, including:
the N TDCs are used for converting the received reflected light to obtain TDC address data and TDC photon trigger data;
the TDC reading circuits are used for temporarily storing TDC address data of N channels and TDC photon trigger data, and the TDC photon trigger data of the N channels are used as data to be encoded of 1 macro pixel;
1 pseudo-random generator for generating pseudo-random codes;
the N encoders are used for encoding TDC photon trigger data of the N channels according to pseudo-random encoding to obtain encoded data of the N channels;
and the 1 memory is used for finding the time box address required to be stored in the memory according to the TDC address data and then accumulating and storing the coded data of each channel.
In one embodiment, every N TDCs constitutes 1 macropixel, and the apparatus further comprises at least 2 macropixels, all macropixels encoded with the same set of pseudo-random codes.
In one embodiment, the apparatus further comprises: a controller for constructing a reference histogram; respectively carrying out coding modulation of N channels on the reference histogram to obtain coding reference histograms of the N channels; performing correlation operation processing on the encoding reference histograms of the N channels and the encoding data in the storage space respectively; and filtering the correlation operation results of the N channels to obtain the accumulated TDC photon trigger data of each channel.
A third aspect of the present invention provides a laser ranging chip, which includes the above histogram constructing apparatus for saving memory.
The invention has the beneficial effects that: the histogram construction method and device for saving the memory and the laser ranging chip are provided, TDC photon trigger data of N channels are used for constructing data to be encoded of macro pixels, the data are encoded and stored, and then the data are decoded to construct a histogram, so that the scale of a storage circuit of the histogram is effectively reduced, and the storage space is saved.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flowchart of a method for constructing a histogram for saving memory according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating the encoding and storing of TDC photon trigger data according to an embodiment of the present invention;
FIG. 3 is a block diagram of an exemplary pixel array in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of histogram coding accumulation according to an embodiment of the present invention;
FIG. 5 is a decoding schematic diagram according to an embodiment of the present invention;
fig. 6 is a block diagram of a memory-saving histogram constructing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the embodiments of the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that when an element is referred to as being "secured to" or "disposed on" another element, it can be directly on the other element or be 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 be indirectly connected to the other element. The connection may be for fixation or for circuit connection.
It is to be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like are used in an orientation or positional relationship indicated in the drawings for convenience in describing the embodiments of the present invention and to simplify the description, and are not intended to indicate or imply that the referenced device or element must have a particular orientation, be constructed in a particular orientation, and be in any way limiting of the present invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present invention, "a plurality" means two or more unless specifically limited otherwise.
The histogram construction method for saving the memory provided by the embodiment of the invention is applied to a distance detection system based on a time of flight (TOF) method, the distance detection system at least comprises a control module transmitting module and a receiving module, the control module is respectively connected with the transmitting module and the receiving module, wherein the transmitting module is used for transmitting a detection light beam to a target object, and at least part of the detection light beam can be reflected by the target object to form reflected light; the receiving module comprises a pixel array consisting of a plurality of pixels and is used for receiving the reflected light reflected by the target object; the control module is used for synchronously controlling the emission and the reception of light, carrying out histogram statistics on photons received by the receiving module by distinguishing time bins (time bins), and then calculating the flight time of the photons through the photon histograms so as to measure the distance of a target object.
Specifically, the emitting module includes a driver, a light source and the like, the light source may be a Light Emitting Diode (LED), a Laser Diode (LD), an Edge Emitting Laser (EEL), a Vertical Cavity Surface Emitting Laser (VCSEL) and the like, the light source emits a probe beam outwards under the driving control of the driver, the probe beam may be visible light, infrared light, ultraviolet light and the like, at least a part of the probe beam is emitted toward the target object, and the reflected light generated by the reflection of at least a part of the probe beam by the target object is received by the receiving module.
The receiving module includes a pixel array, which may be one or more combinations of lenses, microlens arrays, mirrors, etc., and receiving optics, etc., by which the reflected light is received and directed onto the pixel array, the pixel array including a plurality of photon-collecting pixels, and in one embodiment the pixel array is comprised of a plurality of single photon avalanche photodiodes (SPADs) that are responsive to incident single photons and output photon signals indicative of respective times of arrival of the received photons at each SPAD, although in other embodiments, photoelectric conversion devices such as avalanche photodiodes, photomultipliers, silicon photomultipliers, etc., may also be employed.
At present, in the distance measurement of the direct-Time of Flight (d-TOF), a control module is usually used to distinguish photons received by a pixel array according to a Time bin in which the photons fall, so as to perform histogram statistics.
As shown in fig. 1, fig. 1 is a flowchart of a memory-saving histogram constructing method according to an embodiment of the present invention, where the method specifically includes the following steps:
s101, selecting TDC photon trigger data of N channels as data to be encoded of 1 macro-pixel, wherein each channel corresponds to at least one pixel unit, and each macro-pixel corresponds to a storage space.
The method comprises the steps that laser pulses are emitted to a target object, the laser pulses are reflected back through the target object, at least part of reflected light is received by pixel units in a pixel array, each pixel unit is converted into distance information data, namely TDC photon trigger data, through a time-to-digital converter (TDC) after receiving photons, the TDC is a device for realizing time-to-digital signal conversion, the circuit structure can accurately measure the time interval between a start pulse signal and a stop pulse signal, and the TDC photon trigger data obtained through conversion can record the flight time of the optical signals received each time, namely the time interval between the emitted pulses and the received pulses.
In specific implementation, each pixel unit may be connected to one TDC as one data channel, that is, each channel corresponds to one pixel unit, or a plurality of pixel units may be connected to one TDC as one data channel, and each channel corresponds to a plurality of pixel units, which may be specifically adjusted according to hardware resources, response speed requirements, and the like.
When the histogram is constructed, pixel units contained in N channels are divided into 1 macro-pixel, each macro-pixel is correspondingly provided with an independent storage space, TDC photon trigger data of the N channels are used as data to be encoded of the 1 macro-pixel, namely, the macro-pixel is used as a unit, the data to be encoded based on the macro-pixel is subjected to subsequent histogram encoding construction, histogram statistics does not need to be carried out on the TDC photon trigger data of each channel, and the effect of compression storage is achieved.
S102, TDC photon trigger data of N channels are stored into storage spaces corresponding to TDC address data after being coded, the storage spaces are used for storing coded data corresponding to macro pixels, a plurality of storage addresses of each storage space are represented by time boxes, and the data stored by the address of each time box is the sum of the TDC photon trigger data of the N channels after being coded.
After TDC photon trigger data of corresponding N channels are acquired by taking a macro-pixel as a unit, the TDC photon trigger data are encoded and stored in a preset storage space, the storage space of each macro-pixel is independent, so as to distinguish the encoded data of different macro-pixels, and each storage space comprises a plurality of storage addresses represented by time bins (time bins), illustratively, when the storage space is divided into 512 storage addresses, each time bin address can be represented by bin0-bin511, each TDC outputs TDC address data (i.e. the value of bin) and photon trigger data in real time, and the data stored by each time bin address is the sum of the TDC photon trigger data of the N channels after being encoded, for example: when the address data output by the first TDC is bin0 and the TDC photon trigger data is high, i.e. active, the data stored in bin0 is original data + a 0; when the address data output by the fifth TDC is bin0 and the TDC photon trigger data is high, i.e., active, the data stored in bin0 is the original data + a0+ a4, a0 corresponds to the random code of the first TDC, and a4 corresponds to the random code of the fifth TDC. Each time TDC photon trigger data is high level, i.e. valid, the step of adding a random code is performed once for the data stored by each corresponding bin, except that different TDCs correspond to different random codes. The TDC photon trigger data of the N channels are encoded and stored in the time box address of the corresponding storage space, so that the histogram of the N channels can be encoded, compressed and stored when the single-frame measurement time is over, the storage space is greatly saved, and the storage speed is improved.
S103, decoding the coded data in the storage space to obtain the accumulated TDC photon trigger data of each channel.
The hardware circuit sends out the compressed coded data in the storage space after finishing the data coding, the controller decodes the received coded data in each storage space, accumulated data of histograms corresponding to N channels are stored in time box addresses of each storage space after accumulation of measurement time, therefore, accumulated TDC photon trigger data of each channel can be obtained after decoding and restoring, and the principle similar to the coding process is adopted during decoding to ensure the accuracy of data restoring.
And S104, constructing a histogram of each channel according to the accumulated TDC photon trigger data of each channel.
The time box corresponding to the flight time of the photons received by each channel in an accumulated manner can be obtained after the accumulated TDC photon trigger data of each channel is obtained, so that the histogram statistics of the time box is carried out on the accumulated TDC photon trigger data of each channel, the histogram of each channel is further constructed, and the accurate histogram reduction construction is realized.
In one embodiment, step S102 includes:
distributing corresponding pseudo-random codes for N channels in the macro-pixel, wherein the self-correlation and the cross-correlation of each pseudo-random code are strong;
and after the TDC photon trigger data of the corresponding channel is coded according to each pseudo-random code, storing the TDC photon trigger data into a storage space corresponding to the TDC address data.
In this embodiment, when encoding data to be encoded of a macro-pixel, a pseudo-random encoding manner is adopted, as shown in fig. 2, each channel includes a pixel unit, when encoding and storing data to be encoded of a macro-pixel, each pixel unit receives photons and obtains TDC photon trigger data and TDC address data through TDC conversion, then encoding is performed through pseudo-random codes allocated to each channel one by one in advance, that is, N channels have respective pseudo-random codes, and each pseudo-random code has strong autocorrelation and weak cross-correlation, so that TDC photon trigger data of different channels do not interfere with each other after being encoded, thereby improving the anti-interference of encoded data and the reliability of subsequent decoding, TDC photon trigger data of corresponding channels are encoded according to each pseudo-random code and then stored in a storage space corresponding to TDC address data, the TDC photon trigger data of the N channels are compressed and stored, and further storage space is saved.
In specific implementation, since the pixel array may include a plurality of macro pixels, in order to save the storage space as much as possible, all the macro pixels are encoded by using the same set of pseudo-random codes, and the physical coordinates of each TDC channel and the corresponding relationship between the physical coordinates and the pseudo-random codes are stored during encoding and storage, thereby ensuring the accuracy during subsequent decoding.
Illustratively, as shown in fig. 3, the size of the pixel array 301 is 9 × 9, that is, 81 pixel units 303 are included, each pixel unit 303 is used as a channel, when performing region division, 9 pixel units 303 are divided into 1 macro-pixel 302, each macro-pixel 301 shares a set of pseudo-random codes, that is, the pixel units 303 with physical coordinates of 0, 9, 18, 27, 36, 45, 54, 63, 72 correspond to the same pseudo-random code, similarly, the pseudo-random codes of the pixel units 302 with the same physical location in each macro-pixel 303 are the same, if different macro-pixels do not share the same set of pseudo-random codes, a huge number of pseudo-random codes are required, and because the storage spaces of the macro-pixels are independent, the coded data of different macro-pixels can be distinguished, and the physical coordinates of the TDC channel and the corresponding relationship between the physical coordinates and the pseudo-random codes are also stored when storing, therefore, the histogram corresponding to the pixel unit at each specific position in each macro pixel can be obtained through decoding, so that the accurate compression storage and decoding construction process of the histogram is ensured, and meanwhile, the use amount and the occupied space of pseudo-random coding are greatly saved.
In one embodiment, after encoding the TDC photon trigger data of the corresponding channel according to each pseudorandom encoding, storing the TDC photon trigger data in a storage space corresponding to the TDC address data includes:
determining TDC photon trigger data of N channels, namely TDC address data which needs to be stored respectively, namely time box addresses;
and accumulating the pseudo-random codes of all channels needing to be stored in the same time box address, and writing the pseudo-random codes into the corresponding time box address in the storage space.
In this embodiment, when TDC photon trigger data of N channels are encoded and stored, the TDC outputs TDC photon trigger data of each channel in real time according to the photon response of the pixel unit in each channel and calculates and determines which time box (time bin) the flight time of the received photon falls specifically, thereby obtaining TDC address data representing the time box address bin value, accumulating the pseudorandom code that needs to be stored in the same time bin, and storing the pseudorandom code into the address corresponding to the time bin in the storage space. In order to increase the storage speed, a dual-port memory (write address and read address are separated) can be used, so that reading and writing can be performed simultaneously in the same beat, for example, data at bin0 address is read first, the read data and the received data to be stored at bin0 address are added, and then the data are written back to bin0 address, while writing, data at bin1 address can be read, so that running water is formed sequentially, N channels can accumulate histograms together in a coding accumulation mode and store the histograms into a storage space, which is equivalent to that the N histograms are stored by coding compression, thereby greatly saving the storage space and increasing the storage speed. As shown in fig. 4, the corresponding formula of the encoding process is as follows:
H(bin)=A0*H0(bin)+A1*H1(bin)+…+An*Hn(bin)
wherein A0-An is respectively pseudo-random code of N channels, H0(bin)-Hn(bin) is histogram corresponding to N channels, h (bin) is histogram after compression, thereby realizing compression of histogram of each channel, that is, when encoding and storing, it is different from the existing statistics of adding "1", the present embodiment performs accumulation statistics based on pseudo-random coding of each channel, for example, taking the example that the macro-pixel in fig. 3 includes 9 channels, assuming that TDC photon trigger data of a certain 9 channels all fall into bin5 after calculation, that is, all are stored on the bin5 address, the accumulated value of photon trigger data stored in bin5 address, that is, count value count is original number + a0+ a1+ … A8 of the bin5 address, a0-A8 are pseudo-random coding of 9 channels, repeating the above process every time of encoding and storing, after the accumulation of measurement time, the original 9 histograms are compressed and stored in a storage space, the cost and the power consumption of a storage circuit are effectively saved, the detection system with more pixel units is favorably realized, and the detection resolution is improved.
In one embodiment, step S103 includes:
constructing a reference histogram;
respectively carrying out coding modulation of N channels on the reference histogram to obtain coding reference histograms of the N channels;
performing correlation operation processing on the encoding reference histograms of the N channels and the encoding data in the storage space respectively;
and filtering the correlation operation results of the N channels to obtain the accumulated TDC photon trigger data of each channel.
In this embodiment, after receiving the compressed histogram (i.e. the encoded data of each macro-pixel) sent by the hardware circuit,the decoding is needed to obtain the histogram data of each channel, as shown in fig. 5, a reference histogram Hn conforming to the shape of the emitted laser pulse is first constructed in the decoding process, and the reference histogram is subjected to coding modulation of N channels by a multiplier 501, specifically, the coding parameters adopted in the decoding process of each channel are the same as the coding parameters adopted in the coding process, that is, each channel adopts pseudorandom coding when the coding is stored, and the reference histogram also adopts the same pseudorandom coding when the decoding is performed, so as to ensure the accuracy of the decoding process. For example, the pseudo-random code of channel 0 is A0, the reference histogram Hn results in the code modulation of channel 0 to obtain the code reference histogram A of channel 00_Hn(bin), the coded reference histograms of the N channels can be obtained by this analogy, and then the coded reference histograms of the N channels are respectively correlated with the coded data in the storage space by the multiplier 502, where the correlation may be an integral obtained by multiplying two signals or a mathematical mean obtained by multiplying the two signals, and the specific formula of the correlation is as follows, taking channel 0 as an example:
A0_Hn(bin)*H(bin)=A0_Hn(bin)*A0*H0(bin)+A1_Hn(bin)*A1*H1(bin)+…+An_Hn(bin)*An*Hn(bin)
due to the characteristic of pseudo-random coding, strong autocorrelation exists between pseudo-random codes of all channels, so that the coded reference histogram A modulated by the pseudo-random code A00_Hn(bin) and coded histogram A0*H0(bin) is very close, the histogram corresponding to the channel 0 is effectively amplified, namely the histogram of each channel in the coded data is amplified through the coded reference histogram, and the coded reference histogram A modulated by the pseudo-random code A0 is also subjected to weak cross correlation among pseudo-random codes of each channel0_HnThe (bin) is uncorrelated with the coded histograms corresponding to other channels, so the histograms corresponding to other channels in the coded data are weakened after correlation operation processing, no excessive interference is caused to the histogram of the channel 0, and finally the A is obtained after filtering by the filter 5030_Hn(bin)*A0*H0(bin), histogram data H corresponding to recoverable channel 00(bin), complete the decoding of the 1 st pixel cell, A0_Hn(bin)*A0*H0(bin) phase ratio H0The amplitude of the peak value of (bin) is changed, but the bin corresponding to the peak value is not changed, i.e. the flight time is not changed, so that the accuracy of distance detection is not influenced in the encoding and decoding process.
If the histogram is not compressed by pseudo-random coding, each pixel unit corresponds to a histogram containing 512 time bins, and every N histograms can be compressed and stored together by pseudo-random coding. For example, 7200 pixel units and 512 time bins are provided, the bit width of the stored data is 10 bits, and the total required storage space is as follows without using the pseudo-random compression method: 7200 × 512 × 10bit ═ 36 Mbit; in the prior art, each time a photon trigger signal is received, the count number stored by the corresponding bin is added by 1 once, so that the count data is small and can be expressed by the storage bit width of 10 bits; in the application, each time a photon trigger signal is received, the count number stored by the corresponding bin executes an Ai adding operation once, and Ai is a0+ a1+ ·+ a9, so that the count data is large, and the storage bit width of 10 bits is far insufficient; if the storage histogram is compressed by adopting a pseudo-random coding mode, assuming that the bit width of the storage data is increased to 18 bits, and taking the example that every 9 pixel units form a macro pixel, the common required storage space is as follows: 7200 × 512 × 18/9bit is 7.4Mbit, it can be seen that the storage space can be greatly saved by adopting the pseudo-random coding compression storage mode in this embodiment. Although some bit width is sacrificed, the total memory space is reduced a lot.
It should be noted that, a certain order does not necessarily exist between the above steps, and those skilled in the art can understand, according to the description of the embodiments of the present invention, that in different embodiments, the above steps may have different execution orders, that is, may be executed in parallel, may also be executed interchangeably, and the like.
Fig. 6 is a structural diagram of the memory-saving histogram constructing apparatus according to an embodiment of the present invention, where the apparatus includes N TDCs 601, N TDC readout circuits 602, 1 pseudo-random generator 603, N encoders 604, and a memory 605, where the N TDCs 601 are respectively connected to the N pixel units in a one-to-one correspondence manner, each TDC601 is sequentially connected to one TDC readout circuit 602 and one encoder 604, the pseudo-random generator 603 is connected to the N encoders 604, and the N encoders 604 are connected to the memory 605.
Specifically, the N TDCs 601 are configured to perform conversion processing on the received reflected light to obtain TDC address data and TDC photon trigger data; the N TDC readout circuits 602 are configured to temporarily store TDC address data of N channels and TDC photon trigger data, where the TDC photon trigger data of the N channels is used as data to be encoded of 1 macro pixel; the pseudo-random generator 603 is used for generating pseudo-random codes; the N encoders 604 are configured to encode the TDC photon trigger data of the N channels according to the pseudorandom encoding to obtain encoded data of the N channels; the memory 605 is used for finding the address of the time box required to be stored in the memory according to the TDC address data, and then accumulating and storing the encoded data of each channel.
In this embodiment, after receiving photons, the pixel units in the N channels convert the reflected light received by the N pixel units through the N TDCs 601, output TDC address data (i.e. bin value) and TDC photon trigger data in real time, then temporarily store the TDC address data of the N channels and the TDC photon trigger data through the N TDC readout circuits 602, take the TDC photon trigger data of the N channels as 1 macro-pixel data to be encoded and output to the corresponding encoder 604, generate corresponding pseudo-random codes for the N channels through the pseudo-random generator 603, encode the TDC photon trigger data of the N channels according to the pseudo-random codes through the encoder 603, and since the TDC address data can confirm the time box addresses to be stored corresponding to the flight times of the photons received by the channels, find the time box addresses to be stored in the memory 605 according to the TDC address data, and then accumulating and storing the coded data of each channel, thereby realizing the coding compression storage of the histogram data. The specific encoding process may refer to the corresponding method embodiments described above.
In one embodiment, every N TDCs constitutes 1 macropixel, and the apparatus further comprises at least 2 macropixels, all macropixels encoded with the same set of pseudo-random codes.
In this embodiment, the apparatus may include 2 or more than 2 macro-pixels to achieve higher resolution range detection, and in order to save the storage space as much as possible, all the macro-pixels use the same set of pseudo-random codes, which may specifically refer to the corresponding method embodiments described above.
In one embodiment, the apparatus includes a controller for constructing a reference histogram; respectively carrying out coding modulation of N channels on the reference histogram to obtain coding reference histograms of the N channels; performing correlation operation processing on the encoding reference histograms of the N channels and the encoding data in the storage space respectively; and filtering the correlation operation results of the N channels to obtain the accumulated TDC photon trigger data of each channel, wherein the specific decoding operation process can control the corresponding method embodiment.
The present invention also provides a histogram constructing apparatus including the above histogram constructing apparatus for saving memory, which has been described above and will not be described herein again.
In summary, the present invention provides a method and an apparatus for constructing a histogram for saving memory, and a laser ranging chip, wherein the method includes: selecting TDC photon trigger data of N channels as data to be encoded of 1 macro-pixel, wherein each channel corresponds to at least one pixel unit, and each macro-pixel corresponds to a storage space; the TDC photon trigger data of N channels are encoded and then stored in storage spaces corresponding to TDC address data, the storage spaces are used for storing encoded data corresponding to macro pixels, a plurality of storage addresses of each storage space are represented by time boxes, and the data stored by each time box address is the sum of the encoded TDC photon trigger data of N channels; decoding the encoded data in the storage space to obtain accumulated TDC photon trigger data of each channel; and constructing a histogram of each channel according to the accumulated TDC photon trigger data of each channel. TDC photon trigger data of N channels are used for constructing to-be-encoded data of macro pixels, the to-be-encoded data are encoded and stored, and then the to-be-encoded data are decoded to construct a histogram, so that the scale of a storage circuit of the histogram is effectively reduced, and the storage space is saved.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several equivalent substitutions or obvious modifications can be made without departing from the spirit of the invention, and all the properties or uses are considered to be within the scope of the invention.

Claims (11)

1. A method for constructing a histogram for saving memory is characterized by comprising the following steps:
selecting TDC photon trigger data of N channels as data to be encoded of 1 macro-pixel, wherein each channel corresponds to at least one pixel unit, and each macro-pixel corresponds to a storage space;
the TDC photon trigger data of N channels are encoded and then stored in storage spaces corresponding to TDC address data, the storage spaces are used for storing encoded data corresponding to macro pixels, a plurality of storage addresses of each storage space are represented by time boxes, and the data stored by each time box address is the sum of the encoded TDC photon trigger data of N channels;
decoding the encoded data in the storage space to obtain accumulated TDC photon trigger data of each channel;
and constructing a histogram of each channel according to the accumulated TDC photon trigger data of each channel.
2. The memory-saving histogram construction method of claim 1, wherein the encoding the TDC photon trigger data of N channels and storing the encoded TDC photon trigger data into corresponding storage spaces comprises:
distributing corresponding pseudo-random codes for N channels in the macro-pixel, wherein the self-correlation and the cross-correlation of each pseudo-random code are strong;
and after the TDC photon trigger data of the corresponding channel is coded according to each pseudo-random code, storing the TDC photon trigger data into a storage space corresponding to the TDC address data.
3. The memory-saving histogram construction method according to claim 2, wherein the encoding TDC photon trigger data of the corresponding channel according to each pseudorandom code is stored in a storage space corresponding to TDC address data, specifically comprising:
determining TDC photon trigger data of N channels, namely TDC address data which needs to be stored respectively, namely time box addresses;
and accumulating the pseudo-random codes of all channels needing to be stored in the same time box address, and writing the pseudo-random codes into the corresponding time box address in the storage space.
4. A memory-efficient histogram construction method according to claim 2 or 3, characterized in that said pseudo-random code is a Barker code, an M-sequence, a Gold code or a Hadamard-Walsh sequence.
5. A memory-efficient histogram construction method according to claim 2 or 3, characterized in that all macro-pixels are pseudo-randomly encoded in the same group.
6. The memory-saving histogram construction method of claim 1, wherein the decoding the encoded data in the storage space to obtain the accumulated TDC photon trigger data for each channel comprises:
constructing a reference histogram;
respectively carrying out coding modulation of N channels on the reference histogram to obtain coding reference histograms of the N channels;
performing correlation operation processing on the encoding reference histograms of the N channels and the encoding data in the storage space respectively;
and filtering the correlation operation results of the N channels to obtain the accumulated TDC photon trigger data of each channel.
7. The memory-efficient histogram construction method of claim 6, wherein the encoding parameters used in the decoding process for each channel are the same as the encoding parameters used in the encoding process.
8. A memory-efficient histogram construction apparatus, comprising:
the N TDCs are used for converting the received reflected light to obtain TDC address data and TDC photon trigger data;
the TDC readout circuits are used for temporarily storing TDC address data of N channels and TDC photon trigger data, and the TDC photon trigger data of the N channels are used as data to be encoded of 1 macro pixel;
1 pseudo-random generator for generating pseudo-random codes;
the N encoders are used for encoding TDC photon trigger data of the N channels according to pseudo-random encoding to obtain encoded data of the N channels;
and the 1 memory is used for finding the time box address required to be stored in the memory according to the TDC address data and then accumulating and storing the coded data of each channel.
9. The memory-efficient histogram construction apparatus of claim 8, wherein every N TDCs constitutes 1 macropixel, said apparatus further comprises at least 2 macropixels, and all macropixels are encoded in the same pseudo-random set.
10. The memory-efficient histogram construction apparatus of claim 8, further comprising: a controller for constructing a reference histogram; respectively carrying out coding modulation of N channels on the reference histogram to obtain coding reference histograms of the N channels; respectively carrying out correlation operation processing on the coding reference histograms of the N channels and the coding data in the storage space; and filtering the correlation operation results of the N channels to obtain the accumulated TDC photon trigger data of each channel.
11. A laser ranging chip comprising the memory-saving histogram constructing apparatus of claim 8.
CN202111682038.8A 2021-12-31 2021-12-31 Histogram construction method and device based on distance detection of flight time and laser ranging chip Active CN114494086B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111682038.8A CN114494086B (en) 2021-12-31 2021-12-31 Histogram construction method and device based on distance detection of flight time and laser ranging chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111682038.8A CN114494086B (en) 2021-12-31 2021-12-31 Histogram construction method and device based on distance detection of flight time and laser ranging chip

Publications (2)

Publication Number Publication Date
CN114494086A true CN114494086A (en) 2022-05-13
CN114494086B CN114494086B (en) 2024-06-28

Family

ID=81510023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111682038.8A Active CN114494086B (en) 2021-12-31 2021-12-31 Histogram construction method and device based on distance detection of flight time and laser ranging chip

Country Status (1)

Country Link
CN (1) CN114494086B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200264285A1 (en) * 2019-02-15 2020-08-20 Sony Semiconductor Solutions Corporation Time-of-flight apparatus and method
CN112037295A (en) * 2020-09-04 2020-12-04 上海数迹智能科技有限公司 Event type ToF camera encoding and decoding method, device, medium and equipment
CN112596068A (en) * 2020-10-28 2021-04-02 深圳奥锐达科技有限公司 Collector, distance measurement system and electronic equipment
CN113472356A (en) * 2020-03-30 2021-10-01 意法半导体(R&D)有限公司 Latched Gray code for TOF applications
CN113820725A (en) * 2021-10-19 2021-12-21 深圳奥锐达科技有限公司 System and method for performing time-of-flight measurement and electronic device
CN113820724A (en) * 2021-10-19 2021-12-21 深圳奥锐达科技有限公司 Off-axis measurement system and method for executing flight time

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200264285A1 (en) * 2019-02-15 2020-08-20 Sony Semiconductor Solutions Corporation Time-of-flight apparatus and method
CN113472356A (en) * 2020-03-30 2021-10-01 意法半导体(R&D)有限公司 Latched Gray code for TOF applications
CN112037295A (en) * 2020-09-04 2020-12-04 上海数迹智能科技有限公司 Event type ToF camera encoding and decoding method, device, medium and equipment
CN112596068A (en) * 2020-10-28 2021-04-02 深圳奥锐达科技有限公司 Collector, distance measurement system and electronic equipment
CN113820725A (en) * 2021-10-19 2021-12-21 深圳奥锐达科技有限公司 System and method for performing time-of-flight measurement and electronic device
CN113820724A (en) * 2021-10-19 2021-12-21 深圳奥锐达科技有限公司 Off-axis measurement system and method for executing flight time

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHAO ZHANG, NING ZHANG等: "A 240×160 3D-Stacked SPAD dToF Image Sensor With Rolling Shutter and In-Pixel Histogram for Mobile Devices", IEEE OPEN JOURNAL OF THE SOILD-STATE CIRCUITS SOCIETY, 8 October 2021 (2021-10-08) *
戴庆达;叶茂;: "基于FPGA的高精度时间数字转换电路设计", 北京邮电大学学报, no. 04, 20 August 2020 (2020-08-20) *

Also Published As

Publication number Publication date
CN114494086B (en) 2024-06-28

Similar Documents

Publication Publication Date Title
CN110596721B (en) Flight time distance measuring system and method of double-shared TDC circuit
CN110596722B (en) System and method for measuring flight time distance with adjustable histogram
CN110596725B (en) Time-of-flight measurement method and system based on interpolation
CN110596724B (en) Method and system for measuring flight time distance during dynamic histogram drawing
CN110632578B (en) System and method for time-encoded time-of-flight distance measurement
CN110596723B (en) Dynamic histogram drawing flight time distance measuring method and measuring system
CN110609291B (en) System and method for time-coded time-of-flight distance measurement
CN111965658B (en) Distance measurement system, method and computer readable storage medium
CN111487638B (en) Distance measurement system and method based on time delay
CN110687541A (en) Distance measuring system and method
CN110568422B (en) SiPM receiver, dynamic threshold value adjusting method of laser radar and laser radar
CN110632576B (en) Time coding demodulation processing circuit and method
US20210181316A1 (en) Time-of-flight-based distance measurement system and method
CN101449181A (en) Distance measuring method and distance measuring element for detecting the spatial dimension of a target
US20220099801A1 (en) Lidar systems with shared memory and methods thereof
WO2022206031A1 (en) Method for determining noise level, lidar, and ranging method
JP2022532014A (en) Systems and methods for vibration imaging and sensing
CN111965659B (en) Distance measurement system, method and computer readable storage medium
CN114488175A (en) Histogram construction method for improving signal-to-noise ratio and laser ranging chip
US5608664A (en) Method for correlating image data of a range-finder
CN114355313A (en) Distance measurement using optical time-of-flight method
CN114494086B (en) Histogram construction method and device based on distance detection of flight time and laser ranging chip
CN112987023A (en) Optical sensing device, measuring method thereof and electronic device
CN113009498A (en) Distance measuring method, device and system
CN114526762B (en) Optical fiber sensor system and addressing method of optical fiber sensor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant