CN117452414A - Ranging method, ranging device, electronic equipment and readable storage medium - Google Patents

Ranging method, ranging device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN117452414A
CN117452414A CN202210845932.0A CN202210845932A CN117452414A CN 117452414 A CN117452414 A CN 117452414A CN 202210845932 A CN202210845932 A CN 202210845932A CN 117452414 A CN117452414 A CN 117452414A
Authority
CN
China
Prior art keywords
distance
terminal equipment
sensor
ranging
acquiring
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.)
Pending
Application number
CN202210845932.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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202210845932.0A priority Critical patent/CN117452414A/en
Publication of CN117452414A publication Critical patent/CN117452414A/en
Pending legal-status Critical Current

Links

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
    • G01S15/00Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems
    • G01S15/02Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems using reflection of acoustic waves
    • G01S15/06Systems determining the position data of a target
    • G01S15/08Systems for measuring distance only
    • 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

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Acoustics & Sound (AREA)
  • Telephone Function (AREA)

Abstract

The disclosure provides a ranging method, a ranging device, an electronic device and a readable storage medium, which are applied to a terminal device provided with a distance sensor and a motion sensor, wherein the ranging method comprises the following steps: the method comprises the steps of respectively obtaining a first distance collected by a first measured position and a second distance collected by a second measured position at the same position and the same ranging angle of the distance sensor, obtaining a rotation angle collected by the motion sensor, and determining a third distance between the first measured position and the second measured position according to the first distance, the second distance and the rotation angle. The distance between the measured positions is determined through the first distance and the second distance acquired by the distance sensor and the rotation angle acquired by the motion sensor, so that a user can acquire distance information of two points in space at any time.

Description

Ranging method, ranging device, electronic equipment and readable storage medium
Technical Field
The disclosure relates to the field of distance detection, and in particular relates to a distance measurement method, a distance measurement device, electronic equipment and a readable storage medium.
Background
Currently, more and more intelligent terminal devices select to be equipped with equidistant sensors such as TOF sensors to assist in the rapid focusing process during shooting, and timely acquire depth information of a measured object. However, the distance sensor can only acquire the linear distance between the terminal device and the measured object, and cannot measure the distance between any two points in space, and the distance cannot be measured at a specific position without a special distance measuring tool.
Disclosure of Invention
Accordingly, the present disclosure provides a ranging method, a ranging apparatus, an electronic device, and a readable storage medium, which solve at least the problems of the related art.
According to a first aspect of embodiments of the present disclosure, there is provided a ranging method applied to a terminal device provided with a distance sensor and a motion sensor, the method including:
respectively acquiring a first distance acquired by the distance sensor at the same position and at the same ranging angle for a first measured position and a second distance acquired by the distance sensor for a second measured position, wherein the ranging angle is an angle between the distance sensor and the measured position;
acquiring a rotation angle acquired by the motion sensor, wherein the rotation angle characterizes the pose state of the terminal equipment when the distance sensor acquires the second distance, and is opposite to the rotation angle of the pose state of the terminal equipment when the distance sensor acquires the first distance;
and determining a third distance between the first detected position and the second detected position according to the first distance, the second distance and the rotation angle.
In combination with any one of the embodiments of the present disclosure, the terminal device is further provided with an image acquisition element, configured to acquire a ranging preview screen, and the measured position is used to characterize the ranging angle of the distance sensor in the preview screen.
In combination with any one of the embodiments of the present disclosure, the acquiring the first distance acquired by the distance sensor for the first detected position and the second distance acquired by the second detected position at the same position and the same ranging angle respectively includes:
acquiring the first distance for the first detected position in response to the first detected position being at a preset position of the ranging preview screen;
and responding to the second detected position being at a preset position of the preview picture, acquiring the second distance for the second detected position, wherein the detected position at the preset position is opposite to the distance sensor.
In combination with any of the embodiments of the present disclosure, after the distance sensor collects the first distance, the method further includes:
and displaying first prompt information, wherein the first prompt information is used for prompting a user to rotate the terminal equipment.
In combination with any of the embodiments of the present disclosure, after the distance sensor collects the first distance, the method further includes:
responding to the rotation of the terminal equipment, acquiring a displacement parameter of the terminal equipment acquired by the motion sensor, wherein the displacement parameter represents the position deviation degree of the terminal equipment in the rotation process;
and acquiring the second distance according to the displacement parameter of the terminal equipment and the position relation between the first detected position and the preset position in the preview picture.
In combination with any one of the embodiments of the present disclosure, the collecting the second distance according to the displacement parameter of the terminal device and the positional relationship between the first measured position and the preset position in the preview screen includes:
and under the condition that the displacement parameter of the terminal equipment is smaller than or equal to a set threshold value, responding to the second detected position to be at the preset position of the preview picture, and collecting the second distance.
In combination with any of the embodiments of the present disclosure, the method further comprises:
and displaying second prompt information when the displacement parameter of the terminal equipment is larger than the set threshold value, wherein the second prompt information is used for prompting a user to move the terminal equipment until the displacement parameter is smaller than or equal to the set threshold value.
According to a second aspect of embodiments of the present disclosure, there is provided a ranging apparatus for use in a terminal device provided with a distance sensor and a motion sensor, the apparatus comprising:
the distance acquisition module is used for respectively acquiring a first distance acquired by the distance sensor at the same position and at the same distance measurement angle, and a second distance acquired by the distance sensor at the second measured position, wherein the distance measurement angle is an angle between the distance sensor and the measured position;
the angle acquisition module is used for acquiring a rotation angle acquired by the motion sensor, wherein the rotation angle represents the position and posture state of the terminal equipment when the distance sensor acquires the second distance, and the rotation angle is opposite to the position and posture state of the terminal equipment when the distance sensor acquires the first distance;
and the distance determining module is used for determining a third distance between the first detected position and the second detected position according to the first distance, the second distance and the rotation angle.
In combination with any one of the embodiments of the present disclosure, the terminal device is further provided with an image acquisition element, configured to acquire a ranging preview image, and the ranging angle of the distance sensor is used to characterize the ranging angle of the distance sensor according to the position of the measured position in the preview image.
In combination with any one of the embodiments of the present disclosure, when the distance acquisition module acquires the first distance acquired by the distance sensor at the same position and at the same ranging angle, and the second distance acquired by the distance sensor at the second measured position, the distance acquisition module is specifically configured to:
acquiring the first distance for the first detected position in response to the first detected position being at a preset position of the ranging preview screen;
and acquiring the second distance for the second detected position in response to the second detected position being at a preset position of the preview screen, wherein the detected position at the preset position characterizes the current position being relative to the distance sensor.
In combination with any one of the embodiments of the present disclosure, after the distance sensor collects the first distance, the apparatus further includes a first prompting module configured to:
and displaying first prompt information, wherein the first prompt information is used for prompting a user to rotate the terminal equipment.
In combination with any of the embodiments of the present disclosure, the apparatus further includes a displacement acquisition module for:
responding to the rotation of the terminal equipment, acquiring a displacement parameter of the terminal equipment acquired by the motion sensor, wherein the displacement parameter represents the position deviation degree of the terminal equipment in the rotation process;
and acquiring the second distance according to the displacement parameter of the terminal equipment and the position relation between the first detected position and the preset position in the preview picture.
In combination with any one of the embodiments of the present disclosure, when the distance acquisition module acquires the second distance according to the displacement parameter of the terminal device and the positional relationship between the first detected position and the preset position in the preview screen, the distance acquisition module is specifically configured to:
and under the condition that the displacement parameter of the terminal equipment is smaller than or equal to a set threshold value, responding to the second detected position to be at the preset position of the preview picture, and collecting the second distance.
In combination with any one of the embodiments of the present disclosure, the apparatus further includes a second prompting module configured to:
and displaying second prompt information when the displacement parameter of the terminal equipment is larger than the set threshold value, wherein the second prompt information is used for prompting a user to move the terminal equipment until the displacement parameter is smaller than or equal to the set threshold value.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
a memory for storing the processor-executable instructions;
a processor configured to execute executable instructions in the memory to implement the steps of the method of any of the embodiments of the first aspect described above.
According to a fourth aspect of the disclosed embodiments, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method according to any of the embodiments of the first aspect described above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
the distance between the measured positions is determined through the first distance and the second distance acquired by the distance sensor and the rotation angle acquired by the motion sensor, so that a user can acquire the distance information of two points in the space at any time.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart of a ranging method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a ranging method according to an exemplary embodiment of the present disclosure;
FIG. 3 is a flowchart of another ranging method according to an exemplary embodiment of the present disclosure;
FIG. 4 is a flowchart of another ranging method according to an exemplary embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a ranging device according to an exemplary embodiment of the present disclosure;
fig. 6 is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
Fig. 1 illustrates a ranging method flowchart according to an exemplary embodiment of the present disclosure.
In step S101, the distance sensors are respectively acquired at the same position and at the same distance measurement angle, wherein the distance measurement angle is an angle between the distance sensor and the measured position, and the first distance is acquired for the first measured position and the second distance is acquired for the second measured position.
Alternatively, the distance sensor is a sensor that can determine the distance between the measured position and the current terminal device by means of the reflection time of ultrasonic waves, laser light, and infrared light, and by way of example, the distance sensor may be a time-of-flight TOF sensor. The flight time sensor comprises a transmitting module, a receiving module and a timing module. And the infrared light emitted by the emitting module is reflected by an object at the measured position and then transmitted back to the receiving module, the flight time of the laser is recorded by the timing module, and the distance between the current position and the measured position is calculated according to the flight time and the infrared propagation speed.
The first measured position and the second measured position are a starting point position and an ending point position of a distance which the user wants to measure, and can be any two positions of any two objects or any two measuring points of a single object in space.
The schematic diagram of obtaining the first measured distance and the second measured distance is shown in fig. 2:
after the first distance of the first measured position is acquired, the distance sensor needs to be kept at the same spatial position to acquire the second distance of the second measured position. Optionally, the position of the distance sensor may be kept fixed, and the terminal device is rotated with the position of the center point of the distance sensor as a center of sphere until the distance sensor can acquire a second distance of the second measured position at the same ranging angle, where the ranging angle is an angle between the distance sensor and the measured position.
In step S102, a rotation angle acquired by the motion sensor is acquired, where the rotation angle characterizes a pose state of the terminal device when the distance sensor acquires the second distance, and is opposite to a rotation angle of the pose state of the terminal device when the distance sensor acquires the first distance.
Optionally, the rotation angle between the motion sensor and the acquisition terminal equipment comprises an acceleration sensor and/or a geomagnetic sensor. The rotation angle is an angle through which the terminal equipment rotates in the process of rotating the terminal equipment by taking the position of the center point of the distance sensor as the center of a sphere. For an acceleration sensor, the rotation angle may be determined according to components of the gravitational acceleration along x, y, z axes of the terminal device; for the geomagnetic sensor, the rotation angle can be determined according to components of the magnetic field intensity along x, y and z axes of the terminal equipment, wherein the acceleration sensor is high in accuracy and can obtain the rotation angle in time, the geomagnetic sensor is low in power consumption, and at least one sensor can be selected according to specific requirements of the terminal equipment to obtain the rotation angle.
In step S103, a third distance between the first measured position and the second measured position is determined based on the first distance, the second distance, and the rotation angle.
Optionally, a triangle may be constructed by using the first measured position, the second measured position, and the position where the distance sensor is located as vertices, where, when the first distance, the second distance, and the rotation angle are acquired, a third distance between the first measured position and the second measured position may be determined according to a cosine law. Illustratively, the first distance is denoted as a, the second distance is denoted as b, and the rotation angle is denoted as C, the third distance C may be determined by the cosine law:
c 2 =a 2 +b 2 -2ab*cos C
according to the scheme, the third distance between the detected positions is determined through the first distance and the second distance acquired by the distance sensor and the rotation angle acquired by the motion sensor, so that a user can acquire distance information of two points in space at any time.
In an alternative embodiment, the terminal device is further provided with an image acquisition element for acquiring a ranging preview screen, so that a user can quickly select the measured position according to the preview screen. The measured position is used for representing the ranging angle of the distance sensor.
Specifically, in the method described in the present disclosure, one method for acquiring the first distance and the second distance is shown in fig. 3, and specifically includes steps S1021 to S1022.
In step S1021, the first distance is acquired for the first detected position in response to the first detected position being at a preset position of the ranging preview screen, wherein the detected position at the preset position is opposite to the distance sensor.
Alternatively, the user may position the terminal device perpendicular to the ground and position the distance sensor at the first measured position, i.e. the first measured position is located at the preset position. The measured position is relative to the distance sensor, and the current connecting line of the measured position and the distance sensor passes through the center of the distance sensor and is perpendicular to the receiving module of the distance sensor. The user can determine the first detected position by clicking on a screen, so that the distance sensor collects the first distance. Optionally, after the first distance is obtained, the terminal device may further display a first prompting message, configured to prompt a user to rotate the terminal device.
In step S1022, the second distance is acquired for the second detected position in response to the second detected position being at the preset position of the preview screen.
Optionally, the user rotates the terminal device to enable the distance sensor to be positioned at the second detected position, that is, enable the second detected position to be positioned at the preset position. The user can determine the second detected position by clicking on the screen, so that the distance sensor collects the second distance.
According to the scheme, through the preview picture acquired by the image acquisition element, a user can accurately and quickly determine the measured position, and when the first distance and the second distance are acquired through the preset position, the distance measurement angle is consistent.
In the method of the present disclosure, another method for acquiring the second distance is shown in fig. 4, and specifically includes steps S1022A to S1022B.
In step S1022A, in response to the rotation of the terminal device, a displacement parameter of the terminal device acquired by the motion sensor is acquired, where the displacement parameter characterizes a degree of positional deviation of the terminal device during the rotation.
Optionally, during the process of rotating the terminal device by the user, the acceleration acquired by the acceleration sensor may be integrated to acquire the displacement parameter of the terminal device, or the degree of the position deviation of the terminal device during the rotation process may be acquired by other motion sensors. In the method disclosed by the disclosure, when the first distance and the second distance are acquired, the distance sensor needs to be ensured to be at the same position, that is, the user needs to rotate the terminal device by taking the position of the center point of the distance sensor as the center of sphere. However, since the rotation of the handheld device is prone to operational errors, it is necessary to determine whether the distance sensor is severely shifted from the initial position according to the displacement parameter.
In step S1022B, the second distance is collected according to the displacement parameter of the terminal device and the positional relationship between the first detected position and the preset position in the preview screen.
Specifically, when the displacement parameter of the terminal device is smaller than or equal to a set threshold, the position deviation degree of the characterization distance sensor does not cause the calculation error of the third distance to exceed an acceptable range, and the second distance is acquired in response to the second measured position being located at the preset position of the preview picture.
And under the condition that the displacement parameter of the terminal equipment is larger than the set threshold value, the position deviation degree of the distance sensor is represented to be beyond an acceptable range. And displaying second prompt information, wherein the second prompt information is used for prompting a user to move the terminal equipment until the displacement parameter is smaller than or equal to a set threshold, namely, until the user restores the position of the terminal equipment to an initial position when the first distance is acquired, and acquiring the second distance through the distance sensor after the position of the distance sensor is determined to be unchanged.
According to the scheme, whether the position of the distance sensor is fixed or not is determined through the displacement parameter of the terminal equipment in the rotating process, and the user is prompted to restore the terminal equipment to the initial position under the condition that the displacement parameter is larger than the set threshold value, so that the position of the distance sensor is the same when the first distance and the second distance are acquired, and the reliability of a ranging result is improved.
For the foregoing method embodiments, for simplicity of explanation, the methodologies are shown as a series of acts, but one of ordinary skill in the art will appreciate that the present disclosure is not limited by the order of acts described, as some steps may occur in other orders or concurrently in accordance with the disclosure.
Further, those skilled in the art will also appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts and modules referred to are not necessarily required by the present disclosure.
Corresponding to the embodiment of the application function implementation method, the disclosure also provides an embodiment of the application function implementation device and a corresponding terminal.
A block diagram of a ranging apparatus according to an exemplary embodiment of the present disclosure is shown in fig. 5, and is applied to a terminal device provided with a distance sensor and a motion sensor, the apparatus including:
a distance acquisition module 501, configured to acquire a first distance acquired by the distance sensor at the same position and at the same ranging angle, and a second distance acquired by the distance sensor at the second measured position, where the ranging angle is an angle between the distance sensor and the measured position;
the angle acquisition module 502 is configured to acquire a rotation angle acquired by the motion sensor, where the rotation angle characterizes a pose state of the terminal device when the distance sensor acquires the second distance, and is opposite to a rotation angle of the pose state of the terminal device when the distance sensor acquires the first distance;
a distance determining module 503, configured to determine a third distance between the first detected position and the second detected position according to the first distance, the second distance, and the rotation angle.
In combination with any one of the embodiments of the present disclosure, the terminal device is further provided with an image acquisition element, configured to acquire a ranging preview image, and the ranging angle of the distance sensor is used to characterize the ranging angle of the distance sensor according to the position of the measured position in the preview image.
In combination with any one of the embodiments of the present disclosure, when the distance acquisition module acquires the first distance acquired by the distance sensor at the same position and at the same ranging angle, and the second distance acquired by the distance sensor at the second measured position, the distance acquisition module is specifically configured to:
acquiring the first distance for the first detected position in response to the first detected position being at a preset position of the ranging preview screen;
and acquiring the second distance for the second detected position in response to the second detected position being at a preset position of the preview screen, wherein the detected position at the preset position characterizes the current position being relative to the distance sensor.
In combination with any one of the embodiments of the present disclosure, after the distance sensor collects the first distance, the apparatus further includes a first prompting module configured to:
and displaying first prompt information, wherein the first prompt information is used for prompting a user to rotate the terminal equipment.
In combination with any of the embodiments of the present disclosure, the apparatus further includes a displacement acquisition module for:
responding to the rotation of the terminal equipment, acquiring a displacement parameter of the terminal equipment acquired by the motion sensor, wherein the displacement parameter represents the position deviation degree of the terminal equipment in the rotation process;
and acquiring the second distance according to the displacement parameter of the terminal equipment and the position relation between the first detected position and the preset position in the preview picture.
In combination with any one of the embodiments of the present disclosure, when the distance acquisition module acquires the second distance according to the displacement parameter of the terminal device and the positional relationship between the first detected position and the preset position in the preview screen, the distance acquisition module is specifically configured to:
and under the condition that the displacement parameter of the terminal equipment is smaller than or equal to a set threshold value, responding to the second detected position to be at the preset position of the preview picture, and collecting the second distance.
In combination with any one of the embodiments of the present disclosure, the apparatus further includes a second prompting module configured to:
and displaying second prompt information when the displacement parameter of the terminal equipment is larger than the set threshold value, wherein the second prompt information is used for prompting a user to move the terminal equipment until the displacement parameter is smaller than or equal to the set threshold value.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements described above as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the objectives of the disclosed solution. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Fig. 6 illustrates a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Referring to fig. 6, a block diagram of an electronic device is shown. For example, apparatus 600 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 6, apparatus 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input/output (I/O) interface 612, a sensor component 614, and a communication component 616.
The processing component 602 generally controls overall operation of the apparatus 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the device 600. Examples of such data include instructions for any application or method operating on the apparatus 600, contact data, phonebook data, messages, pictures, videos, and the like. The memory 604 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 606 provides power to the various components of the device 600. The power components 606 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 600.
The multimedia component 608 includes a screen between the device 600 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 600 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 614 includes one or more sensors for providing status assessment of various aspects of the apparatus 600. For example, the sensor assembly 614 may detect the on/off state of the device 600, the relative positioning of the assemblies, such as the display and keypad of the device 600, the sensor assembly 614 may detect a change in position of the device 600 or one of the assemblies of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration/deceleration of the device 600, and a change in temperature of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 614 may include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communication between the apparatus 600 and other devices in a wired or wireless manner. The device 600 may access a wireless network based on a communication standard, such as WiFi,2G or 3G,4G or 5G, or a combination thereof. In one exemplary embodiment, the communication part 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 616 includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for performing the power supply methods of electronic devices described above.
In an exemplary embodiment, the present disclosure provides a non-transitory computer-readable storage medium, such as memory 604, comprising instructions executable by processor 620 of apparatus 600 to perform the method of powering an electronic device described above. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. A ranging method applied to a terminal device provided with a distance sensor and a motion sensor, the method comprising:
respectively acquiring a first distance acquired by the distance sensor at the same position and at the same ranging angle for a first measured position and a second distance acquired by the distance sensor for a second measured position, wherein the ranging angle is an angle between the distance sensor and the measured position;
acquiring a rotation angle acquired by the motion sensor, wherein the rotation angle characterizes the pose state of the terminal equipment when the distance sensor acquires the second distance, and is opposite to the rotation angle of the pose state of the terminal equipment when the distance sensor acquires the first distance;
and determining a third distance between the first detected position and the second detected position according to the first distance, the second distance and the rotation angle.
2. The method according to claim 1, characterized in that the terminal device is further provided with an image acquisition element for acquiring a ranging preview picture, the position of the measured position in the preview picture being used for characterizing the ranging angle of the distance sensor.
3. The method of claim 2, wherein the acquiring the first distance acquired for a first measured location and the second distance acquired for a second measured location, respectively, at the same location and with the same ranging angle, comprises:
responsive to the first detected position being at a preset position of the ranging preview screen, acquiring the first distance for the first detected position, wherein the detected position at the preset position is opposite to the distance sensor;
and acquiring the second distance for the second detected position in response to the second detected position being at a preset position of the preview picture.
4. A method according to any one of claims 1 to 3, wherein after the distance sensor collects the first distance, the method further comprises:
and displaying first prompt information, wherein the first prompt information is used for prompting a user to rotate the terminal equipment.
5. A method according to claim 3, wherein after the distance sensor collects the first distance, the method further comprises:
responding to the rotation of the terminal equipment, acquiring a displacement parameter of the terminal equipment acquired by the motion sensor, wherein the displacement parameter represents the position deviation degree of the terminal equipment in the rotation process;
and acquiring the second distance according to the displacement parameter of the terminal equipment and the position relation between the first detected position and the preset position in the preview picture.
6. The method according to claim 5, wherein the acquiring the second distance according to the displacement parameter of the terminal device and the positional relationship between the first detected position and the preset position in the preview screen includes:
and under the condition that the displacement parameter of the terminal equipment is smaller than or equal to a set threshold value, responding to the second detected position to be at the preset position of the preview picture, and collecting the second distance.
7. The method of claim 6, wherein the method further comprises:
and displaying second prompt information when the displacement parameter of the terminal equipment is larger than the set threshold value, wherein the second prompt information is used for prompting a user to move the terminal equipment until the displacement parameter is smaller than or equal to the set threshold value.
8. A distance measuring device for use in a terminal device provided with a distance sensor and a motion sensor, the device comprising:
the distance acquisition module is used for respectively acquiring a first distance acquired by the distance sensor at the same position and at the same distance measurement angle, and a second distance acquired by the distance sensor at the second measured position, wherein the distance measurement angle is an angle between the distance sensor and the measured position;
the angle acquisition module is used for acquiring a rotation angle acquired by the motion sensor, wherein the rotation angle represents the position and posture state of the terminal equipment when the distance sensor acquires the second distance, and the rotation angle is opposite to the position and posture state of the terminal equipment when the distance sensor acquires the first distance;
and the distance determining module is used for determining a third distance between the first detected position and the second detected position according to the first distance, the second distance and the rotation angle.
9. The apparatus according to claim 8, wherein the terminal device is further provided with an image acquisition element for acquiring a ranging preview screen, and the ranging angle of the distance sensor is used for characterizing the ranging angle of the distance sensor according to the position of the measured position in the preview screen.
10. The apparatus of claim 9, wherein when the distance acquisition module acquires the first distance acquired for the first measured location and the second distance acquired for the second measured location at the same location and the same ranging angle, respectively, the distance acquisition module is specifically configured to:
acquiring the first distance for the first detected position in response to the first detected position being at a preset position of the ranging preview screen;
and acquiring the second distance for the second detected position in response to the second detected position being at a preset position of the preview screen, wherein the detected position at the preset position characterizes the current position being relative to the distance sensor.
11. The apparatus according to any one of claims 8 to 10, further comprising a first prompting module for, after the distance sensor collects the first distance:
and displaying first prompt information, wherein the first prompt information is used for prompting a user to rotate the terminal equipment.
12. The apparatus of claim 10, further comprising a displacement acquisition module for:
responding to the rotation of the terminal equipment, acquiring a displacement parameter of the terminal equipment acquired by the motion sensor, wherein the displacement parameter represents the position deviation degree of the terminal equipment in the rotation process;
and acquiring the second distance according to the displacement parameter of the terminal equipment and the position relation between the first detected position and the preset position in the preview picture.
13. The apparatus of claim 12, wherein when the distance acquisition module acquires the second distance according to the displacement parameter of the terminal device and the positional relationship between the first detected position and the preset position in the preview screen, the distance acquisition module is specifically configured to:
and under the condition that the displacement parameter of the terminal equipment is smaller than or equal to a set threshold value, responding to the second detected position to be at the preset position of the preview picture, and collecting the second distance.
14. The apparatus of claim 13, further comprising a second prompting module for:
and displaying second prompt information when the displacement parameter of the terminal equipment is larger than the set threshold value, wherein the second prompt information is used for prompting a user to move the terminal equipment until the displacement parameter is smaller than or equal to the set threshold value.
15. An electronic device, the electronic device comprising:
a memory for storing processor-executable instructions;
a processor configured to execute executable instructions in the memory to implement the steps of the method of any one of claims 1 to 7.
16. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202210845932.0A 2022-07-18 2022-07-18 Ranging method, ranging device, electronic equipment and readable storage medium Pending CN117452414A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210845932.0A CN117452414A (en) 2022-07-18 2022-07-18 Ranging method, ranging device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210845932.0A CN117452414A (en) 2022-07-18 2022-07-18 Ranging method, ranging device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN117452414A true CN117452414A (en) 2024-01-26

Family

ID=89582359

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210845932.0A Pending CN117452414A (en) 2022-07-18 2022-07-18 Ranging method, ranging device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN117452414A (en)

Similar Documents

Publication Publication Date Title
US11516377B2 (en) Terminal, focusing method and apparatus, and computer readable storage medium
US10292004B2 (en) Method, device and medium for acquiring location information
KR101712301B1 (en) Method and device for shooting a picture
US10101156B2 (en) Method and apparatus for determining spatial parameter based on image and terminal device
EP3232156A1 (en) Obstacle locating method, apparatus and system, computer program and recording medium
CN111200304B (en) Temperature detection circuit, method and device of wireless charging coil and storage medium
RU2705424C1 (en) Method and device for controlling an alarm clock
CN110059547B (en) Target detection method and device
CN104917581A (en) System time correction method and device, terminal and router
CN112082656A (en) Temperature determination method and device, electronic equipment and storage medium
CN111007462A (en) Positioning method, positioning device, positioning equipment and electronic equipment
WO2022179080A1 (en) Positioning method and apparatus, electronic device, storage medium, program and product
CN108801161B (en) Measuring system, method and device, readable storage medium
CN107688765B (en) Fingerprint acquisition method and device
CN115950415A (en) Method and device for determining navigation direction and storage medium
CN112383661B (en) Mobile terminal automatic test method and device, electronic equipment and storage medium
CN117452414A (en) Ranging method, ranging device, electronic equipment and readable storage medium
CN111538543B (en) Lost article searching method, lost article searching device and storage medium
CN108769513B (en) Camera photographing method and device
CN112824933A (en) Distance measuring method, distance measuring device and electronic equipment
CN112804462B (en) Multi-point focusing imaging method and device, mobile terminal and storage medium
CN110875590A (en) Electrostatic protection circuit, method and device of sensor chip
CN113589345B (en) Positioning method, positioning device and storage medium
CN109670432B (en) Action recognition method and device
CN116567139A (en) Terminal falling prompting method, device, equipment and storage medium

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