CN113132609A - Method and device for starting camera and mobile terminal - Google Patents

Method and device for starting camera and mobile terminal Download PDF

Info

Publication number
CN113132609A
CN113132609A CN201911405224.XA CN201911405224A CN113132609A CN 113132609 A CN113132609 A CN 113132609A CN 201911405224 A CN201911405224 A CN 201911405224A CN 113132609 A CN113132609 A CN 113132609A
Authority
CN
China
Prior art keywords
mobile terminal
distance
user
face
shooting scene
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201911405224.XA
Other languages
Chinese (zh)
Inventor
黄立军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Anyun Century Technology Co Ltd
Original Assignee
Beijing Anyun Century Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Anyun Century Technology Co Ltd filed Critical Beijing Anyun Century Technology Co Ltd
Priority to CN201911405224.XA priority Critical patent/CN113132609A/en
Publication of CN113132609A publication Critical patent/CN113132609A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • 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
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/52Details of telephonic subscriber devices including functional features of a camera

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention provides a method and a device for starting a camera and a mobile terminal, relates to the technical field of terminals, and is used for starting the camera adaptive to a shooting scene when a shooting application of the mobile terminal is started. The method comprises the following steps: when a shooting application of a mobile terminal is started, acquiring the posture of the mobile terminal and the distance from the mobile terminal to the face of a user; determining a current shooting scene according to the posture of the mobile terminal and the distance from the mobile terminal to the face of a user; and starting a camera adaptive to the shooting scene, wherein the camera is a front camera or a rear camera of the mobile terminal. The embodiment of the invention is used for starting the camera adaptive to the shooting scene.

Description

