WO2023093169A1 - 拍摄的方法和电子设备 - Google Patents
拍摄的方法和电子设备 Download PDFInfo
- Publication number
- WO2023093169A1 WO2023093169A1 PCT/CN2022/115160 CN2022115160W WO2023093169A1 WO 2023093169 A1 WO2023093169 A1 WO 2023093169A1 CN 2022115160 W CN2022115160 W CN 2022115160W WO 2023093169 A1 WO2023093169 A1 WO 2023093169A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- gesture
- image
- electronic device
- hand
- camera
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 123
- 239000013598 vector Substances 0.000 claims abstract description 109
- 210000000988 bone and bone Anatomy 0.000 claims description 32
- 238000001514 detection method Methods 0.000 claims description 22
- 230000004044 response Effects 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 13
- 230000015654 memory Effects 0.000 claims description 13
- 210000004932 little finger Anatomy 0.000 claims description 5
- 210000003813 thumb Anatomy 0.000 claims description 5
- 238000004422 calculation algorithm Methods 0.000 abstract description 26
- 230000007306 turnover Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 37
- 238000010586 diagram Methods 0.000 description 17
- 238000012545 processing Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 11
- 238000004364 calculation method Methods 0.000 description 7
- 230000008859 change Effects 0.000 description 7
- 210000004247 hand Anatomy 0.000 description 7
- 230000009471 action Effects 0.000 description 6
- 229920001621 AMOLED Polymers 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000013135 deep learning Methods 0.000 description 3
- 210000003811 finger Anatomy 0.000 description 3
- 238000010801 machine learning Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 238000003672 processing method Methods 0.000 description 3
- 238000009877 rendering Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 2
- 230000004927 fusion Effects 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 239000002096 quantum dot Substances 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 210000000245 forearm Anatomy 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000013515 script Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/45—Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from two or more image sensors being of different type or operating in different modes, e.g. with a CMOS sensor for moving images in combination with a charge-coupled device [CCD] for still images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/017—Gesture based interaction, e.g. based on a set of recognized hand gestures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/20—Movements or behaviour, e.g. gesture recognition
- G06V40/28—Recognition of hand or arm movements, e.g. recognition of deaf sign language
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/61—Control of cameras or camera modules based on recognised objects
- H04N23/611—Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/62—Control of parameters via user interfaces
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/63—Control of cameras or camera modules by using electronic viewfinders
- H04N23/631—Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/63—Control of cameras or camera modules by using electronic viewfinders
- H04N23/631—Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
- H04N23/632—Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/667—Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/90—Arrangement of cameras or camera modules, e.g. multiple cameras in TV studios or sports stadiums
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04803—Split screen, i.e. subdividing the display area or the window area into separate subareas
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/2624—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects for obtaining an image which is composed of whole input images, e.g. splitscreen
Definitions
- the present application relates to the field of terminals, in particular to a shooting method and electronic equipment.
- Electronic devices such as mobile phones provide a variety of shooting modes, and users can select a shooting mode suitable for the current scene in different scenarios to obtain a better shooting experience.
- the existing process of switching shooting modes requires the user to click a control on the screen to complete. It is inconvenient for the user to realize the method of switching the shooting mode by the user clicking the screen.
- This application provides a shooting method.
- the electronic device can recognize the gesture made by the user, and switch the shooting mode according to the gesture control, thereby improving the user's shooting experience.
- an embodiment of the present application provides a photographing method, the method can be applied to an electronic device, the electronic device includes a first camera and a second camera, and the method includes: displaying a first interface, the first interface includes a first A preview window, the first preview window displays the image captured by the first camera in real time; the first gesture of the user is detected; in response to the first gesture, a second interface is displayed, the second interface includes a second preview window, and the second preview window displays the first gesture The image collected by the two cameras in real time; wherein, detecting the first gesture of the user includes: collecting a first image, the first image is an image collected by the first camera or the second camera, and the first image includes a first hand image; Determine the first gesture vector, the first gesture vector is determined based on the first hand image; collect a second image, the second image is an image collected by the first camera or the second camera, and the second image includes the second hand image ; Determine a second gesture vector, the second gesture vector is determined based on the second hand image;
- the electronic device can switch between different shooting modes according to the recognized gesture of the user.
- the electronic device can determine the state of the user's hand according to the gesture vectors of the hand images in the two frames of images, and then judge whether the user has made a preset gesture by comparing the states of the hands in the two frames of images.
- the first gesture vector includes first direction information
- the second gesture vector includes second direction information
- the electronic device may determine that the user's hand has turned over according to the direction of the gesture vector in the hand image in the two images.
- determining the first gesture based on the first direction information and the second direction information includes: when the first direction information and the second direction information are different, determining the first gesture For the flip hand gesture.
- the electronic device when it is recognized that the direction of the gesture vector in the hand image in the two images is different, the electronic device can confirm that the state of the hand in the recognized image has been flipped, so the electronic device can confirm that the user made a flip. hand gesture.
- the first interface further includes a third preview window, and the third preview window displays images captured by the second camera in real time; in response to the first gesture, the third interface is displayed, and the third preview window is displayed.
- the first preview window displays the images collected by the second camera in real time
- the third preview window displays the images collected by the first camera in real time.
- the electronic device after recognizing the hand-turning gesture, can change the image displayed in the preview window in the dual-view shooting scene.
- determining the first gesture vector specifically includes: identifying the first feature point and the second feature point in the first hand image; The position of the feature point on the first coordinate axis determines the first gesture vector, wherein the first coordinate axis is parallel to the ground; determining the second gesture vector specifically includes: identifying the first feature point in the second hand image and The second feature point; according to the positions of the first feature point and the second feature point on the first coordinate axis, determine the second gesture vector;
- the electronic device can use two specific points in the hand image to construct a gesture vector, and then determine the gesture vector representing the state of the hand in the hand image.
- the first direction information of the first gesture vector is the direction from the first coordinate to the second coordinate
- the first coordinate is the first feature point in the first hand image
- the second coordinate is the projection point of the second feature point in the first hand image on the first coordinate axis.
- the second direction information of the second gesture vector is the direction in which the third coordinate points to the fourth coordinate
- the third coordinate is the projection point of the first feature point in the second hand image on the first coordinate axis
- the fourth coordinate is Projection points of the second feature points on the first coordinate axis in the second hand image.
- the electronic device can determine the coordinates of the first feature point and the second feature point through the horizontal coordinate axis, and then use the coordinates to determine the first gesture vector and the second gesture vector.
- identifying the first feature point and the second feature point in the first hand image specifically includes: identifying a first number of bones of the palm in the first hand image points; determine a first feature point and a second feature point based on the first number of bone points; the first feature point and the second feature point are respectively located on both sides of the central axis of the palm in the first hand image.
- the electronic device can use the skeleton point detection method to determine the feature points representing the state of the hand in the hand image.
- determining the first feature point and the second feature point based on the first number of bone points includes: selecting two bone points from the first number of bone points as The first feature point and the second feature point; or, select a plurality of bone points from the first number of bone points, and use the plurality of bone points to calculate the first feature point and the second feature point.
- the electronic device can select the first feature point and the second feature point from the identified multiple bone points, or calculate the first feature point based on some or all of the multiple bone points. feature point and second feature point.
- the first feature point is the bone point at the top of the thumb; the second feature point is the bone point at the top of the little finger.
- the method before determining the second gesture vector, further includes: identifying the area where the second hand image is located in the second image; determining the second hand image in the second image The intersection ratio IoU of the hand image and the area where the first hand image is located in the first image; determining the second gesture vector includes: when the IoU satisfies the first threshold, determining the second hand image in the second image Two hand gestures vector.
- the electronic device may further calculate an intersection ratio between the second hand image and the first hand image in the second image.
- the electronic device can confirm in advance that the image frame does not conform to the characteristics of the hand-turning gesture, so as to obtain other images for judgment.
- determining the IoU of the area where the hand is located in the second image and the first image includes: determining the difference between the second hand image and the first image in the second image The intersection and union of the area where the first hand image is located; IoU is the intersection ratio union.
- identifying the area where the second hand image is located in the second image includes: determining the area where the face is located in the second image; determining the area where the face is located based on the area where the face is located An area, the first area includes and is larger than the area where the face is located, and the first area is smaller than the second image; identify the area where the hand is located in the first area, and determine that the area where the hand is located is the area where the second hand image is located.
- the electronic device can more accurately locate the hand image in the image based on face recognition and human body recognition.
- the method further includes: determining that the length of the second gesture vector satisfies the second threshold; when the first direction information and the second direction information are different, determining the first gesture vector
- the hand turning gesture includes: when the first direction information is different from the second direction information, and the length of the second gesture vector satisfies a second threshold, determining that the first gesture is a hand turning gesture.
- the electronic device can limit the angle of palm flipping in the hand-turning gesture, so as to avoid recognizing the hand-shaking action unintentionally made by the user as the hand-turning gesture, thereby improving the accuracy of gesture recognition.
- the method before detecting the first gesture of the user, the method further includes: detecting a first operation; and starting shooting in response to the first operation.
- the electronic device can recognize the user's gestures during the video shooting process, and switch the shooting mode at the same time, so that the switching shooting process can better meet the needs of the user or the current shooting scene, thereby improving the user experience.
- the first operation includes: an operation acting on the first control, and the first control is displayed on the first interface; or, recognizing that the user makes a second gesture operation, the second gesture corresponds to the first control.
- the electronic device can start shooting through controls acting on the user interface, or can start shooting by recognizing a specific gesture for controlling shooting.
- the first camera is a front camera, and the second camera is a rear camera; or, the first camera is a front camera, and the second camera is a front camera; or , the first camera is the rear camera, and the second camera is the rear camera.
- the cameras used by the electronic device to realize dual-view or multi-view shooting can be both front-facing cameras and rear-facing cameras, and can also be both front-facing cameras or simultaneously rear-facing cameras.
- the present application provides an electronic device, which includes one or more processors and one or more memories; wherein, one or more memories are coupled with one or more processors, and one or more
- the memory is used to store computer program codes.
- the computer program codes include computer instructions.
- the electronic device executes the method described in the first aspect and any possible implementation manner of the first aspect.
- the present application provides a computer-readable storage medium, including instructions.
- the above-mentioned instructions When the above-mentioned instructions are run on an electronic device, the above-mentioned electronic device executes the method described in the first aspect and any possible implementation manner of the first aspect. method.
- the present application provides a computer program product containing instructions.
- the above-mentioned computer program product is run on an electronic device, the above-mentioned electronic device is executed as described in the first aspect and any possible implementation manner of the first aspect. method.
- the electronic device provided in the second aspect above, the computer storage medium provided in the third aspect, and the computer program product provided in the fourth aspect are all used to execute the method provided in the first aspect of the present application. Therefore, the beneficial effects that it can achieve can refer to the beneficial effects in the corresponding method, and will not be repeated here.
- FIG. 1 is a schematic diagram of a group of hand-turning gestures provided by an embodiment of the present application
- 2A-2B are a group of user interfaces for setting dual-view shooting modes provided by the embodiment of the present application.
- Fig. 3A-Fig. 3F are a set of user interfaces for recognizing flipping hand gestures to switch dual-view shooting modes provided by the embodiment of the present application;
- 4A-4F are a set of user interfaces for recognizing right-swipe gestures to switch dual-view shooting modes provided by the embodiment of the present application;
- 5A-5F are a group of user interfaces for recognizing left-swipe gestures to switch dual-view shooting modes provided by the embodiment of the present application;
- 6A-6B are a group of user interfaces for recognizing fist gestures to switch dual-view shooting modes provided by the embodiment of the present application;
- FIG. 7 is a flowchart of an electronic device recognizing a hand-turning gesture provided by an embodiment of the present application.
- FIGS. 8A-8B are schematic diagrams of the initial image frame provided by the embodiment of the present application.
- FIGS. 9A-9B are schematic diagrams of hand images in positioning image frames provided by the embodiment of the present application.
- Fig. 10 is a schematic diagram of identifying the skeleton points of the hand image frame provided by the embodiment of the present application.
- FIG. 11 is a schematic diagram of determining a gesture vector in an initial image frame provided by an embodiment of the present application.
- FIG. 12 is a flow chart of an electronic device recognizing a hand-turning gesture provided by an embodiment of the present application.
- FIG. 13 is a schematic diagram of an image frame including a hand image acquired by an electronic device provided in an embodiment of the present application.
- FIG. 14 is a schematic diagram of the hand image cross-over-merge ratio in the image frames collected after the electronic device determines the initial image frame and the initial image frame provided by the embodiment of the present application;
- FIG. 15 is a schematic diagram of an electronic device recognizing a hand-turning gesture provided by an embodiment of the present application.
- FIG. 16 is a software architecture diagram of an electronic device provided by an embodiment of the present application.
- FIG. 17 is a hardware architecture diagram of an electronic device provided by an embodiment of the present application.
- Electronic devices such as mobile phones provide a variety of shooting modes, and users can select a shooting mode suitable for the current scene in different scenarios to obtain a better shooting experience.
- the existing process of switching shooting modes requires the user to click a control on the screen to complete. It is inconvenient for the user to realize the method of switching the shooting mode by the user clicking the screen.
- an embodiment of the present application provides a shooting method, which relates to a method for switching the shooting mode when previewing or shooting a video.
- the implementation of the embodiment of the present application provides a shooting method.
- Terminal electronic devices electronic device 100
- smartphones and smart TVs can recognize specific gestures made by users when displaying preview images or shooting videos. After confirming that the specific gesture is recognized, the electronic device 100 may switch the shooting mode according to the type of the recognized gesture (for example, switching from front-facing shooting to rear-facing shooting, or switching from dual-camera shooting to single-camera shooting).
- the application method is not only applicable to the preview stage when shooting a video or picture, but also applicable to the shooting stage during the video shooting after the video shooting starts.
- the above-mentioned shooting modes refer to different combinations and display types when the electronic device 100 turns on multiple cameras for multi-view shooting, including the mode of using multiple rear cameras for shooting, and the mode of using the front camera and the rear camera at the same time. It can also include shooting modes of different combinations among the above-mentioned multiple cameras and mode switching before a single camera, and can also include a single camera shooting mode switching, such as switching from the front camera to the rear camera, etc.
- FIG. 1 exemplarily shows a schematic diagram of a hand-turning gesture.
- the hand-turning gesture refers to raising the hand and turning the forearm so that the hand changes from the palm facing the camera of the electronic device 100 to the back of the hand facing the camera of the electronic device 100 , or change from the form of the back of the hand facing the camera of the electronic device 100 to the form of the palm facing the camera of the electronic device 100 .
- the above-mentioned palm and the back of the hand refer to the palm and the back of the hand of a hand with five fingers spread out. Subsequent embodiments are mainly described by taking the hand-turning process of "turning the palm to the back of the hand" as an example.
- the aforementioned electronic device 100 is an electronic device capable of collecting images and having image processing capabilities.
- the image content displayed in the image frame collected by the electronic device 100 is the palm of the hand;
- the image content displayed in the image frame collected by the electronic device 100 is The image content of is the back of the hand.
- the electronic device 100's recognition of the flip gesture shown in FIG. 1 relies on deep learning algorithms or machine learning algorithms based on image features.
- the electronic device 100 When using the above method, the electronic device 100 often needs to learn a large number of images containing flip gestures, so as to obtain a model capable of recognizing flip gestures, and then identify whether other images contain flip gestures based on the above model.
- the method of realizing gesture recognition through deep learning algorithm or machine learning algorithm relies on the hand-turning gesture recognition model obtained through training.
- the calculation cost and time cost of the generation and use of the model are relatively large. In the process of using the above method to recognize the user's gestures, the accuracy of gesture recognition is not high, and the recognition efficiency is also low.
- the electronic device 100 can use the existing bone point recognition algorithm to determine the bone points of the user's hand in the image.
- the electronic device 100 may determine two gesture feature points from the aforementioned skeleton points.
- the gesture vector formed by the above two gesture feature points can be used to represent the state of the hand (such as the palm or the back of the hand or the side of the hand, etc.) in the current image frame.
- the above states include: the palm of the hand faces the camera of the electronic device 100 , or the back of the hand faces the camera of the electronic device 100 .
- the electronic device 100 can determine gesture vectors of subsequent image frames in the same way.
- the electronic device 100 can determine that the state of the hand in the two frames before and after the image has changed, that is, the hand in the image frame is replaced by the palm Flip to the back of the hand, or from the back of the hand to the palm. Therefore, the electronic device 100 can confirm that the user has made the hand-turning gesture.
- the electronic device 100 can also be a tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, and cellular Telephone, personal digital assistant (PDA), augmented reality (augmented reality, AR) device, virtual reality (virtual reality, VR) device, artificial intelligence (artificial intelligence, AI) device, wearable device, vehicle-mounted device , smart home equipment and/or smart city equipment, the embodiment of the present application does not specifically limit the specific type of the electronic equipment.
- PDA personal digital assistant
- augmented reality augmented reality, AR
- VR virtual reality
- AI artificial intelligence
- wearable device wearable device
- vehicle-mounted device smart home equipment and/or smart city equipment
- 2A-2B, 3A-3F, 4A-4F, 5A-5F and 6A-6B exemplarily show a group of electronic devices 100 implementing the user interface of the switching method when shooting video.
- a scene of the switching method when the electronic device 100 implements the video shooting provided by the embodiment of the present application is specifically introduced.
- FIG. 2A exemplarily shows a user interface for running a camera application on the electronic device 100 to perform dual-view photography.
- the camera application refers to an application program that invokes the camera of the electronic device 100 to provide a user with a photo or video service.
- Dual-view shooting refers to calling multiple cameras of the electronic device 100 at the same time, and displaying images collected by the multiple cameras in the preview interface, so that the user can shoot videos including multiple views at the same time.
- the user interface may include a preview window 101 and a preview window 102 .
- the preview window 101 and the preview window 102 can be used to display images captured by the front or rear camera of the electronic device 100 .
- the preview window can be used to display images collected by the camera of the electronic device 100 in real time.
- the electronic device 100 can save the image displayed in the preview window as a picture; /or display the video being shot in the preview window 102, and save it as a video after stopping the shooting.
- the preview window 101 and/or preview window 102 (other preview windows are the same) not only display the image captured by the camera during preview, but also display the preview picture (ie, the image captured by the camera) when shooting video.
- the preview window referred to in the application method can refer to the preview window in the preview stage when shooting a video or picture, and can also refer to the preview window during the video shooting process after starting video shooting (it can be understood as, click on FIG. 2A Click the control 115 to start shooting, the preview window 101 and the preview window 102 display the preview picture in the process of video shooting, click the control 115 again to end the shooting).
- the electronic device 100 can execute the "front/back" mode in the dual-view shooting.
- the above-mentioned "front/rear” mode refers to a shooting mode in which a front camera and a rear camera of the electronic device 100 are called at the same time for dual-view shooting, and the images collected by the two cameras are equally displayed.
- preview window 101 can display the image that rear camera gathers, and preview window 102 can show the picture that front camera gathers; Also can, preview window 101 shows the image that front camera gathers, and preview window 102 Display the screen captured by the rear camera.
- the user interface shown in FIG. 2A also includes controls 111 .
- the control 111 can be used to switch the shooting mode of dual-view shooting.
- the above shooting modes also include “back/back”, “picture in picture”, “front/front”, “back”, “front” and other modes.
- the above-mentioned "rear/rear” mode refers to a shooting mode in which two different rear cameras of the electronic device 100 are called at the same time to perform dual-view shooting, and the images captured by the two cameras are equally displayed.
- the above two different rear cameras such as normal rear camera and wide-angle rear camera.
- the above-mentioned "picture-in-picture” mode refers to: calling a front camera and a rear camera of the electronic device 100 at the same time for dual-view shooting, and embedding the image collected by the front camera into the image collected by the rear camera in the form of a window In the shooting mode, for example: "picture in picture” shown in the window 117 in Fig.
- the main display in the screen is the scenery collected by the rear camera; the portrait collected by the front camera is embedded in the form of a small floating window Top left of the image captured by the rear camera.
- the above-mentioned “rear” mode refers to a shooting mode in which a front camera and a rear camera of the electronic device 100 are used to perform dual-view shooting, but only images captured by the rear camera are displayed.
- the above-mentioned “front” mode refers to a shooting mode in which a front camera and a rear camera of the electronic device 100 are used to perform dual-view shooting, but only images captured by the front camera are displayed.
- the user interface may further include a control 112 , a control 113 , a control 114 , a control 115 , and a control 116 .
- the control 112 can be used to control to turn on/off the flash light of the electronic device 100 .
- Control 113 can be used to adjust the focus of the front camera.
- Control 114 can be used to display a photo or video that has been taken.
- the control 115 can be used to control the start/end of dual-view shooting.
- the control 116 can be used to provide the user with more functions for setting shooting parameters, which will not be repeated here.
- the electronic device 100 may detect a user operation acting on the control 111, such as a click operation. In response to the above operations, the electronic device 100 may display the user interface shown in FIG. 2B. A window 117 is displayed in the user interface. In the window 117, shooting modes such as "front/rear” and “rear/rear” are displayed. At this time, the electronic device 100 may detect a user operation acting on any shooting mode, and set the currently used dual-view shooting mode as the above-mentioned shooting mode selected by the user.
- the above process of switching the shooting mode of dual-view shooting requires the user to click on the screen.
- the electronic device 100 may switch between different shooting modes of the dual-view shooting by recognizing the gesture of the user.
- the user may perform a flip gesture to control the electronic device 100 to exchange images displayed in the preview window 101 and the preview 102 .
- the electronic device 100 may capture a sequence of image frames including the above gesture, refer to the preview window 102 in FIG. 3A .
- the electronic device 100 may capture a sequence of image frames including the above gesture, refer to the preview window 102 in FIG. 3A .
- the image captured by the front camera (the image displayed in the original preview window 101 ), that is, the image displayed in the preview window 101 and the preview 102 is exchanged.
- the electronic device 100 can display the image captured by the front camera on the screen.
- the image of the screen is switched to the image captured by the rear camera.
- the electronic device 100 may switch the image currently being displayed on the screen from the rear camera to the front camera.
- the captured image In the scene where the electronic device 100 is displaying the image captured by the rear camera in full screen, that is, when the image containing the portrait captured by the front camera is not displayed, the front camera of the electronic device 100 can capture the image and identify whether the user will perform flipping gesture.
- the electronic device 100 may display the user interface shown in FIG. 3E .
- a control 21 may be included in the user interface.
- Control 21 may identify detection of a user raising a palm.
- Control 21 includes an annular loading ring.
- the loading circle may represent a timer.
- the loading circle may prompt the user to complete the gesture before the loading of the loading circle is completed, that is, before the timing ends.
- the electronic device 100 uses the recognized image frame of the user raising the palm to the image frame collected when the loading circle is loaded as the image frame for the electronic device 100 to recognize the user's gesture.
- the above control 21 may also instruct the user to complete the gesture after the loading circle is loaded.
- the electronic device 100 may acquire video frames within a period of time after the loading of the loading circle is completed as image frames for the electronic device 100 to recognize the user's gesture.
- the aforementioned period of time is preset, and generally may be 3 seconds.
- the electronic device 100 will also display the control 21 after detecting that the user has raised the palm, instruct the user to complete the gesture, and obtain the time when the user completes the gesture.
- the image frame is used to identify gestures completed by the user. Referring to FIG. 3F , details will not be described in subsequent embodiments.
- the electronic device 100 may also recognize a swipe gesture.
- the above sliding gestures include left sliding and right sliding.
- 4A-4F show a user interface for the electronic device 100 to recognize the user's right swipe gesture to control switching between different shooting modes of dual-view shooting.
- the user can stretch out his palm and slide right to control the electronic device 100 to close the preview window 102, so as to switch the "front/back" mode shown in FIG. 2A to "front” or " After” shooting mode.
- the electronic device 100 can capture the sequence of image frames including the above gesture, refer to the preview window 102 in FIG. 4A .
- the electronic device 100 can determine that the user has performed a right swipe gesture.
- the electronic device 100 may close the preview window 102 , refer to FIG. 4B .
- the electronic device 100 can display the image captured by the rear camera in the original preview window 101 in full screen, that is, switch the "front/rear” mode shown in FIG. 2A to the "rear” shooting mode.
- the user can perform a right swipe gesture to control the electronic device 100 to redisplay the two preview windows, thereby switching the "rear” mode shown in Fig. 4B to the "front/rear” shooting mode.
- the front camera of the electronic device 100 can collect the image and identify whether the user will perform a right swipe gesture.
- the electronic device 100 may re-display the preview window 102, that is, return to the dual-view shooting mode of the “front/back” mode, refer to FIG. 4C .
- the preview window 101 can display the image captured by the front camera
- the preview window 102 can display the image captured by the rear camera.
- the electronic device 100 may recognize the user's right swipe gesture again, refer to FIG. 4D .
- the electronic device 100 may close the preview window 102 again, referring to FIG. 4E .
- the electronic device 100 can display the image captured by the front camera in the original preview window 101 in full screen, that is, switch the "front/back" mode shown in FIG. 4D to the "front” mode.
- the electronic device 100 may display the preview window 102 again, as shown in FIG. 4F .
- the preview window 101 can display the image collected by the rear camera
- the preview window 102 can display the image collected by the rear camera.
- FIG. 4F is the same as the shooting state shown in FIG. 4A. That is, in the shooting state shown in FIG. 4E, after detecting the right swipe gesture, the electronic device 100 can return to the "front/back" mode shown in FIG. 4A, and the preview window 101 displays the image captured by the rear camera, The preview window 102 displays images captured by the rear camera.
- the electronic device 100 may repeat the process shown in FIGS. 4A-4E , so that the user can switch the dual-view shooting mode through the right swipe gesture.
- the electronic device 100 will divide a full-screen preview window into two preview windows (preview window 101 and preview window 102), and The image currently displayed in full screen is displayed in the preview window 102 , and the image captured by the camera corresponding to the preview window 102 that was closed in the previous process is displayed in the preview window 101 .
- the electronic device 100 will also display the control 21 in FIG. The image frame when the gesture is completed, identifying the gesture completed by the user.
- FIG. 3E For the above process, reference may be made to the introduction of FIG. 3E , which will not be repeated here.
- 5A-5F show a user interface for the electronic device 100 to recognize the user's left swipe gesture to control switching between different shooting modes of dual-view shooting.
- the user can stretch out his palm and slide left to control the electronic device 100 to close the preview window 101, so as to switch the “front/back” mode shown in FIG. 2A to “front” or “ After” shooting mode.
- the electronic device 100 may capture a sequence of image frames including the above gesture, refer to the preview window 102 in FIG. 5A .
- the electronic device 100 can determine that the user has performed a left swipe gesture.
- the electronic device 100 may close the preview window 101 , refer to FIG. 5B .
- the electronic device 100 can display the image captured by the front camera in the original preview window 102 in full screen, that is, switch the "front/back" mode shown in FIG. 2A to the "front” mode.
- the user can perform a left swipe gesture to control the electronic device 100 to redisplay the two preview windows, thereby switching the “front” mode shown in FIG. 5B to the “front/back” shooting mode.
- the electronic device 100 may capture a sequence of image frames including the above gesture, refer to the preview window 102 in FIG. 5C .
- the electronic device 100 may re-display the preview window 101 , refer to FIG. 5D .
- the preview window 101 can display the image captured by the front camera
- the preview window 102 can display the image captured by the rear camera.
- the electronic device 100 may recognize that the user performs a left swipe gesture again, and in response to recognizing the left swipe gesture, the electronic device 100 may close the preview window 101 again, as shown in FIG. 5E .
- the electronic device 100 can display the image captured by the rear camera in the original preview window 102 in full screen, that is, switch the "front/rear" mode shown in FIG. 5D to the "rear” shooting mode.
- the electronic device 100 may re-display the preview window 101, that is, return to the "front/rear" dual-view shooting mode, as shown in FIG. 5A .
- the preview window 101 can display the image collected by the rear camera
- the preview window 102 can display the image collected by the rear camera.
- FIG. 5F is the same as the shooting state shown in FIG. 5A. That is, in the shooting state shown in FIG. 5E, after detecting the left swipe gesture, the electronic device 100 can return to the "front/back" mode shown in FIG. 5A, and the preview window 101 displays the image captured by the rear camera, The preview window 102 displays images captured by the rear camera.
- the electronic device 100 may perform the switching from FIG. 5E to FIG. 5F .
- the electronic device 100 can also recognize images captured by the rear camera.
- the electronic device 100 may also perform the switching of FIG. 5E-FIG. 5F .
- the front camera and the rear camera of the electronic device 100 can also simultaneously collect and recognize images of multiple users making specific gestures at the same time, and at this time, the electronic device 100 can The gesture control completed earlier in the camera switches the shooting mode.
- the electronic device 100 may determine which camera to recognize the gesture in the image acquired according to the depth of field of the gesture in the image acquired by multiple cameras. For example, generally, in the image captured by the front-facing camera, the depth of field of the user performing the hand-turning gesture is small, that is, the gesture occupies a large area of the entire image in the image frame. At this time, the electronic device 100 can recognize the gesture in the image frame captured by the front camera, and control switching of the shooting mode according to the recognized gesture.
- the electronic device 100 may repeat the process shown in FIGS. 5A-5E , so that the user can switch the dual-view shooting mode through the left swipe gesture control.
- the above repeated control method shown in FIG. 5A-FIG. 5E can be summarized as follows: in the “front/back” mode of the upper and lower split screen display, each time the user’s left-swipe gesture is recognized, the electronic device 100 can close the upper preview window ( preview window 101), so that the image captured by the camera corresponding to the lower preview window (preview window 102) is displayed in full screen. In the "front” or “back” shooting mode, every time the user's left-swipe gesture is recognized, the electronic device 100 will divide a full-screen preview window into two preview windows (preview window 101 and preview window 102). The image currently displayed in full screen is displayed in the preview window 101 , and the image captured by the camera corresponding to the preview window 101 that was closed in the previous process is displayed in the preview window 102 .
- the electronic device 100 will also display the control 21 in FIG. The image frame when the gesture is completed, identifying the gesture completed by the user.
- FIG. 3E For the above process, reference may be made to the introduction of FIG. 3E , which will not be repeated here.
- the electronic device 100 may also recognize a fist gesture.
- the above-mentioned fist gesture refers to a gesture in which the fingers are bent toward the palm so that the palm with five fingers spread out becomes a fist.
- the gesture of making a fist can be used to control the electronic device 100 to switch between dual-view photography in the "picture-in-picture” mode.
- 6A-6B show a user interface where the electronic device 100 recognizes that the user performs a fist gesture and switches the dual-view shooting mode to the "picture-in-picture" mode.
- the user may perform a fist gesture.
- the electronic device 100 may capture an image frame including the above gesture, refer to the preview window 102 in FIG. 6A .
- the electronic device 100 may embed the image captured by the front camera into the image captured by the rear camera displayed in full screen in the form of a small window, that is, switch the dual-view shooting mode to "picture "Picture” mode for users to browse.
- the electronic device 100 may also support other types of dual-view shooting or multi-view shooting, not limited to the dual-view shooting modes such as “front/back”, “back/back” and “picture-in-picture” introduced in the foregoing embodiments.
- the electronic device 100 may also recognize other types of gestures, which are not limited to the gestures described in the foregoing embodiments, such as turning over, sliding right, sliding left, and making a fist, which are not limited in this embodiment of the present application.
- the electronic device 100 recognizes that the process of the user making a flip gesture may include two parts:
- S101 Acquire an image frame stream, and determine an initial image frame.
- the electronic device 100 may obtain a series of image frames collected by the camera, that is, an image frame stream.
- the image frame stream may include consecutive multiple frames of images in which the user completes the hand-turning gesture.
- the electronic device 100 may identify the above continuous multiple frames of images in which the user completes the hand-turning gesture and determine that the user makes the hand-turning gesture.
- the electronic device 100 needs to determine an initial image frame from the image frame stream returned by the camera.
- the above-mentioned initial image frame is the first image frame in the image frame stream that marks the user making a hand-turning gesture.
- Fig. 8A exemplarily shows a schematic diagram of an initial image frame.
- the user when completing the hand-turning gesture, the user first raises the palm and faces the camera of the electronic device 100 , and then rotates the palm clockwise or counterclockwise to complete the hand-turning gesture. Therefore, after detecting the image frame S0 of the palm facing the camera of the electronic device 100 shown in FIG. 8A , the electronic device 100 can confirm that the image frame S0 shown in FIG. Therefore, the electronic device 100 may determine that S0 is the initial image frame.
- the electronic device 100 confirms that the image frame shown in FIG. 8B is the initial image frame.
- the electronic device 100 needs to recognize gestures in the image frame.
- the electronic device 100 may determine that the above image frame is the initial image frame.
- the electronic device 100 can use an existing gesture recognition model to determine whether the image frame contains a gesture.
- the above-mentioned gesture recognition model may be a model with gesture features recorded and established by using an artificial neural network algorithm to learn a large number of image frames containing gestures.
- the algorithm for constructing the gesture recognition model may also be other deep learning algorithms or machine learning algorithms, which are not limited in this embodiment of the present application. Based on the above gesture recognition model, the electronic device 100 can determine whether any frame of image contains a gesture.
- the electronic device 100 can input a frame of image S0 in the image frame stream into the above-mentioned gesture recognition model, and then the electronic device 100 can recognize the hand image 83 in S0.
- the above-mentioned hand image 83 conforms to the gesture characteristics of the start of the hand-turning gesture, so the electronic device 100 can determine the above-mentioned S0 as the initial image frame.
- the size of the image area of the hand image 83 is determined according to the gesture recognition model.
- the size of the hand image in the image output after the gesture recognition model recognizes any image is the same (for example, the palm frame area of the hand image 83 in FIG. 13 is the same as the palm frame area of the hand image 84, wherein the palm The frame is similar to the face frame, which belongs to the palm frame correspondingly displayed after the hand is recognized, and the hand image is inside the palm frame).
- the size of the hand image in the image output after the gesture recognition model recognizes any image is different (for example, because S0 is the front of the palm in Figure 13, and S1 is the side of the hand, so the palm of the hand image 83 in Figure 13
- the area of the frame is larger than the palm frame area of the hand image 84).
- the size of the hand image is determined according to the feature of the recognition pixel of the gesture recognition model.
- it can be a rectangular frame formed by the leftmost point, rightmost point, uppermost point and lowermost point of the recognized hand image (it can also be formed by extending W columns or W rows of pixels outward respectively) Rectangular frame, such as W is 5 or 10, etc.), can also be used according to the area of the palm frame of the hand image determined at the moment S0 in Figure 13. It can also be displayed correspondingly according to specific needs, such as the front of the palm The palm frame area of the palm is larger than the palm frame area of the palm side. This application does not limit this.
- the area occupied by the portrait in the entire image frame is relatively small, and further, the gestures in the portrait above account for a smaller proportion in the entire image frame. Therefore, simply using the above-mentioned gesture recognition model to determine whether the image frame contains gestures has a poor recognition effect, and further, it is not conducive to the subsequent use of the skeleton point recognition algorithm to recognize the skeleton points of the hand in the image.
- the embodiment of the present application provides another method for recognizing and locating gestures in an image.
- the electronic device 100 may first use a face detection algorithm to identify the face image in the image frame, and then, the electronic device 100 may determine the human body image in the image based on the area where the face image in the image frame is located. Then, the electronic device 100 can recognize the above-mentioned human body image to determine gestures in the human body image.
- the electronic device 100 may first recognize the face image 81 of the image frame S0 using a face detection algorithm. Then, the electronic device 100 may extend outward based on the face image 81 to obtain a human body image 82 .
- the electronic device 100 may extend D1 pixels upwards, D2 pixels downwards, D3 pixels leftwards, and D4 pixels rightwards on the basis of the face image 81, so as to determine the human body Image 82.
- the aforementioned D1, D2, D3, and D4 may be preset according to empirical values. The embodiment of the present application does not limit specific values of D1, D2, D3, and D4.
- the electronic device 100 can use a gesture recognition algorithm to recognize the gestures in the human body image 82 , so the electronic device 100 can recognize the hand image 83 from the human body image 82 .
- the above-mentioned hand image 83 conforms to the gesture characteristics of the start of the hand-turning gesture, so the electronic device 100 can determine the above-mentioned S0 as the initial image frame.
- the gesture recognition method shown in FIG. 9B is beneficial for the electronic device 100 to more accurately recognize and locate the gesture in the image frame. Further, when using the skeleton point recognition algorithm to recognize the skeleton point of the gesture in the image, the electronic device 100 can more accurately Identify the skeletal points of the gesture in the image frame.
- the electronic device 100 may determine the above image frame as the initial image frame. Combined with the user interface, in the scenario shown in FIG. 3A , after identifying an image frame in the image frame stream collected by the camera conforming to the characteristics shown in FIG. 8A or FIG. 8B , the electronic device 100 can determine the image frame as the initial image frame . Subsequently, the electronic device 100 may display the user interface shown in FIG. 3E. The electronic device 100 may use the control 21 in FIG. 3E to prompt the user to complete the gesture before the timing of the control 21 ends (that is, the loading of the loading circle is completed).
- the electronic device 100 may determine to use the image frame that recognizes the user's raised palm (the image frame shown in FIG. 8A or 8B ) to the image frame collected when the loading of the loading circle is completed, as the image frame for the electronic device 100 to recognize the user's gesture. .
- the electronic device 100 may also use the first frame of image collected after the display control 21 is displayed, or the first frame of image collected after the display control 21 starts timing as a new initial image frame. Subsequent gesture recognition calculations are performed using the above-mentioned new initial image frame.
- the above control 21 may also instruct the user to complete the gesture after the loading circle is loaded.
- the electronic device 100 may acquire video frames within a period of time after the loading of the loading circle is completed as image frames for the electronic device 100 to recognize the user's gesture.
- the electronic device 100 After using the method shown in FIG. 9A or FIG. 9B to locate the gesture in the image frame, that is, after determining the initial image frame, the electronic device 100 also needs to determine the gesture vector offset[ 0].
- the above offset[0] can be used by the electronic device 100 to subsequently determine whether the user makes a flip gesture.
- the electronic device 100 may use a skeleton point detection algorithm to identify the skeleton points of the user's hand in the initial image frame.
- the aforementioned bone point detection algorithm is existing, such as the Kinect-based bone point detection, etc., which will not be repeated here.
- FIG. 10 exemplarily shows a schematic diagram of the electronic device 100 using a skeleton point detection algorithm to identify the skeleton points of the gesture in S0.
- the electronic device 100 inputting S0 into the skeleton point detection model, the electronic device 100 can determine 21 skeleton points in S0 describing the hand, which are n1-n21 respectively.
- the aforementioned skeleton point detection model is a model established based on a skeleton point detection algorithm for identifying the skeleton points of the hand in the image.
- the number of bone points of the hand in the image frame obtained by using the bone point detection model to identify the image frame is preset.
- the number of skeletal points of hands in S0 obtained by using the above-mentioned skeletal point detection model to identify S0 is 21. It can be understood that the number of bone points in the hand image in S0 recognized by the electronic device 100 is also different if the bone point detection algorithm used is different, or the parameter settings in the bone point detection algorithm are different. Further, the recognized bone point The location is also different.
- the electronic device 100 may determine two gesture feature points from the skeletal points. These two gesture feature points can be used to construct a gesture vector offset representing the state of the hand in the image frame.
- the electronic device 100 may determine the bone point (n1) at the top of the thumb and the bone point (n18) at the top of the little finger as gesture feature points.
- the above-mentioned gesture feature points may also be a gesture feature point combination composed of any one of n1-n4, n6-n9 and any one of n14-n21, such as n6 and n14, n2 and n20 and so on.
- the electronic device 100 can also use one or more skeleton points in n1 ⁇ n4, n6 ⁇ n9 to determine a center point C1, and use one or more skeleton points in n14 ⁇ n21 to determine another center point C2, and then use the above C1 and C2 to construct a gesture vector representing the state of the palm.
- the embodiment of the present application does not limit this.
- the electronic device 100 may establish an X coordinate axis (X axis) with the starting point of the pixel at the left end in the image frame as the origin, and the horizontal direction to the right as the positive direction. After determining the two gesture feature points, the electronic device 100 can determine the positions of the above two gesture feature points on the X axis, that is, the coordinates on the X axis, and then, the electronic device 100 can use the position of the above two gesture feature points to The coordinates on the X axis determine the vector representing the state of the hand in the image frame, which is recorded as a gesture vector.
- X axis X coordinate axis
- the direction of the gesture vector can represent the position of the gesture feature point in the image frame, and can be used to characterize the state of the hand (such as the palm facing the display, the back of the hand facing the display, or the side of the hand facing the display, etc.), further, it can represent the palm or
- the positional relationship between the back of the hand and the camera of the electronic device 100 that is, the state of the hand, includes the palm facing the camera of the electronic device 100 or the back of the hand facing the camera of the electronic device 100 .
- the modulus of the gesture vector may reflect the angle between the palm or the back of the hand and the camera of the electronic device 100 .
- the above-mentioned X-axis may also be a coordinate axis established with the starting point of the pixel point at the right end as the origin and the horizontal left direction as the positive direction.
- the embodiment of the present application does not limit this.
- FIG. 11 exemplarily shows a schematic diagram of a gesture vector representing a state of a hand in determining S0 by the electronic device 100 .
- the electronic device 100 may take the starting point of the left end pixel in S0 as the origin, and the horizontal direction to the right as the positive direction to establish the X coordinate axis.
- the electronic device 100 can obtain each skeleton point (n1-n21) of the gesture in S0.
- the electronic device 100 may determine the coordinates of the above-mentioned skeletal points on the X-axis.
- FIG. 11 only shows two gesture feature points (n1 and n18) among the above-mentioned skeleton points. While recognizing n1 and n18, the electronic device 100 may determine the coordinates of n1 and n18 on the X axis, which are denoted as X0[1] and X0[18], respectively. Further, the electronic device 100 may use the above positions X0[1] and X0[18] of n1 and n18 to determine the gesture vector Offset[0] representing the state of the hand in S0. in:
- gesture vector Offset[0] can also be expressed as:
- the electronic device 100 includes two or more cameras for capturing images, and at this time, the electronic device 100 can obtain two or more image frame streams.
- the electronic device 100 may refer to the aforementioned method to respectively identify the initial image frames in the above two or more image frame streams, and detect the hand turning gesture in each image frame stream, which will not be repeated here.
- S102 Acquire Q frames of image frames after the initial image frame, identify the above Q frames of image frames and the initial image frame, and determine whether the user makes a hand-turning gesture.
- the initial image frame can be used to represent the beginning of a gesture. Due to the continuity of the action, multiple frames of images after the initial image frame also contain gestures, and constitute a gesture action with the initial image frame. Therefore, after the initial image frame is recognized, the electronic device 100 may use the above initial image frame and subsequent multiple image frames to recognize the gesture made by the user.
- the electronic device 100 may acquire image frames subsequent to the initial image frame, which are denoted as subsequent image frames. Then, the electronic device 100 may determine whether the hand in the subsequent image frame is flipped compared to the hand in the original image frame according to the direction of the gesture vector representing the state of the hand in the subsequent image frame and the initial image frame. When it is recognized that the directions of the gesture vectors representing the states of the hands in the above two image frames are opposite, the electronic device 100 may determine that the user has made a hand-turning gesture.
- the electronic device 100 can collect 30 frames of images within 1 second, and the user can complete a gesture within 1 second. It takes no more than 3 minutes for the user to complete a gesture. Therefore, the electronic device 100 can confirm that the sequence of image frames for recognizing gestures is the 90 frame images following the initial image frame.
- the electronic device 100 can use the above 90 frames of images and the initial image frame to recognize the gesture of the user.
- the above 90 may be referred to as the frame number Q of the image frames used to recognize the flip gesture after the initial image frame.
- FIG. 12 exemplarily shows a flowchart for the electronic device 100 to identify an initial image frame and Q frames of image frames after the initial image to determine that the user makes a hand-turning gesture.
- the following describes in detail the process of the electronic device 100 determining that the user makes the hand-turning gesture with reference to the flow chart shown in FIG. 12 .
- the electronic device 100 displays the user interface including the control 21 shown in FIG. 3E .
- Control 21 may instruct the user to complete a particular gesture.
- the electronic device 100 may acquire the image frame stream collected when the control 21 is displayed to recognize the gesture made by the user.
- the electronic device 100 may acquire any frame from the image frame stream collected when the control 21 is displayed, and determine whether the user makes a hand-turning gesture together with the aforementioned initial image frame.
- the number of image frames included in the image frame stream collected when the control 21 is displayed is Q.
- S201 Acquire the Mth frame of image after the initial image frame, and locate the hand image in the Mth frame of image, 1 ⁇ M ⁇ Q.
- any frame is acquired from the image frame stream collected when the Mth frame of image is the display control 21 .
- FIG. 13 exemplarily shows an initial image frame S0 acquired by the electronic device 100 and subsequent multiple frames of images.
- S0 is the initial image frame
- S1, S2, and S3 are the three frames of images after S0 acquired by the electronic device 100, that is, any of the image frame streams collected when the above-mentioned S1, S2, and S3 are the above-mentioned display control 21.
- 3 frame images Any of the above three frames of images may be adjacent.
- the above-mentioned S1, S2, and S3 may respectively be the first frame image, the second frame image, and the third frame image in the image frame stream collected when the above-mentioned control 21 is displayed after the initial image frame S0.
- the electronic device 100 may acquire the first image frame after the initial image frame S0, that is, S1. After acquiring S1, the electronic device 100 can locate the hand image in S1. As shown in FIG. 13 , the electronic device 100 can locate the hand image 84 in S1.
- the method for the electronic device 100 to locate the hand image in S1 may refer to the method shown in FIG. 9A or FIG. 9B in S101, which will not be repeated here.
- the above S1, S2, and S3 may also be spaced apart.
- the aforementioned S1, S2, and S3 may also be the R1th frame image, the R2th frame image, and the R3th frame image in the image frame stream collected when the control unit 21 is displayed, wherein R1 ⁇ R2 ⁇ R3.
- the number of image frames spaced between R1, R2 and R3 may be equal or different. That is, the electronic device 100 may extract S frames of images from Q frames of images following the initial image frame at fixed intervals or at non-fixed intervals. Then, the electronic device 100 may determine whether the user makes a flip gesture by using the S frame image and the initial image frame. For example, the electronic device 100 may acquire an image every 4 frames after the initial image frame S0 is recognized. At this time, the aforementioned S1, S2, and S3 may be the fifth frame, the tenth frame, and the fifteenth frame after S0.
- the electronic device 100 may use the first frame of image collected after the display control 21, or the first frame of image collected after the display control 21 starts timing, as a new initial image frame .
- the M-th frame of image in S201 is the Q-frame image collected after the display control 21, or the second to Q-th frame of the Q-frame image collected after the display control 21 starts timing.
- the electronic device 100 may use the image frame stream within a period of time after the control 21 is displayed as the image frame for recognizing the user gesture.
- the Mth frame of image is any frame in the image frame stream within a period of time after the control 21 finishes displaying.
- the position change of the user's hand is relatively small.
- the position of the hand is: level with the head and 15cm away from the head. 15cm position, that is, there will not be a large change in position.
- the above positions are the relative positions of the gesture image and the face image.
- the electronic device 100 can confirm that the image content contained in the Mth image frame and the initial image frame is not a flipping gesture.
- the electronic device 100 can judge the two frames by using the IoU of the position of the gesture image in the image frame in the two frames of images. Whether the position of the gesture in the image conforms to the characteristics of small position changes of the flip hand gesture.
- the intersection-over-union ratio (IoU) can be used to represent the ratio of overlapping regions between two image regions. The larger the IoU, the larger the area of the overlapping area between the two image areas. Conversely, the smaller the IoU, the smaller the area of the overlapping area between the two image areas.
- IoU intersection of gestures/union of gestures
- the gesture intersection above refers to: the intersection of the areas where the hands in the two image frames are located in each image frame.
- the above gesture union refers to the union of the areas where the hands in the two image frames are located in each image frame.
- the electronic device 100 can determine that the size and position of the area occupied by the hand image 84 in S1 is the same as the area occupied by the hand image 83 in S0.
- the IoU of the size and position of the area can be determined.
- FIG. 14 exemplarily shows a schematic diagram of determining the IoU of gestures in S1 and S0 by the electronic device 100 .
- the image area covered by the dotted line frame corresponding to the hand image 83 can be called the area where the hand image 83 is located in S0; the image area covered by the dotted line frame corresponding to the hand image 84 can be called is the area where the hand image 84 is located in S1.
- the gesture intersection of S1 and S0 is the intersection of area 83 and area 84 in the image frame SX, that is, the area represented by the dark gray rectangle, denoted as A1;
- the gesture union of S1 and S0 is the intersection of area 83 and area 84 in the image frame SX
- the union of 84 that is, the sum of the light gray area and the dark gray rectangle, is recorded as A2.
- the image frame SX mentioned above is virtual.
- IoU[S1&S0] of the position of the gesture image in the image frame in S1 and S0 is:
- the closer the IoU of the two image frames is to 1, the closer the positions of the gesture images in the two image frames are to each other. In particular, when IoU 1, the positions of the gesture images in the two image frames are the same in the above two image frames. Conversely, the closer the IoU of the two image frames is to 0, the less the overlapping range of the position of the gesture image in the two image frames in the two image frames is, that is, the greater the range of hand position changes in the two image frames.
- the electronic device 100 may determine whether the above IoU satisfies a preset IoU threshold.
- the IoU threshold is 0.6. In other embodiments, the IoU threshold may also be 0.7, 0.8, etc., which is not limited in this embodiment of the present application.
- the electronic device 100 can confirm that the positions of the S1 and S0 gestures vary greatly, which does not conform to the characteristics of the hand-turning gesture. Then, S203: the electronic device 100 determines that the user makes other gestures.
- the above other gestures include gestures such as sliding and waving.
- the electronic device 100 will also perform matching calculations for other gestures mentioned above.
- the embodiment of the present application does not repeat the process of recognizing other gestures.
- the electronic device 100 may not be able to match any other gestures.
- the electronic device 100 may continue to acquire image frames after S1, such as S2, S3, etc., and then the electronic device 100 may Relocate the gesture in the new image frame, and calculate the IoU between the gesture in the new image frame and the gesture in the initial image frame.
- the electronic device 100 can confirm that the position of the gesture in the Mth image frame is close to that of the gesture in the initial image frame. At this time, the electronic device 100 can confirm whether the positions of the S1 and S0 gestures conform to the characteristic of the small position change of the flipping gesture. Further, the electronic device 100 can identify the skeleton points of the gesture in S1, and determine the gesture vector in S1 representing the state of the hand.
- calculating the intersection ratio between the M-th frame image and the gesture in the initial image frame can quickly filter out the image frames that obviously do not meet the characteristics of the hand-turning gesture, avoiding redundancy Calculation, improve computing efficiency.
- the electronic device 100 may use a skeleton point detection algorithm to identify the skeleton point of the gesture in the Mth frame image.
- a skeleton point detection algorithm to identify the skeleton point of the gesture in the Mth frame image.
- the electronic device 100 may determine two gesture feature points from the recognized gesture skeleton points in the Mth frame of image.
- the two gesture feature points determined by the electronic device 100 from the skeleton points in the Mth frame of image should correspond to the two gesture feature points in the original image frame.
- the electronic device 100 should also determine the bone point at the top of the thumb in the Mth frame image ( n1) and the bone point at the top of the little finger (n18) are gesture feature points, and then use the above n1 and n18 to construct the gesture vector offset[M] representing the state of the hand in the Mth frame image.
- S205 Determine the gesture vector offset[M] representing the state of the hand in the Mth frame image.
- the electronic device 100 may determine the position of the gesture feature point on the X axis. Referring to the method of determining the gesture vector offset[0] representing the state of the hand in the initial image frame in FIG. 11, the electronic device 100 can determine the gesture vector of the gesture in the Mth frame image by using the positions of the gesture feature points in the Mth frame image above. offset[M].
- FIG. 15 Taking the first frame of image S1 after the initial image frame S0 as an example, as shown in FIG. 15 , the skeletal point detection is performed on S1, and the electronic device can recognize the skeletal points n1-n21 of the gesture in S1. At the same time, the electronic device 100 can determine The positions of the above-mentioned bone points on the X-axis.
- FIG. 15 only shows the gesture feature points n1 and n18 determined based on the gesture skeleton points, and the positions X1[1] and X1[18] of the gesture feature points n1 and n18 on the X axis.
- the electronic device 100 can determine the gesture vector Offset[1] of the gesture in S1 according to the above X1[1] and X1[18]:
- the electronic device 100 can use the above offset[M] and the gesture vector offset[0] of the initial image frame to determine whether the user has made a flip gesture .
- the electronic device 100 may calculate the product of the gesture vector offset[M] of the Mth image frame and the gesture vector offset[0] of the initial image frame: offset[M]*offset[0].
- offset[M]*offset[0] ⁇ 0 may represent offset[M] ⁇ 0, offset[0] ⁇ 0, or offset[M] ⁇ 0, offset[0] ⁇ 0.
- offset[M] ⁇ 0 and offset[0] ⁇ 0 the direction indicated by the gesture vector of the Mth frame image is the positive direction of the X-axis, and the direction indicated by the gesture vector of the initial image frame is also the positive direction of the X-axis.
- offset[M] ⁇ 0, offset[0] ⁇ 0 the direction indicated by the gesture vector of the Mth frame image is the negative direction of the X axis, and the direction indicated by the gesture vector of the initial image frame is also the negative direction of the X axis.
- the state of the hand in the Mth frame image is the same as that of the initial image frame, and the same is palm facing The state of the camera, or the same as the state of the back of the hand facing the camera. This does not conform to the hand flip gesture feature (the state of the hand changes). At this time, the gesture formed by the initial image frame and the Mth frame image recognized by the electronic device 100 is not a flipping gesture.
- offset[M]*offset[0] ⁇ 0 may represent offset[M] ⁇ 0, offset[0]>0, or offset[M]>0, offset[0] ⁇ 0.
- offset[M] ⁇ 0, offset[0]>0 the direction indicated by the gesture vector of the Mth frame image is the negative direction of the X-axis
- the direction indicated by the gesture vector of the initial image frame is the positive direction of the X-axis.
- offset[M]>0, offset[0] ⁇ 0 the direction indicated by the gesture vector of the Mth frame image is the positive direction of the X-axis
- the direction indicated by the gesture vector of the initial image frame is the negative direction of the X-axis.
- the state of the hand in the Mth frame image is different from the initial image frame. Specifically, the state of the hand in the Mth frame image is opposite to that in the initial image frame, which conforms to the feature of hand flip gesture. At this time, the electronic device 100 may confirm that the hand turning gesture is recognized.
- the electronic device 100 can confirm that the flip gesture cannot be recognized. On the contrary, if offset[M]*offset[0] ⁇ 0 does not hold, the electronic device 100 can confirm the recognition of the flip gesture.
- the electronic device 100 can calculate the product of Offset[1] and the gesture vector offset[0] of the initial image frame S0: offset[1 ]*offset[0]. At this time, offset[0]>0, offset[1]>0, therefore, offset[1]*offset[0] ⁇ 0 is established. Therefore, the electronic device 100 can confirm that the flip gesture cannot be recognized.
- the electronic device 100 can continue to acquire the image frames after the Mth frame image, such as the M+1th frame image, the M+th frame image, and the M+th frame image. 2 frames of images, etc., determine whether the product of the gesture vector (offset[M+1], offset[M+2], etc.) of the image frame after the Mth image frame and the gesture vector offset[0] of the initial image frame is greater than or equal to 0.
- the electronic device 100 can acquire image frames after S1, such as S2 and S3. Then, the electronic device 100 may repeat the above-mentioned processing method of S201-S206, determine gesture vectors (offset[2], offset[3]) of image frames such as S2 and S3, and continue to identify whether the user makes a hand-turning gesture.
- the electronic device 100 needs to determine the current Mth frame before acquiring the image frame after the Mth image frame. Whether the frame image is the last frame image in the image frame that can be used to recognize the flip gesture, that is, M ⁇ Q.
- the electronic device 100 will not continue to acquire the image frames after the Mth frame of image, that is, confirm that the recognition timeout , stop recognition. If M ⁇ Q, that is, the Mth frame of image is not the last frame of image, and the electronic device 100 has not yet recognized the hand gesture, at this time, the electronic device 100 can also obtain the image frame after the Mth frame of image, continue whether the user Whether to make a flip gesture.
- the electronic device 100 needs to confirm whether M is less than 90. If M ⁇ 90, that is, M ⁇ 90 is not established, the electronic device 100 fails to recognize the hand-turning gesture in the 90 frames of images within the preset time range. At this time, the confirmation of the electronic device 100 times out, and the identification will not be continued. Conversely, if M ⁇ 90 holds true, the electronic device 100 cannot recognize the flip gesture at present, but the electronic device 100 can also acquire image frames after the Mth frame, and continue to identify whether the user makes the flip gesture.
- the electronic device 100 can acquire the second frame of image after S0 , that is, S2 .
- S2 2 ⁇ 90, that is, S2 is not the last frame of image. Therefore, the electronic device 100 may determine the gesture vector Offset[2] of S2 according to the processing methods shown in S201-S205. As shown in FIG. 15 , at this time, Offset[2] ⁇ 0. Therefore, offset[2]*offset[0] ⁇ 0 does not hold. At this time, the electronic device 100 may confirm that the flipping gesture is recognized.
- the electronic device 100 can confirm the timeout.
- the electronic device 100 may stop identifying.
- the electronic device 100 may acquire a new series of image frames after the above image frame, and identify whether there is an initial image frame in the above new series of image frames that conforms to the characteristics of the flipping hand gesture.
- the electronic device 100 may re-determine the sequence of image frames used to identify the hand-turning gesture, and then re-identify whether the user makes the hand-turning gesture.
- the electronic device 100 may also set the minimum threshold L of the gesture vector Offset of the Mth frame image. After confirming that the direction indicated by the gesture vector changes, that is, offset[M]*offset[0] ⁇ 0 does not hold, the electronic device 100 may further detect whether offset[M] satisfies the above minimum threshold. When the offset[M] meets the requirement of the minimum threshold at the same time, the electronic device 100 confirms that the flipping gesture is recognized.
- the electronic device 100 can determine offset[2] based on the above Offset[2] ⁇ 0 ]*offset[0] ⁇ 0 is not true, that is, the state of the hand in the Mth frame image and the initial image frame has changed. At this time, the electronic device 100 will further determine whether offset[2] ⁇ L holds true. If offset[2] ⁇ L holds true, the electronic device 100 confirms that the hand-turning gesture is recognized, otherwise, the electronic device 100 confirms that the hand-turning gesture is not recognized.
- Offset[2] 18 ⁇ L, that is, offset[2] ⁇ L is true or not.
- the electronic device 100 can confirm that the flip gesture is not recognized.
- the electronic device 100 can limit the angle of the palm turning in the hand-turning gesture, so as to avoid recognizing the hand shaking action unintentionally made by the user as the hand-turning gesture, thereby improving the accuracy of gesture recognition.
- the electronic device 100 may also limit the length of offset[0], so as to avoid determining any image frame with hands as the initial image frame and increase the calculation cost of the electronic device 100 .
- the interface shown in FIG. 3C can be called the first interface; the preview window in FIG. 3C can be called the first preview window; the flip gesture shown in FIG. 1 can be called the first gesture; FIG. 3D
- the shown interface may be referred to as a second interface; the preview window in FIG. 3D is the second preview window.
- the interface shown in FIG. 3A can be called the first interface; the preview window 101 in FIG. 3A can be called the first preview window, and the preview window 102 can be called the third preview window; the interface shown in FIG. 3B can be called the first preview window.
- the hand image 83 in S0 in Fig. 13 can be called the first hand image; the hand image 84 in S1 can be called the second hand image; with reference to Fig. 15, offset[0] in S0 can be called the first Gesture vector; offset[1] in S1 may be called the second gesture vector; offset[2] in S2 may be called the second gesture vector; offset[3] in S3 may be called the second gesture vector.
- the direction of offset[0] in S0 can be called the first direction information; the direction of offset[1] in S1 can be called the second direction information; the direction of offset[2] in S2 can be called the second direction information;
- the direction of offset[3] may be referred to as second direction information.
- the X axis may be referred to as a first coordinate axis.
- X0[1] can be called the first coordinate; X0[18] can be called the second coordinate; X1[1] can be called the third coordinate; X1[18] can be called the fourth coordinate; X2[1] can be called is the third coordinate; X2[18] can be called the fourth coordinate; X3[1] can be called the third coordinate; X3[18] can be called the fourth coordinate.
- hand image 84 can be referred to as the region where the second hand image is; among Fig. 14, hand image 83 can be referred to as the region where the first hand image is; among Fig. 9B, the region where face image 81 is located can be called the first The area where the human face is located in the second image; the area where the human body image 82 is located in FIG. 9B may be referred to as the first area.
- the IoU threshold of 0.6 in FIG. 12 may be called the first threshold; the minimum threshold of the gesture vector offset in S207 may be called the second threshold.
- Control 115 in FIG. 2A may be referred to as a first control.
- the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
- the software structure of the electronic device 100 is exemplarily described by taking an Android system with a layered architecture as an example.
- FIG. 16 exemplarily shows a software architecture diagram of the electronic device 100 .
- the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
- the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
- the application layer can consist of a series of application packages. As shown in FIG. 11 , the application package may include application programs such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
- application programs such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
- the method for recognizing a user's waving or sliding gesture by using a motion trajectory provided in the embodiment of the present application can be implemented in a camera application.
- the user interfaces shown in FIGS. 2A-2B , 3A-3F , 4A-4F , 5A-5F , and 6A-6B may be application interfaces provided by the camera application.
- the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
- the application framework layer includes some predefined functions. As shown in Figure 11, the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager and so on.
- a window manager is used to manage window programs.
- the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
- the electronic device 100 displays the user interface shown in Fig. 2A-Fig. 2B, Fig. 3A-Fig. 3F, Fig. 4A-Fig. 4F, Fig. 5A-Fig. 5F and Fig. 6A-Fig. .
- Content providers are used to store and retrieve data and make it accessible to applications.
- the video data, audio data and other data generated after the camera capture can be cached in the content provider.
- the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
- the view system can be used to build applications.
- a display interface can consist of one or more views.
- the view system may include various controls in the user interface shown in Figures 2A-2B, 3A-3F, 4A-4F, 5A-5F and 6A-6B,
- the view system also records the layout of interface elements including the above controls and graphics. Utilizing the above-mentioned controls, graphics resources and layout resources of controls and graphics, the electronic device 100 can display user interface.
- the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
- the resource manager can provide the camera application with video, audio, layout files of the camera application, and so on.
- the Android Runtime includes core library and virtual machine.
- the Android runtime is responsible for the scheduling and management of the Android system.
- the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
- the application layer and the application framework layer run in virtual machines.
- a system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
- the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
- the electronic device 100 displays the user interfaces shown in FIGS. 2A-2B, 3A-3F, 4A-4F, 5A-5F, and 6A-6B relying on the surface manager to provide 2D and 3D layers fusion ability.
- the media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
- the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
- the electronic device 100 when using the dual-view mode to shoot a video, can use the audio and video encoding capability provided by the media library to encode and save the video.
- the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
- 2D graphics engine is a drawing engine for 2D drawing.
- the electronic device 100 calls the window manager, the view system and other framework layer interfaces to realize the functions of displaying user interfaces such as Figures 2A-2B, 3A-3F, 4A-4F, 5A-5F, and 6A-6B. , depends on the 3D graphics processing library, and the 2D graphics engine provides graph drawing and rendering services.
- the kernel layer is the layer between hardware and software.
- the kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
- the display driver can be used to drive the display screen to display the layout files, videos, controls, etc. of the camera application provided by the resource manager, thereby displaying Figures 2A-2B, 3A-3F, 4A-4F, 5A-5F and The user interface of the camera application shown in Figures 6A-6B.
- the camera driver can be used to drive the camera to collect images, convert optical signals into electrical signals, and generate image and video streams.
- FIG. 17 exemplarily shows a hardware architecture diagram of the electronic device 100 .
- the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
- SIM subscriber identification module
- the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
- the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 .
- the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
- the illustrated components can be realized in hardware, software or a combination of software and hardware.
- the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
- application processor application processor, AP
- modem processor graphics processing unit
- GPU graphics processing unit
- image signal processor image signal processor
- ISP image signal processor
- controller video codec
- digital signal processor digital signal processor
- baseband processor baseband processor
- neural network processor neural-network processing unit
- the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
- a memory may also be provided in the processor 110 for storing instructions and data.
- the memory in processor 110 is a cache memory.
- the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
- the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
- the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
- the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
- the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
- Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
- the display screen 194 is used to display images, videos and the like.
- the display screen 194 includes a display panel.
- the display screen 194 includes a display panel.
- the display panel may be a liquid crystal display (LCD).
- the display panel can also use organic light-emitting diodes (organic light-emitting diodes, OLEDs), active-matrix organic light-emitting diodes or active-matrix organic light-emitting diodes (active-matrix organic light emitting diodes, AMOLEDs), flexible light-emitting diodes ( flex light-emitting diode, FLED), miniled, microled, micro-oled, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
- the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
- the electronic device 100 displays the user interfaces shown in Fig. 2A-Fig. 2B, Fig. 3A-Fig. 3F, Fig. 4A-Fig. 4F, Fig. 5A-Fig. 5F and Fig. 6A-Fig. screen 194, and the display functions provided by the application processor and the like.
- the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
- the ISP is used for processing the data fed back by the camera 193 .
- the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
- ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
- the ISP may be located in the camera 193 .
- Camera 193 is used to capture still images or video.
- the object generates an optical image through the lens and projects it to the photosensitive element.
- the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
- CMOS complementary metal-oxide-semiconductor
- the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
- the ISP outputs the digital image signal to the DSP for processing.
- DSP converts digital image signals into standard RGB, YUV and other image signals.
- the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
- Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
- Video codecs are used to compress or decompress digital video.
- the electronic device 100 may support one or more video codecs.
- the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
- MPEG moving picture experts group
- the electronic device 100 displays the data captured by the camera in the user interface shown in FIGS. 2A-2B, 3A-3F, 4A-4F, 5A-5F and 6A-6B.
- the process of image and video generation depends on the shooting capability provided by the above-mentioned ISP, camera 193, video codec, GPU, display screen 194 and application processor.
- the touch sensor 180K is also called “touch device”.
- the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
- the touch sensor 180K is used to detect a touch operation on or near it.
- the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
- Visual output related to the touch operation can be provided through the display screen 194 .
- the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
- the electronic device 100 may use the touch detection provided by the touch sensor 180K to determine whether a user operation acting on controls such as the control 111 and the control 112 in FIG. 2A is detected.
- UI user interface
- the term "user interface (UI)" in the specification, claims and drawings of this application is a medium interface for interaction and information exchange between an application program or an operating system and a user, and it realizes the internal form of information Conversion to and from a form acceptable to the user.
- the user interface of the application program is the source code written in specific computer languages such as java and extensible markup language (XML). Such as pictures, text, buttons and other controls.
- Controls also known as widgets, are the basic elements of the user interface. Typical controls include toolbars, menubars, text boxes, buttons, scroll bars ( scrollbar), images and text.
- the properties and contents of the controls in the interface are defined through labels or nodes.
- XML specifies the controls contained in the interface through nodes such as ⁇ Textview>, ⁇ ImgView>, and ⁇ VideoView>.
- a node corresponds to a control or property in the interface, and after the node is parsed and rendered, it is presented as the content visible to the user.
- the interfaces of many applications, such as hybrid applications usually include web pages.
- a web page, also called a page, can be understood as a special control embedded in the application program interface.
- a web page is a source code written in a specific computer language, such as hyper text markup language (GTML), cascading style Tables (cascading style sheets, CSS), java scripts (JavaScript, JS), etc.
- GTML hyper text markup language
- cascading style Tables cascading style sheets, CSS
- java scripts JavaScript, JS
- the specific content contained in the web page is also defined by the tags or nodes in the source code of the web page.
- GTML defines the elements and attributes of the web page through ⁇ p>, ⁇ img>, ⁇ video>, and ⁇ canvas>.
- GUI graphical user interface
- the phrase “in determining” or “if detected (a stated condition or event)” may be interpreted to mean “if determining" or “in response to determining" or “on detecting (a stated condition or event)” or “in response to detecting (a stated condition or event)”.
- all or part of them may be implemented by software, hardware, firmware or any combination thereof.
- software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
- the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
- the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
- the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, DSL) or wireless (eg, infrared, wireless, microwave, etc.) means.
- the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
- the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state hard disk), etc.
- the processes can be completed by computer programs to instruct related hardware.
- the programs can be stored in computer-readable storage media.
- When the programs are executed may include the processes of the foregoing method embodiments.
- the aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk, and other various media that can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Psychiatry (AREA)
- Social Psychology (AREA)
- Oral & Maxillofacial Surgery (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
一种拍摄方法。实施上述方法,手机等电子设备100可以利用骨骼点识别算法确定图像中用户手部的骨骼点,并从上述骨骼点中确定出两个手势特征点。然后,电子设备100可利用上述两个手势特征点在水平坐标轴上的位置构建表征手的状态(手掌或手背)的手势向量。进一步的,电子设备100可按照同样的方法确定后续图像帧的手势向量。当识别到后续图像帧中的手势向量的方向与初始图像帧中的手势向量的方向相反时,电子设备100可确认用户做出了翻手手势。
Description
本申请要求于2021年11月25日提交中国专利局、申请号为202111417773.6、申请名称为“基于方向向量的翻手检测方法和电子设备”的中国专利申请的优先权,和2021年12月01日提交中国专利局、申请号为202111460029.4、申请名称为“拍摄的方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及终端领域,尤其涉及拍摄的方法和电子设备。
手机等电子设备提供了多种拍摄模式,用户可以在不同的场景下选择适合当前场景的拍摄模式以获得更好的拍摄体验。然而,现有的切换拍摄模式的过程需要用户点击屏幕上的控件完成。通过用户点击屏幕实现切换拍摄模式的方法对用户而言是不方便的。
发明内容
本申请提供了一种拍摄方法。实施上述方法,电子设备可以识别用户做出的手势,并根据该手势控制切换拍摄模式,从而提升用户拍摄体验。
第一方面,本申请实施例提供了一种拍摄方法,该方法可应用于电子设备,该电子设备包括第一摄像头和第二摄像头,该方法包括:显示第一界面,第一界面包括第一预览窗,第一预览窗显示第一摄像头实时采集的图像;检测到用户的第一手势;响应于第一手势,显示第二界面,第二界面包括第二预览窗,第二预览窗显示第二摄像头实时采集的图像;其中,检测到用户的第一手势,包括:采集第一图像,第一图像为第一摄像头或第二摄像头所采集的图像,第一图像包括第一手部图像;确定第一手势向量,第一手势向量是基于第一手部图像确定的;采集第二图像,第二图像为第一摄像头或第二摄像头所采集的图像,第二图像包括第二手部图像;确定第二手势向量,第二手势向量是基于第二手部图像确定的;基于第一手势向量和第二手势向量,确定第一手势。
实施第一方面提供的方法,电子设备可以根据识别到的用户的手势,控制切换不同的拍摄模式。其中,电子设备可根据两帧图像中手部图像的手势向量,确定用户手的状态,然后,通过比较两帧图像中手的状态判断用户是否做出预设的手势。
结合第一方面提供的实施例,在一些实施例中,第一手势向量包括第一方向信息,第二手势向量包括第二方向信息,第一方向信息和第二方向信息均用于标识手部状态,基于第一手势向量和第二手势向量,确定第一手势,包括:基于第一方向信息和第二方向信息,确定第一手势。
实施上述实施例提供的方法,电子设备可根据两图像中手部图像中的手势向量的方向,确定用户手发生翻转。
结合第一方面提供的实施例,在一些实施例中,基于第一方向信息和第二方向信息,确定第一手势,包括:当第一方向信息和第二方向信息不同时,确定第一手势为翻手手势。
实施上述实施例提供的方法,当识别到两图像中手部图像中的手势向量的方向不同时,电子设备可确认识别到图像中手的状态发生翻转,于是,电子设备可确认用户做出翻手手势。
结合第一方面提供的实施例,在一些实施例中,第一界面还包括第三预览窗,第三预览窗显示第二摄像头实时采集的图像;响应于第一手势,显示第三界面,第三界面中第一预览窗显示第二摄像头实时采集的图像,第三预览窗显示第一摄像头实时采集的图像。
实施上述实施例提供的方法,在识别到翻手手势后,电子设备可变更双景拍摄场景中不用预览窗中显示的图像。
结合第一方面提供的实施例,在一些实施例中,确定第一手势向量,具体包括:识别第一手部图像中的第一特征点和第二特征点;根据第一特征点和第二特征点在第一坐标轴上的位置,确定第一手势向量,其中,第一坐标轴与地面平行;确定第二手势向量,具体包括:识别第二手部图像中的第一特征点和第二特征点;根据第一特征点和第二特征点在第一坐标轴上的位置,确定第二手势向量;
实施上述实施例提供的方法,电子设备可以利用手部图像中的两个特定点构建手势向量,进而确定用表征手部图像中手的状态的手势向量。
结合第一方面提供的实施例,在一些实施例中,第一手势向量的第一方向信息,为第一坐标指向第二坐标的方向,第一坐标为第一手部图像中第一特征点在第一坐标轴上的投影点,第二坐标为第一手部图像中第二特征点在第一坐标轴上的投影点。第二手势向量的第二方向信息,为第三坐标指向第四坐标的方向,第三坐标为第二手部图像中第一特征点在第一坐标轴上的投影点,第四坐标为第二手部图像中第二特征点在第一坐标轴上的投影点。
实施上述实施例提供的方法,电子设备可以通过水平坐标轴确定第一特征点、第二特征点的坐标,进而利用上述坐标确定第一手势向量、第二手势向量。
结合第一方面提供的实施例,在一些实施例中,识别第一手部图像中的第一特征点和第二特征点,具体包括:识别第一手部图像中手掌的第一数量的骨骼点;基于第一数量的骨骼点确定第一特征点和第二特征点;第一特征点和第二特征点分别位于第一手部图像中手掌的中轴线的两侧。
实施上述实施例提供的方法,电子设备可以利用骨骼点检测方法确定手部图像中表征手的状态的特征点。
结合第一方面提供的实施例,在一些实施例中,基于第一数量的骨骼点确定第一特征点和第二特征点,包括:从第一数量的骨骼点中选择两个的骨骼点作为第一特征点和第二特征点;或者,从第一数量的骨骼点中选择多个骨骼点,利用多个骨骼点计算得到第一特征点和第二特征点。
实施上述实施例提供的方法,电子设备可以根据从识别到的多个骨骼点中选出第一特征点和第二特征点,或者根据多个骨骼点中的部分或全部骨骼点计算出第一特征点和第二特征点。
结合第一方面提供的实施例,在一些实施例中,第一特征点为大拇指顶端的骨骼点;第二特征点为小指顶端的骨骼点。
结合第一方面提供的实施例,在一些实施例中,在确定第二手势向量之前,该方法还包括:识别第二图像中第二手部图像的所在区域;确定第二图像中第二手部图像与第一图像中第一手部图像所在区域的交并比IoU;确定第二手势向量,包括:当IoU满足第一阈值时,确定第二图像中第二手部图像的第二手势向量。
实施上述实施例提供的方法,电子设备在计算第二图像的第二手势向量之前,还可以计算第二图像中第二手部图像与第一手部图像的交并比。当交并比不满足预设条件时,电子设备可以提前确认该图像帧不符合翻手手势的特点,从而获取其他图像进行判断。
结合第一方面提供的实施例,在一些实施例中,确定第二图像与第一图像中手的所在区域的交并比IoU,包括:确定第二图像中第二手部图像与第一图像中第一手部图像所在区域的交集和并集;IoU为交集比并集。
结合第一方面提供的实施例,在一些实施例中,识别第二图像中第二手部图像的所在区域,包括:确定第二图像中人脸的所在区域;基于人脸的所在区域确定第一区域,第一区域包括且大于人脸的所在区域,第一区域小于第二图像;识别第一区域中手的所在区域,确定手的所在区域为第二手部图像的所在区域。
实施上述实施例提供的方法,电子设备可根据人脸识别、人体识别,更加准确的定位图像中的手部图像。
结合第一方面提供的实施例,在一些实施例中,该方法还包括:确定第二手势向量的长度满足第二阈值;当第一方向信息和第二方向信息不同时,确定第一手势为翻手手势,包括:当第一方向信息和第二方向信息不同时,且第二手势向量的长度满足第二阈值时,确定第一手势为翻手手势。
实施上述实施例提供的方法,电子设备可以对翻手手势中手掌翻转的角度进行限制,从而避免将用户无意做出的晃手动作识别为翻手手势,进而提升手势识别的准确度。
结合第一方面提供的实施例,在一些实施例中,在检测到用户的第一手势之前,方法还包括:检测到第一操作;响应于第一操作,开始拍摄。
实施上述实施例提供的方法,电子设备可以在拍摄视频的过程中识别用户的手势,同时切换拍摄模式,从而使得切换后的拍摄过程更加符合用户需求或当前拍摄场景的需求,进而提升用户使用体验。
结合第一方面提供的实施例,在一些实施例中,第一操作包括:作用于第一控件的操作,第一控件显示在第一界面上;或者,识别到用户做出第二手势的操作,第二手势与第一控件对应。
实施上述实施例提供的方法,实施上述实施例提供的方法,电子设备可以通过作用于用户界面的控件开启拍摄,也可以通过识别到控制拍摄的特定手势来开启拍摄。
结合第一方面提供的实施例,在一些实施例中,第一摄像头为前置摄像头,第二摄像头为后置摄像头;或者,第一摄像头为前置摄像头,第二摄像头为前置摄像头;或者,第一摄像头为后置摄像头,第二摄像头为后置摄像头。
实施上述实施例提供的方法,电子设备实现双景或多景拍摄所使用的摄像头可以同时为前置摄像头和后置摄像头,也可以同时为前置摄像头或同时为后置摄像头。
第二方面,本申请提供了一种电子设备,该电子设备包括一个或多个处理器和一个或 多个存储器;其中,一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。
第三方面,本申请提供一种计算机可读存储介质,包括指令,当上述指令在电子设备上运行时,使得上述电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。
第四方面,本申请提供一种包含指令的计算机程序产品,当上述计算机程序产品在电子设备上运行时,使得上述电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。
可以理解地,上述第二方面提供的电子设备、第三方面提供的计算机存储介质、第四方面提供的计算机程序产品均用于执行本申请第一方面提供的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。
图1为本申请实施例提供的一组翻手手势的示意图;
图2A-图2B为本申请实施例提供的一组设置双景拍摄模式的用户界面;
图3A-图3F为本申请实施例提供的一组识别翻手手势切换双景拍摄模式的用户界面;
图4A-图4F为本申请实施例提供的一组识别右滑手势切换双景拍摄模式的用户界面;
图5A-图5F为本申请实施例提供的一组识别左滑手势切换双景拍摄模式的用户界面;
图6A-图6B为本申请实施例提供的一组识别握拳手势切换双景拍摄模式的用户界面;
图7为本申请实施例提供的一种电子设备识别翻手手势的流程图;
图8A-图8B为本申请实施例提供的初始图像帧的示意图;
图9A-图9B为本申请实施例提供的定位图像帧中手部图像的示意图;
图10为本申请实施例提供的识别手部图像帧骨骼点的示意图;
图11为本申请实施例提供的确定初始图像帧中手势向量的示意图;
图12为本申请实施例提供的一种电子设备识别翻手手势的流程图;
图13为本申请实施例提供的电子设备获取的包含手部图像的图像帧的示意图;
图14为本申请实施例提供的电子设备确定初始图像帧和初始图像帧之后采集的图像帧中手部图像交并比的示意图;
图15为本申请实施例提供的电子设备识别翻手手势的示意图;
图16为本申请实施例提供电子设备的软件架构图;
图17为本申请实施例提供电子设备的硬件架构图。
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。
手机等电子设备提供了多种拍摄模式,用户可以在不同的场景下选择适合当前场景的拍摄模式以获得更好的拍摄体验。然而,现有的切换拍摄模式的过程需要用户点击屏幕上的控件完成。通过用户点击屏幕实现切换拍摄模式的方法对用户而言是不方便的。
为了方便用户切换拍摄视频时的拍摄模式,本申请实施例提供了一种拍摄的方法,涉及预览时或拍摄视频时的拍摄模式的切换方法。实施本申请实施例提供了一种拍摄方法,智能手机、智能电视等终端电子设备(电子设备100)可以在显示预览图像时或拍摄视频时,识别用户做出的特定手势。在确认识别到特定手势之后,电子设备100可依据识别到的手势的类型切换拍摄模式(例如由前置拍摄切换为后置拍摄,或者由双摄像头拍摄切换为单摄像头拍摄)。本申请方法不仅适用于拍摄视频或者图片时的预览阶段,也适用于开始视频拍摄后,视频拍摄过程中的拍摄阶段。
在本申请实施例中,上述拍摄模式是指电子设备100开启多个摄像头进行多景拍摄时的不同组合和显示类型,包括使用多个后置摄像头进行拍摄的模式、同时使用前置摄像头和后置摄像头进行拍摄的模式以及使用多个前置摄像头进行拍摄的模式等,还可以包括上述的多个摄像头之间的不同组合的拍摄模式和单个摄像头之前的模式切换,也可以包括单个摄像头拍摄模式的切换,例如前置摄像头切换为后置摄像头等。
上述特定的手势包括翻手手势。首先,图1示例性示出了翻手手势示意图。
在本申请实施例中,如图1所示,翻手手势是指:举手,转动小臂,使手由手掌面对电子设备100的摄像头的形态转变为手背面对电子设备100的摄像头形态,或者由手背面对电子设备100的摄像头的形态转变为手掌面对电子设备100的摄像头的形态。上述手掌和手背是指五指张开的手的手掌和手背。后续实施例主要以“手掌翻转到手背”的翻手过程为例展开说明。
上述电子设备100能够采集图像且具备图像处理能力的电子设备。当手的手掌面对电子设备100时,电子设备100采集到的图像帧中显示的图像内容为手的手掌;当手的手背面对电子设备100时,电子设备100采集到的图像帧中显示的图像内容为手的手背。
在现有的一些手势识别方法中,电子设备100识别图1所示的翻手手势依赖于基于图像特征的深度学习算法或机器学习算法。
在使用上述方法时,电子设备100往往需要学习大量包含翻手手势的图像,从而得到一个能够识别翻手手势的模型,然后,再基于上述模型去识别其他图像中是否包含翻手手势。通过深度学习算法或机器学习算法实现手势识别的方法依赖于训练得到的翻手手势识别模型。该模型的生成以及使用的计算成本和时间成本都较大。在使用上述方法识别用户的手势的过程中,手势识别的准确率不高,识别效率也较低。
实施本申请实施例提供了一种拍摄方法,电子设备100可以利用现有的骨骼点识别算法确定图像中用户手部的骨骼点。电子设备100可从上述骨骼点中确定出两个手势特征点。上述两个手势特征点所构成的手势向量可用于表示当前图像帧中手部(例如手掌或手背或手侧面等)的状态。上述状态包括:手掌面对电子设备100的摄像头,或手背面对电子设备100的摄像头。
然后,电子设备100可按照同样的方法确定后续图像帧的手势向量。当识别到后续图像帧中的手势向量的方向与初始图像帧中的手势向量的方向相反时,电子设备100可确定 前后两帧图像中手的状态发生了变化,即图像帧中的手由手掌翻转到了手背,或由手背翻转到了手掌。因此,电子设备100可确认用户做出了翻手手势。
不限于智能手机、智能电视,电子设备100还可以是平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备、智能家居设备和/或智慧城市设备,本申请实施例对该电子设备的具体类型不作特殊限制。
图2A-图2B、图3A-图3F、图4A-图4F、图5A-图5F以及图6A-图6B示例性示出了一组电子设备100实施拍摄视频时的切换方法的用户界面。下面,结合上述用户界面,具体介绍电子设备100实施本申请实施例提供的拍摄视频时的切换方法场景。
首先,图2A示例性示出了电子设备100上运行相机应用进行双景拍摄的用户界面。相机应用是指调用电子设备100的摄像头为用户提供拍摄照片或视频服务的应用程序。双景拍摄是指同时调用电子设备100的多个摄像头,并在预览界面中显示上述多个摄像头采集的图像,以使得用户可以同时拍摄包括多个视野的视频。
如图2A所示,该用户界面可包括预览窗101、预览窗102。预览窗101、预览窗102可用于显示电子设备100的前置或后置摄像头采集的图像。预览窗可用于实时显示电子设备100的摄像头采集的图像。当检测到拍摄操作(如拍摄照片)时,电子设备100可将预览窗中显示的图像保存为图片;或,当检测到拍摄操作(如拍摄视频)时,电子设备100可在预览窗101和/或预览窗102中显示正在拍摄的视频,停止拍摄后,保存为视频。预览窗101和/或预览窗102(其他预览窗同理)不仅仅显示预览时摄像头采集的图像,也显示拍摄视频时的预览画面(即摄像头采集的图像)。本申请方法中所指的预览窗可以指的是拍摄视频或者图片时的预览阶段的预览窗,也可以指的是开始视频拍摄后,视频拍摄过程中的预览窗口(可以理解为,点击图2A的控件115开始拍摄,预览窗101和预览窗102显示视频拍摄过程中的预览画面,再次点击控件115,结束拍摄)。
默认的,在进入双景拍摄模式后,电子设备100可执行双景拍摄中的“前/后”模式。上述“前/后”模式是指:同时调用电子设备100的一个前置摄像头和一个后置摄像头进行双景拍摄,并且均分显示上述两个摄像头采集的图像的拍摄模式。如图2A所示,此时,预览窗101可显示后置摄像头采集的图像,预览窗102可显示前置摄像头采集的画面;也可以,预览窗101显示前置摄像头采集的图像,预览窗102显示后置摄像头采集的画面。
图2A所示的用户界面还包括控件111。控件111可用于切换双景拍摄的拍摄模式。上述拍摄模式除前述介绍的“前/后”模式之外,还包括“后/后”、“画中画”、“前/前”、“后”、“前”等模式。
上述“后/后”模式是指:同时调用电子设备100的两个不同的后置摄像头进行双景拍摄,并且均分显示上述两个摄像头采集的图像的拍摄模式。上述两个不同的后置摄像头例如普通后置摄像头和广角后置摄像头。上述“画中画”模式是指:同时调用电子设备100 的一个前置摄像头和一个后置摄像头进行双景拍摄,并且将前置摄像头采集的图像以窗口的形式嵌入到后置摄像头采集的图像中的拍摄模式,例如:图2B中窗口117中所示的“画中画”:屏幕中主要显示的为后置摄像头采集的风景;前置摄像头采集的人像以小的浮窗的形式嵌入在后置摄像头采集的图像的左上方。上述“后”模式是指:调用电子设备100的一个前置摄像头和一个后置摄像头进行双景拍摄,但是仅显示后置摄像头采集的图像的拍摄模式。上述“前”模式是指:调用电子设备100的一个前置摄像头和一个后置摄像头进行双景拍摄,但是仅显示前置摄像头采集的图像的拍摄模式。
此外,该用户界面还可包括控件112、控件113、控件114、控件115、控件116。控件112可用于控制开启/关闭电子设备100的闪光灯。控件113可用于调节前置摄像头的焦距。控件114可用于显示已拍摄的照片或视频。控件115可用于控制开始/结束双景拍摄。控件116可用于为用户提供更多的设置拍摄参数的功能,这里不再赘述。
电子设备100可检测到作用于控件111的用户操作,上述用户操作例如是点击操作。响应于上述操作,电子设备100可显示图2B所示的用户界面。该用户界面中显示有窗口117。窗口117中显示有上述“前/后”、“后/后”等拍摄模式。此时,电子设备100可检测到作用于任一拍摄模式的用户操作,并将当前使用的双景拍摄的模式设置为上述用户选择的拍摄模式。
在图2A和图2B所示的用户界面中,上述切换双景拍摄的拍摄模式的过程需要用户点击屏幕的操作。在多数双景拍摄的场景下,通过用户点击屏幕实现切换拍摄模式的方法对用户而言是不方便的。为例避免上述问题,在本申请实施例中,电子设备100可以通过识别用户的手势,切换双景拍摄的不同拍摄模式。
例如,在图2A所示的拍摄场景下,用户可执行翻手手势以控制电子设备100交换预览窗101和预览102中显示的图像。
具体的,在用户执行翻手手势时,电子设备100可采集到包含上述手势的图像帧序列,参考图3A中预览窗102。响应于识别到上述翻手手势,参考图3B,电子设备100可在预览窗101中显示前置摄像头采集的包含用户人像的图像(原预览窗102中显示的图像),在预览窗102中显示前置摄像头采集的图像(原预览窗101中显示的图像),即交换预览窗101和预览102中显示的图像。
如图3C-图3D所示,在电子设备100正在全屏显示前置摄像头采集的图像的场景下,当检测到用户执行翻手手势时,电子设备100可将当前正在屏幕中显示前置摄像头采集的图像切换为后置摄像头采集的图像。
反之,在电子设备100正在全屏显示后置摄像头采集的图像的场景下,当检测到用户执行翻手手势时,电子设备100可将当前正在屏幕中显示后置摄像头采集的图像切换为前置摄像头采集的图像。在电子设备100正在全屏显示后置摄像头采集的图像的场景下,即未显示前置摄像头采集的包含人像的图像时,电子设备100的前置摄像头可采集图像,并识别用户会否执行翻手手势。
可以理解的,以图3A为例,在图3A所示识别到用户翻手手势的过程中,在检测到用户举起手掌之后,电子设备100可显示图3E所示的用户界面。该用户界面中可包括控件 21。控件21可标识检测到用户举起手掌的动作。控件21包括环形的加载圈。该加载圈可表示一个计时器。该加载圈可提示用户在该加载圈加载完成之前,即计时结束之前,完成手势。这时,电子设备100将识别到的用户举起手掌的图像帧到加载圈加载完成时采集的图像帧作为电子设备100识别用户手势的图像帧。
在一些实施例中,上述控件21还可指示用户在加载圈加载完成之后完成手势。这时,电子设备100可获取加载圈加载完成之后的一段时间内的视频帧作为电子设备100识别用户手势的图像帧。上述一段时间为预设的,一般可以为3秒钟。
后续的,在图3C所示的检测到作用做出翻手手势的用户界面中,电子设备100也会在检测到用户举起手掌后显示控件21,指示用户完成手势,并获取用户完成手势时的图像帧,识别用户完成的手势,参考图3F,后续实施例不再赘述。
电子设备100还可识别滑动手势。上述滑动手势包括左滑和右滑。
图4A-图4F示出了电子设备100识别用户右滑手势控制切换双景拍摄的不同拍摄模式的用户界面。
例如,在图2A所示的拍摄场景下,用户可伸出手掌右滑以控制电子设备100关闭预览窗102,以实现将图2A所示的“前/后”模式切换到“前”或“后”拍摄模式。
在用户可伸出手掌右滑时,电子设备100可采集到包含上述手势的图像帧序列,参考图4A中预览窗102。识别上述图像帧序列,电子设备100可确定用户执行了右滑手势。响应于识别到上述右滑手势,电子设备100可关闭预览窗102,参考图4B。此时,电子设备100可全屏显示原预览窗101中后置摄像头采集的图像,即将图2A所示的“前/后”模式切换到“后”拍摄模式。
在图4B所示的拍摄场景下,用户可执行右滑手势以控制电子设备100重新显示两个预览窗,从而将图4B所示的“后”模式切换到“前/后”拍摄模式。
在电子设备100显示图4B所示的用户界面时,即未显示前置摄像头采集的包含人像的图像时,电子设备100的前置摄像头可采集图像,并识别用户会否执行右滑手势。响应于识别到用户执行的右滑手势,电子设备100可重新显示预览窗102,即回到“前/后”模式的双景拍摄模式,参考图4C。此时,预览窗101可显示前置摄像头采集的图像,预览窗102可显示后置摄像头采集的图像。
在图4C所示的拍摄场景下,电子设备100可再次识别到用户的右滑手势,参考图4D。响应于识别到上述右滑手势,电子设备100可再次关闭预览窗102,参考图4E。此时,电子设备100可全屏显示原预览窗101中前置摄像头采集的图像,即将图4D所示的“前/后”模式切换到“前”模式。
然后,在检测到用户执行右滑手势后,电子设备100又可重新显示预览窗102,参考图4F。此时,预览窗101可显示后置摄像头采集的图像,预览窗102可显示后置摄像头采集的图像。此时,图4F与图4A所示的拍摄状态相同。即在图4E所示的拍摄状态下,在检测到右滑手势后,电子设备100可回到图4A所示的“前/后”模式中,且预览窗101显示后置摄像头采集的图像,预览窗102显示后置摄像头采集的图像。
依次类推,在多次识别到用户的右滑手势的过程中,电子设备100可重复图4A-图4E 所示的过程,以供用户通过右滑手势切换双景拍摄模式。
上述重复图4A-图4E所示控制方法可以概括为:在上下分屏显示的“前/后”模式中,每识别到依次用户的右滑手势,电子设备100可以关闭在下的预览窗(预览窗102),从而全屏显示在上的预览窗(预览窗101)所对应的摄像头采集的图像。在“前”或“后”拍摄模式中,每识别到依次用户的右滑手势,电子设备100会将一个全屏预览窗分割为上下两个预览窗(预览窗101和预览窗102),并在预览窗102中显示当前全屏显示的图像,在预览窗101中显示前一过程中被关闭的预览窗102对应的摄像头采集的图像。
可以理解的,在图4A-图4F所示的识别右滑手势的过程中,电子设备100也会在检测到用户举起手掌后显示图3E中的控件21,指示用户完成手势,并获取用户完成手势时的图像帧,识别用户完成的手势。上述过程可参考图3E的介绍,这里不再赘述。
图5A-图5F示出了电子设备100识别用户左滑手势控制切换双景拍摄的不同拍摄模式的用户界面。
例如,在图2A所示的拍摄场景下,用户可伸出手掌左滑以控制电子设备100关闭预览窗101,从而实现将图2A所示的“前/后”模式切换到“前”或“后”拍摄模式。
在用户可伸出手掌左滑时,电子设备100可采集到包含上述手势的图像帧序列,参考图5A中预览窗102。识别上述图像帧序列,电子设备100可确定用户执行了左滑手势。响应于识别到上述左滑手势,电子设备100可关闭预览窗101,参考图5B。此时,电子设备100可全屏显示原预览窗102中前置摄像头采集的图像,即将图2A所示的“前/后”模式切换到“前”模式。
在图5B所示的拍摄场景下,用户可执行左滑手势以控制电子设备100重新显示两个预览窗,从而将图5B所示的“前”模式切换到“前/后”拍摄模式。
同样的,在用户执行左滑手势时,电子设备100可采集到包含上述手势的图像帧序列,参考图5C中预览窗102。响应于识别到上述左滑手势,电子设备100可重新显示预览窗101,参考图5D。此时,预览窗101可显示前置摄像头采集的图像,预览窗102可显示后置摄像头采集的图像。
在图5D所示的拍摄场景下,电子设备100可再次识别到用户执行左滑手势,响应于识别到上述左滑手势,电子设备100可再次关闭预览窗101,参考图5E。电子设备100可全屏显示原预览窗102中后置摄像头采集的图像,即将图5D所示的“前/后”模式切换到“后”拍摄模式。然后,在检测到用户执行左滑手势后,电子设备100又可重新显示预览窗101,即回到“前/后”的双景拍摄模式,参考图5A。此时,预览窗101可显示后置摄像头采集的图像,预览窗102可显示后置摄像头采集的图像。
此时,图5F与图5A所示的拍摄状态相同。即在图5E所示的拍摄状态下,在检测到左滑手势后,电子设备100可回到图5A所示的“前/后”模式中,且预览窗101显示后置摄像头采集的图像,预览窗102显示后置摄像头采集的图像。
可以理解的,在图5E所示的场景下,虽然电子设备100没有显示前置摄像头采集的图像,但是,前置摄像头仍然处于工作状态。电子设备100可以识别前置摄像采集的图像。因此,在图5E所示的场景下,在识别到前置摄像头采集的图像包含左滑手势时,电子设备 100可执行图5E-图5F的切换。
此外,不限于前置摄像头,电子设备100还可识别后置摄像头采集的图像。当识别到后置摄像头采集的图像包含左滑手势时,电子设备100也可执行图5E-图5F的切换。电子设备100的前置摄像头与后置摄像头还可同时采集并识别到多个用户同时做出特定手势的图像,这时,电子设备100可依据识别到的上述多个用户同时做出的特定手势中较先完成的手势控制切换拍摄模式。
可选的,电子设备100可依据多个摄像头获取图像中手势的景深确定识别哪一摄像头获取的图像中的手势。例如,一般的,前置摄像头采集到的图像中用户完成翻手手势的景深较小,即图像帧中手势占整个图像的区域较大。这时,电子设备100可识别前置摄像头采集的图像帧中的手势,并依据识别到的手势控制切换拍摄模式。
依次类推,在多次识别到用户的左滑手势的过程中,电子设备100可重复图5A-图5E所示的过程,以供用户通过左滑手势控制切换双景拍摄模式。
上述重复图5A-图5E所示控制方法可以概括为:在上下分屏显示的“前/后”模式中,每识别到依次用户的左滑手势,电子设备100可以关闭在上的预览窗(预览窗101),从而全屏显示在下的预览窗(预览窗102)所对应的摄像头采集的图像。在“前”或“后”拍摄模式中,每识别到依次用户的左滑手势,电子设备100会将一个全屏预览窗分割为上下两个预览窗(预览窗101和预览窗102),并在预览窗101中显示当前全屏显示的图像,在预览窗102中显示前一过程中被关闭的预览窗101对应的摄像头采集的图像。
可以理解的,在图5A-图5F所示的识别左滑手势的过程中,电子设备100也会在检测到用户举起手掌后显示图3E中的控件21,指示用户完成手势,并获取用户完成手势时的图像帧,识别用户完成的手势。上述过程可参考图3E的介绍,这里不再赘述。
电子设备100还可识别握拳手势。上述握拳手势是指:手指向掌心弯曲使得五指张开的手掌变为拳头的手势。握拳手势可用于控制电子设备100切换“画中画”模式的双景拍摄。图6A-图6B示出了电子设备100识别到用户执行握拳手势,将双景拍摄模式切换为“画中画”模式的用户界面。
在图2A所示的拍摄场景下,用户可执行握拳手势。在用户执行握拳手势时,电子设备100可采集到包含上述手势的图像帧,参考图6A中预览窗102。响应于识别到上述握拳手势,参考图6B,电子设备100可以将前置摄像头采集的图像以小窗口的形式嵌入到全屏显示的后置摄像头采集的图像中,即将双景拍摄模式切换为“画中画”模式,以供用户浏览。
不限于前述实施例介绍的“前/后”、“后/后”、“画中画”等双景拍摄模式,电子设备100还可支持其他类型的双景拍摄,或多景拍摄。相应地,不限于前述实施例介绍的翻转、右滑、左滑、握拳等手势,电子设备100还可识别其他类型的手势,本申请实施例对此不作限制。
下面具体介绍电子设备100识别用户做出翻手手势的具体流程。参考图7,电子设备 100识别用户做出翻手手势的流程可包括两部分:
S101:获取图像帧流,确定初始图像帧。
在调用摄像头采集图像的过程中,首先,电子设备100可获取摄像头采集的一系列图像帧,即图像帧流。当用户执行翻手手势时,上述图像帧流中可包括连续的用户完成翻手手势的多帧图像。电子设备100可识别上述连续的用户完成翻手手势的多帧图像确定用户做出翻手手势。
首先,电子设备100需要从摄像头传回的图像帧流中,确定初始图像帧。上述初始图像帧为图像帧流中标志用户做出翻手手势的第一帧图像。
图8A示例性示出了初始图像帧的示意图。如图8A所示,在完成翻手手势时,用户首先会举起手掌,将手掌面对电子设备100的摄像头,然后,用户可顺时针或逆时针旋转手掌,从而完成翻手手势。因此,在检测到图8A所示的手掌面对电子设备100的摄像头的图像帧S0后,电子设备100可确认图8A所示的图像帧S0及其之后的多个图像帧中可能包含用户做出的翻手手势,于是,电子设备100可确定上述S0为初始图像帧。
可以理解的,在由手背翻转到手掌的翻手过程中,当识别到图8B所示的图像帧后,电子设备100确认图8B所示的图像帧为初始图像帧。
具体的,在从图像帧流中确定初始图像帧的过程中,电子设备100需要识别图像帧中的手势。当图像帧中包含手势,且该手势与图8A所示的手势相符时,电子设备100可确定上述图像帧为初始图像帧。
在一些实施例中,电子设备100可利用现有的手势识别模型确定图像帧中是否包含手势。上述手势识别模型可以是利用人工神经网络算法学习海量包含手势的图像帧建立的记录有手势特征的模型。不限于人工神经网络算法,构建手势识别模型的算法还可以是其他深度学习算法或机器学习算法,本申请实施例对此不作限制。基于上述手势识别模型,电子设备100可确定任意的一帧图像中是否包含手势。
参考图9A,电子设备100可将图像帧流中的一帧图像S0输入上述手势识别模型,然后电子设备100可识别到S0中的手部图像83。上述手部图像83符合翻手手势开始的手势特点,于是,电子设备100可将上述S0确定为初始图像帧。
其中,手部图像83的图像区域的大小依据手势识别模型确定。可选的,手势识别模型识别任意图像后输出的该图像中的手部图像的大小相同(例如图13中手部图像83手掌框面积和手部图像84的手掌框面积大小相同,其中,手掌框类似于人脸框,属于识别手部后对应显示的手掌框,手部图像在手掌框内部)。可选的,手势识别模型识别任意图像后输出的该图像中的手部图像的大小不同(例如由于图13中S0为手心正面,S1为手部侧面,故图13中手部图像83的手掌框的面积大于手部图像84的手掌框面积)。其中手部图像的大小依据手势识别模型识别像素点特征确定。例如,可以是识别出的手部图像的最左的点、最右的点、最上的点和最下的点所形成的矩形框(也可以是分别往外扩展W列或W行像素所形成的矩形框,例如W为5或10等),也可以根据图13中S0时刻确定的手部图像的手掌框的面积不变的沿用,也可以根据具体需要而对应显示的手掌框,例如手掌正面的手掌框面积大于手掌侧面的手掌框面积。本申请对此不进行限定。
然而,在一些场景中,人像在整个图像帧中所占的区域比较小,进一步的,上述人像 中的手势在整个图像帧的占比就更小。因此,单纯利用上述手势识别模型确定图像帧中是否包含手势的识别效果较差,进一步的,不利于后续使用骨骼点识别算法识别图像中手的骨骼点。
于是,本申请实施例提供了另一种识别并定位图像中手势的方法。在该方法中,电子设备100可首先利用人脸检测算法识别出图像帧中的人脸图像,然后,电子设备100可基于图像帧中的人脸图像所在的区域确定出图像中的人体图像。然后,电子设备100可识别上述人体图像确定人体图像中的手势。
参考图9B,电子设备100可首先利用人脸检测算法识别到图像帧S0的人脸图像81。然后,电子设备100可基于人脸图像81向外延伸,得到人体图像82。可选的,电子设备100可在人脸图像81的基础上向上延伸D1个像素点、向下延伸D2个像素点、向左延伸D3个像素点、向右延伸D4个像素点,从而确定人体图像82。上述D1、D2、D3、D4可以是根据经验值预设的。本申请实施例对于D1、D2、D3、D4的具体取值不作限制。
在确定人体图像82后,电子设备100可利用手势识别算法识别人体图像82中的手势,于是,电子设备100可从人体图像82中识别到手部图像83。上述手部图像83符合翻手手势开始的手势特点,于是,电子设备100可将上述S0确定为初始图像帧。
图9B所示的手势识别方法有利于电子设备100更准确地识别并定位图像帧中的手势,进一步的,在使用骨骼点识别算法识别图像中手势的骨骼点时,电子设备100可以更加准确地识别图像帧中手势的骨骼点。
在经过图9A或图9B所示的方法识别到包含举起手掌的图像帧后,电子设备100可将上述图像帧确定为初始图像帧。结合用户界面,在图3A所示的场景下,在识别摄像头采集的图像帧流某一图像帧符合图8A或图8B所示的特点后,电子设备100可将该图像帧确定为初始图像帧。随后,电子设备100可显示图3E所示的用户界面。电子设备100可通过图3E中控件21提示用户在控件21计时结束(即加载圈加载完成)之前完成手势。于是,电子设备100可确定使用识别到用户举起手掌的图像帧(图8A或图8B所示的图像帧)到加载圈加载完成时采集的图像帧,作为电子设备100识别用户手势的图像帧。
可选的,电子设备100还可将显示控件21之后采集的第一帧图像,或者显示控件21之后开始计时的后采集的第一帧图像作为新的初始图像帧。后续使用上述新的初始图像帧进行手势识别计算。
在一些实施例中,上述控件21还可指示用户在加载圈加载完成之后完成手势。这时,电子设备100可获取加载圈加载完成之后的一段时间内的视频帧作为电子设备100识别用户手势的图像帧。
在采用图9A或图9B所示的方法定位到图像帧中的手势后,即确定初始图像帧后,电子设备100还需确定初始图像帧中表征手状态(手掌或手背)的手势向量offset[0]。上述offset[0]可用于电子设备100后续判断用户是否做出翻手手势。
具体的,电子设备100可利用骨骼点检测算法识别初始图像帧中的用户手的骨骼点。上述骨骼点检测算法是现有的,例如基于Kinect的骨骼点检测等等,这里不再赘述。
以前述过程中确定的初始图像帧S0为例,图10示例性示出了电子设备100利用骨骼 点检测算法识别S0中手势的骨骼点的示意图。如图10所示,将S0输入骨骼点检测模型中,电子设备100可确定S0中描述手的21个骨骼点,分别为n1~n21。在本申请实施例中,上述骨骼点检测模型是基于骨骼点检测算法建立的用于识别图像中手的骨骼点的模型。
利用骨骼点检测模型识别图像帧得到的图像帧中手的骨骼点的数量是预设的。在本申请实施例中,利用上述骨骼点检测模型识别S0得到的S0中手的骨骼点的数量为21。可以理解的,使用的骨骼点检测算法不同,或骨骼点检测算法中参数设置不同,电子设备100识别到的S0中手部图像的骨骼点的数量也不同,进一步的,识别到的各个骨骼点的位置也不同。
在识别到手势中的骨骼点之后,电子设备100可从上述骨骼点中确定两个手势特征点。这两个手势特征点可用于构建表征该图像帧中手的状态的手势向量offset。
参考图10,示例性的,电子设备100可确定大拇指顶端骨骼点(n1)和小拇指顶端骨骼点(n18)为手势特征点。在其他实施例中,上述手势特征点还可以为n1~n4、n6~n9中任意一个与n14~n21中任意一个组成的手势特征点组合,例如n6和n14,n2和n20等等。在一些实施例中,电子设备100还可利用n1~n4、n6~n9中的一个或多个骨骼点确定一个中心点C1,利用n14~n21中的一个或多个骨骼点确定另一个中心点C2,然后利用上述C1、C2构建表征手掌的状态的手势向量。本申请实施例对此不作限制。
电子设备100可以以图像帧中左端像素点的起点为原点,水平向右的方向为正方向,建立X坐标轴(X轴)。在确定两个手势特征点之后,电子设备100可确定上述两个手势特征点在X轴上的位置,即在X轴上的坐标,进而,电子设备100可利用上述两个手势特征点的在X轴上的坐标确定该图像帧中表征手的状态的向量,记为手势向量。手势向量的方向可表示图像帧中手势特征点的位置,可以用于表征手部的状态(如手心面向显示屏,手背面向显示屏或者手侧面面向显示屏等),进一步的,可表示手掌或手背与电子设备100的摄像头的位置关系,即手的状态,包括手掌面对电子设备100的摄像头或手背面对电子设备100的摄像头。手势向量的模长可反映手掌或手背与电子设备100的摄像头的角度。
可选的,上述X轴也可以是以右端像素点的起点为原点、水平向左的方向为正方向建立的坐标轴。本申请实施例对此不作限制。
同样,以前述确定的初始图像帧S0为例,图11示例性示出了电子设备100确定S0中表征手的状态的手势向量的示意图。如图11所示,电子设备100可以以S0中左端像素点的起点为原点,水平向右的方向为正方向,建立X坐标轴。根据骨骼点检测算法,电子设备100可得到S0中手势的各个骨骼点(n1~n21)。在识别到上述各个骨骼点的同时,电子设备100可确定上述各个骨骼点在X轴上的坐标。
图11中仅示出了上述各个骨骼点中的两个手势特征点(n1和n18)。在识别到n1和n18的同时,电子设备100可确定n1和n18在X轴上的坐标,分别记为X0[1]和X0[18]。进一步的,电子设备100可利用上述n1和n18的位置X0[1]和X0[18],确定表征S0中表征手的状态的手势向量Offset[0]。其中:
Offset[0]=X0[18]-X0[1]
可选的,手势向量Offset[0]还可表示为:
Offset[0]=X0[1]-X0[18]
本申请实施例对此不作限制。
在本申请实施例中所述的双景拍摄的场景中,电子设备100采集图像的摄像头包括2个或多个,这时,电子设备100可获取到2个或多个图像帧流。在上述情况下,电子设备100可参照前述方法,分别识别上述2个或多条图像帧流中的初始图像帧,检测各个图像帧流中的翻手手势,这里不再赘述。
S102:获取初始图像帧之后的Q帧图像帧,识别上述Q帧图像帧与初始图像帧,确定用户是否做出翻手手势。
初始图像帧可用于表征一个手势的开始。由于动作的连续性,初始图像帧之后的多帧图像中也包含有手势,且与初始图像帧构成一个手势动作。因此,当识别到初始图像帧后,电子设备100可利用上述初始图像帧及其之后的多帧图像帧识别用户做出的手势。
在确定初始图像帧、初始图像帧中表征手的状态的手势向量Offset[0]后,电子设备100可获取初始图像帧之后的图像帧,记为后续图像帧。然后,电子设备100可通过后续图像帧与初始图像帧中的表征手的状态的手势向量的方向,确定后续图像帧中的手相比于原始图像帧中的手是否发生了翻转。当识别到上述两图像帧的表征手的状态的手势向量的方向相反时,电子设备100可确定用户做出了翻手手势。
一般的,电子设备100在1秒内可采集30帧图像,用户可以在1秒内完成一个手势。用户完成一个手势的时长不会超过3分钟。因此,电子设备100可确认识别手势的图像帧序列为初始图像帧之后的90帧图像。电子设备100可利用上述90帧图像及初始图像帧识别用户的手势。上述90可称为初始图像帧之后用于识别翻手手势的图像帧的帧数Q。帧数Q不限于90。具体的,帧数Q的取值依据视频帧率和预设完成手势的最大时长的变化而变化,本申请实施例对此帧数Q不作限制。后续实施例以Q=90为例。
具体的,图12示例性示出了电子设备100识别初始图像帧和初始图像之后的Q帧图像帧确定用户做出翻手手势的流程图。下面结合图12所示的流程图,具体介绍电子设备100确定用户做出翻手手势的过程。
结合前述实施例的介绍,在确定初始图像帧之后,电子设备100显示图3E所示的包括控件21的用户界面。控件21可指示用户完成特定手势。电子设备100可获取显示控件21时采集的图像帧流识别用户做出的手势。此时,电子设备100可从上述显示控件21时采集的图像帧流中获取任意一帧,与前述初始图像帧一起,判断用户是否做出翻手手势。这时,显示控件21时采集的图像帧流中包括的图像帧的数量为Q。
S201:获取初始图像帧之后的第M帧图像,并定位该第M帧图像中的手部图像,1≤M≤Q。
此时,上述第M帧图像为上述显示控件21时采集的图像帧流中获取任意一帧。
图13示例性示出了电子设备100获取的初始图像帧S0及其之后的多帧图像。如图13所示,S0为初始图像帧,S1、S2、S3为电子设备100获取的S0之后的3帧图像,即上述S1、S2、S3为上述显示控件21时采集的图像帧流中任意3帧图像。上述任意3帧图像可以是相邻的。例如,上述S1、S2、S3可以分别为初始图像帧S0之后的上述显示控件21 时采集的图像帧流中的第1帧图像、第2帧图像、第3帧图像。
首先,电子设备100可获取初始图像帧S0之后的第1帧图像,即S1。在获取到S1之后,电子设备100可定位S1中的手部图像。如图13所示,电子设备100可定位到S1中的手部图像84。其中,电子设备100定位S1中手部图像的方法,可参考S101中图9A或图9B所示的方法,这里不再赘述。
可选的,上述S1、S2、S3也可以是间隔的。例如,上述S1、S2、S3还可以为上述显示控件21时采集的图像帧流中的第R1帧图像、第R2帧图像、第R3帧图像,其中R1<R2<R3。上述R1、R2、R3之间间隔的图像帧的数量可以相等也可以不等。即电子设备100可按固定间隔地或非固定间隔地从初始图像帧之后的Q帧图像中抽取S帧图像。然后,电子设备100可利用上述S帧图像和初始图像帧确定用户是否做出翻手手势。例如,电子设备100可以在识别到初始图像帧S0之后,每间隔4帧获取一帧图像。这时,上述S1、S2、S3可以为S0之后的第5帧、第10帧、第15帧。
结合前述实施例的介绍,在一些实施例中,电子设备100可将显示控件21之后采集的第一帧图像,或者显示控件21之后开始计时的后采集的第一帧图像作为新的初始图像帧。
这时,S201中第M帧图像为上述显示控件21之后采集的Q帧图像,或者显示控件21之后开始计时的后采集的Q帧图像中的第2帧~第Q帧。
此外,在一些实施例中,电子设备100可将控件21显示结束之后一段时间内的图像帧流作为识别用户手势的图像帧。这时,上述第M帧图像为上述控件21显示结束之后一段时间内的图像帧流中任意一帧。
S202:确定第M帧图像与初始图像帧中手势的交并比(Intersection over Union,IoU),判断IoU≥0.6是否成立。
用户在完成翻手手势时,用户的手的位置变化是较小的。例如,当用户伸出手掌开始完成翻手手势时手的位置为:与头部水平且距离头部15cm时,用户完成翻手手势后,手的位置也基本在与头部水平且距离头部15cm的位置,即不会出现较大幅度的位置变化。上述位置为手势图像与人脸图像的相对位置。
基于上述规则,若第M帧图像中用户手的位置相比于初始图像帧中用户手的位置出现了较大的变化,那么这时,用户完成的手势更可能是滑动、挥手等位置变化幅度大的手势。因此,电子设备100可确认上述第M帧图像与初始图像帧所包含的图像内容不是翻手手势。
于是,在利用图像帧中表征手的状态的手势向量识别用户是否做出翻手手势之前,电子设备100可通过两帧图像中手势图像在图像帧中位置的交并比IoU,判断这两帧图像中手势的位置是否符合翻手手势的小幅度位置变化的特点。交并比IoU可用于表示两图像区域之间重叠的区域的比例。IoU越大,则两图像区域之间重叠的区域的面积越多,反之,IoU越小,则两图像区域之间重叠的区域的面积越小。
两帧图像中手势图像在图像帧中位置的IoU的计算公式如下:
IoU=手势交集/手势并集
上述手势交集是指:两帧图像中的手在各图像帧中所在区域的交集。上述手势并集是指:两帧图像中的手在各图像帧中所在区域的并集。
例如,在电子设备100确定第1帧图像(S1)中的手部图像84后,电子设备100可确定手部图像84在S1中所占区域的大小及位置与手部图像83在S0中所占区域的大小及位置的IoU。
图14示例性示出了电子设备100确定S1与S0中手势IoU的示意图。如图14所示,手部图像83所对应的虚线框所覆盖的图像区域可称为手部图像83在S0中的所在区域;手部图像84所对应的虚线框所覆盖的图像区域可称为手部图像84在S1中的所在区域。
此时,S1与S0的手势交集为图像帧SX中区域83和区域84的交集,即深灰色矩形表示的区域,记为A1;S1与S0中手势并集为图像帧SX中区域83和区域84的并集,即浅灰色区域与深灰色矩形的和,记为A2。上述图像帧SX为虚拟的。
进而,S1与S0中手势图像在图像帧中位置的IoU[S1&S0]为:
IoU[S1&S0]=A1/A2
两图像帧的IoU越接近1,则两图像帧中手势图像在上述两图像帧中的位置越相近。特别的,当IoU=1时,两图像帧中手势图像在上述两图像帧中的位置相同。反之,两图像帧的IoU越接近0,则两图像帧中手势图像在上述两图像帧中的位置重合的范围越少,即两图像帧中手的位置变化的幅度较大。
因此,在确定两图像帧中手势图像在图像帧中位置的IoU之后,电子设备100可判断上述IoU是否满足预设的IoU阈值。在本申请实施例中,IoU阈值为0.6。在其他实施例中,IoU阈值也可以为0.7、0.8等等,本申请实施例对此不做限制。
以IoU阈值为0.6为例,当IoU[S1&S0]<0.6时,即IoU[S1&S0]≥0.6不成立,电子设备100可确认S1和S0手势的位置变化幅度较大,不符合翻手手势的特征。于是,S203:电子设备100确定用户做出其他手势。上述其他手势例如滑动、挥手等手势。
可以理解的,在确定用户做出其他手势之前,电子设备100还会进行匹配上述其他手势计算。本申请实施例对于识别其他手势的过程不再赘述。当然,在匹配其他手势的过程中,电子设备100也可无法匹配到其他任意一个手势,这时,电子设备100可继续获取S1之后的图像帧,例如S2、S3等,然后,电子设备100可重新定位新的图像帧中的手势,计算新的图像帧中的手势与初始图像帧中的手势的IoU。
反之,当IoU[S1&S0]≥0.6成立时,电子设备100可确认第M帧图像中手势与初始图像帧中手势的位置靠近。这时,电子设备100可确认S1和S0手势的位置是否符合翻手手势的小幅度位置变化的特点。进一步的,电子设备100可识别S1中手势的骨骼点,并确定S1中表征手的状态的手势向量。
在确定第M帧图像中表征手的状态的手势向量之前,计算第M帧图像与初始图像帧中手势的交并比可以快速的筛选掉明显不符合翻手手势特征的图像帧,避免冗余计算,提升计算效率。
S204:识别第M帧图像中手势骨骼点。
在确定第M帧图像与初始图像帧的手势IoU满足IoU阈值的要求后,电子设备100可利用骨骼点检测算法识别第M帧图像中手势的骨骼点。上述利用骨骼点检测算法识别第M帧图像中手势的骨骼点的具体过程可参考S101中图10的介绍,这里不再赘述。
同样的,电子设备100可从识别到的第M帧图像中的手势骨骼点中确定出两个手势特征点。这里,电子设备100从第M帧图像中的骨骼点中确定出的两个手势特征点应与原始图像帧中的两个手势特征点对应。例如,若原始图像帧中的两个手势特征点为大拇指顶端骨骼点(n1)和小拇指顶端骨骼点(n18),则电子设备100也应当确定第M帧图像中的大拇指顶端骨骼点(n1)和小拇指顶端骨骼点(n18)为手势特征点,进而使用上述n1和n18构建第M帧图像中表征手的状态的手势向量offset[M]。
S205:确定第M帧图像中表征手的状态的手势向量offset[M]。
在确定第M帧图像的手势特征点之后,电子设备100可确定上述手势特征点在X轴上的位置。参考图11中确定初始图像帧中表征手的状态的手势向量offset[0]的方法,利用上述第M帧图像的手势特征点的位置,电子设备100可确定第M帧图像中手势的手势向量offset[M]。
以初始图像帧S0之后的第1帧图像S1为例,如图15所示,对S1进行骨骼点检测,电子设备可识别到S1中手势的骨骼点n1~n21,同时,电子设备100可确定上述各个骨骼点在X轴上的位置。图15中仅示出了基于手势骨骼点确定的手势特征点n1和n18,及手势特征点n1和n18在X轴上的位置X1[1]和X1[18]。
此时,电子设备100可根据上述X1[1]和X1[18],确定S1中手势的手势向量Offset[1]:
Offset[1]=X1[18]-X1[1]
如图15所示,此时,Offset[1]>0,Offset[1]的方向为X轴的正方向。
S206:判断offset[M]*offset[0]≥0是否成立。
在确定第M帧图像中表征手的状态的手势向量offset[M]之后,电子设备100可利用上述offset[M]与初始图像帧的手势向量offset[0]判断用户是否做出了翻手手势。
具体的,电子设备100可计算第M帧图像的手势向量offset[M]和初始图像帧的手势向量offset[0]的乘积:offset[M]*offset[0]。
offset[M]*offset[0]≥0可表示offset[M]≥0、offset[0]≥0,或offset[M]≤0、offset[0]≤0。当offset[M]≥0、offset[0]≥0时,第M帧图像的手势向量指示的方向为X轴正方向,初始图像帧的手势向量指示的方向也为X轴正方向。当offset[M]≤0、offset[0]≤0时,第M帧图像的手势向量指示的方向为X轴负方向,初始图像帧的手势向量指示的方向也为X轴负方向。
无论是offset[M]≥0、offset[0]≥0,或offset[M]≤0、offset[0]≤0,第M帧图像中手的状态与初始图像帧相同,同为手掌面对摄像头的状态,或同为手背面对摄像头的状态。这不符合翻手手势特征(手的状态发生变化)。此时,电子设备100识别到的初始图像帧与第M帧图像构成的手势不是翻手手势。
offset[M]*offset[0]<0可表示offset[M]<0、offset[0]>0,或offset[M]>0、offset[0]<0。当offset[M]<0、offset[0]>0时,第M帧图像的手势向量指示的方向为X轴负方向,初始图像帧的手势向量指示的方向为X轴正方向。当offset[M]>0、offset[0]<0时,第M帧图像的手势向量指示的方向为X轴正方向,初始图像帧的手势向量指示的方向为X轴负方向。
无论是offset[M]<0、offset[0]>0,或offset[M]>0、offset[0]<0,第M帧图像中手的状态与初始图像帧不同。具体的,第M帧图像与初始图像帧中手的状态相反,这符合翻手手势特征。此时,电子设备100可确认识别到翻手手势。
因此,在判断offset[M]*offset[0]≥0是否成立时,若offset[M]*offset[0]≥0成立,则电子设备100可确认未能识别翻手手势。反之,若offset[M]*offset[0]≥0不成立,则电子设备100可确认识别翻手手势。
以图15中S1的手势向量Offset[1]为例,在确定Offset[1]之后,电子设备100可计算Offset[1]与初始图像帧S0的手势向量offset[0]的乘积:offset[1]*offset[0]。此时,offset[0]>0,offset[1]>0,因此,offset[1]*offset[0]≥0成立。于是,电子设备100可确认未能识别翻手手势。
从图15中S0、S1示出的图像也可以看出:S0中手掌面对电子设备100的摄像头;S1中手掌仍然面对电子设备100的摄像头。S0和S1指示的手势未体现翻转动作,即非翻手手势。
S207:判断M<Q是否成立。
当电子设备100无法通过初始图像帧和第M帧图像识别到用户做出翻手手势时,电子设备100可继续获取第M帧图像之后的图像帧,例如第M+1帧图像、第M+2帧图像等等,确定第M帧图像之后的图像帧的手势向量(offset[M+1]、offset[M+2]等)与初始图像帧的手势向量offset[0]的乘积是否大于等于0。
结合图15,在确认offset[1]*offset[0]≥0成立后,即未能识别翻手手势后,电子设备100可获取S1之后的图像帧,例如S2、S3等。然后,电子设备100可重复上述S201~S206的处理方法,确定S2、S3等图像帧的手势向量(offset[2]、offset[3]),继续识别用户是否做出翻手手势。
结合预设的完成手势的最长时间,即初始图像帧之后可用于识别翻手手势的图像帧的帧数Q,在获取第M帧图像之后的图像帧之前,电子设备100需要判断当前第M帧图像是否为可用于识别翻手手势的图像帧中的最后一帧图像,即M<Q。
若M=Q,即第M帧图像为最后一帧图像,且电子设备100当前还未识别到翻手手势,则电子设备100不再继续获取第M帧图像之后的图像帧,即确认识别超时、停止识别。若M<Q,即第M帧图像不是最后一帧图像,且电子设备100当前还未识别到翻手手势,此时,电子设备100还可获取第M帧图像之后的图像帧,继续是否用户是否做出翻手手势。
以Q=90为例,在确认offset[M]*offset[0]≥0成立后,电子设备100需要确认M是否小于90。若M≥90,即M<90不成立,则在预设的时间范围内的90帧图像中,电子设备100都未能识别到翻手手势。这时,电子设备100确认超时,且不会再继续识别。反之,若M<90成立,则电子设备100当前未能识别到翻手手势,但是,电子设备100还可获取第M帧之后的图像帧,继续识别用户是否做出翻手手势。
结合图15,在利用S1和S0无法识别到翻手手势时,电子设备100可获取S0之后的第2帧图像,即S2。此时,S2=2<90,即S2不是最后一帧图像。于是,电子设备100可按照S201~S205所示的处理方法,确定S2的手势向量Offset[2]。如图15所示,此时, Offset[2]<0。于是,offset[2]*offset[0]≥0不成立。这时,电子设备100可确认识别到翻手手势。
若上述S1为初始图像帧之后的第90帧图像,且offset[1]*offset[0]≥0,此时,电子设备100可确认超时。电子设备100可停止识别。然后,电子设备100可获取上述图像帧之后的新的一系列图像帧,识别上述新的一系列图像帧中是否有符合翻手手势特征的初始图像帧。在确定新的初始图像帧之后,电子设备100可重新确定用于识别翻手手势的图像帧序列,进而重新识别用户是否做出翻手手势。
在一些实施例中,电子设备100也可设置第M帧图像的手势向量Offset最小阈值L。在确认手势向量指示的方向变化后,即offset[M]*offset[0]≥0不成立后,电子设备100还可进一步检测offset[M]是否满足上述最小阈值。当offset[M]同时满足最小阈值的要求时,电子设备100才确认识别到翻手手势。
例如,假设手势向量Offset最小阈值为20,记为L=20、Offset[2]=18,在确定Offset[2]<0后,电子设备100可以基于上述Offset[2]<0确定offset[2]*offset[0]≥0不成立,即第M帧图像与初始图像帧中手的状态发生了变化。这时,电子设备100还会进一步确定offset[2]≥L是否成立。若offset[2]≥L成立,则电子设备100确认识别到翻手手势,反之,电子设备100确认未识别到翻手手势。
此时,Offset[2]=18<L,即offset[2]≥L成立不成立。于是,电子设备100可确认未识别到翻手手势。
这时,电子设备100可继续获取S0之后的第3帧图像,即S3。同样的,此时,S3=3<90,即S3不是最后一帧图像。于是,电子设备100可按照S201~S205所示的处理方法,确定S3的手势向量Offset[3]。如图15所示,此时,Offset[3]<0。于是,offset[3]*offset[0]≥0不成立。假设此时Offset[3]=28,即Offset[3]≥L成立,于是,电子设备100可确认识别到翻手手势。
这样,电子设备100可以对翻手手势中手掌翻转的角度进行限制,从而避免将用户无意做出的晃手动作识别为翻手手势,进而提升手势识别的准确度。
可以理解的,在前述S101介绍的确定初始图像帧的过程中,电子设备100在确定识别到包含手(手掌或手背)的图像帧之后,在计算该图像帧的手势向量offset[0]时,电子设备100可也对offset[0]的长度进行限定,从而避免将任意带有手的图像帧确定为初始图像帧、增加电子设备100的计算成本。
在本申请实施例中,图3C所示的界面可称为第一界面;图3C中预览窗可称为第一预览窗;图1所示的翻手手势可称为第一手势;图3D所示的界面可称为第二界面;图3D中预览窗第二预览窗。或者,图3A所示的界面可称为第一界面;图3A中预览窗101可称为第一预览窗、预览窗102可称为第三预览窗;图3B所示的界面可称为第三界面。
图13中S0中的手部图像83可称为第一手部图像;S1中的手部图像84可称为第二手部图像;参考图15,S0中offset[0]可称为第一手势向量;S1中offset[1]可称为第二手势向量;S2中offset[2]可称为第二手势向量;S3中offset[3]可称为第二手势向量。S0中offset[0] 的方向可称为第一方向信息;S1中offset[1]的方向可称为第二方向信息;S2中offset[2]的方向可称为第二方向信息;S3中offset[3]的方向可称为第二方向信息。
X轴可称为第一坐标轴。
X0[1]可称为第一坐标;X0[18]可称为第二坐标;X1[1]可称为第三坐标;X1[18]可称为第四坐标;X2[1]可称为第三坐标;X2[18]可称为第四坐标;X3[1]可称为第三坐标;X3[18]可称为第四坐标。
图14中手部图像84可称为第二手部图像的所在区域;图14中手部图像83可称为第一手部图像所在区域;图9B中人脸图像81所在区域可称为第二图像中人脸的所在区域;图9B中人体图像82所在的区域可称为第一区域。
图12中IoU阈值0.6可称为第一阈值;S207中手势向量offset的最小阈值可称为第二阈值。
图2A中控件115可称为第一控件。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。图16示例性示出了电子设备100的软件架构图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。如图11所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
本申请实施例提供的利用运动轨迹识别用户挥手或滑动手势的方法,可在相机应用中实施。图2A-图2B、图3A-图3F、图4A-图4F、图5A-图5F以及图6A-图6B所示的用户界面可以为相机应用提供的应用界面。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图11所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。在本申请实施例中,电子设备100显示图2A-图2B、图3A-图3F、图4A-图4F、图5A-图5F以及图6A-图6B所示的用户界面依赖于窗口管理器。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。在本申请实施例中,摄像头采集后生成的视频数据、音频数据等数据可缓存在内容提供器中。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。在本申请实施例中,视图系统可包括图2A-图2B、图3A-图3F、图4A-图4F、图5A-图5F以及图6A-图6B所示的用户界面中的各个控件,视图系统还记录有包括上述各个控件、图形等界面元素的布局。利用上述 控件、图形资源以及控件、图形的布局资源,电子设备100可显示图2A-图2B、图3A-图3F、图4A-图4F、图5A-图5F以及图6A-图6B所示的用户界面。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。在运行相机应用时,资源管理器可以为相机应用提供视频、音频、相机应用的布局文件等等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。应用程序层和应用程序框架层运行在虚拟机中。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。电子设备100显示图2A-图2B、图3A-图3F、图4A-图4F、图5A-图5F以及图6A-图6B所示的用户界面依赖于表面管理器提供了2D和3D图层的融合能力。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。在本申请实施例中,在使用双景模式拍摄视频时,电子设备100可利用媒体库提供的音视频编码能力编码并保存视频。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。2D图形引擎是2D绘图的绘图引擎。电子设备100调用窗口管理器、视图系统等框架层接口实现显示图2A-图2B、图3A-图3F、图4A-图4F、图5A-图5F以及图6A-图6B等用户界面的功能,依赖于三维图形处理库、2D图形引擎是提供的图绘制和渲染服务。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
显示驱动可用于驱动显示屏显示资源管理器提供的相机应用的布局文件、视频、控件等,从而显示图2A-图2B、图3A-图3F、图4A-图4F、图5A-图5F以及图6A-图6B所示的相机应用的用户界面。摄像头驱动可用于驱动摄像头采集图像,将光信号转变为电信号,从而生成图像及视频流。
图17示例性示出了电子设备100的硬件架构图。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD)。显示面板还可以采用有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),miniled,microled,micro-oled,量子点发光二极管(quantum dot light emitting diodes,QLED)等制造。在一些实施例中,电子设备可以包括1个或N个显示屏194,N为大于1的正整数。
在本申请实施例中,电子设备100显示图2A-图2B、图3A-图3F、图4A-图4F、图5A-图5F以及图6A-图6B所示的用户界面依赖于GPU,显示屏194,以及应用处理器等提供的显示功能。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍摄时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193 中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(movingpictureexpertsgroup,MPEG)1,MPEG2,MPEG3,MPEG4等。
在本申请实施例中,电子设备100在图2A-图2B、图3A-图3F、图4A-图4F、图5A-图5F以及图6A-图6B所示的用户界面中显示摄像头采集的图像、生成视频的过程,依赖于上述ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器提供的拍摄能力。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
在本申请实施例中,电子设备100可利用触摸传感器180K提供的触控检测,确定是否检测到作用于图2A中控件111、控件112等控件的用户操作。
本申请的说明书和权利要求书及附图中的术语“用户界面(user interface,UI)”,是应用程序或操作系统与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。应用程序的用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在终端设备上经过解析,渲染,最终呈现为用户可以识别的内容,比如图片、文字、按钮等控件。控件(control)也称为部件(widget),是用户界面的基本元素,典型的控件有工具栏(toolbar)、菜单栏(menubar)、文本框(text box)、按钮(button)、滚动条(scrollbar)、图片和文本。界面中的控件的属性和内容是通过标签或者节点来定义的,比如XML通过<Textview>、<ImgView>、<VideoView>等节点来规定界面所包含的控件。一个节点对应界面中一个控件或属性,节点经过解析和渲染之后呈现为用户可视的内容。此外,很多应用程序,比如混合应用(hybrid application)的界面中通常还包含有网页。网页,也称为页面,可以理解为内嵌在应用程序界面中的一个特殊的控件,网页是通过特定计算机语言 编写的源代码,例如超文本标记语言(hyper text markup language,GTML),层叠样式表(cascading style sheets,CSS),java脚本(JavaScript,JS)等,网页源代码可以由浏览器或与浏览器功能类似的网页显示组件加载和显示为用户可识别的内容。网页所包含的具体内容也是通过网页源代码中的标签或者节点来定义的,比如GTML通过<p>、<img>、<video>、<canvas>来定义网页的元素和属性。
用户界面常用的表现形式是图形用户界面(graphic user interface,GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的一个图标、窗口、控件等界面元素,其中控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。
在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。
Claims (19)
- 一种拍摄方法,应用于电子设备,所述电子设备包括第一摄像头和第二摄像头,其特征在于,所述方法包括:显示第一界面,所述第一界面包括第一预览窗,所述第一预览窗显示所述第一摄像头实时采集的图像;检测到用户的第一手势;响应于所述第一手势,显示第二界面,所述第二界面包括第二预览窗,所述第二预览窗显示所述第二摄像头实时采集的图像;其中,所述检测到用户的第一手势,包括:采集第一图像,所述第一图像为第一摄像头或第二摄像头所采集的图像,所述第一图像包括第一手部图像;确定第一手势向量,所述第一手势向量是基于所述第一手部图像确定的;采集第二图像,所述第二图像为第一摄像头或第二摄像头所采集的图像,所述第二图像包括所述第二手部图像;确定第二手势向量,所述第二手势向量是基于所述第二手部图像确定的;基于所述第一手势向量和所述第二手势向量,确定第一手势。
- 根据权利要求1所述的方法,其特征在于,所述第一手势向量包括第一方向信息,所述第二手势向量包括第二方向信息,所述第一方向信息和所述第二方向信息均用于标识手部状态,所述基于所述第一手势向量和所述第二手势向量,确定第一手势,包括:基于所述第一方向信息和所述第二方向信息,确定所述第一手势。
- 根据权利要求2所述的方法,其特征在于,所述基于所述第一方向信息和所述第二方向信息,确定所述第一手势,包括:当所述第一方向信息和所述第二方向信息不同时,确定所述第一手势为翻手手势。
- 根据权利要求1所述的方法,其特征在于,所述第一界面还包括第三预览窗,所述第三预览窗显示所述第二摄像头实时采集的图像;响应于所述第一手势,显示第三界面,所述第三界面中所述第一预览窗显示所述第二摄像头实时采集的图像,所述第三预览窗显示所述第一摄像头实时采集的图像。
- 根据权利要求1-3中任一项所述的方法,其特征在于,所述确定第一手势向量,具体包括:识别所述第一手部图像中的第一特征点和第二特征点;根据所述第一特征点和所述第二特征点在第一坐标轴上的位置,确定所述第一手势向量,其中,所述第一坐标轴与地面平行;所述确定第二手势向量,具体包括:识别所述第二手部图像中的第一特征点和第二特征点;根据所述第一特征点和所述第二特征点在第一坐标轴上的位置,确定所述第二手势向量。
- 根据权利要求5所述的方法,其特征在于:所述第一手势向量的第一方向信息,为第一坐标指向第二坐标的方向,第一坐标为所述第一手部图像中所述第一特征点在所述第一坐标轴上的投影点,第二坐标为所述第一手部图像中所述第二特征点在所述第一坐标轴上的投影点;所述第二手势向量的第二方向信息,为第三坐标指向第四坐标的方向,第三坐标为所述第二手部图像中所述第一特征点在所述第一坐标轴上的投影点,第四坐标为所述第二手部图像中所述第二特征点在所述第一坐标轴上的投影点。
- 根据权利要求5所述的方法,其特征在于,所述识别所述第一手部图像中的第一特征点和第二特征点,具体包括:识别所述第一手部图像中所述手掌的第一数量的骨骼点;基于所述第一数量的骨骼点确定所述第一特征点和第二特征点;所述第一特征点和第二特征点分别位于所述第一手部图像中所述手掌的中轴线的两侧。
- 根据权利要求7所述的方法,其特征在于,所述基于所述第一数量的骨骼点确定所述第一特征点和第二特征点,包括:从所述第一数量的骨骼点中选择两个的骨骼点作为所述第一特征点和第二特征点;或者,从所述第一数量的骨骼点中选择多个骨骼点,利用所述多个骨骼点计算得到所述第一特征点和第二特征点。
- 根据权利要求7或8所述的方法,其特征在于,所述第一特征点为大拇指顶端的骨骼点;所述第二特征点为小指顶端的骨骼点。
- 根据权利要求1所述的方法,其特征在于,所述确定第二手势向量之前,所述方法还包括:识别所述第二图像中所述第二手部图像的所在区域;确定所述第二图像中所述第二手部图像与所述第一图像中所述第一手部图像所在区域的交并比IoU;所述确定第二手势向量,包括:当所述IoU满足第一阈值时,确定所述第二图像中所述第二手部图像的第二手势向量。
- 根据权利要求10所述的方法,其特征在于,所述确定所述第二图像与所述第一图像中手的所在区域的交并比IoU,包括:确定所述第二图像中所述第二手部图像与所述第一图像中所述第一手部图像所在区域的交集和并集;所述IoU为所述交集比所述并集。
- 根据权利要求10所述的方法,其特征在于,所述识别所述第二图像中所述第二手部图像的所在区域,包括:确定所述第二图像中人脸的所在区域;基于所述人脸的所在区域确定第一区域,所述第一区域包括且大于所述人脸的所在区域,所述第一区域小于所述第二图像;识别所述第一区域中手的所在区域,确定所述手的所在区域为所述第二手部图像的所在区域。
- 根据权利要求3所述的方法,其特征在于,所述方法还包括:确定所述第二手势向量的长度满足第二阈值;所述当所述第一方向信息和所述第二方向信息不同时,确定所述第一手势为翻手手势,包括:当所述第一方向信息和所述第二方向信息不同时,且所述第二手势向量的长度满足第二阈值时,确定所述第一手势为翻手手势。
- 根据权利要求1所述的方法,其特征在于,在检测到用户的第一手势之前,所述方法还包括:检测到第一操作;响应于所述第一操作,开始拍摄。
- 根据权利要求14所述的方法,其特征在于,所述第一操作包括:作用于第一控件的操作,所述第一控件显示在所述第一界面上;或者,识别到用户做出第二手势的操作,所述第二手势与所述第一控件对应。
- 根据权利要求15所述的方法,其特征在于,所述第一摄像头为前置摄像头,所述第二摄像头为后置摄像头;或者,所述第一摄像头为前置摄像头,所述第二摄像头为前置摄像头;或者,所述第一摄像头为后置摄像头,所述第二摄像头为后置摄像头。
- 一种电子设备,其特征在于,包括一个或多个处理器和一个或多个存储器;其中,所述一个或多个存储器与所述一个或多个处理器耦合,所述一个或多个存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,使得执行如权利要求1-16任一项所述的方法。
- 一种包含指令的计算机程序产品,当计算机程序产品在电子设备上运行时,使得电 子设备执行如权利要求1-16任一项所述的方法。
- 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得执行如权利要求1-16任一项所述的方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP22879596.9A EP4216563A4 (en) | 2021-11-25 | 2022-08-26 | PHOTOGRAPHIC METHOD AND ELECTRONIC DEVICE |
US18/033,680 US20240187725A1 (en) | 2021-11-25 | 2022-08-26 | Photographing method and electronic device |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111417773 | 2021-11-25 | ||
CN202111417773.6 | 2021-11-25 | ||
CN202111460029.4 | 2021-12-01 | ||
CN202111460029.4A CN115643485B (zh) | 2021-11-25 | 2021-12-01 | 拍摄的方法和电子设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023093169A1 true WO2023093169A1 (zh) | 2023-06-01 |
Family
ID=84940228
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/115160 WO2023093169A1 (zh) | 2021-11-25 | 2022-08-26 | 拍摄的方法和电子设备 |
Country Status (4)
Country | Link |
---|---|
US (1) | US20240187725A1 (zh) |
EP (1) | EP4216563A4 (zh) |
CN (1) | CN115643485B (zh) |
WO (1) | WO2023093169A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116193243B (zh) * | 2021-11-25 | 2024-03-22 | 荣耀终端有限公司 | 拍摄方法和电子设备 |
CN117130469B (zh) * | 2023-02-27 | 2024-08-09 | 荣耀终端有限公司 | 一种隔空手势识别方法、电子设备及芯片系统 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150334293A1 (en) * | 2014-05-16 | 2015-11-19 | Lg Electronics Inc. | Mobile terminal and controlling method thereof |
CN107885446A (zh) * | 2016-09-29 | 2018-04-06 | 法乐第(北京)网络科技有限公司 | 一种切换显示图像的方法及装置 |
WO2019208915A1 (ko) * | 2018-04-25 | 2019-10-31 | 삼성전자 주식회사 | 외부 장치의 자세 조정을 통해 복수의 카메라들을 이용하여 이미지를 획득하는 전자 장치 및 방법 |
CN112364799A (zh) * | 2020-11-18 | 2021-02-12 | 展讯通信(上海)有限公司 | 一种手势识别方法及装置 |
CN113596316A (zh) * | 2020-04-30 | 2021-11-02 | 华为技术有限公司 | 拍照方法、图形用户界面及电子设备 |
CN114257737A (zh) * | 2021-11-29 | 2022-03-29 | 荣耀终端有限公司 | 一种摄像模式切换方法以及相关设备 |
Family Cites Families (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120281129A1 (en) * | 2011-05-06 | 2012-11-08 | Nokia Corporation | Camera control |
CN103257811A (zh) * | 2012-02-20 | 2013-08-21 | 腾讯科技(深圳)有限公司 | 基于触摸屏的图片显示系统和方法 |
KR101330810B1 (ko) * | 2012-02-24 | 2013-11-18 | 주식회사 팬택 | 원거리 제스쳐 인식 기능을 갖는 디바이스 및 그 방법 |
US10057483B2 (en) * | 2014-02-12 | 2018-08-21 | Lg Electronics Inc. | Mobile terminal and method thereof |
KR101563298B1 (ko) * | 2014-07-23 | 2015-10-26 | 동서대학교산학협력단 | 수부 모션인식 기반의 수부 재활치료 시스템 |
US10636156B2 (en) * | 2016-09-12 | 2020-04-28 | Deepixel Inc. | Apparatus and method for analyzing three-dimensional information of image based on single camera and computer-readable medium storing program for analyzing three-dimensional information of image |
CN106990841A (zh) * | 2017-03-30 | 2017-07-28 | 无锡云瞳信息科技有限公司 | 基于运动传感器的手势识别方法及智能可穿戴摄像机 |
CN107589850A (zh) * | 2017-09-26 | 2018-01-16 | 深圳睛灵科技有限公司 | 一种手势移动方向的识别方法及系统 |
US11294472B2 (en) * | 2019-01-11 | 2022-04-05 | Microsoft Technology Licensing, Llc | Augmented two-stage hand gesture input |
JP7295046B2 (ja) * | 2019-01-23 | 2023-06-20 | 株式会社ミツバ | 装置操作システムおよび装置制御方法 |
CN109696963A (zh) * | 2019-01-23 | 2019-04-30 | 深圳大学 | 手语翻译系统、手语翻译手套及手语翻译方法 |
CN110458059B (zh) * | 2019-07-30 | 2022-02-08 | 北京科技大学 | 一种基于计算机视觉的手势识别方法及识别装置 |
CN110798615A (zh) * | 2019-10-14 | 2020-02-14 | 深圳酷派技术有限公司 | 一种拍摄方法、装置、存储介质以及终端 |
CN110765974B (zh) * | 2019-10-31 | 2023-05-02 | 复旦大学 | 基于毫米波雷达和卷积神经网络的微动手势识别方法 |
CN110956124A (zh) * | 2019-11-27 | 2020-04-03 | 云南电网有限责任公司电力科学研究院 | 一种基于手势的显示设备控制方法和显示设备 |
CN111738053B (zh) * | 2020-04-15 | 2022-04-01 | 上海摩象网络科技有限公司 | 一种跟踪对象确定方法、设备和手持相机 |
CN112527107B (zh) * | 2020-11-30 | 2023-04-07 | 京东方科技集团股份有限公司 | 手势识别方法、装置、电子设备及存储介质 |
-
2021
- 2021-12-01 CN CN202111460029.4A patent/CN115643485B/zh active Active
-
2022
- 2022-08-26 WO PCT/CN2022/115160 patent/WO2023093169A1/zh active Application Filing
- 2022-08-26 EP EP22879596.9A patent/EP4216563A4/en active Pending
- 2022-08-26 US US18/033,680 patent/US20240187725A1/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150334293A1 (en) * | 2014-05-16 | 2015-11-19 | Lg Electronics Inc. | Mobile terminal and controlling method thereof |
CN107885446A (zh) * | 2016-09-29 | 2018-04-06 | 法乐第(北京)网络科技有限公司 | 一种切换显示图像的方法及装置 |
WO2019208915A1 (ko) * | 2018-04-25 | 2019-10-31 | 삼성전자 주식회사 | 외부 장치의 자세 조정을 통해 복수의 카메라들을 이용하여 이미지를 획득하는 전자 장치 및 방법 |
CN113596316A (zh) * | 2020-04-30 | 2021-11-02 | 华为技术有限公司 | 拍照方法、图形用户界面及电子设备 |
CN112364799A (zh) * | 2020-11-18 | 2021-02-12 | 展讯通信(上海)有限公司 | 一种手势识别方法及装置 |
CN114257737A (zh) * | 2021-11-29 | 2022-03-29 | 荣耀终端有限公司 | 一种摄像模式切换方法以及相关设备 |
Non-Patent Citations (1)
Title |
---|
See also references of EP4216563A4 |
Also Published As
Publication number | Publication date |
---|---|
EP4216563A1 (en) | 2023-07-26 |
US20240187725A1 (en) | 2024-06-06 |
CN115643485B (zh) | 2023-10-24 |
EP4216563A4 (en) | 2024-05-15 |
CN115643485A (zh) | 2023-01-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021147482A1 (zh) | 一种长焦拍摄的方法及电子设备 | |
WO2021027725A1 (zh) | 显示页面元素的方法和电子设备 | |
WO2021244295A1 (zh) | 拍摄视频的方法和装置 | |
CN113805745B (zh) | 一种悬浮窗的控制方法及电子设备 | |
WO2023093169A1 (zh) | 拍摄的方法和电子设备 | |
US20230043815A1 (en) | Image Processing Method and Electronic Device | |
CN110830645B (zh) | 一种操作方法和电子设备及计算机存储介质 | |
CN113099146A (zh) | 一种视频生成方法、装置及相关设备 | |
US20230224574A1 (en) | Photographing method and apparatus | |
WO2022262550A1 (zh) | 一种拍摄视频的方法及电子设备 | |
WO2024179101A1 (zh) | 一种拍摄方法 | |
CN115480629A (zh) | 一种多界面显示的方法和电子设备 | |
EP4262226A1 (en) | Photographing method and related device | |
WO2022262549A1 (zh) | 一种拍摄视频的方法及电子设备 | |
WO2023029565A1 (zh) | 一种触控采样率调节方法及相关装置 | |
WO2023093167A1 (zh) | 拍摄方法和电子设备 | |
WO2023072113A1 (zh) | 显示方法及电子设备 | |
WO2023035868A1 (zh) | 拍摄方法及电子设备 | |
EP4258649A1 (en) | Method for determining tracking target, and electronic device | |
WO2022262547A1 (zh) | 一种拍摄视频的方法及电子设备 | |
WO2024149088A1 (zh) | 一种截图方法 | |
WO2023078133A1 (zh) | 视频播放方法和装置 | |
WO2024012354A1 (zh) | 一种显示方法及电子设备 | |
WO2023231696A1 (zh) | 一种拍摄方法及相关设备 | |
CN116071523A (zh) | 显示方法及电子设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WWE | Wipo information: entry into national phase |
Ref document number: 18033680 Country of ref document: US |
|
ENP | Entry into the national phase |
Ref document number: 2022879596 Country of ref document: EP Effective date: 20230421 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |