US-12627888-B2 - Target user focus tracking photographing method, electronic device, and storage medium
Abstract
In accordance with an embodiment, a method includes: obtaining motion reference information; continuously obtaining image data and performing, based on the image data, target user detection until a target user is determined in a first image frame; determining a first human pose of the target user based on the first image frame; and predicting a second human pose of the target user based on the first human pose and the motion reference information.
Inventors
- Lei Huang
- Chunhui MA
- Jie Zhao
- Jiabing YAN
Assignees
- HUAWEI TECHNOLOGIES CO., LTD.
Dates
- Publication Date
- 20260512
- Application Date
- 20211028
- Priority Date
- 20201109
Claims (16)
- 1 . A method, applied to an electronic device comprising a camera and a display, the method comprising: obtaining motion reference information, wherein the motion reference information comprises a first moment, a second moment, a first standard human pose corresponding to the first moment, and a second standard human pose corresponding to the second moment, wherein the second moment is later than the first moment; obtaining first image data from the camera; determining a first human pose of a target user based on the first image data; determining a target area based on the first human pose and the second standard human pose, when the first human pose matches the first standard human pose; and displaying the target area on the display.
- 2 . The method according to claim 1 , further comprising: before determining the first human pose of the target user, obtaining second image data from the camera; and determining the target user based on the second image data.
- 3 . The method according to claim 2 , wherein determining the target user based on the second image data comprises: determining a second human pose of user based on the second image data; and determining the target user based on the second human pose, when the second human pose matches the first standard human pose.
- 4 . The method according to claim 2 , wherein determining the target user based on the second image data comprises: determining a face image of user based on the second image data; and determining the target user based on the face image, when the face image matches a stored face image.
- 5 . The method according to claim 1 , wherein the motion reference information is determined based on preset video data.
- 6 . The method according to claim 1 , further comprising: displaying a first window and a second window, wherein the first window is used to display an interface that prompts the target user to complete a specified action, and the second window is used for real-time display of a human pose of the target user collected by the camera.
- 7 . The method according to claim 1 , further comprising: obtaining third image data from the camera; determining a third human pose based on the third image data; and adjusting a viewfinder area, when the third human pose matches the second standard human pose, and the adjustment of the viewfinder area is corresponding to the third human pose.
- 8 . The method according to claim 1 , further comprising: displaying a first prompt information when the target area reaches a preset condition, wherein the first prompt information prompts a user to adjust a position.
- 9 . An electronic device, comprising: a camera, configured to obtain first image data; a display; at least one processor, and a memory coupled to the at least one processor with program code stored thereon, wherein when the program code is run on the at least one processor, the electronic device is enabled to: obtain motion reference information, wherein the motion reference information comprises a first moment, a second moment, a first standard human pose corresponding to the first moment, and a second standard human pose corresponding to the second moment, wherein the second moment is later than the first moment; obtain the first image data from the camera; determine a first human pose of a target user based on the first image data; determine a target area based on the first human pose and the second standard human pose, when the first human pose matches the first standard human pose; and display the target area on the display.
- 10 . The electronic device according to claim 9 , wherein when the program code is run on the at least one processor, the electronic device is further enabled to: before determining the first human pose of the target user, obtain second image data from the camera; and determine the target user based on the second image data.
- 11 . The electronic device according to claim 10 , wherein determining the target user based on the second image data comprises: determining a second human pose of user based on the second image data; and determining the target user based on the second human pose, when the second human pose matches the first standard human pose.
- 12 . The electronic device according to claim 10 , wherein determining the target user based on the second image data comprises: determining a face image of user based on the second image data; and determining the target user based on the face image, when the face image matches a stored face image.
- 13 . The electronic device according to claim 9 , wherein the motion reference information is determined based on preset video data.
- 14 . The electronic device according to claim 9 , wherein when the program code is run on the at least one processor, the electronic device is further enabled to: display a first window and a second window, wherein the first window is used to display of an interface that prompts the target user to complete a specified action, and the second window is used for real-time display of a human pose of the target user collected by the camera.
- 15 . The electronic device according to claim 9 , wherein when the program code is run on the at least one processor, the electronic device is further enabled to: obtaining third image data from the camera; determining a third human pose based on the third image data; and adjusting a viewfinder area, when the third human pose matches the second standard human pose, the adjustment of the viewfinder area is corresponding to the third human pose.
- 16 . The electronic device according to claim 9 , further comprising: displaying a first prompt information when the target area reaches a preset condition, wherein the first prompt information prompts the target user to adjust a position.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a National Stage of International Patent Application No. PCT/CN2021/127105, filed on Oct. 28, 2021, which claims priority to Chinese Patent Application No. 202011240237.9, filed on Nov. 9, 2020. Both of the aforementioned applications are hereby incorporated by reference in their entireties. TECHNICAL FIELD This application relates to the field of Internet of Things technologies, and in particular, to a target user focus tracking photographing method, an electronic device, and a storage medium. BACKGROUND In modern society, people have increasingly fast life rhythm, and have more or less physical health problems. How to maintain a good physical condition under fast-paced work becomes an urgent problem to be resolved. At present, using a smart terminal device (a television) to perform smart fitness or somatic game guidance is a good exercise manner. In smart fitness, to ensure that an entire body of a user can be in an ROI viewfinder frame, the smart terminal device usually uses a camera lens with a large FOV (Field Of View, field of view). However, when the user is far away from the camera lens, the camera lens with a large FOV easily causes a small proportion of a frame occupied by the body of the user, resulting in poor viewing and affecting user experience. To resolve the foregoing problem, in the conventional technology, a subject focus tracking technology is used to track a target user in an image obtained through framing, then perform an ROI (Region Of Interest, region of interest) cropping (that is, forming an ROI viewfinder frame by taking a specific margin around the recognized target user on a premise that the ROI viewfinder frame does not exceed the image obtained through framing, and cropping an image area from the ROI viewfinder frame), and zoom in the cropped image area for full-frame display, so as to highlight a subject. In a motion process of the target user, the ROI viewfinder frame also moves or is adjusted accordingly with the target user in a frame area. Therefore, when the target user moves at an excessively high speed, the user may be out of the ROI viewfinder frame or even focus tracking may fail due to a focus tracking delay. When the target user moves at a large amplitude, a problem, for example, shaking of a focus tracking frame, may occur. This affects user experience. SUMMARY Embodiments of this application provide a target user focus tracking photographing method, an electronic device, and a storage medium, so that a target viewfinder area does not greatly shake in a motion process of a user. This improves user experience during focus tracking, and avoids a case in which a target user is out of the target viewfinder area or focus tracking fails due to a focus tracking delay. According to a first aspect, an embodiment of this application provides a target user focus tracking photographing method. The method is applied to an electronic device including a camera and a display, and the method includes: The electronic device obtains motion reference information; after the electronic device enters a preset mode, the electronic device continuously obtains image data, and performs, based on the image data, target user detection frame by frame or in a frame skipping manner until a target user is determined in a Tth frame of image, where T is a natural number greater than or equal to 1;the electronic device determines a first human pose of the target user based on the Tth frame of image, and predicts a second human pose of the target user in a (T+n)th frame of image based on the first human pose and the motion reference information, where n is a natural number greater than or equal to 1;the electronic device determines a target viewfinder area of the Tth frame of image based on the first human pose and the predicted second human pose; and the electronic device displays the target viewfinder area on the display. In the foregoing solution, the electronic device adaptively adjusts a viewfinder window based on an obtained current human pose of the user and a predicted subsequent human pose, to avoid a case in which the user is out of the target viewfinder area or even focus tracking fails due to a focus tracking delay when the user moves at an excessively high speed, and improve user experience. Optionally, that the electronic device continuously obtains image data, and performs, based on the image data, target user detection frame by frame or in a frame skipping manner until a target user is determined in a Tth frame of image includes: The electronic device performs target user detection frame by frame or in the frame skipping manner based on the collected image data by using a human detection algorithm; and when it is determined that one user exists in a frame, the electronic device determines that the user in the frame is the target user; or when it is determined that a plurality of users exist in a frame, the electronic device p