A photographing method, apparatus, terminal and storage medium

CN116320721BActive Publication Date: 2026-09-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310312887.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-29
Publication Date
2026-09-18
Estimated Expiration
2039-08-29

AI Technical Summary

Technical Problem

然而,为获得表现效果较好的自拍照片,往往需要用户不断调整自拍角度和表情,这个过程浪费时间,而且即使用户花时间多次调整,也不一定能得到较好的拍摄结果

Benefits of technology

[0019] During the shooting process, a second marker curve is generated in real time for the current image. The second marker curve is compared with the first marker curve of the target template image. When the second marker curve matches the first marker curve, the shooting process is performed. Since the second marker curve is used to identify the angle of the face in the second face image in the current image, and the first marker curve is used to identify the angle of the face in the first face image in the target template image, performing the shooting process when the second marker curve matches the first marker curve ensures that the angle of the face in the captured photo is similar to or consistent with the angle of the face in the target template image, improving the effect of imitation photography. At the same time, since the target template image is not only used to provide users with a reference for adjusting the face angle during shooting, but also automatically analyzes and matches the face angle, the operation of imitation photography is greatly simplified, the difficulty of imitation photography is reduced, and a better user experience is provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116320721B_ABST
    Figure CN116320721B_ABST
Patent Text Reader

Abstract

The present application relates to the field of photography, and more particularly to a shooting method, device, terminal and storage medium. The method comprises: determining a target template image, the target template image containing a first face image; capturing a current image, the current image containing a second face image; determining a first mark curve pointing to the first face image, the first mark curve being used to identify the angle of the face in the first face image in the target template image; generating a second mark curve according to the second face image and a preset mark curve construction method, the second mark curve being used to identify the angle of the face in the second face image in the current image; and performing shooting processing when the first mark curve and the second mark curve match. The present application simplifies the operation of imitating shooting and improves the effect of imitating shooting, thus providing a good user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of photography technology, and more particularly to a shooting method, apparatus, terminal, and storage medium. Background Technology

[0002] With the development of mobile communication technology and the widespread adoption of smart terminal devices, these devices have become indispensable tools in people's lives. Due to the increased pixel count of front-facing cameras on smart terminal devices and the diversification of social products and platforms, users increasingly enjoy taking selfies and sharing them on social media platforms. During selfies, users typically don't just shoot from the front; they also use multiple angles, such as raising the device to shoot from above or only capturing one side of the face. However, to obtain a good selfie, users often need to constantly adjust the angle and expression, a time-consuming process that doesn't always guarantee a satisfactory result. Summary of the Invention

[0003] This invention provides a shooting method, device, terminal, and storage medium that can improve the convenience of shooting operations and optimize shooting effects.

[0004] On one hand, the present invention provides a shooting method, comprising:

[0005] A target template image is determined, wherein the target template image contains a first face image;

[0006] Capture the current image, which contains a second face image;

[0007] A first marker curve pointing to the first face image is determined, and the first marker curve is used to identify the angle of the face in the first face image in the target template image;

[0008] A second marker curve is generated based on the second face image and a preset marker curve construction method. The second marker curve is used to identify the angle of the face in the second face image in the current image.

[0009] When the first marker curve and the second marker curve match, the image processing is performed.

[0010] On the other hand, the present invention provides a shooting device, comprising:

[0011] A target template image determination module is used to determine a target template image, wherein the target template image includes a first face image;

[0012] The current image acquisition module is used to capture the current image, which includes a second face image;

[0013] The first marker curve determination module is used to determine a first marker curve pointing to the first face image, wherein the first marker curve is used to identify the angle of the face in the first face image in the target template image;

[0014] The second marker curve generation module is used to generate a second marker curve based on the second face image and a preset marker curve construction method. The second marker curve is used to identify the angle of the face in the second face image in the current image.

[0015] The image processing module is used to perform image processing when the first marker curve and the second marker curve match.

[0016] On the other hand, the present invention provides a terminal, the terminal including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the above-described shooting method.

[0017] On the other hand, the present invention provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the above-described shooting method.

[0018] The shooting method, device, terminal, and storage medium provided by this invention have the following beneficial effects:

[0019] During the shooting process, a second marker curve is generated in real time for the current image. The second marker curve is compared with the first marker curve of the target template image. When the second marker curve matches the first marker curve, the shooting process is performed. Since the second marker curve is used to identify the angle of the face in the second face image in the current image, and the first marker curve is used to identify the angle of the face in the first face image in the target template image, performing the shooting process when the second marker curve matches the first marker curve ensures that the angle of the face in the captured photo is similar to or consistent with the angle of the face in the target template image, improving the effect of imitation photography. At the same time, since the target template image is not only used to provide users with a reference for adjusting the face angle during shooting, but also automatically analyzes and matches the face angle, the operation of imitation photography is greatly simplified, the difficulty of imitation photography is reduced, and a better user experience is provided. Attached Figure Description

[0020] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of the interaction scenario between a user and a terminal provided in an embodiment of this application;

[0022] Figure 2 This is a flowchart illustrating a shooting method provided in an embodiment of the present invention;

[0023] Figure 3 This is a flowchart illustrating the method for constructing a marker curve provided in an embodiment of the present invention;

[0024] Figure 4 This is a schematic flowchart of the shooting and processing method provided in an embodiment of the present invention;

