CN112099051A - TOF ranging method, TOF sensing module, electronic equipment and storage medium - Google Patents

TOF ranging method, TOF sensing module, electronic equipment and storage medium Download PDF

Info

Publication number
CN112099051A
CN112099051A CN202010813303.0A CN202010813303A CN112099051A CN 112099051 A CN112099051 A CN 112099051A CN 202010813303 A CN202010813303 A CN 202010813303A CN 112099051 A CN112099051 A CN 112099051A
Authority
CN
China
Prior art keywords
frequency
ranging
mode
ranging mode
dual
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.)
Withdrawn
Application number
CN202010813303.0A
Other languages
Chinese (zh)
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.)
OFilm Microelectronics Technology Co Ltd
Original Assignee
OFilm Microelectronics 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 OFilm Microelectronics Technology Co Ltd filed Critical OFilm Microelectronics Technology Co Ltd
Priority to CN202010813303.0A priority Critical patent/CN112099051A/en
Publication of CN112099051A publication Critical patent/CN112099051A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • 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/88Lidar systems specially adapted for specific applications
    • G01S17/89Lidar systems specially adapted for specific applications for mapping or imaging
    • G01S17/8943D imaging with simultaneous measurement of time-of-flight at a 2D array of receiver pixels, e.g. time-of-flight cameras or flash lidar
    • 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
    • G01S17/10Systems determining position data of a target for measuring distance only using transmission of interrupted, pulse-modulated waves
    • 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
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/02Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S13/00
    • G01S7/35Details of non-pulse systems
    • G01S7/352Receivers

Landscapes

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

Abstract

The invention discloses a TOF (time of flight) ranging method, a TOF sensing module, electronic equipment and a storage medium, wherein the TOF ranging method is used for the TOF sensing module and comprises the following steps: acquiring a current test distance; determining an ideal ranging mode according to the current test distance, wherein the ideal ranging mode comprises a double-frequency ranging mode and a single-frequency ranging mode; and operating the ideal ranging mode. The method can be flexibly applied to single-frequency ranging and double-frequency ranging, and the short-distance measurement speed is improved.

Description

TOF ranging method, TOF sensing module, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of camera modules, in particular to a TOF ranging method, a non-temporary computer storage medium, a TOF sensing module and electronic equipment.
Background
A three-dimensional camera based on a Time-Of-Flight (TOF) theory is one Of research hotspots in the current technology, and the TOF three-dimensional camera can simultaneously acquire a grayscale image and a distance image, and has gradually appeared in the system fields Of gesture control, 3D modeling, automobile radar, robot vision, and the like.
In the related art, the TOF ranging range and the ranging accuracy vary with the modulation frequency, and the higher the modulation frequency is, the higher the ranging accuracy is, but the smaller the ranging range is. In order to solve the contradiction between the measurement precision and the ranging range, a dual-frequency ranging scheme is generally adopted, namely, two modulation frequencies are utilized to carry out TOF ranging respectively, so that the ranging range can be enlarged, and the ranging precision can be ensured to be consistent with the highest modulation frequency. However, the dual-frequency scheme uses two frequencies for TOF ranging, which is more computationally intensive than the single-frequency scheme, and is also more susceptible to motion blur and the like. Moreover, in the prior art, a single frequency and a dual frequency cannot be used simultaneously, and if switching is required, software or hardware is restarted to achieve the switching effect, but the use method is single due to non-switching, and a switching system needs system restarting to influence the operation of other applications.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, an object of the present invention is to provide a TOF ranging method, which can flexibly apply single-frequency ranging and dual-frequency ranging to improve the short-distance measurement speed.
It is a further object of the present invention to provide a non-transitory computer storage medium.
The invention also provides a TOF sensing module.
The fourth objective of the present invention is to provide an electronic device.
In order to solve the above problem, an embodiment of the first aspect of the present invention provides a TOF ranging method for a TOF sensing module, where the TOF ranging method includes: acquiring a current test distance; determining an ideal ranging mode according to the current test distance, wherein the ideal ranging mode comprises a double-frequency ranging mode and a single-frequency ranging mode; and operating the ideal ranging mode.
According to the TOF ranging method provided by the embodiment of the invention, the current test distance is obtained, the ideal ranging mode is determined according to the current test distance, and the ideal ranging mode is operated, so that the single-frequency ranging mode can be used for ranging in a short distance condition, and the double-frequency ranging mode can be used for ranging in a long distance condition.
In some embodiments, the obtaining the current test distance comprises: acquiring a test distance as the current test distance in the dual-frequency ranging mode; or, in the single-frequency ranging mode, switching to the dual-frequency ranging mode at preset intervals, and operating the dual-frequency ranging mode to obtain the current test distance. The double-frequency detection mode can be started at regular time under the single-frequency ranging mode to detect whether the current test distance exceeds the working range of the single-frequency ranging mode or not, so that the mode which is more in line with the ranging requirement is switched in time.
In some embodiments, said determining an ideal ranging pattern from said current test distance comprises: determining that the ideal ranging mode is the single-frequency ranging mode when the current testing distance is smaller than a first distance threshold; or, the current ranging distance is greater than or equal to a first distance threshold, and the ideal ranging mode is determined to be the dual-frequency ranging mode. Adopt single-frequency range finding mode under the closely condition promptly, compare in the mode that adopts dual-frenquency range finding among the prior art, can reduce the calculated amount of treater, improve closely measuring speed to and adopt dual-frenquency range finding mode under the long-distance condition, can guarantee TOF sensing module's measurement accuracy and range finding scope.
In some embodiments, said operating said ideal ranging mode comprises: the ideal ranging mode is a single-frequency ranging mode; the current operation mode is a single-frequency ranging mode, and then the single-frequency ranging mode is operated, or the current operation mode is a dual-frequency ranging mode, and the dual-frequency ranging mode is switched to the single-frequency ranging mode and operated. The ideal ranging mode of the TOF sensing module is switched through a single instruction, so that single frequency and double frequency can be switched at will without restarting the system, the problem that other application operation is influenced is avoided, and the switching efficiency is improved.
In some embodiments, said operating said ideal ranging mode comprises: the ideal ranging mode is a double-frequency ranging mode; the current operation mode is a single-frequency ranging mode, the single-frequency ranging mode is switched to a double-frequency ranging mode, and the double-frequency ranging mode is operated, or the current operation mode is the double-frequency ranging mode, and the double-frequency ranging mode is operated. The ideal ranging mode of the TOF sensing module is switched through a single instruction, so that single frequency and double frequency can be switched at will without restarting the system, the problem that other application operation is influenced is avoided, and the switching efficiency is improved.
In some embodiments, the TOF sensing module includes a dual-band register, and switching the single-band ranging mode to the dual-band ranging mode includes: reading dual-frequency ranging mode configuration data in the dual-frequency register; and configuring a ranging algorithm according to the dual-frequency ranging mode configuration data to switch to the dual-frequency ranging mode, so as to provide support for the TOF sensing module to run the dual-frequency ranging mode.
In some embodiments, the TOF sensing module includes a dual-frequency register and a single-frequency register, and the switching the dual-frequency ranging mode to the single-frequency ranging mode includes: reading a single-frequency register address stored in the double-frequency register; reading single-frequency ranging mode configuration data in the single-frequency register according to the address of the single-frequency register; and configuring a ranging algorithm according to the single-frequency ranging mode configuration data to switch to the single-frequency ranging mode, so that support is provided for the TOF sensing module to run the single-frequency ranging mode.
A second aspect of the present invention provides a non-transitory computer storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the TOF ranging method according to the above embodiments.
An embodiment of a third aspect of the present invention provides a TOF sensing module, including: a transmitter and a receiver; a single frequency register and a dual frequency register; at least one processor; a memory communicatively coupled to the at least one processor; wherein the memory has stored therein a computer program executable by the at least one processor, the computer program when executed by the at least one processor implementing the TOF ranging method according to the above embodiments.
According to the TOF sensing module provided by the embodiment of the invention, the TOF ranging method provided by the embodiment is executed by the processor, namely, under the condition of short-distance application, a single-frequency ranging mode is used for ranging, and when long-distance application is required, a double-frequency ranging mode is used for ranging, so that the ranging speed under the condition of short distance can be improved, the practicability of a product is improved, and compared with the single mode adopting double-frequency ranging in the prior art, the calculation amount of the processor can be reduced, a larger selection space is provided for the type selection of the processor, the energy consumption can be reduced, and the standby time of the product is prolonged.
A fourth aspect of the present invention provides an electronic device, including: the TOF sensing module of the above embodiment; the image processor is in communication connection with the TOF sensing module; the image processor is used for receiving an original image output by the TOF sensing module, obtaining a pixel height value according to the original image, determining a ranging mode of the TOF sensing module according to the pixel height value, and processing the original image according to the ranging mode of the TOF camera module to obtain a 3D effect image, wherein the ranging mode comprises a double-frequency ranging mode and a single-frequency ranging mode.
According to the electronic equipment provided by the embodiment of the invention, by adopting the TOF sensing module provided by the embodiment, the distance measurement is carried out by using the single-frequency distance measurement mode under the condition of short-distance application, and the distance measurement is carried out by using the double-frequency distance measurement mode when long-distance application is required, so that the distance measurement speed under the condition of short distance can be improved, the practicability of the product is improved, the energy consumption can be reduced, and the standby time of the product is prolonged.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow diagram of a TOF ranging method according to one embodiment of the present disclosure;
FIG. 2 is a flow chart of a TOF ranging method according to another embodiment of the present disclosure;
FIG. 3 is a block diagram of a TOF sensing module according to an embodiment of the present disclosure;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present invention.
Reference numerals:
a TOF sensing module 10; a transmitter 1; a receiver 2; a single frequency register 3; a double-frequency register 4; a processor 5; a memory 6;
an electronic device 20; an image processor 7.
Detailed Description
Embodiments of the present invention will be described in detail below, the embodiments described with reference to the drawings being illustrative, and the embodiments of the present invention will be described in detail below.
The TOF ranging method provided by the embodiment of the first aspect of the invention is described below with reference to the accompanying drawings, and the method can be flexibly applied to single-frequency ranging and dual-frequency ranging, thereby improving the short-distance measurement speed.
In order to solve the above problem, a TOF ranging method provided in an embodiment of the first aspect of the present invention is applied to a TOF sensing module, and as shown in fig. 1, the TOF ranging method in an embodiment of the present invention at least includes steps S1-S3.
And step S1, acquiring the current test distance.
In an embodiment, the transmitter of the TOF sensing module may transmit an optical signal to the target object, and the receiver of the TOF sensing module may receive the optical signal reflected by the target object, and the processor may calculate the distance to the target object according to the time of flight of the optical signal, that is, the current test distance.
And step S2, determining an ideal ranging mode according to the current test distance.
The ideal ranging mode comprises a double-frequency ranging mode and a single-frequency ranging mode.
In the embodiment, the method of the embodiment of the invention flexibly applies a single-frequency ranging method and a double-frequency ranging method, and uses a single-frequency TOF to perform ranging under the condition of only short-distance application, namely the TOF sensing module executes a single-frequency ranging mode, and uses a double-frequency TOF to perform ranging under the condition of long-distance application, namely the TOF sensing module executes a double-frequency ranging mode.
Specifically, the method of the embodiment of the present invention uses the current test distance as a reference, and when the current test distance is within the working distance range of the single frequency ranging mode, the TOF sensing module performs TOF ranging by using the single frequency ranging mode, which is different from the single mode of the dual frequency ranging mode in the prior art, the method of the embodiment of the present invention can flexibly apply two modes of the single frequency ranging and the dual frequency ranging, so that the single frequency ranging mode is used in a short distance situation, thereby reducing the calculation amount of the processor and increasing the short distance measurement speed, or when the current test distance is within the working distance range of the dual frequency ranging mode, the TOF sensing module performs TOF ranging by using the dual frequency ranging mode, i.e. two modulation frequencies are used to perform TOF ranging respectively, thereby increasing the ranging range and ensuring that the ranging accuracy is consistent with the highest modulation frequency, the problem that the measurement precision and the range measurement range are contradictory is solved.
And step S3, operating the ideal distance measuring mode.
In an embodiment, the configuration data in the register may be read by a processor of the TOF sensing module, and the TOF sensing module may be configured according to the configuration data to operate the ideal ranging mode.
According to the TOF ranging method provided by the embodiment of the invention, the current test distance is obtained, the ideal ranging mode is determined according to the current test distance, and the ideal ranging mode is operated, namely the method provided by the embodiment of the invention can be used for ranging by using the single-frequency ranging mode under the short-distance condition and ranging by using the double-frequency ranging mode under the long-distance condition, so that the application of single-frequency ranging and double-frequency ranging is more flexible, and compared with the single mode of double-frequency ranging adopted in the prior art, the method provided by the embodiment of the invention can reduce the calculated amount of a processor and improve the short-distance measurement speed by adopting the single-frequency ranging mode under the short-distance condition.
In some embodiments, the method of the embodiments of the present invention, wherein the obtaining the current test distance includes obtaining the test distance as the current test distance in a dual-band ranging mode; or, in the single-frequency ranging mode, switching to the dual-frequency ranging mode at preset time intervals, and operating the dual-frequency ranging mode to obtain the current test distance. That is, when the single-frequency ranging mode is performed, the dual-frequency detection mode can be started at regular time to detect whether the current test distance exceeds the working range of the single-frequency ranging mode, so that the mode which meets the ranging requirement can be switched in time.
In some embodiments, the determining the ideal ranging mode according to the current test distance in the method according to the embodiments of the present invention may include determining that the ideal ranging mode is a single-frequency ranging mode when the current test distance is less than a first distance threshold, or determining that the ideal ranging mode is a dual-frequency ranging mode when the current ranging distance is greater than or equal to the first distance threshold. Adopt single-frequency range finding mode under the closely condition promptly, compare in the mode that adopts dual-frenquency range finding among the prior art, can reduce the calculated amount of treater, improve closely measuring speed to and adopt dual-frenquency range finding mode under the long-distance condition, also can guarantee TOF sensing module's measurement accuracy and range finding scope, thereby can compromise closely range finding demand and the range finding requirement of nearly distance more in a flexible way.
In some embodiments, the method according to the embodiments of the present invention includes, for operating the ideal ranging mode, when it is determined that the ideal ranging mode is the single-frequency ranging mode, if the current operating mode is the single-frequency ranging mode, continuing to operate the single-frequency ranging mode, or, if the current operating mode is the dual-frequency ranging mode, switching the dual-frequency ranging mode to the single-frequency ranging mode and operating the single-frequency ranging mode. That is, after determining that the ideal ranging mode is the single-frequency ranging mode, if the current operation mode of the TOF sensing module is also the single-frequency ranging mode, the TOF sensing module continues to operate in the single-frequency ranging mode without switching the ranging mode; and if the current operational mode of TOF sensing module is double-frequency ranging mode, find when the current test distance is in the working range of single-frequency ranging mode when double-frequency ranging promptly, then TOF sensing module can directly switch over double-frequency ranging mode to single-frequency ranging mode to carry out distance measurement, switch over the ideal ranging mode of TOF sensing module through single instruction promptly, make single-frequency and double-frequency can switch over wantonly, improve and switch over efficiency, also need not to restart the system, thereby avoid influencing other problems of using the operation.
In some embodiments, the method according to the embodiments of the present invention includes, for the operation of the ideal ranging mode, when the ideal ranging mode is the dual-band ranging mode, switching the single-band ranging mode to the dual-band ranging mode and operating the dual-band ranging mode if the current operation mode is the single-band ranging mode, or operating the dual-band ranging mode if the current operation mode is the dual-band ranging mode. That is, after determining that the ideal ranging mode is the dual-frequency ranging mode, if the current operation mode of the TOF sensing module is also the dual-frequency ranging mode, the TOF sensing module continues to operate in the dual-frequency ranging mode without switching the ranging mode; and if the current operating mode of TOF sensing module is single-frequency ranging mode, find when the current testing distance is in the working range of dual-frenquency ranging mode when single-frequency ranging promptly, then TOF sensing module can directly switch single-frequency ranging mode to dual-frenquency ranging mode to carry out distance measurement, switch the ideal ranging mode of TOF sensing module through single instruction promptly, make single-frequency and dual-frenquency can switch wantonly, need not to restart the system, thereby avoid influencing other problem of using the operation, improve and switch efficiency.
In some embodiments, in the method according to the embodiments of the present invention, the TOF sensing module may include a dual-frequency register, and for switching the single-frequency ranging mode to the dual-frequency ranging mode, the method may include reading dual-frequency ranging mode configuration data in the dual-frequency register, and configuring a ranging algorithm according to the dual-frequency ranging mode configuration data to switch to the dual-frequency ranging mode, so as to provide support for the TOF sensing module to operate the dual-frequency ranging mode. For example, under the action of the V4l2 tool, the kernel recalls function responses, writes the function responses into the dual-frequency register through the i2c bus after the response, switches the single-frequency ranging mode into the dual-frequency ranging mode, writes the dual-frequency register into the memory of the TOF sensing module one by one according to the configuration file, and executes the dual-frequency ranging mode.
The Video acquisition channel management method includes that V4L2(Video for Linux2) is a kernel driver related to Video equipment in L inux, V4L2 is a driver middle layer related to the Video equipment and is implemented under the guidance of a Linux driver layered design concept, a universal equipment file node is provided for APP (Application) to access hardware equipment upwards, a V4L2 framework unified with writing specifications of driver bottom layer codes is downward, and V4L2 is a tool for achieving Linux Video acquisition channel setting configuration.
In some embodiments, in the method according to the embodiments of the present invention, the TOF sensing module includes a dual-frequency register and a single-frequency register, and for switching the dual-frequency ranging mode to the single-frequency ranging mode, the method may include reading a single-frequency register address stored in the dual-frequency register, reading single-frequency ranging mode configuration data in the single-frequency register according to the single-frequency register address, and configuring a ranging algorithm according to the single-frequency ranging mode configuration data to switch to the single-frequency ranging mode, so as to provide support for the TOF sensing module to operate the single-frequency ranging mode. For example, under the action of a V4l2 tool, the kernel recalls function response, writes in the single-frequency register through the i2c bus after response, switches the dual-frequency ranging mode into the single-frequency ranging mode, because the address of the dual-frequency register contains all the addresses of the single-frequency register, writes the single-frequency register into the memory of the TOF sensing module one by one according to the configuration file according to the address of the single-frequency register, and clears the data in the address of the dual-frequency register which is not repeated with the address of the single-frequency register.
The TOF ranging method according to the embodiment of the invention is illustrated in the following with reference to fig. 2, and the specific steps are as follows.
In step S4, a shell instruction may be set in advance in the TOF sensing module, and step S5 is performed in response to the shell instruction. The shell command may be a single/dual-frequency switching command, for example, the switching dual-frequency command may be set to v4l2-ctl-d/dev/video 0-set-test _ pattern ═ 6, or the switching single-frequency command may be set to v4l2-ctl-d/dev/video 0-set-test _ pattern ═ 9.
Step S5, determine whether the command is a single-frequency or dual-frequency switching command, that is, determine whether the shell command is a single-frequency switching command or a dual-frequency switching command. If not, step S6 is executed, and if yes, step S7 is executed.
And step S6, stopping the operation.
Step S7, determine whether it is a single frequency switching command. If so, go to step S8, otherwise, go to step S10.
Step S8, switching the kernel tone configuration, and executing step S9.
Step S9, switching single frequency algorithm configuration, and executing step S12.
Step S10, switching the dual-core configuration, and executing step S11.
Step S11, the dual-band algorithm configuration is switched, and step S12 is executed.
In step S12, a 3D effect map is generated.
In an embodiment, a media-ctl instruction may be used to set a width and height of an image input by the TOF sensing module into the image processor and a width and a height of an output image of the image processor, and further, the pixel height values of the output images of the image processor through single/dual frequency are different, for example, the pixel height value of a single frequency is 865 and the pixel height value of a dual frequency is 1557, for example, if the pixel height value of the current image is obtained as a single frequency value, a single frequency algorithm code is used for running, for example, if the pixel height value of the current image is obtained as a dual frequency value, a dual frequency algorithm code is used for running, and finally, 3d effect images with different frequencies are generated.
Therefore, according to the TOF ranging method of the embodiment of the invention, under the condition of only short-distance application, the single-frequency ranging mode is used for ranging, and when long-distance application is required, the TOF ranging method is switched to the dual-frequency ranging mode, so that the requirements of short-distance ranging and near-distance ranging can be flexibly met, the short-distance measuring speed can be increased, the practicability of the module can be improved, the calculated amount of a processor can be reduced, the energy consumption can be reduced, and the standby time of the module can be prolonged.
An embodiment of a second aspect of the present invention provides a non-transitory computer storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the TOF ranging method provided by the above-mentioned embodiments.
In a third aspect of the present invention, a TOF sensing module 10 includes, as shown in fig. 3, a transmitter 1, a receiver 2, a single frequency register 3, a dual frequency register 4, at least one processor 5, and a memory 6 communicatively connected to the at least one processor 5.
The emitter 1 may be configured to emit an optical signal to a target object, for example, a laser, or a laser emitting unit formed by combining a laser, a lens, and/or a light cone, which may be selected according to actual needs; the receiver 2 can be used for receiving the optical signal reflected by the target object; the memory 6 stores therein a computer program executable by the at least one processor 5, and the computer program, when executed by the at least one processor 5, implements the TOF ranging method provided by the above-described embodiments.
According to the TOF sensing module 10 of the embodiment of the invention, the processor 5 is used to execute the TOF ranging method provided by the above embodiment, that is, in the case of short-distance application, a single-frequency ranging mode is used for ranging, and in the case of long-distance application, a dual-frequency ranging mode is used for ranging, so that the ranging speed in the case of short distance can be increased, the practicability of the product can be improved, and compared with the single mode of dual-frequency ranging in the prior art, the calculation amount of the processor can be reduced, a larger selection space is provided for the type selection of the processor, the energy consumption can be reduced, and the standby time of the product can be prolonged.
As shown in fig. 4, an electronic device 20 according to an embodiment of the present invention includes the TOF sensing module 10 and the image processor 7 according to the above embodiment.
The image processor 7 is in communication connection with the TOF sensing module 10, the image processor 7 is configured to receive an original image output by the TOF sensing module 10, obtain a pixel height value according to the original image, determine a ranging mode of the TOF sensing module 10 according to the pixel height value, and process the original image according to the ranging mode of the TOF camera module 10 to obtain a 3D-effect image, where the ranging mode includes a dual-frequency ranging mode and a single-frequency ranging mode.
In an embodiment, the image processor 7 may use a media-ctl instruction to set the width and height of the image input to the image processor 7 by the TOF sensing module 10 and the width and height of the output image of the image processor 7 and the output format, and further, the pixel height values of the output image of the image processor 7 through single/dual frequency are different, for example, the pixel height value of single frequency is 865, the pixel height value of dual frequency is 1557, for example, if the pixel height value of the current image is obtained as a single frequency value, a single frequency algorithm code is used for running, for example, if the pixel height value of the current image is obtained as a dual frequency value, a dual frequency algorithm code is used for running, and finally, a 3d effect image with different frequencies is generated.
According to the electronic device 20 of the embodiment of the present invention, by using the TOF sensing module 10 provided in the above embodiment, a single frequency ranging mode is used for ranging in a short-distance application, and a dual frequency ranging mode is used for ranging in a long-distance application, so that the ranging speed in a short-distance application can be increased, the product practicability can be improved, the energy consumption can be reduced, and the standby time of the product can be increased.
In the description of this specification, any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of custom logic functions or processes, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples" or the like mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (10)

1. A TOF ranging method is used for a TOF sensing module, and comprises the following steps:
acquiring a current test distance;
determining an ideal ranging mode according to the current test distance, wherein the ideal ranging mode comprises a double-frequency ranging mode and a single-frequency ranging mode;
and operating the ideal ranging mode.
2. The TOF ranging method of claim 1, wherein said obtaining a current test distance comprises:
acquiring a test distance as the current test distance in the dual-frequency ranging mode;
or, in the single-frequency ranging mode, switching to the dual-frequency ranging mode at preset intervals, and operating the dual-frequency ranging mode to obtain the current test distance.
3. The TOF ranging method of claim 1, wherein said determining an ideal ranging pattern based on the current test distance comprises:
determining that the ideal ranging mode is the single-frequency ranging mode when the current testing distance is smaller than a first distance threshold;
or, the current ranging distance is greater than or equal to a first distance threshold, and the ideal ranging mode is determined to be the dual-frequency ranging mode.
4. The TOF ranging method of claim 3 wherein said operating the ideal ranging mode comprises:
the ideal ranging mode is the single frequency ranging mode;
the current operation mode is the single-frequency ranging mode, then operates the single-frequency ranging mode, or the current operation mode is the dual-frequency ranging mode, will the dual-frequency ranging mode switch to the single-frequency ranging mode, and operate the single-frequency ranging mode.
5. The TOF ranging method of claim 3 wherein said operating the ideal ranging mode comprises:
the ideal ranging mode is the dual-frequency ranging mode;
the current operation mode is the single-frequency ranging mode, the single-frequency ranging mode is switched to the dual-frequency ranging mode, and the dual-frequency ranging mode is operated, or the current operation mode is the dual-frequency ranging mode, and then the dual-frequency ranging mode is operated.
6. The TOF ranging method according to claim 5, wherein the TOF sensing module comprises a dual-frequency register, and switching the single-frequency ranging mode to the dual-frequency ranging mode comprises:
reading dual-frequency ranging mode configuration data in the dual-frequency register;
and configuring a ranging algorithm according to the dual-frequency ranging mode configuration data so as to switch to the dual-frequency ranging mode.
7. The TOF ranging method according to claim 4, wherein the TOF sensing module comprises a dual-frequency register and a single-frequency register, and the switching the dual-frequency ranging mode to the single-frequency ranging mode comprises:
reading a single-frequency register address stored in the double-frequency register;
reading single-frequency ranging mode configuration data in the single-frequency register according to the address of the single-frequency register;
and configuring a ranging algorithm according to the single-frequency ranging mode configuration data so as to switch to the single-frequency ranging mode.
8. A non-transitory computer storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the TOF ranging method of any of claims 1-7.
9. A TOF sensing module, comprising:
a transmitter and a receiver;
a single frequency register and a dual frequency register;
at least one processor;
a memory communicatively coupled to the at least one processor;
wherein the memory has stored therein a computer program executable by the at least one processor, the computer program when executed by the at least one processor implementing the TOF ranging method according to any one of claims 1 to 7.
10. An electronic device, comprising:
the TOF sensing module of claim 9;
the image processor is in communication connection with the TOF sensing module;
the image processor is used for receiving an original image output by the TOF sensing module, obtaining a pixel height value according to the original image, determining a ranging mode of the TOF sensing module according to the pixel height value, and processing the original image according to the ranging mode of the TOF camera module to obtain a 3D effect image, wherein the ranging mode comprises a double-frequency ranging mode and a single-frequency ranging mode.
CN202010813303.0A 2020-08-13 2020-08-13 TOF ranging method, TOF sensing module, electronic equipment and storage medium Withdrawn CN112099051A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010813303.0A CN112099051A (en) 2020-08-13 2020-08-13 TOF ranging method, TOF sensing module, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010813303.0A CN112099051A (en) 2020-08-13 2020-08-13 TOF ranging method, TOF sensing module, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112099051A true CN112099051A (en) 2020-12-18

Family

ID=73753584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010813303.0A Withdrawn CN112099051A (en) 2020-08-13 2020-08-13 TOF ranging method, TOF sensing module, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112099051A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115937922A (en) * 2021-08-11 2023-04-07 荣耀终端有限公司 Face recognition method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140138519A1 (en) * 2012-11-20 2014-05-22 Wei-Ko Wang Image-sensing apparatus
CN106772414A (en) * 2016-10-14 2017-05-31 北醒(北京)光子科技有限公司 A kind of method of raising TOF ranging phase method radar ranging accuracies
CN108519601A (en) * 2018-04-13 2018-09-11 深圳臻迪信息技术有限公司 Distance measuring method, device and distance mearuring equipment
CN110400342A (en) * 2019-07-11 2019-11-01 Oppo广东移动通信有限公司 Parameter regulation means, device and the electronic equipment of depth transducer
CN111427025A (en) * 2020-01-14 2020-07-17 深圳市镭神智能系统有限公司 Laser radar and ranging method of laser radar
CN111458105A (en) * 2020-04-21 2020-07-28 欧菲微电子技术有限公司 Method, device and equipment for testing optical module

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140138519A1 (en) * 2012-11-20 2014-05-22 Wei-Ko Wang Image-sensing apparatus
CN106772414A (en) * 2016-10-14 2017-05-31 北醒(北京)光子科技有限公司 A kind of method of raising TOF ranging phase method radar ranging accuracies
CN108519601A (en) * 2018-04-13 2018-09-11 深圳臻迪信息技术有限公司 Distance measuring method, device and distance mearuring equipment
CN110400342A (en) * 2019-07-11 2019-11-01 Oppo广东移动通信有限公司 Parameter regulation means, device and the electronic equipment of depth transducer
CN111427025A (en) * 2020-01-14 2020-07-17 深圳市镭神智能系统有限公司 Laser radar and ranging method of laser radar
CN111458105A (en) * 2020-04-21 2020-07-28 欧菲微电子技术有限公司 Method, device and equipment for testing optical module

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115937922A (en) * 2021-08-11 2023-04-07 荣耀终端有限公司 Face recognition method and device
CN115937922B (en) * 2021-08-11 2023-11-07 荣耀终端有限公司 Face recognition method and device

Similar Documents

Publication Publication Date Title
US11506780B2 (en) Intelligent roadside unit and control method thereof
CN109191553B (en) Point cloud rendering method, device, terminal and storage medium
US20220273152A1 (en) Obstacle identification method, apparatus, self-moving device and storage medium
CN107613262B (en) Visual information processing system and method
CN107317853B (en) Method, device and system for displaying dynamic effect of message popup window
CN108564681B (en) Data processing method, data processing apparatus, computing device, program product, and storage medium
CN106335502B (en) Semiconductor device, control system and observation method
US20200361452A1 (en) Vehicles and methods for performing tasks based on confidence in accuracy of module output
US10802122B1 (en) Methods and systems for calibration of multiple lidar devices with non-overlapping fields of view
US20220024333A1 (en) Automatic recharging method, device, storage medium and system
CN112099051A (en) TOF ranging method, TOF sensing module, electronic equipment and storage medium
WO2024007656A1 (en) Method and apparatus for determining supplemental light intensity data, electronic device and storage medium
CN110494762B (en) Periphery monitoring radar apparatus
US10467486B2 (en) Method for evaluating credibility of obstacle detection
CN113409583B (en) Lane line information determination method and device
EP3608837A1 (en) Display screen, electronic device and method for three-dimensional feature recognition
CN114296102A (en) Laser radar scanning method and scanning device thereof
CN110930312A (en) Method and device for generating fisheye camera image
KR20230102019A (en) Electronic device for detecting rear side of target vehicle and operating method thereof
JP2019178971A (en) Device, method, and program for generating environmental map
JP7466695B2 (en) Image Processing Device
CN109581380B (en) Vehicle position detection method and device based on radar and computer equipment
KR20230108709A (en) Lidar adaptive single-pass histogram building scheme for low power lidar system
CN113057530A (en) Sweeping robot, map updating method and device thereof and storage medium
CN114495572A (en) Vehicle and parking space determining device and method thereof

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
CB02 Change of applicant information

Address after: 330096 No.699 Tianxiang North Avenue, Nanchang hi tech Industrial Development Zone, Nanchang City, Jiangxi Province

Applicant after: Jiangxi OMS Microelectronics Co.,Ltd.

Address before: 330096 to the east of Xueyuan 6th Road and south of Tianxiang Avenue, Nanchang high tech Industrial Development Zone, Jiangxi Province

Applicant before: OFilm Microelectronics Technology Co.,Ltd.

CB02 Change of applicant information
WW01 Invention patent application withdrawn after publication

Application publication date: 20201218

WW01 Invention patent application withdrawn after publication