Shooting method and electronic device
AssigneeHonor Device Co., Ltd.
InventorsShiyu Zhu, Yonghua Wang
Life of this patent
Estimating the term…
Abstract
A shooting method is provided. By implementing the shooting method provided in embodiments of this application, a terminal electronic device such as a smartphone or a smart television can determine to change a shooting mode based on a recognized user gesture. The electronic device can recognize a user's waving or sliding gesture more accurately based on the user's hand position change track in an image frame sequence and whether there are hand movements in two directions in the position changes.
Claims20
A method, comprising:
- displaying, by an electronic device, a first interface, wherein the electronic device comprises a first camera and a second camera, wherein the first interface comprises a first preview window and a second preview window, wherein the first preview window displays an image captured in real time by the first camera, and wherein the second preview window displays an image captured in real time by the second camera;
- detecting, by the electronic device, a first gesture of a user;
- and
- displaying, by the electronic device, a second interface in response to the first gesture, wherein the second interface comprises a third preview window, and the third preview window displays the image captured in real time by the first camera or the image captured in real time by the second camera, wherein
- the detecting the first gesture of the user comprises:
- capturing a first image, wherein the first image is captured by the first camera or the second camera, the first image comprises a hand image, and the hand image is located at a first position in the first image;
- capturing a second image, wherein the second image is captured by the first camera or the second camera, the second image comprises the hand image, the hand image is located at a second position in the second image, and the second position is different from the first position;
- determining a first displacement vector based on the first position, wherein the first displacement vector comprises first direction information, and the first direction information identifies a first direction of the first displacement vector;
- determining a second displacement vector based on the second position, wherein the second displacement vector comprises second direction information, and the second direction information identifies a second direction of the second displacement vector;
- and
- determining the first gesture based on the first displacement vector and the second displacement vector.
An electronic device, comprising:
- a first camera;
- a second camera;
- one or more processors and one or more memories, wherein the one or more memories are coupled to the one or more processors, the one or more memories store computer program code, the computer program code comprises computer instructions, and when executing the computer instructions, the electronic device is enabled to perform operations including:
- displaying a first interface, wherein the first interface comprises a first preview window and a second preview window, the first preview window displays an image captured in real time by the first camera, and the second preview window displays an image captured in real time by the second camera;
- detecting a first gesture of a user;
- and
- displaying a second interface in response to the first gesture, wherein the second interface comprises a third preview window, and the third preview window displays the image captured in real time by the first camera or the image captured in real time by the second camera, wherein
- the detecting the first gesture of the user comprises:
- capturing a first image, wherein the first image is captured by the first camera or the second camera, the first image comprises a hand image, and the hand image is located at a first position in the first image;
- capturing a second image, wherein the second image is captured by the first camera or the second camera, the second image comprises the hand image, the hand image is located at a second position in the second image, and the second position is different from the first position;
- determining a first displacement vector based on the first position, wherein the first displacement vector comprises first direction information, and the first direction information identifies a first direction of the first displacement vector;
- determining a second displacement vector based on the second position, wherein the second displacement vector comprises second direction information, and the second direction information identifies a second direction of the second displacement vector;
- and
- determining the first gesture based on the first displacement vector and the second displacement vector.
A non-transitory computer-readable storage medium storing instructions, wherein when an electronic device runs the instructions, the electronic device is enabled to perform operations:
- displaying a first interface, wherein the first interface comprises a first preview window and a second preview window, the first preview window displays an image captured in real time by a first camera, and the second preview window displays an image captured in real time by a second camera;
- detecting a first gesture of a user;
- and
- displaying a second interface in response to the first gesture, wherein the second interface comprises a third preview window, and the third preview window displays the image captured in real time by the first camera or the image captured in real time by the second camera, wherein
- the detecting the first gesture of the user comprises:
- capturing a first image, wherein the first image is captured by the first camera or the second camera, the first image comprises a hand image, and the hand image is located at a first position in the first image;
- capturing a second image, wherein the second image is captured by the first camera or the second camera, the second image comprises the hand image, the hand image is located at a second position in the second image, and the second position is different from the first position;
- determining a first displacement vector based on the first position, wherein the first displacement vector comprises first direction information, and the first direction information identifies a first direction of the first displacement vector;
- determining a second displacement vector based on the second position, wherein the second displacement vector comprises second direction information, and the second direction information identifies a second direction of the second displacement vector;
- and
- determining the first gesture based on the first displacement vector and the second displacement vector.
Dependencies are inferred from the claim text.