Method and device for starting camera and mobile terminal
Technical Field
The invention relates to the technical field of terminals, in particular to a method and a device for starting a camera and a mobile terminal.
Background
Photographing pictures or videos through a mobile terminal is very common in the daily life of a user, and the photographing performance of the mobile terminal has also become an important index for evaluating the mobile terminal.
In order to enable a display screen (generally positioned on the front side of the mobile terminal) of the mobile terminal to always face a user in a shooting process so that the user can select a satisfactory image according to shooting preview content displayed by the display screen, the mobile terminal generally comprises two types of image acquisition devices, wherein one type of image acquisition device is a front camera arranged on the front side of the mobile terminal, and the other type of image acquisition device is a rear camera arranged on the back side of the mobile terminal; the front camera can enable the front of the mobile terminal to face the user in the scenes of self-shooting, scene shooting behind the user and the like, the rear camera can enable the front of the mobile terminal to face the user in the scenes of scene shooting, figure and the like faced by the user, and the user can switch the started camera according to requirements in the shooting process. At present, when a shooting application of a mobile terminal is started, the mobile terminal may start a camera that was in a starting state when the shooting application was last closed, for example: when the shooting application is closed last time, the rear camera is in a starting state, then when the shooting application of the mobile terminal is started at this time, the mobile terminal can start the rear camera by default, and image acquisition is carried out through the rear camera. However, in the scheme of starting the camera in the starting state when the shooting application is closed last time in the prior art, when shooting scenes of two adjacent users are different, the started camera may be different from the camera that the user wants to start, and at this time, the user needs to manually switch the started camera.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for starting a camera, and a mobile terminal, which are used for starting a camera adapted to a shooting scene when a shooting application of the mobile terminal is started.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
in a first aspect, an embodiment of the present invention provides a method for starting a camera, including:
when a shooting application of a mobile terminal is started, acquiring the posture of the mobile terminal and the distance from the mobile terminal to the face of a user;
determining a current shooting scene according to the posture of the mobile terminal and the distance from the mobile terminal to the face of a user;
and starting a camera adaptive to the shooting scene, wherein the camera is a front camera or a rear camera of the mobile terminal.
As an optional implementation manner of the embodiment of the present invention, the acquiring the gesture of the mobile terminal and the distance from the mobile terminal to the face of the user includes:
and acquiring the posture of the mobile terminal according to the data acquired by the gyroscope sensor, and acquiring the distance from the mobile terminal to the face of the user according to the data acquired by the distance sensor.
As an optional implementation manner of the embodiment of the present invention, the acquiring the gesture of the mobile terminal according to the data acquired by the gyroscope sensor includes:
acquiring a first deflection angle according to data acquired by the gyroscope sensor, wherein the first deflection angle is an included angle between a plane where the left side surface or the right side surface of the mobile terminal is located and a horizontal plane;
if the first deflection angle is larger than or equal to a threshold angle, determining that the mobile terminal is in a vertical screen posture;
and if the deflection angle is smaller than the threshold angle, determining that the mobile terminal is in the landscape posture.
As an optional implementation manner of the embodiment of the present invention, the threshold angle is 45 °.
As an optional implementation manner of the embodiment of the present invention, the determining a current shooting scene according to the gesture of the mobile terminal and the distance from the mobile terminal to the face of the user includes:
determining whether a distance from the mobile terminal to a user's face is less than or equal to a first threshold distance when the mobile terminal is in a landscape orientation;
if the distance from the mobile terminal to the face of the user is smaller than or equal to the first threshold distance, determining that the current shooting scene is a first shooting scene;
and if the distance from the mobile terminal to the face of the user is greater than the first threshold distance, determining that the current shooting scene is a second shooting scene.
As an optional implementation manner of the embodiment of the present invention, the starting of the camera adapted to the shooting scene includes:
when the current shooting scene is determined to be the first shooting scene, starting a rear camera adaptive to the first shooting scene;
and when the current shooting scene is determined to be the second shooting scene, starting a front camera adaptive to the second shooting scene.
As an optional implementation manner of the embodiment of the present invention, when it is determined that the mobile terminal is in the vertical screen posture, the acquiring the posture of the mobile terminal according to the data acquired by the gyroscope sensor further includes:
acquiring a second deflection angle according to the data acquired by the gyroscope sensor, wherein the second deflection angle is an included angle between a plane where the front surface of the mobile terminal is located or a plane where the back surface of the mobile terminal is located and the vertical direction;
and determining that the mobile terminal is in a forward tilting posture or a backward tilting posture according to the second deflection angle.
As an optional implementation manner of the embodiment of the present invention, the determining a current shooting scene according to the gesture of the mobile terminal and the distance from the mobile terminal to the face of the user includes:
when the mobile terminal is in a vertical screen posture and a forward tilting posture, determining whether the distance from the mobile terminal to the face of a user is larger than a second threshold distance;
and if the distance from the mobile terminal to the face of the user is greater than a second threshold distance, determining that the current shooting scene is a third shooting scene.
As an optional implementation manner of the embodiment of the present invention, the starting of the camera adapted to the shooting scene includes:
and when the current shooting scene is determined to be the third shooting scene, starting a front camera adaptive to the third shooting scene.
As an optional implementation manner of the embodiment of the present invention, the determining a current shooting scene according to the gesture of the mobile terminal and the distance from the mobile terminal to the face of the user includes:
determining whether a distance from the mobile terminal to a user's face is less than a third threshold distance when the mobile terminal is in a portrait orientation and a reclined orientation;
and if the distance from the mobile terminal to the face of the user is less than a third threshold distance, determining that the current shooting scene is a fourth shooting scene.
As an optional implementation manner of the embodiment of the present invention, the starting of the camera adapted to the shooting scene includes:
and when the current shooting scene is determined to be the fourth shooting scene, starting a rear camera adaptive to the fourth shooting scene.
In a second aspect, an embodiment of the present invention provides an apparatus for starting a camera, including:
the mobile terminal comprises an acquisition unit, a display unit and a control unit, wherein the acquisition unit is used for acquiring the gesture of the mobile terminal and the distance from the mobile terminal to the face of a user when a shooting application of the mobile terminal is started;
the processing unit is used for determining a current shooting scene according to the posture of the mobile terminal and the distance from the mobile terminal to the face of a user;
and the control unit is used for starting a camera adaptive to the shooting scene, and the camera is a front camera or a rear camera of the mobile terminal.
As an optional implementation manner of the embodiment of the present invention, the obtaining unit is specifically configured to obtain a posture of the mobile terminal according to data collected by a gyroscope sensor, and obtain a distance from the mobile terminal to a face of a user according to data collected by a distance sensor.
As an optional implementation manner of the embodiment of the present invention, the obtaining unit is specifically configured to obtain a first deflection angle according to data collected by the gyroscope sensor, determine that the mobile terminal is in a vertical screen posture when the first deflection angle is greater than or equal to a threshold angle, and determine that the mobile terminal is in a horizontal screen posture when the first deflection angle is greater than or equal to the threshold angle;
the first deflection angle is an included angle between a plane where a left side face or a right side face of the mobile terminal is located and a horizontal plane.
As an optional implementation manner of the embodiment of the present invention, the threshold angle is 45 °.
As an optional implementation manner of the embodiment of the present invention, the processing unit is specifically configured to determine whether a distance from the mobile terminal to a face of a user is less than or equal to a first threshold distance when the mobile terminal is in the landscape posture, determine that the current shooting scene is a first shooting scene when the distance from the mobile terminal to the face of the user is less than or equal to the first threshold distance, and determine that the current shooting scene is a second shooting scene when the distance from the mobile terminal to the face of the user is greater than the first threshold distance.
As an optional implementation manner of the embodiment of the present invention, the control unit is specifically configured to start a rear camera adapted to the first shooting scene when it is determined that the current shooting scene is the first shooting scene; and starting a front camera adaptive to the second shooting scene under the condition that the current shooting scene is determined to be the second shooting scene.
As an optional implementation manner of the embodiment of the present invention, the obtaining unit is further configured to obtain a second deflection angle according to data collected by the gyroscope sensor under the condition that the mobile terminal is determined to be in the vertical screen posture, and determine that the mobile terminal is in the forward tilting posture or the backward tilting posture according to the second deflection angle;
and the second deflection angle is an included angle between a plane where the front surface of the mobile terminal is located or a plane where the back surface of the mobile terminal is located and the vertical direction.
As an optional implementation manner of the embodiment of the present invention, the processing unit is specifically configured to determine whether a distance from the mobile terminal to the face of the user is greater than a second threshold distance when the mobile terminal is in the portrait posture and the forward tilt posture, and determine that the current shooting scene is a third shooting scene when the distance from the mobile terminal to the face of the user is greater than the second threshold distance.
As an optional implementation manner of the embodiment of the present invention, the control unit is specifically configured to start a front camera adapted to the third shooting scene when it is determined that the current shooting scene is the third shooting scene.
As an optional implementation manner of the embodiment of the present invention, the processing unit is specifically configured to determine whether a distance from the mobile terminal to the face of the user is smaller than a third threshold distance when the mobile terminal is in the portrait screen posture and the reclined screen posture, and determine that the current shooting scene is a fourth shooting scene when the distance from the mobile terminal to the face of the user is smaller than the third threshold distance.
As an optional implementation manner of the embodiment of the present invention, the control unit is specifically configured to start a rear camera adapted to the fourth shooting scene when it is determined that the current shooting scene is the fourth shooting scene.
In a third aspect, an embodiment of the present invention provides a mobile terminal, including: a memory for storing a computer program and a processor; the processor is configured to execute the method for starting the camera according to the first aspect or any implementation manner of the first aspect when the computer program is called.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for starting a camera according to the first aspect or any implementation manner of the first aspect.
In the method for starting the camera provided by the embodiment of the invention, when the shooting application of the mobile terminal is started, firstly, the gesture of the mobile terminal and the distance from the mobile terminal to the face of a user are obtained; then determining a current shooting scene according to the posture of the mobile terminal and the distance from the mobile terminal to the face of the user, and finally starting a front camera or a rear camera which is adaptive to the shooting scene; according to the embodiment of the invention, when the user starts the shooting function of the mobile terminal each time, the current shooting scene is determined, and the front camera or the rear camera which is adaptive to the current shooting scene is started; therefore, the embodiment of the invention can start the camera adaptive to the shooting scene when the user starts the shooting function of the mobile terminal, and avoids the user from manually switching the started camera.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings.
Fig. 1 is a flowchart illustrating steps of a method for starting a camera according to an embodiment of the present invention;
fig. 2 is a second flowchart illustrating steps of a method for starting a camera according to an embodiment of the present invention;
FIG. 3 is a schematic view of a first deflection angle provided by an embodiment of the present invention;
FIG. 4 is a schematic view of a second deflection angle provided by an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an apparatus for starting a camera according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a mobile terminal according to an 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.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone.
The terms "first" and "second," and the like, in the description and in the claims of the present invention are used for distinguishing between synchronized objects, and are not used to describe a particular order of objects. For example, the first interface and the second interface, etc. are for distinguishing different interfaces, rather than for describing a particular order of the interfaces.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion. Further, in the description of the embodiments of the present invention, "a plurality" means two or more unless otherwise specified.
The execution main body of the method for starting the camera provided by the embodiment of the present invention may be a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a super-mobile personal computer (UMPC), a netbook, an electronic photo frame, a Personal Digital Assistant (PDA), a smart watch, and a smart bracelet, or may be another type of mobile terminal, and the embodiment of the present invention is not limited. For convenience of understanding, in the following embodiments, the implementation subject of the method for starting the camera is illustrated as a mobile phone as an example.
The embodiment of the present invention provides a method for starting a camera, and specifically, referring to fig. 1, the method for starting a camera provided by the embodiment of the present invention includes the following steps S11-S13:
and S11, when the shooting application of the mobile terminal is started, acquiring the gesture of the mobile terminal and the distance from the mobile terminal to the face of the user.
Specifically, starting the shooting application of the mobile terminal may be a user inputting a touch click operation to the shooting application installed on the mobile terminal. The shooting application can be an application carried by an operating system of the mobile terminal, and can also be a shooting application installed on the mobile terminal by a user according to personalized requirements.
As an optional implementation manner of the embodiment of the present invention, acquiring the gesture of the mobile terminal and the distance from the mobile terminal to the face of the user includes:
and acquiring the posture of the mobile terminal according to the data acquired by the gyroscope sensor, and acquiring the distance from the mobile terminal to the face of the user according to the data acquired by the distance sensor.
And S12, determining the current shooting scene according to the posture of the mobile terminal and the distance between the mobile terminal and the face of the user.
Generally, there is a starting time from the time when a user inputs an operation for starting a shooting application of the mobile terminal to the time when the mobile terminal starts to acquire a preview image, and the user adjusts the posture of the mobile terminal and the distance from the mobile terminal to the face of the user within the starting time so that the posture of the mobile terminal and the distance from the mobile terminal to the face of the user are suitable for the current shooting scene. For example: when a user wants to shoot a landscape, after a shooting application of the mobile terminal is started through input, the mobile terminal is adjusted to be in a landscape posture, and the distance from the mobile terminal device to the face of the user is suitable for the user to check the image.
Before shooting, the mobile terminal posture and the distance from the mobile terminal to the face of the user are adjusted, so that the mobile terminal posture and the distance from the mobile terminal to the face of the user are adaptive to the current shooting scene, and in different shooting scenes, the mobile terminal posture and the distance from the mobile terminal to the face of the user are different, so that the current shooting scene can be inferred through the mobile terminal posture and the distance from the mobile terminal to the face of the user.
And S13, starting the camera adaptive to the shooting scene.
The camera is a front camera or a rear camera of the mobile terminal.
For example: and if the current shooting scene is determined to be a self-shooting scene, starting a front camera of the mobile terminal, for example: and starting a rear camera of the mobile terminal when the current shooting scene is determined to be a scene for shooting the scenery.
In the method for starting the camera provided by the embodiment of the invention, when the shooting application of the mobile terminal is started, firstly, the gesture of the mobile terminal and the distance from the mobile terminal to the face of a user are obtained; then determining a current shooting scene according to the posture of the mobile terminal and the distance from the mobile terminal to the face of the user, and finally starting a front camera or a rear camera which is adaptive to the shooting scene; according to the embodiment of the invention, when the user starts the shooting function of the mobile terminal each time, the current shooting scene is determined, and the front camera or the rear camera which is adaptive to the current shooting scene is started; therefore, the embodiment of the invention can start the camera adaptive to the shooting scene when the user starts the shooting function of the mobile terminal, and avoids the user from manually switching the started camera.
The method for starting the camera provided by the embodiment of the invention is explained in detail below.
Referring to fig. 2, a method for starting a camera according to an embodiment of the present invention includes:
s201, when a shooting application of the mobile terminal is started, acquiring a first deflection angle according to data acquired by the gyroscope sensor, and acquiring the distance from the mobile terminal to the face of a user according to data acquired by the distance sensor.
The first deflection angle is an included angle between a plane where a left side face or a right side face of the mobile terminal is located and a horizontal plane.
Specifically, in the embodiment of the present invention, the left side surface and the right side surface of the mobile terminal respectively refer to a side surface located on the left side of the mobile terminal and a side surface located on the right side of the mobile terminal when the mobile terminal is in the vertical screen posture and the front surface (the surface where the display screen is located) of the mobile terminal faces the user.
Exemplarily, referring to fig. 3, a plane a shown in fig. 3 is a horizontal plane, a plane B is a plane where a right side surface of the mobile terminal is located, a plane c is a plane where a left side surface of the mobile terminal is located, and the first deflection angle is an included angle ≧ a between the plane B and the plane a or an included angle ≦ B between the plane c and the plane a; and the left side surface and the right side surface of the mobile terminal are parallel surfaces, so that the angle A is equal to the angle B.
It should be noted that the left side and/or the right side of some mobile terminals are not planar, and in this case, a plane parallel to the side and perpendicular to the plane of the display screen of the mobile terminal may be selected as the left side and/or the right side of the mobile terminal. For example: when the left side surface and/or the right side surface of the mobile terminal is the cambered surface, the plane where the left side surface and/or the right side surface of the mobile terminal is located can be a tangent plane with the top end of the cambered surface.
S202, judging whether the first deflection angle is smaller than a threshold angle.
Optionally, the threshold angle is 45 °.
It should be noted that the threshold angle may also be other angles, such as: 30 degrees, 60 degrees and the like, which are not limited in the embodiments of the present invention.
In the above step S202, if the first yaw angle is smaller than the threshold angle, the following steps S203 and S204 are executed.
S203, determining that the mobile terminal is in the landscape posture.
S204, determining whether the distance from the mobile terminal to the face of the user is smaller than or equal to a first threshold distance.
In the above step S204, if the distance from the mobile terminal to the face of the user is less than or equal to the first threshold distance, the following steps S205 and S206 are performed, and if the distance from the mobile terminal to the face of the user is greater than the first threshold distance, the following steps S207 and S208 are performed.
And S205, determining the current shooting scene as a first shooting scene.
And S206, starting a rear camera adaptive to the first shooting scene.
When a user adjusts the mobile terminal to be in a landscape state and the mobile terminal is close to the landscape state, the user generally uses the mobile terminal to shoot people or scenery in a landscape mode, and a rear camera of the mobile terminal is probably used; therefore, if the first deflection angle is smaller than the threshold angle and the distance from the mobile terminal to the face of the user is equal to or larger than the first threshold distance, the rear camera of the mobile terminal is started.
And S207, determining the current shooting scene as a second shooting scene.
And S208, starting the front camera adaptive to the second shooting scene.
Under the condition that a user adjusts the mobile terminal to be in a horizontal screen state and the mobile terminal is far away, the user generally uses the horizontal screen of the mobile terminal to carry out self-shooting by a plurality of persons, and a front camera of the mobile terminal is probably used; therefore, if the first deflection angle is smaller than the threshold angle and the distance from the mobile terminal to the face of the user is larger than or equal to the first threshold distance, the front camera of the mobile terminal is started.
In the above step S202, if the first deflection angle is greater than or equal to the threshold angle, the following steps S209 to S211 are performed.
S209, determining that the mobile terminal is in a vertical screen posture.
And S210, acquiring a second deflection angle according to the data acquired by the gyroscope sensor.
And the second deflection angle is an included angle between a plane where the front surface of the mobile terminal is located or a plane where the back surface of the mobile terminal is located and the vertical direction.
Exemplarily, referring to fig. 4, straight lines L1 and L2 shown in fig. 4 are both located in a vertical direction, a plane D is a plane where a front surface of the mobile terminal is located, a plane e is a plane where a back surface of the mobile terminal is located, and the second deflection angle is an included angle ≦ C between the plane D and the straight line L1 or an included angle ≦ D between the plane e and the straight line L2; and the front surface and the back surface of the mobile terminal are parallel surfaces, so that the angle C is equal to the angle D.
S211, determining that the mobile terminal is in a forward tilting posture or a backward tilting posture according to the second deflection angle.
Specifically, the second deflection angle when the mobile terminal tilts forward may be defined as a positive value, the second deflection angle when the mobile terminal tilts forward may be defined as a negative value, and then the forward tilting posture or the backward tilting posture of the mobile terminal is determined by the positive and negative values of the second deflection angle.
It should be noted that, if the second deflection angle is 0 °, that is, the plane on which the front surface or the plane on which the back surface of the mobile terminal is located are both parallel to the horizontal plane, it is determined that the mobile terminal neither tilts forward nor backward.
In the above step S211, if it is determined that the mobile terminal is in the forward tilting posture, the following step S212 is performed.
S212, determining whether the distance from the mobile terminal to the face of the user is larger than a second threshold distance.
In the above step S212, if the distance from the mobile terminal to the face of the user is greater than the second threshold distance, the following steps S213 and S214 are performed.
And S213, determining the current shooting scene as a third shooting scene.
And S214, starting a front camera adaptive to the third shooting scene.
Under the condition that a user adjusts the mobile terminal to be in a vertical screen state and a forward tilting state and the mobile terminal is far away, the vertical screen of the mobile terminal is generally used for overlooking and self-shooting, and a front camera of the mobile terminal is probably used; therefore, if the mobile terminal is in the vertical screen posture and the forward tilting posture and the distance from the mobile terminal to the face of the user is larger than the second threshold distance, the front camera of the mobile terminal is started.
In the above step S211, if it is determined that the mobile terminal is in the forward tilt posture, the following step S215 is performed.
S215, determining whether the distance from the mobile terminal to the face of the user is smaller than a third threshold distance.
In the above step S215, if the distance from the mobile terminal to the face of the user is less than the third threshold distance, the following steps S216 and S217 are performed.
And S216, determining the current shooting scene as a fourth shooting scene.
And S217, starting a rear camera adaptive to the fourth shooting scene.
Under the condition that a user adjusts the mobile terminal to be in a vertical screen state and a backward tilting state and the distance between the mobile terminal and the mobile terminal is short, the user generally uses the vertical screen of the mobile terminal to shoot downwards, and a rear camera of the mobile terminal is probably used; therefore, if the mobile terminal is in the vertical screen posture and the backward tilting posture and the distance from the mobile terminal to the face of the user is smaller than the third threshold distance, the rear camera of the mobile terminal is started.
It should be further noted that, if the current shooting scene cannot be determined according to the posture of the mobile terminal and the distance from the mobile terminal to the face of the user, that is, the posture of the mobile terminal and the distance from the mobile terminal to the face of the user do not satisfy the posture of the mobile terminal and the distance from the mobile terminal to the face of the user in any shooting scene, the camera of the mobile terminal is started according to a preset mode. The starting of the camera of the mobile terminal according to the preset mode can be that a front camera or a rear camera of the mobile terminal is started by default, or the camera in a starting state when the shooting function is closed last time is started.
Based on the same inventive concept, as an implementation of the foregoing method, an embodiment of the present invention further provides a device for starting a camera, where the embodiment of the device corresponds to the foregoing method embodiment, and for convenience of reading, details in the foregoing method embodiment are not repeated in this device embodiment one by one, but it should be clear that the device in this embodiment can correspondingly implement all the contents in the foregoing method embodiment.
Fig. 5 is a schematic structural diagram of an apparatus for starting a camera according to an embodiment of the present invention, and as shown in fig. 5, the apparatus 500 for starting a camera according to the embodiment includes:
an obtaining unit 51, configured to obtain a gesture of a mobile terminal and a distance from the mobile terminal to a face of a user when a shooting application of the mobile terminal is started;
a processing unit 52 for determining a current shooting scene according to the posture of the mobile terminal and the distance from the mobile terminal to the face of the user;
and the control unit 53 is configured to start a camera adapted to the shooting scene, where the camera is a front camera or a rear camera of the mobile terminal.
As an optional implementation manner of the embodiment of the present invention, the obtaining unit 51 is specifically configured to obtain the posture of the mobile terminal according to data collected by a gyroscope sensor, and obtain the distance from the mobile terminal to the face of the user according to data collected by a distance sensor.
As an optional implementation manner of the embodiment of the present invention, the obtaining unit 51 is specifically configured to obtain a first deflection angle according to data collected by the gyroscope sensor, determine that the mobile terminal is in a vertical screen posture when the first deflection angle is greater than or equal to a threshold angle, and determine that the mobile terminal is in a horizontal screen posture when the first deflection angle is greater than or equal to the threshold angle;
the first deflection angle is an included angle between a plane where a left side face or a right side face of the mobile terminal is located and a horizontal plane.
As an optional implementation manner of the embodiment of the present invention, the threshold angle is 45 °.
As an optional implementation manner of the embodiment of the present invention, the processing unit 52 is specifically configured to determine whether a distance from the mobile terminal to the face of the user is less than or equal to a first threshold distance when the mobile terminal is in the landscape posture, determine that the current shooting scene is the first shooting scene when the distance from the mobile terminal to the face of the user is less than or equal to the first threshold distance, and determine that the current shooting scene is the second shooting scene when the distance from the mobile terminal to the face of the user is greater than the first threshold distance.
As an optional implementation manner of the embodiment of the present invention, the control unit 53 is specifically configured to, in a case that it is determined that a current shooting scene is the first shooting scene, start a rear camera adapted to the first shooting scene; and starting a front camera adaptive to the second shooting scene under the condition that the current shooting scene is determined to be the second shooting scene.
As an optional implementation manner of the embodiment of the present invention, the obtaining unit 51 is further configured to, under a condition that it is determined that the mobile terminal is in a vertical screen posture, obtain a second deflection angle according to data collected by the gyroscope sensor, and determine that the mobile terminal is in a forward tilting posture or a backward tilting posture according to the second deflection angle;
and the second deflection angle is an included angle between a plane where the front surface of the mobile terminal is located or a plane where the back surface of the mobile terminal is located and the vertical direction.
As an optional implementation manner of the embodiment of the present invention, the processing unit 52 is specifically configured to determine whether a distance from the mobile terminal to the face of the user is greater than a second threshold distance when the mobile terminal is in the portrait posture and the forward tilt posture, and determine that the current shooting scene is a third shooting scene when the distance from the mobile terminal to the face of the user is greater than the second threshold distance.
As an optional implementation manner of the embodiment of the present invention, the control unit 53 is specifically configured to, when it is determined that the current shooting scene is the third shooting scene, start a front camera adapted to the third shooting scene.
As an optional implementation manner of the embodiment of the present invention, the processing unit 52 is specifically configured to determine whether a distance from the mobile terminal to the face of the user is smaller than a third threshold distance when the mobile terminal is in the portrait posture and the reclined posture, and determine that the current shooting scene is a fourth shooting scene when the distance from the mobile terminal to the face of the user is smaller than the third threshold distance.
As an optional implementation manner of the embodiment of the present invention, the control unit 53 is specifically configured to, when it is determined that the current shooting scene is the fourth shooting scene, start a rear camera adapted to the fourth shooting scene.
The voice instruction execution device provided in this embodiment may execute the method for starting the camera provided in the above method embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
Based on the same inventive concept, the embodiment of the invention also provides a mobile terminal. Fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention, and as shown in fig. 6, the mobile terminal according to the embodiment includes: a memory 61 and a processor 62, the memory 61 being for storing computer programs; the processor 62 is configured to execute the steps of the method for starting the camera according to the above-mentioned method embodiment when the computer program is called.
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 method for starting a camera according to the above-mentioned method embodiment is implemented.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the medium.
The processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer readable media include both permanent and non-permanent, removable and non-removable storage media. Storage media may implement information storage by any method or technology, and the information may be computer-readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of starting a camera, comprising:
when a shooting application of a mobile terminal is started, acquiring the posture of the mobile terminal and the distance from the mobile terminal to the face of a user;
determining a current shooting scene according to the posture of the mobile terminal and the distance from the mobile terminal to the face of a user;
and starting a camera adaptive to the shooting scene, wherein the camera is a front camera or a rear camera of the mobile terminal.
2. The method of claim 1, wherein the obtaining the pose of the mobile terminal and the distance of the mobile terminal from the face of the user comprises:
and acquiring the posture of the mobile terminal according to the data acquired by the gyroscope sensor, and acquiring the distance from the mobile terminal to the face of the user according to the data acquired by the distance sensor.
3. The method according to claim 2, wherein the obtaining the gesture of the mobile terminal according to the data collected by the gyroscope sensor comprises:
acquiring a first deflection angle according to data acquired by the gyroscope sensor, wherein the first deflection angle is an included angle between a plane where the left side surface or the right side surface of the mobile terminal is located and a horizontal plane;
if the first deflection angle is larger than or equal to a threshold angle, determining that the mobile terminal is in a vertical screen posture;
and if the deflection angle is smaller than the threshold angle, determining that the mobile terminal is in the landscape posture.
4. The method of claim 3, wherein determining the current shooting scene according to the gesture of the mobile terminal and the distance from the mobile terminal to the face of the user comprises:
determining whether a distance from the mobile terminal to a user's face is less than or equal to a first threshold distance when the mobile terminal is in a landscape orientation;
if the distance from the mobile terminal to the face of the user is smaller than or equal to the first threshold distance, determining that the current shooting scene is a first shooting scene;
and if the distance from the mobile terminal to the face of the user is greater than the first threshold distance, determining that the current shooting scene is a second shooting scene.
5. The method according to claim 3, wherein when it is determined that the mobile terminal is in a portrait orientation, the obtaining the orientation of the mobile terminal according to the data collected by the gyroscope sensor further comprises:
acquiring a second deflection angle according to the data acquired by the gyroscope sensor, wherein the second deflection angle is an included angle between a plane where the front surface of the mobile terminal is located or a plane where the back surface of the mobile terminal is located and the vertical direction;
and determining that the mobile terminal is in a forward tilting posture or a backward tilting posture according to the second deflection angle.
6. The method of claim 5, wherein determining the current shooting scene according to the gesture of the mobile terminal and the distance from the mobile terminal to the face of the user comprises:
when the mobile terminal is in a vertical screen posture and a forward tilting posture, determining whether the distance from the mobile terminal to the face of a user is larger than a second threshold distance;
and if the distance from the mobile terminal to the face of the user is greater than a second threshold distance, determining that the current shooting scene is a third shooting scene.
7. The method of claim 5, wherein determining the current shooting scene according to the gesture of the mobile terminal and the distance from the mobile terminal to the face of the user comprises:
determining whether a distance from the mobile terminal to a user's face is less than a third threshold distance when the mobile terminal is in a portrait orientation and a reclined orientation;
and if the distance from the mobile terminal to the face of the user is less than a third threshold distance, determining that the current shooting scene is a fourth shooting scene.
8. An apparatus for activating a camera, comprising:
the mobile terminal comprises an acquisition unit, a display unit and a control unit, wherein the acquisition unit is used for acquiring the gesture of the mobile terminal and the distance from the mobile terminal to the face of a user when a shooting application of the mobile terminal is started;
the processing unit is used for determining a current shooting scene according to the posture of the mobile terminal and the distance from the mobile terminal to the face of a user;
and the control unit is used for starting a camera adaptive to the shooting scene, and the camera is a front camera or a rear camera of the mobile terminal.
9. A mobile terminal comprising a memory and a processor, the memory for storing a computer program; the processor is adapted to perform the method of starting a camera according to any of claims 1-7 when invoking the computer program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of activating a camera according to any one of claims 1-7.
CN201911405224.XA 2019-12-31 2019-12-31 Method and device for starting camera and mobile terminal Withdrawn CN113132609A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911405224.XA CN113132609A (en) 2019-12-31 2019-12-31 Method and device for starting camera and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911405224.XA CN113132609A (en) 2019-12-31 2019-12-31 Method and device for starting camera and mobile terminal

Publications (1)

Publication Number Publication Date
CN113132609A true CN113132609A (en) 2021-07-16

Family

ID=76768641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911405224.XA Withdrawn CN113132609A (en) 2019-12-31 2019-12-31 Method and device for starting camera and mobile terminal

Country Status (1)

Country Link
CN (1) CN113132609A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374762A (en) * 2021-12-09 2022-04-19 青岛海信移动通信技术股份有限公司 Terminal device and shooting control method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374762A (en) * 2021-12-09 2022-04-19 青岛海信移动通信技术股份有限公司 Terminal device and shooting control method

Similar Documents

Publication Publication Date Title
CN106454139B (en) Photographing method and mobile terminal
CN110100251B (en) Apparatus, method, and computer-readable storage medium for processing document
RU2628494C1 (en) Method and device for generating image filter
CN112711300B (en) Dynamic control of camera resources in a device having multiple displays
WO2020151281A9 (en) Image processing method and device, electronic equipment and storage medium
WO2017124899A1 (en) Information processing method, apparatus and electronic device
US11825040B2 (en) Image shooting method and device, terminal, and storage medium
US8400532B2 (en) Digital image capturing device providing photographing composition and method thereof
WO2014166127A1 (en) Image capturing method, apparatus, and electronic device
CN104754216A (en) Photographing method and device
CN108230333A (en) Image processing method, device, computer program, storage medium and electronic equipment
CN110933334B (en) Video noise reduction method, device, terminal and storage medium
CN111263063A (en) Method, device and equipment for shooting image
EP3989591A1 (en) Resource display method, device, apparatus, and storage medium
KR20230109174A (en) Technology for capturing video in landscape mode with handheld devices
CN111221457A (en) Method, device and equipment for adjusting multimedia content and readable storage medium
TWI676113B (en) Preview method and device in iris recognition process
WO2019006762A1 (en) Image capturing apparatus and method
EP3813010B1 (en) Facial image enhancement method, device and electronic device
JP2024504159A (en) Photography methods, equipment, electronic equipment and readable storage media
CN113132609A (en) Method and device for starting camera and mobile terminal
EP4093015A1 (en) Photographing method and apparatus, storage medium, and electronic device
CN108763491B (en) Picture processing method and device and terminal equipment
CN115134532A (en) Image processing method, image processing device, storage medium and electronic equipment
CN111861932B (en) Image distortion correction method and device and mobile terminal

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20210716

WW01 Invention patent application withdrawn after publication