[0025] Figure 5 This is a schematic flowchart of a method for determining whether two curves match, provided in an embodiment of the present invention.

[0026] Figure 6 This is a schematic diagram illustrating the principle of determining whether two curves match, provided in an embodiment of the present invention.

[0027] Figure 7 This is a schematic diagram illustrating an application scenario of the shooting method provided in an embodiment of the present invention;

[0028] Figure 8 This is a schematic diagram of the front-end and back-end interaction to realize the shooting method provided in the embodiment of the present invention;

[0029] Figure 9 This is a schematic diagram illustrating the process of taking a photo using the shooting method provided in the embodiments of the present invention;

[0030] Figure 10 This is a schematic diagram of the structure of a shooting device provided in an embodiment of the present invention;

[0031] Figure 11 This is a hardware structure block diagram of a terminal provided in an embodiment of the present invention. Detailed Implementation

[0032] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0034] To make the objectives, technical solutions, and advantages disclosed in the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of the present invention and are not intended to limit the embodiments of the present invention. First, the prior art and related concepts involved in the embodiments of the present invention will be described:

[0035] APP: Short for Application, it mainly refers to software installed on smartphones to improve the shortcomings of the original system and provide users with a richer user experience.

[0036] Masking: refers to an image that is covered on top of the image.

[0037] Selfie: refers to a photo taken by a user using the front-facing camera of their mobile phone.

[0038] Face landmarks: When a portrait photo or image is detected, the system automatically recognizes the facial contours and features, and marks the edges of the face and features with points, marking the face and features with points, usually marked with 88 points.

[0039] To facilitate the explanation of the advantages of the methods in the embodiments of the present invention, the relevant contents of the prior art are first described in detail at the beginning of the detailed description of the technical solutions of the embodiments of the present invention:

[0040] With the diversification of social products and platforms, more and more users enjoy using selfies to record their daily lives and share them on social media. However, users' expressions and facial angles in selfies tend to be monotonous, resulting in a lack of expressiveness. To help users discover more selfie expressions and angles, showcase more diverse life scenes, and find a more beautiful and unique version of themselves, some photo apps have gradually added selfie-enhancing features.

[0041] For example, an app offers a "composition" function in its selfie feature, providing two imitation shooting modes: mask mode and line frame mode. When a user takes a photo, the composition template is displayed as a semi-transparent mask or an overlaid line frame within the user's viewfinder. The user can imitate the composition by aligning themselves with the template. However, neither of these composition template imitation shooting modes effectively aligns the user's face or results in a well-expressed selfie. In mask mode, the semi-transparent template significantly obscures the user's face, making it difficult for the user to see their facial angle and expression details. In composition mode, the template only appears as a line frame, which merely roughly marks the center of the face with a crosshair and cannot reflect differences in angles such as tilting the head up, looking down, or slightly to the left or right, thus failing to perfectly match the template. Furthermore, when the user confirms the shot, they look at the screen to find the shutter button, making it impossible to maintain the original imitated gaze.

[0042] In view of the shortcomings of the prior art, embodiments of the present invention provide a shooting scheme that can generate two sets of facial feature positioning marks based on the face in the target template image and the face in the current image. When the two sets of facial feature positioning marks match, automatic shooting processing is performed, and the face in the captured current image has the same angle as the face in the target template image, thereby improving the expressiveness of the photo. The technical solution of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0043] Please refer to Figure 1 This illustration shows a schematic diagram of an interaction scenario between user 10 and terminal 20 provided in an embodiment of this application. Terminal 20 and user 10 can interact. Terminal 20 can be a physical device such as a smartphone, camera, desktop computer, tablet computer, laptop computer, digital assistant, or smart wearable device; among which, smart wearable devices can include smart bracelets, smartwatches, smart glasses, and smart helmets. Of course, terminal 20 is not limited to the above-mentioned physical electronic devices; it can also be software running on the aforementioned electronic devices. Specifically, for example, terminal 20 can be a webpage provided to the user by service providers such as WeChat and Weibo, or an application provided to the user by these service providers.

[0044] The terminal 20 may include a camera, a display screen, a storage device, and a processor connected via a data bus. The display screen is used to display selfie images and other data; this display screen may be a touchscreen of a mobile phone or tablet. The storage device is used to store the program code and data of the shooting device; this storage device may be the terminal 20's memory, or it may be a smart media card, secure digital card, flash memory card, or other storage device. The processor may be a single-core or multi-core processor.

[0045] Figure 2 This is a flowchart illustrating a shooting method provided by an embodiment of the present invention. This process can be executed by terminal 20. This specification provides the operational steps of the method described in the embodiments or flowcharts, but based on conventional or non-inventive methods, more or fewer operational steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system or client product execution, the methods shown in the embodiments or drawings can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Please refer to... Figure 2 The shooting method includes:

[0046] S201. Determine the target template image, wherein the target template image contains a first face image.

[0047] This invention provides a scheme for taking photos by imitating a target template image. The target template image is provided for users to reference in terms of poses and expressions. The target template image may include a background image and a first face image. Users adjust their shooting angle and expression by imitating the first face image. In practice, the target template image can be an image automatically configured by the application software or an image selected by the user. In one feasible embodiment, the backend automatically assigns a template image for the user to imitate in taking photos; this template image is the target template image. Specifically, the backend can collect basic user information such as gender, personality, and preferred photography style, and configure the target template image for the user based on this information.

[0048] In another feasible embodiment, multiple template images can be provided for the user to select, with the selected template image serving as the target template image. Specifically, this may include: displaying template images; obtaining the user's selection operation on the template image; and using the template image corresponding to the selection operation as the target template image. For example, multiple template images can be displayed on the screen, and the user's touch operation on the screen can be received, with the template image corresponding to the touch operation serving as the target template image selected by the user.

[0049] S203. Capture the current image, which contains a second face image.

[0050] The current image refers to a real-time image of the subject captured by a camera device. This camera device can be a video camera, a camera integrated with a smartphone, or other devices with video recording capabilities. The current image may include a background image and a second face image. The user corresponding to the second face image can imitate the first face image in the target template image by adjusting the shooting angle and facial expression to obtain an image with a similar effect to the target template image.

[0051] S205. Determine a first marker curve pointing to the first face image, wherein the first marker curve is used to identify the angle of the face in the first face image in the target template image.

[0052] Imitation of human face image capture involves facial angles and facial expressions. This embodiment of the invention uses a marker curve to identify the angle of the face in the image. Specifically, a first marker curve is used to identify the angle of the face in the first face image within the target template image. The method for determining the first marker curve may include: obtaining a first marker curve corresponding to the first face image in the target template image based on the mapping relationship between the target template image and the first marker curve; or, generating the first marker curve based on the first face image and the marker curve construction method.

[0053] In this embodiment of the invention, a first marker curve can be generated in real time based on a first face image; alternatively, a first marker curve can be generated in advance based on the first face image, and then a mapping relationship can be established between the first marker curve and the target template image to which the first face image belongs. Subsequently, the first marker curve corresponding to the target template image can be directly obtained based on the mapping relationship. Whether the first marker curve is generated in real time or in advance, it can be obtained using a marker curve construction method, which is described in detail below.

[0054] Figure 3 This is a flowchart illustrating the method for constructing a marker curve provided in an embodiment of the present invention. Please refer to [link / reference]. Figure 3 The method for constructing the marker curve may include:

[0055] S301. Obtain the target face image of the marker curve to be determined.

[0056] S303. Perform feature point analysis on the target face image to determine the target feature point sequence of the target face image.

[0057] Specifically, facial landmark detection technology can be used to perform face recognition on target face images, determining the locations of key facial regions within the image. Facial landmark detection, also known as facial keypoint detection, localization, or face alignment, refers to locating the key facial regions, including eyebrows, eyes, nose, mouth, and facial contours, given a face image. Facial landmark detection methods are broadly categorized into three types: model-based Active Shape Model (ASM) and Active Appearance Model (AAM), cascaded pose regression (CPR), and deep learning-based methods. This invention does not limit the specific method used to identify facial landmarks; any method can be used for face recognition to identify facial landmarks.

[0058] In a feasible embodiment, this step may include: performing face recognition on the target face image using a face feature point detection algorithm to obtain a set of feature points corresponding to the face in the target face image, the set of feature points including feature points corresponding to eyebrows, nose, and mouth respectively; obtaining feature points in the feature point set corresponding to the eyebrow end, eyebrow midpoint, nose tip, and lip midpoint, and using the obtained feature points as target feature points; horizontally sorting the target feature points corresponding to the eyebrow end and eyebrow midpoint to obtain a horizontal curve feature point sequence, and vertically sorting the target feature points corresponding to the nose tip and lip midpoint to obtain a vertical curve feature point sequence; and using the horizontal curve feature point sequence and the vertical curve feature point sequence as the target feature point sequence.

[0059] S305. Generate a marker curve for the target face image based on the target feature point sequence.

[0060] The target feature point sequence may include a first feature point sequence and a second feature point sequence. The first feature point sequence may include feature points corresponding to the eyebrows of the face in the target face image, and the second feature point sequence may include feature points corresponding to the nose and mouth of the face in the target face image. Generating a marker curve for the target face image based on the target feature point sequence may include: generating a horizontal curve based on the first feature point sequence; generating a vertical curve based on the second feature point sequence; and combining the horizontal curve and the vertical curve to obtain the marker curve. In a feasible embodiment, combining the horizontal curve and the vertical curve may include: extending the vertical curve to intersect with the horizontal curve.

[0061] The step of generating a first marker curve based on a first face image may include: performing feature point analysis on the first face image to determine a target feature point sequence of the first face image; and generating a marker curve of the first face image based on the target feature point sequence of the first face image.

[0062] S207. Generate a second marker curve based on the second face image and a preset marker curve construction method. The second marker curve is used to identify the angle of the face in the second face image in the current image.

[0063] The method for constructing the marker curve is the same as the method for constructing the marker curve in step S205, and will not be described again here.

[0064] The step of generating the second marker curve based on the second face image and the preset marker curve construction method may include: performing feature point analysis on the second face image to determine the target feature point sequence of the second face image; and generating the marker curve of the second face image based on the target feature point sequence of the second face image.

[0065] S211. When the first marker curve and the second marker curve match, perform the shooting process.

[0066] Figure 5 This is a flowchart illustrating the method for determining whether two curves match according to an embodiment of the present invention. Please refer to [link / reference]. Figure 5 Determining whether the first and second marker curves match can include:

[0067] S501. Determine the first set of marker points for the first marker curve and the second set of marker points for the second marker curve, wherein the first marker points in the first set of marker points correspond one-to-one with the second marker points in the second set of marker points.

[0068] S503. Calculate the distance between the second marker point and the corresponding first marker point, and determine whether the distance is less than a preset distance threshold.

[0069] S505. When the distance between each second marker point in the second marker point set and the corresponding first marker point is less than the distance threshold, it is determined that the second marker curve and the first marker curve match.

[0070] Specifically, the first marked curve includes a horizontal curve and a vertical curve, and the first set of marked points may include the two endpoints and one midpoint of the horizontal curve, and the two endpoints and one midpoint of the vertical curve; the second marked curve includes a horizontal curve and a vertical curve, and the second set of marked points may include the two endpoints and one midpoint of the horizontal curve, and the two endpoints and one midpoint of the vertical curve. When comparing whether the first and second marked curves match, the horizontal curves of the first and second marked curves can be compared, and the vertical curves of the first and second marked curves can be compared. When both comparisons result in a match, the first and second marked curves are determined to be a match.

[0071] Figure 6 This is a schematic diagram illustrating the principle of determining whether two curves match, as provided in an embodiment of the present invention. The following is an exemplary description of the method for determining whether two curves match.

[0072] like Figure 6 As shown, one curve is marked with endpoints A, B, and midpoint C, while another curve is marked with endpoints A', B', and C'. Endpoint A' corresponds to endpoint A, endpoint B' corresponds to endpoint B, and midpoint C' corresponds to midpoint C. The distances d1 between endpoints A' and A, d2 between endpoints B' and B, and d3 between midpoint C' and C are calculated. Distance thresholds d are compared with d1, d2, and d3 respectively to determine if they are less than the thresholds d. If all three distances d1, d2, and d3 are less than the threshold d, the two curves are considered to match; otherwise, they are considered to be mismatched.

[0073] In practical applications, the position of the first marker curve on the screen remains unchanged, while the second marker curve changes with the angle of the subject's face. Therefore, by adjusting the angle of the subject's face, the second marker curve can be gradually made closer to the first marker curve until it matches the first marker curve.

[0074] When the first and second marker curves match, angle matching information can be generated and displayed. The angle matching information is used to identify whether the angle of the face in the second face image matches the angle of the face in the first face image in the target template image. In one feasible embodiment, when the first and second marker curves match, a fusion process can be performed on the first and second marker curves, and the fusion result can be displayed. The fusion process can involve merging the first and second marker curves and / or changing their display colors. In another feasible embodiment, when the first and second marker curves match, a voice prompt can be issued to remind the user that the current shooting angle is basically consistent with the face angle in the target template image, and to maintain the current shooting angle.

[0075] Preferably, S209 may be included before S211.

[0076] S209. Display the current image, the first marker curve, and the second marker curve.

[0077] Specifically, the current image, the first marker curve, and the second marker curve can be displayed in the viewfinder. The first and second marker curves are superimposed on the current image. The second marker curve changes in real time with the second face image in the current image, while the first marker curve remains unchanged. This allows the user to adjust their facial shooting angle by referring to the second marker curve until the real-time displayed second marker curve aligns with the first marker curve. When this embodiment is applied to an electronic device with a screen, the viewfinder can be the screen of the electronic device.

[0078] In a feasible embodiment, the target template image, the current image, the first marker curve, and the second marker curve can be simultaneously displayed on the screen. The screen includes a viewfinder and a reference frame. The reference frame can be located outside the viewfinder or superimposed on it, for example, at the upper left, upper right, lower left, or lower right corner of the viewfinder. The target template image can be displayed in the reference frame, the current image in the viewfinder, and the first and second marker curves can be superimposed on the current image. The second marker curve is aligned with the face of the second face image in the current image. When the angle of the face corresponding to the second face image changes, the second marker curve changes accordingly, allowing the user to check in real time whether their facial shooting angle matches the target template image. The position of the first marker curve within the viewfinder can be determined by: superimposing the first marker curve on the target template image in the reference frame, with the first marker curve aligned with the face of the first face image in the target template image; obtaining the size ratio between the reference frame and the viewfinder; enlarging the first marker curve according to the size ratio; and then having the enlarged first marker curve fall within the viewfinder.

[0079] In addition, a face outline can be overlaid on the current image. The face outline corresponds to the face of the first face image in the target template image. The face outline shows the approximate area of ​​the face of the first face image in the target template image. During the shooting process, the user can first adjust the head position by referring to the face outline, and then fine-tune the face angle by referring to the first marker curve, which can improve the speed of imitation photography.

[0080] Figure 4 This is a flowchart illustrating the image processing method provided in an embodiment of the present invention. Please refer to [link / reference]. Figure 4 Shooting processing may include:

[0081] S401. When the first marker curve matches the second marker curve, obtain the expression prompt information generated based on the facial expression in the first face image;

[0082] S403. Display the aforementioned emoji prompt information and start the photo taking timer;

[0083] S405. When the photo taking timer reaches the preset duration, record the current image.

[0084] Specifically, the facial expression prompts can be facial expressions extracted pre-processed from the first face image. These prompts can be obtained manually or through facial expression recognition in the first face image. The prompts can include the expression type and gaze direction. The prompts can be presented in voice format, allowing users to adjust their expressions simply by following the voice prompts without changing their head posture. This maximizes consistency with the facial angle and expression in the target template image and facilitates user operation. At the end of the prompt display, a timer is initiated. When the timer reaches a preset duration, a photo is automatically taken to record the current image, eliminating the need for manual photo capture. The timer can be presented in voice and / or image format, such as a voice prompt playing a timer while simultaneously displaying the timer on the screen. The timer can also be a countdown.

[0085] Figure 7 This is a schematic diagram illustrating an application scenario of the shooting method provided in an embodiment of the present invention. Please refer to [link / reference]. Figure 7 , Figure 7 This embodiment demonstrates a scenario of taking a selfie using the method provided in this embodiment on a smartphone. The screen displays the current image captured by the camera (i.e., the user's image), and a target template image is displayed in the lower left corner of the screen. A face outline, a second marker curve corresponding to the current image, and a first marker curve corresponding to the target template image are overlaid on the current image. The user first adjusts the face angle based on the target template image, ensuring the face in the current image is fully within the face outline. Then, the user fine-tunes the face angle according to the first marker curve until the second marker curve matches the first marker curve, completing the imitation of the shooting angle. This embodiment of the invention adds the function of imitating a target template image in the selfie process. It can automatically generate face position and face angle positioning based on the target template image, making it easier for users to imitate different selfie angles and expressions, thereby enhancing the expressiveness of selfies and increasing user confidence and activity on social networks.

[0086] The embodiments of the present invention have the following beneficial effects: During the shooting process, a second marker curve is generated in real time for the current image. The second marker curve is compared with the first marker curve of the target template image. When the second marker curve matches the first marker curve, the shooting process is performed. Since the second marker curve is used to identify the angle of the face in the second face image in the current image, and the first marker curve is used to identify the angle of the face in the first face image in the target template image, the shooting process when the second marker curve matches the first marker curve can ensure that the angle of the face in the captured photo is similar to or consistent with the angle of the face in the target template image, thus improving the effect of imitation photography. At the same time, since the target template image is not only used to provide users with a reference for adjusting the face angle during shooting, but also the face angle is automatically analyzed and matched, the operation of imitation photography is greatly simplified, the difficulty of imitation photography is reduced, and a better user experience is achieved.

[0087] Furthermore, facial expression prompts are generated based on the target template image. Users can further adjust their own expressions using these prompts to obtain photos with a higher similarity in angle and expression to the face in the target template image. This embodiment of the invention automatically takes a photo after the user adjusts the shooting angle and expression, simplifying user operation and preventing changes in the template's shooting angle and expression caused by user head or eye movements.

[0088] Figure 8 This is a schematic diagram illustrating the front-end and back-end interaction to achieve the shooting method provided in this embodiment of the invention. Please refer to... Figure 8 The shooting method of this invention can be realized through the interaction between the front end and the back end of a smart device. The front end includes a screen and a loudspeaker. The screen is used to display images, information and other content, and the loudspeaker is used for voice output.

[0089] The tasks executed in the background include: configuring the target template image, determining the first marker curve and expression prompt information corresponding to the first face in the target template image; generating a second marker curve based on the second face image in the current image; determining whether the second marker curve matches the first marker curve, and generating angle matching information when the second marker curve matches the first marker curve; starting the photo taking timer when the angle matching information display ends, and taking a photo when the photo taking timer reaches the preset duration.

[0090] The tasks performed by the front end include: displaying the current image; retrieving and displaying the first and second marker curves from the back end; retrieving and displaying angle matching information from the back end; retrieving expression prompts from the back end and displaying them on the screen and / or through a loudspeaker; displaying the photo-taking timer on the screen and / or through a loudspeaker; and retrieving and displaying the captured photos from the back end.

[0091] Figure 9This is a schematic diagram illustrating the process of taking a photo using the shooting method provided in this embodiment of the invention. Please refer to [link / reference]. Figure 9 , Figure 9 This mainly shows the content presented on the front end that directly interacts with the user. Figure 9 From left to right, four different states are presented: 1. The screen displays the current image, the first marker curve, and the second marker curve. The first marker curve is white, and the second marker curve is yellow. The user adjusts the angle of their face to match the second marker curve with the first marker curve; 2. When the second marker curve matches the first marker curve, the second marker curve merges with the first marker curve and changes the curve display color to green. At the same time, the voice prompt message "Please look at the lower right corner and keep smiling" is played; 3. A countdown timer is set up for taking a photo, and the countdown numbers are overlaid on the current image; 4. The captured photo is displayed.

[0092] This invention can automatically generate two sets of facial feature positioning marks (i.e., a first mark curve and a second mark curve) based on a target template image and the user's face shape. The user adjusts their facial angle to align the two sets of facial feature positioning marks, and further adjusts their expression based on expression prompts, thus achieving a facial angle and expression consistent with the target template image. Furthermore, when the user's angle and expression are detected to match the target template image, a countdown timer is automatically triggered to take a picture, resulting in a more expressive selfie.

[0093] This invention also provides a shooting device. Figure 10 This is a schematic diagram of the structure of a shooting device provided in an embodiment of the present invention, as shown below. Figure 10 As shown, the imaging device includes a target template image determination module 1010, a current image acquisition module 1020, a first marker curve determination module 1030, a second marker curve generation module 1040, and an imaging processing module 1060. Among them,

[0094] The target template image determination module 1010 is used to determine a target template image, wherein the target template image includes a first face image;

[0095] The current image acquisition module 1020 is used to capture the current image, which includes a second face image;

[0096] The first marker curve determination module 1030 is used to determine a first marker curve pointing to the first face image, wherein the first marker curve is used to identify the angle of the face in the first face image in the target template image;

[0097] The second marker curve generation module 1040 is used to generate a second marker curve according to the second face image and a preset marker curve construction method. The second marker curve is used to identify the angle of the face in the second face image in the current image.

[0098] The image processing module 1060 is used to perform image processing when the first marker curve and the second marker curve match.

[0099] It may also include a display module 1050 for displaying the current image, the first marker curve, and the second marker curve.

[0100] In one feasible embodiment, the marker curve construction method includes: acquiring a target face image for which the marker curve to be determined; performing feature point analysis on the target face image to determine a target feature point sequence of the target face image; and generating a marker curve of the target face image based on the target feature point sequence.

[0101] Specifically, the target feature point sequence includes a first feature point sequence and a second feature point sequence. The first feature point sequence includes feature points corresponding to the eyebrows of the face in the target face image, and the second feature point sequence includes feature points corresponding to the nose and mouth of the face in the target face image. Generating a marker curve for the target face image based on the target feature point sequence includes: generating a horizontal curve based on the first feature point sequence; generating a vertical curve based on the second feature point sequence; and combining the horizontal curve and the vertical curve to obtain the marker curve.

[0102] The first marker curve determination module 1030 includes a first determination unit and a second determination unit. The first determination unit is used to obtain a first marker curve corresponding to a first face image in the target template image based on the mapping relationship between the target template image and the first marker curve; the second determination unit is used to generate a first marker curve based on the first face image and the marker curve construction method.

[0103] The imaging device further includes a marker curve matching module. The marker curve matching module is used to: determine a first set of marker points for the first marker curve and a second set of marker points for the second marker curve, wherein each first marker point in the first set corresponds one-to-one with each second marker point in the second set; calculate the distance between each second marker point and its corresponding first marker point, and determine whether the distance is less than a preset distance threshold; when the distance between each second marker point in the second set and its corresponding first marker point is less than the distance threshold, determine that the second marker curve and the first marker curve match.

[0104] The shooting processing module 1060 is further configured to: when the first marker curve matches the second marker curve, acquire expression prompt information generated based on the facial expression in the first face image; display the expression prompt information and start the shooting timer; and when the shooting timer reaches a preset duration, record the current image.

[0105] The shooting device further includes an angle matching module. The angle matching module is used to: generate angle matching information when the first marker curve and the second marker curve match, the angle matching information being used to identify whether the angle of the face in the second face image in the current image matches the angle of the face in the first face image in the target template image; and display the angle matching information.

[0106] The described imaging device and method embodiments are based on the same inventive concept.

[0107] During the shooting process of this embodiment of the invention, a second marker curve is generated in real time for the current image. The second marker curve is compared with the first marker curve of the target template image. When the second marker curve matches the first marker curve, the shooting process is performed. The angle of the face in the captured photo is similar to or consistent with the angle of the face in the target template image, which can improve the effect of imitation photography. At the same time, since the target template image is not only used to provide users with a reference for adjusting the face angle during shooting, but also the face angle is automatically analyzed and matched, the operation of imitation photography is greatly simplified, the difficulty of imitation photography is reduced, and a better user experience is achieved.

[0108] This invention provides a terminal including a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the shooting method provided in the above method embodiments.

[0109] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for the functions, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.

[0110] This invention also provides a schematic diagram of the terminal structure, as shown in the embodiment of the invention. Figure 11As shown, this terminal can be used to implement the shooting method provided in the above embodiments. Specifically:

[0111] The client may include an RF (Radio Frequency) circuit 1110, a memory 1120 including one or more computer-readable storage media, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a WiFi (Wireless Fidelity) module 1170, a processor 1180 including one or more processing cores, and a power supply 1190, etc. Those skilled in the art will understand that... Figure 11 The client structure shown does not constitute a limitation on the client and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Wherein:

[0112] RF circuit 1110 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and hands it over to one or more processors 1180 for processing; additionally, it transmits uplink data to the base station. Typically, RF circuit 1110 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, etc. Furthermore, RF circuit 1110 can also communicate wirelessly with networks and other clients. The wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System for Mobile Communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), etc.

[0113] The memory 1120 can be used to store software programs and modules. The processor 1180 executes various functional applications and data processing by running the software programs and modules stored in the memory 1120. The memory 1120 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for the functions, etc.; the data storage area may store data created according to the use of the client, etc. In addition, the memory 1120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1120 may also include a memory controller to provide access to the memory 1120 for the processor 880 and the input unit 1130.

[0114] Input unit 1130 can be used to receive input numerical or character information, and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, input unit 1130 may include touch-sensitive surface 1131 and other input devices 1132. Touch-sensitive surface 1131, also known as a touch display screen or touchpad, can collect touch operations by the user on or near it (such as operations by the user using a finger, stylus, or any suitable object or accessory on or near the touch-sensitive surface 1131), and drive the corresponding connection device according to a pre-set program. Optionally, touch-sensitive surface 1131 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to processor 1180, and can receive and execute commands from processor 1180. In addition, the touch-sensitive surface 1131 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. Besides the touch-sensitive surface 1131, the input unit 1130 may also include other input devices 1132. Specifically, other input devices 1132 may include, but are not limited to, one or more of the following: a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick.

[0115] Display unit 1140 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the client. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. Display unit 1140 may include display panel 1141, which may optionally be configured as an LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or similar form. Further, touch-sensitive surface 1131 may cover display panel 1141. When touch-sensitive surface 1131 detects a touch operation on or near it, it transmits the information to processor 1180 to determine the type of touch event. Subsequently, processor 1180 provides corresponding visual output on display panel 1141 according to the type of touch event. Touch-sensitive surface 1131 and display panel 1141 can be two independent components to implement input and output functions. However, in some embodiments, touch-sensitive surface 1131 and display panel 1141 can be integrated to achieve input and output functions.

[0116] The client may also include at least one sensor 1150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1141 according to the ambient light level, and the proximity sensor can turn off the display panel 1141 and / or backlight when the client moves to its ear. As a type of motion sensor, a gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that identify the client's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometers, taps), etc. Other sensors that may be configured on the client, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0117] Audio circuitry 1160, speaker 1161, and microphone 1162 provide an audio interface between the user and the client. Audio circuitry 1160 converts received audio data into electrical signals, transmits them to speaker 1161, and speaker 1161 converts them into sound signals for output. Conversely, microphone 1162 converts collected sound signals into electrical signals, which are then received by audio circuitry 1160, converted back into audio data, processed by processor 1180, and then transmitted via RF circuitry 1110 to, for example, another client, or output to memory 1120 for further processing. Audio circuitry 1160 may also include an earphone jack to facilitate communication between a peripheral headset and the client.

[0118] WiFi is a short-range wireless transmission technology. The client, through the WiFi module 1170, can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 11 WiFi module 1170 is shown, but it is understood that it is not a necessary component of the client and can be omitted as needed without changing the nature of the invention.

[0119] The processor 1180 is the control center of the client, connecting various parts of the client through various interfaces and lines. It executes software programs and / or modules stored in the memory 1120, and calls data stored in the memory 1120 to perform various functions and process data, thereby enabling overall monitoring of the client. Optionally, the processor 1180 may include one or more processing cores; preferably, the processor 1180 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 1180.

[0120] The client also includes a power supply 1190 (such as a battery) to power various components. Preferably, the power supply can be logically connected to the processor 1180 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 1190 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0121] Although not shown, the client may also include a camera, Bluetooth module, etc., which will not be described in detail here. Specifically, in this embodiment, the display unit of the client is a touch screen display, and the client also includes a memory and one or more programs, one or more of which are stored in the memory and configured to be executed by one or more processors of the instructions in the method embodiment of the present invention.

[0122] Embodiments of the present invention also provide a storage medium, which can be disposed in a terminal to store at least one instruction, at least one program, code set, or instruction set related to implementing a shooting method in the method embodiments. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the shooting method provided in the above method embodiments.

[0123] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network clients of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0124] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0125] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and server embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0126] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0127] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A shooting method, characterized in that, include: The image displays a target template image and a captured current image. The target template image contains a first face image. The current image contains a second face image. The second face image is a real-time image of the subject mimicking the first face image in the target template image. The first marker curve of the target template image and the second marker curve of the current image are superimposed on the current image; the first marker curve includes an intersecting first horizontal curve and a first vertical curve, and the second marker curve includes an intersecting second horizontal curve and a second vertical curve; The first marker curve is used to identify the angle of the face in the first face image in the target template image. The angle of the face in the target template image is determined by the first horizontal curve and the first vertical curve. The first horizontal curve is generated based on the feature points corresponding to the eyebrows of the face in the first face image, and the first vertical curve is generated based on the feature points corresponding to the nose and mouth of the face in the first face image. The second marker curve is used to identify the angle of the face in the second face image in the current image. The angle of the face in the current image is determined by the second horizontal curve and the second vertical curve. The second horizontal curve is generated based on the feature points corresponding to the eyebrows of the face in the second face image, and the second vertical curve is generated based on the feature points corresponding to the nose and mouth of the face in the second face image. The position of the first marker curve in the current image remains unchanged. The second marker curve changes with the change of the angle of the subject's face. When the second marker curve matches the first marker curve, an expression prompt is displayed and a photo is taken; the expression prompt is generated based on the facial expression in the first face image; the matching of the second marker curve with the first marker curve means that the second marker curve matches the first horizontal curve and the second horizontal curve on the first marker curve, and the first vertical curve matches the second vertical curve.

2. The method according to claim 1, characterized in that, The screen includes a viewfinder and a reference frame; The display target template image and the captured current image include: The current image is displayed in the viewfinder; The target template image is displayed in the reference frame; The positional relationship between the viewfinder and the reference frame includes any of the following: the reference frame is disposed outside the viewfinder; the reference frame is superimposed on the viewfinder.

3. The method according to claim 2, characterized in that, The step of overlaying and displaying the first marker curve of the target template image and the second marker curve of the current image in the current image includes: The second marker curve is aligned with the face of the second face image in the current image within the viewfinder for display. The first marked curve is superimposed on the target template image within the reference frame; Obtain the size ratio between the reference frame and the viewfinder frame; The first marked curve is enlarged and displayed in the viewfinder according to the stated size ratio.

4. The method according to claim 1, characterized in that, The method further includes: Determine the first marker curve pointing to the first face image; A second marker curve is generated based on the second face image and a preset marker curve construction method.

5. The method according to claim 4, characterized in that, The method for constructing the marker curve includes: Obtain the target face image of the marker curve to be determined; Feature point analysis is performed on the target face image to determine the target feature point sequence of the target face image; A marker curve for the target face image is generated based on the target feature point sequence.

6. The method according to claim 4, characterized in that, The determination of the first marker curve pointing to the first face image includes: Based on the mapping relationship between the target template image and the first marker curve, obtain the first marker curve corresponding to the first face image in the target template image; or, A first marker curve is generated based on the first face image and the marker curve construction method.

7. The method according to claim 5, characterized in that, The target feature point sequence includes a first feature point sequence and a second feature point sequence. The first feature point sequence includes feature points corresponding to the eyebrows of the face in the target face image, and the second feature point sequence includes feature points corresponding to the nose and mouth of the face in the target face image. The step of generating the marker curve for the target face image based on the target feature point sequence includes: A horizontal curve is generated based on the first feature point sequence; a vertical curve is generated based on the second feature point sequence. The horizontal curve is combined with the vertical curve to obtain the marking curve; The combination includes extending the longitudinal curve to intersect with the transverse curve.

8. The method according to claim 1, characterized in that, The first marking curve includes a horizontal curve and a vertical curve; the second marking curve includes a horizontal curve and a vertical curve; the method further includes: Compare the horizontal curve of the first marked curve with the horizontal curve of the second marked curve; Compare the vertical curve of the first marker curve with the vertical curve of the second marker curve; If the horizontal curve of the first marker curve matches the horizontal curve of the second marker curve, and the vertical curve of the first marker curve matches the vertical curve of the second marker curve, then the first marker curve and the second marker curve are determined to match.

9. The method according to claim 1, characterized in that, The method further includes: Determine the first set of marker points for the first marker curve and the second set of marker points for the second marker curve, wherein the first marker points in the first set of marker points correspond one-to-one with the second marker points in the second set of marker points; Calculate the distance between the second marker point and the corresponding first marker point, and determine whether the distance is less than a preset distance threshold; When the distance between each second marker point in the second marker point set and its corresponding first marker point is less than the distance threshold, the second marker curve and the first marker curve are determined to match.

10. The method according to claim 1, characterized in that, When the second marker curve matches the first marker curve, displaying facial expression prompts and performing image processing includes: When the first marker curve matches the second marker curve, obtain the expression prompt information; Display the aforementioned emoji prompt and start the photo taking timer; When the photo capture timer reaches the preset duration, the current image is recorded.

11. The method according to claim 1, characterized in that, The method further includes: When the first marker curve and the second marker curve match, angle matching information is generated. The angle matching information is used to identify whether the angle of the face in the second face image in the current image matches the angle of the face in the first face image in the target template image. Display the angle matching information.

12. The method according to claim 1, characterized in that, The method further includes: When the first marker curve and the second marker curve match, a fusion process is performed on the first marker curve and the second marker curve; and, Display the fusion processing results; The fusion process includes at least one of the following: merging the first marker curve and the second marker curve; changing the color of the first marker curve and / or the second marker curve.

13. The method according to claim 1, characterized in that, The method further includes: When the first marker curve and the second marker curve match, a voice prompt is output; the voice prompt is used to remind the subject that the current shooting angle is consistent with the face angle in the target template image, and that the current shooting angle must remain unchanged.

14. A shooting device, characterized in that, include: The display module is used to display a target template image and a captured current image. The target template image includes a first face image; the current image includes a second face image; the second face image is a real-time image of the subject imitating the first face image in the target template image. The display module is further configured to overlay a first marker curve of the target template image and a second marker curve of the current image onto the current image; the first marker curve includes intersecting first horizontal curves and first vertical curves, and the second marker curve includes intersecting second horizontal curves and second vertical curves; The first marker curve is used to identify the angle of the face in the first face image in the target template image. The angle of the face in the target template image is determined by the first horizontal curve and the first vertical curve. The first horizontal curve is generated based on the feature points corresponding to the eyebrows of the face in the first face image, and the first vertical curve is generated based on the feature points corresponding to the nose and mouth of the face in the first face image. The second marker curve is used to identify the angle of the face in the second face image in the current image. The angle of the face in the current image is determined by the second horizontal curve and the second vertical curve. The second horizontal curve is generated based on the feature points corresponding to the eyebrows of the face in the second face image, and the second vertical curve is generated based on the feature points corresponding to the nose and mouth of the face in the second face image. The position of the first marker curve in the current image remains unchanged. The second marker curve changes with the change of the angle of the subject's face. The shooting processing module is used to display facial expression prompts and perform shooting processing when the second marker curve matches the first marker curve; the facial expression prompts are generated based on the facial expressions in the first face image; the matching of the second marker curve with the first marker curve means that the second marker curve matches the first horizontal curve and the second horizontal curve on the first marker curve, and the first vertical curve matches the second vertical curve.

15. A terminal, characterized in that, The terminal includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the shooting method as described in any one of claims 1-13.

16. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or instruction set is loaded and executed by a processor to implement the shooting method as described in any one of claims 1-13.

Citation Information

Patent Citations

  • Image shooting method and device

    CN104125396A

  • Photographing control method and device

    CN105407285A

  • Image shooting method and device, storage medium and electronic equipment

    CN108229369A

  • Image shooting auxiliary method, device, terminal, and storage medium

    CN109218615A