CN110881083B - Camera control method and electronic equipment - Google Patents

Camera control method and electronic equipment Download PDF

Info

Publication number
CN110881083B
CN110881083B CN201911207693.0A CN201911207693A CN110881083B CN 110881083 B CN110881083 B CN 110881083B CN 201911207693 A CN201911207693 A CN 201911207693A CN 110881083 B CN110881083 B CN 110881083B
Authority
CN
China
Prior art keywords
pop
camera
electronic equipment
distance
type
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
Application number
CN201911207693.0A
Other languages
Chinese (zh)
Other versions
CN110881083A (en
Inventor
孙岳龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201911207693.0A priority Critical patent/CN110881083B/en
Publication of CN110881083A publication Critical patent/CN110881083A/en
Application granted granted Critical
Publication of CN110881083B publication Critical patent/CN110881083B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Environmental & Geological Engineering (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the invention provides a camera control method and electronic equipment, wherein the method is applied to the electronic equipment, the electronic equipment comprises a pop-up camera, and the method comprises the following steps: when a camera pop-up instruction is received, determining the type of the pop-up instruction; when the type of the pop-up instruction is a passive pop-up type, determining whether an obstacle exists in a preset range from the top of the camera; if the obstacle exists, determining a first distance between the obstacle and the bottom of a lens of the camera; and controlling the pop-up distance of the camera according to the first distance. The camera control method provided by the embodiment of the invention can avoid the damage of the camera by other objects after the camera is popped up, and improve the safety of the camera.

Description

Camera control method and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of electronic equipment, in particular to a camera control method and electronic equipment.
Background
At present, in order to enlarge the screen proportion, the Liuhai screen, the water drop screen and the full screen appear in sequence on the electronic equipment. Wherein, bang screen and water droplet screen are all left fixed leading camera, and comprehensive screen because the screen top does not have the position and can set up leading camera, therefore the leading camera of the electronic equipment of full screen only can realize through pop-up camera.
When the pop-up camera of the electronic equipment receives the pop-up instruction, the pop-up camera is popped up completely, and the pop-up camera is easily damaged by the obstacle. For example: when a water cup is arranged in front of the pop-up camera, the front-mounted camera automatically pops up when receiving a pop-up instruction, and the pop-up camera is easily damaged by collision of the water cup.
Disclosure of Invention
The embodiment of the invention provides a camera control method and electronic equipment, and aims to solve the problem that a camera in the prior art is easy to damage.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention further provides a camera control method, which is applied to an electronic device including a pop-up camera, where the method includes: when a camera pop-up instruction is received, determining the type of the pop-up instruction, wherein the pop-up instruction type comprises the following steps: active pop-up and passive pop-up; when the type of the pop-up instruction is a passive pop-up type, determining whether an obstacle exists in a preset range from the top of the camera; if the obstacle exists, determining a first distance between the obstacle and the bottom of a lens of the camera; and controlling the pop-up distance of the camera according to the first distance, wherein the pop-up distance is smaller than the first distance.
In a second aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes a pop-up camera, and the electronic device further includes: the receiving module is used for determining the type of the pop-up instruction when the pop-up instruction of the camera is received, wherein the pop-up instruction type comprises the following steps: active pop-up and passive pop-up; the first determining module is used for determining whether an obstacle exists in a preset range from the top of the camera when the type of the pop-up instruction is a passive pop-up type; the second determining module is used for determining a first distance between the barrier and the bottom of the lens of the camera if the barrier exists; and the first control module is used for controlling the pop-up distance of the camera according to the first distance, wherein the pop-up distance is smaller than the first distance.
In a third aspect, an embodiment of the present invention provides a mobile terminal, where the mobile terminal includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and when the computer program is executed by the processor, the steps of any one of the camera control methods described in the embodiments of the present invention are implemented.
In a fourth aspect, the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements the steps of any one of the camera control methods described in the embodiments of the present invention.
In the embodiment of the invention, when a camera pop-up instruction is received, the type of the pop-up instruction is determined; when the type of the pop-up instruction is a passive pop-up type, determining whether an obstacle exists in a preset range from the top of the camera; if the obstacle exists, determining a first distance between the obstacle and the bottom of a lens of the camera; according to the popping distance of the first distance control camera, the camera can be prevented from being damaged by other objects after being popped, and the safety of the camera is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a flowchart illustrating steps of a camera control method according to a first embodiment of the present invention;
fig. 2 is a schematic diagram of a positional relationship between a camera and an obstacle according to the first embodiment;
fig. 3 is a flowchart illustrating steps of a camera control method according to a second embodiment of the present invention;
fig. 4 is a schematic view of a positional relationship between the camera and the obstacle according to the second embodiment;
fig. 5 is a block diagram showing a configuration of an electronic apparatus according to a third embodiment of the present invention;
fig. 6 is a schematic diagram showing a hardware configuration of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Example one
Referring to fig. 1, a flowchart illustrating steps of a camera control method according to a first embodiment of the present invention is shown.
The camera control method provided by the embodiment of the invention is applied to electronic equipment and comprises the following steps:
step 101: and when a camera pop-up instruction is received, determining the type of the pop-up instruction.
Wherein the pop instruction types include: active ejection and passive ejection.
The active pop-up instruction is an instruction for actively triggering pop-up of the front camera by user operation, such as a self-photographing instruction of a user, an active face recognition instruction and the like. The passive pop-up instruction is an instruction for triggering pop-up of the front camera by non-user operation, for example: when the electronic equipment is placed on a desk, a friend sends a WeChat video call instruction; for another example: when a user needs identity authentication for online payment through the electronic equipment, the electronic equipment automatically starts face recognition and triggers the front-facing camera to pop up.
In an active scene, a user actively triggers the camera to pop up, and the user can trigger the camera to pop up again when no obstacle exists around the camera, so that the camera can be directly popped up. However, in the passive scenario, in order to avoid the camera being damaged by the obstacle when it is ejected, the subsequent steps shown in the embodiment of the present invention are performed.
Step 102: and when the type of the pop-up instruction is a passive pop-up type, determining whether an obstacle exists in a preset range from the top of the camera.
The preset range can be set by a person skilled in the art according to the length of the camera and the specific position of the camera on the electronic device, and the camera can be ensured to be still in the preset range after being completely popped up.
Fig. 2a is a schematic diagram of a position relationship between a camera and an obstacle when the obstacle does not exist within a preset range from the top of the camera; fig. 2b is a schematic diagram of a position relationship between the camera and an obstacle when the obstacle exists within a preset range from the top of the camera.
In a specific implementation process, whether an obstacle exists in a preset range from the top of the pop-up camera can be detected through a distance sensor; the method also can be used for collecting an electronic setting surrounding environment image through a built-in camera arranged in the electronic equipment and detecting whether the barrier exists in a preset range from the top of the pop-up camera or not through the collected environment image.
Step 103: if not, the camera is completely popped up.
If an obstacle exists in a preset range from the top of the camera, the camera collides with the obstacle when safely popping up; on the contrary, if no barrier exists in the preset range from the top of the camera, the camera cannot collide with the barrier after being completely popped up, and the camera can be completely popped up under the condition.
Step 104: if so, determining a first distance between the obstacle and the bottom of the lens of the camera.
Wherein the first distance is smaller than the preset range radius. The bottom of the lens is the highest point of the camera in the extending or lifting direction of the camera.
Step 105: and controlling the pop-up distance of the camera according to the first distance.
The pop-up distance is smaller than the first distance, the pop-up distance can be 0 or a value other than 0, when the pop-up distance is 0, the camera is correspondingly prohibited, and when the pop-up distance is a value other than 0, the camera corresponds to the pop-up part.
The camera in the embodiment of the invention can be partially popped up, so that if an obstacle exists in a preset range from the top of the camera, but the distance between the obstacle and the bottom of the camera lens is greater than a first distance, part of the camera can be popped up to enable the lens to be completely popped up, thereby meeting the image shooting requirement.
According to the camera control method provided by the embodiment of the invention, when the pop-up command of the camera is received, the type of the pop-up command is determined; when the type of the pop-up instruction is a passive pop-up type, determining whether an obstacle exists in a preset range from the top of the camera; if the camera does not exist, the camera is completely popped up; if the obstacle exists, determining a first distance between the obstacle and the bottom of a lens of the camera; according to the popping distance of the first distance control camera, the camera can be prevented from being damaged by other objects after being popped, and the safety of the camera is improved.
Example two
Referring to fig. 3, a flowchart illustrating steps of a camera control method according to a second embodiment of the present invention is shown.
The camera control method provided by the embodiment of the invention is applied to electronic equipment and comprises the following steps:
step 301: and when a camera pop-up instruction is received, determining the type of the pop-up instruction.
Wherein the pop instruction types include: active ejection and passive ejection.
And when the type of the pop-up instruction is a long active pop-up type, directly responding to the pop-up instruction of the camera to completely pop up the camera.
Step 302: and when the type of the pop-up instruction is a passive pop-up type, determining whether the electronic equipment is located inside a preset object.
The preset object may be: a pocket, a bag, a handbag, or the like.
If the electronic device is inside the preset object, executing step 303; if the electronic device is not inside the predetermined object, step 304 is performed. If the electronic equipment is positioned in the preset object, on one hand, the camera is easy to collide with other objects in the preset object when being popped up; on the other hand, even if the camera is popped up, objects outside the preset object cannot be shot, and shooting requirements cannot be met, so that the electronic equipment is forbidden to pop up when the electronic equipment is located inside the preset object.
One way to determine whether the electronic device is inside a preset object is to: when the type of the pop-up instruction is a passive pop-up type, determining whether the electronic equipment is in a horizontal placement state and determining whether the light intensity of the environment where the electronic equipment is located is smaller than a preset light intensity; and under the condition that the electronic equipment is in a horizontal placement state and the light intensity of the environment where the electronic equipment is located is smaller than the preset light intensity, determining that the electronic equipment is located in a preset object.
This kind of mode that combines two factors of electronic equipment gesture and the ambient light that is located to judge whether electronic equipment is in and predetermines the object inside, and the gained judgement result is more accurate.
In a preferred embodiment, before the determining whether the electronic device is located inside the preset object, when the type to which the ejection instruction belongs is a passive ejection type, determining whether the electronic device is in a handheld state; if the electronic equipment is in a handheld state, completely popping up the camera; and if the electronic equipment is not in the handheld state, executing a step of determining whether the electronic equipment is in the preset object.
Since the electronic device cannot be located inside the preset object if the user holds the electronic device, it is further determined whether the electronic device is located inside the preset object if the electronic device is not held by the user.
Step 303: and if the electronic equipment is positioned in the preset object, forbidding to pop up the camera.
One preferred mode is that when a camera pop-up instruction is received and the electronic device is located inside a preset object, the prompt information is output to prompt a user that the user needs to pop up the camera at the moment, and the user can take the electronic device out of the inside of the preset object and then pop up the camera.
Step 304: and if the electronic equipment is not positioned in the preset object, determining whether the electronic equipment is horizontally placed or not.
In a specific implementation process, whether the electronic equipment is horizontally placed or not can be judged according to a gravity sensor arranged in the electronic equipment.
Step 305: and if the electronic equipment is horizontally arranged, determining whether an obstacle exists in a preset range from the top of the camera.
If the distance between the camera and the top of the camera does not exist within a preset range, the camera is completely popped up. If there is an obstacle within the preset range from the top of the camera, step 306 and the following steps are executed.
As shown in fig. 4, a sensor may be mounted on a camera of the electronic device, and the sensor may detect whether an obstacle exists within a preset range from the camera. The propagation speed of the light or sound wave emitted by the sensor to detect the medium in the air is S, and the time from the emission of the sensor to the reception of the return medium is as follows: and t, the distance d between the sensor and the obstacle is S multiplied by t/2. The preset range is an area surrounded by the radius of 2a, if d detected by the sensor is smaller than or equal to a, the fact that an obstacle exists in the preset range from the top of the camera is indicated, and otherwise, if d detected by the sensor is larger than a, the fact that the obstacle does not exist in the preset range from the top of the camera is indicated.
Step 306: if so, determining a first distance between the obstacle and the bottom of the lens of the camera.
As also shown in fig. 4, the distance from the bottom of the lens of the camera to the sensor is b, the distance from the sensor to the obstacle is denoted as d, and the first distance from the bottom of the lens of the camera to the obstacle is b + d.
Step 307: and controlling the pop-up distance of the camera according to the first distance.
If the first distance b + d is larger than or equal to 2b and b + d is smaller than 2a, determining that part of the cameras can be popped up; and if the first distance b + d is smaller than 2b, prohibiting the camera from being ejected.
One way to control the pop-up distance of the camera, preferably in dependence of the first distance, is to:
determining whether the first distance is greater than a second distance between the bottom of the lens of the camera and a first edge of the electronic device; if so, controlling the camera to pop up for a third distance; and if not, forbidding to eject the camera. The first edge is the edge of the frame where the camera is located, and the third distance is greater than the second distance and smaller than the first distance.
Pop out partial camera, the camera lens of camera can normally gather the picture and ensure that the camera can not touch the barrier.
According to the camera control method provided by the embodiment of the invention, when the pop-up command of the camera is received, the type of the pop-up command is determined; when the type of the pop-up instruction is a passive pop-up type, determining whether an obstacle exists in a preset range from the top of the camera; if the camera does not exist, the camera is completely popped up; if the obstacle exists, determining a first distance between the obstacle and the bottom of a lens of a camera; according to the popping distance of the first distance control camera, the camera can be prevented from being damaged by other objects after being popped, and the safety of the camera is improved. In addition, the camera control method provided by the embodiment of the invention can flexibly determine whether to pop up part of the camera according to the first distance between the obstacle and the bottom of the lens of the camera, thereby meeting the shooting requirement and ensuring that the camera collides with the obstacle.
With the above description of the camera control method according to the embodiment of the present invention, an electronic device according to the embodiment of the present invention will be described with reference to the accompanying drawings.
EXAMPLE III
Referring to fig. 5, a block diagram of an electronic device according to a third embodiment of the present invention is shown.
The electronic equipment of the embodiment of the invention comprises a pop-up camera, and the electronic equipment further comprises: the receiving module 501 is configured to determine a type to which a pop-up instruction belongs when receiving a camera pop-up instruction, where the type of the pop-up instruction includes: active pop-up and passive pop-up; a first determining module 502, configured to determine whether an obstacle exists within a preset range from the top of the camera when the type to which the pop-up instruction belongs is a passive pop-up type; a second determining module 503, configured to determine, if the obstacle exists, a first distance between the obstacle and the bottom of the lens of the camera; a first control module 504, configured to control a pop-up distance of the camera according to the first distance.
Preferably, the first control module comprises: the distance determining submodule is used for determining whether the first distance is larger than a second distance between the bottom of the lens of the camera and a first edge of the electronic equipment; the first edge is the edge of a frame where the camera is located; the control submodule is used for controlling the camera to pop up a third distance if the camera is in the third position; if not, forbidding to pop up the camera; wherein the third distance is greater than the second distance and less than the first distance.
Preferably, the electronic device further includes: the third determining module is used for determining whether the electronic equipment is located in a preset object or not when the type to which the pop-up instruction belongs is a passive pop-up type before the first determining module determines whether an obstacle exists in a preset range from the top of the camera or not; the forbidding module is used for forbidding to pop up the camera if the electronic equipment is positioned in a preset object; the fourth determining module is used for determining whether the electronic equipment is horizontally placed or not if the electronic equipment is not positioned in a preset object; and if the electronic equipment is horizontally arranged, executing the first determining module to determine whether an obstacle exists in a preset range from the top of the camera.
Preferably, the first determining module comprises: the light intensity determination submodule is used for determining whether the electronic equipment is in a horizontal placement state and determining whether the light intensity of the environment where the electronic equipment is located is smaller than the preset light intensity when the type of the pop-up instruction is a passive pop-up type; and the result determining submodule is used for determining that the electronic equipment is positioned in a preset object under the condition that the electronic equipment is in a horizontal placement state and the light intensity of the environment where the electronic equipment is positioned is greater than the preset light intensity.
Preferably, the electronic device further includes: the state determining module is used for determining whether the electronic equipment is in a handheld state or not when the type of the pop-up instruction is a passive pop-up type before the third determining module determines whether the electronic equipment is in a preset object or not; the second control module is used for completely popping up the camera if the electronic equipment is in a handheld state; and if the electronic equipment is not in the handheld state, executing the third determining module to determine whether the electronic equipment is in a preset object.
The electronic device provided in the embodiment of the present invention can implement each process implemented by the electronic device in the method embodiments of fig. 1 to fig. 4, and is not described herein again to avoid repetition.
According to the electronic equipment provided by the embodiment of the invention, when the pop-up command of the camera is received, the type of the pop-up command is determined; when the type of the pop-up instruction is a passive pop-up type, determining whether an obstacle exists in a preset range from the top of the camera; if the camera does not exist, the camera is completely popped up; if the obstacle exists, determining a first distance between the obstacle and the bottom of a lens of the camera; according to the popping part of the first distance control camera, the damage of the camera by other objects after the camera is popped can be avoided, and the safety of the camera is improved.
Example four
Referring to fig. 6, a block diagram of an electronic device according to a fourth embodiment of the present invention is shown.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device 600 for implementing various embodiments of the present invention, where the electronic device 600 includes, but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and a power supply 611. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 6 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 610 is configured to determine a type to which a pop-up instruction belongs when receiving a camera pop-up instruction, where the type of the pop-up instruction includes: active pop-up and passive pop-up; when the type of the pop-up instruction is a passive pop-up type, determining whether an obstacle exists in a preset range from the top of the camera; if the obstacle exists, determining a first distance between the obstacle and the bottom of a lens of the camera; and controlling the pop-up distance of the camera according to the first distance, wherein the pop-up distance is smaller than the first distance.
According to the electronic equipment provided by the embodiment of the invention, when the pop-up command of the camera is received, the type of the pop-up command is determined; when the type of the pop-up instruction is a passive pop-up type, determining whether an obstacle exists in a preset range from the top of the camera; if the camera does not exist, the camera is completely popped up; if the obstacle exists, determining a first distance between the obstacle and the bottom of a lens of a camera; according to the popping distance of the first distance control camera, the camera can be prevented from being damaged by other objects after being popped, and the safety of the camera is improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 601 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 610; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio frequency unit 601 may also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 602, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 603 may convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output as sound. Also, the audio output unit 603 may also provide audio output related to a specific function performed by the electronic apparatus 600 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 603 includes a speaker, a buzzer, a receiver, and the like.
The input unit 604 is used to receive audio or video signals. The input Unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042, and the Graphics processor 6041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capture mode or an image capture mode. The processed image frames may be displayed on the display unit 606. The image frames processed by the graphic processor 6041 may be stored in the memory 609 (or other storage medium) or transmitted via the radio frequency unit 601 or the network module 602. The microphone 6042 can receive sound, and can process such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 601 in case of the phone call mode.
The electronic device 600 also includes at least one sensor 605, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 6061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 6061 and/or the backlight when the electronic apparatus 600 is moved to the ear. Display panel 601 is flexible display screen, and flexible display screen is including the screen base, liftable module array and the flexible screen that superpose the setting in proper order. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 605 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 606 is used to display information input by the user or information provided to the user. The Display unit 606 may include a Display panel 6061, and the Display panel 6061 may be configured by a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 607 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072. Touch panel 6071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 6071 using a finger, stylus, or any suitable object or accessory). The touch panel 6071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 610, receives a command from the processor 610, and executes the command. In addition, the touch panel 6071 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 607 may include other input devices 6072 in addition to the touch panel 6071. Specifically, the other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 6071 can be overlaid on the display panel 6061, and when the touch panel 6071 detects a touch operation on or near the touch panel 6071, the touch operation is transmitted to the processor 610 to determine the type of the touch event, and then the processor 610 provides a corresponding visual output on the display panel 6061 according to the type of the touch event. Although the touch panel 6071 and the display panel 6061 are shown in fig. 6 as two separate components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 6071 and the display panel 6061 may be integrated to implement the input and output functions of the electronic device, and this is not limited here.
The interface unit 608 is an interface for connecting an external device to the electronic apparatus 600. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 608 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic device 600 or may be used to transmit data between the electronic device 600 and external devices.
The memory 609 may be used to store software programs as well as various data. The memory 609 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 609 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 610 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 609, and calling data stored in the memory 609, thereby performing overall monitoring of the electronic device. Processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The electronic device 600 may further include a power supply 611 (e.g., a battery) for supplying power to the various components, and preferably, the power supply 611 may be logically connected to the processor 610 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
In addition, the electronic device 600 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 610, a memory 609, and a computer program that is stored in the memory 609 and can be run on the processor 610, and when the computer program is executed by the processor 610, the processes of the above-mentioned camera control method embodiment are implemented, and the same technical effect can be achieved, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned camera control method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A camera control method is applied to electronic equipment comprising a pop-up camera, and is characterized by comprising the following steps:
when a camera pop-up instruction is received, determining the type of the pop-up instruction, wherein the pop-up instruction type comprises the following steps: active pop-up and passive pop-up;
when the type of the pop-up instruction is a passive pop-up type, determining whether an obstacle exists in a preset range from the top of the camera;
if the obstacle exists, determining a first distance between the obstacle and the edge of the top frame where the camera is located;
controlling the pop-up distance of the camera according to the first distance, wherein the pop-up distance is smaller than the first distance;
the step of controlling the pop-up distance of the camera according to the first distance includes:
determining whether the first distance is greater than a second distance between a bottom of a lens of the camera and a first edge of the electronic device; the first edge is the edge of a top frame where the camera is located;
if yes, controlling the camera to pop up for a third distance; wherein the third distance is greater than the second distance and less than the first distance;
and if not, forbidding to pop up the camera.
2. The method of claim 1, wherein prior to the step of determining whether an obstacle exists within a preset range from the top of the camera, the method further comprises:
when the type of the pop-up instruction is a passive pop-up type, determining whether the electronic equipment is located inside a preset object;
if the electronic equipment is located in a preset object, forbidding to pop up the camera;
if the electronic equipment is not positioned in a preset object, determining whether the electronic equipment is horizontally placed;
and if the electronic equipment is horizontally arranged, executing the step of determining whether the obstacle exists in the preset range from the top of the camera.
3. The method according to claim 2, wherein the step of determining whether the electronic device is inside a preset object when the type to which the pop-up instruction belongs is a passive pop-up type includes:
when the type of the pop-up instruction is a passive pop-up type, determining whether the electronic equipment is in a horizontal placement state and determining whether the light intensity of the environment where the electronic equipment is located is smaller than a preset light intensity;
and under the condition that the electronic equipment is in a horizontal placement state and the light intensity of the environment where the electronic equipment is located is smaller than the preset light intensity, determining that the electronic equipment is located inside a preset object.
4. The method of claim 2, wherein prior to the step of determining whether the electronic device is inside a preset object, the method further comprises:
when the type of the pop-up instruction is a passive pop-up type, determining whether the electronic equipment is in a handheld state;
if the electronic equipment is in a handheld state, completely popping up the camera;
and if the electronic equipment is not in a handheld state, executing the step of determining whether the electronic equipment is in a preset object.
5. An electronic device, wherein the electronic device comprises a pop-up camera, the electronic device further comprising:
the receiving module is used for determining the type of the pop-up instruction when the pop-up instruction of the camera is received, wherein the pop-up instruction type comprises the following steps: active pop-up and passive pop-up;
the first determining module is used for determining whether an obstacle exists in a preset range from the top of the camera when the type of the pop-up instruction is a passive pop-up type;
the second determining module is used for determining a first distance between the barrier and the edge of the top frame where the camera is located if the barrier exists;
the first control module is used for controlling the pop-up distance of the camera according to the first distance, wherein the pop-up distance is smaller than the first distance;
the first control module includes:
the distance determining submodule is used for determining whether the first distance is larger than a second distance between the bottom of the lens of the camera and a first edge of the electronic equipment; the first edge is the edge of a top frame where the camera is located;
the control submodule is used for controlling the camera to pop up a third distance if the camera is in the third position; if not, forbidding to pop up the camera; wherein the third distance is greater than the second distance and less than the first distance.
6. The electronic device of claim 5, further comprising:
the third determining module is used for determining whether the electronic equipment is located in a preset object or not when the type to which the pop-up instruction belongs is a passive pop-up type before the first determining module determines whether an obstacle exists in a preset range from the top of the camera or not;
the forbidding module is used for forbidding to pop up the camera if the electronic equipment is positioned in a preset object;
the fourth determining module is used for determining whether the electronic equipment is horizontally placed or not if the electronic equipment is not positioned in a preset object; and if the electronic equipment is horizontally arranged, executing the first determining module to determine whether an obstacle exists in a preset range from the top of the camera.
7. The electronic device of claim 6, wherein the first determining module comprises:
the light intensity determination submodule is used for determining whether the electronic equipment is in a horizontal placement state and determining whether the light intensity of the environment where the electronic equipment is located is smaller than the preset light intensity when the type of the pop-up instruction is a passive pop-up type;
and the result determining submodule is used for determining that the electronic equipment is positioned in a preset object under the condition that the electronic equipment is in a horizontal placement state and the light intensity of the environment where the electronic equipment is positioned is less than the preset light intensity.
8. The electronic device of claim 6, further comprising:
the state determining module is used for determining whether the electronic equipment is in a handheld state or not when the type of the pop-up instruction is a passive pop-up type before the third determining module determines whether the electronic equipment is in a preset object or not;
the second control module is used for completely popping up the camera if the electronic equipment is in a handheld state; and if the electronic equipment is not in the handheld state, executing the third determining module to determine whether the electronic equipment is in a preset object.
9. A mobile terminal, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, implements the steps of the camera control method according to any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the camera control method according to any one of claims 1 to 4.
CN201911207693.0A 2019-11-29 2019-11-29 Camera control method and electronic equipment Active CN110881083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911207693.0A CN110881083B (en) 2019-11-29 2019-11-29 Camera control method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911207693.0A CN110881083B (en) 2019-11-29 2019-11-29 Camera control method and electronic equipment

Publications (2)

Publication Number Publication Date
CN110881083A CN110881083A (en) 2020-03-13
CN110881083B true CN110881083B (en) 2021-05-14

Family

ID=69729922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911207693.0A Active CN110881083B (en) 2019-11-29 2019-11-29 Camera control method and electronic equipment

Country Status (1)

Country Link
CN (1) CN110881083B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114095651B (en) * 2021-10-18 2023-08-15 荣耀终端有限公司 Camera pop-up control method and electronic equipment

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9413968B2 (en) * 2013-04-04 2016-08-09 Samsung Electronics Co., Ltd. Camera apparatus and wireless communication terminal including the same
US10044920B2 (en) * 2016-09-28 2018-08-07 Intel Corporation Retractable image capture devices and methods to protect such retractable image capture devices
CN106790833A (en) * 2017-02-24 2017-05-31 努比亚技术有限公司 A kind of mobile terminal with camera
CN107819907B (en) * 2017-11-14 2019-12-27 维沃移动通信有限公司 Camera control method and mobile terminal
CN108833697B (en) * 2018-06-08 2021-05-18 Oppo广东移动通信有限公司 Control method of sliding assembly, control assembly, electronic device and storage medium
CN108924290B (en) * 2018-06-12 2020-01-14 Oppo广东移动通信有限公司 Camera control method and device, mobile terminal and computer readable medium
CN108989644B (en) * 2018-08-10 2020-06-30 维沃移动通信有限公司 Camera control method and terminal
CN109452926B (en) * 2018-10-31 2021-09-17 上海联影医疗科技股份有限公司 Camera positioning method and device, computer equipment and storage medium
CN109379529A (en) * 2018-12-20 2019-02-22 歌尔科技有限公司 A kind of electronic equipment, camera and camera guard mechanism
CN109672785B (en) * 2018-12-29 2020-08-14 维沃移动通信(杭州)有限公司 Pop-up camera retracting method and mobile terminal
CN110266845B (en) * 2019-06-20 2021-05-28 歌尔股份有限公司 Camera lifting device and intelligent terminal

Also Published As

Publication number Publication date
CN110881083A (en) 2020-03-13

Similar Documents

Publication Publication Date Title
EP4047922A1 (en) Object tracking method and electronic device
CN108459797B (en) Control method of folding screen and mobile terminal
AU2020263183B2 (en) Parameter Obtaining Method and Terminal Device
CN109788137B (en) Falling protection method and terminal equipment
CN109257505B (en) Screen control method and mobile terminal
CN109190356B (en) Screen unlocking method and terminal
CN111124179A (en) Information processing method and electronic equipment
US20220360709A1 (en) Mobile terminal, shooting mode detection method, and storage medium
CN108769410B (en) Information sending method and mobile terminal
CN110753155A (en) Proximity detection method and terminal equipment
CN110837328B (en) Display method and electronic equipment
CN110636225B (en) Photographing method and electronic equipment
CN109358913B (en) Application program starting method and terminal equipment
CN111144876A (en) Payment method and electronic equipment
CN108388459B (en) Message display processing method and mobile terminal
CN108259756B (en) Image shooting method and mobile terminal
CN108196663B (en) Face recognition method and mobile terminal
CN110881083B (en) Camera control method and electronic equipment
CN110610146B (en) Face recognition method and electronic equipment
CN109359460B (en) Face recognition method and terminal equipment
CN108459796B (en) Function key response method and mobile terminal
CN108259807B (en) Communication method, mobile terminal and computer readable storage medium
CN110766396A (en) Graphic code display method and electronic equipment
CN110784571B (en) Electronic equipment and image display method
CN111459323B (en) Control method, electronic device and medium

Legal Events

Date Code Title Description
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