WO2021135601A1 - Auxiliary photographing method and apparatus, terminal device, and storage medium - Google Patents
Auxiliary photographing method and apparatus, terminal device, and storage medium Download PDFInfo
- Publication number
- WO2021135601A1 WO2021135601A1 PCT/CN2020/125204 CN2020125204W WO2021135601A1 WO 2021135601 A1 WO2021135601 A1 WO 2021135601A1 CN 2020125204 W CN2020125204 W CN 2020125204W WO 2021135601 A1 WO2021135601 A1 WO 2021135601A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- posture
- target
- scene
- photographing
- Prior art date
Links
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/60—Control of cameras or camera modules
- H04N23/61—Control of cameras or camera modules based on recognised objects
-
- 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
- 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/64—Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
Definitions
- This application belongs to the technical field of terminal technology, and in particular relates to an artificial intelligence (AI) terminal assisted photographing method, device, terminal device, and computer-readable storage medium.
- AI artificial intelligence
- the embodiments of the present application provide an auxiliary photographing method, a device, a terminal device, and a computer-readable storage medium, which can quickly guide a photographed subject to adjust the posture and improve the photographing effect of an image.
- an embodiment of the present application provides an auxiliary photographing method, including:
- the posture image and the original image are superimposed and displayed as a preview image, so as to guide the photographic subject to perform posture adjustment according to the target posture in the preview image.
- the original image may be the first frame preview image previewed in the display interface, or may also be the Nth frame preview image after the first frame previewed in the display interface.
- the original image may be the first frame image captured by the camera in real time, or it may be the Nth frame image after the first frame captured by the camera in real time, where N is an integer greater than 1.
- the original image may be recognized by artificial intelligence recognition technology first to determine whether there is a photographed object in the original image. If there is a photographed object in the original image, the target feature of the photographed object and the scene characteristic of the scene where the photographed object is located can be further identified. Among them, the target characteristics of the photographed object may include one or more of the number of photographed objects, gender, age, height, body type, and the like.
- a TOF depth camera set by a terminal device can be used to obtain target features such as the height and body shape of the subject.
- a face recognition model set in the terminal device can be used to recognize target characteristics such as the number, gender, and age of the subject in the original image.
- the scene characteristics of the scene where the shooting object in the original image is located can be obtained through a scene recognition model set in the terminal device.
- the superimposing and displaying the posture image and the original image as a preview image may include:
- a layer mask is added to the posture image, and the posture image with the added layer mask and the original image are superimposed and displayed as the preview image, and the position corresponding to the target posture in the layer mask is set to White, the position in the layer mask except the target pose is set to black.
- the posture image superimposed on the original image can be a binary mask of the same size as the original image, and each pixel in the binary mask corresponds to each pixel in the original image one-to-one.
- the pixel value of the pixel corresponding to the target posture in the binary mask is 1 (that is, the pixel corresponding to the target posture in the binary mask is white), and the pixel value of the pixel other than the target posture in the binary mask is The pixel value is 0 (that is, pixels other than the target posture in the binary mask are black), and the target posture in the posture image is merged into the current photographing scene to guide the subject to adjust the posture.
- a layer mask can be added to the posture image, where the position corresponding to the target posture in the layer mask (that is, the pixel corresponding to the target posture) can be set to white, and the layer The position of the mask other than the target pose (that is, the pixel points other than the target pose) can be set to black to obtain the binary mask corresponding to the pose image, and the pose image with the layer mask (that is, the pose The binary mask of the image) and the original image are superimposed and displayed as a preview image, that is, the target posture in the posture image is superimposed on the original image to obtain a preview image, and the obtained preview image can be displayed on the display interface. This guides the subject to make posture adjustments.
- the superimposing and displaying the posture image and the original image as a preview image may include:
- the target posture is superimposed on the original image, and the original image superimposed on the target posture is displayed as a preview image.
- the superimposing the target pose on the original image may include:
- the second position of the target posture in the original image is determined according to the first position, and the target posture is superimposed at the second position of the original image.
- the image segmentation technology can also be used to segment the target posture from the posture image, and the segmented target posture can be superimposed on the original image, and then the original image superimposed on the target posture can be displayed as Preview image.
- the first position of the target posture in the posture image can be determined first, and then according to the correspondence between the pixels in the posture image and the pixels in the original image, the original image and the pixel points in the original image can be found.
- the target pixel point corresponding to the target posture, so that the second position of the target posture in the original image can be determined according to the target pixel point.
- the acquiring a posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located may include:
- the photographing characteristic is a photographing preference characteristic corresponding to the photographing object
- the posture image is acquired according to the target feature and the photographing feature of the shooting object and the scene feature of the scene where the shooting object is located.
- the photographic characteristics of the subject can also be acquired, and the characteristics of the subject can be obtained according to the target characteristics of the subject, the scene characteristics of the scene where the subject is located, and the shooting The photographic features of the subject acquire the posture image.
- the photographing feature may be a characteristic of photographing preferences or photographing habits corresponding to the photographed subject.
- the photographic characteristics of the photographed object may be obtained according to the identity mark information of the photographed object.
- the photographing feature corresponding to the terminal device may also be acquired according to the device identification information of the terminal device, and the acquired photographing characteristic corresponding to the terminal device may be determined as the photographing characteristic of the subject.
- the photographic characteristics of each photographed object may be obtained by image analysis of the historical photographed images of each photographed object in advance, and the photographed characteristics of each photographed object may be associated and saved with the identity mark information of each photographed object.
- the acquiring a posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located includes:
- a target sample image is selected from the at least one sample image according to the recommended value, and the posture image is acquired according to the target sample image.
- the posture image when the posture image is acquired according to the target characteristics of the subject and the scene characteristics of the scene where the subject is located, or according to the target characteristics of the subject, the scene characteristics of the scene where the subject is located, and the photographic characteristics of the subject
- one or more sample images can be acquired, and the posture image can be acquired according to the acquired sample images.
- the sample image may be an image collected in advance and stored in a terminal device or stored in a cloud server connected to the terminal device, or it may be an image captured from the network in real time during the photographing process.
- the obtained sample image can be directly determined as a posture image; and when multiple sample images are obtained, one can be selected from the multiple sample images.
- the target sample image, and the selected target sample image can be determined as a posture image.
- the recommended value corresponding to each sample image can be obtained first, and then the sample image with the highest recommended value can be selected as the target sample image, and the selected one can be selected as the target sample image.
- a target sample image is determined as a posture image, and the posture image is recommended through the recommended value, which helps to improve the recommendation accuracy and recommendation efficiency of the posture image.
- the recommended value corresponding to the sample image may be determined according to the number of historical recommendations of the sample image within a preset time. For example, it can be determined according to the number of historical recommendations of the sample images in the past week. The sample images with more historical recommendations have higher recommended values; the sample images with fewer historical recommendations have corresponding values. The recommended value of is lower.
- multiple target sample images can be selected from the multiple sample images, and the selected multiple target sample images can be displayed, so that the photographer or the photographed object can be selected from these multiple sample images.
- the target sample image can be selected according to the recommended value corresponding to each sample image, that is, the first N sample images with high recommended value can be selected from the sample images as the target sample image, where N is greater than or equal to 2. Integer.
- the display order corresponding to each target sample image can be determined according to the recommended value corresponding to each target sample image, wherein the target sample image with the larger recommended value is displayed on the display interface first, and the target sample with the smaller recommended value The image is later displayed on the display interface.
- the method may include:
- the second image size corresponding to the posture image is adjusted according to the first image size corresponding to the original image, so as to adjust the second image size corresponding to the posture image to the first image size.
- the first image size corresponding to the original image and the posture image corresponding to the The second image size, and the second image size corresponding to the posture image can be adjusted according to the first image size, so as to adjust the second image size corresponding to the posture image to the first image size.
- the superimposing and displaying the posture image and the original image as a preview image may include:
- the degree of matching between the current posture and the target posture is determined, and the shooting object is guided to adjust the posture according to the degree of matching.
- the current posture of the subject can also be obtained in real time, and the current posture and the target posture can be determined
- the degree of matching between the two can guide the subject to adjust the posture according to the degree of matching.
- the matching degree can also be displayed on the display interface in real time, so that the subject and/or the photographer can clearly understand the photographing posture and posture image of the subject The specific fit of the target posture.
- posture comparison can be performed to find the difference between the current posture and the target posture Position, so that the subject can be prompted to adjust the posture according to the distinguished position.
- the subject may be prompted to adjust the posture through voice playback and/or the subject may be prompted to adjust the posture through text display.
- an auxiliary photographing device including:
- the target feature recognition module is used to obtain the original image, and recognize the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located;
- a posture image acquisition module configured to acquire a posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located, the posture image contains the target posture to be recommended;
- the posture image superimposing module is configured to superimpose and display the posture image and the original image as a preview image, so as to guide the subject to perform posture adjustment according to the target posture in the preview image.
- the posture image superimposing module may include:
- the first posture image superimposing unit is used to add a layer mask to the posture image, and superimpose and display the posture image with the added layer mask and the original image as the preview image, in the layer mask
- the position corresponding to the target posture is set to white, and the position other than the target posture in the layer mask is set to black.
- the posture image superimposing module may further include:
- a posture image segmentation unit for segmenting the target posture from the posture image
- the second posture image superimposing unit is configured to superimpose the target posture on the original image, and display the original image superimposed on the target posture as a preview image.
- the second posture image superimposing unit may include:
- the first position acquisition subunit is configured to acquire the first position of the target posture in the posture image
- the second position determination subunit is configured to determine the second position of the target posture in the original image according to the first position, and superimpose the target posture on the second position of the original image.
- the posture image acquisition module may include:
- a photographing feature acquiring unit configured to acquire a photographing characteristic of the photographing object, where the photographing characteristic is a photographing preference characteristic corresponding to the photographing object;
- the first posture image obtaining unit is configured to obtain the posture image according to the target feature and the photographing feature of the shooting object and the scene feature of the scene where the shooting object is located.
- the posture image acquisition module may include:
- a sample image acquisition unit configured to acquire at least one sample image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located;
- a recommended value obtaining unit configured to obtain a recommended value corresponding to the at least one sample image
- the second posture image obtaining unit is configured to select a target sample image from the at least one sample image according to the recommended value, and obtain the posture image according to the target sample image.
- the auxiliary photographing device may further include:
- An image size obtaining module configured to obtain a first image size corresponding to the original image and a second image size corresponding to the posture image;
- the image size adjustment module is configured to adjust the second image size corresponding to the posture image according to the first image size corresponding to the original image, so as to adjust the second image size corresponding to the posture image to the first image size .
- the auxiliary photographing device may further include:
- the current posture acquisition module is used to acquire the current posture of the photographed object
- the current posture matching module is used to determine the degree of matching between the current posture and the target posture, and guide the subject to adjust the posture according to the degree of matching.
- an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and running on the processor.
- the processor executes the computer program,
- the auxiliary photographing method according to any one of the above-mentioned first aspects is realized.
- an embodiment of the present application provides a computer-readable storage medium that stores a computer program that, when executed by a processor, implements any one of the above-mentioned aspects of the first aspect
- the auxiliary method of taking pictures
- the embodiments of the present application provide a computer program product, which when the computer program product runs on a terminal device, causes the terminal device to execute the auxiliary photographing method described in any one of the above-mentioned first aspects.
- the embodiment of the present application can identify the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located, and obtain a match with the shooting object by combining the target feature of the shooting object and the scene feature of the scene where the shooting object is located And the posture image of the scene where the shooting object is located can improve the accuracy and effectiveness of the posture image acquisition, so that the obtained posture image meets the photographing requirements of the shooting object and the scene where the shooting object is currently located.
- the posture image and the original image as a preview image, and by displaying the target posture in the preview image, it is convenient to quickly guide the subject to adjust the posture according to the target posture in the preview image, which improves the efficiency of posture adjustment and the efficiency of taking pictures. , In order to effectively improve the shooting effect of the image and enhance the user experience.
- Fig. 1 is a schematic diagram of posture image selection in the prior art
- Fig. 2 is a schematic diagram of posture image display in the prior art
- FIG. 3 is a schematic flowchart of an auxiliary photographing method provided by an embodiment of the present application.
- 4 and 5 are schematic diagrams of starting the auxiliary photographing mode in an embodiment of the present application.
- FIG. 6 is a schematic diagram of scene features obtained by a scene recognition model in an embodiment of the present application.
- FIG. 7 is a schematic diagram of a preview image provided by an embodiment of the present application.
- FIG. 8 is a schematic diagram of a preview image provided by another embodiment of the present application.
- FIG. 9 is a schematic structural diagram of an auxiliary photographing device provided by an embodiment of the present application.
- Figure 10 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
- FIG. 11 is a schematic structural diagram of a mobile phone to which the auxiliary photographing method provided by an embodiment of the present application is applicable.
- the term “if” can be construed as “when” or “once” or “in response to determination” or “in response to detecting “.
- the phrase “if determined” or “if detected [described condition or event]” can be interpreted as meaning “once determined” or “in response to determination” or “once detected [described condition or event]” depending on the context ]” or “in response to detection of [condition or event described]”.
- the auxiliary photographing method provided by the embodiments of this application can be applied to mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, and super mobile personal computers
- AR augmented reality
- VR virtual reality
- UMPC ultra-mobile personal computer
- netbooks netbooks
- PDA personal digital assistant
- FIG. 1 In order to improve the shooting effect, many applications currently have a posture recommendation function. As shown in Figure 1, some fixed posture images are built in the application. When the user selects a certain posture image, as shown in Figure 2, The posture image is displayed in a fixed position in the display interface (for example, displayed in the lower left corner or the lower right corner of the display interface) for the subject's posture reference.
- this method can improve the shooting effect to a certain extent, because the built-in posture images in the application are limited, it is often unable to meet the user’s current photographing needs, and the built-in posture images in the application do not necessarily meet the current photographing scene.
- the photographing effect is poor; in addition, fixing the posture image in the left small corner or the lower right corner of the display interface cannot provide sufficient reference value for the subject, which makes posture adjustment efficiency and thus low photographing efficiency.
- embodiments of the present application provide an auxiliary photographing method, device, terminal device, and computer-readable storage medium.
- the target feature of the photographed object and the scene characteristic of the scene where the photographed object is located are combined to obtain the corresponding photographic object and the photographed object.
- the posture image of the scene can improve the accuracy and effectiveness of the posture image acquisition, so that the acquired posture image meets the photographing requirements of the subject and the scene where the subject is currently located.
- by superimposing the posture image and the original image as a preview image, and by displaying the target posture in the preview image it is convenient to quickly guide the subject to adjust the posture according to the target posture in the preview image, which improves the efficiency of posture adjustment and the efficiency of taking pictures. , In order to effectively improve the shooting effect of the image and enhance the user experience.
- Fig. 3 shows a schematic flowchart of an auxiliary photographing method provided by an embodiment of the present application.
- the auxiliary photographing method may be applied to a terminal device that has a photographing function, that is, the terminal device A camera for taking pictures can be set in the.
- the auxiliary photographing method may include:
- S301 Obtain an original image, and identify the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located;
- the terminal device can start the camera of the terminal device according to the detected camera start instruction, and can preview the image collected by the camera in real time through the display interface of the terminal device.
- the user can start the camera of the terminal device by inputting a camera start instruction.
- the camera start instruction may be an instruction that triggers the generation of a preset button, or an instruction that triggers the generation of a preset gesture, or an instruction that triggers the generation of a preset voice keyword, which is not limited in the embodiment of the present application.
- the terminal device can preset the "volume +" button to generate a camera start instruction when triggered twice, or preset the "volume +" button and the "volume -” button to generate a camera start instruction when triggered at the same time, then when the user presses " The volume +" button twice, or when the user presses the "volume +” button and the "volume -” button at the same time, the terminal device can generate and obtain the camera start instruction.
- the terminal device may be preset to generate a camera start instruction when a preset gesture such as an "O"-shaped gesture is collected, and then when the user inputs a gesture that matches the preset gesture such as an "O"-shaped gesture, the terminal device Then the camera start instruction can be generated and obtained.
- the terminal device can be preset to generate a camera start instruction when a preset voice keyword such as "photograph” is detected. Then when the user input voice contains the preset voice keyword such as "photograph", the terminal device is Can generate and get the camera start instruction.
- the original image may be the first frame preview image previewed on the display interface of the terminal device, or may also be the Nth frame preview image after the first frame previewed on the display interface of the terminal device.
- the original image may be the first frame image captured by the camera in real time, or it may be the Nth frame image after the first frame captured by the camera in real time, where N is an integer greater than 1.
- the terminal device may obtain the original image according to a preset trigger event or a preset duration.
- the terminal device may obtain the image currently previewed in the display interface of the terminal device or the image currently captured by the camera according to the detected specific instruction, and may determine the currently previewed image or the currently captured image as The original image.
- the terminal device can obtain the image currently previewed by the display interface or the image currently collected by the camera when detecting a click operation of the user clicking any position on the display interface.
- the terminal device may obtain the image currently previewed by the display interface or obtain the image currently collected by the camera when the time period when the camera is activated reaches the preset time period.
- the auxiliary photographing mode can be set in advance in the terminal device for the user to select. Specifically, after the camera of the terminal device is started, the user can input the auxiliary photographing instruction to turn on the auxiliary photographing mode of the camera, that is, when the user inputs the auxiliary photographing instruction, the terminal device can obtain the original image, and can obtain the original image according to the original.
- the target feature of the subject in the image and the scene feature of the scene where the subject is located acquire a posture image, so that the acquired posture image and the original image can be superimposed and displayed as a preview image to assist the subject to perform according to the target posture in the preview image Posture adjustment; and when the user does not input an auxiliary photographing instruction, the terminal device can directly perform conventional photographing processing, that is, no posture image acquisition is performed.
- auxiliary photographing instruction may be an instruction that triggers the generation of a preset button, or an instruction that triggers the generation of a preset gesture, or an instruction that triggers the generation of a preset voice keyword, which is not limited in the embodiment of the present application.
- the user can select the photographing mode on the display interface of the terminal device, and the terminal device can start the auxiliary photographing mode according to the user's selection.
- a virtual button for assisting taking pictures can be presented on the display interface of the terminal device. If the user triggers the virtual button, the terminal device can turn on the camera’s assisting taking pictures. Mode; if the user does not trigger the virtual button, the terminal device can directly perform conventional photographing processing.
- the user can also enter a preset gesture such as an "M" gesture in the display interface of the terminal device to turn on the camera's auxiliary photographing mode, or may include "assisted photographing" through voice input Wait for the preset voice keywords to turn on the auxiliary camera mode of the camera.
- a preset gesture such as an "M” gesture in the display interface of the terminal device to turn on the camera's auxiliary photographing mode, or may include "assisted photographing" through voice input Wait for the preset voice keywords to turn on the auxiliary camera mode of the camera.
- the terminal device may first perform image recognition on the original image through artificial intelligence (AI) technology to determine whether there is a photographed object in the original image. If there is a photographed object in the original image, the terminal device can further identify the target feature of the photographed object and the scene characteristic of the scene where the photographed object is located. Among them, the target characteristics of the photographed object may include one or more of the number of photographed objects, gender, age, height, body type, and the like.
- AI artificial intelligence
- the terminal device may be provided with a TOF (Time of Flight) depth camera, and the terminal device may use the TOF depth camera to obtain target features such as the height and body shape of the photographed subject.
- TOF Time of Flight
- the terminal device may be provided with a face recognition model, and the terminal device may use the face recognition model to recognize target characteristics such as the number, gender, and age of the subject in the original image.
- the face recognition model may be a recognition model constructed based on a convolutional neural network.
- the embodiment of the present application does not limit the specific construction process and specific training process of the face recognition model, and the existing construction process may be used for construction.
- the existing training process can also be used for training.
- the face recognition model set in the terminal device may be trained by a cloud server, and the face recognition model set in the terminal device may be updated in real time according to the update operation of the cloud server.
- the face recognition model receives the original image, it can first perform preprocessing such as information conversion, denoising, smoothing, and transformation on the original image to enhance the important features of the image; then face recognition can be used
- preprocessing such as information conversion, denoising, smoothing, and transformation
- face recognition can be used
- the technology performs face recognition on the preprocessed original image to obtain target characteristics such as the number, gender, and age of the subject in the original image according to the face recognition result.
- the face recognition technology may be any existing face recognition technology, which is not limited in the embodiment of the present application.
- the terminal device may be provided with a scene recognition model, and the terminal device may use the scene recognition model to obtain the scene characteristics of the scene where the shooting object in the original image is located.
- the scene recognition model may be a hierarchical scene recognition model based on a convolutional neural network.
- the hierarchical scene recognition model can be used to extract features of different scales of the original image, and can mix the features of different scales, and then the mixed features can be extracted again, and the extracted features can be used as The scene features of the original image enable the extracted scene features to contain more image information, thereby improving the accuracy of the posture image acquisition.
- the terminal device can first perform multiple downsampling operations on the original image to obtain A1 (320*240), A2 (160*120), ..., An, Then you can perform a series of feature extraction operations (such as convolution operations) on A1, A2,..., An to obtain feature images F1, F2...Fn, and finally you can combine the features of F1, F2,..., Fn After the images are combined, feature extraction is performed again, and the last extracted feature can be used as the scene feature of the original image.
- feature extraction operations such as convolution operations
- the embodiment of the present application does not limit the specific construction process and specific training process of the hierarchical scene recognition model, and the existing construction process can be used for construction, or the existing training process can be used for training.
- the layered scene recognition model can be trained by the cloud server through the AI training and simulation training platform MTP, or the cloud server can be trained by the AI training and the Xiangyun simulation execution platform MEP.
- the hierarchical scene recognition model set in the terminal device may also be updated in real time according to the update operation of the cloud server.
- the layered scene recognition model can first perform preprocessing such as information conversion, denoising, smoothing, and transformation on the original image to enhance the important features of the image; then, image segmentation technology can be used,
- image instance segmentation technology Mask Region-based Convolutional Neural Networks, Mask RCNN
- Mask RCNN Mask Region-based Convolutional Neural Networks
- S302 Acquire a posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located, where the posture image contains the target posture to be recommended;
- the terminal device may be provided with a posture recommendation model
- the posture recommendation model can obtain the posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located, so as to obtain the posture image by comprehensively considering the target feature and the scene feature Precise and effective posture images, which can assist and guide the subject to adjust posture according to the target posture contained in the posture image, improve the image shooting effect, and enhance the user experience.
- the posture recommendation model may be a recommendation model constructed based on a neural network.
- the embodiment of the present application does not limit the specific construction process and specific training process of the posture recommendation model, and the existing construction process may be used for construction, or the existing training process may be used for training.
- the posture recommendation model set in the terminal device can be trained by the cloud server based on a large number of sample images, and the posture recommendation model set in the terminal device can also be updated in real time according to the update operation of the cloud server.
- the pose recommendation model can take the target feature of the subject and the scene feature of the scene where the subject is located as input, and can take a pose that matches the target feature and scene feature. Image as output. Specifically, after the terminal device obtains the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located, the target feature and the scene feature can be formed into a two-tuple, and the formed two-tuple can be combined Input to the posture recommendation model, and the posture recommendation model can output a posture image containing the target posture based on the two-tuple.
- the pose recommendation model can take the target feature of the shooting object, the scene feature of the scene where the shooting object is located, and the shooting feature of the shooting object as input as a triplet, and can be related to the target feature , The scene feature and the posture image matching the photo feature as output.
- the photographing feature may be a characteristic of photographing preferences or photographing habits corresponding to the photographed subject.
- the terminal device obtains the target feature of the shooting object in the original image, the scene feature of the scene where the shooting object is located, and the shooting feature of the shooting object, the target feature, the scene feature, and the shooting feature can be formed into a triplet , And the composed triples can be input to the posture recommendation model, and the posture recommendation model can output a posture image containing the target posture based on the triples.
- the terminal device after the terminal device recognizes the subject in the original image, it can also acquire the photographic characteristics of the subject, and can acquire the posture based on the target characteristics of the subject, the scene characteristics of the scene where the subject is located, and the photographic characteristics of the subject image.
- the terminal device may obtain the photographic characteristics of the photographed object according to the identity mark information of the photographed object.
- the terminal device may also acquire the photographing feature corresponding to the terminal device according to the device identification information of the terminal device, and may determine the acquired photographing characteristic corresponding to the terminal device as the photographing characteristic of the photographing object.
- the photographic characteristics of each photographed object can be obtained by image analysis of the historical photographed images of each photographed object in advance, and the photographic characteristics of each photographed object can be compared with the identity mark information of each photographed object. Save associatively.
- the terminal device acquires the posture image according to the target characteristics of the photographed object and the scene characteristics of the scene where the photographed object is located, or the terminal device is based on the target characteristic of the photographed object, the scene characteristic of the scene where the photographed object is located, and
- the terminal device is based on the target characteristic of the photographed object, the scene characteristic of the scene where the photographed object is located, and
- the sample image may be an image collected in advance and stored in the terminal device or stored in a cloud server connected to the terminal device, or it may be an image captured from the network in real time during the photographing process.
- the terminal device when the terminal device acquires a sample image, the terminal device can directly determine the acquired sample image as the posture image acquired by the terminal device; and when the terminal device acquires multiple sample images , The terminal device can select a target sample image from the multiple sample images, and can determine the selected target sample image as the posture image acquired by the terminal device.
- the terminal device can first obtain the recommended value corresponding to each sample image, and then can select the sample image with the highest recommended value as the target sample image, and can determine the selected target sample image as the target sample image.
- the posture image acquired by the terminal device is used to recommend the posture image through the recommended value, which helps to improve the recommendation accuracy and recommendation efficiency of the posture image.
- the recommended value corresponding to the sample image may be determined according to the number of historical recommendations of the sample image within a preset time. For example, it can be determined according to the number of historical recommendations of the sample images in the past week. The sample images with more historical recommendations have higher recommended values; the sample images with fewer historical recommendations have corresponding values. The recommended value of is lower.
- the terminal device can select multiple target sample images from the multiple sample images, and can display the selected multiple target sample images, so that the photographer or The subject selects a pose image from the multiple target sample images.
- the terminal device can also select the target sample image according to the recommended value corresponding to each sample image, that is, the first N sample images with high recommended value can be selected from the sample images as the target sample image, where N is An integer greater than or equal to 2.
- the terminal device can first sort the multiple sample images in descending order according to the recommended values to obtain a descending sorted group.
- the recommended value is higher. The higher the order of the sample images, the higher the order of the sample images, and the lower the order of the sample images of the lower the recommended value; then, the top N sample images in the descending order can be selected as the target sample images.
- the multiple target sample images may be sequentially displayed on the display interface of the terminal device.
- these multiple target sample images can be displayed in the lower left corner, lower right corner, upper left corner, or upper right corner of the display interface in sequence, so that the photographer or the subject can select pose images from the multiple target sample images .
- the photographer or the subject can select the posture image by double-clicking the target sample image, or can select the posture image by triple-clicking the target sample image. This is not limited.
- the photographer or the shooting object can switch the target sample image through a sliding operation. For example, you can switch to the previous target sample image by swiping to the left, and switch to the next target sample image by swiping to the right. For example, you can switch to the next target sample image by swiping to the left, and switch to the previous target sample image by swiping to the right. For example, you can switch to the previous target sample image by swiping up, and switch to the next target sample image by swiping down. For example, it is possible to switch to the next target sample image by swiping up, and switch to the previous target sample image by swiping down, which is not limited in the embodiment of the present application.
- the terminal device may determine the display sequence corresponding to each target sample image, and may sequentially display the target sample images on the display interface of the terminal device according to the display sequence.
- the terminal device may determine the display sequence corresponding to each target sample image, and may sequentially display the target sample images on the display interface of the terminal device according to the display sequence.
- the terminal device can determine the display sequence corresponding to each target sample image according to the recommended value corresponding to each target sample image, wherein the target sample image with a larger recommended value is displayed on the display interface first, and the recommended value is smaller The target sample image of is later displayed on the display interface.
- the terminal device when the terminal device displays each target sample image on the display interface, it can also display the recommended value corresponding to each target sample image, so that it is convenient for the subject and/or the photographer to select the posture image according to the recommended value
- the recommended value may be a specific value, for example, it may be a specific value such as 90 or 95.
- the recommendation value may also be a recommendation index, for example, it may be a 5-star recommendation index, a 4-star recommendation index, a 3-star recommendation index, and so on.
- the posture image can be superimposed on the original image, that is, the target posture contained in the posture image can be superimposed on the original image, and the original image superimposed on the target posture can be used as
- the preview image is displayed on the display interface of the terminal device.
- the preview image as shown in FIG. 7 can be displayed on the display interface of the terminal device, so that the target posture in the preview image can be passed Guide the subject to adjust the posture and/or standing position, improve the efficiency of posture adjustment, improve the efficiency of photographing, and enhance the user experience.
- the terminal device may instruct the photographed subject to adjust the posture and/or standing position through the form of voice playback and/or text display, for example, instruct the photographed subject to be embedded in the target posture.
- the terminal device may first obtain the first image size and size corresponding to the original image.
- the second image size corresponding to the posture image, and the second image size corresponding to the posture image can be adjusted according to the first image size, so as to adjust the second image size corresponding to the posture image to the first image size.
- the posture image superimposed on the original image may be a binary mask with the same size as the original image.
- the original image may be a first layer
- the binary mask may be a second layer
- the posture image and the original image are superimposed by superimposing the second layer on the first layer.
- each pixel in the binary mask corresponds to each pixel in the original image respectively.
- the pixel value of the pixel corresponding to the target posture in the binary mask is 1 (that is, the pixel corresponding to the target posture in the binary mask is white), and the pixel value of the pixel other than the target posture in the binary mask is
- the pixel value is 0 (that is, the pixels other than the target pose in the binary mask are black), that is, when the pose image is superimposed on the original image, the target pose can completely hide the content of the corresponding position in the original image.
- the position other than the target pose is completely transparent, that is, the position other than the target pose can display the content of the corresponding position in the original image, so that the target pose in the pose image can be merged into the current photo scene To guide the subject in posture adjustments.
- the terminal device after the terminal device obtains the posture image, it can add a layer mask to the posture image, where the position corresponding to the target posture in the layer mask (that is, the pixel corresponding to the target posture) can be set to white, and The position of the layer mask other than the target pose (that is, the pixel points other than the target pose) can be set to black to obtain the binary mask corresponding to the pose image, and the pose image with the layer mask (ie The binary mask of the posture image) and the original image are superimposed and displayed as a preview image, that is, the target posture in the posture image is superimposed on the original image to obtain a preview image, and the obtained preview image can be displayed on the terminal device In the display interface of to guide the subject to adjust the posture.
- the position corresponding to the target posture in the layer mask that is, the pixel corresponding to the target posture
- the position of the layer mask other than the target pose that is, the pixel points other than the target pose
- the pose image with the layer mask ie
- the terminal device can also use image segmentation technology to segment the target posture from the posture image, the segmented target posture can be superimposed on the original image, and the target posture can be superimposed on the target posture.
- the original image is displayed as a preview image.
- the terminal device may first obtain the first position of the target posture in the posture image, and then determine the second position of the target posture in the original image according to the first position, and can superimpose the target posture To the second position of the original image.
- the terminal device may first determine the first position of the target posture in the posture image, and then can find the original image according to the correspondence between the pixels in the posture image and the pixels in the original image In the target pixel point corresponding to the target posture, the second position of the target posture in the original image can be determined according to the target pixel point.
- the photographer can adjust the shooting angle and/or shooting position by moving the terminal device, and in the process of adjusting the shooting angle and/or shooting position, the terminal The device can obtain the adjusted original image in real time, and can obtain the posture image according to the adjusted original image, and can superimpose the obtained posture image and the adjusted original image and display it as a preview image, so that the target posture can change with the scene Dynamically adjust the position to improve the recommendation effect of the target posture, improve the photographing effect, and enhance the user experience.
- the photographer can adjust the shooting angle and/or shooting position by moving the terminal device, and in the process of adjusting the shooting angle and/or shooting position, the terminal The device can determine the target position of the target pose in the preview image of the current frame according to the relative position of the target pose in the preview image of the previous frame and the foreground part and/or background part of the preview image, and can preview the target pose in the current frame
- the target posture is displayed at the target position of the image, so that the target posture may not move with the movement of the terminal device, which reduces the difficulty of use by the photographer and improves the photographing effect.
- the current frame preview as shown in FIG. 8 may be displayed on the display interface of the terminal device. Image, so that the target posture and the shooting scene remain relatively fixed.
- the terminal device can obtain the current posture of the subject in real time, and can determine the current posture and The degree of matching between the target postures can thereby guide the subject to adjust the posture according to the degree of matching.
- the matching degree between the current posture and the target posture may be determined by any existing matching degree calculation method, which is not limited in the embodiment of the present application.
- the matching degree can also be displayed on the display interface of the terminal device in real time, so that the subject and/or the photographer can clearly understand the subject’s photo pose The specific fit with the target posture in the posture image.
- the terminal device can perform posture comparison to find out the current posture and the target posture Therefore, the subject can be prompted to adjust the posture according to the different position. For example, the subject may be prompted to adjust the posture through voice playback and/or the subject may be prompted to adjust the posture through text display.
- the preset threshold value should be understood as a threshold value preset in the terminal device. The preset threshold value may be set by the user where the terminal device is located, or may be set by default by the terminal device system.
- the terminal device can also generate a three-dimensional model corresponding to the target posture according to the current scene, and can fuse the three-dimensional model into the original image and display it as a preview image to pass Three-dimensional AR image for more precise and vivid posture guidance.
- the embodiment of the present application can identify the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located, and obtain a match with the shooting object by combining the target feature of the shooting object and the scene feature of the scene where the shooting object is located And the posture image of the scene where the shooting object is located can improve the accuracy and effectiveness of the posture image acquisition, so that the obtained posture image meets the photographing requirements of the shooting object and the scene where the shooting object is currently located.
- the posture image and the original image as a preview image, and by displaying the target posture in the preview image, it is convenient to quickly guide the subject to adjust the posture according to the target posture in the preview image, which improves the efficiency of posture adjustment and the efficiency of taking pictures. , In order to effectively improve the shooting effect of the image and enhance the user experience.
- FIG. 9 shows a structural block diagram of an auxiliary photographing device provided in an embodiment of the present application. For ease of description, only parts related to the embodiment of the present application are shown.
- the auxiliary photographing device may include:
- the target feature recognition module 901 is configured to obtain an original image, and recognize the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located;
- the posture image acquisition module 902 is configured to obtain a posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located, and the posture image contains the target posture to be recommended;
- the posture image superimposing module 903 is configured to superimpose and display the posture image and the original image as a preview image, so as to guide the subject to perform posture adjustment according to the target posture in the preview image.
- the posture image superimposing module 903 may include:
- the first posture image superimposing unit is used to add a layer mask to the posture image, and superimpose and display the posture image with the added layer mask and the original image as the preview image, in the layer mask
- the position corresponding to the target posture is set to white, and the position other than the target posture in the layer mask is set to black.
- the posture image superimposing module 903 may further include:
- a posture image segmentation unit for segmenting the target posture from the posture image
- the second posture image superimposing unit is configured to superimpose the target posture on the original image, and display the original image superimposed on the target posture as a preview image.
- the second posture image superimposing unit may include:
- the first position acquisition subunit is configured to acquire the first position of the target posture in the posture image
- the second position determination subunit is configured to determine the second position of the target posture in the original image according to the first position, and superimpose the target posture on the second position of the original image.
- the posture image acquisition module 902 may include:
- a photographing feature acquiring unit configured to acquire a photographing characteristic of the photographing object, where the photographing characteristic is a photographing preference characteristic corresponding to the photographing object;
- the first posture image obtaining unit is configured to obtain the posture image according to the target feature and the photographing feature of the shooting object and the scene feature of the scene where the shooting object is located.
- the posture image acquisition module 902 may include:
- a sample image acquisition unit configured to acquire at least one sample image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located;
- a recommended value obtaining unit configured to obtain a recommended value corresponding to the at least one sample image
- the second posture image obtaining unit is configured to select a target sample image from the at least one sample image according to the recommended value, and obtain the posture image according to the target sample image.
- the auxiliary photographing device may further include:
- An image size obtaining module configured to obtain a first image size corresponding to the original image and a second image size corresponding to the posture image;
- the image size adjustment module is configured to adjust the second image size corresponding to the posture image according to the first image size corresponding to the original image, so as to adjust the second image size corresponding to the posture image to the first image size .
- the auxiliary photographing device may further include:
- the current posture acquisition module is used to acquire the current posture of the photographed object
- the current posture matching module is used to determine the degree of matching between the current posture and the target posture, and guide the subject to adjust the posture according to the degree of matching.
- FIG. 10 is a schematic structural diagram of a terminal device provided by an embodiment of this application.
- the terminal device 10 of this embodiment includes: at least one processor 1000 (only one is shown in FIG. 10), a memory 1001, and stored in the memory 1001 and can be stored in the at least one processor 1000.
- the processor 1000 executes the computer program 1002 the steps in any of the foregoing embodiments of the auxiliary photographing method are implemented.
- the terminal device 10 may include, but is not limited to, a processor 1000 and a memory 1001. Those skilled in the art can understand that FIG. 10 is only an example of the terminal device 10, and does not constitute a limitation on the terminal device 10. It may include more or less components than shown in the figure, or a combination of certain components, or different components. , For example, can also include input and output devices, network access devices, and so on.
- the processor 1000 may be a central processing unit (Central Processing Unit, CPU), and the processor 1000 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). , ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
- the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
- the memory 1001 may be an internal storage unit of the terminal device 10 in some embodiments, such as a hard disk or a memory of the terminal device 10. In other embodiments, the memory 1001 may also be an external storage device of the terminal device 10, for example, a plug-in hard disk equipped on the terminal device 10, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc. Further, the memory 1001 may also include both an internal storage unit of the terminal device 10 and an external storage device.
- the memory 1001 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 1001 can also be used to temporarily store data that has been output or will be output.
- the terminal device involved in the embodiment of the present application may be a mobile phone, a tablet computer, a wearable device, and the like. Take the terminal device as a mobile phone as an example.
- FIG. 11 shows a block diagram of a part of the structure of a mobile phone provided in an embodiment of the present application.
- the mobile phone includes: a radio frequency (RF) circuit 1110, a memory 1120, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a wireless fidelity (WiFi) module 1170, and a processor 1180 , And power supply 1190 and other components.
- RF radio frequency
- the structure of the mobile phone shown in FIG. 11 does not constitute a limitation on the mobile phone, and may include more or fewer components than those shown in the figure, or a combination of some components, or different component arrangements.
- the RF circuit 1110 can be used for receiving and sending signals during the process of sending and receiving information or talking. In particular, after receiving the downlink information of the base station, it is processed by the processor 1180; in addition, the designed uplink data is sent to the base station.
- the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like.
- the RF circuit 1110 can also communicate with the network and other devices through wireless communication.
- the above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), Email, Short Messaging Service (SMS), etc.
- GSM Global System of Mobile Communication
- GPRS General Packet Radio Service
- CDMA Code Division Multiple Access
- WCDMA Wideband Code Division Multiple Access
- LTE Long Term Evolution
- Email Short Messaging Service
- the memory 1120 may be used to store software programs and modules.
- the processor 1180 executes various functional applications and data processing of the mobile phone 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 an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc.
- the memory 1120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
- the input unit 1130 may be used to receive inputted digital or character information, and generate key signal input related to user settings and function control of the mobile phone.
- the input unit 1130 may include a touch panel 1131 and other input devices 1132.
- the touch panel 1131 also called a touch screen, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 1131 or near the touch panel 1131. Operation), and drive the corresponding connection device according to the preset program.
- the touch panel 1131 may include two parts: a touch detection device and a touch controller.
- the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 1180, and can receive and execute the commands sent by the processor 1180.
- the touch panel 1131 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
- the input unit 1130 may also include other input devices 1132.
- other input devices 1132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick.
- the display unit 1140 may be used to display information input by the user or information provided to the user and various menus of the mobile phone.
- the display unit 1140 may include a display panel 1141.
- the display panel 1141 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
- the touch panel 1131 can cover the display panel 1141. When the touch panel 1131 detects a touch operation on or near it, it transmits it to the processor 1180 to determine the type of touch event, and then the processor 1180 responds to the touch event. The type provides corresponding visual output on the display panel 1141.
- the touch panel 1131 and the display panel 1141 are used as two independent components to implement the input and input functions of the mobile phone, but in some embodiments, the touch panel 1131 and the display panel 1141 can be integrated. Realize the input and output functions of mobile phones.
- the mobile phone may also include at least one sensor 1150, such as a light sensor, a motion sensor, and other sensors.
- the light sensor can 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 brightness of the ambient light.
- the proximity sensor can close the display panel 1141 and/or when the mobile phone is moved to the ear. Or backlight.
- the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three-axis), and can detect the magnitude and direction of gravity when it is stationary.
- the audio circuit 1160, the speaker 1161, and the microphone 1162 can provide an audio interface between the user and the mobile phone.
- the audio circuit 1160 can transmit the electrical signal converted from the received audio data to the speaker 1161, which is converted into a sound signal by the speaker 1161 for output; on the other hand, the microphone 1162 converts the collected sound signal into an electrical signal, and the audio circuit 1160 After being received, the audio data is converted into audio data, and then processed by the audio data output processor 1180, and sent to, for example, another mobile phone via the RF circuit 1110, or the audio data is output to the memory 1120 for further processing.
- WiFi is a short-distance wireless transmission technology.
- the mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1170. It provides users with wireless broadband Internet access.
- FIG. 11 shows the WiFi module 1170, it is understandable that it is not a necessary component of the mobile phone, and can be omitted as needed without changing the essence of the invention.
- the processor 1180 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes by running or executing software programs and/or modules stored in the memory 1120, and calling data stored in the memory 1120. Various functions and processing data of the mobile phone can be used to monitor the mobile phone as a whole.
- the processor 1180 may include one or more processing units; preferably, the processor 1180 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc. , The modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 1180.
- the mobile phone may also include a power source (such as a battery) for supplying power to various components.
- a power source such as a battery
- the power source may be logically connected to the processor 1180 through a power management system, so that functions such as charging, discharging, and power consumption management can be managed through the power management system.
- the mobile phone may also include a camera 1190.
- the position of the camera 1190 on the mobile phone may be front-mounted or rear-mounted, which is not limited in the embodiment of the present application.
- the camera 1190 can obtain the optical image generated by the photographed object, and can convert the optical image into an electrical signal, and then can convert the electrical signal into a digital signal through analog-to-digital conversion, and then process the digital signal through the digital signal processor DSP
- the processed digital signal can be sent to the processor 1180 for processing, and finally converted into an image that can be seen in the display unit 1140.
- the mobile phone may include a single camera, a dual camera, or a triple camera, etc., which is not limited in the embodiment of the present application.
- a mobile phone may include three cameras, of which one is a main camera, one is a wide-angle camera, and one is a telephoto camera.
- the multiple cameras may be all front-mounted, or all rear-mounted, or part of the front-mounted and some rear-mounted, which is not limited in this embodiment of the present application.
- the mobile phone may also include a Bluetooth module, etc., which will not be repeated here.
- the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in each of the foregoing method embodiments can be implemented.
- the embodiments of the present application provide a computer program product.
- the terminal device can implement the steps in the foregoing method embodiments when executed.
- the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
- the computer program can be stored in a computer-readable storage medium.
- the computer program can be stored in a computer-readable storage medium.
- the steps of the foregoing method embodiments can be implemented.
- the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
- the computer-readable storage medium may at least include: any entity or device capable of carrying computer program code to the device/terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), and random access memory (RAM, Random Access Memory), electric carrier signal, telecommunications signal and software distribution medium.
- ROM read-only memory
- RAM random access memory
- electric carrier signal telecommunications signal and software distribution medium.
- U disk mobile hard disk, floppy disk or CD-ROM, etc.
- computer-readable storage media cannot be electrical carrier signals and telecommunication signals.
- the disclosed device/terminal device and method may be implemented in other ways.
- the device/terminal device embodiments described above are only illustrative.
- the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units.
- components can be combined or integrated into another system, or some features can be omitted or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Studio Devices (AREA)
Abstract
The present application is applicable to the technical field of terminals, and in particular, relates to an auxiliary photographing method and apparatus for an artificial intelligence (AI) terminal, a terminal device, and a computer-readable storage medium. The auxiliary photographing method comprises: acquiring an original image and recognizing a target feature of a photographing object and a scene feature of the scene where the photographing object is located in the original image; acquiring a posture image according to the target feature of the photographing object and the scene feature of the scene where the photographing object is located, the posture image comprising a target posture to be recommended; superimposing the posture image and the original image to display as a preview image, so as to guide the photographing object to perform posture adjustment according to the target posture in the preview image, such that the photographing object can be quickly guided to adjust the posture according to the target posture in the preview image, thus improving the posture adjustment efficiency and improving the photographing efficiency, thereby effectively improving the image photographing effect and user experience.
Description
本申请要求于2019年12月31日提交国家知识产权局、申请号为201911423536.3、申请名称为“辅助拍照方法、装置、终端设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office on December 31, 2019, the application number is 201911423536.3, and the application name is "assisted photographing method, device, terminal equipment and storage medium", the entire content of which is by reference Incorporated in this application.
本申请属于终端技术技术领域,尤其涉及人工智能(Artificial Intelligence,AI)终端的辅助拍照方法、装置、终端设备及计算机可读存储介质。This application belongs to the technical field of terminal technology, and in particular relates to an artificial intelligence (AI) terminal assisted photographing method, device, terminal device, and computer-readable storage medium.
随着拍照技术的不断发展和终端设备的广泛普及,终端设备的拍照功能被广泛使用,越来越多的用户利用手机、平板电脑等终端设备进行拍照,极大地提高了拍照的方便性和便捷性。但很多不擅长拍照的人,在拍照时往往不知道该怎么摆拍照姿势,导致拍摄出的图像僵硬、老套,影响拍摄效果。With the continuous development of camera technology and the widespread popularity of terminal equipment, the camera function of terminal equipment is widely used. More and more users use mobile phones, tablet computers and other terminal equipment to take pictures, which greatly improves the convenience and convenience of taking pictures. Sex. However, many people who are not good at taking pictures often do not know how to pose when taking pictures, which leads to stiff and old-fashioned images and affects the shooting effect.
发明内容Summary of the invention
本申请实施例提供了一种辅助拍照方法、装置、终端设备及计算机可读存储介质,可以快速指导拍摄对象进行姿势调整,提高图像的拍摄效果。The embodiments of the present application provide an auxiliary photographing method, a device, a terminal device, and a computer-readable storage medium, which can quickly guide a photographed subject to adjust the posture and improve the photographing effect of an image.
第一方面,本申请实施例提供了一种辅助拍照方法,包括:In the first aspect, an embodiment of the present application provides an auxiliary photographing method, including:
获取原始图像,并识别所述原始图像中拍摄对象的目标特征和所述拍摄对象所在场景的场景特征;Acquiring an original image, and identifying the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located;
根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取姿势图像,所述姿势图像中包含待推荐的目标姿势;Acquiring a posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located, where the posture image contains the target posture to be recommended;
将所述姿势图像与所述原始图像叠加显示为预览图像,以根据所述预览图像中的所述目标姿势指导所述拍摄对象进行姿势调整。The posture image and the original image are superimposed and displayed as a preview image, so as to guide the photographic subject to perform posture adjustment according to the target posture in the preview image.
示例的,该原始图像可以是显示界面中预览的第一帧预览图像,或者也可以是显示界面中预览的第一帧之后的第N帧预览图像。示例的,该原始图像可以是摄像头实时采集的第一帧图像,或者也可以是摄像头实时采集的第一帧之后的第N帧图像,其中,N为大于1的整数。For example, the original image may be the first frame preview image previewed in the display interface, or may also be the Nth frame preview image after the first frame previewed in the display interface. For example, the original image may be the first frame image captured by the camera in real time, or it may be the Nth frame image after the first frame captured by the camera in real time, where N is an integer greater than 1.
应理解,在获取原始图像后,可以首先通过人工智能识别技术对该原始图像进行图像识别,以确定该原始图像中是否存在拍摄对象。若该原始图像中存在拍摄对象,则可以进一步识别拍摄对象的目标特征以及拍摄对象所在场景的场景特征。其中,拍摄对象的目标特征可以包括拍摄对象的人数、性别、年龄、身高、体型等中的一个或者多个。It should be understood that after acquiring the original image, the original image may be recognized by artificial intelligence recognition technology first to determine whether there is a photographed object in the original image. If there is a photographed object in the original image, the target feature of the photographed object and the scene characteristic of the scene where the photographed object is located can be further identified. Among them, the target characteristics of the photographed object may include one or more of the number of photographed objects, gender, age, height, body type, and the like.
示例的,可以通过终端设备设置的TOF深度相机来获取拍摄对象的身高、体型等目标特征。示例的,可以通过终端设备中设置的人脸识别模型,来识别该原始图像中拍摄对象的人数、性别、年龄等目标特征。示例的,可以通过终端设备中设置的场景识别模型来获取该原始图像中拍摄对象所在场景的场景特征。For example, a TOF depth camera set by a terminal device can be used to obtain target features such as the height and body shape of the subject. For example, a face recognition model set in the terminal device can be used to recognize target characteristics such as the number, gender, and age of the subject in the original image. For example, the scene characteristics of the scene where the shooting object in the original image is located can be obtained through a scene recognition model set in the terminal device.
在一种可能的实现方式中,所述将所述姿势图像与所述原始图像叠加显示为预览图像可以包括:In a possible implementation manner, the superimposing and displaying the posture image and the original image as a preview image may include:
为所述姿势图像添加图层蒙版,并将添加图层蒙版的姿势图像与所述原始图像叠加显示为所述预览图像,所述图层蒙版中所述目标姿势对应的位置设置为白色,所述图层蒙版中除所述目标姿势以外的位置设置为黑色。A layer mask is added to the posture image, and the posture image with the added layer mask and the original image are superimposed and displayed as the preview image, and the position corresponding to the target posture in the layer mask is set to White, the position in the layer mask except the target pose is set to black.
需要说明的是,叠加至该原始图像的姿势图像可以为一个与该原始图像的大小相同的二进制蒙版,该二进制蒙版中的各像素点分别与该原始图像中的各像素点一一对应。示例的,该二进制蒙版中目标姿势对应的像素点的像素值为1(即该二进制蒙版中目标姿势对应的像素点为白色),而该二进制蒙版中除目标姿势以外的像素点的像素值为0(即该二进制蒙版中除目标姿势以外的像素点为黑色),以将该姿势图像中的目标姿势融合至当前的拍照场景来指导拍摄对象进行姿势调整。It should be noted that the posture image superimposed on the original image can be a binary mask of the same size as the original image, and each pixel in the binary mask corresponds to each pixel in the original image one-to-one. . For example, the pixel value of the pixel corresponding to the target posture in the binary mask is 1 (that is, the pixel corresponding to the target posture in the binary mask is white), and the pixel value of the pixel other than the target posture in the binary mask is The pixel value is 0 (that is, pixels other than the target posture in the binary mask are black), and the target posture in the posture image is merged into the current photographing scene to guide the subject to adjust the posture.
具体地,在获取到姿势图像后,可以为该姿势图像添加图层蒙版,其中,图层蒙版中目标姿势对应的位置(即目标姿势对应的像素点)可以设置为白色,该图层蒙版中除目标姿势以外的位置(即目标姿势以外的像素点)则可以设置为黑色,以得到该姿势图像对应的二进制蒙版,并可以将添加图层蒙版的姿势图像(即该姿势图像的二进制蒙版)与该原始图像叠加显示为预览图像,即将该姿势图像中的目标姿势叠加至该原始图像,来得到预览图像,并可以将所得到的预览图像显示在显示界面中,以此指导拍摄对象进行姿势调整。Specifically, after the posture image is obtained, a layer mask can be added to the posture image, where the position corresponding to the target posture in the layer mask (that is, the pixel corresponding to the target posture) can be set to white, and the layer The position of the mask other than the target pose (that is, the pixel points other than the target pose) can be set to black to obtain the binary mask corresponding to the pose image, and the pose image with the layer mask (that is, the pose The binary mask of the image) and the original image are superimposed and displayed as a preview image, that is, the target posture in the posture image is superimposed on the original image to obtain a preview image, and the obtained preview image can be displayed on the display interface. This guides the subject to make posture adjustments.
在另一种可能的实现方式中,所述将所述姿势图像与所述原始图像叠加显示为预览图像可以包括:In another possible implementation manner, the superimposing and displaying the posture image and the original image as a preview image may include:
从所述姿势图像中分割出所述目标姿势;Segmenting the target posture from the posture image;
将所述目标姿势叠加至所述原始图像,并将叠加所述目标姿势的所述原始图像显示为预览图像。The target posture is superimposed on the original image, and the original image superimposed on the target posture is displayed as a preview image.
具体地,所述将所述目标姿势叠加至所述原始图像可以包括:Specifically, the superimposing the target pose on the original image may include:
获取所述目标姿势在所述姿势图像中的第一位置;Acquiring the first position of the target posture in the posture image;
根据所述第一位置确定所述目标姿势在所述原始图像中的第二位置,并将所述目标姿势叠加至所述原始图像的第二位置处。The second position of the target posture in the original image is determined according to the first position, and the target posture is superimposed at the second position of the original image.
应理解,本申请实施例中,也可以利用图像分割技术从姿势图像中分割出目标姿势,并可以将分割出的目标姿势叠加至原始图像,然后可以将叠加该目标姿势的该原始图像显示为预览图像。It should be understood that in the embodiments of the present application, the image segmentation technology can also be used to segment the target posture from the posture image, and the segmented target posture can be superimposed on the original image, and then the original image superimposed on the target posture can be displayed as Preview image.
示例的,可以首先确定该目标姿势在该姿势图像中的第一位置,然后可以根据该姿势图像中的像素点与该原始图像中的像素点之间的对应关系,找到该原始图像中与该目标姿势对应的目标像素点,从而可以根据目标像素点确定该目标姿势在该原始图像中的第二位置。For example, the first position of the target posture in the posture image can be determined first, and then according to the correspondence between the pixels in the posture image and the pixels in the original image, the original image and the pixel points in the original image can be found. The target pixel point corresponding to the target posture, so that the second position of the target posture in the original image can be determined according to the target pixel point.
可选地,所述根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取姿势图像可以包括:Optionally, the acquiring a posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located may include:
获取所述拍摄对象的拍照特征,所述拍照特征为所述拍摄对象对应的拍照喜好特征;Acquiring a photographing feature of the photographing object, where the photographing characteristic is a photographing preference characteristic corresponding to the photographing object;
根据所述拍摄对象的目标特征和拍照特征以及所述拍摄对象所在场景的场景特征获取所述姿势图像。The posture image is acquired according to the target feature and the photographing feature of the shooting object and the scene feature of the scene where the shooting object is located.
需要说明的是,本申请实施例中,在识别出该原始图像中的拍摄对象后,还可以获取拍摄对象的拍照特征,并可以根据拍摄对象的目标特征、拍摄对象所在场景的场景特征以及拍摄对象的拍照特征获取姿势图像。其中,拍照特征可以为拍摄对象对应的拍照喜好或者拍照习惯等特征。It should be noted that, in the embodiments of the present application, after the subject in the original image is identified, the photographic characteristics of the subject can also be acquired, and the characteristics of the subject can be obtained according to the target characteristics of the subject, the scene characteristics of the scene where the subject is located, and the shooting The photographic features of the subject acquire the posture image. Among them, the photographing feature may be a characteristic of photographing preferences or photographing habits corresponding to the photographed subject.
示例的,可以根据拍摄对象的身份标志信息获取拍摄对象的拍照特征。示例的,也可以根据终端设备的设备标识信息获取该终端设备对应的拍照特征,并可以将所获取的该终端设备对应的 拍照特征确定为该拍摄对象的拍照特征。For example, the photographic characteristics of the photographed object may be obtained according to the identity mark information of the photographed object. For example, the photographing feature corresponding to the terminal device may also be acquired according to the device identification information of the terminal device, and the acquired photographing characteristic corresponding to the terminal device may be determined as the photographing characteristic of the subject.
应理解,可以事先通过对各拍摄对象的历史拍照图像进行图像分析来获取各拍摄对象的拍照特征,并可以将各拍摄对象的拍照特征与各拍摄对象的身份标志信息进行关联保存。本申请实施例中,也可以事先对各终端设备中的历史拍照图像进行图像分析来获取各终端设备对应的拍照特征,并可以将各终端设备对应的拍照特征与各终端设备的设备标识信息进行关联保存。It should be understood that the photographic characteristics of each photographed object may be obtained by image analysis of the historical photographed images of each photographed object in advance, and the photographed characteristics of each photographed object may be associated and saved with the identity mark information of each photographed object. In the embodiments of this application, it is also possible to perform image analysis on the historical photographed images in each terminal device in advance to obtain the photographing characteristics corresponding to each terminal device, and to compare the photographing characteristics corresponding to each terminal device with the device identification information of each terminal device. Save associatively.
可选地,所述根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取姿势图像包括:Optionally, the acquiring a posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located includes:
根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取至少一张样本图像;Acquiring at least one sample image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located;
获取所述至少一张样本图像对应的推荐值;Acquiring the recommended value corresponding to the at least one sample image;
根据所述推荐值从所述至少一张样本图像中选取目标样本图像,并根据所述目标样本图像获取所述姿势图像。A target sample image is selected from the at least one sample image according to the recommended value, and the posture image is acquired according to the target sample image.
需要说明的是,在根据拍摄对象的目标特征和拍摄对象所在场景的场景特征进行姿势图像的获取时,或者在根据拍摄对象的目标特征、拍摄对象所在场景的场景特征以及拍摄对象的拍照特征进行姿势图像的获取时,可以获取一张或者多张样本图像,并可以根据所获取的样本图像来进行姿势图像的获取。其中,样本图像可以是事先采集并存储于终端设备或者存储于与该终端设备相连接的云端服务器中的图像,也可以是在拍照过程中实时从网络中抓取的图像。It should be noted that when the posture image is acquired according to the target characteristics of the subject and the scene characteristics of the scene where the subject is located, or according to the target characteristics of the subject, the scene characteristics of the scene where the subject is located, and the photographic characteristics of the subject When acquiring the posture image, one or more sample images can be acquired, and the posture image can be acquired according to the acquired sample images. The sample image may be an image collected in advance and stored in a terminal device or stored in a cloud server connected to the terminal device, or it may be an image captured from the network in real time during the photographing process.
应理解,当获取到一张样本图像时,则可以将所获取的这一张样本图像直接确定为姿势图像;而当获取到多张样本图像时,则可以从这多张样本图像选取一张目标样本图像,并可以将所选取的这一张目标样本图像确定为姿势图像。It should be understood that when a sample image is obtained, the obtained sample image can be directly determined as a posture image; and when multiple sample images are obtained, one can be selected from the multiple sample images. The target sample image, and the selected target sample image can be determined as a posture image.
具体地,当获取到多张样本图像时,则可以首先获取每一张样本图像对应的推荐值,然后可以选择推荐值最高的一张样本图像作为目标样本图像,并可以将所选取的这一张目标样本图像确定为姿势图像,以通过推荐值进行姿势图像的推荐,有助于提高姿势图像的推荐准确性和推荐效率。Specifically, when multiple sample images are obtained, the recommended value corresponding to each sample image can be obtained first, and then the sample image with the highest recommended value can be selected as the target sample image, and the selected one can be selected as the target sample image. A target sample image is determined as a posture image, and the posture image is recommended through the recommended value, which helps to improve the recommendation accuracy and recommendation efficiency of the posture image.
可选地,样本图像对应的推荐值可以根据样本图像在预设时间内的历史推荐数量来确定。例如,可以根据样本图像在过去一周内的历史推荐数量来确定,其中,历史推荐数量越多的样本图像,其所对应的推荐值则越高;历史推荐数量越少的样本图像,其所对应的推荐值则越低。Optionally, the recommended value corresponding to the sample image may be determined according to the number of historical recommendations of the sample image within a preset time. For example, it can be determined according to the number of historical recommendations of the sample images in the past week. The sample images with more historical recommendations have higher recommended values; the sample images with fewer historical recommendations have corresponding values. The recommended value of is lower.
应理解,当获取到多张样本图像时,可以从这多张样本图像选取多张目标样本图像,并可以对所选取的多张目标样本图像进行显示,以使得拍摄者或者拍摄对象从这多张目标样本图像中进行姿势图像的选择。在此,可以根据各样本图像对应的推荐值来进行目标样本图像的选择,即可以从样本图像中选择推荐值高的前N张样本图像来作为目标样本图像,其中,N为大于或等于2的整数。It should be understood that when multiple sample images are acquired, multiple target sample images can be selected from the multiple sample images, and the selected multiple target sample images can be displayed, so that the photographer or the photographed object can be selected from these multiple sample images. Select the posture image from the target sample images. Here, the target sample image can be selected according to the recommended value corresponding to each sample image, that is, the first N sample images with high recommended value can be selected from the sample images as the target sample image, where N is greater than or equal to 2. Integer.
具体地,可以根据各目标样本图像所对应的推荐值来确定各目标样本图像对应的显示顺序,其中,推荐值越大的目标样本图像越先显示于显示界面,而推荐值越小的目标样本图像则越后显示于显示界面。Specifically, the display order corresponding to each target sample image can be determined according to the recommended value corresponding to each target sample image, wherein the target sample image with the larger recommended value is displayed on the display interface first, and the target sample with the smaller recommended value The image is later displayed on the display interface.
在一种可能的实现方式中,在所述将所述姿势图像与所述原始图像叠加显示为预览图像之前可以包括:In a possible implementation manner, before the superimposing and displaying the posture image and the original image as a preview image, the method may include:
获取所述原始图像对应的第一图像尺寸和所述姿势图像对应的第二图像尺寸;Acquiring a first image size corresponding to the original image and a second image size corresponding to the posture image;
根据所述原始图像对应的第一图像尺寸调整所述姿势图像对应的第二图像尺寸,以将所述姿势图像对应的第二图像尺寸调整至所述第一图像尺寸。The second image size corresponding to the posture image is adjusted according to the first image size corresponding to the original image, so as to adjust the second image size corresponding to the posture image to the first image size.
需要说明的是,在将姿势图像与原始图像叠加显示为预览图像之前,为确保该姿势图像能与该原始图像进行叠加,可以首先获取该原始图像对应的第一图像尺寸和该姿势图像对应的第二图像尺寸,并可以根据该第一图像尺寸来调整该姿势图像对应的第二图像尺寸,以将该姿势图像对应的第二图像尺寸调整至该第一图像尺寸。It should be noted that, before the posture image and the original image are superimposed and displayed as a preview image, in order to ensure that the posture image can be superimposed with the original image, the first image size corresponding to the original image and the posture image corresponding to the The second image size, and the second image size corresponding to the posture image can be adjusted according to the first image size, so as to adjust the second image size corresponding to the posture image to the first image size.
可选地,在所述将所述姿势图像与所述原始图像叠加显示为预览图像之后可以包括:Optionally, after the superimposing and displaying the posture image and the original image as a preview image may include:
获取所述拍摄对象的当前姿势;Acquiring the current posture of the shooting object;
确定所述当前姿势和所述目标姿势之间的匹配度,并根据所述匹配度指导所述拍摄对象进行姿势调整。The degree of matching between the current posture and the target posture is determined, and the shooting object is guided to adjust the posture according to the degree of matching.
应理解,在将该姿势图像与该原始图像叠加显示为预览图像,以根据预览图像对拍摄对象进行姿势指导后,还可以实时获取拍摄对象的当前姿势,并可以确定该当前姿势和该目标姿势之间的匹配度,从而可以根据匹配度指导拍摄对象进行姿势调整。It should be understood that after the posture image and the original image are superimposed and displayed as a preview image to guide the posture of the subject according to the preview image, the current posture of the subject can also be obtained in real time, and the current posture and the target posture can be determined The degree of matching between the two can guide the subject to adjust the posture according to the degree of matching.
示例的,在得到该当前姿势与该目标姿势之间的匹配度后,还可以将该匹配度实时显示于显示界面,以便拍摄对象和/或拍摄者清楚了解拍摄对象的拍照姿势与姿势图像中的目标姿势的具体贴合情况。For example, after obtaining the matching degree between the current posture and the target posture, the matching degree can also be displayed on the display interface in real time, so that the subject and/or the photographer can clearly understand the photographing posture and posture image of the subject The specific fit of the target posture.
需要说明的是,在获取到该当前姿势与该目标姿势之间的匹配度后,若该匹配度小于预设阈值,则可以进行姿势比较来找出该当前姿势与该目标姿势之间的区别位置,从而可以根据该区别位置来提示拍摄对象进行姿势调整。例如,可以通过语音播放的方式来提示拍摄对象进行姿势调整和/或可以通过文字显示的方式来提示拍摄对象进行姿势调整。It should be noted that after obtaining the matching degree between the current posture and the target posture, if the matching degree is less than the preset threshold, posture comparison can be performed to find the difference between the current posture and the target posture Position, so that the subject can be prompted to adjust the posture according to the distinguished position. For example, the subject may be prompted to adjust the posture through voice playback and/or the subject may be prompted to adjust the posture through text display.
第二方面,本申请实施例提供了一种辅助拍照装置,包括:In the second aspect, an embodiment of the present application provides an auxiliary photographing device, including:
目标特征识别模块,用于获取原始图像,并识别所述原始图像中拍摄对象的目标特征和所述拍摄对象所在场景的场景特征;The target feature recognition module is used to obtain the original image, and recognize the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located;
姿势图像获取模块,用于根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取姿势图像,所述姿势图像中包含待推荐的目标姿势;A posture image acquisition module, configured to acquire a posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located, the posture image contains the target posture to be recommended;
姿势图像叠加模块,用于将所述姿势图像与所述原始图像叠加显示为预览图像,以根据所述预览图像中的所述目标姿势指导所述拍摄对象进行姿势调整。The posture image superimposing module is configured to superimpose and display the posture image and the original image as a preview image, so as to guide the subject to perform posture adjustment according to the target posture in the preview image.
在一种可能的实现方式中,所述姿势图像叠加模块,可以包括:In a possible implementation manner, the posture image superimposing module may include:
第一姿势图像叠加单元,用于为所述姿势图像添加图层蒙版,并将添加图层蒙版的姿势图像与所述原始图像叠加显示为所述预览图像,所述图层蒙版中所述目标姿势对应的位置设置为白色,所述图层蒙版中除所述目标姿势以外的位置设置为黑色。The first posture image superimposing unit is used to add a layer mask to the posture image, and superimpose and display the posture image with the added layer mask and the original image as the preview image, in the layer mask The position corresponding to the target posture is set to white, and the position other than the target posture in the layer mask is set to black.
在另一种可能的实现方式中,所述姿势图像叠加模块,还可以包括:In another possible implementation manner, the posture image superimposing module may further include:
姿势图像分割单元,用于从所述姿势图像中分割出所述目标姿势;A posture image segmentation unit for segmenting the target posture from the posture image;
第二姿势图像叠加单元,用于将所述目标姿势叠加至所述原始图像,并将叠加所述目标姿势的所述原始图像显示为预览图像。The second posture image superimposing unit is configured to superimpose the target posture on the original image, and display the original image superimposed on the target posture as a preview image.
可选地,所述第二姿势图像叠加单元,可以包括:Optionally, the second posture image superimposing unit may include:
第一位置获取分单元,用于获取所述目标姿势在所述姿势图像中的第一位置;The first position acquisition subunit is configured to acquire the first position of the target posture in the posture image;
第二位置确定分单元,用于根据所述第一位置确定所述目标姿势在所述原始图像中的第二位置,并将所述目标姿势叠加至所述原始图像的第二位置处。The second position determination subunit is configured to determine the second position of the target posture in the original image according to the first position, and superimpose the target posture on the second position of the original image.
示例的,所述姿势图像获取模块,可以包括:For example, the posture image acquisition module may include:
拍照特征获取单元,用于获取所述拍摄对象的拍照特征,所述拍照特征为所述拍摄对象对应 的拍照喜好特征;A photographing feature acquiring unit, configured to acquire a photographing characteristic of the photographing object, where the photographing characteristic is a photographing preference characteristic corresponding to the photographing object;
第一姿势图像获取单元,用于根据所述拍摄对象的目标特征和拍照特征以及所述拍摄对象所在场景的场景特征获取所述姿势图像。The first posture image obtaining unit is configured to obtain the posture image according to the target feature and the photographing feature of the shooting object and the scene feature of the scene where the shooting object is located.
可选地,所述姿势图像获取模块,可以包括:Optionally, the posture image acquisition module may include:
样本图像获取单元,用于根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取至少一张样本图像;A sample image acquisition unit, configured to acquire at least one sample image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located;
推荐值获取单元,用于获取所述至少一张样本图像对应的推荐值;A recommended value obtaining unit, configured to obtain a recommended value corresponding to the at least one sample image;
第二姿势图像获取单元,用于根据所述推荐值从所述至少一张样本图像中选取目标样本图像,并根据所述目标样本图像获取所述姿势图像。The second posture image obtaining unit is configured to select a target sample image from the at least one sample image according to the recommended value, and obtain the posture image according to the target sample image.
在一种可能的实现方式中,所述辅助拍照装置还可以包括:In a possible implementation manner, the auxiliary photographing device may further include:
图像尺寸获取模块,用于获取所述原始图像对应的第一图像尺寸和所述姿势图像对应的第二图像尺寸;An image size obtaining module, configured to obtain a first image size corresponding to the original image and a second image size corresponding to the posture image;
图像尺寸调整模块,用于根据所述原始图像对应的第一图像尺寸调整所述姿势图像对应的第二图像尺寸,以将所述姿势图像对应的第二图像尺寸调整至所述第一图像尺寸。The image size adjustment module is configured to adjust the second image size corresponding to the posture image according to the first image size corresponding to the original image, so as to adjust the second image size corresponding to the posture image to the first image size .
可选地,所述辅助拍照装置还可以包括:Optionally, the auxiliary photographing device may further include:
当前姿势获取模块,用于获取所述拍摄对象的当前姿势;The current posture acquisition module is used to acquire the current posture of the photographed object;
当前姿势匹配模块,用于确定所述当前姿势和所述目标姿势之间的匹配度,并根据所述匹配度指导所述拍摄对象进行姿势调整。The current posture matching module is used to determine the degree of matching between the current posture and the target posture, and guide the subject to adjust the posture according to the degree of matching.
第三方面,本申请实施例提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述第一方面中任一项所述的辅助拍照方法。In the third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, The auxiliary photographing method according to any one of the above-mentioned first aspects is realized.
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面中任一项所述的辅助拍照方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium that stores a computer program that, when executed by a processor, implements any one of the above-mentioned aspects of the first aspect The auxiliary method of taking pictures.
第五方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行上述第一方面中任一项所述的辅助拍照方法。In the fifth aspect, the embodiments of the present application provide a computer program product, which when the computer program product runs on a terminal device, causes the terminal device to execute the auxiliary photographing method described in any one of the above-mentioned first aspects.
可以理解的是,上述第二方面至第五方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It is understandable that, for the beneficial effects of the second aspect to the fifth aspect described above, reference may be made to the relevant description in the first aspect described above, and details are not repeated here.
本申请实施例与现有技术相比存在的有益效果是:Compared with the prior art, the embodiments of this application have the following beneficial effects:
本申请实施例在获取原始图像后,可以识别该原始图像中拍摄对象的目标特征以及拍摄对象所在场景的场景特征,并通过结合拍摄对象的目标特征以及拍摄对象所在场景的场景特征获取符合拍摄对象以及拍摄对象所在场景的姿势图像,可以提高姿势图像获取的准确性和有效性,使得所获取的姿势图像符合拍摄对象以及拍摄对象当前所在场景的拍照需求。另外,通过将姿势图像与原始图像叠加显示为预览图像,通过在预览图像中进行目标姿势的显示,方便根据预览图像中的目标姿势快速指导拍摄对象进行姿势调整,提高姿势调整效率,提高拍照效率,以有效提高图像的拍摄效果,提升用户体验。After obtaining the original image, the embodiment of the present application can identify the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located, and obtain a match with the shooting object by combining the target feature of the shooting object and the scene feature of the scene where the shooting object is located And the posture image of the scene where the shooting object is located can improve the accuracy and effectiveness of the posture image acquisition, so that the obtained posture image meets the photographing requirements of the shooting object and the scene where the shooting object is currently located. In addition, by superimposing the posture image and the original image as a preview image, and by displaying the target posture in the preview image, it is convenient to quickly guide the subject to adjust the posture according to the target posture in the preview image, which improves the efficiency of posture adjustment and the efficiency of taking pictures. , In order to effectively improve the shooting effect of the image and enhance the user experience.
图1是现有技术中的进行姿势图像选择的示意图;Fig. 1 is a schematic diagram of posture image selection in the prior art;
图2是现有技术中的进行姿势图像显示的示意图;Fig. 2 is a schematic diagram of posture image display in the prior art;
图3是本申请一实施例提供的辅助拍照方法的流程示意图;FIG. 3 is a schematic flowchart of an auxiliary photographing method provided by an embodiment of the present application;
图4和图5是本申请一实施例中开启辅助拍照模式的示意图;4 and 5 are schematic diagrams of starting the auxiliary photographing mode in an embodiment of the present application;
图6是本申请一实施例中的场景识别模型获取场景特征的示意图;FIG. 6 is a schematic diagram of scene features obtained by a scene recognition model in an embodiment of the present application;
图7是本申请一实施例提供的预览图像的示意图;FIG. 7 is a schematic diagram of a preview image provided by an embodiment of the present application;
图8是本申请另一实施例提供的预览图像的示意图;FIG. 8 is a schematic diagram of a preview image provided by another embodiment of the present application;
图9是本申请实施例提供的辅助拍照装置的结构示意图;FIG. 9 is a schematic structural diagram of an auxiliary photographing device provided by an embodiment of the present application;
图10是本申请实施例提供的终端设备的结构示意图Figure 10 is a schematic structural diagram of a terminal device provided by an embodiment of the present application
图11是本申请一实施例提供的辅助拍照方法所适用于的手机的结构示意图。FIG. 11 is a schematic structural diagram of a mobile phone to which the auxiliary photographing method provided by an embodiment of the present application is applicable.
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are proposed for a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from obstructing the description of this application.
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in the specification and appended claims of this application, the term "comprising" indicates the existence of the described features, wholes, steps, operations, elements and/or components, but does not exclude one or more other The existence or addition of features, wholes, steps, operations, elements, components, and/or collections thereof.
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should also be understood that the term "and/or" used in the specification and appended claims of this application refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in the description of this application and the appended claims, the term "if" can be construed as "when" or "once" or "in response to determination" or "in response to detecting ". Similarly, the phrase "if determined" or "if detected [described condition or event]" can be interpreted as meaning "once determined" or "in response to determination" or "once detected [described condition or event]" depending on the context ]" or "in response to detection of [condition or event described]".
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the specification of this application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。Reference to "one embodiment" or "some embodiments" described in the specification of this application means that one or more embodiments of this application include a specific feature, structure, or characteristic described in combination with the embodiment. Therefore, the sentences "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless it is specifically emphasized otherwise. The terms "including", "including", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
本申请实施例提供的辅助拍照方法可以应用于手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等终端设备上,本申请实施例对终端设备的具体类型不作任何限制。The auxiliary photographing method provided by the embodiments of this application can be applied to mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, and super mobile personal computers For terminal devices (ultra-mobile personal computer, UMPC), netbooks, and personal digital assistants (personal digital assistant, PDA), the embodiments of this application do not impose any restrictions on the specific types of terminal devices.
随着拍照技术的不断发展和终端设备的广泛普及,终端设备的拍照功能被广泛使用,越来越多的用户利用手机、平板电脑等终端设备进行拍照,极大地提高了拍照的方便性和便捷性。但很多不擅长拍照的人,在拍照时往往不知道该怎么摆拍照姿势,导致拍摄出的图像僵硬、老套,影响拍摄效果。With the continuous development of camera technology and the widespread popularity of terminal equipment, the camera function of terminal equipment is widely used. More and more users use mobile phones, tablet computers and other terminal equipment to take pictures, which greatly improves the convenience and convenience of taking pictures. Sex. However, many people who are not good at taking pictures often do not know how to pose when taking pictures, which leads to stiff and old-fashioned images and affects the shooting effect.
为了提高拍摄效果,目前很多应用中均设置有姿势推荐功能,即如图1所示,在应用中内置一些固定的姿势图像,当用户选择某一姿势图像时,如图2所示,将该姿势图像显示于显示界面 中的固定位置(例如显示于显示界面中的左下角或右下角)来供拍摄对象进行姿势参考。这种方式虽然可以在一定程度上提高拍摄效果,但因应用中内置的姿势图像有限,往往无法满足用户的当前拍照需求,而且应用中内置的姿势图像也并不一定符合当前的拍照场景,造成拍摄效果差;另外,将姿势图像固定在显示界面中的左小角或右下角无法给拍摄对象提供足够的参照价值,使得姿势调整效率,从而造成拍照效率低。In order to improve the shooting effect, many applications currently have a posture recommendation function. As shown in Figure 1, some fixed posture images are built in the application. When the user selects a certain posture image, as shown in Figure 2, The posture image is displayed in a fixed position in the display interface (for example, displayed in the lower left corner or the lower right corner of the display interface) for the subject's posture reference. Although this method can improve the shooting effect to a certain extent, because the built-in posture images in the application are limited, it is often unable to meet the user’s current photographing needs, and the built-in posture images in the application do not necessarily meet the current photographing scene. The photographing effect is poor; in addition, fixing the posture image in the left small corner or the lower right corner of the display interface cannot provide sufficient reference value for the subject, which makes posture adjustment efficiency and thus low photographing efficiency.
为了解决上述问题,本申请实施例提供了一种辅助拍照方法、装置、终端设备及计算机可读存储介质,通过结合拍摄对象的目标特征和拍摄对象所在场景的场景特征获取符合拍摄对象以及拍摄对象所在场景的姿势图像,可以提高姿势图像获取的准确性和有效性,使得所获取的姿势图像符合拍摄对象以及拍摄对象当前所在场景的拍照需求。另外,通过将姿势图像与原始图像叠加显示为预览图像,通过在预览图像中进行目标姿势的显示,方便根据预览图像中的目标姿势快速指导拍摄对象进行姿势调整,提高姿势调整效率,提高拍照效率,以有效提高图像的拍摄效果,提升用户体验。In order to solve the above-mentioned problems, embodiments of the present application provide an auxiliary photographing method, device, terminal device, and computer-readable storage medium. The target feature of the photographed object and the scene characteristic of the scene where the photographed object is located are combined to obtain the corresponding photographic object and the photographed object The posture image of the scene can improve the accuracy and effectiveness of the posture image acquisition, so that the acquired posture image meets the photographing requirements of the subject and the scene where the subject is currently located. In addition, by superimposing the posture image and the original image as a preview image, and by displaying the target posture in the preview image, it is convenient to quickly guide the subject to adjust the posture according to the target posture in the preview image, which improves the efficiency of posture adjustment and the efficiency of taking pictures. , In order to effectively improve the shooting effect of the image and enhance the user experience.
如图3示出了本申请实施例提供的一种辅助拍照方法的示意性流程图,作为示例而非限定,该辅助拍照方法可以应用于终端设备,该终端设备具备拍照功能,即该终端设备中可以设置有用于拍照的相机。其中,所述辅助拍照方法可以包括:Fig. 3 shows a schematic flowchart of an auxiliary photographing method provided by an embodiment of the present application. As an example and not a limitation, the auxiliary photographing method may be applied to a terminal device that has a photographing function, that is, the terminal device A camera for taking pictures can be set in the. Wherein, the auxiliary photographing method may include:
S301、获取原始图像,并识别所述原始图像中拍摄对象的目标特征和所述拍摄对象所在场景的场景特征;S301: Obtain an original image, and identify the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located;
应理解,终端设备可以根据检测到的相机启动指令启动该终端设备的相机,并可以通过该终端设备的显示界面预览摄像头实时采集的图像。具体地,用户可以通过输入相机启动指令来启动该终端设备的相机。其中,该相机启动指令可以是触发预设按键生成的指令,也可以是触发预设手势生成的指令,还可以是触发预设语音关键词生成的指令,本申请实施例对此不作限定。It should be understood that the terminal device can start the camera of the terminal device according to the detected camera start instruction, and can preview the image collected by the camera in real time through the display interface of the terminal device. Specifically, the user can start the camera of the terminal device by inputting a camera start instruction. The camera start instruction may be an instruction that triggers the generation of a preset button, or an instruction that triggers the generation of a preset gesture, or an instruction that triggers the generation of a preset voice keyword, which is not limited in the embodiment of the present application.
例如,该终端设备中可以预先设置“音量+”按键触发两次时生成相机启动指令,或者预先设置“音量+”按键与“音量-”按键同时触发时生成相机启动指令,则当用户按压“音量+”按键两次,或者当用户同时按压“音量+”按键和“音量-”按键时,该终端设备即可生成并获取到相机启动指令。又例如,该终端设备中可以预先设置采集到“O”形手势等预设手势时生成相机启动指令,则当用户输入与“O”形手势等预设手势相匹配的手势时,该终端设备即可生成并获取到相机启动指令。还例如,该终端设备中可以预先设置检测到“拍照”等预设语音关键词时生成相机启动指令,则当用户输入的语音中含有“拍照”等预设语音关键词时,该终端设备即可生成并获取到相机启动指令。For example, the terminal device can preset the "volume +" button to generate a camera start instruction when triggered twice, or preset the "volume +" button and the "volume -" button to generate a camera start instruction when triggered at the same time, then when the user presses " The volume +" button twice, or when the user presses the "volume +" button and the "volume -" button at the same time, the terminal device can generate and obtain the camera start instruction. For another example, the terminal device may be preset to generate a camera start instruction when a preset gesture such as an "O"-shaped gesture is collected, and then when the user inputs a gesture that matches the preset gesture such as an "O"-shaped gesture, the terminal device Then the camera start instruction can be generated and obtained. For another example, the terminal device can be preset to generate a camera start instruction when a preset voice keyword such as "photograph" is detected. Then when the user input voice contains the preset voice keyword such as "photograph", the terminal device is Can generate and get the camera start instruction.
示例的,该原始图像可以是该终端设备的显示界面中预览的第一帧预览图像,或者也可以是该终端设备的显示界面中预览的第一帧之后的第N帧预览图像。示例的,该原始图像可以是摄像头实时采集的第一帧图像,或者也可以是摄像头实时采集的第一帧之后的第N帧图像,其中,N为大于1的整数。For example, the original image may be the first frame preview image previewed on the display interface of the terminal device, or may also be the Nth frame preview image after the first frame previewed on the display interface of the terminal device. For example, the original image may be the first frame image captured by the camera in real time, or it may be the Nth frame image after the first frame captured by the camera in real time, where N is an integer greater than 1.
可选地,该终端设备可以根据预设的触发事件或者预设时长,来获取该原始图像。Optionally, the terminal device may obtain the original image according to a preset trigger event or a preset duration.
具体地,该终端设备可以根据检测到的特定指令,获取该终端设备的显示界面中当前预览的图像或者获取摄像头当前采集的图像,并可以将该当前预览的图像或者该当前采集的图像确定为该原始图像。Specifically, the terminal device may obtain the image currently previewed in the display interface of the terminal device or the image currently captured by the camera according to the detected specific instruction, and may determine the currently previewed image or the currently captured image as The original image.
例如,该终端设备可以在检测到用户对该显示界面中的任意位置进行点击的点击操作时,获取该显示界面当前预览的图像或者获取摄像头当前采集的图像。For example, the terminal device can obtain the image currently previewed by the display interface or the image currently collected by the camera when detecting a click operation of the user clicking any position on the display interface.
可选地,该终端设备可以在相机启动的时长达到该预设时长时,获取该显示界面当前预览的图像或者获取摄像头当前采集的图像。Optionally, the terminal device may obtain the image currently previewed by the display interface or obtain the image currently collected by the camera when the time period when the camera is activated reaches the preset time period.
需要说明的是,该终端设备中可以事先设置辅助拍照模式供用户选择。具体地,该终端设备的相机启动后,用户可以通过输入辅助拍照指令来开启相机的辅助拍照模式,即当用户输入辅助拍照指令时,该终端设备即可以获取该原始图像,并可以根据该原始图像中拍摄对象的目标特征以及拍摄对象所在场景的场景特征获取姿势图像,从而可以将所获取的姿势图像与该原始图像叠加显示为预览图像,以根据预览图像中的目标姿势来辅助拍摄对象进行姿势调整;而当用户未输入辅助拍照指令时,该终端设备则可以直接进行常规的拍照处理,即不进行姿势图像的获取。It should be noted that the auxiliary photographing mode can be set in advance in the terminal device for the user to select. Specifically, after the camera of the terminal device is started, the user can input the auxiliary photographing instruction to turn on the auxiliary photographing mode of the camera, that is, when the user inputs the auxiliary photographing instruction, the terminal device can obtain the original image, and can obtain the original image according to the original The target feature of the subject in the image and the scene feature of the scene where the subject is located acquire a posture image, so that the acquired posture image and the original image can be superimposed and displayed as a preview image to assist the subject to perform according to the target posture in the preview image Posture adjustment; and when the user does not input an auxiliary photographing instruction, the terminal device can directly perform conventional photographing processing, that is, no posture image acquisition is performed.
应理解,该辅助拍照指令可以是触发预设按键生成的指令,也可以是触发预设手势生成的指令,还可以是触发预设语音关键词生成的指令,本申请实施例对此不作限定。It should be understood that the auxiliary photographing instruction may be an instruction that triggers the generation of a preset button, or an instruction that triggers the generation of a preset gesture, or an instruction that triggers the generation of a preset voice keyword, which is not limited in the embodiment of the present application.
例如,如图4所示,该终端设备的相机启动后,用户可以在该终端设备的显示界面中进行拍照模式的选择,该终端设备则可以根据用户的选择来开启辅助拍照模式。例如,如图5所示,该终端设备的相机启动后,可以在该终端设备的显示界面中呈现一辅助拍照的虚拟按钮,若用户触发该虚拟按钮,该终端设备则可以开启相机的辅助拍照模式;若用户未触发该虚拟按钮,该终端设备则可以直接进行常规的拍照处理。For example, as shown in FIG. 4, after the camera of the terminal device is started, the user can select the photographing mode on the display interface of the terminal device, and the terminal device can start the auxiliary photographing mode according to the user's selection. For example, as shown in Figure 5, after the camera of the terminal device is started, a virtual button for assisting taking pictures can be presented on the display interface of the terminal device. If the user triggers the virtual button, the terminal device can turn on the camera’s assisting taking pictures. Mode; if the user does not trigger the virtual button, the terminal device can directly perform conventional photographing processing.
例如,该终端设备的相机启动后,用户也可以通过在该终端设备的显示界面中输入“M”形手势等预设手势来开启相机的辅助拍照模式,或者可以通过语音输入包含“辅助拍照”等预设语音关键词来开启相机的辅助拍照模式。For example, after the camera of the terminal device is started, the user can also enter a preset gesture such as an "M" gesture in the display interface of the terminal device to turn on the camera's auxiliary photographing mode, or may include "assisted photographing" through voice input Wait for the preset voice keywords to turn on the auxiliary camera mode of the camera.
应理解,该终端设备获取该原始图像后,可以首先通过人工智能(Artificial Intelligence,AI)技术对该原始图像进行图像识别,以确定该原始图像中是否存在拍摄对象。若该原始图像中存在拍摄对象,该终端设备则可以进一步识别拍摄对象的目标特征以及拍摄对象所在场景的场景特征。其中,拍摄对象的目标特征可以包括拍摄对象的人数、性别、年龄、身高、体型等中的一个或者多个。It should be understood that after the terminal device acquires the original image, it may first perform image recognition on the original image through artificial intelligence (AI) technology to determine whether there is a photographed object in the original image. If there is a photographed object in the original image, the terminal device can further identify the target feature of the photographed object and the scene characteristic of the scene where the photographed object is located. Among them, the target characteristics of the photographed object may include one or more of the number of photographed objects, gender, age, height, body type, and the like.
示例的,该终端设备中可以设置有TOF(Time of Flight)深度相机,该终端设备可以通过该TOF深度相机来获取拍摄对象的身高、体型等目标特征。For example, the terminal device may be provided with a TOF (Time of Flight) depth camera, and the terminal device may use the TOF depth camera to obtain target features such as the height and body shape of the photographed subject.
示例的,该终端设备中可以设置有人脸识别模型,该终端设备可以通过该人脸识别模型来识别该原始图像中拍摄对象的人数、性别、年龄等目标特征。在此,该人脸识别模型可以为基于卷积神经网络构建的识别模型,本申请实施例对于人脸识别模型的具体构建过程和具体训练过程不作限定,可以采用现有的构建过程进行构建,也可以采用现有的训练过程进行训练。应理解,该终端设备中设置的人脸识别模型可以由云端服务器训练得到,且该终端设备中设置的人脸识别模型可以根据云端服务器的更新操作进行实时更新。For example, the terminal device may be provided with a face recognition model, and the terminal device may use the face recognition model to recognize target characteristics such as the number, gender, and age of the subject in the original image. Here, the face recognition model may be a recognition model constructed based on a convolutional neural network. The embodiment of the present application does not limit the specific construction process and specific training process of the face recognition model, and the existing construction process may be used for construction. The existing training process can also be used for training. It should be understood that the face recognition model set in the terminal device may be trained by a cloud server, and the face recognition model set in the terminal device may be updated in real time according to the update operation of the cloud server.
需要说明的是,该人脸识别模型接收到该原始图像后,可以首先对该原始图像进行信息转换、去噪、平滑、变换等预处理,以强化图像的重要特征;然后可以采用人脸识别技术对预处理后的原始图像进行人脸识别,以根据人脸识别结果得到该原始图像中拍摄对象的人数、性别、年龄等目标特征。在此,该人脸识别技术可以为现有的任一种人脸识别技术,本申请实施例对此不作限定。It should be noted that after the face recognition model receives the original image, it can first perform preprocessing such as information conversion, denoising, smoothing, and transformation on the original image to enhance the important features of the image; then face recognition can be used The technology performs face recognition on the preprocessed original image to obtain target characteristics such as the number, gender, and age of the subject in the original image according to the face recognition result. Here, the face recognition technology may be any existing face recognition technology, which is not limited in the embodiment of the present application.
示例的,该终端设备中可以设置有场景识别模型,该终端设备可以通过该场景识别模型来获取该原始图像中拍摄对象所在场景的场景特征。如图6所示,该场景识别模型可以为基于卷积神经网络的分层场景识别模型。其中,分层场景识别模型可以用于提取原始图像的不同尺度的特征, 并可以将不同尺度的特征进行混合,然后可以对混合后的特征进行特征的再次提取,并可以将再次提取的特征作为该原始图像的场景特征,使得所提取的场景特征可以包含更多图像信息,从而提高姿势图像获取的准确性。For example, the terminal device may be provided with a scene recognition model, and the terminal device may use the scene recognition model to obtain the scene characteristics of the scene where the shooting object in the original image is located. As shown in Figure 6, the scene recognition model may be a hierarchical scene recognition model based on a convolutional neural network. Among them, the hierarchical scene recognition model can be used to extract features of different scales of the original image, and can mix the features of different scales, and then the mixed features can be extracted again, and the extracted features can be used as The scene features of the original image enable the extracted scene features to contain more image information, thereby improving the accuracy of the posture image acquisition.
例如,对于一张640*480像素的原始图像,该终端设备首先可以对该原始图像进行多次下采样操作,分别得到A1(320*240)、A2(160*120)、……、An,然后可以分别对A1、A2、……、An进行一系列的特征提取操作(如卷积操作)得到特征图像F1、F2……Fn,最后可以将F1、F2、……、Fn这几个特征图像组合后再进行一次特征提取,并可以将最后提取的特征作为该原始图像的场景特征。For example, for an original image of 640*480 pixels, the terminal device can first perform multiple downsampling operations on the original image to obtain A1 (320*240), A2 (160*120), ..., An, Then you can perform a series of feature extraction operations (such as convolution operations) on A1, A2,..., An to obtain feature images F1, F2...Fn, and finally you can combine the features of F1, F2,..., Fn After the images are combined, feature extraction is performed again, and the last extracted feature can be used as the scene feature of the original image.
需要说明的是,本申请实施例对于分层场景识别模型的具体构建过程和具体训练过程不作限定,可以采用现有的构建过程进行构建,也可以采用现有的训练过程进行训练。例如可以由云端服务器通过AI训练和模拟训练平台MTP训练该分层场景识别模型,或者可以由云端服务器通过AI训练和祥云模拟执行平台MEP训练该分层场景识别模型。应理解,该终端设备中设置的分层场景识别模型还可以根据云端服务器的更新操作进行实时更新。It should be noted that the embodiment of the present application does not limit the specific construction process and specific training process of the hierarchical scene recognition model, and the existing construction process can be used for construction, or the existing training process can be used for training. For example, the layered scene recognition model can be trained by the cloud server through the AI training and simulation training platform MTP, or the cloud server can be trained by the AI training and the Xiangyun simulation execution platform MEP. It should be understood that the hierarchical scene recognition model set in the terminal device may also be updated in real time according to the update operation of the cloud server.
应理解,该分层场景识别模型接收到该原始图像后,可以首先对该原始图像进行信息转换、去噪、平滑、变换等预处理,以强化图像的重要特征;然后可以采用图像分割技术,例如,可以采用图像实例分割技术(Mask Region-based Convolutional Neural Networks,Mask RCNN)对预处理后的原始图像进行目标检测与分割,得到该原始图像中的前景部分和背景部分;随后可以对背景部分进行特征提取,以得到该原始图像中拍摄对象所在场景的场景特征。It should be understood that after the layered scene recognition model receives the original image, it can first perform preprocessing such as information conversion, denoising, smoothing, and transformation on the original image to enhance the important features of the image; then, image segmentation technology can be used, For example, the image instance segmentation technology (Mask Region-based Convolutional Neural Networks, Mask RCNN) can be used to perform target detection and segmentation on the preprocessed original image to obtain the foreground part and background part of the original image; then the background part can be Perform feature extraction to obtain the scene features of the scene where the shooting object in the original image is located.
S302、根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取姿势图像,所述姿势图像中包含待推荐的目标姿势;S302: Acquire a posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located, where the posture image contains the target posture to be recommended;
可选地,该终端设备中可以设置有姿势推荐模型,该姿势推荐模型可以根据拍摄对象的目标特征以及拍摄对象所在场景的场景特征来获取姿势图像,以通过综合考虑目标特征和场景特征来获取精确、有效的姿势图像,从而可以根据姿势图像中包含的目标姿势来辅助和指导拍摄对象进行姿势调整,提高图像拍摄效果,提升用户体验。Optionally, the terminal device may be provided with a posture recommendation model, the posture recommendation model can obtain the posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located, so as to obtain the posture image by comprehensively considering the target feature and the scene feature Precise and effective posture images, which can assist and guide the subject to adjust posture according to the target posture contained in the posture image, improve the image shooting effect, and enhance the user experience.
在此,该姿势推荐模型可以为基于神经网络构建的推荐模型。本申请实施例对于姿势推荐模型的具体构建过程和具体训练过程不作限定,可以采用现有的构建过程进行构建,也可以采用现有的训练过程进行训练。应理解,该终端设备中设置的姿势推荐模型可以由云端服务器基于大量的样本图像训练得到,且该终端设备中设置的姿势推荐模型还可以根据云端服务器的更新操作进行实时更新。Here, the posture recommendation model may be a recommendation model constructed based on a neural network. The embodiment of the present application does not limit the specific construction process and specific training process of the posture recommendation model, and the existing construction process may be used for construction, or the existing training process may be used for training. It should be understood that the posture recommendation model set in the terminal device can be trained by the cloud server based on a large number of sample images, and the posture recommendation model set in the terminal device can also be updated in real time according to the update operation of the cloud server.
在一种可能的实现方式中,该姿势推荐模型可以以拍摄对象的目标特征以及拍摄对象所在场景的场景特征组成的二元组作为输入,并可以以与该目标特征以及场景特征相匹配的姿势图像作为输出。具体地,该终端设备获取到该原始图像中拍摄对象的目标特征以及拍摄对象所在场景的场景特征后,可以将该目标特征和该场景特征组成二元组,并可以将所组成的二元组输入至该姿势推荐模型,该姿势推荐模型则可以基于该二元组输出包含目标姿势的姿势图像。In a possible implementation, the pose recommendation model can take the target feature of the subject and the scene feature of the scene where the subject is located as input, and can take a pose that matches the target feature and scene feature. Image as output. Specifically, after the terminal device obtains the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located, the target feature and the scene feature can be formed into a two-tuple, and the formed two-tuple can be combined Input to the posture recommendation model, and the posture recommendation model can output a posture image containing the target posture based on the two-tuple.
在另一种可能的实现方式中,该姿势推荐模型可以以拍摄对象的目标特征、拍摄对象所在场景的场景特征以及拍摄对象的拍照特征组成的三元组作为输入,并可以以与该目标特征、场景特征以及拍照特征相匹配的姿势图像作为输出。其中,拍照特征可以为拍摄对象对应的拍照喜好或者拍照习惯等特征。具体地,该终端设备获取到该原始图像中拍摄对象的目标特征、拍摄对象所在场景的场景特征以及拍摄对象的拍照特征后,可以将该目标特征、该场景特征以及该拍照特征 组成三元组,并可以将所组成的三元组输入至该姿势推荐模型,该姿势推荐模型则可以基于该三元组输出包含目标姿势的姿势图像。In another possible implementation manner, the pose recommendation model can take the target feature of the shooting object, the scene feature of the scene where the shooting object is located, and the shooting feature of the shooting object as input as a triplet, and can be related to the target feature , The scene feature and the posture image matching the photo feature as output. Among them, the photographing feature may be a characteristic of photographing preferences or photographing habits corresponding to the photographed subject. Specifically, after the terminal device obtains the target feature of the shooting object in the original image, the scene feature of the scene where the shooting object is located, and the shooting feature of the shooting object, the target feature, the scene feature, and the shooting feature can be formed into a triplet , And the composed triples can be input to the posture recommendation model, and the posture recommendation model can output a posture image containing the target posture based on the triples.
具体地,该终端设备识别出该原始图像中的拍摄对象后,还可以获取拍摄对象的拍照特征,并可以根据拍摄对象的目标特征、拍摄对象所在场景的场景特征以及拍摄对象的拍照特征获取姿势图像。Specifically, after the terminal device recognizes the subject in the original image, it can also acquire the photographic characteristics of the subject, and can acquire the posture based on the target characteristics of the subject, the scene characteristics of the scene where the subject is located, and the photographic characteristics of the subject image.
示例的,该终端设备可以根据拍摄对象的身份标志信息获取拍摄对象的拍照特征。示例的,该终端设备也可以根据该终端设备的设备标识信息获取该终端设备对应的拍照特征,并可以将所获取的该终端设备对应的拍照特征确定为该拍摄对象的拍照特征。For example, the terminal device may obtain the photographic characteristics of the photographed object according to the identity mark information of the photographed object. For example, the terminal device may also acquire the photographing feature corresponding to the terminal device according to the device identification information of the terminal device, and may determine the acquired photographing characteristic corresponding to the terminal device as the photographing characteristic of the photographing object.
应理解,本申请实施例中,可以事先通过对各拍摄对象的历史拍照图像进行图像分析来获取各拍摄对象的拍照特征,并可以将各拍摄对象的拍照特征与各拍摄对象的身份标志信息进行关联保存。本申请实施例中,也可以事先对各终端设备中的历史拍照图像进行图像分析来获取各终端设备对应的拍照特征,并可以将各终端设备对应的拍照特征与各终端设备的设备标识信息进行关联保存。It should be understood that, in the embodiments of the present application, the photographic characteristics of each photographed object can be obtained by image analysis of the historical photographed images of each photographed object in advance, and the photographic characteristics of each photographed object can be compared with the identity mark information of each photographed object. Save associatively. In the embodiments of this application, it is also possible to perform image analysis on the historical photographed images in each terminal device in advance to obtain the photographing characteristics corresponding to each terminal device, and to compare the photographing characteristics corresponding to each terminal device with the device identification information of each terminal device. Save associatively.
需要说明的是,该终端设备在根据拍摄对象的目标特征和拍摄对象所在场景的场景特征进行姿势图像的获取时,或者该终端设备在根据拍摄对象的目标特征、拍摄对象所在场景的场景特征以及拍摄对象的拍照特征进行姿势图像的获取时,可以获取一张或者多张样本图像,并可以根据所获取的样本图像来进行姿势图像的获取。其中,样本图像可以是事先采集并存储于该终端设备或者存储于与该终端设备相连接的云端服务器中的图像,也可以是在拍照过程中实时从网络中抓取的图像。It should be noted that when the terminal device acquires the posture image according to the target characteristics of the photographed object and the scene characteristics of the scene where the photographed object is located, or the terminal device is based on the target characteristic of the photographed object, the scene characteristic of the scene where the photographed object is located, and When acquiring the posture image with the photographic characteristics of the subject, one or more sample images can be acquired, and the posture image can be acquired according to the acquired sample images. Wherein, the sample image may be an image collected in advance and stored in the terminal device or stored in a cloud server connected to the terminal device, or it may be an image captured from the network in real time during the photographing process.
应理解,当该终端设备获取一张样本图像时,该终端设备可以将所获取的这一张样本图像直接确定为该终端设备所获取的姿势图像;而当该终端设备获取多张样本图像时,该终端设备则可以从这多张样本图像选取一张目标样本图像,并可以将所选取的这一张目标样本图像确定为该终端设备所获取的姿势图像。It should be understood that when the terminal device acquires a sample image, the terminal device can directly determine the acquired sample image as the posture image acquired by the terminal device; and when the terminal device acquires multiple sample images , The terminal device can select a target sample image from the multiple sample images, and can determine the selected target sample image as the posture image acquired by the terminal device.
具体地,该终端设备可以首先获取每一张样本图像对应的推荐值,然后可以选择推荐值最高的一张样本图像作为目标样本图像,并可以将所选取的这一张目标样本图像确定为该终端设备所获取的姿势图像,以通过推荐值进行姿势图像的推荐,有助于提高姿势图像的推荐准确性和推荐效率。Specifically, the terminal device can first obtain the recommended value corresponding to each sample image, and then can select the sample image with the highest recommended value as the target sample image, and can determine the selected target sample image as the target sample image. The posture image acquired by the terminal device is used to recommend the posture image through the recommended value, which helps to improve the recommendation accuracy and recommendation efficiency of the posture image.
可选地,样本图像对应的推荐值可以根据样本图像在预设时间内的历史推荐数量来确定。例如,可以根据样本图像在过去一周内的历史推荐数量来确定,其中,历史推荐数量越多的样本图像,其所对应的推荐值则越高;历史推荐数量越少的样本图像,其所对应的推荐值则越低。Optionally, the recommended value corresponding to the sample image may be determined according to the number of historical recommendations of the sample image within a preset time. For example, it can be determined according to the number of historical recommendations of the sample images in the past week. The sample images with more historical recommendations have higher recommended values; the sample images with fewer historical recommendations have corresponding values. The recommended value of is lower.
应理解,当该终端设备获取多张样本图像时,该终端设备可以从这多张样本图像选取多张目标样本图像,并可以对所选取的多张目标样本图像进行显示,以使得拍摄者或者拍摄对象从这多张目标样本图像中进行姿势图像的选择。在此,该终端设备也可以根据各样本图像对应的推荐值来进行目标样本图像的选择,即可以从样本图像中选择推荐值高的前N张样本图像来作为目标样本图像,其中,N为大于或等于2的整数。It should be understood that when the terminal device acquires multiple sample images, the terminal device can select multiple target sample images from the multiple sample images, and can display the selected multiple target sample images, so that the photographer or The subject selects a pose image from the multiple target sample images. Here, the terminal device can also select the target sample image according to the recommended value corresponding to each sample image, that is, the first N sample images with high recommended value can be selected from the sample images as the target sample image, where N is An integer greater than or equal to 2.
例如,该终端设备在获取到这多张样本图像对应的各推荐值后,首先可以根据推荐值对这多张样本图像进行降序排列,得到降序排序组,在该降序排列组中,推荐值越高的样本图像排序越靠前,而推荐值越低的样本图像则排序越靠后;然后,可以从该降序排列组中选取排序靠前的前N个样本图像来作为目标样本图像。For example, after the terminal device obtains the recommended values corresponding to the multiple sample images, it can first sort the multiple sample images in descending order according to the recommended values to obtain a descending sorted group. In the descending sorted group, the recommended value is higher. The higher the order of the sample images, the higher the order of the sample images, and the lower the order of the sample images of the lower the recommended value; then, the top N sample images in the descending order can be selected as the target sample images.
示例的,该终端设备选择出多张目标样本图像后,可以将这多张目标样本图像依次显示于该终端设备的显示界面中。例如,可以将这多张目标样本图像依次显示于显示界面的左下角、右下角、左上角或右上角等位置,以供拍摄者或拍摄对象从这多张目标样本图像中进行姿势图像的选择。示例的,在目标样本图像的显示过程中,拍摄者或拍摄对象可以通过双击目标样本图像来进行姿势图像的选择,或者可以通过三击目标样本图像来进行姿势图像的选择,本申请实施例对此不作限定。For example, after the terminal device selects multiple target sample images, the multiple target sample images may be sequentially displayed on the display interface of the terminal device. For example, these multiple target sample images can be displayed in the lower left corner, lower right corner, upper left corner, or upper right corner of the display interface in sequence, so that the photographer or the subject can select pose images from the multiple target sample images . For example, in the display process of the target sample image, the photographer or the subject can select the posture image by double-clicking the target sample image, or can select the posture image by triple-clicking the target sample image. This is not limited.
应理解,在目标样本图像的显示过程中,拍摄者或拍摄对象可以通过滑动操作来进行目标样本图像的切换。例如,可以通过向左划的操作切换至上一张目标样本图像,可以通过向右划的操作切换至下一张目标样本图像。例如,可以通过向左划的操作切换至下一张目标样本图像,可以通过向右划的操作切换至上一张目标样本图像。例如,可以通过向上划的操作切换至上一张目标样本图像,可以通过向下划的操作切换至下一张目标样本图像。例如,可以通过向上划的操作切换至下一张目标样本图像,可以通过向下划的操作切换至上一张目标样本图像,本申请实施例对此不作限定。It should be understood that, during the display of the target sample image, the photographer or the shooting object can switch the target sample image through a sliding operation. For example, you can switch to the previous target sample image by swiping to the left, and switch to the next target sample image by swiping to the right. For example, you can switch to the next target sample image by swiping to the left, and switch to the previous target sample image by swiping to the right. For example, you can switch to the previous target sample image by swiping up, and switch to the next target sample image by swiping down. For example, it is possible to switch to the next target sample image by swiping up, and switch to the previous target sample image by swiping down, which is not limited in the embodiment of the present application.
可选地,在获取到多张目标样本图像后,该终端设备可以确定各目标样本图像对应的显示顺序,并可以根据该显示顺序将各目标样本图像依次显示于该终端设备的显示界面中,以提高姿势图像推荐效果,方便快速找到满意的姿势图像,提升用户体验。Optionally, after acquiring multiple target sample images, the terminal device may determine the display sequence corresponding to each target sample image, and may sequentially display the target sample images on the display interface of the terminal device according to the display sequence. In order to improve the effect of posture image recommendation, it is convenient to quickly find satisfactory posture images and enhance user experience.
具体地,该终端设备可以根据各目标样本图像所对应的推荐值来确定各目标样本图像对应的显示顺序,其中,推荐值越大的目标样本图像越先显示于显示界面,而推荐值越小的目标样本图像则越后显示于显示界面。Specifically, the terminal device can determine the display sequence corresponding to each target sample image according to the recommended value corresponding to each target sample image, wherein the target sample image with a larger recommended value is displayed on the display interface first, and the recommended value is smaller The target sample image of is later displayed on the display interface.
可选地,该终端设备在显示界面中进行各目标样本图像的显示时,还可以显示各目标样本图像对应的推荐值,从而方便拍摄对象和/或者拍摄者根据推荐值来进行姿势图像的选择,以提升用户体验。示例的,该推荐值可以为具体数值,例如可以为90、95等具体数值。示例的,该推荐值也可以为推荐指数,例如可以为5星推荐指数、4星推荐指数、3星推荐指数等等。Optionally, when the terminal device displays each target sample image on the display interface, it can also display the recommended value corresponding to each target sample image, so that it is convenient for the subject and/or the photographer to select the posture image according to the recommended value To enhance the user experience. For example, the recommended value may be a specific value, for example, it may be a specific value such as 90 or 95. For example, the recommendation value may also be a recommendation index, for example, it may be a 5-star recommendation index, a 4-star recommendation index, a 3-star recommendation index, and so on.
S303、将所述姿势图像与所述原始图像叠加显示为预览图像,以根据所述预览图像中的所述目标姿势指导所述拍摄对象进行姿势调整。S303. Superimpose and display the posture image and the original image as a preview image, so as to guide the photographic subject to perform posture adjustment according to the target posture in the preview image.
应理解,该终端设备获取到姿势图像后,可以将该姿势图像与原始图像进行叠加,即可以将该姿势图像包含的目标姿势叠加至该原始图像,并可以将叠加该目标姿势的原始图像作为预览图像显示在该终端设备的显示界面中,例如,在一具体应用场景中,可以在该终端设备的显示界面中显示如图7所示的预览图像,从而可以通过该预览图像中的目标姿势指导拍摄对象进行姿势和/或站位的调整,提高姿势调整效率,提高拍照效率,提升用户体验。It should be understood that after the terminal device obtains the posture image, the posture image can be superimposed on the original image, that is, the target posture contained in the posture image can be superimposed on the original image, and the original image superimposed on the target posture can be used as The preview image is displayed on the display interface of the terminal device. For example, in a specific application scenario, the preview image as shown in FIG. 7 can be displayed on the display interface of the terminal device, so that the target posture in the preview image can be passed Guide the subject to adjust the posture and/or standing position, improve the efficiency of posture adjustment, improve the efficiency of photographing, and enhance the user experience.
示例的,该终端设备可以通过语音播放的形式和/或文字显示的形式来指导拍摄对象进行姿势和/或站位的调整,例如,指导拍摄对象嵌入该目标姿势中。For example, the terminal device may instruct the photographed subject to adjust the posture and/or standing position through the form of voice playback and/or text display, for example, instruct the photographed subject to be embedded in the target posture.
需要说明的是,在将该姿势图像与该原始图像叠加显示为预览图像之前,为确保该姿势图像能与该原始图像进行叠加,该终端设备可以首先获取该原始图像对应的第一图像尺寸和该姿势图像对应的第二图像尺寸,并可以根据该第一图像尺寸来调整该姿势图像对应的第二图像尺寸,以将该姿势图像对应的第二图像尺寸调整至该第一图像尺寸。It should be noted that, before the posture image and the original image are superimposed and displayed as a preview image, to ensure that the posture image can be superimposed on the original image, the terminal device may first obtain the first image size and size corresponding to the original image. The second image size corresponding to the posture image, and the second image size corresponding to the posture image can be adjusted according to the first image size, so as to adjust the second image size corresponding to the posture image to the first image size.
在一种可能的实现方式中,叠加至该原始图像的姿势图像可以为一个与该原始图像的大小相同的二进制蒙版。具体地,该原始图像可以为第一图层,该二进制蒙版可以为第二图层,通过将该第二图层叠加至该第一图层来实现该姿势图像与该原始图像的叠加。其中,该二进制蒙版中的 各像素点分别与该原始图像中的各像素点一一对应。示例的,该二进制蒙版中目标姿势对应的像素点的像素值为1(即该二进制蒙版中目标姿势对应的像素点为白色),而该二进制蒙版中除目标姿势以外的像素点的像素值为0(即该二进制蒙版中除目标姿势以外的像素点为黑色),即在将该姿势图像与该原始图像叠加中,该目标姿势可以完全隐藏该原始图像中对应位置的内容,而除该目标姿势以外的位置则完全透明,也就是说,除该目标姿势以外的位置则可以显示该原始图像中对应位置的内容,从而将该姿势图像中的目标姿势融合至当前的拍照场景来指导拍摄对象进行姿势调整。In a possible implementation, the posture image superimposed on the original image may be a binary mask with the same size as the original image. Specifically, the original image may be a first layer, and the binary mask may be a second layer, and the posture image and the original image are superimposed by superimposing the second layer on the first layer. Wherein, each pixel in the binary mask corresponds to each pixel in the original image respectively. For example, the pixel value of the pixel corresponding to the target posture in the binary mask is 1 (that is, the pixel corresponding to the target posture in the binary mask is white), and the pixel value of the pixel other than the target posture in the binary mask is The pixel value is 0 (that is, the pixels other than the target pose in the binary mask are black), that is, when the pose image is superimposed on the original image, the target pose can completely hide the content of the corresponding position in the original image. The position other than the target pose is completely transparent, that is, the position other than the target pose can display the content of the corresponding position in the original image, so that the target pose in the pose image can be merged into the current photo scene To guide the subject in posture adjustments.
具体地,该终端设备获取到姿势图像后,可以为该姿势图像添加图层蒙版,其中,图层蒙版中目标姿势对应的位置(即目标姿势对应的像素点)可以设置为白色,该图层蒙版中除目标姿势以外的位置(即目标姿势以外的像素点)则可以设置为黑色,以得到该姿势图像对应的二进制蒙版,并可以将添加图层蒙版的姿势图像(即该姿势图像的二进制蒙版)与该原始图像叠加显示为预览图像,即将该姿势图像中的目标姿势叠加至该原始图像,来得到预览图像,并可以将所得到的预览图像显示在该终端设备的显示界面中,以此指导拍摄对象进行姿势调整。Specifically, after the terminal device obtains the posture image, it can add a layer mask to the posture image, where the position corresponding to the target posture in the layer mask (that is, the pixel corresponding to the target posture) can be set to white, and The position of the layer mask other than the target pose (that is, the pixel points other than the target pose) can be set to black to obtain the binary mask corresponding to the pose image, and the pose image with the layer mask (ie The binary mask of the posture image) and the original image are superimposed and displayed as a preview image, that is, the target posture in the posture image is superimposed on the original image to obtain a preview image, and the obtained preview image can be displayed on the terminal device In the display interface of to guide the subject to adjust the posture.
在另一种可能的实现方式中,该终端设备也可以利用图像分割技术从该姿势图像中分割出目标姿势,可以将分割出的目标姿势叠加至该原始图像,并可以将叠加该目标姿势的该原始图像显示为预览图像。In another possible implementation, the terminal device can also use image segmentation technology to segment the target posture from the posture image, the segmented target posture can be superimposed on the original image, and the target posture can be superimposed on the target posture. The original image is displayed as a preview image.
具体地,该终端设备可以首先获取该目标姿势在该姿势图像中的第一位置,然后可以根据该第一位置确定该目标姿势在该原始图像中的第二位置,并可以将该目标姿势叠加至该原始图像的第二位置处。Specifically, the terminal device may first obtain the first position of the target posture in the posture image, and then determine the second position of the target posture in the original image according to the first position, and can superimpose the target posture To the second position of the original image.
示例的,该终端设备可以首先确定该目标姿势在该姿势图像中的第一位置,然后可以根据该姿势图像中的像素点与该原始图像中的像素点之间的对应关系,找到该原始图像中与该目标姿势对应的目标像素点,从而可以根据目标像素点确定该目标姿势在该原始图像中的第二位置。For example, the terminal device may first determine the first position of the target posture in the posture image, and then can find the original image according to the correspondence between the pixels in the posture image and the pixels in the original image In the target pixel point corresponding to the target posture, the second position of the target posture in the original image can be determined according to the target pixel point.
应理解,在该终端设备进行预览图像的显示过程中,拍摄者可以通过移动该终端设备来进行拍摄角度和/拍摄位置的调整,而在拍摄角度和/或拍摄位置的调整过程中,该终端设备可以实时获取调整后的原始图像,可以根据调整后的原始图像进行姿势图像的获取,并可以将获取的姿势图像与调整后的原始图像进行叠加显示为预览图像,使得目标姿势可以随场景变化动态调整位置,从而提高目标姿势的推荐效果,提高拍照效果,提升用户体验。It should be understood that in the process of displaying the preview image on the terminal device, the photographer can adjust the shooting angle and/or shooting position by moving the terminal device, and in the process of adjusting the shooting angle and/or shooting position, the terminal The device can obtain the adjusted original image in real time, and can obtain the posture image according to the adjusted original image, and can superimpose the obtained posture image and the adjusted original image and display it as a preview image, so that the target posture can change with the scene Dynamically adjust the position to improve the recommendation effect of the target posture, improve the photographing effect, and enhance the user experience.
应理解,在该终端设备进行预览图像的显示过程中,拍摄者可以通过移动该终端设备来进行拍摄角度和/拍摄位置的调整,而在拍摄角度和/或拍摄位置的调整过程中,该终端设备可以根据前一帧预览图像中该目标姿势与该预览图像中的前景部分和/或背景部分的相对位置,确定该目标姿势在当前帧预览图像中的目标位置,并可以在该当前帧预览图像的该目标位置处显示该目标姿势,使得该目标姿势可以不随该终端设备的移动而移动,降低拍摄者的使用难度,提高拍照效果。例如,在图7所示的场景中,在拍摄者通过移动该终端设备进行拍摄角度和/或拍摄位置的调整时,可以在该终端设备的显示界面中显示如图8所示的当前帧预览图像,使得该目标姿势与拍照场景保持相对固定。It should be understood that in the process of displaying the preview image on the terminal device, the photographer can adjust the shooting angle and/or shooting position by moving the terminal device, and in the process of adjusting the shooting angle and/or shooting position, the terminal The device can determine the target position of the target pose in the preview image of the current frame according to the relative position of the target pose in the preview image of the previous frame and the foreground part and/or background part of the preview image, and can preview the target pose in the current frame The target posture is displayed at the target position of the image, so that the target posture may not move with the movement of the terminal device, which reduces the difficulty of use by the photographer and improves the photographing effect. For example, in the scene shown in FIG. 7, when the photographer adjusts the shooting angle and/or shooting position by moving the terminal device, the current frame preview as shown in FIG. 8 may be displayed on the display interface of the terminal device. Image, so that the target posture and the shooting scene remain relatively fixed.
可选地,在将该姿势图像与该原始图像叠加显示为预览图像,以根据预览图像对拍摄对象进行姿势指导后,该终端设备可以实时获取拍摄对象的当前姿势,并可以确定该当前姿势和该目标姿势之间的匹配度,从而可以根据匹配度指导拍摄对象进行姿势调整。在此,可以通过现有的任一种匹配度计算方式来确定该当前姿势与该目标姿势之间的匹配度,本申请实施例对此不作限定。Optionally, after the posture image and the original image are superimposed and displayed as a preview image to guide the posture of the subject according to the preview image, the terminal device can obtain the current posture of the subject in real time, and can determine the current posture and The degree of matching between the target postures can thereby guide the subject to adjust the posture according to the degree of matching. Here, the matching degree between the current posture and the target posture may be determined by any existing matching degree calculation method, which is not limited in the embodiment of the present application.
示例的,在得到该当前姿势与该目标姿势之间的匹配度后,还可以将该匹配度实时显示于该终端设备的显示界面,以便拍摄对象和/或拍摄者清楚了解拍摄对象的拍照姿势与姿势图像中的目标姿势的具体贴合情况。For example, after the matching degree between the current pose and the target pose is obtained, the matching degree can also be displayed on the display interface of the terminal device in real time, so that the subject and/or the photographer can clearly understand the subject’s photo pose The specific fit with the target posture in the posture image.
应理解,该终端设备在获取到该当前姿势与该目标姿势之间的匹配度后,若该匹配度小于预设阈值,该终端设备则可以进行姿势比较来找出该当前姿势与该目标姿势之间的区别位置,从而可以根据该区别位置来提示拍摄对象进行姿势调整。例如,可以通过语音播放的方式来提示拍摄对象进行姿势调整和/或可以通过文字显示的方式来提示拍摄对象进行姿势调整。其中,该预设阈值应理解为该终端设备中预先设置的阈值,该预先设置的阈值可以由该终端设备所在的用户设置,也可以由该终端设备系统默认设置。It should be understood that after the terminal device obtains the matching degree between the current posture and the target posture, if the matching degree is less than a preset threshold, the terminal device can perform posture comparison to find out the current posture and the target posture Therefore, the subject can be prompted to adjust the posture according to the different position. For example, the subject may be prompted to adjust the posture through voice playback and/or the subject may be prompted to adjust the posture through text display. The preset threshold value should be understood as a threshold value preset in the terminal device. The preset threshold value may be set by the user where the terminal device is located, or may be set by default by the terminal device system.
需要说明的是,在得到姿势图像中的目标姿势后,该终端设备也可以根据当前场景生成该目标姿势对应的三维模型,并可以将该三维模型融合至该原始图像显示为预览图像,以通过三维的AR形象来进行更精确、更形象地姿势指导。It should be noted that after obtaining the target posture in the posture image, the terminal device can also generate a three-dimensional model corresponding to the target posture according to the current scene, and can fuse the three-dimensional model into the original image and display it as a preview image to pass Three-dimensional AR image for more precise and vivid posture guidance.
本申请实施例在获取原始图像后,可以识别该原始图像中拍摄对象的目标特征以及拍摄对象所在场景的场景特征,并通过结合拍摄对象的目标特征以及拍摄对象所在场景的场景特征获取符合拍摄对象以及拍摄对象所在场景的姿势图像,可以提高姿势图像获取的准确性和有效性,使得所获取的姿势图像符合拍摄对象以及拍摄对象当前所在场景的拍照需求。另外,通过将姿势图像与原始图像叠加显示为预览图像,通过在预览图像中进行目标姿势的显示,方便根据预览图像中的目标姿势快速指导拍摄对象进行姿势调整,提高姿势调整效率,提高拍照效率,以有效提高图像的拍摄效果,提升用户体验。After obtaining the original image, the embodiment of the present application can identify the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located, and obtain a match with the shooting object by combining the target feature of the shooting object and the scene feature of the scene where the shooting object is located And the posture image of the scene where the shooting object is located can improve the accuracy and effectiveness of the posture image acquisition, so that the obtained posture image meets the photographing requirements of the shooting object and the scene where the shooting object is currently located. In addition, by superimposing the posture image and the original image as a preview image, and by displaying the target posture in the preview image, it is convenient to quickly guide the subject to adjust the posture according to the target posture in the preview image, which improves the efficiency of posture adjustment and the efficiency of taking pictures. , In order to effectively improve the shooting effect of the image and enhance the user experience.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
对应于上文实施例所述的辅助拍照方法,图9示出了本申请实施例提供的辅助拍照装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the auxiliary photographing method described in the above embodiments, FIG. 9 shows a structural block diagram of an auxiliary photographing device provided in an embodiment of the present application. For ease of description, only parts related to the embodiment of the present application are shown.
参照图9,该辅助拍照装置可以包括:Referring to FIG. 9, the auxiliary photographing device may include:
目标特征识别模块901,用于获取原始图像,并识别所述原始图像中拍摄对象的目标特征和所述拍摄对象所在场景的场景特征;The target feature recognition module 901 is configured to obtain an original image, and recognize the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located;
姿势图像获取模块902,用于根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取姿势图像,所述姿势图像中包含待推荐的目标姿势;The posture image acquisition module 902 is configured to obtain a posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located, and the posture image contains the target posture to be recommended;
姿势图像叠加模块903,用于将所述姿势图像与所述原始图像叠加显示为预览图像,以根据所述预览图像中的所述目标姿势指导所述拍摄对象进行姿势调整。The posture image superimposing module 903 is configured to superimpose and display the posture image and the original image as a preview image, so as to guide the subject to perform posture adjustment according to the target posture in the preview image.
在一种可能的实现方式中,所述姿势图像叠加模块903,可以包括:In a possible implementation manner, the posture image superimposing module 903 may include:
第一姿势图像叠加单元,用于为所述姿势图像添加图层蒙版,并将添加图层蒙版的姿势图像与所述原始图像叠加显示为所述预览图像,所述图层蒙版中所述目标姿势对应的位置设置为白色,所述图层蒙版中除所述目标姿势以外的位置设置为黑色。The first posture image superimposing unit is used to add a layer mask to the posture image, and superimpose and display the posture image with the added layer mask and the original image as the preview image, in the layer mask The position corresponding to the target posture is set to white, and the position other than the target posture in the layer mask is set to black.
在另一种可能的实现方式中,所述姿势图像叠加模块903,还可以包括:In another possible implementation manner, the posture image superimposing module 903 may further include:
姿势图像分割单元,用于从所述姿势图像中分割出所述目标姿势;A posture image segmentation unit for segmenting the target posture from the posture image;
第二姿势图像叠加单元,用于将所述目标姿势叠加至所述原始图像,并将叠加所述目标姿势的所述原始图像显示为预览图像。The second posture image superimposing unit is configured to superimpose the target posture on the original image, and display the original image superimposed on the target posture as a preview image.
可选地,所述第二姿势图像叠加单元,可以包括:Optionally, the second posture image superimposing unit may include:
第一位置获取分单元,用于获取所述目标姿势在所述姿势图像中的第一位置;The first position acquisition subunit is configured to acquire the first position of the target posture in the posture image;
第二位置确定分单元,用于根据所述第一位置确定所述目标姿势在所述原始图像中的第二位置,并将所述目标姿势叠加至所述原始图像的第二位置处。The second position determination subunit is configured to determine the second position of the target posture in the original image according to the first position, and superimpose the target posture on the second position of the original image.
示例的,所述姿势图像获取模块902,可以包括:For example, the posture image acquisition module 902 may include:
拍照特征获取单元,用于获取所述拍摄对象的拍照特征,所述拍照特征为所述拍摄对象对应的拍照喜好特征;A photographing feature acquiring unit, configured to acquire a photographing characteristic of the photographing object, where the photographing characteristic is a photographing preference characteristic corresponding to the photographing object;
第一姿势图像获取单元,用于根据所述拍摄对象的目标特征和拍照特征以及所述拍摄对象所在场景的场景特征获取所述姿势图像。The first posture image obtaining unit is configured to obtain the posture image according to the target feature and the photographing feature of the shooting object and the scene feature of the scene where the shooting object is located.
可选地,所述姿势图像获取模块902,可以包括:Optionally, the posture image acquisition module 902 may include:
样本图像获取单元,用于根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取至少一张样本图像;A sample image acquisition unit, configured to acquire at least one sample image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located;
推荐值获取单元,用于获取所述至少一张样本图像对应的推荐值;A recommended value obtaining unit, configured to obtain a recommended value corresponding to the at least one sample image;
第二姿势图像获取单元,用于根据所述推荐值从所述至少一张样本图像中选取目标样本图像,并根据所述目标样本图像获取所述姿势图像。The second posture image obtaining unit is configured to select a target sample image from the at least one sample image according to the recommended value, and obtain the posture image according to the target sample image.
在一种可能的实现方式中,所述辅助拍照装置还可以包括:In a possible implementation manner, the auxiliary photographing device may further include:
图像尺寸获取模块,用于获取所述原始图像对应的第一图像尺寸和所述姿势图像对应的第二图像尺寸;An image size obtaining module, configured to obtain a first image size corresponding to the original image and a second image size corresponding to the posture image;
图像尺寸调整模块,用于根据所述原始图像对应的第一图像尺寸调整所述姿势图像对应的第二图像尺寸,以将所述姿势图像对应的第二图像尺寸调整至所述第一图像尺寸。The image size adjustment module is configured to adjust the second image size corresponding to the posture image according to the first image size corresponding to the original image, so as to adjust the second image size corresponding to the posture image to the first image size .
可选地,所述辅助拍照装置还可以包括:Optionally, the auxiliary photographing device may further include:
当前姿势获取模块,用于获取所述拍摄对象的当前姿势;The current posture acquisition module is used to acquire the current posture of the photographed object;
当前姿势匹配模块,用于确定所述当前姿势和所述目标姿势之间的匹配度,并根据所述匹配度指导所述拍摄对象进行姿势调整。The current posture matching module is used to determine the degree of matching between the current posture and the target posture, and guide the subject to adjust the posture according to the degree of matching.
需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information interaction and execution process between the above-mentioned devices/units are based on the same concept as the method embodiment of this application, and its specific functions and technical effects can be found in the method embodiment section. I won't repeat it here.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as required. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist alone physically, or two or more units can be integrated into one unit. The above-mentioned integrated units can be hardware-based Formal realization can also be realized in the form of a software functional unit. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the foregoing system, reference may be made to the corresponding process in the foregoing method embodiment, which will not be repeated here.
图10为本申请一实施例提供的终端设备的结构示意图。如图10所示,该实施例的终端设备10包括:至少一个处理器1000(图10中仅示出一个)、存储器1001以及存储在所述存储器1001中并可在所述至少一个处理器1000上运行的计算机程序1002,所述处理器1000执行所述计算机程序1002时实现上述任意各个辅助拍照方法实施例中的步骤。FIG. 10 is a schematic structural diagram of a terminal device provided by an embodiment of this application. As shown in FIG. 10, the terminal device 10 of this embodiment includes: at least one processor 1000 (only one is shown in FIG. 10), a memory 1001, and stored in the memory 1001 and can be stored in the at least one processor 1000. When the processor 1000 executes the computer program 1002, the steps in any of the foregoing embodiments of the auxiliary photographing method are implemented.
该终端设备10可包括,但不仅限于,处理器1000、存储器1001。本领域技术人员可以理解,图10仅仅是终端设备10的举例,并不构成对终端设备10的限定,可以包括比图示更多或更少的 部件,或者组合某些部件,或者不同的部件,例如还可以包括输入输出设备、网络接入设备等。The terminal device 10 may include, but is not limited to, a processor 1000 and a memory 1001. Those skilled in the art can understand that FIG. 10 is only an example of the terminal device 10, and does not constitute a limitation on the terminal device 10. It may include more or less components than shown in the figure, or a combination of certain components, or different components. , For example, can also include input and output devices, network access devices, and so on.
所述处理器1000可以是中央处理单元(Central Processing Unit,CPU),该处理器1000还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 1000 may be a central processing unit (Central Processing Unit, CPU), and the processor 1000 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). , ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
所述存储器1001在一些实施例中可以是所述终端设备10的内部存储单元,例如终端设备10的硬盘或内存。所述存储器1001在另一些实施例中也可以是所述终端设备10的外部存储设备,例如所述终端设备10上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器1001还可以既包括所述终端设备10的内部存储单元也包括外部存储设备。所述存储器1001用于存储操作系统、应用程序、引导装载程序(BootLoader)、数据以及其他程序等,例如所述计算机程序的程序代码等。所述存储器1001还可以用于暂时地存储已经输出或者将要输出的数据。The memory 1001 may be an internal storage unit of the terminal device 10 in some embodiments, such as a hard disk or a memory of the terminal device 10. In other embodiments, the memory 1001 may also be an external storage device of the terminal device 10, for example, a plug-in hard disk equipped on the terminal device 10, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc. Further, the memory 1001 may also include both an internal storage unit of the terminal device 10 and an external storage device. The memory 1001 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 1001 can also be used to temporarily store data that has been output or will be output.
示例的,本申请实施例涉及的终端设备可以是手机、平板电脑、可穿戴设备等。以所述终端设备为手机为例。图11示出的是与本申请实施例提供的手机的部分结构的框图。参考图11,手机包括:射频(Radio Frequency,RF)电路1110、存储器1120、输入单元1130、显示单元1140、传感器1150、音频电路1160、无线保真(wireless fidelity,WiFi)模块1170、处理器1180、以及电源1190等部件。本领域技术人员可以理解,图11中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。For example, the terminal device involved in the embodiment of the present application may be a mobile phone, a tablet computer, a wearable device, and the like. Take the terminal device as a mobile phone as an example. FIG. 11 shows a block diagram of a part of the structure of a mobile phone provided in an embodiment of the present application. Referring to FIG. 11, the mobile phone includes: a radio frequency (RF) circuit 1110, a memory 1120, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a wireless fidelity (WiFi) module 1170, and a processor 1180 , And power supply 1190 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 11 does not constitute a limitation on the mobile phone, and may include more or fewer components than those shown in the figure, or a combination of some components, or different component arrangements.
下面结合图11对手机的各个构成部件进行具体的介绍:The following describes the components of the mobile phone in detail with reference to Figure 11:
RF电路1110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器1180处理;另外,将设计上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路1110还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 1110 can be used for receiving and sending signals during the process of sending and receiving information or talking. In particular, after receiving the downlink information of the base station, it is processed by the processor 1180; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 1110 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), Email, Short Messaging Service (SMS), etc.
存储器1120可用于存储软件程序以及模块,处理器1180通过运行存储在存储器1120的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器1120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 1120 may be used to store software programs and modules. The processor 1180 executes various functional applications and data processing of the mobile phone 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 an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc. In addition, the memory 1120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
输入单元1130可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元1130可包括触控面板1131以及其他输入设备1132。触控面板1131,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1131上或在触控面板1131附近的操作),并根据预先设定的程 式驱动相应的连接装置。可选的,触控面板1131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1180,并能接收处理器1180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1131。除了触控面板1131,输入单元1130还可以包括其他输入设备1132。具体地,其他输入设备1132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 1130 may be used to receive inputted digital or character information, and generate key signal input related to user settings and function control of the mobile phone. Specifically, the input unit 1130 may include a touch panel 1131 and other input devices 1132. The touch panel 1131, also called a touch screen, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 1131 or near the touch panel 1131. Operation), and drive the corresponding connection device according to the preset program. Optionally, the touch panel 1131 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 1180, and can receive and execute the commands sent by the processor 1180. In addition, the touch panel 1131 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 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 a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick.
显示单元1140可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1140可包括显示面板1141,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1141。进一步的,触控面板1131可覆盖显示面板1141,当触控面板1131检测到在其上或附近的触摸操作后,传送给处理器1180以确定触摸事件的类型,随后处理器1180根据触摸事件的类型在显示面板1141上提供相应的视觉输出。虽然在图11中,触控面板1131与显示面板1141是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1131与显示面板1141集成而实现手机的输入和输出功能。The display unit 1140 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1140 may include a display panel 1141. Optionally, the display panel 1141 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 1131 can cover the display panel 1141. When the touch panel 1131 detects a touch operation on or near it, it transmits it to the processor 1180 to determine the type of touch event, and then the processor 1180 responds to the touch event. The type provides corresponding visual output on the display panel 1141. Although in FIG. 11, the touch panel 1131 and the display panel 1141 are used as two independent components to implement the input and input functions of the mobile phone, but in some embodiments, the touch panel 1131 and the display panel 1141 can be integrated. Realize the input and output functions of mobile phones.
手机还可包括至少一种传感器1150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1141的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1141和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The mobile phone may also include at least one sensor 1150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor can 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 brightness of the ambient light. The proximity sensor can close the display panel 1141 and/or when the mobile phone is moved to the ear. Or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three-axis), and can detect the magnitude and direction of gravity when it is stationary. It can be used to identify mobile phone posture applications (such as horizontal and vertical screen switching, related Games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, percussion), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which can also be configured in mobile phones, I will not here Go into details.
音频电路1160、扬声器1161,传声器1162可提供用户与手机之间的音频接口。音频电路1160可将接收到的音频数据转换后的电信号,传输到扬声器1161,由扬声器1161转换为声音信号输出;另一方面,传声器1162将收集的声音信号转换为电信号,由音频电路1160接收后转换为音频数据,再将音频数据输出处理器1180处理后,经RF电路1110以发送给比如另一手机,或者将音频数据输出至存储器1120以便进一步处理。The audio circuit 1160, the speaker 1161, and the microphone 1162 can provide an audio interface between the user and the mobile phone. The audio circuit 1160 can transmit the electrical signal converted from the received audio data to the speaker 1161, which is converted into a sound signal by the speaker 1161 for output; on the other hand, the microphone 1162 converts the collected sound signal into an electrical signal, and the audio circuit 1160 After being received, the audio data is converted into audio data, and then processed by the audio data output processor 1180, and sent to, for example, another mobile phone via the RF circuit 1110, or the audio data is output to the memory 1120 for further processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块1170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图11示出了WiFi模块1170,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-distance wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1170. It provides users with wireless broadband Internet access. Although FIG. 11 shows the WiFi module 1170, it is understandable that it is not a necessary component of the mobile phone, and can be omitted as needed without changing the essence of the invention.
处理器1180是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1120内的软件程序和/或模块,以及调用存储在存储器1120内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器1180可包括一个或多个处理单元;优选的,处理器1180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1180中。The processor 1180 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes by running or executing software programs and/or modules stored in the memory 1120, and calling data stored in the memory 1120. Various functions and processing data of the mobile phone can be used to monitor the mobile phone as a whole. Optionally, the processor 1180 may include one or more processing units; preferably, the processor 1180 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc. , The modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 1180.
手机还可以包括给各个部件供电的电源(比如电池),优选的,电源可以通过电源管理系统与处理器1180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the processor 1180 through a power management system, so that functions such as charging, discharging, and power consumption management can be managed through the power management system.
尽管未示出,手机还可以包括摄像头1190。可选地,摄像头1190在手机的上的位置可以为前置的,也可以为后置的,本申请实施例对此不作限定。Although not shown, the mobile phone may also include a camera 1190. Optionally, the position of the camera 1190 on the mobile phone may be front-mounted or rear-mounted, which is not limited in the embodiment of the present application.
摄像头1190可以获取拍摄物体所生成的光学图像,并可以将光学图像转换成电信号,然后可以经过模数转换将电信号变为数字信号,随后可以将通过数字信号处理器DSP对数字信号进行加工处理,并可以将加工处理后的数字信号送到处理器1180中进行处理,最终转换成显示单元1140中能够看到的图像。The camera 1190 can obtain the optical image generated by the photographed object, and can convert the optical image into an electrical signal, and then can convert the electrical signal into a digital signal through analog-to-digital conversion, and then process the digital signal through the digital signal processor DSP The processed digital signal can be sent to the processor 1180 for processing, and finally converted into an image that can be seen in the display unit 1140.
可选地,手机可以包括单摄像头、双摄像头或三摄像头等,本申请实施例对此不作限定。Optionally, the mobile phone may include a single camera, a dual camera, or a triple camera, etc., which is not limited in the embodiment of the present application.
例如,手机可以包括三摄像头,其中,一个为主摄像头、一个为广角摄像头、一个为长焦摄像头。For example, a mobile phone may include three cameras, of which one is a main camera, one is a wide-angle camera, and one is a telephoto camera.
可选地,当手机包括多个摄像头1190时,这多个摄像头可以全部前置,或者全部后置,或者一部分前置、另一部分后置,本申请实施例对此不作限定。Optionally, when the mobile phone includes multiple cameras 1190, the multiple cameras may be all front-mounted, or all rear-mounted, or part of the front-mounted and some rear-mounted, which is not limited in this embodiment of the present application.
另外,尽管未示出,手机还可以包括蓝牙模块等,在此不再赘述。In addition, although not shown, the mobile phone may also include a Bluetooth module, etc., which will not be repeated here.
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时可实现上述各个方法实施例中的步骤。The embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in each of the foregoing method embodiments can be implemented.
本申请实施例提供了一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行时可实现上述各个方法实施例中的步骤。The embodiments of the present application provide a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the foregoing method embodiments when executed.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读存储介质至少可以包括:能够将计算机程序代码携带到装置/终端设备的任何实体或装置、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读存储介质不可以是电载波信号和电信信号。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the implementation of all or part of the processes in the above-mentioned embodiment methods in this application can be accomplished by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. The computer program can be stored in a computer-readable storage medium. When executed by the processor, the steps of the foregoing method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms. The computer-readable storage medium may at least include: any entity or device capable of carrying computer program code to the device/terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), and random access memory (RAM, Random Access Memory), electric carrier signal, telecommunications signal and software distribution medium. Such as U disk, mobile hard disk, floppy disk or CD-ROM, etc. In some jurisdictions, in accordance with legislation and patent practices, computer-readable storage media cannot be electrical carrier signals and telecommunication signals.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own focus. For parts that are not described in detail or recorded in an embodiment, reference may be made to related descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed device/terminal device and method may be implemented in other ways. For example, the device/terminal device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units. Or components can be combined or integrated into another system, or some features can be omitted or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可 以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, a person of ordinary skill in the art should understand that it can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in Within the scope of protection of this application.
Claims (18)
- 一种辅助拍照方法,其特征在于,包括:An auxiliary photographing method, characterized in that it comprises:获取原始图像,并识别所述原始图像中拍摄对象的目标特征和所述拍摄对象所在场景的场景特征;Acquiring an original image, and identifying the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located;根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取姿势图像,所述姿势图像中包含待推荐的目标姿势;Acquiring a posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located, where the posture image contains the target posture to be recommended;将所述姿势图像与所述原始图像叠加显示为预览图像,以根据所述预览图像中的所述目标姿势指导所述拍摄对象进行姿势调整。The posture image and the original image are superimposed and displayed as a preview image, so as to guide the photographic subject to perform posture adjustment according to the target posture in the preview image.
- 如权利要求1所述的辅助拍照方法,其特征在于,所述将所述姿势图像与所述原始图像叠加显示为预览图像包括:The auxiliary photographing method according to claim 1, wherein the superimposing and displaying the posture image and the original image as a preview image comprises:为所述姿势图像添加图层蒙版,并将添加图层蒙版的姿势图像与所述原始图像叠加显示为所述预览图像,所述图层蒙版中所述目标姿势对应的位置设置为白色,所述图层蒙版中除所述目标姿势以外的位置设置为黑色。A layer mask is added to the posture image, and the posture image with the added layer mask and the original image are superimposed and displayed as the preview image, and the position corresponding to the target posture in the layer mask is set to White, the position in the layer mask except the target pose is set to black.
- 如权利要求1所述的辅助拍照方法,其特征在于,所述将所述姿势图像与所述原始图像叠加显示为预览图像包括:The auxiliary photographing method according to claim 1, wherein the superimposing and displaying the posture image and the original image as a preview image comprises:从所述姿势图像中分割出所述目标姿势;Segmenting the target posture from the posture image;将所述目标姿势叠加至所述原始图像,并将叠加所述目标姿势的所述原始图像显示为预览图像。The target posture is superimposed on the original image, and the original image superimposed on the target posture is displayed as a preview image.
- 如权利要求3所述的辅助拍照方法,其特征在于,所述将所述目标姿势叠加至所述原始图像包括:The auxiliary photographing method according to claim 3, wherein the superimposing the target posture on the original image comprises:获取所述目标姿势在所述姿势图像中的第一位置;Acquiring the first position of the target posture in the posture image;根据所述第一位置确定所述目标姿势在所述原始图像中的第二位置,并将所述目标姿势叠加至所述原始图像的第二位置处。The second position of the target posture in the original image is determined according to the first position, and the target posture is superimposed at the second position of the original image.
- 如权利要求1所述的辅助拍照方法,其特征在于,所述根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取姿势图像包括:The auxiliary photographing method according to claim 1, wherein the acquiring a posture image according to the target feature of the photographing object and the scene characteristic of the scene where the photographing object is located comprises:获取所述拍摄对象的拍照特征,所述拍照特征为所述拍摄对象对应的拍照喜好特征;Acquiring a photographing feature of the photographing object, where the photographing characteristic is a photographing preference characteristic corresponding to the photographing object;根据所述拍摄对象的目标特征和拍照特征以及所述拍摄对象所在场景的场景特征获取所述姿势图像。The posture image is acquired according to the target feature and the photographing feature of the shooting object and the scene feature of the scene where the shooting object is located.
- 如权利要求1所述的辅助拍照方法,其特征在于,所述根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取姿势图像包括:The auxiliary photographing method according to claim 1, wherein the acquiring a posture image according to the target feature of the photographed object and the scene characteristic of the scene where the photographed object is located comprises:根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取至少一张样本图像;Acquiring at least one sample image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located;获取所述至少一张样本图像对应的推荐值;Acquiring the recommended value corresponding to the at least one sample image;根据所述推荐值从所述至少一张样本图像中选取目标样本图像,并根据所述目标样本图像获取所述姿势图像。A target sample image is selected from the at least one sample image according to the recommended value, and the posture image is acquired according to the target sample image.
- 如权利要求1所述的辅助拍照方法,其特征在于,在所述将所述姿势图像与所述原始图像叠加显示为预览图像之前包括:The auxiliary photographing method according to claim 1, wherein before the superimposing and displaying the posture image and the original image as a preview image comprises:获取所述原始图像对应的第一图像尺寸和所述姿势图像对应的第二图像尺寸;Acquiring a first image size corresponding to the original image and a second image size corresponding to the posture image;根据所述原始图像对应的第一图像尺寸调整所述姿势图像对应的第二图像尺寸,以将所述姿势图像对应的第二图像尺寸调整至所述第一图像尺寸。The second image size corresponding to the posture image is adjusted according to the first image size corresponding to the original image, so as to adjust the second image size corresponding to the posture image to the first image size.
- 如权利要求1至7中任一项所述的辅助拍照方法,其特征在于,在所述将所述姿势图像与所述原始图像叠加显示为预览图像之后包括:The auxiliary photographing method according to any one of claims 1 to 7, wherein after the superimposing and displaying the posture image and the original image as a preview image, it comprises:获取所述拍摄对象的当前姿势;Acquiring the current posture of the shooting object;确定所述当前姿势和所述目标姿势之间的匹配度,并根据所述匹配度指导所述拍摄对象进行姿势调整。The degree of matching between the current posture and the target posture is determined, and the shooting object is guided to adjust the posture according to the degree of matching.
- 一种辅助拍照装置,其特征在于,包括:An auxiliary photographing device, characterized in that it comprises:目标特征识别模块,用于获取原始图像,并识别所述原始图像中拍摄对象的目标特征和所述拍摄对象所在场景的场景特征;The target feature recognition module is used to obtain the original image, and recognize the target feature of the shooting object in the original image and the scene feature of the scene where the shooting object is located;姿势图像获取模块,用于根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取姿势图像,所述姿势图像中包含待推荐的目标姿势;A posture image acquisition module, configured to acquire a posture image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located, the posture image contains the target posture to be recommended;姿势图像叠加模块,用于将所述姿势图像与所述原始图像叠加显示为预览图像,以根据所述预览图像中的所述目标姿势指导所述拍摄对象进行姿势调整。The posture image superimposing module is configured to superimpose and display the posture image and the original image as a preview image, so as to guide the subject to perform posture adjustment according to the target posture in the preview image.
- 如权利要求9所述的辅助拍照装置,其特征在于,所述姿势图像叠加模块包括:9. The auxiliary photographing device according to claim 9, wherein the posture image superimposing module comprises:第一姿势图像叠加单元,用于为所述姿势图像添加图层蒙版,并将添加图层蒙版的姿势图像与所述原始图像叠加显示为所述预览图像,所述图层蒙版中所述目标姿势对应的位置设置为白色,所述图层蒙版中除所述目标姿势以外的位置设置为黑色。The first posture image superimposing unit is used to add a layer mask to the posture image, and superimpose and display the posture image with the added layer mask and the original image as the preview image, in the layer mask The position corresponding to the target posture is set to white, and the position other than the target posture in the layer mask is set to black.
- 如权利要求9所述的辅助拍照装置,其特征在于,所述姿势图像叠加模块还包括:9. The auxiliary photographing device according to claim 9, wherein the posture image superimposing module further comprises:姿势图像分割单元,用于从所述姿势图像中分割出所述目标姿势;A posture image segmentation unit for segmenting the target posture from the posture image;第二姿势图像叠加单元,用于将所述目标姿势叠加至所述原始图像,并将叠加所述目标姿势的所述原始图像显示为预览图像。The second posture image superimposing unit is configured to superimpose the target posture on the original image, and display the original image superimposed on the target posture as a preview image.
- 如权利要求11所述的辅助拍照装置,其特征在于,所述第二姿势图像叠加单元包括:The auxiliary photographing device according to claim 11, wherein the second posture image superimposing unit comprises:第一位置获取分单元,用于获取所述目标姿势在所述姿势图像中的第一位置;The first position acquisition subunit is configured to acquire the first position of the target posture in the posture image;第二位置确定分单元,用于根据所述第一位置确定所述目标姿势在所述原始图像中的第二位置,并将所述目标姿势叠加至所述原始图像的第二位置处。The second position determination subunit is configured to determine the second position of the target posture in the original image according to the first position, and superimpose the target posture on the second position of the original image.
- 如权利要求9所述的辅助拍照装置,其特征在于,所述姿势图像获取模块包括:9. The auxiliary photographing device according to claim 9, wherein the posture image acquisition module comprises:拍照特征获取单元,用于获取所述拍摄对象的拍照特征,所述拍照特征为所述拍摄对象对应的拍照喜好特征;A photographing feature acquiring unit, configured to acquire a photographing characteristic of the photographing object, where the photographing characteristic is a photographing preference characteristic corresponding to the photographing object;第一姿势图像获取单元,用于根据所述拍摄对象的目标特征和拍照特征以及所述拍摄对象所在场景的场景特征获取所述姿势图像。The first posture image obtaining unit is configured to obtain the posture image according to the target feature and the photographing feature of the shooting object and the scene feature of the scene where the shooting object is located.
- 如权利要求9所述的辅助拍照装置,其特征在于,所述姿势图像获取模块包括:9. The auxiliary photographing device according to claim 9, wherein the posture image acquisition module comprises:样本图像获取单元,用于根据所述拍摄对象的目标特征和所述拍摄对象所在场景的场景特征获取至少一张样本图像;A sample image acquisition unit, configured to acquire at least one sample image according to the target feature of the shooting object and the scene feature of the scene where the shooting object is located;推荐值获取单元,用于获取所述至少一张样本图像对应的推荐值;A recommended value obtaining unit, configured to obtain a recommended value corresponding to the at least one sample image;第二姿势图像获取单元,用于根据所述推荐值从所述至少一张样本图像中选取目标样本图像,并根据所述目标样本图像获取所述姿势图像。The second posture image obtaining unit is configured to select a target sample image from the at least one sample image according to the recommended value, and obtain the posture image according to the target sample image.
- 如权利要求9所述的辅助拍照装置,其特征在于,所述辅助拍照装置还包括:9. The auxiliary photographing device of claim 9, wherein the auxiliary photographing device further comprises:图像尺寸获取模块,用于获取所述原始图像对应的第一图像尺寸和所述姿势图像对应的第二图像尺寸;An image size obtaining module, configured to obtain a first image size corresponding to the original image and a second image size corresponding to the posture image;图像尺寸调整模块,用于根据所述原始图像对应的第一图像尺寸调整所述姿势图像对应的第 二图像尺寸,以将所述姿势图像对应的第二图像尺寸调整至所述第一图像尺寸。The image size adjustment module is configured to adjust the second image size corresponding to the posture image according to the first image size corresponding to the original image, so as to adjust the second image size corresponding to the posture image to the first image size .
- 如权利要求9至15中任一项所述的辅助拍照装置,其特征在于,所述辅助拍照装置还包括:The auxiliary photographing device according to any one of claims 9 to 15, wherein the auxiliary photographing device further comprises:当前姿势获取模块,用于获取所述拍摄对象的当前姿势;The current posture acquisition module is used to acquire the current posture of the photographed object;当前姿势匹配模块,用于确定所述当前姿势和所述目标姿势之间的匹配度,并根据所述匹配度指导所述拍摄对象进行姿势调整。The current posture matching module is used to determine the degree of matching between the current posture and the target posture, and guide the subject to adjust the posture according to the degree of matching.
- 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至8中任一项所述的辅助拍照方法。A terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program as claimed in claims 1 to 8. The auxiliary photographing method described in any one of 8.
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至8中任一项所述的辅助拍照方法。A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the auxiliary photographing method according to any one of claims 1 to 8 .
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911423536.3A CN113132618B (en) | 2019-12-31 | 2019-12-31 | Auxiliary photographing method and device, terminal equipment and storage medium |
CN201911423536.3 | 2019-12-31 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021135601A1 true WO2021135601A1 (en) | 2021-07-08 |
Family
ID=76686437
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/125204 WO2021135601A1 (en) | 2019-12-31 | 2020-10-30 | Auxiliary photographing method and apparatus, terminal device, and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113132618B (en) |
WO (1) | WO2021135601A1 (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113537374A (en) * | 2021-07-26 | 2021-10-22 | 百度在线网络技术(北京)有限公司 | Confrontation sample generation method |
CN113596323A (en) * | 2021-07-13 | 2021-11-02 | 咪咕文化科技有限公司 | Intelligent group photo method, device, mobile terminal and computer program product |
CN113627117A (en) * | 2021-07-19 | 2021-11-09 | 深圳新益昌科技股份有限公司 | Die bonding path planning method and device, terminal equipment and readable storage medium |
CN113691727A (en) * | 2021-08-25 | 2021-11-23 | 广州岸边网络科技有限公司 | Photographing system based on motion control |
CN113705401A (en) * | 2021-08-18 | 2021-11-26 | 深圳传音控股股份有限公司 | Image processing method, terminal device and storage medium |
CN113934340A (en) * | 2021-09-22 | 2022-01-14 | 青岛海信移动通信技术股份有限公司 | Terminal device and progress bar display method |
CN113938620A (en) * | 2021-11-12 | 2022-01-14 | 深圳传音控股股份有限公司 | Image processing method, mobile terminal and storage medium |
CN116757983A (en) * | 2023-07-03 | 2023-09-15 | 北京拙河科技有限公司 | Main and auxiliary image fusion method and device |
WO2023192771A1 (en) * | 2022-03-29 | 2023-10-05 | Qualcomm Incorporated | Recommendations for image capture |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115767256A (en) * | 2021-09-03 | 2023-03-07 | 北京字跳网络技术有限公司 | Shooting method, shooting device, electronic equipment and storage medium |
CN113905174B (en) * | 2021-09-18 | 2024-07-19 | 咪咕文化科技有限公司 | Shooting gesture recommendation method, device, equipment and computer readable storage medium |
CN113890994B (en) * | 2021-09-30 | 2022-12-23 | 荣耀终端有限公司 | Image photographing method, system and storage medium |
CN113942429A (en) * | 2021-11-16 | 2022-01-18 | 深圳荆虹科技有限公司 | Vehicle seat adjusting method, vehicle seat adjusting system, vehicle, and storage medium |
CN114285988B (en) * | 2021-12-03 | 2024-04-09 | 维沃移动通信有限公司 | Display method, display device, electronic equipment and storage medium |
CN115022543A (en) * | 2022-05-31 | 2022-09-06 | Oppo广东移动通信有限公司 | Photographing method, photographing device, terminal and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040189829A1 (en) * | 2003-03-25 | 2004-09-30 | Fujitsu Limited | Shooting device and shooting method |
CN102891958A (en) * | 2011-07-22 | 2013-01-23 | 北京华旗随身数码股份有限公司 | Digital camera with posture guiding function |
CN103220466A (en) * | 2013-03-27 | 2013-07-24 | 华为终端有限公司 | Method and device for outputting pictures |
CN105578037A (en) * | 2015-12-16 | 2016-05-11 | 天津优爱创科技有限公司 | Photographing device with auxiliary posture function based on wireless communication |
CN107018333A (en) * | 2017-05-27 | 2017-08-04 | 北京小米移动软件有限公司 | Shoot template and recommend method, device and capture apparatus |
US20190159966A1 (en) * | 2017-11-29 | 2019-05-30 | International Business Machines Corporation | Methods and systems for managing photographic capture |
CN110476405A (en) * | 2017-12-01 | 2019-11-19 | 三星电子株式会社 | For providing and shooting the method and system of related recommendation information |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106502693B (en) * | 2016-10-17 | 2019-07-19 | 努比亚技术有限公司 | A kind of image display method and device |
CN108184050B (en) * | 2017-12-15 | 2020-04-24 | 维沃移动通信有限公司 | Photographing method and mobile terminal |
CN108347559A (en) * | 2018-01-05 | 2018-07-31 | 深圳市金立通信设备有限公司 | A kind of image pickup method, terminal and computer readable storage medium |
CN108495029B (en) * | 2018-03-15 | 2020-03-31 | 维沃移动通信有限公司 | Photographing method and mobile terminal |
CN108540724A (en) * | 2018-04-28 | 2018-09-14 | 维沃移动通信有限公司 | A kind of image pickup method and mobile terminal |
CN110543578B (en) * | 2019-08-09 | 2024-05-14 | 华为技术有限公司 | Object identification method and device |
CN110475069B (en) * | 2019-09-03 | 2021-05-07 | 腾讯科技(深圳)有限公司 | Image shooting method and device |
-
2019
- 2019-12-31 CN CN201911423536.3A patent/CN113132618B/en active Active
-
2020
- 2020-10-30 WO PCT/CN2020/125204 patent/WO2021135601A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040189829A1 (en) * | 2003-03-25 | 2004-09-30 | Fujitsu Limited | Shooting device and shooting method |
CN102891958A (en) * | 2011-07-22 | 2013-01-23 | 北京华旗随身数码股份有限公司 | Digital camera with posture guiding function |
CN103220466A (en) * | 2013-03-27 | 2013-07-24 | 华为终端有限公司 | Method and device for outputting pictures |
CN105578037A (en) * | 2015-12-16 | 2016-05-11 | 天津优爱创科技有限公司 | Photographing device with auxiliary posture function based on wireless communication |
CN107018333A (en) * | 2017-05-27 | 2017-08-04 | 北京小米移动软件有限公司 | Shoot template and recommend method, device and capture apparatus |
US20190159966A1 (en) * | 2017-11-29 | 2019-05-30 | International Business Machines Corporation | Methods and systems for managing photographic capture |
CN110476405A (en) * | 2017-12-01 | 2019-11-19 | 三星电子株式会社 | For providing and shooting the method and system of related recommendation information |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113596323A (en) * | 2021-07-13 | 2021-11-02 | 咪咕文化科技有限公司 | Intelligent group photo method, device, mobile terminal and computer program product |
CN113627117A (en) * | 2021-07-19 | 2021-11-09 | 深圳新益昌科技股份有限公司 | Die bonding path planning method and device, terminal equipment and readable storage medium |
CN113537374A (en) * | 2021-07-26 | 2021-10-22 | 百度在线网络技术(北京)有限公司 | Confrontation sample generation method |
CN113537374B (en) * | 2021-07-26 | 2023-09-08 | 百度在线网络技术(北京)有限公司 | Method for generating countermeasure sample |
CN113705401A (en) * | 2021-08-18 | 2021-11-26 | 深圳传音控股股份有限公司 | Image processing method, terminal device and storage medium |
CN113691727A (en) * | 2021-08-25 | 2021-11-23 | 广州岸边网络科技有限公司 | Photographing system based on motion control |
CN113934340B (en) * | 2021-09-22 | 2024-04-19 | 青岛海信移动通信技术有限公司 | Terminal equipment and progress bar display method |
CN113934340A (en) * | 2021-09-22 | 2022-01-14 | 青岛海信移动通信技术股份有限公司 | Terminal device and progress bar display method |
CN113938620A (en) * | 2021-11-12 | 2022-01-14 | 深圳传音控股股份有限公司 | Image processing method, mobile terminal and storage medium |
CN113938620B (en) * | 2021-11-12 | 2023-11-07 | 深圳传音控股股份有限公司 | Image processing method, mobile terminal and storage medium |
WO2023192771A1 (en) * | 2022-03-29 | 2023-10-05 | Qualcomm Incorporated | Recommendations for image capture |
US11871104B2 (en) | 2022-03-29 | 2024-01-09 | Qualcomm Incorporated | Recommendations for image capture |
CN116757983B (en) * | 2023-07-03 | 2024-02-06 | 北京拙河科技有限公司 | Main and auxiliary image fusion method and device |
CN116757983A (en) * | 2023-07-03 | 2023-09-15 | 北京拙河科技有限公司 | Main and auxiliary image fusion method and device |
Also Published As
Publication number | Publication date |
---|---|
CN113132618B (en) | 2022-09-09 |
CN113132618A (en) | 2021-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021135601A1 (en) | Auxiliary photographing method and apparatus, terminal device, and storage medium | |
EP3965003A1 (en) | Image processing method and device | |
CN111182205B (en) | Photographing method, electronic device, and medium | |
WO2021098609A1 (en) | Method and device for image detection, and electronic device | |
CN109743504B (en) | Auxiliary photographing method, mobile terminal and storage medium | |
CN110443769B (en) | Image processing method, image processing device and terminal equipment | |
CN112351185A (en) | Photographing method and mobile terminal | |
CN107368810A (en) | Method for detecting human face and device | |
CN107592459A (en) | A kind of photographic method and mobile terminal | |
CN109495616B (en) | Photographing method and terminal equipment | |
CN109862266B (en) | Image sharing method and terminal | |
WO2022057435A1 (en) | Search-based question answering method, and storage medium | |
CN111159449B (en) | Image display method and electronic equipment | |
CN107707762A (en) | A kind of method for operating application program and mobile terminal | |
CN111050077B (en) | Shooting method and electronic equipment | |
CN108833709A (en) | A kind of the starting method and mobile terminal of camera | |
WO2021109960A1 (en) | Image processing method, electronic device, and storage medium | |
KR102680936B1 (en) | Object display methods and electronic devices | |
CN109246351B (en) | Composition method and terminal equipment | |
WO2021082772A1 (en) | Screenshot method and electronic device | |
WO2021017713A1 (en) | Photographing method and mobile terminal | |
CN109917988B (en) | Selected content display method, device, terminal and computer readable storage medium | |
CN111079030A (en) | Group searching method and electronic device | |
CN110086998B (en) | Shooting method and terminal | |
CN108345657B (en) | Picture screening method and mobile terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20908928 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20908928 Country of ref document: EP Kind code of ref document: A1 |