Angle adjustment method, electronic equipment and storage medium
By automatically adjusting the angle of the ToF sensor, the operation inconvenience caused by the small field of view angle of the ToF sensor is solved, and the field of view and user experience are significantly improved.
Patent Information
- Application Number
- CN202311241537.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2025-03-25
AI Technical Summary
The ToF sensor has a small field of view angle, which causes users to continuously rotate their electronic devices to expand their field of view, causing inconvenience in operation and reducing the user experience.
Automatically adjust the angle of the ToF sensor through scene triggering to enhance its field of view and improve the user experience. A specific implementation includes adjusting the angle of the ToF sensor in response to a detected trigger event, such as a user-created task, a change in posture of an electronic device, or a user's gesture.
By automatically adjusting the angle of the ToF sensor, the field of view is significantly improved, thereby improving the user's operational convenience and user experience.
Smart Images

Figure CN119689429A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of virtual reality, and in particular to an angle adjustment method, an electronic device and a storage medium. Background Art
[0002] A ToF sensor is a 3D vision sensor that uses the Time of Flight (ToF) technology. The ToF sensor can be used in Virtual Reality (VR) to measure the time it takes for a light or infrared signal to travel from the sensor to an object, thereby calculating the distance from the sensor to the object based on the time.
[0003] However, in actual use, ToF sensors are usually installed on electronic devices (for example, helmets). Since the field of view (FOV) of the ToF sensor is small and the field of view is small, the user needs to constantly turn the electronic device to expand its field of view, which causes inconvenience to the user's operation and reduces the user's experience. Summary of the invention
[0004] The present application provides an angle adjustment method, an electronic device, and a storage medium, which are helpful to improve the field of view of a ToF sensor, thereby improving the user experience.
[0005] In a first aspect, the present application provides an angle adjustment method, which is applied to an electronic device, wherein the electronic device includes a ToF sensor, and includes: adjusting the angle of the ToF sensor in response to a detected trigger event.
[0006] This application uses scene triggering to enable the ToF sensor to automatically adjust its angle, which can help improve the field of view of the ToF sensor and enhance the user experience.
[0007] In one possible implementation, adjusting the angle of the ToF sensor in response to a detected trigger event includes: adjusting the angle of the ToF sensor in response to a detected task created by a user in an application.
[0008] In one possible implementation, the task corresponds to one or more spaces, and adjusting the angle of the ToF sensor in response to detecting a task created by a user in an application includes: in response to detecting a task created by a user in an application, adjusting the angle of the ToF sensor to one or more spaces corresponding to the task.
[0009] In one possible implementation manner, adjusting the angle of the ToF sensor in response to a detected trigger event includes: adjusting the angle of the ToF sensor in response to detecting a change in a posture of the electronic device.
[0010] In one possible implementation, the posture of the electronic device includes the orientation of the electronic device, and adjusting the angle of the ToF sensor in response to detecting a change in the posture of the electronic device includes: in response to detecting that the electronic device turns to a first direction, adjusting the angle of the ToF sensor toward the first direction.
[0011] In one possible implementation manner, adjusting the angle of the ToF sensor in response to a detected trigger event includes: in response to a detected gesture of a user, adjusting the ToF sensor to an angle corresponding to the gesture.
[0012] In one possible implementation, the electronic device includes a motor and a screw, the screw is fixed on a bracket of the ToF sensor, and adjusting the angle of the ToF sensor includes: driving the screw by the motor so that the screw drives the ToF sensor to adjust the angle of the ToF sensor.
[0013] In one possible implementation, the electronic device includes a coil bracket, an electric coil and a magnet, the coil bracket is fixed on the bracket of the ToF sensor, the electric coil is wound on the coil bracket, and the electric coil is directly opposite to the two sides of the magnet, and the adjusting the angle of the ToF sensor includes: driving the coil bracket through the attraction between the magnetic field formed by the electric coil and the magnet, so that the coil bracket drives the ToF sensor to adjust the angle of the ToF sensor.
[0014] In a second aspect, the present application provides an angle adjustment device, comprising one or more functional modules, wherein the one or more functional modules are used to implement the angle adjustment method as described in the first aspect.
[0015] In a third aspect, the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store a program; and the processor is used to run the program to implement the angle adjustment method as described in the first aspect.
[0016] In a fourth aspect, the present application provides a readable storage medium, in which a program is stored. When the program is executed on an electronic device, the electronic device implements the angle adjustment method described in the first aspect.
[0017] In a fifth aspect, the present application provides a program, which, when executed on a processor of an electronic device, enables the electronic device to execute the angle adjustment method as described in the first aspect.
[0018] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0020] Figure 2 A schematic diagram of a flow chart of an embodiment of the angle adjustment method provided in the present application;
[0021] Figure 3 A schematic diagram of the effect of the motor drive provided in the embodiment of the present application;
[0022] Figure 4 A schematic diagram of the effect of electromagnetic drive provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of the structure of the angle adjustment device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In the embodiments of the present application, unless otherwise specified, the character " / " indicates that the objects before and after the association are in an or relationship. For example, A / B can represent A or B. "And / or" describes the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone.
[0025] It should be pointed out that the words "first", "second", etc. involved in the embodiments of the present application are only used to distinguish the description purpose, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated, nor can they be understood as indicating or implying order.
[0026] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. In addition, "at least one of the following" or similar expressions refers to any combination of these items, which may include any combination of single items or plural items. For example, at least one of A, B, or C may represent: A, B, C, A and B, A and C, B and C, or A, B and C. Among them, each of A, B, and C may be an element itself, or a set containing one or more elements.
[0027] In the embodiments of the present application, "exemplary", "in some embodiments", "in another embodiment", etc. are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.
[0028] In the embodiments of the present application, "of", "corresponding", and "corresponding" can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. In the embodiments of the present application, communication and transmission can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. For example, transmission can include sending and / or receiving, which can be a noun or a verb.
[0029] The equal to involved in the embodiments of the present application can be used in conjunction with greater than, and is applicable to the technical solution adopted when greater than, and can also be used in conjunction with less than, and is applicable to the technical solution adopted when less than. It should be noted that when equal to is used in conjunction with greater than, it cannot be used in conjunction with less than; when equal to is used in conjunction with less than, it cannot be used in conjunction with greater than.
[0030] A ToF sensor is a 3D vision sensor that uses the Time of Flight (ToF) technology. The ToF sensor can be used in Virtual Reality (VR) to measure the time it takes for a light or infrared signal to travel from the sensor to an object, thereby calculating the distance from the sensor to the object based on the time.
[0031] However, in actual use, ToF sensors are usually installed on electronic devices (for example, helmets). Since the field of view (FOV) of the ToF sensor is small and the field of view is small, the user needs to constantly turn the electronic device to expand its field of view, which causes inconvenience to the user's operation and reduces the user's experience.
[0032] Based on the above problems, an embodiment of the present application proposes an angle adjustment method, which is applied to an electronic device. The electronic device may be a wearable device. Wearable devices may also be called wearable smart devices or VR devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, helmets, etc. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. A wearable device is not only a hardware device, but also can realize powerful functions through software support, data interaction, and cloud interaction.
[0033] Figure 1 First, a schematic structural diagram of the electronic device 100 is shown as an example.
[0034] The electronic device 100 may include at least one processor and at least one memory connected to the processor, wherein the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method provided in the embodiment shown in this document.
[0035] Figure 1 A block diagram of an exemplary electronic device 100 suitable for implementing embodiments herein is shown. Figure 1 The electronic device 100 shown is merely an example and should not limit the functionality and scope of use of the embodiments of this document.
[0036] like Figure 1 As shown, components of the electronic device 100 may include, but are not limited to: one or more processors 110 , a memory 120 , a communication bus 140 connecting different system components (including the memory 120 and the processor 110 ), and a communication interface 130 .
[0037] The communication bus 140 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.
[0038] The electronic device 100 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the device, including volatile and non-volatile media, removable and non-removable media.
[0039] The memory 120 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The device may further include other removable / non-removable, volatile / non-volatile computer system storage media. Figure 1 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (CD-ROM), a digital versatile disc read only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the communication bus 140 via one or more data medium interfaces. The memory 120 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments herein.
[0040] A program / utility having a set (at least one) of program modules may be stored in memory 120, such program modules including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules generally perform the functions and / or methods of the embodiments described herein.
[0041] The electronic device 100 may also communicate with one or more external devices (e.g., keyboard, pointing device, display, etc.), one or more devices that enable a user to interact with the device, and / or any device that enables the device to communicate with one or more other devices (e.g., network card, modem, etc.). Such communication may be performed via the communication interface 130. Furthermore, the electronic device 100 may also communicate with the network adapter ( Figure 1 The network adapter can communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the communication bus 140. It should be understood that although Figure 1Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Drives; hereinafter referred to as: RAID) systems, tape drives, and data backup storage systems.
[0042] The processor 110 executes various functional applications and data processing by running the programs stored in the memory 120, such as implementing the methods provided in the embodiments of this document.
[0043] It is understandable that the interface connection relationship between the modules illustrated in the embodiments of this document is only for illustrative purposes and does not constitute a structural limitation on the electronic device 100. In other embodiments of this document, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0044] Next, combine Figure 2-Figure 4 The angle adjustment method provided in the embodiment of the present application is exemplified.
[0045] like Figure 2 The figure is a flow chart of an embodiment of the angle adjustment method provided by the present application, which specifically includes the following steps:
[0046] Step 201: In response to a detected trigger event, the electronic device adjusts the ToF angle.
[0047] Specifically, the above-mentioned trigger events may include trigger events under the following three scenarios. When the electronic device detects any trigger event under the following three scenarios, it can adjust the angle of the ToF sensor (for the convenience of explanation, the angle of the ToF sensor will be referred to as the ToF angle below).
[0048] Scenario 1: Trigger the adjustment of ToF angle through a task created in the application.
[0049] In scenario 1, the trigger event may be based on a task created in an application. For example, a user may open an application and create a task in the application, wherein the task may include one or more corresponding spaces. Then, the electronic device may adjust the ToF angle according to the one or more spaces corresponding to the task, so as to capture the one or more spaces corresponding to the task through the ToF sensor, thereby creating a corresponding virtual world based on the captured real scene.
[0050] Taking the screen hanging task as an example, a user can open an application and create a screen hanging task in the application, where the screen hanging task can be associated with spaces such as walls, floors, and ceilings. Then, the electronic device can capture the surrounding environment image through the ToF sensor to determine the surrounding environment type. The surrounding environment type can include spaces such as floors, walls, desktops, and ceilings.
[0051] After the ToF sensor of the electronic device captures an image of the surrounding environment at the current angle, the surrounding environment type corresponding to the current angle can be determined based on the surrounding environment image captured at the current angle. For example, assuming that the environment image captured by the ToF sensor at the current angle is a ceiling, the surrounding environment type is a ceiling; or, assuming that the environment image captured by the ToF sensor at the current angle is a wall, the surrounding environment type is a wall; or, assuming that the environment image captured by the ToF sensor at the current angle is a floor, the surrounding environment type is a floor.
[0052] Next, the electronic device can adjust the ToF angle according to the created task so as to shoot other spaces corresponding to the created task. For example, assuming that the electronic device has already shot the wall, since the created task corresponds to the wall, floor, ceiling and other spaces, the electronic device can then shoot any one of the floors and ceilings, that is, the ToF sensor can be rotated to an angle corresponding to any one of the floors and ceilings to shoot the corresponding space; or, assuming that the electronic device has already shot the floor, since the created task corresponds to the wall, floor, ceiling and other spaces, the electronic device can then shoot any one of the walls and ceilings, that is, the ToF sensor can be rotated to an angle corresponding to any one of the walls and ceilings to shoot the corresponding space; assuming that the electronic device has already shot the ceiling, since the created task corresponds to the wall, floor, ceiling and other spaces, the electronic device can then shoot any one of the floors and walls, that is, the ToF sensor can be rotated to an angle corresponding to any one of the floors and walls to shoot the corresponding space.
[0053] Scenario 2: Trigger the adjustment of ToF angle according to the posture of the electronic device.
[0054] In scenario 2, since the ToF sensor is installed on the electronic device, the ToF angle adjustment can be triggered as the posture of the electronic device changes.
[0055] Among them, the posture of the electronic device can be the orientation of the electronic device. For example, taking the electronic device as a helmet, when the user looks up with the helmet on, the helmet is oriented upward, that is, the posture of the helmet is upward; or, when the user lowers his head with the helmet on, the helmet is oriented downward, that is, the posture of the helmet is downward; or, when the user turns left with the helmet on, the helmet is oriented left, that is, the posture of the helmet is left; or, when the user turns right with the helmet on, the helmet is oriented right, that is, the posture of the helmet is right.
[0056] It is understandable that the above examples only illustrate the postures of electronic devices such as up, down, left, and right, but do not constitute a limitation on the embodiments of the present application. In some embodiments, postures of other types of electronic devices may also be included.
[0057] After determining that the posture change of the electronic device is determined, the ToF angle adjustment can be triggered according to the posture change of the electronic device. Exemplarily, still taking the electronic device as a helmet as an example, when the user looks up, that is, when the posture of the helmet changes upward, the ToF angle can be adjusted upward accordingly, so as to better change the field of view according to the posture change of the helmet. Alternatively, when the user lowers his head, that is, when the posture of the helmet changes downward, the ToF angle can be adjusted downward accordingly. Alternatively, when the user turns left with the helmet, that is, when the posture of the helmet changes to the left, the ToF angle can be adjusted to the left accordingly. Alternatively, when the user turns right with the helmet, that is, when the posture of the helmet changes to the right, the ToF angle can be adjusted to the right accordingly.
[0058] Scenario 3: Triggering the adjustment of ToF angle through gestures.
[0059] In scenario 3, the user can trigger the adjustment of the ToF angle through gestures, wherein the user's gestures may include but are not limited to click, pinch, grab, drag and other actions.
[0060] Exemplarily, the user can perform gesture operations in the virtual world. In response to the detected user gesture, the electronic device can adjust the ToF angle. It is understandable that the adjustment of the ToF angle can correspond to the gesture in advance, so that after any gesture is detected, the corresponding ToF angle can be adjusted according to the detected gesture. For example, assuming that the upward drag gesture is preset to correspond to the upward adjustment of the ToF angle, when the user performs the upward drag gesture, the electronic device can adjust the ToF angle upward.
[0061] After the electronic device determines the ToF angle adjustment, the ToF angle can be adjusted in the following two ways.
[0062] Method 1: Adjust the ToF angle through motor drive.
[0063] In method 1, the electronic device may include a rotating module, and the rotating module may be used to adjust the ToF angle. The rotating module may include components such as a motor and a screw.
[0064] Now combined Figure 3 The mechanical structure of the rotating module of method 1 is exemplified. Figure 3 , the screw rod 310 is fixed on the ToF bracket 320, and the motor 330 is electrically connected to the circuit of the electronic device. When the electronic device determines to adjust the ToF angle, it can send an adjustment signal to the motor 330, and the adjustment signal can include the adjusted ToF angle. Then, when the motor 330 receives the adjustment signal, it can rotate, thereby driving the screw rod 310, and the screw rod 310 can drive the ToF bracket 320, so that the ToF angle can be adjusted.
[0065] Optionally, the electronic device may further include a reduction box 340 , and when the motor 330 rotates, the lead screw may be driven by the reduction box 340 .
[0066] Method 2: Adjust the ToF angle through electromagnetic drive.
[0067] In method 2, the electronic device may include a rotating module, and the rotating module may be used to adjust the ToF angle. The rotating module may include components such as a coil support, an electric coil, and a magnet.
[0068] Now combined Figure 4 The mechanical structure of the rotating module of method 2 is exemplified. Figure 4 The coil support 410 is fixed on the ToF support 420 to ensure the uniformity of rotation. Two electric coils 430 are wound on the coil support 410, facing the two sides of the magnet 440. The electric coils 430 can be energized to form a magnetic field, so that magnetic poles can be formed according to the left-hand rule of the electromagnetic field, and then the ToF support 420 is driven by the attraction of the magnet to adjust the ToF angle.
[0069] Optionally, after step 201, step 202 may be further included.
[0070] Step 202: The electronic device places a virtual object in a virtual scene.
[0071] Specifically, when the electronic device changes the field of view by adjusting the ToF angle, it can capture images within different field of view. After the electronic device captures the real scene through the ToF sensor, it can create a corresponding virtual scene from the captured real scene, so that after the virtual scene is created, virtual objects can be placed in the virtual scene.
[0072] Figure 5This is a schematic diagram of the structure of an embodiment of the angle adjustment device of the present application. Figure 5 As shown, the above-mentioned angle adjustment device 50 is applied to electronic equipment, and the angle adjustment device 50 may include: an adjustment module 51; wherein,
[0073] The adjustment module 51 is configured to adjust the angle of the ToF sensor in response to a detected trigger event.
[0074] In one possible implementation, the adjustment module 51 is specifically configured to adjust the angle of the ToF sensor in response to a detected task created by a user in an application.
[0075] In one possible implementation, the task corresponds to one or more spaces, and the adjustment module 51 is specifically used to adjust the angle of the ToF sensor to one or more spaces corresponding to the task in response to a detected task created by the user in the application.
[0076] In one possible implementation manner, the adjustment module 51 is specifically configured to adjust the angle of the ToF sensor in response to detecting a change in the posture of the electronic device.
[0077] In one possible implementation, the posture of the electronic device includes the orientation of the electronic device, and the adjustment module 51 is specifically configured to adjust the angle of the ToF sensor toward the first direction in response to detecting that the electronic device is turned to the first direction.
[0078] In one possible implementation manner, the adjustment module 51 is specifically configured to adjust the ToF sensor to an angle corresponding to a detected gesture of the user in response to the detected gesture.
[0079] In one possible implementation, the electronic device includes a motor and a screw, the screw is fixed on the bracket of the ToF sensor, and the adjustment module 51 is specifically used to drive the screw through the motor so that the screw drives the ToF sensor to adjust the angle of the ToF sensor.
[0080] In one possible implementation, the electronic device includes a coil bracket, an electric coil and a magnet, the coil bracket is fixed on the bracket of the ToF sensor, the electric coil is wound on the coil bracket, and the electric coil is directly opposite to the two sides of the magnet, and the adjustment module 51 is specifically used to drive the coil bracket through the attraction between the magnetic field formed by the electric coil and the magnet, so that the coil bracket drives the ToF sensor to adjust the angle of the ToF sensor.
[0081] Figure 5The angle adjustment device 50 provided in the illustrated embodiment can be used to implement the technical solution of the method embodiment illustrated in the present application. Its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.
[0082] It should be understood that the above Figure 5 The division of the various modules of the angle adjustment device 50 shown is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the detection module can be a separately established processing element, or it can be integrated in a chip of an electronic device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. In the implementation process, each step of the above method or the above modules can be completed by the hardware integrated logic circuit in the processor element or the instructions in the form of software.
[0083] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0084] In the above embodiments, the processor involved may include, for example, a CPU, a DSP, a microcontroller or a digital signal processor, and may also include a GPU, an embedded neural network processor (Neural-network Process Units; hereinafter referred to as: NPU) and an image signal processor (Image Signal Processing; hereinafter referred to as: ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASIC, or one or more integrated circuits for controlling the execution of the program of the technical solution of the present application. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium.
[0085] An embodiment of the present application also provides a readable storage medium, in which a program is stored. When the program is run on an electronic device, the electronic device executes the method provided by the embodiment shown in the present application.
[0086] An embodiment of the present application also provides a program product, which includes a program. When the program product is run on an electronic device, the electronic device executes the method provided by the embodiment shown in the present application.
[0087] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0088] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0089] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0090] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk and other media that can store program codes.
[0091] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An angle adjustment method, characterized in that: Applied to an electronic device, the electronic device includes a ToF sensor, and the method includes: In response to a detected trigger event, an angle of the ToF sensor is adjusted.
2. The method according to claim 1, characterized in that In response to the detected trigger event, adjusting the angle of the ToF sensor includes: In response to detecting a task created by a user in an application, an angle of the ToF sensor is adjusted.
3. The method according to claim 2, characterized in that The task corresponds to one or more spaces, and in response to detecting a task created by a user in an application, adjusting the angle of the ToF sensor comprises: In response to detecting a task created by a user in an application, the angle of the ToF sensor is adjusted to one or more spaces corresponding to the task.
4. The method according to claim 1, characterized in that: In response to the detected trigger event, adjusting the angle of the ToF sensor includes: In response to detecting a change in the posture of the electronic device, an angle of the ToF sensor is adjusted.
5. The method according to claim 4, characterized in that The posture of the electronic device includes the orientation of the electronic device, and in response to detecting a change in the posture of the electronic device, adjusting the angle of the ToF sensor includes: In response to detecting that the electronic device is rotated to a first direction, the angle of the ToF sensor is adjusted toward the first direction.
6. The method according to claim 1, characterized in that In response to the detected trigger event, adjusting the angle of the ToF sensor includes: In response to a detected gesture of a user, the ToF sensor is adjusted to an angle corresponding to the gesture.
7. The method according to any one of claims 1 to 6, characterized in that: The electronic device includes a motor and a screw, the screw is fixed on a bracket of the ToF sensor, and the adjusting the angle of the ToF sensor includes: The motor drives the lead screw so that the lead screw drives the ToF sensor to adjust the angle of the ToF sensor.
8. The method according to any one of claims 1 to 6, characterized in that: The electronic device includes a coil bracket, an electric coil and a magnet, wherein the coil bracket is fixed on a bracket of the ToF sensor, the electric coil is wound on the coil bracket, and the electric coil is directly opposite to two sides of the magnet, and the adjusting the angle of the ToF sensor includes: The coil bracket is driven by the attraction between the magnetic field formed by the electric coil and the magnet, so that the coil bracket drives the ToF sensor to adjust the angle of the ToF sensor.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store a program; and the processor is used to run the program to implement the angle adjustment method as described in any one of claims 1 to 8.
10. A readable storage medium, characterized in that: The readable storage medium stores a program, and when the program is run on an electronic device, the angle adjustment method as described in any one of claims 1 to 8 is implemented.