CN111982037B - Height measuring method and electronic equipment - Google Patents
Height measuring method and electronic equipment Download PDFInfo
- Publication number
- CN111982037B CN111982037B CN201910433040.8A CN201910433040A CN111982037B CN 111982037 B CN111982037 B CN 111982037B CN 201910433040 A CN201910433040 A CN 201910433040A CN 111982037 B CN111982037 B CN 111982037B
- Authority
- CN
- China
- Prior art keywords
- main body
- display screen
- electronic device
- detected
- electronic equipment
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B21/00—Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant
- G01B21/02—Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring length, width, or thickness
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B7/00—Measuring arrangements characterised by the use of electric or magnetic techniques
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B7/00—Measuring arrangements characterised by the use of electric or magnetic techniques
- G01B7/02—Measuring arrangements characterised by the use of electric or magnetic techniques for measuring length, width or thickness
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C5/00—Measuring height; Measuring distances transverse to line of sight; Levelling between separated points; Surveyors' levels
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01D—MEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
- G01D21/00—Measuring or testing not otherwise provided for
- G01D21/02—Measuring two or more variables by means not covered by a single other subclass
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the invention provides a height measuring method applied to electronic equipment. The electronic device includes at least a first body, a second body, and a first connection shaft connecting the first body and the second body, the first body and the second body being rotatable about the first connection shaft. The user places an object to be measured on the first body and rotates the second body to measure the height of the object to be measured. The method comprises the following steps: the electronic equipment detects whether the object to be detected is in contact with the second main body; the electronic equipment identifies an included angle between the first main body and the second main body; when the object to be detected is in contact with the second main body, the electronic equipment identifies the distance from the contact point of the object to be detected and the second main body to the first connecting shaft; the electronic equipment calculates the height of the object to be measured according to the included angle and the distance; the electronic device outputs the height of the object to be measured.
Description
Technical Field
The embodiment of the invention relates to the technical field of electronics, in particular to a method for measuring height and electronic equipment.
Background
With the continuous development of electronic technology, electronic devices such as mobile phones have more and more functions and more abundant experience. For example, the user may measure the size of the object by a cell phone.
In the prior art, one implementation scheme for length measurement is as follows:
as shown in fig. 1, the electronic device displays a virtual measuring ruler 101 on the display screen. The user can measure the height of the object 102 through the straight ruler 101. The user aligns the "0" scale of the straight edge 101 with the start point of the measurement target, and reads the value corresponding to the end point of the measurement target, so as to measure the height. Illustratively, the height of the measurement target is 8.5 centimeters, as shown in FIG. 1.
The length measuring method in the prior art has the defect of complicated measuring operation.
Disclosure of Invention
The embodiment of the application provides a method and electronic equipment for measuring height, and a user can measure the height of an object conveniently.
In a first aspect, an embodiment of the present application provides a height measuring method applied to an electronic device. The electronic device comprises at least a first body, a second body and a first connecting shaft connecting the first body and the second body, wherein the first body and the second body are rotatable around the first connecting shaft.
A possible height measuring method, in which an object to be measured is placed on the first body, and a user rotates the second body to bring the second body into contact with the object to be measured, the method specifically comprising: the electronic equipment detects whether the object to be detected is contacted with the second main body; the electronic equipment identifies an included angle between the first main body and the second main body; When the object to be detected is in contact with the second main body, the electronic equipment identifies the distance from the contact point of the object to be detected and the second main body to the first connecting shaft; the electronic equipment obtains the height of the object to be measured according to the included angle and the distance; and the electronic equipment outputs the height of the object to be measured. Wherein, the electronic device adopts the formula h ═ L 1 Calculating the height h, L of the object to be detected by using x sin alpha 1 Is the distance from the contact to the first connecting shaft, and a is the angle between the first body and the second body.
Another possible height measuring method includes placing an object to be measured between a first body and a second body, and rotating the first body and/or the second body by a user to make the object to be measured contact with the first body and the second body, respectively, the method specifically includes: the electronic equipment detects whether the object to be detected is in contact with the first main body; the electronic equipment detects whether the object to be detected is in contact with the second main body; the electronic equipment detects the included angle between the first main body and the second main body; when the object to be detected is in contact with the first main body, the electronic equipment identifies a first distance from a first contact of the object to be detected and the first main body to the first connecting shaft; when the object to be detected is in contact with the second main body, the electronic equipment identifies a second distance from a second contact of the object to be detected and the second main body to the first connecting shaft; the electronic equipment obtains the height of the object to be measured according to the included angle, the first distance and the second distance. Wherein the electronic device adopts a formula h 2 =L 2 2 +L 3 2 -2L 2 L 3 And calculating by cos alpha to obtain the height h of the object to be detected. Wherein L is 2 Is a first distance, L, from the first contact to the first connecting shaft 3 Is a second distance from the second contact to the first connecting shaft, and a is an included angle between the first body and the second body.
Thus, by rotating the main body to be in contact with the object to be measured, the user can conveniently measure the height of the object.
Wherein the angle between the bodies can be identified in different ways. In one possible way, it can be recognized by the pressure sensor whether the object to be measured is in contact with the body.
In a possible design method, the electronic device may first detect whether to contact an object to be detected, and after the electronic device detects that the electronic device contacts the object to be detected, identify an included angle between the first main body and the second main body, specifically: the electronic equipment identifies the included angle between the first main body and the second main body as follows: in response to the object to be measured contacting the second body, the electronic device identifies an included angle between the first body and the second body. The electronic equipment identifies an included angle between the first main body and the second main body as follows: in response to the object to be detected contacting the second main body and the object to be detected contacting the first main body, the electronic device identifies an included angle between the first main body and the second main body.
In one possible design method, the electronic device may trigger the detection of whether the electronic device is in contact with the object to be detected in response to a first input from a user, specifically: the electronic equipment receives a first input; in response to the first input, the electronic device detects whether an object to be measured is in contact with the body.
In a second aspect, an embodiment of the present application provides an electronic device. The electronic device includes a first body, a second body, a first connecting shaft, a processor, and a memory for storing a computer program. The first connecting shaft is used for connecting the first main body and the second main body, and the first main body and the second main body can rotate around the first connecting shaft; the computer program comprises instructions which, when executed by the processor, cause the electronic device to perform the method according to any of the first aspect.
In a third aspect, the present application provides a computer storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method according to any of the first aspect.
In a fourth aspect, the present application provides a computer program product for causing an electronic device to perform the method according to any of the first aspect when the computer program product is run on the electronic device.
In a fifth aspect, the present application provides a graphical user interface, which specifically includes a graphical user interface displayed by an electronic device when executing any one of the methods of the first aspect.
It is to be understood that the electronic device according to the second aspect, the computer storage medium according to the third aspect, the computer program product according to the fourth aspect, and the graphical user interface according to the fifth aspect are all configured to execute the corresponding method provided above, and therefore, the beneficial effects achieved by the electronic device according to the second aspect, the computer storage medium according to the third aspect, the computer program product according to the fourth aspect, and the graphical user interface according to the fifth aspect may refer to the beneficial effects of the corresponding method provided above, and are not repeated herein.
Drawings
Fig. 1 shows a method for measuring height according to the prior art.
Fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 3 is a block diagram of a software structure of an electronic device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of another electronic device provided in the embodiment of the present application;
fig. 5 is a schematic structural diagram of another electronic device provided in the embodiment of the present application;
fig. 6 is a schematic view of a scenario of a method for measuring height according to an embodiment of the present disclosure;
FIG. 7 is a schematic view of a scenario of another method for measuring height according to an embodiment of the present application;
FIG. 8 is a schematic view of a scenario of another method for measuring height according to an embodiment of the present application;
fig. 9 is a schematic view of a scene of another method for measuring height according to an embodiment of the present application;
FIG. 10 is a schematic diagram illustrating a scenario of another method for measuring height according to an embodiment of the present application;
fig. 11 is a schematic view of a scene of another method for measuring height according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of another electronic device provided in the embodiment of the present application;
fig. 13 is a schematic structural diagram of still another electronic device according to an embodiment of the present application;
fig. 14 is a schematic view of a scene of another method for measuring height according to an embodiment of the present application;
FIG. 15 is a schematic flow chart illustrating a method for measuring height according to an embodiment of the present disclosure;
FIG. 16 is a schematic diagram illustrating a scenario of another method for measuring height according to an embodiment of the present application;
fig. 17 is a schematic view of a scene of another method for measuring height according to an embodiment of the present application;
fig. 18 is a schematic view of a scene of another method for measuring height according to an embodiment of the present application.
Detailed Description
It should be noted that, in the embodiment of the present application, descriptions of "first" and "second" are used to distinguish different messages, devices, modules, and the like, and do not represent a sequential order, nor limit that "first" and "second" are different types.
The term "a and/or B" in the embodiment of the present application is only one kind of association relationship describing the associated object, and means that there may be three kinds of relationships, for example, there are three cases of a alone, a and B simultaneously, and B alone. In addition, the character "/" in the embodiment of the present application generally indicates that the preceding and following related objects are in an "or" relationship.
Some of the flows described in the embodiments of the present application include operations that occur in a particular order, but it should be understood that the operations may be performed out of order or in parallel as they occur in the embodiments of the present application, and the order numbers of the operations, such as 101, 102, etc., are merely used to distinguish between the various operations, and the order numbers themselves do not represent any order of execution. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel.
The method for measuring the height can be applied to electronic equipment. By way of example, the electronic device may be, for example: a Mobile phone, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a digital camera, a Personal Digital Assistant (PDA), a navigation Device, a Mobile Internet Device (MID), a vehicle-mounted Device, a Wearable Device (Wearable Device), or the like.
Fig. 2 shows a schematic structural diagram of the electronic device 100.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than illustrated, or some components may be combined, some components may be separated, or a different arrangement of components may be used. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K via an I2C interface, such that the processor 110 and the touch sensor 180K communicate via an I2C bus interface to implement the touch functionality of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may communicate audio signals to the wireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 can also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then passed to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves via the antenna 2 to radiate it.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology, and the like. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou satellite navigation system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal for output, and also used to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a hands-free call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into a sound signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes.
The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. When a force acts on a certain point of the pressure sensor 180A, the capacitance of the point changes. By detecting the capacitance change of each point of the pressure sensor 180A, the pressure sensor 180A can detect the touched position and output the coordinates of the touched point.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used to photograph anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is at rest. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, shooting a scene, the electronic device 100 may utilize the distance sensor 180F to range for fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from a nearby object using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocking and locking the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, electronic device 100 performs a boost on the output voltage of battery 142 when the temperature is below a further threshold to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation acting thereon or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic device 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for both an incoming call vibration prompt and a touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, information receiving, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be attached to and detached from the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out from the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with an external memory card. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device 100 may employ a hierarchical architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention uses an Android system with a hierarchical architecture as an example to exemplarily explain a software structure of the electronic device 100.
Fig. 3 is a block diagram of the software configuration of the electronic device 100 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. And the layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 3, the application packages may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 3, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and answered, browsing history and bookmarks, phone books, and the like.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to construct an application. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. Such as prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), Media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The following describes exemplary workflow of the software and hardware of the electronic device 100 in connection with capturing a photo scene.
When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, timestamp of the touch operation, and other information). The raw input events are stored in the kernel layer. And the application program framework layer acquires the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and taking a control corresponding to the click operation as a control of a camera application icon as an example, the camera application calls an interface of an application framework layer, starts the camera application, further starts a camera drive by calling a kernel layer, and captures a still image or a video through the camera 193.
In the present embodiment, the display screen 194 may be deformable. The deformable display screen 194 may be referred to as a "flexible screen". By deformed, it is meant that a radius of curvature of a portion of the display screen 194 of the electronic device is less than a reference value. For example, the deformation may be any one of bending, twisting, curling, and combinations thereof. In the following embodiments, the structure of the electronic device relating to the modification of the display screen 194 will be described in more detail with reference to the drawings.
The electronic device is exemplarily illustrated as a double-folding mobile phone. Fig. 4 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present disclosure. As shown in fig. 4(a), the electronic apparatus 100 includes: a connection unit 301, a main body 302, a main body 303, and a display screen 194. Wherein the connecting unit 301 is used to connect the main body 302 and the main body 303. The body 302 and the body 303 may be the same size or different sizes. The thickness of the body 302 and the body may be the same. The display screen 194 covers the connection unit 301, the main body 302, and the main body 303. The display screen 194 may be bent inward or outward by the connection unit to change an angle between the bodies. As shown in fig. 4(b), an angle a between the main body 302 and the main body 303 is an included angle between the main body 302 and the main body 303 (i.e., an angle smaller than 180 degrees).
Illustratively, as shown in fig. 5(a) and 5(b), the electronic device is in a flat state, which may also be referred to as an unfolded state. At this time, the main body 302 and the main body 303 are located on the same horizontal plane. The angle a between the body 302 and the body 303 is 180 degrees. As the user bends the display screen 194, the electronic device may be moved from a flat state to a folded state, or from a folded state to a flat state. As shown in fig. 5(b) and 5(d), the electronic apparatus is in a folded state. At this time, the main body 302 and the main body 303 are parallel to each other, the display screen 194 faces the inside of the electronic apparatus, and an angle α between the main body 302 and the main body 303 is 0 degree. When the display screen 194 is folded inward from the flat state to the folded state, the main body 302 and/or the main body 303 is/are rotated inward about the axis of the connection unit (as shown by the dotted line in fig. 5 (a)), the angle between the main body 302 and the main body 303 is gradually reduced, and the angle between the main body 302 and the main body 303 is gradually reduced from 180 degrees to 0 degree. The display screen 194 is folded outward from the folded state to the flat state, the main body 303 and/or the main body 303 is/are rotated outward about the axis of the connection unit, the angle between the main body 302 and the main body 303 is gradually increased, and the angle between the main body 302 and the main body 303 is increased from 0 degree to 180 degrees.
As shown in fig. 6(a) to 6(b), an object 500 to be tested is placed on any one of the main bodies of the electronic apparatus (e.g., the main body 302), and the other main body of the electronic apparatus (e.g., the main body 303) is bent inward so that the other main body rotates around the connection unit (e.g., the connection unit 301) until the object 500 to be tested comes into contact with the other main body. For example, the object 500 to be tested is in contact with the main body 303, the contact point being a point 600. Then, as shown in fig. 6(c), according to the sine law, the calculation formula of the height h of the object to be measured is shown as formula 1:
h=L 1 xsin alpha (formula 1)
Where, a is an angle between the two bodies (e.g., the angle between the body 302 and the body 303). As shown in FIG. 6(d), L 1 Is the distance from the contact (e.g., point 600) to the connection unit (e.g., connection unit 301). The distance from the contact to the connection unit is the distance from the contact to the axis of the connection unit. For convenience of description, the axis of the connection unit may be referred to as a connection shaft.
That is, if the angle a between the two bodies and the distance L from the contact to the connection unit connecting the two bodies can be known 1 The height h of the object to be measured can be calculated.
Electronic device 100 may detect the position of a contact (e.g., point 600) via pressure sensor 180A. When the user bends the main body 303 inward and the main body 303 rotates inward about the axis of the connection unit 301 to contact the object 500, a force acts on the pressure sensor 180A. The electronic device 100 may determine the position of the contact point based on the capacitance change of each point detected by the pressure sensor, and output the coordinates of the contact point.
For example, the electronic device 100 may include a plurality of pressure sensors 180A respectively disposed at the respective bodies. For example, as shown in fig. 7(a) and 7(c), the electronic device may include a pressure sensor 700a and a pressure sensor 700b, the pressure sensor 700a being disposed on the main body 302 and the pressure sensor 700b being disposed on the main body 303. When a force acts on the pressure sensor 700a or 700b, the capacitance of the point changes, and the pressure sensor 700a or 700b determines the position of the point and outputs the coordinates of the point. Wherein the coordinate system is shown in FIG. 7(a) and FIG. 7(c), and x 1 The axis is the horizontal direction of the plane of the body 302; y is 1 The axis being in the plane of the body 302 and x 1 The direction of the axis is vertical; the x2 axis is the horizontal direction of the plane of the body 303; the y2 axis is the direction perpendicular to the x2 axis in the plane of the main body 303.
For example, as shown in fig. 7(b), the object 500 to be measured is placed on the main body 302, the main body 303 is bent inward, the main body 303 is rotated inward around the axis of the connection unit 301 until contacting the object 500, a force acts on the point 600, the capacitance at the point 600 changes, the pressure sensor 700b determines the position of the point 600, and the coordinates (x, y) of the point 600 are output. It will be appreciated that, at this time, the distance L 1 I.e., the abscissa x of the contact point (e.g., point 600). Alternatively, as shown in fig. 7(d), the object 500 to be measured is placed on the main body 303, the main body 302 is bent inward, the main body 302 is rotated inward around the axis of the connection unit 301 until contacting the object 500, a force acts on the point 601, the capacitance at the point 601 changes, the pressure sensor 700a determines the position of the point 601, and the coordinates (x, y) of the point 601 are output. It will be appreciated that, at this time, the distance L 1 I.e., the width W of the body 302 1 The difference from the abscissa x of the contact point (e.g., point 600).
Alternatively, the pressure sensor provided on the plurality of bodies may be one pressure sensor. For example, as shown in fig. 8(a) and 8(c), the electronic device may include a pressure sensor 701, and the pressure sensor 701 is disposed at the main body 302 and the main body 303. When a force acts on the pressure sensor 701, the capacitance of the point changes, and the pressure sensor 701 determines the position of the point and outputs the coordinates of the point. Wherein the coordinate system is shown in FIG. 8(a) and FIG. 8(c), and x 3 The axis is the horizontal direction of the plane of the display screen 194; y is 3 The axis being in the plane of the display screen 194 and x 3 The axis is vertical.
For example, as shown in fig. 8(b), the object 500 to be measured is placed on the main body 302, the main body 303 is bent inward, the main body 303 is rotated inward around the axis of the connection unit 301 until being in contact with the object, a force acts on the point 600, the capacitance at the point 600 changes, the pressure sensor 701 determines the position of the point 600, and the coordinates (x, y) of the point 600 are output. It will be appreciated that, at this time, the distance L 1 Namely, the contact (e.g., point 600)Is different from the abscissa x of the touch point (e.g., point 600). Alternatively, as shown in fig. 8(d), the object 500 to be measured is placed on the main body 303, the main body 302 is bent inward, the main body 302 is rotated inward around the axis of the connection unit 301 until contacting the object 500, a force acts on the point 601, the capacitance at the point 601 changes, the pressure sensor 701 determines the position of the point 601, and the coordinates (x, y) of the point 601 are output. It will be appreciated that, at this time, the distance L 1 I.e., the width W of the body 302 1 The difference from the abscissa x of the contact point (e.g., point 600).
In summary, the electronic device can recognize the distance L from the contact to the connection unit through the pressure sensor 1 。
The electronic device 100 may identify an angle between the bodies (e.g., an angle between the body 302 and the body 303). For example, the electronic apparatus 100 may recognize an angle between the bodies through the acceleration sensor 180E. Illustratively, the electronic apparatus 100 includes a plurality of acceleration sensors 180E, respectively provided in the respective bodies. The electronic apparatus may detect the magnitude of acceleration of each axis (e.g., x-axis, y-axis, and z-axis) of each body through an acceleration sensor provided in each body (e.g., body 302, body 303), determine the posture of each body (e.g., the posture of body 302 and the posture of body 303) from the detected magnitude of acceleration of each axis, and further determine the angle between any body and another body (e.g., determine the angle between body 302 and body 303 from the posture of body 302 and the posture of body 303).
Taking the dual-folding mobile phone described in fig. 4 as an example, the electronic device 100 may include a first acceleration sensor and a second acceleration sensor. Wherein, the first acceleration sensor is arranged on the main body 302; the second acceleration sensor is provided to the main body 303. The first acceleration sensor detects acceleration of the body 302 in the x1, y1, and z1 axes, respectively. Illustratively, the x1, y1, and z1 axes are shown in FIG. 9(a), with the x1 axis being horizontal to the plane of the body 302; the y1 axis is the direction perpendicular to the x1 axis in the plane of the body 302; the z1 axis is a direction perpendicular to the plane of the body 302. The second acceleration sensor detects the acceleration of the body 303 in the x2, y2, and z2 axes, respectively. Illustratively, the x2, y2, and z2 axes are shown in FIG. 9(a), with the x2 axis being horizontal to the plane of the body 303; the y2 axis is the direction perpendicular to the x2 axis in the plane of the body 303; the z2 axis is a direction perpendicular to the plane of the body 303.
The electronic apparatus 100 may determine the posture of each body from the accelerations of the respective axes detected by the acceleration sensors provided in each body. For example, the electronic device 100 may determine the pose of the body 302 from accelerations of the x1, y1, and z1 axes, and the pose of the body 303 from accelerations of the x2, y2, and z2 axes. For example, the electronic device 100 may calculate the angle θ between the z1 axis and the horizontal direction according to the accelerations of the x1, the y1, and the z1 axis z1 The angle theta between the z2 axis and the horizontal direction is calculated according to the acceleration of the x2, y2 and z2 axes z2 . The calculation formula is shown in formula 2:
wherein a is z Acceleration of the x-axis, a y Acceleration in the y-axis, a z Is the z-axis acceleration. Theta z Is the angle between the z-axis and the horizontal.
The electronic device 100 can determine an angle between two subjects according to the postures of either subject and the other subject. For example, the electronic device 100 may determine the angle between the body 302 and the body 303 from the postures of the body 302 and the body 303. It is understood that the electronic device may be oriented at an angle θ to the horizontal according to the z1 axis, as shown in FIG. 9(b) z1 The angle theta between the z2 axis and the horizontal z2 An angle α between the main body 302 and the main body 303 is obtained through calculation, and a calculation formula is shown as formula 3:
ɑ=180+θ Z1 -θ Z2 (formula 3)
It should be noted that, in the embodiment of the present application, the angle between the main body 302 and the main body 303 is calculated according to the included angle between the z1 axis and the horizontal direction and the included angle between the z2 axis and the horizontal direction, and it is understood that the method for calculating the angle between the main body 302 and the main body 303 is not limited to the method for calculating the angle between the main body 302 and the main body 303This is done. For example, the electronic device 100 may be oriented according to the included angle θ between the x1 axis and the horizontal direction x1 The angle theta between the x2 axis and the horizontal x2 The angle between the main body 302 and the main body 303 is calculated as shown in equation 4:
ɑ=180-(θ x1 -θ x2 ) (formula 4)
The electronic device 100 can calculate the included angle θ between the x1 axis and the horizontal direction according to the accelerations of the x1, the y1 and the z1 axis x1 Calculating the included angle theta between the x2 axis and the horizontal direction according to the acceleration of the x2, the y2 and the z2 axes x2 . The calculation formula is shown in formula 5:
alternatively, the electronic device 100 may determine the angle between the bodies through the gyro sensor 180B. For example, the electronic device may include a plurality of gyro sensors respectively provided in the bodies. The electronic apparatus may detect angular velocities of respective axes (e.g., x-axis, y-axis, and z-axis) of respective bodies (e.g., body 302, body 303) by gyro sensors provided in the respective bodies, may determine postures of the respective bodies (e.g., posture of body 302 and posture of body 303) from the detected angular velocities of the respective axes, and may further determine an angle between any one body and another body (e.g., determine an angle between body 302 and body 303 from the posture of body 302 and the posture of body 303).
Taking the bi-fold phone described in fig. 4 as an example, the electronic device 100 may include a first gyro sensor and a second gyro sensor. Wherein, the first gyro sensor is disposed at the main body 302; the second gyro sensor is provided in the main body 303. The electronic device 100 may calculate the posture of the main body 302 from the angular velocity detected by the first gyro sensor, and calculate the posture of the main body 303 from the angular velocity detected by the second gyro sensor; then, from the posture of the body 302 and the posture of the body 303, the electronic device may determine an angle between the body 302 and the body 303.
It should be noted that, in the embodiments of the present application, the method of identifying the angle between the bodies includes, but is not limited to, the above examples. For example, the electronic device 100 may determine an angle between the bodies through the acceleration sensor 180E and the gyro sensor 180B. As another example, the electronic device 100 also includes a rotation sensor. The electronic apparatus 100 may determine an angle between any one body and another body by detecting a rotation angle of the bodies by a rotation sensor.
In summary, the electronic device can identify the included angle (i.e., the angle less than 180 degrees) between the bodies.
Thus, the angle a between the body 302 and the body 303 identified by the electronic device and the distance L from the contact (e.g., point 600 or point 601) to the connection unit 301 1 The electronic device can calculate the height h of the object to be measured (e.g., the object 500), thereby measuring the height of the object. The method for measuring the height utilizes the deformable electronic equipment to measure the height of the object, and is simple to operate.
In the above embodiment, the object to be measured is taken as a cube as an example for description. It can be understood that the method for measuring height provided by the embodiment of the application can be used for measuring the height of objects with various shapes. For example, as shown in fig. 10 (a) and 10(b), the object to be measured may also be an irregularly shaped object such as a cone (e.g., object 501) or a trapezoid (e.g., object 502).
In the above embodiments, the object to be measured is placed on any one of the bodies of the electronic device, and the other body of the electronic device is bent inward. Optionally, according to another method for measuring height provided by the embodiment of the application, the object to be measured can be clamped between any one main body and another main body of the electronic device for measurement.
As shown in fig. 11(a), an object to be measured (e.g., an object 503) is sandwiched between two bodies (e.g., a body 302 and a body 303) so that one end of the object to be measured is in contact with any one body of the electronic apparatus (e.g., the body 303) with a first contact (e.g., a point 602), the other end of the object to be measured is in contact with the other body of the electronic apparatus (e.g., the body 302) with a second contact (e.g., a point 603). According to the cosine law, the calculation formula of the height h of the object to be measured is shown as formula 6:
h 2 =L 2 2 +L 3 2 -2L 2 L 3 cos alpha (formula 6)
Where, a is an angle between the two bodies (e.g., the angle between the body 302 and the body 303). L is 2 Is the distance from the first contact (e.g., point 602) to the connection unit (e.g., connection unit 301). L is 3 Is the distance from the second contact (e.g., point 603) to the connection unit (e.g., connection unit 301).
The distance from the first contact to the connection unit is a distance from the first contact to an axis of the connection unit, and the distance from the second contact to the connection unit is a distance from the second contact to the axis of the connection unit.
Therefore, according to the angle alpha between the two main bodies identified by the electronic equipment and the distance L from the first contact to the connecting unit 1 And a distance L from the second contact to the connection unit 2 The electronic device can calculate the height h of the object to be measured (e.g., the object 503), thereby measuring the height of the object. Wherein the electronic device can recognize the distance L from the first contact to the connection unit by means of the pressure sensor 2 Distance L of the second contact to the connection unit 3 . The electronic device identifies a distance L from the first contact to the connection unit 2 Method L of distance of second contact to connection unit 3 For reference, the above embodiments are not described herein again.
Therefore, the electronic equipment can measure the object to be measured with higher height.
It should be noted that, in the above embodiments, the double-folding mobile phone is taken as an example for description, and it is understood that the electronic device may be connected to more main bodies through more connecting units. For example, the electronic device may be a tri-fold phone. Fig. 12 is a schematic structural diagram of another electronic device 100 according to an embodiment of the present application. As shown in fig. 12, the electronic apparatus 100 includes: a connection unit 401, a connection unit 402, a body 403, a body 404, and a body 405. The connection unit 401 is used to connect the body 403 and the body 404, and the connection unit 402 is used to connect the body 404 and the body 405. The display screen 194 covers the connecting unit 401, the connecting unit 402, the main body 403, the main body 404, and the main body 405. The body 402, 403 and 404 may be the same size or the same thickness. The display screen 194 may be bent inward or outward by the connection unit 401, whereby the main body 403 and the main body 404 may be rotated about an axis (shown by a dotted line on the left side of fig. 12) of the connection unit 401 to change an angle between the main body 403 and the main body 404; the display screen 194 may be bent inward or outward by the connection unit 402, whereby the main body 404 and the main body 405 may be rotated about an axis of the connection unit 403 (as shown by a dotted line on the right side of fig. 12) to change an angle between the main body 404 and the main body 405.
In the above embodiment, the electronic device 100 in which the main body 301 and the main body 302 have the same size is taken as an example for explanation, and it is understood that the main body 302 and the main body 303 may have different sizes. For example, as shown in fig. 13(a), the body 302 may be larger in size than the body 303. The body 403, body 404 and body 405 may also be different sizes. For example, as shown in fig. 13 (b), the sum of the widths of the body 403 and the body 405 is equal to the width of the body 404.
It will be appreciated that, similarly, the electronic device 100 may identify an angle between any two bodies, such as: the angle between body 403 and body 404, the angle between body 404 and body 405, and the angle between body 403 and body 405. A method of identifying an angle between the body 403 and the body 404, a method of identifying an angle between the body 404 and the body 405, and a method of identifying an angle between the body 403 and the body 405. Reference is made to the description of fig. 9, which is not repeated herein.
It is understood that electronic device 100 similarly includes one or more pressure sensors. For example, the electronic device 100 may include pressure sensors 700a, 700b, 700 c. The pressure sensor 700a is provided on the main body 403, the pressure sensor 700b is provided on the main body 404, and the pressure sensor 700c is provided on the main body 405. The electronic device 100 may identify a distance from any contact to the connection unit through the pressure sensor, and the detailed method refers to the description of the above embodiments and is not described herein again.
It is to be understood that, similarly, as shown in fig. 14, an object to be measured is placed on either main body, and then the other main body is brought into contact with the object to be measured by bending the display screen 194. The electronic apparatus 100 identifies an angle a between the arbitrary two bodies and a distance L from the contact to the connection unit 1 According to the angle alpha and the distance L 1 And calculating to obtain the height of the object to be measured. Although not shown in the drawings, an object to be measured may be placed between any two main bodies, the display screen 194 is bent so that one end of the object contacts with any one main body, the other end of the object contacts with the other main body, and then an angle a between the main bodies of the electronic device, a distance L from the first contact to the connection unit 2 And the distance L from the second contact to the connection sheet 3 According to the angle alpha, the distance L 2 And a distance L 3 And calculating to obtain the height of the object to be measured. The detailed process is described with reference to fig. 6 to 11, and is not repeated herein.
The method provided by the embodiment shown in fig. 15 below is applied to the electronic device provided by each of the foregoing embodiments. As shown in fig. 15, an embodiment of the present invention provides a method for measuring height, including:
Wherein the first input is for instructing the electronic device to begin measuring the height of the object.
Illustratively, as shown in fig. 16(a), the user touches an icon 801 to open a measurement application. In response to the icon 801 being touched, the electronic device opens a measurement application. As shown in fig. 16(b) and 16(c), the electronic device may display interface 902 and/or interface 903. Interface 902 or interface 903 may include instructions for informing a user how to measure the height of an object using the electronic device. Interface 902 or interface 903 may include a start measurement button 802. The measurement button 802 is used to instruct the electronic device to start measuring the height of the object. The electronic device receives a first input from a user. Illustratively, the first input may be: the user touches the start measurement button 802.
In step 1503, the electronic device detects whether the object to be detected is in contact with the main body of the electronic device through the pressure sensor.
If so, go to step 1504; if not, step 1503 is repeated.
Specifically, the user places the object to be measured on the first main body, bends the second main body inwards, and the second main body rotates around the axis of the connecting unit until the vertex of the object to be measured contacts the second main body. When the vertex of the object to be measured is in contact with the second main body, a force acts on the pressure sensor arranged on the second main body, the capacitance between the electrodes of the pressure sensor is changed, and the electronic equipment determines that the object to be measured is in contact with the second main body. On the contrary, when the object is not in contact with the second body, the capacitance between the electrodes of the pressure sensor arranged on the second body is not changed, and the electronic device determines that the object to be measured is not in contact with the second body. If the electronic device determines that the object to be tested is in contact with the second body, step 1504 is executed. If the electronic device determines that the object to be tested is not in contact with the second main body, step 1503 is executed repeatedly.
Illustratively, as shown in fig. 17(a) to 17(b), the user places the object 500 to be tested on the main body 302, and bends the main body 303 inward until the vertex a of the object 500 to be tested contacts the main body 303. When a force acts on the pressure sensor 700b, the capacitance between the electrodes of the pressure sensor 700b changes, and the electronic device determines that the object to be measured is in contact with the main body 303. It is understood that, at this time, the first body is the body 302, and the second body is the body 303.
For example, as shown in fig. 17(d) to 17(e), the user places the object 500 to be tested on the main body 404 and bends the main body 405 inward until the vertex a of the object 500 to be tested contacts the main body 405. It will be appreciated that at this point, the first body is body 404 and the second body is body 405.
Alternatively, although not shown in the drawings, the user may place the object between the first body and the second body, and bend the first body and/or the second body inward until one end of the object to be measured contacts the first body and the other end of the object to be measured contacts the second body. When one end of the object to be detected is in contact with the first main body, a force acts on the pressure sensor arranged on the first main body, the capacitance between the electrodes of the pressure sensor is changed, and the electronic equipment determines that the object to be detected is in contact with the first main body. On the contrary, when the object is not in contact with the first body, the capacitance between the electrodes of the pressure sensor arranged on the first body is not changed, and the electronic equipment determines that the object to be measured is not in contact with the first body. When the other end of the object to be measured is in contact with the second main body, a force acts on the pressure sensor arranged on the second main body, the capacitance between the electrodes of the pressure sensor is changed, and the electronic equipment determines that the object to be measured is in contact with the second main body. On the contrary, when the object is not in contact with the second body, the capacitance between the electrodes of the pressure sensor arranged on the second body is not changed, and the electronic device determines that the object to be measured is not in contact with the second body. When the electronic device determines that the object is in contact with the first body and the object is in contact with the second body, step 1504 is performed. When the electronic device determines that the object is not in contact with the first body or the object is not in contact with the second body, step 1503 is repeatedly performed.
At step 1504, the electronic device identifies an angle a between the first body and the second body.
Illustratively, as shown in fig. 17(b), the angle between the first body and the second body is the angle between the body 302 and the body 303. Alternatively, as shown in fig. 17(e), the angle between the first body and the second body is the angle between the body 404 and the body 405. The method for the electronic device to identify the angle between the first body and the second body is described in the above embodiments, and is not repeated here.
Specifically, the electronic apparatus recognizes a distance L from the contact to the connection unit connecting the first body and the second body 1 。
Illustratively, as shown in fig. 17(b), the distance from the contact to the connection unit connecting the first body and the second body is the distance from the point 604 to the connection unit 301. Alternatively, as shown in fig. 17(e), the distance from the contact to the connection unit connecting the first body and the second body is the distance from the point 605 to the connection unit 402. The method for identifying the distance by the electronic device is described in the above embodiments, and is not described herein again.
Alternatively, the electronic device identifies the distance L from the first contact to the connection unit 2 And a distance L from the second contact to the connection unit 3 . The method for determining the distance of the electronic device is described in the above embodiments, and is not described herein again.
And step 1506, the electronic equipment calculates the height of the object to be measured according to the angle and the distance.
Specifically, the electronic device may be configured to determine the angle a and the distance L according to the angle a 1 And calculating the height h of the object to be measured.
Angle alpha and distance L 1 The electronic device can calculate the height h of the object to be measured according to formula 1.
Alternatively, the electronic device may be configured to use the angle a and the distance L 2 The distance L 3 And calculating the height h of the object to be measured. Angle alpha and distance L 2 The distance L 3 The electronic device can calculate the height h of the object to be measured according to formula 6.
For example, as shown in fig. 17(c) and 17(f), the electronic device may display the height h on the display screen 194. Alternatively, for convenience of the user's view, the electronic device may display the height on a display screen 194 covering the second body, as shown in fig. 17 (c); alternatively, as shown in fig. 17(f), the electronic device may display the height on the display screen 194 overlaid on other bodies (e.g., the body 403) other than the first body and the second body.
Alternatively, the electronic device may output the height h in speech. For example, the electronic device may output a voice message of "measure the height of the object is 5 cm".
It should be noted that, in the height measuring method illustrated in fig. 15, the position of the contact is detected by the pressure sensor to measure the height of the object. It will be appreciated that alternatively, the electronic device may detect the location of the contact point via the touch sensor.
Alternatively, as shown in fig. 18, the electronic device may also display a reference line on the display screen, so that the user can place the object to be measured by aligning the reference line.
Illustratively, as shown in fig. 18(a), the electronic device displays a reference line 1400 on the main body 303. The distance between the reference line 1400 and the connection unit 301 is D 1 . As shown in fig. 18(b) and 18(c), the user bends the main body 303 inward so that the apex of the object 500 contacts the main body 303 and the point of contact is on the reference line 1400. The electronic device identifies an angle a between the body 302 and the body 303. The electronic equipment is based on the distance D 1 And calculating the height h of the object by the angle alpha, wherein a calculation formula is shown as formula 7:
h=D 1 xsin alpha (formula 7)
Alternatively, in order to facilitate the measuring operation of the user, when the object to be measured is a regular object such as a cube, as shown in fig. 18(D), the electronic device may also display the reference line 1400 on the main body 302, where the distance between the reference line 1400 and the connection unit 301 is D 2 . As shown in fig. 18(e) and 18(f), the user bends the body 303 inward so that the apex of the object 500 comes into contact with the body 303. The electronic device identifies an angle a between the main body 302 and the main body 303. The electronic equipment calculates the height h of the object according to the distance D2 and the angle alpha, and a calculation formula is shown in formula 8:
h=D 2 x tan alpha (formula 8)
In summary, according to another height measuring method provided by the embodiment of the present application, the step of detecting the contact point by the pressure sensor can be omitted by displaying the reference line on the display screen. The method can be used for electronic devices without pressure sensors.
The embodiment of the application discloses electronic equipment, includes: a display screen; a processor; a memory; one or more sensors; an application program and a computer program. The above-described devices may be connected by one or more communication buses. Wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, the one or more computer programs including instructions which may be used to perform the steps of the embodiments described above. Wherein the one or more sensors may include a touch sensor, a pressure sensor, or an acceleration sensor.
For example, the processor may be specifically the processor 110 shown in fig. 1, the memory may be specifically the internal memory and/or the external memory 120 shown in fig. 1, the display screen may be specifically the display screen 194 shown in fig. 1, the sensor may be specifically one or more sensors in the sensor module 180 shown in fig. 1, the touch sensor may be the touch sensor 180K shown in fig. 1, the pressure sensor may be the pressure sensor 180A shown in fig. 1, and the acceleration sensor may be the acceleration sensor 180E shown in fig. 1. The embodiments of the present application do not set any limit to this.
In addition, the embodiment of the application also provides a Graphical User Interface (GUI) on the electronic device, and the GUI specifically comprises a graphical user interface displayed by the electronic device when the electronic device executes the method.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware or any combination thereof. When implemented using a software program, may take the form of a computer program product, either entirely or partially. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optics, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device including one or more available media integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only a specific implementation of the embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered by the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.
Claims (21)
1. A height measuring method applied to electronic equipment is characterized in that,
the electronic apparatus includes at least a first body, a second body, and a first connection shaft connecting the first body and the second body, the first body and the second body being rotatable about the first connection shaft;
the electronic device further comprises a display screen covering the first body, the second body and the first connecting shaft;
when an object to be tested is placed on the first main body, the object to be tested is in contact with the first main body through the display screen, and the method comprises the following steps:
the electronic equipment detects whether the object to be detected is in contact with the second main body through the display screen;
the electronic equipment identifies an included angle between the first main body and the second main body;
When the object to be detected contacts the second main body through the display screen, the electronic equipment identifies the distance from a contact point of the object to be detected and the display screen on the second main body to the first connecting shaft;
the electronic equipment obtains the height of the object to be measured according to the included angle and the distance;
and the electronic equipment outputs the height of the object to be detected.
2. The method according to claim 1, wherein the obtaining, by the electronic device, the height of the object to be measured according to the included angle and the distance comprises:
the electronic equipment adopts the formula h ═ L 1 Calculating by using x sin alpha to obtain the height h of the object to be detected;
wherein L is 1 Is the distance, and a is an included angle of the first main body and the second main body.
3. The method of claim 1, wherein the electronic device identifies an included angle between the first body and the second body, comprising:
and responding to the detection of the electronic equipment that the object to be detected is contacted with the second main body through the display screen, and identifying the included angle between the first main body and the second main body by the electronic equipment.
4. The method according to any one of claims 1 to 3,
The electronic device further comprises a pressure sensor;
the electronic equipment detects whether the object to be detected contacts with the second main body through the display screen or not, and the method comprises the following steps:
the electronic equipment detects whether the object to be detected contacts with the second main body through the display screen or not through the pressure sensor.
5. The method of any of claims 1-3, wherein prior to the electronic device detecting whether the object under test is contacted, the method further comprises:
the electronic equipment receives a first input;
in response to the first input, the electronic device detects whether the object to be detected is in contact with the second body through the display screen.
6. A height measuring method applied to electronic equipment is characterized in that,
the electronic apparatus includes at least a first body, a second body, and a first connection shaft connecting the first body and the second body, the first body and the second body being rotatable about the first connection shaft;
the electronic device further comprises a display screen covering the first body, the second body and the first connecting shaft;
the method comprises the following steps:
The electronic equipment detects whether an object to be detected is in contact with the first main body through the display screen;
the electronic equipment detects whether the object to be detected is in contact with the second main body through the display screen;
the electronic equipment detects an included angle between the first main body and the second main body;
when the object to be detected contacts the first main body through the display screen, the electronic equipment identifies a first distance from a first contact of the object to be detected and the display screen on the first main body to the first connecting shaft;
when the object to be detected contacts the second main body through the display screen, the electronic equipment identifies a second distance from a second contact of the object to be detected and the display screen on the second main body to the first connecting shaft;
and the electronic equipment obtains the height of the object to be detected according to the included angle, the first distance and the second distance.
7. The method according to claim 6, wherein the obtaining, by the electronic device, the height of the object to be measured according to the included angle, the first distance, and the second distance includes:
the electronic equipment adopts a formula h 2 =L 2 2 +L 3 2 -2 L 2 L 3 calculating to obtain the height h of the object to be detected;
wherein L is 2 Is said first distance, L 3 Is the second distance, and a is an angle between the first body and the second body.
8. The method of claim 6, wherein the electronic device identifies an included angle between the first body and the second body, comprising:
responding to the electronic equipment detection the object to be detected passes through the display screen with the second main body contacts and the object to be detected passes through the display screen with the first main body contacts, the electronic equipment identifies the included angle of the first main body and the second main body.
9. The method according to any one of claims 6 to 8,
the electronic device further comprises a pressure sensor;
the electronic equipment detects whether the object to be detected contacts with the first main body through the display screen or not, and the method comprises the following steps:
the electronic equipment detects whether the object to be detected is in contact with the first main body through the display screen or not through the pressure sensor;
the electronic equipment detects whether the object to be detected contacts with the second main body through the display screen or not, and the method comprises the following steps:
the electronic equipment detects whether the object to be detected contacts with the second main body through the display screen or not through the pressure sensor.
10. The method according to any of claims 6-8, wherein before the electronic device detects whether the object under test is contacted, the method further comprises:
the electronic equipment receives a first input;
responding to the first input, the electronic equipment detects whether the object to be detected is in contact with the second main body through the display screen; and/or the first and/or second light sources,
in response to the first input, the electronic device detects whether the object to be detected is in contact with the first body through the display screen.
11. An electronic device for measuring height, comprising:
a first body, a second body, and a first connection shaft connecting the first body and the second body, the first body and the second body being rotatable about the first connection shaft;
a display screen covering the first body, the second body, and the first connecting shaft;
a processor;
a memory for storing a computer program;
the computer program includes instructions that, when executed by the processor, cause the electronic device to perform the following steps to measure a height of an object to be measured placed on the first body, the object to be measured being in contact with the first body through the display screen, the method including:
Detecting whether the object to be detected is in contact with the second main body through the display screen;
identifying an included angle of the first body and the second body;
when the object to be detected is in contact with the second main body through the display screen, identifying the distance from a contact point of the object to be detected and the display screen on the second main body to the first connecting shaft;
obtaining the height of the object to be measured according to the included angle and the distance;
and outputting the height of the object to be detected.
12. The electronic device of claim 11, wherein obtaining the height of the object to be measured according to the included angle and the distance comprises:
using the formula h ═L 1 Calculating by using x sin alpha to obtain the height h of the object to be detected;
wherein L is 1 Is the distance, and a is an included angle of the first main body and the second main body.
13. The electronic device of claim 11, wherein the identifying the included angle of the first body and the second body comprises:
and responding to the object to be detected to contact with the second main body through the display screen, and identifying an included angle between the first main body and the second main body.
14. The electronic device of any of claims 11-13, further comprising a pressure sensor;
The detecting whether the object to be detected contacts with the second main body through the display screen comprises:
and detecting whether the object to be detected contacts with the second main body through the display screen or not through the pressure sensor.
15. The electronic device of any of claims 11-13, wherein the instructions, when executed by the processor, cause the electronic device to, prior to detecting whether the object under test is contacted, further perform the steps of:
receiving a first input;
and responding to the first input, and detecting whether the object to be detected is in contact with the second main body through the display screen.
16. An electronic device for measuring height, characterized in that,
the electronic apparatus includes at least a first body, a second body, and a first connection shaft connecting the first body and the second body, the first body and the second body being rotatable about the first connection shaft;
a display screen covering the first body, the second body, and the first connecting shaft;
a processor;
a memory for storing a computer program;
the computer program comprises instructions which, when executed by the processor, cause the electronic device to perform the following steps to measure the height of an object under test:
Detecting whether the object to be detected is in contact with the first main body through the display screen;
detecting whether the object to be detected is in contact with the second main body through the display screen;
identifying an included angle of the first body and the second body;
when the first main body is contacted with the object to be detected through the display screen, identifying a first distance from a first contact of the object to be detected and the display screen on the first main body to the first connecting shaft;
when the second main body is in contact with the object to be detected through the display screen, identifying a second distance from a second contact of the object to be detected and the display screen on the second main body to the first connecting shaft;
and the electronic equipment obtains the height of the object to be detected according to the included angle, the first distance and the second distance.
17. The electronic device of claim 16, wherein obtaining, by the electronic device, the height of the object to be measured according to the included angle, the first distance, and the second distance includes:
the electronic equipment adopts a formula h 2 =L 2 2 +L 3 2 -2 L 2 L 3 calculating to obtain the height h of the object to be detected;
wherein L is 2 Is said first distance, L 3 A second distance, a, is an included angle of the first main body and the second main body.
18. The electronic device of claim 16, wherein the identifying the angle between the first body and the second body comprises:
and responding to the electronic equipment detection that the object to be detected passes through the display screen and contacts with the second main body, and the object to be detected passes through the display screen and contacts with the first main body, and identifying an included angle between the first main body and the second main body.
19. The electronic device of any of claims 16-18,
the electronic device further comprises a pressure sensor;
the detecting whether the object to be detected contacts with the first main body through the display screen comprises:
detecting whether the object to be detected is in contact with the first main body through the display screen or not through the pressure sensor;
the detecting whether the object to be detected contacts with the second main body through the display screen comprises:
and detecting whether the object to be detected contacts with the second main body through the display screen or not through the pressure sensor.
20. The electronic device of any of claims 16-18, wherein the instructions, when executed by the processor, cause the electronic device to, prior to detecting whether the object under test is contacted, further perform the steps of:
Receiving a first input;
responding to the first input, and detecting whether the object to be detected is in contact with the second main body through the display screen; and/or the first and/or second light sources,
and responding to the first input, and detecting whether the object to be detected is in contact with the first main body through the display screen.
21. A computer-readable storage medium having instructions stored therein, which when run on an electronic device, cause the electronic device to perform the method of any of claims 1-10.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910433040.8A CN111982037B (en) | 2019-05-23 | 2019-05-23 | Height measuring method and electronic equipment |
PCT/CN2020/091180 WO2020233581A1 (en) | 2019-05-23 | 2020-05-20 | Height measuring method and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910433040.8A CN111982037B (en) | 2019-05-23 | 2019-05-23 | Height measuring method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111982037A CN111982037A (en) | 2020-11-24 |
CN111982037B true CN111982037B (en) | 2022-07-29 |
Family
ID=73436451
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910433040.8A Active CN111982037B (en) | 2019-05-23 | 2019-05-23 | Height measuring method and electronic equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111982037B (en) |
WO (1) | WO2020233581A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116608782A (en) * | 2022-02-08 | 2023-08-18 | 广州视源电子科技股份有限公司 | Method for detecting object size, storage medium and electronic device |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11304466A (en) * | 1998-04-16 | 1999-11-05 | Asahi Seimitsu Kk | Instrument height measuring method for surveying instrument |
JP2003269955A (en) * | 2002-03-11 | 2003-09-25 | Junko Suginaka | Measurement device of distance or the like |
WO2013032041A1 (en) * | 2011-08-26 | 2013-03-07 | Ryoo Min-Kyu | Method for measuring distance, height, and length using a mobile communication terminal |
CN103344216A (en) * | 2013-07-26 | 2013-10-09 | 李良杰 | Height measurement instrument |
CN104374264B (en) * | 2013-08-16 | 2017-11-24 | 上海汽车集团股份有限公司 | The measurer of measurement distance and angle |
CN103644879A (en) * | 2013-11-25 | 2014-03-19 | 无锡莱吉特信息科技有限公司 | A height measurement tool |
CN104881109B (en) * | 2014-02-28 | 2018-08-10 | 联想(北京)有限公司 | A kind of action identification method, device and electronic equipment |
CN204924220U (en) * | 2015-04-24 | 2015-12-30 | 华中科技大学 | Thickness measuring device suitable for large -scale propeller blades |
CN105547215A (en) * | 2015-08-18 | 2016-05-04 | 东莞酷派软件技术有限公司 | Method for measuring object dimension and terminal equipment |
CN105526895A (en) * | 2015-11-30 | 2016-04-27 | 北京奇虎科技有限公司 | Electronic equipment and range finding method thereof |
CN105674897B (en) * | 2015-12-30 | 2018-09-14 | 广东欧珀移动通信有限公司 | Measure the method and device of object height |
CN206671550U (en) * | 2017-03-28 | 2017-11-24 | 昌邑市创通电子科技有限公司 | A kind of laser range finder |
CN106918815A (en) * | 2017-04-12 | 2017-07-04 | 李良杰 | Laser measuring apparatus |
-
2019
- 2019-05-23 CN CN201910433040.8A patent/CN111982037B/en active Active
-
2020
- 2020-05-20 WO PCT/CN2020/091180 patent/WO2020233581A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
CN111982037A (en) | 2020-11-24 |
WO2020233581A1 (en) | 2020-11-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113645351B (en) | Application interface interaction method, electronic device and computer-readable storage medium | |
CN110058777B (en) | Method for starting shortcut function and electronic equipment | |
CN113994317A (en) | User interface layout method and electronic equipment | |
CN111602108B (en) | Application icon display method and terminal | |
CN113704205B (en) | Log storage method, chip, electronic device and readable storage medium | |
CN112671976A (en) | Control method of electronic equipment and electronic equipment | |
CN114650363A (en) | Image display method and electronic equipment | |
WO2021082815A1 (en) | Display element display method and electronic device | |
WO2021218429A1 (en) | Method for managing application window, and terminal device and computer-readable storage medium | |
CN110138999B (en) | Certificate scanning method and device for mobile terminal | |
CN112751954A (en) | Operation prompting method and electronic equipment | |
WO2022001258A1 (en) | Multi-screen display method and apparatus, terminal device, and storage medium | |
WO2022105702A1 (en) | Method and electronic device for saving image | |
CN113452945A (en) | Method and device for sharing application interface, electronic equipment and readable storage medium | |
CN110058729B (en) | Method and electronic device for adjusting sensitivity of touch detection | |
CN111031492A (en) | Call demand response method and device and electronic equipment | |
CN115421619A (en) | Window display method and electronic equipment | |
CN112437341B (en) | Video stream processing method and electronic equipment | |
CN111982037B (en) | Height measuring method and electronic equipment | |
CN112449101A (en) | Shooting method and electronic equipment | |
WO2022111593A1 (en) | Graphical user interface display method and apparatus | |
CN113407300B (en) | Application false killing evaluation method and related equipment | |
CN114828098A (en) | Data transmission method and electronic equipment | |
CN114003241A (en) | Interface adaptation display method and system of application program, electronic device and medium | |
CN113970965A (en) | Message display method and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |