Nothing Special   »   [go: up one dir, main page]

WO2021179773A1 - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
WO2021179773A1
WO2021179773A1 PCT/CN2020/142530 CN2020142530W WO2021179773A1 WO 2021179773 A1 WO2021179773 A1 WO 2021179773A1 CN 2020142530 W CN2020142530 W CN 2020142530W WO 2021179773 A1 WO2021179773 A1 WO 2021179773A1
Authority
WO
WIPO (PCT)
Prior art keywords
posture
preview image
target reference
scene
terminal
Prior art date
Application number
PCT/CN2020/142530
Other languages
French (fr)
Chinese (zh)
Inventor
黄秀杰
张迪
马飞龙
李宇
宋星光
王提政
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021179773A1 publication Critical patent/WO2021179773A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/017Gesture based interaction, e.g. based on a set of recognized hand gestures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body

Definitions

  • This application relates to the field of image processing technology, and in particular to image processing methods and devices.
  • portrait photography occupies a large proportion of mobile phone photography. To obtain beautiful portrait photography, you must first determine the shooting angle of the portrait, then determine the shooting composition suitable for the current shooting scene, and then pose to take the desired picture.
  • posture recommendation applications on the market.
  • the working principle is specifically as follows: the user manually selects the posture to be photographed, and then the mobile phone displays the posture selected by the user on the display screen.
  • the person being photographed poses under the guidance of the displayed posture, and then the photographer actively decides whether to shoot.
  • the application requires the subjective judgment of the photographer during the posture recommendation process, and the interactivity is not very friendly and lacks intelligence.
  • the embodiments of the present application provide an image processing method and device.
  • the interaction is better and more intelligent, so that the user experience can be improved.
  • an image processing method is provided, and the method is applied to a first terminal.
  • the method includes: firstly displaying a first preview image of the current shooting scene, the first preview image including a first portrait of the photographed person in a first posture.
  • the first preview image is recognized to determine the scene category of the current shooting scene.
  • the embodiment of the present application provides an intelligent gesture guidance/recommendation method that integrates scene information, and the entire process of recommending gestures does not require user participation, so the interaction is better and more intelligent, which can improve the user’s Experience.
  • the first posture is different from the second posture.
  • the target image may be an image obtained by shooting the current shooting scene by the first device.
  • the target image is the image that the first terminal needs to save.
  • the target reference posture and the first posture meet at least one of the following conditions: the target reference posture is different from the first posture; the relative position of the target reference posture in the second preview image is in the first posture. The relative position in a preview image is different; or, the size occupied by the target reference posture in the second preview image is different from the size occupied by the first posture in the first preview image.
  • the technical solution provided by this possible design can be understood as: displaying the target reference posture in the second preview image when at least one of the foregoing conditions is satisfied.
  • the embodiment of the present application provides a possible trigger condition for displaying the target reference posture in the second preview image.
  • the scene category of the current shooting scene includes at least one of the following categories: grass scene, step scene, seaside scene, sunset scene, road scene, or tower scene.
  • grass scene grass scene
  • step scene seaside scene
  • sunset scene seaside scene
  • road scene road scene
  • tower scene the specific implementation is not limited to this.
  • the posture category of the target reference posture is obtained based on the posture category of the first posture; wherein the posture category includes a sitting posture, a standing posture, or a lying posture.
  • the posture category of the target reference posture is consistent with the posture category of the first posture. In this way, for the person being photographed, there is no need to greatly adjust the posture, which helps to improve the user experience.
  • the target reference posture is among multiple reference postures corresponding to the category of the current shooting scene, and the similarity with the first posture is greater than or equal to the first threshold. Since the reference posture is a pre-defined graceful and natural posture, the technical solution provided by this possible design helps to minimize the adjustment by the photographer while guaranteeing (or as much as possible) recommending a graceful and natural posture to the user The amplitude of the posture, thereby improving the user experience.
  • the target reference posture is the reference posture with the highest similarity to the first posture among the multiple reference postures corresponding to the category of the current shooting scene. Since the reference posture is a pre-defined graceful and natural posture, the technical solution provided by this possible design helps to minimize the adjustment by the photographer while guaranteeing (or as much as possible) recommending a graceful and natural posture to the user The amplitude of the posture, thereby improving the user experience.
  • the position of the target reference posture in the second preview image is determined based on the position of the first preset object in the first preview image in the first preview image; wherein the target reference posture is There is a first association relationship between the first local posture of and the position of the first preset object in the same image, and the first association relationship is predefined or determined in real time.
  • This possible design provides a specific implementation for determining the position of the target reference posture in the second preview image. In this way, it is helpful to improve the degree of combination (or degree of coupling or association) between the person's posture and the preset object in the preview image, so that the photographing effect is better.
  • the size of the target reference pose in the second preview image is determined based on the size of the second preset object in the first preview image in the first preview image; wherein, There is a second association relationship between the target reference posture and the size of the second preset object in the same image, and the second association relationship is predefined or determined in real time.
  • This possible design provides a specific implementation for determining the size of the target reference pose in the second preview image. In this way, it helps to improve the overall composition effect, thereby making the picture better.
  • displaying the target reference posture in the second preview image includes: displaying the target reference posture in the form of a human skeleton or a human contour in the second preview image.
  • the target reference posture information is determined by the first terminal itself, or acquired by the first terminal from a network device.
  • displaying the target reference pose in the second preview image includes: if the scene category of the current shooting scene includes multiple scene categories, displaying multiple target reference poses in the second preview image; wherein, There is a one-to-one correspondence between the scene category and the target reference state.
  • the target image is generated according to the second preview image, including: if the second posture matches any one of the multiple target reference postures, then according to the second preview The image generates the target image.
  • the method further includes: sending information about the target reference pose and information about the second preview image to the second terminal to instruct the second terminal to display the second preview image, and display it in the second preview image Target reference posture.
  • sending information about the target reference pose and information about the second preview image to the second terminal to instruct the second terminal to display the second preview image, and display it in the second preview image Target reference posture.
  • the method further includes: displaying category information of the current shooting scene in the second preview image. In this way, the user can learn the category information of the current shooting scene, thereby improving the user experience.
  • different scene categories are characterized by different predefined object groups. If the first preview image contains a predefined object group, the scene category of the current shooting scene is the scene category represented by the predefined object group. If the first preview image contains multiple predefined object groups, the scene category of the current shooting scene is part or all of the scene categories represented by the multiple predefined object groups. In other words, the scene category of the current shooting scene may be one or more.
  • the proportion of the first portrait in the first preview image is greater than or equal to the second threshold.
  • the number of pixels in the first portrait is greater than or equal to the third threshold.
  • the first portrait is larger. This is in consideration of “if the person’s portrait is small, it is difficult to judge the posture of the person who is being photographed, which will result in little significance in recommending the reference posture”, and “in order to avoid using the person in the background as the person being photographed. ⁇ ” and proposed the technical proposal.
  • the target image is generated according to the second preview image, including: if the second posture matches the target reference posture, output prompt information, and the prompt information is used for prompting
  • the second posture matches the target reference posture; the first operation is received; in response to the first operation, the target image is generated according to the second preview image.
  • This method provides a specific implementation method for generating the target image under the instruction of the user.
  • the first terminal may automatically generate the target image according to the second preview image when determining that the second posture matches the target reference posture.
  • the method further includes: if the similarity between the second posture and the target reference posture is greater than or equal to a fourth threshold, determining that the second posture matches the target reference posture.
  • the method includes: calculating a first vector and a second vector; where the first vector is a vector formed by relative angle information of key points in the second portrait, and is used to represent the second posture; second The vector is a vector formed by the relative angle information of the key points in the portrait in the target reference pose, which is used to characterize the target reference pose; calculate the distance between the first vector and the second vector; if the distance is less than or equal to the fifth threshold, determine the first The similarity between the second posture and the target reference posture is greater than or equal to the fourth threshold.
  • the method further includes: inputting the second posture and the target reference posture into the neural network to obtain the similarity between the second posture and the target reference posture; wherein the neural network is used to represent multiple input The similarity between postures.
  • an image processing device which may be a terminal, a chip, or a chip system.
  • the device can be used to execute any of the methods provided in the first aspect above.
  • the device may be divided into functional modules according to any of the methods provided in the above-mentioned first aspect and any of its possible design manners.
  • each function module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the present application may divide the device into a processing unit and a sending unit according to functions.
  • the device includes a memory and one or more processors, where the memory is used to store computer instructions, and the processor is used to call the computer instructions to execute the first aspect and any of them.
  • Any method provided by a possible design method the display step in any method provided in the above-mentioned first aspect and any of its possible design manners can be specifically replaced with a control display step in the possible design.
  • the output step in any method provided in the above-mentioned first aspect or any possible design manner can be specifically replaced with a control output step in this possible design.
  • a terminal which includes a processor, a memory, and a display screen.
  • the display screen is used to display images and other information
  • the memory is used to store computer programs and instructions
  • the processor is used to call the computer programs and instructions, and cooperate with the display screen to execute the technical solutions provided by the first aspect or its corresponding possible designs.
  • a computer-readable storage medium such as a non-transitory computer-readable storage medium.
  • a computer program (or instruction) is stored thereon, and when the computer program (or instruction) runs on a computer, the computer is caused to execute any method provided by any one of the possible implementations of the first aspect.
  • the display step in any method provided in the above-mentioned first aspect and any of its possible design manners can be specifically replaced with a control display step in the possible design.
  • the output step in any method provided in the above-mentioned first aspect or any possible design manner can be specifically replaced with a control output step in this possible design.
  • a computer program product which, when running on a computer, enables any method provided in any possible implementation manner of the first aspect or the second aspect to be executed.
  • the display step in any method provided in the above-mentioned first aspect and any of its possible design manners can be specifically replaced with a control display step in the possible design.
  • the output step in any method provided in the above-mentioned first aspect or any possible design manner can be specifically replaced with a control output step in this possible design.
  • each functional module does not constitute a limitation on the device or the functional module itself. In actual implementation, these devices or functional modules may appear under other names. As long as the function of each device or functional module is similar to that of this application, it falls within the scope of the claims of this application and its equivalent technologies.
  • FIG. 1 is a schematic structural diagram of a terminal that can be adapted to an embodiment of the present application
  • FIG. 2 is a block diagram of the software structure of a terminal suitable for an embodiment of the present application
  • FIG. 3 is a flowchart of an image processing method provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of a display mode of a target reference posture provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of an image displayed on a first terminal in a tower scenario according to an embodiment of the application
  • FIG. 6 is a schematic diagram of an image displayed on a first terminal in a sunset scene provided by an embodiment of the application
  • FIG. 7 is a flowchart of another image processing method provided by an embodiment of the application.
  • FIG. 8 is a schematic diagram of a human body key point applicable to the embodiment of the present application.
  • FIG. 9 is a flowchart of another image processing method provided by an embodiment of the application.
  • FIG. 10 is a schematic flowchart of a photographing method provided by an embodiment of this application.
  • FIG. 11 is a schematic diagram of a comparison of photographing effects provided by an embodiment of this application.
  • FIG. 12 is a schematic structural diagram of a terminal provided by an embodiment of the application.
  • words such as “exemplary” or “for example” are used as examples, illustrations, or illustrations. Any embodiment or design solution described as “exemplary” or “for example” in the embodiments of the present application should not be construed as being more preferable or advantageous than other embodiments or design solutions. To be precise, words such as “exemplary” or “for example” are used to present related concepts in a specific manner.
  • first and second are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined with “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
  • a terminal which can be a terminal with a camera, such as a smart phone, a tablet computer, a wearable device, an AR/VR device, or a personal computer (personal computer, A PC), a personal digital assistant (PDA), a netbook, and other devices may also be any other terminal that can implement the embodiments of the present application.
  • a terminal can be a terminal with a camera, such as a smart phone, a tablet computer, a wearable device, an AR/VR device, or a personal computer (personal computer, A PC), a personal digital assistant (PDA), a netbook, and other devices may also be any other terminal that can implement the embodiments of the present application.
  • PDA personal digital assistant
  • This application does not limit the specific form of the terminal.
  • Wearable devices can also be called wearable smart devices. It is a general term for using wearable technology to intelligently design everyday wear and develop wearable devices, such as glasses, gloves, watches, clothing and shoes.
  • a wearable device is a portable device that is directly worn
  • Wearable devices are not only a kind of hardware device, but also realize powerful functions through software support, data interaction, and cloud interaction.
  • wearable smart devices include full-featured, large-sized, complete or partial functions that can be achieved without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, and need to cooperate with other devices such as smart phones.
  • the structure of the terminal may be as shown in Figure 1.
  • the terminal 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, and a battery 142, Antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, A display screen 194, a subscriber identification module (SIM) card interface 195, and so on.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in this embodiment does not constitute a specific limitation on the terminal 100.
  • the terminal 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc.
  • AP application processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • different processing units can be independent devices or integrated in one or more processors.
  • the processor 110 may control the display screen 194 to display a first preview image of the current shooting scene, the first preview image including the first portrait of the subject in the first posture. Second, the processor 110 recognizes the first preview image to determine the scene category of the current shooting scene.
  • control display screen 194 displays the second preview image in the current shooting scene, and displays the target reference pose in the second preview image; the target reference pose is obtained at least based on the scene category of the current shooting scene; wherein, the second preview image Including the second portrait of the subject in the second pose. Finally, if the second posture matches the target reference posture, the target image is generated according to the second preview image.
  • the controller may be the nerve center and command center of the terminal 100.
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter/receiver (universal asynchronous) interface.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter/receiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
  • the MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and so on.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the terminal 100.
  • the processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the terminal 100.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the USB interface 130 can be used to connect a charger to charge the terminal 100, and can also be used to transfer data between the terminal 100 and peripheral devices. It can also be used to connect earphones and play audio through earphones. This interface can also be used to connect to other terminals, such as AR devices.
  • the interface connection relationship between the modules illustrated in this embodiment is merely a schematic description, and does not constitute a structural limitation of the terminal 100.
  • the terminal 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110.
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the terminal 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the terminal 100 implements a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is an image processing microprocessor, which is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations and is used for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oled, quantum dot light-emitting diode (QLED), etc.
  • the terminal 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • GUIs graphical user interfaces
  • a control is a GUI element. It is a software component contained in an application. It controls all the data processed by the application and the interactive operations on these data. The user can interact with the control through direct manipulation. , So as to read or edit the relevant information of the application.
  • controls may include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and Widgets.
  • the terminal 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and is projected to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the terminal 100 may include one or N cameras 193, and N is a positive integer greater than one.
  • the aforementioned camera 193 may include one or at least two cameras such as a main camera, a telephoto camera, a wide-angle camera, an infrared camera, a depth camera, or a black and white camera.
  • the first terminal may use one or at least two cameras to capture images, and process the captured images (such as fusion, etc.) to obtain preview images (such as the first preview image or The second preview image, etc.).
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the terminal 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the terminal 100 may support one or more video codecs. In this way, the terminal 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • MPEG2 MPEG2, MPEG3, MPEG4, and so on.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • applications such as intelligent cognition of the terminal 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, and so on.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the terminal 100 by running instructions stored in the internal memory 121.
  • the processor 110 may acquire the posture of the terminal 100 by executing instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function, and the like.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the terminal 100.
  • the internal memory 121 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, a universal flash storage (UFS), and the like.
  • the processor 110 executes various functional applications and data processing of the terminal 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the terminal 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
  • the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the terminal 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the terminal 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C.
  • the terminal 100 may be provided with at least one microphone 170C. In other embodiments, the terminal 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the terminal 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the earphone interface 170D is used to connect wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, and a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA, CTIA
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be provided on the display screen 194.
  • the capacitive pressure sensor may include at least two parallel plates with conductive materials. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the terminal 100 determines the strength of the pressure according to the change in capacitance.
  • the terminal 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the terminal 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations that act on the same touch position but have different touch operation strengths may correspond to different operation instructions. For example: when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the movement posture of the terminal 100.
  • the angular velocity of the terminal 100 around three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyroscope sensor 180B detects the shake angle of the terminal 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the terminal 100 through a reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the terminal 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the terminal 100 may use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the terminal 100 can detect the opening and closing of the flip according to the magnetic sensor 180D.
  • features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the terminal 100 in various directions (generally three axes). When the terminal 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to recognize terminal gestures, switch between horizontal and vertical screens, pedometers and other applications.
  • the terminal 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the terminal 100 emits infrared light to the outside through the light emitting diode.
  • the terminal 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal 100. When insufficient reflected light is detected, the terminal 100 can determine that there is no object in the vicinity of the terminal 100.
  • the terminal 100 can use the proximity light sensor 180G to detect that the user holds the terminal 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the terminal 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal 100 is in a pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the terminal 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
  • the temperature sensor 180J is used to detect temperature.
  • the terminal 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the terminal 100 executes to reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the terminal 100 when the temperature is lower than another threshold, the terminal 100 heats the battery 142 to avoid abnormal shutdown of the terminal 100 due to low temperature.
  • the terminal 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch device”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the terminal 100, which is different from the position of the display screen 194.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal.
  • the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
  • the button 190 includes a power-on button, a volume button, and so on.
  • the button 190 may be a mechanical button. It can also be a touch button.
  • the terminal 100 may receive key input, and generate key signal input related to user settings and function control of the terminal 100.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
  • touch operations applied to different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • an operating system runs.
  • the iOS operating system developed by Apple the Android open source operating system developed by Google
  • the Windows operating system developed by Microsoft You can install and run applications on this operating system.
  • the operating system of the terminal 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present application takes an Android system with a layered architecture as an example to illustrate the software structure of the terminal 100 by way of example.
  • FIG. 2 is a block diagram of the software structure of the terminal 100 according to an embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
  • the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
  • the camera application can access the camera interface management service provided by the application framework layer.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
  • the application framework layer may provide APIs related to the photographing function for the application layer, and provide camera interface management services for the application layer to realize the photographing function.
  • the window manager is used to manage window programs.
  • the window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, take a screenshot, etc.
  • the content provider is used to store and retrieve data and make these data accessible to applications.
  • the data may include videos, images, audios, phone calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
  • the view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide the communication function of the terminal 100. For example, the management of the call status (including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, and so on.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are prompted in the status bar, a prompt sound is emitted, the terminal vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
  • the application layer and application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.
  • the 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the touch sensor 180K receives the touch operation and reports it to the processor 110, so that the processor 110 starts the camera application in response to the aforementioned touch operation, and displays the user interface of the camera application on the display screen 194.
  • the touch sensor 180K receives a touch operation on the camera application icon, it reports the touch operation on the camera application to the processor 110, so that the processor 110 starts the camera application in response to the above touch operation, and displays it on the display screen 194
  • the user interface of the camera may also start the camera application in other ways, and display the user interface of the camera application on the display screen 194.
  • the terminal 100 when the terminal 100 displays a black screen, displays a lock screen interface, or displays a certain user interface after unlocking, it can start the camera application in response to a user's voice instruction or shortcut operation, and display the user interface of the camera application on the display screen 194.
  • the basic principle of the solution adopted in the related technology is: predefine several photo postures in the terminal, and then the user manually selects the photo posture when actually taking a photo.
  • This solution requires the subjective judgment of the photographer during the posture recommendation process, and the interactivity is not very friendly and lacks intelligence.
  • an embodiment of the present application provides an image processing method, which is applied to a terminal, and the method includes: displaying a first preview image of the current shooting scene, the first preview image including the first image of the subject in the first posture A portrait; the first preview image is recognized to determine the scene category of the current shooting scene; the second preview image in the current shooting scene is displayed, and the target reference pose is displayed in the second preview image; the target reference pose is at least based on The scene category of the current shooting scene is obtained; the second preview image includes the second portrait of the subject in the second posture; if the second posture matches the target reference posture, the target image is generated according to the second preview image.
  • the terminal automatically determines the current shooting scene, and automatically recommends the target reference posture based on the current shooting scene, so as to instruct (or guide) the person to be photographed to adjust the posture.
  • the entire process of recommending gestures does not require user participation, so the interaction is better and more intelligent, which can improve the user experience.
  • the “pose” described in the embodiments of the present application may refer to the overall posture of the human body, or may refer to the partial posture of the human body (such as gestures, etc.).
  • FIG. 3 it is a flowchart of an image processing method provided by an embodiment of this application.
  • the method shown in Figure 3 includes the following steps:
  • the first terminal displays a first preview image of a current shooting scene, where the first preview image includes a first portrait of the photographed person in the first posture.
  • the first terminal is a terminal for taking pictures, such as a mobile phone held by the photographer.
  • the current shooting scene may be the shooting scene in the field of view shot by the camera of the first terminal when the first terminal executes S101.
  • the first posture is the current posture of the subject in the first preview image
  • the first portrait is the image of the subject in the current posture.
  • the preview image is the image displayed on the terminal's display screen during the photographing process.
  • the preview image may always be displayed on the display screen of the terminal, that is, the terminal displays the preview image in a preview image stream.
  • the first preview image is the preview image for the current shooting scene displayed on the display screen of the first terminal when S101 is executed.
  • the first terminal may collect an image of the current shooting scene through a camera; use the collected image as the first preview image, or perform processing on the collected image. After processing (such as cropping, and/or fusion with other images, etc.), the processed image is used as the first preview image.
  • the proportion of the first portrait in the first preview image is greater than or equal to the second threshold.
  • the number of pixels of the first portrait is greater than or equal to the third threshold.
  • these two optional implementations are intended to illustrate that the reference posture is recommended to the subject in the case of a large portrait of the subject. This is in consideration of “if the person’s portrait is small, it is difficult to judge the posture of the person who is being photographed, which will result in little significance in recommending the reference posture”, and “in order to avoid using the person in the background as the person being photographed. ⁇ ” and proposed the technical proposal.
  • the embodiment of the present application does not limit the values of the second threshold and the third threshold.
  • S102 The first terminal recognizes the first preview image to determine the scene category of the current shooting scene.
  • different scene categories are characterized by different predefined object groups.
  • different shooting scenes can be distinguished by the predefined object groups contained in them.
  • a predefined object group can include one or more predefined objects.
  • the embodiment of the present application does not limit the object category of the predefined object.
  • the object category of the predefined object may be grass, stairs, seaside, sunset, road or tower, etc.
  • the embodiment of the present application does not limit the scene category of the shooting scene.
  • a predefined object group includes one predefined object, that is, the category of the shooting scene is distinguished based on the category of a single object.
  • the predefined objects in multiple predefined object groups are grass, stairs, seaside, sunset, and road as an example
  • the types of shooting scenes can include: grass scene, step scene, seaside scene, sunset scene, road scene, etc. .
  • a predefined object group includes a plurality of predefined objects, that is, the shooting scene is distinguished based on the plurality of objects.
  • the predefined objects in multiple predefined object groups are [Beach, Sunset], [Street, Sunset] and [Stairs, Sunset] as an example, where an object in brackets represents a predefined object group
  • the categories of shooting scenes can include: seaside sunset scenes, road sunset scenes, and stairs sunset scenes.
  • This information may be pre-stored in the first terminal.
  • an application for implementing the technical solutions provided in the embodiments of the present application is installed in the first terminal, it is pre-stored in the first terminal along with information such as the installation package of the application.
  • the information can be updated with the update of the application (such as the update of the version of the application).
  • the information may be pre-stored in other devices (such as network devices), and obtained by the first terminal from the other devices.
  • the recognition result may include: which predefined object groups are included in the first preview image.
  • the first terminal first recognizes the categories of objects included in the first preview image (ie, people, grass, steps, etc.).
  • the specific implementation of this step can refer to the prior art; secondly, it determines whether the recognized objects are Objects in the predefined object group to determine which predefined object groups are included in the first preview image.
  • the scene category of the current shooting scene may include one or more.
  • the scene category of the current shooting scene is the scene category of the shooting scene represented by the predefined object group.
  • This situation can be considered to be based on a single tag to determine the scene category of the current shooting scene.
  • the predefined multiple shooting scenes as step scenes, seaside scenes, and sunset scenes as an example, if the recognition result is that the first preview image includes steps but does not include the seaside and sunset, the first terminal can determine the step scene as The current shooting scene.
  • the scene category of the current shooting scene is the scene category of some or all of the shooting scenes represented by the multiple predefined object groups.
  • This situation can be regarded as determining the scene category of the current shooting scene based on multiple tags.
  • the scene category of the current shooting scene is the scene category of part of the shooting scene represented by the multiple predefined object groups
  • the "predefined objects whose priority meets the condition" in the multiple predefined object groups may be
  • the scene category of the shooting scene represented by "group” is used as the scene category of the current shooting scene.
  • the predefined object group whose priority satisfies the condition may include: the predefined object group with the highest priority, or the predefined object group with the priority higher than the preset level.
  • the multiple shooting scenes stored in the first terminal are step scenes, seaside scenes, and sunset scenes, and the priority order of the predefined object groups from high to low: steps, seaside, sunset” as an example, if the first The preview image includes steps and sunset, and the first terminal may determine the step scene as the current shooting scene based on the priority order of the steps and sunset.
  • the first terminal device may The current shooting scene is determined as the default scene.
  • the default scene may also be a scene pre-stored in the first terminal.
  • the first terminal displays scene category information of the current shooting scene.
  • the scene category information may include: identification information of the scene category, such as text information, picture information, and so on.
  • the first terminal displays scene category information of the current shooting scene on the display screen.
  • the first terminal acquires the target reference posture, the position of the target reference posture in the second preview image, and the size of the target reference posture in the second preview image.
  • the target reference pose is obtained at least based on the scene category of the current shooting scene.
  • the number of target reference postures can be one or more.
  • the second preview image may be a preview image for the current photographing scene displayed on the first terminal when S105 is executed.
  • the second preview image may be an image collected by a camera installed on the first terminal, or may be an image obtained by processing an image collected by a camera installed on the first terminal, and the processing steps can be referred to above.
  • first preview image and the second preview image there may be one or more frames of preview images.
  • the current shooting scene may be different when the first terminal displays the first preview image and the second preview image due to the shake of the photographer.
  • the embodiments of the present application are based on the fact that the jitter is within the error range when the first terminal displays the first preview image and the second preview image, that is, the current shooting scene has little change. It can be ignored, as an example. This is a unified description, and will not be repeated below.
  • the target reference posture may be displayed in each frame of preview image after the first preview image in the preview image stream.
  • the position of the target reference posture in each frame of the preview image displayed by it is the same (or approximately the same).
  • the target reference posture and the first posture satisfy at least one of the following conditions 1 to 3:
  • Condition 1 The target reference posture is different from the first posture.
  • Condition 2 The relative position of the target reference posture in the second preview image is different from the relative position of the first posture in the first preview image.
  • the relative position of the target reference posture in the second preview image may be the position of the target reference posture relative to a reference object in the current shooting scene.
  • the relative position of the first posture in the first preview image may be the position of the first posture relative to the reference object in the current shooting scene.
  • the reference object may be a predefined object, or may be an object in the current shooting scene determined by the first terminal in real time.
  • the relative position of the target reference posture in the second preview image may be the position of the target reference posture in the coordinate system where the second preview image is located.
  • the relative position of the first posture in the first preview image may be the position of the first posture in the coordinate system where the first preview image is located.
  • the two coordinate systems are the same or roughly the same. It is understandable that if we do not consider issues such as the shaking of the first terminal during the photographing process, that is to say, the current photographing scene when the first preview image is displayed is different from the current photographing scene when the second preview image is displayed. Same, then the two coordinate systems are usually the same.
  • Condition 3 The size occupied by the target reference posture in the second preview image is different from the size occupied by the first posture in the first preview image.
  • the embodiment of the present application does not limit how to obtain the target reference posture. Possible implementations are provided below:
  • the target reference pose is obtained based on the scene category of the current shooting scene.
  • the first terminal may determine the reference pose corresponding to the scene category of the current shooting scene based on the correspondence between the scene categories of the multiple preset shooting scenes and the multiple reference poses, and use the determined reference pose as the target Reference posture.
  • the corresponding relationship is pre-stored in the first terminal or acquired by the first terminal from the network device.
  • the scene category of a shooting scene may correspond to one or more reference poses, and the reference poses corresponding to the scene categories of different shooting scenes may be the same or different.
  • Table 1 the corresponding relationship between the scene category of the shooting scene and the reference posture provided in this embodiment of the application.
  • the target reference posture may be any one or more of the multiple reference postures corresponding to the category of the current shooting scene. For example, referring to Table 1, if the scene category of the current shooting scene is a step scene, the target reference posture may be at least one of the reference posture 21 and the reference posture 22.
  • the target reference posture may be a reference posture whose similarity with the first posture is greater than or equal to the first threshold among multiple reference postures corresponding to the category of the current shooting scene. For example, referring to Table 1, if the scene category of the current shooting scene is a step scene, the target reference posture may be the reference posture of the reference posture 21 and the reference posture 22, and the similarity with the first posture is greater than or equal to the first threshold. .
  • the target reference posture may be the reference posture with the highest similarity to the first posture among the multiple reference postures corresponding to the category of the current shooting scene. Referring to Table 1, if the scene category of the current shooting scene is a step scene, the target reference posture may be the reference posture with the highest similarity between the reference posture 21 and the reference posture 22 and the first posture.
  • the target reference posture is determined based on the scene category of the current shooting scene and the posture category of the first posture.
  • the posture category of the first posture can be used to determine the posture category of the target reference posture.
  • the posture category of the target reference posture is consistent with the posture category of the first posture.
  • the first terminal may determine the corresponding relationship between the scene category of the multiple preset shooting scenes, the preset posture category, and the multiple reference postures, to determine the scene category corresponding to the current shooting scene and the first posture category.
  • Reference posture and use the determined reference posture as the target reference posture.
  • the corresponding relationship is pre-stored in the first terminal or acquired by the first terminal from the network device.
  • the posture category may include one or more of standing posture, sitting posture, and prone posture.
  • the posture category may also include postures parallel to the standing posture, sitting posture, and prone posture.
  • the posture category may also be a more fine-grained classification of any one or more of the standing posture, sitting posture, and lying posture, so as to obtain a more fine-grained posture category.
  • the posture categories include standing posture, sitting posture, and lying posture as examples.
  • the scene category of a shooting scene can correspond to one or more pose categories.
  • a pose category can correspond to one or more reference poses.
  • the posture categories corresponding to the scene categories of different shooting scenes may be the same or different.
  • the reference states corresponding to the same posture category under different scene categories may be the same or different. As shown in Table 2, the corresponding relationship between the scene category, the posture category, and the reference posture of the shooting scene provided in this embodiment of the application.
  • the target reference posture may be any one or more of the multiple reference postures corresponding to the category of the current shooting scene and the posture category of the first posture. For example, referring to Table 2, if the scene category of the current shooting scene is a grass scene and the posture category of the first posture is a standing posture, the target reference posture may be at least one of the reference posture 11A and the reference posture 11B.
  • the target reference posture may be a reference of a plurality of reference postures corresponding to the category of the current shooting scene and the posture category of the first posture, and the similarity with the first posture is greater than or equal to the first threshold.
  • posture For example, referring to Table 2, if the scene category of the current shooting scene is a grass scene, and the pose category of the first posture is a standing posture, the target reference posture may be between the reference posture 11A and the reference posture 11B and the first posture. The reference posture whose similarity is greater than or equal to the first threshold.
  • the target reference posture may be the reference posture with the highest similarity to the first posture among multiple reference postures corresponding to the category of the current shooting scene and the posture category of the first posture. Referring to Table 2, if the scene category of the current shooting scene is a grass scene, and the posture category of the first posture is a standing posture, the target reference posture can be the similarity between the reference posture 11A and the reference posture 11B and the first posture The highest reference posture.
  • the reference posture corresponding to the scene category of the shooting scene is a posture that the first terminal can use to recommend to the user in the shooting scene.
  • the reference posture corresponding to both the scene category of the shooting scene and a certain posture category is a posture that the first terminal can use to recommend to the user in the shooting scene and the posture category of the current posture of the subject.
  • the reference posture is a graceful and natural posture determined by the first terminal/network device.
  • the embodiment of the present application does not limit the determination method of the reference posture corresponding to the scene category of the shooting scene. For example, it may be determined based on methods such as big data analysis and pre-stored in the first terminal or network device.
  • the scene category of the shooting scene, the reference pose corresponding to the scene category of each shooting scene, the pose category corresponding to the scene category of each shooting scene, and the reference of each pose category corresponding to the scene category of each shooting scene Posture etc. can be updated.
  • the method provided in the embodiment of the present application is implemented by an application installed in the first terminal, and the above-mentioned information is updated by updating the version of the application and so on.
  • the above-mentioned information is all stored in the network device, and the first terminal obtains the above-mentioned information from the network device in real time.
  • the embodiment of the present application does not limit how to obtain the position of the target reference posture in the second preview image.
  • the position of the target reference posture in the second preview image is determined based on the position of the first preset object in the first preview image in the first preview image.
  • the first preset object may be one or more predefined objects.
  • the first preset object and the objects included in the category of the current shooting scene may be the same or different.
  • the first preview image contains a tower
  • the first preset object may be a tower.
  • the first preview image may include sunset and grass, etc.
  • the first preset object may be the sunset.
  • the first preset object may be the bottom or top of the tower, the center of the sunset, the edge of the sunset, and so on.
  • the first preset object may be the first portrait, or a part of the first portrait.
  • the first local posture may be one or more pre-defined postures, such as a human hand.
  • the first local posture and the first preset object having the first association relationship may include: the first local posture and the first preset object have an association relationship in orientation, and/or an association relationship in distance, and the like.
  • the first local posture has an association relationship with the first preset object in terms of orientation, which may include: the first local posture is above, below, diagonally above the first preset object, and so on.
  • the first local posture and the first preset object have an association relationship in distance, which may include: the distance between the first local posture and the first preset object is less than or equal to a threshold, and the like.
  • the first association relationship may be predefined.
  • the first association relationship is predefined in the first terminal or predefined in the network device.
  • the first association relationship may be obtained in real time.
  • the first association relationship is obtained in real time by the first terminal or network device based on some pre-stored images through certain analysis and calculation.
  • the target reference posture is the posture of "hand support tower”
  • the preset object can be the tower (specifically the tower bottom), and the local posture can be the hand used for "tota” Posture.
  • FIG. 5 a schematic diagram of an image displayed on a first terminal in a tower scenario provided by an embodiment of this application.
  • the diagram a in FIG. 5 illustrates a partial diagram of the second preview image, which includes a human hand 41 and a tower 42 (ie, a preset object).
  • the target reference posture is the posture of the "hand support tower”.
  • the first terminal can determine the position of the target reference posture in the second preview image based on the association relationship between the “hand for the tower” and the “bottom of the tower” (ie, relative orientation information and relative distance information), As shown in figure b in Figure 5.
  • the size occupied by the target reference posture in the second preview image is determined based on the size occupied by the second preset object in the first preview image in the first preview image.
  • the size of the target reference pose in the second preview image occupies it can be the pixel points occupied by the target reference pose in the second preview image, or the smallest rectangular frame (or other shapes) that contains the target reference pose in the first preview image. 2. The pixels occupied in the preview image, etc.
  • the second preset object may be the same as or different from the above-mentioned first preset object.
  • FIG. 6 a schematic diagram of an image displayed on the first terminal in a sunset scene provided by this embodiment of the application.
  • the diagram a in FIG. 6 represents the second preview image, which includes the sunset 51 and the subject 52.
  • FIG. 6B shows the second preview image in which the target reference posture 53 is displayed.
  • the size of the target reference posture 53 is determined based on the size of the sunset in the second preview image (that is, the second preset object).
  • the position and size of the target reference posture in the second preview image are determined based on the composition of the first preview image.
  • the composition of the image obtained after replacing the portrait of the second pose with the portrait of the target reference pose in the second preview image is better than the composition of the first preview image.
  • the embodiment of the present application does not limit the specific judgment method of comparing who is superior or inferior between two compositions, and it can be determined based on some common judgment standards or judgment algorithms in the technical field, which will not be repeated here.
  • the information of the target reference posture may be determined by the first terminal itself, for example, determined by the first terminal based on information stored by itself; it may also be obtained by the first terminal from a network device.
  • the information of the target reference posture includes but is not limited to at least one of the following: the posture type of the target reference posture, the position of the target reference posture in the second preview image, or the size of the target reference posture in the second preview image.
  • the size of the target reference posture in the second preview image can be characterized by the number of pixels occupied by the target reference posture.
  • the embodiment of the present application does not limit the specific implementation manner in which the first terminal obtains the target reference posture information from the network device.
  • the first terminal sends a first preview image of the current shooting scene (or information obtained after processing the first preview image) to the network device.
  • the network device performs the following steps: First, based on the received information, determine the scene category of the current shooting scene. Then, the reference pose corresponding to the scene category of the current shooting scene is selected in the database.
  • the reference postures select the reference posture with the same posture type as the "posture type of the first posture", and use the selected reference posture as the target reference posture; then, based on one or more of the above methods 1 to 3
  • the position and size of the target reference posture in the second preview image are determined, and information such as the determined target reference posture and the position and size of the target reference posture in the second preview image are sent to the first terminal.
  • the first terminal displays the target reference posture in the second preview image.
  • the storage space of the network device is larger and the computing power is stronger. Therefore, the image stored in the database of the network device will be richer. In this way, the network device determines the target reference posture and target. The position and size of the reference posture in the second preview image can make the photographing effect better.
  • the first terminal displays the second preview image in the current shooting scene, and displays the target reference posture in the second preview image.
  • the position and size of the target reference posture in the second preview image may be the position and size determined in S104, respectively.
  • the second preview image includes a second portrait of the subject in the second posture.
  • the first terminal displays the second preview image in the current shooting scene on the display screen.
  • the second posture is the current posture of the subject in the second preview image
  • the second portrait is the image of the subject in the current posture.
  • the first posture and the second posture are the postures of the same subject in the same shooting scene at different moments.
  • the first posture is different from the second posture.
  • the first terminal may display the target reference posture in each frame of the second preview image displayed by the first terminal after performing S103 and before performing S106.
  • the target reference pose is not a part of the second preview image (or not a component of the second preview image), but an image displayed on the upper layer of the second preview image.
  • the “generating the target image based on the second preview image” in S106 below may specifically include: based on the second preview image that does not contain the target reference pose, Generate the target image.
  • the target reference posture may be displayed in a manner such as a human skeleton or a human body contour.
  • Figure a in Figure 4 it is a schematic diagram of displaying the target reference posture in the form of a human skeleton, where the points in the human skeleton may be specific joints of the human body.
  • Figure b in Figure 4 is a schematic diagram of displaying the target reference posture in the form of a human body contour. Among them, the outline of the human body can be presented in the form of simple strokes.
  • the method may further include the following steps 1 to 2:
  • Step 1 The first terminal sends the target reference posture information and the second preview image information to the second terminal to instruct the second terminal to display the second preview image, and display the target reference posture in the second preview image.
  • Step 2 The second terminal displays a second preview image based on the received information, and displays the target reference posture in the second preview image.
  • the second terminal may be a terminal used by the photographer, or in other words, the content displayed on the display screen of the second terminal is a terminal that can be seen by the photographer.
  • the embodiment of the present application does not limit the connection mode between the first terminal and the second terminal. For example, it may be a Bluetooth connection.
  • the technical solution can be described as: synchronizing the information displayed on the terminal used by the photographer to the terminal used by the photographer. In this way, the person who is photographed can see the second preview image and the target reference posture through the content displayed on the second terminal, so that posture adjustment is more convenient and the photographing effect is better. There is no need to guide the photographer to adjust the posture through communication between the photographer and the photographer as in the prior art.
  • the first terminal If the second posture matches the target reference posture, the first terminal generates the target image based on the second preview image. Subsequently, the first terminal may save the target image.
  • the target image may be an image obtained by the first device shooting the current shooting scene.
  • the target image is the image that the first terminal needs to save.
  • the above-mentioned first preview image and second preview image are images that the first terminal does not need to save.
  • the specific implementation is not limited to this.
  • the first terminal can obtain the second preview image in real time, and recognize the posture of the subject in the second preview image (marked as the second posture), and then determine the second posture and the target Whether the reference posture matches. If the second posture matches the target reference posture, the target image is determined based on the second preview image. Optionally, if the second posture does not match the target reference posture, the subject can continue to adjust the posture, and the first terminal can continue to collect the second preview image until the second posture in the collected second preview image is the target posture So far.
  • Determining the target image based on the second preview image may include: directly using the second preview image as the target image; or processing the second preview image (such as enhancement, noise reduction, etc.) to obtain the target image.
  • the scene category of the current shooting scene may include multiple types. Based on:
  • a target reference posture can be determined based on each scene category of the current shooting scene.
  • the first terminal may display each determined target reference posture in the second preview image.
  • different target reference postures can be displayed in the same or different manners, for example, human body contours of different colors are displayed to display different target reference postures, and so on.
  • the first terminal may generate a target image based on the second preview image when determining that the second posture matches any one of the multiple target reference postures.
  • the first terminal may receive an operation instructed by the user, and in response to the operation, display a target reference gesture in the second preview image. That is, the user selects one target reference posture from the multiple target reference postures displayed in S105 for display.
  • the first terminal uses the second posture to match the target reference posture selected by the user.
  • the "user" here can be the photographer or the person being photographed.
  • the similarity between the second posture and the target reference posture is greater than or equal to the fourth threshold, it is determined that the second posture matches the target reference posture.
  • the embodiment of the present application does not limit how to determine the similarity between the second posture and the target reference posture. For example, it can be implemented in the following manner one or two:
  • Step A Calculate the first vector and the second vector; where the first vector is a vector formed by the relative angle information of the key points in the second portrait, and is used to represent the second posture.
  • the second vector is a vector formed by the relative angle information of key points in the portrait in the target reference posture, and is used to characterize the target reference posture.
  • the key point is a point used to characterize the posture of the human body, for example, it may be a key point of a human bone, such as a joint.
  • FIG. 8 it is a schematic diagram of a human body key point applicable to the embodiment of the present application.
  • the key points shown in Figure 8 include: chin, clavicle center, shoulders, elbows, hands, hip bones, knee joints, ankles, etc.
  • the relative angle information of the key points is specifically: information about the relative angle between the key points that have a connection relationship on the human body.
  • the relative angle information of the key point can be "the straight line between the left leg knee joint and the left ankle (that is, the left thigh)" and "the straight line between the leg knee joint and the left hip bone ( And the left calf)".
  • the relative angle information of the key point can be the clip between "the line between the elbow of the left arm and the left shoulder” and "the line between the elbow of the left arm and the left hand” Angle of information.
  • the embodiments of the present application do not limit the specific key points that characterize the human body posture, and the relative angle information of which key points are calculated.
  • the method for determining the key points that characterize the human body posture can refer to the prior art. It is understandable that the key points of the human body posture and the relative angle information of which key points need to be calculated can be predefined. After the information is determined, the relative angle information of these key points can be determined based on the angle calculation method in the prior art.
  • the number of elements of the first vector and the second vector are the same, and the elements at the same position in the two vectors respectively represent the relative angle information of the same key point in the human body.
  • the first vector is [A1, A2, A3, A4];
  • the second vector is [B1, B2, B3, B4].
  • A1 and B1 respectively represent the relative angle information of the human left shoulder in the second posture and the target reference posture
  • A2 and B2 represent the relative angle information of the human right shoulder in the second posture and the target reference posture, respectively.
  • the meanings of other elements are similar to this and will not be explained one by one.
  • the relative angle information of the key points can measure the specific posture of the human body, for example, when the angle of the thigh and the calf is 90 degrees, then the knee is in a bent state. Therefore, the overall posture of the human body can be measured based on the relative angle information between multiple key points of the human body that have a connection relationship. Based on this, the basic principle of the first method is: the similarity of the overall posture of the human body is measured and decomposed into: the similarity of the specific posture of the key points of the human body is measured.
  • Step B Calculate the distance between the first vector and the second vector. For example, calculating the Euclidean distance between the first vector and the second vector, etc.
  • Step C If the distance between the first vector and the second vector is less than or equal to the fifth threshold, it is determined that the similarity between the second posture and the target reference posture is greater than or equal to the fourth threshold.
  • the fifth threshold is predefined, and is used to characterize the distance between the first vector and the second vector when the similarity between the reference posture and the second posture is the fourth threshold.
  • the second posture and the target reference posture are input to the neural network to obtain the similarity between the second posture and the target reference posture; wherein the neural network is used to characterize the similarity between the input multiple postures.
  • the first method above is based on a conventional method to calculate the similarity between postures.
  • the second method is based on a neural network such as a convolutional neural network (convolutional neural network, CNN) to calculate the similarity between postures.
  • the neural network model can be pre-stored in the first terminal.
  • the neural network model can be obtained by training based on multiple sets of training data, where one set of training data includes two images with different poses (the images can be captured by a camera).
  • the image can also be the image obtained by processing the image collected by the camera), and the degree of similarity between the posture of the human body in the two images.
  • a neural network model can be obtained.
  • the process of training the training data can be considered as the similarity measurement relationship of the key points of the neural network model learning (that is, the learning gains use For the process of characterizing the posture vector).
  • the neural network model pre-stored in the first terminal can be updated.
  • the neural network model may be updated by an update of the application (such as a version update).
  • the embodiments of the present application are not limited to this.
  • the above-mentioned method 1 and method 2 are only examples, which do not constitute a limitation on the calculation method applicable to the embodiment of the present application for calculating the similarity between two human postures.
  • the first terminal In S106, if the second posture matches the target reference posture, the first terminal generates the target image based on the second preview image. specific:
  • the first terminal may automatically generate the target image based on the second preview image when it is determined that the second posture matches the target reference posture.
  • the first terminal takes pictures autonomously, or takes a snapshot. This process does not require user involvement, so the interaction with the user is better and smarter, which helps to improve the user experience.
  • the foregoing S106 may include:
  • the first terminal When it is determined that the second posture matches the target reference posture, the first terminal outputs prompt information, where the prompt information is used to prompt that the second posture matches the target reference posture.
  • S106B The first terminal receives the first operation.
  • the first operation can be a voice operation, or a touch screen operation. For example, a method of touching a virtual control on the display screen in a specific touch mode, a method of pressing a specific physical control on the first terminal, and so on.
  • the first terminal In response to the first operation, the first terminal generates a target image based on the second preview image.
  • the prompt information here can be any prompt information such as voice prompt information, text prompt information, pattern prompt information, a special mark of a control on the interface (such as flashing or brightening), or any combination of various prompt information.
  • the application embodiment does not limit this.
  • the first terminal automatically determines the current shooting scene, and automatically recommends the target reference posture based on the current shooting scene, so as to instruct (or guide) the person being photographed to adjust the posture. That is to say, the embodiment of the present application provides an intelligent gesture guidance/recommendation method that integrates scene information, and the entire process of recommending gestures does not require user participation, so the interaction is better and more intelligent, which can improve the user’s Experience.
  • FIG. 10 it is a schematic flowchart of a photographing method provided by an embodiment of this application.
  • the method shown in FIG. 10 may include the following steps:
  • the user (which may be any user such as the photographer or the photographed person) sends a second operation to the first terminal.
  • the second operation is for the first terminal to start the camera application.
  • the second operation may be a touch screen operation or a voice operation issued by the user.
  • S202 The first terminal receives the second operation. In response to the second operation, the first terminal launches the camera application.
  • the first terminal displays the target user interface of the camera application on the display screen.
  • the target user interface contains a "posture recommendation mode" control.
  • the trigger gesture recommendation mode can enable the first terminal to execute the image processing method provided in the embodiment of the present application.
  • the target user interface may be the first user interface after the camera application is started, or it may be the non-first user interface after the camera application is started. For example, after the camera application is started and before the user interface is displayed, the user can choose whether to turn on the flash, etc., so that the target user interface is not the first user interface after startup.
  • the user (which may be any user such as the photographer or the photographed person) sends a third operation to the first terminal.
  • the third operation is to act on the gesture recommendation mode control.
  • the third operation may be a touch screen operation issued by the user.
  • S205 The first terminal receives the third operation. In response to the third operation, the first terminal enters a gesture recommendation mode. Then, the following S206 is executed.
  • the first terminal may not display the foregoing target user interface (that is, the target user interface containing the mode space recommended by the gesture) on the first terminal, but after the first terminal starts the camera application, It automatically enters the posture recommendation mode, and then executes the following S206.
  • the foregoing target user interface that is, the target user interface containing the mode space recommended by the gesture
  • S206 The first terminal executes the foregoing steps S101 to S105.
  • a second preview image is displayed on the first terminal, and the target reference posture is displayed in the second preview image.
  • the posture of the subject in the second preview image is the second posture.
  • the first terminal will collect the actual image of the current shooting scene in real time, and based on the actual image, generate and display a second preview image of frame by frame, thereby displaying the effect of the preview image stream, and one or more frames
  • the target reference posture is displayed in the second preview image of each frame (for example, each frame).
  • S207 The subject adjusts the current posture based on the target reference posture displayed in the second preview image.
  • the photographer instructs the photographer to adjust the current posture based on the second preview image displayed on the first terminal and the target reference posture displayed in the second preview image.
  • the first terminal may display the second preview image and the target reference posture on the display screen of the second terminal based on the above steps 1 to 2.
  • the photographer adjusts the current posture by viewing the second preview image displayed on the display screen of the second terminal and the target reference posture displayed in the second preview image.
  • the first terminal If the target reference posture matches the second posture, the first terminal generates the target image based on the second preview image. Subsequently, the first terminal may save the target image.
  • the second preview image in this step may be any frame of the second preview image in S207, and correspondingly, the second posture is the posture of the subject displayed in the second preview image.
  • FIG. 11 it is a schematic diagram of a comparison of photographing effects provided by an embodiment of this application.
  • the diagram a in FIG. 11 represents the first preview image, and the effect of the photo is average.
  • Diagram b in FIG. 11 represents a target image obtained based on "a second preview image that satisfies the second posture to match the target reference posture". Obviously, under normal circumstances, the user will think that the posture of the human body in the target image is more graceful and natural compared to the first preview image.
  • the terminal includes hardware structures and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application scenarios and design constraints of the technical solution.
  • FIG. 12 contains a schematic structural diagram of a possible image processing device provided by an embodiment of the present application.
  • These image processing apparatuses can be used to implement the functions of the terminal in the foregoing method embodiments, and therefore can also achieve the beneficial effects of the foregoing method embodiments.
  • the image processing apparatus may be the terminal 100 as shown in FIG. 1, or may be a module (such as a chip) applied to the terminal.
  • the image processing apparatus is the terminal 11 as an example for description.
  • the terminal 11 includes: a display unit 111, a determination unit 112, and a generation unit 113.
  • the display unit 111 is configured to display a first preview image of a current shooting scene, and the first preview image includes a first portrait of the photographed person in a first posture.
  • the determining unit 112 is configured to recognize the first preview image to determine the scene category of the current shooting scene.
  • the display unit 111 is further configured to display a second preview image in the current shooting scene, and display the target reference pose in the second preview image; the target reference pose is obtained at least based on the scene category of the current shooting scene; wherein, the second preview The image includes a second portrait of the subject in the second posture.
  • the generating unit 113 is configured to generate a target image according to the second preview image if the second posture matches the target reference posture.
  • the display unit 111 may be used to perform S101 and S105.
  • the determining unit 112 may be used to perform S102.
  • the generating unit 113 may be used to perform S106.
  • the target reference posture and the first posture meet at least one of the following conditions: the target reference posture is different from the first posture; the relative position of the target reference posture in the second preview image is different from the first posture in the first preview image The relative position of is different; or, the size of the target reference posture in the second preview image is different from the size of the first posture in the first preview image.
  • the scene category of the current shooting scene includes at least one of the following categories: grass scene, step scene, seaside scene, sunset scene, road scene, or tower scene.
  • the posture category of the target reference posture is obtained based on the posture category of the first posture; wherein the posture category includes a sitting posture, a standing posture, or a lying posture.
  • the target reference posture is a reference posture whose similarity with the first posture is greater than or equal to a first threshold among multiple reference postures corresponding to the category of the current shooting scene.
  • the target reference pose is the reference pose with the highest similarity to the first pose among multiple reference poses corresponding to the category of the current shooting scene.
  • the position of the target reference posture in the second preview image is determined based on the position of the first preset object in the first preview image in the first preview image.
  • the first local posture in the target reference posture and the position of the first preset object in the same image have a first association relationship, and the first association relationship is predefined or determined in real time.
  • the size occupied by the target reference posture in the second preview image is determined based on the size occupied by the second preset object in the first preview image in the first preview image.
  • the display unit 111 is specifically configured to display the target reference posture in the second preview image with a human skeleton or a human contour.
  • the display unit 11 may display the target reference posture shown in FIG. 4.
  • the target reference posture information is determined by the terminal itself, or the terminal obtains it from a network device.
  • the display unit 111 is specifically configured to: if the scene category of the current shooting scene includes multiple scene categories, display multiple target reference poses in the second preview image; wherein the scene category corresponds to the target reference state one-to-one.
  • the generating unit 113 is specifically configured to generate a target image according to the second preview image if the second posture matches any one of the multiple target reference postures.
  • the terminal 11 further includes: a sending unit 114, configured to send information about the target reference pose and information about the second preview image to the second terminal, so as to instruct the second terminal to display the second preview image, and display the second preview image on the second terminal.
  • the target reference posture is displayed in.
  • the sending unit 114 may be used to perform step 1.
  • the second terminal can be used to perform step 2.
  • the display unit 111 is further configured to display category information of the current shooting scene in the second preview image.
  • different scene categories are characterized by different predefined object groups; if the first preview image contains a predefined object group, the scene category of the current shooting scene is the scene category represented by the predefined object group; if the first preview image contains a predefined object group
  • the preview image contains multiple predefined object groups, and the scene category of the current shooting scene is part or all of the scene categories represented by the multiple predefined object groups.
  • the proportion of the first portrait in the first preview image is greater than or equal to the second threshold; or, the number of pixels of the first portrait is greater than or equal to the third threshold.
  • the terminal 11 further includes: an output unit 115, configured to output prompt information if the second posture matches the target reference posture, and the prompt information is used to prompt that the second posture matches the target reference posture.
  • the receiving unit 116 is configured to receive the first operation.
  • the generating unit 113 is specifically configured to generate the target image according to the second preview image in response to the first operation.
  • the output unit 115 may be used to perform S106A
  • the receiving unit 116 may be used to perform S106B
  • the generating unit 116 may be used to perform S106C.
  • the determining unit 112 is further configured to, if the similarity between the second posture and the target reference posture is greater than or equal to a fourth threshold, determine that the second posture matches the target reference posture.
  • the terminal 11 further includes: a calculation unit 117.
  • the calculation unit 117 is used to calculate the first vector and the second vector; where the first vector is a vector formed by the relative angle information of the key points in the second portrait, and is used to represent the second posture; The vector is a vector formed by the relative angle information of the key points in the portrait in the target reference pose, and is used to characterize the target reference pose. And, calculate the distance between the first vector and the second vector.
  • the determining unit 112 is further configured to, if the distance is less than or equal to the fifth threshold, determine that the similarity between the second posture and the target reference posture is greater than or equal to the fourth threshold.
  • the calculation unit 117 is configured to input the second posture and the target reference posture into the neural network to obtain the similarity between the second posture and the target reference posture; wherein the neural network is used to represent the amount of input. The similarity between different postures.
  • the functions of the above-mentioned display unit 111 may be implemented through the display screen 194.
  • the function of any one of the above-mentioned determining unit 112, generating unit 113, and calculating unit 117 can be implemented by calling the degree code stored in the internal memory 121 by the processor 110.
  • the above-mentioned sending unit 114 can be realized by the functions of the mobile communication module 150 or the wireless communication module 160 in combination with the antenna connected thereto.
  • the above-mentioned output unit 115 may be implemented by a device for outputting information, such as the display screen 114 or the speaker 170A.
  • the above-mentioned receiving unit 116 may be implemented by a device for inputting information, such as a display screen, a microphone 170C, and the like.
  • Another embodiment of the present application further provides a computer-readable storage medium that stores instructions in the computer-readable storage medium.
  • the instructions are executed on a terminal, each step executed by the terminal in the method flow shown in the foregoing method embodiment is performed.
  • the disclosed methods may be implemented as computer program instructions encoded on a computer-readable storage medium in a machine-readable format or encoded on other non-transitory media or articles.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • a software program it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer execution instructions When the computer execution instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application are generated in whole or in part.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • computer instructions may be transmitted from a website, computer, server, or data center through a cable (such as Coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or may include one or more data storage devices such as a server or a data center that can be integrated with the medium.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present application discloses an image processing method and device, relating to the field of image processing technology. The present solution is more interactive and smarter in the process of recommending a pose to a user, and thereby is able to improve the user experience. Said method comprises: displaying a first preview image of a current photographing scene, the first preview image comprising a first human image of a photographed person in a first pose; recognizing the first preview image, so as to determine the scene category of the current photographing scene; displaying a second preview image in the current photographing scene, and displaying in the second preview image a target reference pose, the target reference pose being obtained at least on the basis of the scene category of the current photographing scene, wherein the second preview image comprises a second human image of the photographed person in a second pose; and if the second pose matches the target reference pose, generating a target image according to the second preview image. Said method can be applied to a photographing scene.

Description

图像处理方法和装置Image processing method and device
本申请要求于2020年03月07日提交国家知识产权局、申请号为202010153760.1、申请名称为“一种融合场景信息的智能姿态引导构图的方法及装置”的中国专利申请的优先权,以及于2020年05月30日提交国家知识产权局、申请号为202010480843.1、申请名称为“图像处理方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office on March 7, 2020, the application number is 202010153760.1, and the application name is "A method and device for intelligent posture guidance composition fusion scene information", and The priority of the Chinese patent application filed with the State Intellectual Property Office, the application number is 202010480843.1, and the application name is "Image Processing Method and Apparatus" on May 30, 2020, the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请涉及图像处理技术领域,尤其涉及图像处理方法和装置。This application relates to the field of image processing technology, and in particular to image processing methods and devices.
背景技术Background technique
随着智能手机的发展,手机摄影成为人们生活中的一个重要部分。人像拍摄在手机摄影中占据很大的比重,想要得到美观的人像摄影,首先要确定人像的拍摄角度,再确定适合当前拍摄场景的拍摄构图,然后摆好姿势拍出想要的图片。With the development of smart phones, mobile photography has become an important part of people's lives. Portrait photography occupies a large proportion of mobile phone photography. To obtain beautiful portrait photography, you must first determine the shooting angle of the portrait, then determine the shooting composition suitable for the current shooting scene, and then pose to take the desired picture.
关于如何引导被拍摄者摆出自然优美的姿势,目前,市面上出现了一些姿势推荐应用。其工作原理具体为:用户手动选择要拍摄的姿势,然后手机在显示屏上显示用户所选择的姿势。被拍摄者在所显示的姿势的引导下摆出姿势,再由拍摄者主动决定是否进行拍摄。该应用在姿势推荐过程中需要被拍摄者主观判断,交互性不是很友好,缺少智能性。Regarding how to guide the subject to pose in a natural and graceful posture, there are currently some posture recommendation applications on the market. The working principle is specifically as follows: the user manually selects the posture to be photographed, and then the mobile phone displays the posture selected by the user on the display screen. The person being photographed poses under the guidance of the displayed posture, and then the photographer actively decides whether to shoot. The application requires the subjective judgment of the photographer during the posture recommendation process, and the interactivity is not very friendly and lacks intelligence.
发明内容Summary of the invention
本申请实施例提供了图像处理方法和装置,在推荐用户姿势的过程中,交互性更好,且更智能化,从而能够提高用户的体验。The embodiments of the present application provide an image processing method and device. In the process of recommending user gestures, the interaction is better and more intelligent, so that the user experience can be improved.
为达到上述目的,本申请采用如下技术方案:In order to achieve the above objectives, this application adopts the following technical solutions:
第一方面,提供了一种图像处理方法,该方法应用于第一终端。该方法包括:首先显示当前拍摄场景的第一预览图像,第一预览图像包括被拍摄者在第一姿势下的第一人像。其次,对第一预览图像进行识别,以确定当前拍摄场景的场景类别。接着,显示当前拍摄场景下的第二预览图像,并在第二预览图像中显示目标参考姿势;目标参考姿势至少是基于当前拍摄场景的场景类别得到的;其中,第二预览图像包括被拍摄者在第二姿势下的第二人像。如果第二姿势与目标参考姿势匹配,则根据第二预览图像生成目标图像。由此可知,本申请实施例提供了一种融合场景信息的智能姿势引导/推荐方法,并且整个推荐姿势的过程不需要用户参与,因此交互性更好,且更智能化,从而能够提高用户的体验。In the first aspect, an image processing method is provided, and the method is applied to a first terminal. The method includes: firstly displaying a first preview image of the current shooting scene, the first preview image including a first portrait of the photographed person in a first posture. Secondly, the first preview image is recognized to determine the scene category of the current shooting scene. Next, display the second preview image in the current shooting scene, and display the target reference pose in the second preview image; the target reference pose is obtained at least based on the scene category of the current shooting scene; wherein, the second preview image includes the subject The second portrait in the second pose. If the second posture matches the target reference posture, the target image is generated according to the second preview image. It can be seen from this that the embodiment of the present application provides an intelligent gesture guidance/recommendation method that integrates scene information, and the entire process of recommending gestures does not require user participation, so the interaction is better and more intelligent, which can improve the user’s Experience.
可选的,第一姿势与第二姿势不同。可选的,目标图像可以是第一设备对当前拍摄场景进行拍摄得到的图像。换句话说,目标图像是第一终端需要保存的图像。Optionally, the first posture is different from the second posture. Optionally, the target image may be an image obtained by shooting the current shooting scene by the first device. In other words, the target image is the image that the first terminal needs to save.
在一种可能的设计中,目标参考姿势与第一姿势满足如下至少一种条件:目标参考姿势与第一姿势不同;目标参考姿势在第二预览图像中的相对位置,与第一姿势在第一预览图像中的相对位置不同;或者,目标参考姿势在第二预览图像中所占的大小,与第一姿势在第一预览图像中所占的大小不同。该可能的设计提供的技术方案可以理解为:在满足上述至少一种条件的情况下,在第二预览图像中显示目标参考姿势。也就是说,本申请实施例提供了一种可能的执行在第二预览图像中显示目标参考姿势的 触发条件。In a possible design, the target reference posture and the first posture meet at least one of the following conditions: the target reference posture is different from the first posture; the relative position of the target reference posture in the second preview image is in the first posture. The relative position in a preview image is different; or, the size occupied by the target reference posture in the second preview image is different from the size occupied by the first posture in the first preview image. The technical solution provided by this possible design can be understood as: displaying the target reference posture in the second preview image when at least one of the foregoing conditions is satisfied. In other words, the embodiment of the present application provides a possible trigger condition for displaying the target reference posture in the second preview image.
在一种可能的设计中,当前拍摄场景的场景类别包括以下类别中的至少一项:草地场景、台阶场景、海边场景、夕阳场景、马路场景、或塔场景。当然具体实现时不限于此。In a possible design, the scene category of the current shooting scene includes at least one of the following categories: grass scene, step scene, seaside scene, sunset scene, road scene, or tower scene. Of course, the specific implementation is not limited to this.
在一种可能的设计中,目标参考姿势的姿势类别是基于第一姿势的姿势类别得到的;其中,姿势类别包括坐姿、站姿或卧姿。例如,目标参考姿势的姿势类别与第一姿势的姿势类别一致。这样,对于被拍摄者来说,不需要大幅度调整姿势,从而有助于提高用户体验。In a possible design, the posture category of the target reference posture is obtained based on the posture category of the first posture; wherein the posture category includes a sitting posture, a standing posture, or a lying posture. For example, the posture category of the target reference posture is consistent with the posture category of the first posture. In this way, for the person being photographed, there is no need to greatly adjust the posture, which helps to improve the user experience.
在一种可能的设计中,目标参考姿势是与当前拍摄场景的类别对应的多个参考姿势中的,与第一姿势之间的相似度大于等于第一阈值。由于参考姿势是预定义的优美自然的姿势,因此,该可能的设计提供的技术方案,有助于在保证(或尽量保证)向用户推荐优美自然的姿势的情况下,尽量减少被拍摄者调整姿势的幅度,从而提高用户体验。In a possible design, the target reference posture is among multiple reference postures corresponding to the category of the current shooting scene, and the similarity with the first posture is greater than or equal to the first threshold. Since the reference posture is a pre-defined graceful and natural posture, the technical solution provided by this possible design helps to minimize the adjustment by the photographer while guaranteeing (or as much as possible) recommending a graceful and natural posture to the user The amplitude of the posture, thereby improving the user experience.
在一种可能的设计中,目标参考姿势是与当前拍摄场景的类别对应的多个参考姿势中的,与第一姿势之间的相似度最高的参考姿势。由于参考姿势是预定义的优美自然的姿势,因此,该可能的设计提供的技术方案,有助于在保证(或尽量保证)向用户推荐优美自然的姿势的情况下,尽量减少被拍摄者调整姿势的幅度,从而提高用户体验。In a possible design, the target reference posture is the reference posture with the highest similarity to the first posture among the multiple reference postures corresponding to the category of the current shooting scene. Since the reference posture is a pre-defined graceful and natural posture, the technical solution provided by this possible design helps to minimize the adjustment by the photographer while guaranteeing (or as much as possible) recommending a graceful and natural posture to the user The amplitude of the posture, thereby improving the user experience.
在一种可能的设计中,目标参考姿势在第二预览图像中的位置,是基于第一预览图像中的第一预设对象在第一预览图像中的位置确定的;其中,目标参考姿势中的第一局部姿势与第一预设对象在同一图像中的位置之间具有第一关联关系,第一关联关系是预定义或者实时确定的。该可能的设计提供了一种确定目标参考姿势在第二预览图像中的位置的具体实现方式。这样,有助于提高人的姿势与预览图像中的预设对象之间的结合度(或耦合度或关联性),从而使得拍照效果更好。In a possible design, the position of the target reference posture in the second preview image is determined based on the position of the first preset object in the first preview image in the first preview image; wherein the target reference posture is There is a first association relationship between the first local posture of and the position of the first preset object in the same image, and the first association relationship is predefined or determined in real time. This possible design provides a specific implementation for determining the position of the target reference posture in the second preview image. In this way, it is helpful to improve the degree of combination (or degree of coupling or association) between the person's posture and the preset object in the preview image, so that the photographing effect is better.
在一种可能的设计中,目标参考姿势在第二预览图像中所占的大小,是基于第一预览图像中的第二预设对象在第一预览图像中所占的大小确定的;其中,目标参考姿势与第二预设对象在同一图像中的大小之间具有第二关联关系,第二关联关系是预定义或者实时确定的。该可能的设计提供了一种确定目标参考姿势在第二预览图像中所占的大小的具体实现方式。这样,有助于提高整体构图效果,从而使得拍照效果更好。In a possible design, the size of the target reference pose in the second preview image is determined based on the size of the second preset object in the first preview image in the first preview image; wherein, There is a second association relationship between the target reference posture and the size of the second preset object in the same image, and the second association relationship is predefined or determined in real time. This possible design provides a specific implementation for determining the size of the target reference pose in the second preview image. In this way, it helps to improve the overall composition effect, thereby making the picture better.
在一种可能的设计中,在第二预览图像中显示目标参考姿势,包括:在第二预览图像中以人体骨架或人体轮廓方式显示目标参考姿势。In a possible design, displaying the target reference posture in the second preview image includes: displaying the target reference posture in the form of a human skeleton or a human contour in the second preview image.
在一种可能的设计中,目标参考姿势的信息是第一终端自身确定的,或者是第一终端从网络设备中获取的。In a possible design, the target reference posture information is determined by the first terminal itself, or acquired by the first terminal from a network device.
在一种可能的设计中,在第二预览图像中显示目标参考姿势,包括:如果当前拍摄场景的场景类别包括多种场景类别,则在第二预览图像中显示多个目标参考姿势;其中,场景类别与目标参考状态一一对应。该情况下,如果第二姿势与目标参考姿势匹配,则根据第二预览图像生成目标图像,包括:如果第二姿势与多个目标参考姿势中的任意一个目标参考姿势匹配,则根据第二预览图像生成目标图像。In a possible design, displaying the target reference pose in the second preview image includes: if the scene category of the current shooting scene includes multiple scene categories, displaying multiple target reference poses in the second preview image; wherein, There is a one-to-one correspondence between the scene category and the target reference state. In this case, if the second posture matches the target reference posture, the target image is generated according to the second preview image, including: if the second posture matches any one of the multiple target reference postures, then according to the second preview The image generates the target image.
在一种可能的设计中,该方法还包括:向第二终端发送目标参考姿势的信息和第 二预览图像的信息,以指示第二终端显示第二预览图像,并在第二预览图像中显示目标参考姿势。这样,对于被拍摄者而言,可以通过第二终端上显示的内容,看到第二预览图像和目标参考姿势,从而更方便进行姿势调整,从而使得拍摄效果更佳。In a possible design, the method further includes: sending information about the target reference pose and information about the second preview image to the second terminal to instruct the second terminal to display the second preview image, and display it in the second preview image Target reference posture. In this way, the person who is photographed can see the second preview image and the target reference posture through the content displayed on the second terminal, so that posture adjustment is more convenient and the photographing effect is better.
在一种可能的设计中,该方法还包括:在第二预览图像中显示当前拍摄场景的类别信息。这样,用户能够获知当前拍摄场景的类别信息,从而提高用户体验。In a possible design, the method further includes: displaying category information of the current shooting scene in the second preview image. In this way, the user can learn the category information of the current shooting scene, thereby improving the user experience.
在一种可能的设计中,不同的场景类别通过不同预定义对象组来表征。如果第一预览图像包含一个预定义对象组,则当前拍摄场景的场景类别是预定义对象组所表征的场景类别。如果第一预览图像包含多个预定义对象组,则当前拍摄场景的场景类别是多个预定义对象组所表征的部分或全部场景类别。也就是说,当前拍摄场景的场景类别可以是一个或多个。In one possible design, different scene categories are characterized by different predefined object groups. If the first preview image contains a predefined object group, the scene category of the current shooting scene is the scene category represented by the predefined object group. If the first preview image contains multiple predefined object groups, the scene category of the current shooting scene is part or all of the scene categories represented by the multiple predefined object groups. In other words, the scene category of the current shooting scene may be one or more.
在一种可能的设计中,第一人像占第一预览图像的比例大于等于第二阈值。或者,第一人像的像素点的个数大于等于第三阈值。也就是说,第一人像较大。这是在考虑到“如果被拍摄者的人像较小,则很难判断被拍摄者的姿势,这会导致推荐参考姿势的意义不大”,以及“为了避免将作背景中的人作为被拍摄者”而提出的技术方案。In a possible design, the proportion of the first portrait in the first preview image is greater than or equal to the second threshold. Or, the number of pixels in the first portrait is greater than or equal to the third threshold. In other words, the first portrait is larger. This is in consideration of “if the person’s portrait is small, it is difficult to judge the posture of the person who is being photographed, which will result in little significance in recommending the reference posture”, and “in order to avoid using the person in the background as the person being photographed.者" and proposed the technical proposal.
在一种可能的设计中,如果第二姿势与目标参考姿势匹配,则根据第二预览图像生成目标图像,包括:如果第二姿势与目标参考姿势匹配,则输出提示信息,提示信息用于提示第二姿势与目标参考姿势匹配;接收第一操作;响应于第一操作,根据第二预览图像生成目标图像。此方式,提供了一种在用户的指示下,生成目标图像的具体实现方式。当然,具体实现时,第一终端可以在确定第二姿势与目标参考姿势匹配时,自动根据第二预览图像生成目标图像。In a possible design, if the second posture matches the target reference posture, the target image is generated according to the second preview image, including: if the second posture matches the target reference posture, output prompt information, and the prompt information is used for prompting The second posture matches the target reference posture; the first operation is received; in response to the first operation, the target image is generated according to the second preview image. This method provides a specific implementation method for generating the target image under the instruction of the user. Of course, in specific implementation, the first terminal may automatically generate the target image according to the second preview image when determining that the second posture matches the target reference posture.
在一种可能的设计中,该方法还包括:如果第二姿势与目标参考姿势的相似度大于等于第四阈值,则确定第二姿势与目标参考姿势匹配。In a possible design, the method further includes: if the similarity between the second posture and the target reference posture is greater than or equal to a fourth threshold, determining that the second posture matches the target reference posture.
在一种可能的设计中,该方法包括:计算第一向量和第二向量;其中,第一向量是第二人像中的关键点相对角度信息构成的向量,用于表征第二姿势;第二向量是目标参考姿势下的人像中的关键点相对角度信息构成的向量,用于表征目标参考姿势;计算第一向量与第二向量之间的距离;如果距离小于等于第五阈值,则确定第二姿势与目标参考姿势的相似度大于等于第四阈值。In a possible design, the method includes: calculating a first vector and a second vector; where the first vector is a vector formed by relative angle information of key points in the second portrait, and is used to represent the second posture; second The vector is a vector formed by the relative angle information of the key points in the portrait in the target reference pose, which is used to characterize the target reference pose; calculate the distance between the first vector and the second vector; if the distance is less than or equal to the fifth threshold, determine the first The similarity between the second posture and the target reference posture is greater than or equal to the fourth threshold.
在一种可能的设计中,该方法还包括:将第二姿势和目标参考姿势输入神经网络,得到第二姿势与目标参考姿势之间的相似度;其中,神经网络用于表征输入的多种姿势之间的相似度。In a possible design, the method further includes: inputting the second posture and the target reference posture into the neural network to obtain the similarity between the second posture and the target reference posture; wherein the neural network is used to represent multiple input The similarity between postures.
第二方面,提供了一种图像处理装置,该装置可以是终端、芯片或芯片系统。In a second aspect, an image processing device is provided, which may be a terminal, a chip, or a chip system.
在一种可能的设计中,该装置可以用于执行上述第一方面提供的任一种方法。本申请可以根据上述第一方面及其任一种可能的设计方式提供的任一种方法,对该装置进行功能模块的划分。例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。示例性的,本申请可以按照功能将该装置划分为处理单元和发送单元等。上述划分的各个功能模块执行的可能的技术方案和有益效果的描述均可以参考上述第一方面或其相应的可能的设计提供的技术方案,此处不再赘述。In a possible design, the device can be used to execute any of the methods provided in the first aspect above. In this application, the device may be divided into functional modules according to any of the methods provided in the above-mentioned first aspect and any of its possible design manners. For example, each function module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. Exemplarily, the present application may divide the device into a processing unit and a sending unit according to functions. The descriptions of the possible technical solutions and beneficial effects performed by the above-mentioned divided functional modules can all refer to the technical solutions provided by the first aspect or its corresponding possible designs, which will not be repeated here.
在另一种可能的设计中,该装置包括存储器和一个或多个处理器,所述存储器用 于存储计算机指令,所述处理器用于调用所述计算机指令,以执行如第一方面及其任一种可能的设计方式提供的任一种方法。其中,上述第一方面及其任一种可能的设计方式提供的任一种方法中的显示步骤,在该可能的设计中具体可以替换为控制显示步骤。上述第一方面或任一种可能的设计方式提供的任一种方法中的输出步骤,在该可能的设计中具体可以替换为控制输出步骤。In another possible design, the device includes a memory and one or more processors, where the memory is used to store computer instructions, and the processor is used to call the computer instructions to execute the first aspect and any of them. Any method provided by a possible design method. Wherein, the display step in any method provided in the above-mentioned first aspect and any of its possible design manners can be specifically replaced with a control display step in the possible design. The output step in any method provided in the above-mentioned first aspect or any possible design manner can be specifically replaced with a control output step in this possible design.
第三方面,提供了一种终端,包括:处理器、存储器和显示屏。显示屏用于显示图像等信息,存储器用于存储计算机程序和指令,处理器用于调用该计算机程序和指令,与该显示屏协同执行上述第一方面或其相应的可能的设计提供的技术方案。In a third aspect, a terminal is provided, which includes a processor, a memory, and a display screen. The display screen is used to display images and other information, the memory is used to store computer programs and instructions, and the processor is used to call the computer programs and instructions, and cooperate with the display screen to execute the technical solutions provided by the first aspect or its corresponding possible designs.
第四方面,提供了一种计算机可读存储介质,如计算机非瞬态的可读存储介质。其上储存有计算机程序(或指令),当该计算机程序(或指令)在计算机上运行时,使得该计算机执行上述第一方面中任一种可能的实现方式提供的任一种方法。其中,上述第一方面及其任一种可能的设计方式提供的任一种方法中的显示步骤,在该可能的设计中具体可以替换为控制显示步骤。上述第一方面或任一种可能的设计方式提供的任一种方法中的输出步骤,在该可能的设计中具体可以替换为控制输出步骤。In a fourth aspect, a computer-readable storage medium is provided, such as a non-transitory computer-readable storage medium. A computer program (or instruction) is stored thereon, and when the computer program (or instruction) runs on a computer, the computer is caused to execute any method provided by any one of the possible implementations of the first aspect. Wherein, the display step in any method provided in the above-mentioned first aspect and any of its possible design manners can be specifically replaced with a control display step in the possible design. The output step in any method provided in the above-mentioned first aspect or any possible design manner can be specifically replaced with a control output step in this possible design.
第五方面,提供了一种计算机程序产品,当其在计算机上运行时,使得第一方面或第二方面中的任一种可能的实现方式提供的任一种方法被执行。其中,上述第一方面及其任一种可能的设计方式提供的任一种方法中的显示步骤,在该可能的设计中具体可以替换为控制显示步骤。上述第一方面或任一种可能的设计方式提供的任一种方法中的输出步骤,在该可能的设计中具体可以替换为控制输出步骤。In a fifth aspect, a computer program product is provided, which, when running on a computer, enables any method provided in any possible implementation manner of the first aspect or the second aspect to be executed. Wherein, the display step in any method provided in the above-mentioned first aspect and any of its possible design manners can be specifically replaced with a control display step in the possible design. The output step in any method provided in the above-mentioned first aspect or any possible design manner can be specifically replaced with a control output step in this possible design.
可以理解的是,上述提供的任一种图像处理装置、计算机存储介质、计算机程序产品或芯片系统等均可以应用于上文所提供的对应的方法,因此,其所能达到的有益效果可参考对应的方法中的有益效果,此处不再赘述。It can be understood that any of the image processing devices, computer storage media, computer program products, or chip systems provided above can be applied to the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to The beneficial effects of the corresponding method will not be repeated here.
在本申请中,上述图像处理装置或者各功能模块的名字对设备或功能模块本身不构成限定,在实际实现中,这些设备或功能模块可以以其他名称出现。只要各个设备或功能模块的功能和本申请类似,属于本申请权利要求及其等同技术的范围之内。In this application, the name of the above-mentioned image processing apparatus or each functional module does not constitute a limitation on the device or the functional module itself. In actual implementation, these devices or functional modules may appear under other names. As long as the function of each device or functional module is similar to that of this application, it falls within the scope of the claims of this application and its equivalent technologies.
本申请的这些方面或其他方面在以下的描述中会更加简明易懂。These and other aspects of the application will be more concise and understandable in the following description.
附图说明Description of the drawings
图1为可适于本申请实施例的一种终端的结构示意图;FIG. 1 is a schematic structural diagram of a terminal that can be adapted to an embodiment of the present application;
图2为可适于本申请实施例的一种终端的软件结构框图;FIG. 2 is a block diagram of the software structure of a terminal suitable for an embodiment of the present application;
图3为本申请实施例提供的一种图像处理方法的流程图;FIG. 3 is a flowchart of an image processing method provided by an embodiment of the application;
图4为本申请实施例提供的一种目标参考姿势的显示方式的示意图;4 is a schematic diagram of a display mode of a target reference posture provided by an embodiment of the application;
图5为本申请实施例提供的一种塔场景下第一终端上显示的图像的示意图;FIG. 5 is a schematic diagram of an image displayed on a first terminal in a tower scenario according to an embodiment of the application;
图6为本申请实施例提供的一种夕阳场景下第一终端上显示的图像的示意图;FIG. 6 is a schematic diagram of an image displayed on a first terminal in a sunset scene provided by an embodiment of the application;
图7为本申请实施例提供的另一种图像处理方法的流程图;FIG. 7 is a flowchart of another image processing method provided by an embodiment of the application;
图8为可适用于本申请实施例的一种人体关键点的示意图;FIG. 8 is a schematic diagram of a human body key point applicable to the embodiment of the present application;
图9为本申请实施例提供的另一种图像处理方法的流程图;FIG. 9 is a flowchart of another image processing method provided by an embodiment of the application;
图10为本申请实施例提供的一种拍照方法的流程示意图;FIG. 10 is a schematic flowchart of a photographing method provided by an embodiment of this application;
图11为本申请实施例提供的一种拍照效果对比示意图;FIG. 11 is a schematic diagram of a comparison of photographing effects provided by an embodiment of this application;
图12为本申请实施例提供的一种终端的结构示意图。FIG. 12 is a schematic structural diagram of a terminal provided by an embodiment of the application.
具体实施方式Detailed ways
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, words such as "exemplary" or "for example" are used as examples, illustrations, or illustrations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferable or advantageous than other embodiments or design solutions. To be precise, words such as "exemplary" or "for example" are used to present related concepts in a specific manner.
在本申请实施例中,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。In the embodiments of the present application, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
本申请实施例提供的图像处理方法可以应用于终端中,该终端可以是带有摄像头的终端,如智能手机、平板电脑、可穿戴设备、AR/VR设备,也可以是个人计算机(personal computer,PC)、个人数字助理(personal digital assistant,PDA)、上网本等设备,还可以是其他任一能够实现本申请实施例的终端。本申请对终端的具体形态不予限定。可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。The image processing method provided in the embodiments of this application can be applied to a terminal, which can be a terminal with a camera, such as a smart phone, a tablet computer, a wearable device, an AR/VR device, or a personal computer (personal computer, A PC), a personal digital assistant (PDA), a netbook, and other devices may also be any other terminal that can implement the embodiments of the present application. This application does not limit the specific form of the terminal. Wearable devices can also be called wearable smart devices. It is a general term for using wearable technology to intelligently design everyday wear and develop wearable devices, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories. Wearable devices are not only a kind of hardware device, but also realize powerful functions through software support, data interaction, and cloud interaction. In a broad sense, wearable smart devices include full-featured, large-sized, complete or partial functions that can be achieved without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, and need to cooperate with other devices such as smart phones. Use, such as all kinds of smart bracelets and smart jewelry for physical sign monitoring.
在本申请中,终端的结构可以如图1所示。如图1所示,终端100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。In this application, the structure of the terminal may be as shown in Figure 1. As shown in FIG. 1, the terminal 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, and a battery 142, Antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, A display screen 194, a subscriber identification module (SIM) card interface 195, and so on. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本实施例示意的结构并不构成对终端100的具体限定。在另一些实施例中,终端100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the terminal 100. In other embodiments, the terminal 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单 元可以是独立的器件,也可以集成在一个或多个处理器中。例如,在本申请中,处理器110可以控制显示屏194显示当前拍摄场景的第一预览图像,第一预览图像包括被拍摄者在第一姿势下的第一人像。其次,处理器110对第一预览图像进行识别,以确定当前拍摄场景的场景类别。接着,控制显示屏194显示当前拍摄场景下的第二预览图像,并在第二预览图像中显示目标参考姿势;目标参考姿势至少是基于当前拍摄场景的场景类别得到的;其中,第二预览图像包括被拍摄者在第二姿势下的第二人像。最后,如果第二姿势与目标参考姿势匹配,则根据第二预览图像生成目标图像。该技术方案的相关说明可以参考下文。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. For example, in this application, the processor 110 may control the display screen 194 to display a first preview image of the current shooting scene, the first preview image including the first portrait of the subject in the first posture. Second, the processor 110 recognizes the first preview image to determine the scene category of the current shooting scene. Next, the control display screen 194 displays the second preview image in the current shooting scene, and displays the target reference pose in the second preview image; the target reference pose is obtained at least based on the scene category of the current shooting scene; wherein, the second preview image Including the second portrait of the subject in the second pose. Finally, if the second posture matches the target reference posture, the target image is generated according to the second preview image. For related descriptions of this technical solution, please refer to the following.
其中,控制器可以是终端100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the terminal 100. The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter/receiver (universal asynchronous) interface. receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / Or Universal Serial Bus (USB) interface, etc.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现终端100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现终端100的显示功能。The MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices. The MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and so on. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the terminal 100. The processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the terminal 100.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端100充电,也可以用于终端100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他终端,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on. The USB interface 130 can be used to connect a charger to charge the terminal 100, and can also be used to transfer data between the terminal 100 and peripheral devices. It can also be used to connect earphones and play audio through earphones. This interface can also be used to connect to other terminals, such as AR devices.
可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端100的结构限定。在本申请另一些实施例中,终端100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in this embodiment is merely a schematic description, and does not constitute a structural limitation of the terminal 100. In other embodiments of the present application, the terminal 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121, 显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
终端100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the terminal 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
终端100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The terminal 100 implements a display function through a GPU, a display screen 194, and an application processor. The GPU is an image processing microprocessor, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and is used for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oled,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,终端100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oled, quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal 100 may include one or N display screens 194, and N is a positive integer greater than one.
终端100的显示屏194上可以显示一系列图形用户界面(graphical user interface,GUI),这些GUI都是该终端100的主屏幕。一般来说,终端100的显示屏194的尺寸是固定的,只能在该终端100的显示屏194中显示有限的控件。控件是一种GUI元素,它是一种软件组件,包含在应用程序中,控制着该应用程序处理的所有数据以及关于这些数据的交互操作,用户可以通过直接操作(direct manipulation)来与控件交互,从而对应用程序的有关信息进行读取或者编辑。一般而言,控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。A series of graphical user interfaces (GUIs) can be displayed on the display screen 194 of the terminal 100, and these GUIs are the main screens of the terminal 100. Generally speaking, the size of the display screen 194 of the terminal 100 is fixed, and only limited controls can be displayed on the display screen 194 of the terminal 100. A control is a GUI element. It is a software component contained in an application. It controls all the data processed by the application and the interactive operations on these data. The user can interact with the control through direct manipulation. , So as to read or edit the relevant information of the application. Generally speaking, controls may include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and Widgets.
终端100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The terminal 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye. ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端100可以包括1个或N个摄像头193,N为大于1的正整数。例如,上述摄像头193可以包括主摄像头、长焦摄像头、广角摄像头、红外摄 像头、深度摄像头或者黑白摄像头等一种或者至少两种摄像头。结合本申请实施例提供的技术方案,第一终端可以采用上述一种或者至少两种摄像头采集图像,并将采集到的图像进行处理(如融合等),得到预览图像(如第一预览图像或第二预览图像等)。The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and is projected to the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the terminal 100 may include one or N cameras 193, and N is a positive integer greater than one. For example, the aforementioned camera 193 may include one or at least two cameras such as a main camera, a telephoto camera, a wide-angle camera, an infrared camera, a depth camera, or a black and white camera. In combination with the technical solutions provided by the embodiments of the present application, the first terminal may use one or at least two cameras to capture images, and process the captured images (such as fusion, etc.) to obtain preview images (such as the first preview image or The second preview image, etc.).
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the terminal 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。终端100可以支持一种或多种视频编解码器。这样,终端100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The terminal 100 may support one or more video codecs. In this way, the terminal 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, for example, the transfer mode between human brain neurons, it can quickly process input information, and it can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the terminal 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, and so on.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行终端100的各种功能应用以及数据处理。例如,在本实施例中,处理器110可以通过执行存储在内部存储器121中的指令,获取终端100的姿势。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行终端100的各种功能应用以及数据处理。The internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the terminal 100 by running instructions stored in the internal memory 121. For example, in this embodiment, the processor 110 may acquire the posture of the terminal 100 by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function, and the like. The data storage area can store data (such as audio data, phone book, etc.) created during the use of the terminal 100. In addition, the internal memory 121 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, a universal flash storage (UFS), and the like. The processor 110 executes various functional applications and data processing of the terminal 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
终端100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The terminal 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端100可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The terminal 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the terminal 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入 到麦克风170C。终端100可以设置至少一个麦克风170C。在另一些实施例中,终端100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone", "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C. The terminal 100 may be provided with at least one microphone 170C. In other embodiments, the terminal 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the terminal 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used to connect wired earphones. The earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, and a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。终端100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,终端100根据压力传感器180A检测所述触摸操作强度。终端100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be provided on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors and so on. The capacitive pressure sensor may include at least two parallel plates with conductive materials. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The terminal 100 determines the strength of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal 100 detects the intensity of the touch operation according to the pressure sensor 180A. The terminal 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch position but have different touch operation strengths may correspond to different operation instructions. For example: when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定终端100的运动姿势。在一些实施例中,可以通过陀螺仪传感器180B确定终端100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测终端100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the movement posture of the terminal 100. In some embodiments, the angular velocity of the terminal 100 around three axes (ie, x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyroscope sensor 180B detects the shake angle of the terminal 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the terminal 100 through a reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,终端100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。终端100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当终端100是翻盖机时,终端100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The terminal 100 may use the magnetic sensor 180D to detect the opening and closing of the flip holster. In some embodiments, when the terminal 100 is a flip phone, the terminal 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测终端100在各个方向上(一般为三轴)加速度的大小。当终端100静止时可检测出重力的大小及方向。还可以用于识别终端姿势,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal 100 in various directions (generally three axes). When the terminal 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to recognize terminal gestures, switch between horizontal and vertical screens, pedometers and other applications.
距离传感器180F,用于测量距离。终端100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,终端100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F, used to measure distance. The terminal 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端100通过发光二极管向外发射红外光。终端100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端100附近有物体。当检测到不充分的反射光时,终端100可以确定终端100 附近没有物体。终端100可以利用接近光传感器180G检测用户手持终端100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal 100 emits infrared light to the outside through the light emitting diode. The terminal 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal 100. When insufficient reflected light is detected, the terminal 100 can determine that there is no object in the vicinity of the terminal 100. The terminal 100 can use the proximity light sensor 180G to detect that the user holds the terminal 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
环境光传感器180L用于感知环境光亮度。终端100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测终端100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense the brightness of the ambient light. The terminal 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal 100 is in a pocket to prevent accidental touch.
指纹传感器180H用于采集指纹。终端100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The terminal 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
温度传感器180J用于检测温度。在一些实施例中,终端100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,终端100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,终端100对电池142加热,以避免低温导致终端100异常关机。在其他一些实施例中,当温度低于又一阈值时,终端100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the terminal 100 executes to reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal 100 heats the battery 142 to avoid abnormal shutdown of the terminal 100 due to low temperature. In some other embodiments, when the temperature is lower than another threshold, the terminal 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于终端100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”. The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. The visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the terminal 100, which is different from the position of the display screen 194.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal. In some embodiments, the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone. The audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端100可以接收按键输入,产生与终端100的用户设置以及功能控制有关的键信号输入。The button 190 includes a power-on button, a volume button, and so on. The button 190 may be a mechanical button. It can also be a touch button. The terminal 100 may receive key input, and generate key signal input related to user settings and function control of the terminal 100.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as photographing, audio playback, etc.) can correspond to different vibration feedback effects. Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminding, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
另外,在上述部件之上,运行有操作系统。例如苹果公司所开发的iOS操作系统,谷歌公司所开发的Android开源操作系统,微软公司所开发的Windows操作系统等。 在该操作系统上可以安装运行应用程序。In addition, on top of the above components, an operating system runs. For example, the iOS operating system developed by Apple, the Android open source operating system developed by Google, and the Windows operating system developed by Microsoft. You can install and run applications on this operating system.
终端100的操作系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明终端100的软件结构。The operating system of the terminal 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes an Android system with a layered architecture as an example to illustrate the software structure of the terminal 100 by way of example.
图2是本申请实施例的终端100的软件结构框图。FIG. 2 is a block diagram of the software structure of the terminal 100 according to an embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
应用程序层可以包括一系列应用程序包。如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。例如,在拍照时,相机应用可以访问应用程序框架层提供的相机接口管理服务。The application layer can include a series of application packages. As shown in Figure 2, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc. For example, when taking a picture, the camera application can access the camera interface management service provided by the application framework layer.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。例如,在本申请实施例中,在拍照时,应用程序框架层可以为应用程序层提供拍照功能相关的API,并为应用程序层提供相机接口管理服务,以实现拍照功能。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. As shown in Figure 2, the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager. For example, in the embodiment of the present application, when taking pictures, the application framework layer may provide APIs related to the photographing function for the application layer, and provide camera interface management services for the application layer to realize the photographing function.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, take a screenshot, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。The content provider is used to store and retrieve data and make these data accessible to applications. The data may include videos, images, audios, phone calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls that display text, controls that display pictures, and so on. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
电话管理器用于提供终端100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the terminal 100. For example, the management of the call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, and so on. The notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are prompted in the status bar, a prompt sound is emitted, the terminal vibrates, and the indicator light flashes.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管 理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and application framework layer run in a virtual machine. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.
2D图形引擎是2D绘图的绘图引擎。The 2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
需要说明的是,本申请实施例虽然以Android系统为例进行说明,但是其基本原理同样适用于基于iOS或Windows等操作系统的终端。It should be noted that although the embodiment of the present application takes the Android system as an example for description, its basic principles are also applicable to terminals based on operating systems such as iOS or Windows.
下面结合图1和拍摄场景,示例性说明终端100软件以及硬件的工作流程。In the following, with reference to FIG. 1 and the shooting scene, the working process of the software and hardware of the terminal 100 is exemplified.
触摸传感器180K接收到触摸操作,上报给处理器110,使得处理器110响应于上述触摸操作,启动相机应用,并在显示屏194上显示该相机应用的用户界面。例如,触摸传感器180K当接收到对相机应用图标的触摸操作后,向处理器110上报对相机应用的触摸操作,使得处理器110响应于上述触摸操作,启动相机应用,并在显示屏194上显示相机的用户界面。此外,本申请实施例中还可以通过其它方式使得终端100启动相机应用,并在显示屏194上显示相机应用的用户界面。例如,终端100在黑屏、显示锁屏界面或者解锁后显示某一用户界面时,可以响应于用户的语音指令或者快捷操作等,启动相机应用,并在显示屏194上显示相机应用的用户界面。The touch sensor 180K receives the touch operation and reports it to the processor 110, so that the processor 110 starts the camera application in response to the aforementioned touch operation, and displays the user interface of the camera application on the display screen 194. For example, after the touch sensor 180K receives a touch operation on the camera application icon, it reports the touch operation on the camera application to the processor 110, so that the processor 110 starts the camera application in response to the above touch operation, and displays it on the display screen 194 The user interface of the camera. In addition, in the embodiment of the present application, the terminal 100 may also start the camera application in other ways, and display the user interface of the camera application on the display screen 194. For example, when the terminal 100 displays a black screen, displays a lock screen interface, or displays a certain user interface after unlocking, it can start the camera application in response to a user's voice instruction or shortcut operation, and display the user interface of the camera application on the display screen 194.
关于如何引导被拍摄者摆出拍照姿势,相关技术中采用的方案的基本原理为:在终端中预定义若干种拍照姿势,然后在实际拍照时,由用户手动选择拍照姿势。该方案在姿势推荐过程中需要被拍摄者主观判断,交互性不是很友好,缺少智能性。Regarding how to guide the photographed person to pose for a photo, the basic principle of the solution adopted in the related technology is: predefine several photo postures in the terminal, and then the user manually selects the photo posture when actually taking a photo. This solution requires the subjective judgment of the photographer during the posture recommendation process, and the interactivity is not very friendly and lacks intelligence.
对此,本申请实施例提供了一种图像处理方法,该方法应用于终端,该方法包括:显示当前拍摄场景的第一预览图像,第一预览图像包括被拍摄者在第一姿势下的第一人像;对第一预览图像进行识别,以确定当前拍摄场景的场景类别;显示当前拍摄场景下的第二预览图像,并在第二预览图像中显示目标参考姿势;目标参考姿势至少是基于当前拍摄场景的场景类别得到的;其中,第二预览图像包括被拍摄者在第二姿势下的第二人像;如果第二姿势与目标参考姿势匹配,则根据第二预览图像生成目标图像。In this regard, an embodiment of the present application provides an image processing method, which is applied to a terminal, and the method includes: displaying a first preview image of the current shooting scene, the first preview image including the first image of the subject in the first posture A portrait; the first preview image is recognized to determine the scene category of the current shooting scene; the second preview image in the current shooting scene is displayed, and the target reference pose is displayed in the second preview image; the target reference pose is at least based on The scene category of the current shooting scene is obtained; the second preview image includes the second portrait of the subject in the second posture; if the second posture matches the target reference posture, the target image is generated according to the second preview image.
在本申请实施例中,终端自动确定当前拍摄场景,并自动基于当前拍摄场景推荐目标参考姿势,以指示(或引导)被拍摄者调整姿势。整个推荐姿势的过程不需要用户参与,因此交互性更好,且更智能化,从而能够提高用户的体验。In the embodiment of the present application, the terminal automatically determines the current shooting scene, and automatically recommends the target reference posture based on the current shooting scene, so as to instruct (or guide) the person to be photographed to adjust the posture. The entire process of recommending gestures does not require user participation, so the interaction is better and more intelligent, which can improve the user experience.
需要说明的是,本申请实施例中所描述的“姿势(pose)”可以是指人身体的整体姿势,也可以是指人身体的局部姿势(如手势等)。It should be noted that the “pose” described in the embodiments of the present application may refer to the overall posture of the human body, or may refer to the partial posture of the human body (such as gestures, etc.).
下面将结合附图对本申请实施例的实施方式进行详细描述。The implementation of the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings.
如图3所示,为本申请实施例提供的图像处理方法的流程图。图3所示的方法包括以下步骤:As shown in FIG. 3, it is a flowchart of an image processing method provided by an embodiment of this application. The method shown in Figure 3 includes the following steps:
S101:第一终端显示当前拍摄场景的第一预览图像,第一预览图像包括被拍摄者在第一姿势下的第一人像。S101: The first terminal displays a first preview image of a current shooting scene, where the first preview image includes a first portrait of the photographed person in the first posture.
第一终端是用于拍照的终端,如拍摄者拿的手机等。当前拍摄场景可以是第一终端执行S101时,第一终端的摄像头拍摄视野内的拍摄场景。第一姿势是第一预览图像中被拍摄者的当前姿势,第一人像是当前姿势下被拍摄者的图像。The first terminal is a terminal for taking pictures, such as a mobile phone held by the photographer. The current shooting scene may be the shooting scene in the field of view shot by the camera of the first terminal when the first terminal executes S101. The first posture is the current posture of the subject in the first preview image, and the first portrait is the image of the subject in the current posture.
预览图像,是拍照过程中显示在终端显示屏上的图像。在一个示例中,在终端启动拍照功能的时刻开始至完成拍照的时刻的过程中,终端的显示屏上可以一直显示预览图像,也就是说,终端以预览图像流的方式显示预览图像。第一预览图像是执行S101时,显示在第一终端的显示屏上的针对当前拍摄场景的预览图像。The preview image is the image displayed on the terminal's display screen during the photographing process. In an example, from the moment when the terminal starts the photographing function to the moment when the photograph is finished, the preview image may always be displayed on the display screen of the terminal, that is, the terminal displays the preview image in a preview image stream. The first preview image is the preview image for the current shooting scene displayed on the display screen of the first terminal when S101 is executed.
本申请实施例对第一预览图像的获取方式不进行限定,例如,第一终端可以通过摄像头采集当前拍摄场景的图像;并将采集到的图像作为第一预览图像,或者对采集到的图像进行处理(如裁剪,和/或与其他图像进行融合等)后,并将处理后得到的图像作为第一预览图像。The embodiment of the present application does not limit the method of obtaining the first preview image. For example, the first terminal may collect an image of the current shooting scene through a camera; use the collected image as the first preview image, or perform processing on the collected image. After processing (such as cropping, and/or fusion with other images, etc.), the processed image is used as the first preview image.
可选的,第一人像占第一预览图像的比例大于等于第二阈值。可选的,第一人像的像素个数大于等于第三阈值。通俗地讲,这两种可选的实现方式旨在说明,在被拍摄者的人像较大的情况下,向被拍摄者推荐参考姿势。这是在考虑到“如果被拍摄者的人像较小,则很难判断被拍摄者的姿势,这会导致推荐参考姿势的意义不大”,以及“为了避免将作背景中的人作为被拍摄者”而提出的技术方案。本申请实施例对第二阈值和第三阈值的取值不进行限定。Optionally, the proportion of the first portrait in the first preview image is greater than or equal to the second threshold. Optionally, the number of pixels of the first portrait is greater than or equal to the third threshold. In layman's terms, these two optional implementations are intended to illustrate that the reference posture is recommended to the subject in the case of a large portrait of the subject. This is in consideration of “if the person’s portrait is small, it is difficult to judge the posture of the person who is being photographed, which will result in little significance in recommending the reference posture”, and “in order to avoid using the person in the background as the person being photographed.者" and proposed the technical proposal. The embodiment of the present application does not limit the values of the second threshold and the third threshold.
S102:第一终端对第一预览图像进行识别,以确定当前拍摄场景的场景类别。S102: The first terminal recognizes the first preview image to determine the scene category of the current shooting scene.
可选的,不同的场景类别通过不同预定义对象组来表征。换句话说,不同拍摄场景可以通过其所包含的预定义对象组进行区分。Optionally, different scene categories are characterized by different predefined object groups. In other words, different shooting scenes can be distinguished by the predefined object groups contained in them.
一个预定义对象组可以包括一个或多个预定义对象。本申请实施例对预定义对象的对象类别不进行限定。例如,预定义对象的对象类别可以是草地、台阶、海边、夕阳、马路或塔等。相应的,本申请实施例对拍摄场景的场景类别不进行限定。A predefined object group can include one or more predefined objects. The embodiment of the present application does not limit the object category of the predefined object. For example, the object category of the predefined object may be grass, stairs, seaside, sunset, road or tower, etc. Correspondingly, the embodiment of the present application does not limit the scene category of the shooting scene.
在一个示例中,一个预定义对象组包括一个预定义对象,即拍摄场景的类别是基于单个对象的类别进行区分的。例如,以多个预定义对象组中的预定义对象分别是草地、台阶、海边、夕阳和马路为例,拍摄场景的类别可以包括:草地场景、台阶场景、海边场景、夕阳场景和马路场景等。In an example, a predefined object group includes one predefined object, that is, the category of the shooting scene is distinguished based on the category of a single object. For example, taking the predefined objects in multiple predefined object groups are grass, stairs, seaside, sunset, and road as an example, the types of shooting scenes can include: grass scene, step scene, seaside scene, sunset scene, road scene, etc. .
在另一个示例中,一个预定义对象组包括多个预定义对象,即拍摄场景是基于多个对象进行区分的。例如,以多个预定义对象组中的预定义对象分别是[海边、夕阳]、[马路、夕阳]和[台阶、夕阳]为例,其中,一个中括号中的对象表示一个预定义对象组,基于此,拍摄场景的类别可以包括:海边夕阳场景,马路夕阳场景和台阶夕阳场景等。In another example, a predefined object group includes a plurality of predefined objects, that is, the shooting scene is distinguished based on the plurality of objects. For example, the predefined objects in multiple predefined object groups are [Beach, Sunset], [Street, Sunset] and [Stairs, Sunset] as an example, where an object in brackets represents a predefined object group Based on this, the categories of shooting scenes can include: seaside sunset scenes, road sunset scenes, and stairs sunset scenes.
当然,还可以存在“一些拍摄场景是基于单个对象进行区分的,另一些拍摄场景是基于多个对象进行区分的”的情况。在此不作具体说明。Of course, there may also be a situation where "some shooting scenes are distinguished based on a single object, and other shooting scenes are distinguished based on multiple objects". No specific explanation here.
预定义对象组包括哪个或哪些对象,预定义对象组的个数,以及哪个预定义对象组表征哪个拍摄场景的场景类别等可以是预定义的。具体的,这些信息可以预存在第一终端中,如在第一终端中安装用于实现本申请实施例提供的技术方案的应用时,随该应用的安装包等信息一起预存在第一终端中,这些信息可以随着该应用的更新(如该应用的版本的更新)而更新。或者,这些信息可以预存在其他设备(如网络设备)中,由第一终端向该其他设备获取。Which objects the predefined object group includes, the number of predefined object groups, which predefined object group represents the scene category of which shooting scene, etc. may be predefined. Specifically, this information may be pre-stored in the first terminal. For example, when an application for implementing the technical solutions provided in the embodiments of the present application is installed in the first terminal, it is pre-stored in the first terminal along with information such as the installation package of the application. , The information can be updated with the update of the application (such as the update of the version of the application). Or, the information may be pre-stored in other devices (such as network devices), and obtained by the first terminal from the other devices.
本申请实施例对第一终端对第一预览图像进行识别,以确定当前拍摄场景的具体实现方式不进行限定。可选的,识别结果可以包括:第一预览图像中包括哪些预定义对象组。例如,第一终端首先识别第一预览图像中包括的对象的类别(即人、草地、台阶等),该步骤的具体实现方式可以参考现有技术;其次,确定所识别出的这些对象是否是预定义对象组中的对象,以确定出第一预览图像中包括哪些预定义对象组。The embodiment of the present application does not limit the specific implementation manner of the first terminal to recognize the first preview image to determine the current shooting scene. Optionally, the recognition result may include: which predefined object groups are included in the first preview image. For example, the first terminal first recognizes the categories of objects included in the first preview image (ie, people, grass, steps, etc.). The specific implementation of this step can refer to the prior art; secondly, it determines whether the recognized objects are Objects in the predefined object group to determine which predefined object groups are included in the first preview image.
当前拍摄场景的场景类别可以包括一种或多种。The scene category of the current shooting scene may include one or more.
可选的,如果第一预览图像包含一个预定义对象组(即单标签),则当前拍摄场景的场景类别是该预定义对象组所表征的拍摄场景的场景类别。Optionally, if the first preview image contains a predefined object group (that is, a single label), the scene category of the current shooting scene is the scene category of the shooting scene represented by the predefined object group.
该情况可以认为是基于单标签确定当前拍摄场景的场景类别。以“预定义的多个拍摄场景为台阶场景、海边场景和夕阳场景”为例,若识别结果是第一预览图像中包括台阶,不包括海边和夕阳,则第一终端可以将台阶场景确定为当前拍摄场景。This situation can be considered to be based on a single tag to determine the scene category of the current shooting scene. Taking “the predefined multiple shooting scenes as step scenes, seaside scenes, and sunset scenes” as an example, if the recognition result is that the first preview image includes steps but does not include the seaside and sunset, the first terminal can determine the step scene as The current shooting scene.
可选的,如果第一预览图像包含多个预定义对象组(即多标签),则当前拍摄场景的场景类别是该多个预定义对象组所表征的部分或全部拍摄场景的场景类别。Optionally, if the first preview image contains multiple predefined object groups (ie, multiple tags), the scene category of the current shooting scene is the scene category of some or all of the shooting scenes represented by the multiple predefined object groups.
该情况可以认为是基于多标签确定当前拍摄场景的场景类别。作为示例,如果当前拍摄场景的场景类别是该多个预定义对象组所表征的部分拍摄场景的场景类别,则具体可以将该多个预定义对象组中的“优先级满足条件的预定义对象组”所表征的拍摄场景的场景类别,作为当前拍摄场景的场景类别。其中,优先级满足条件的预定义对象组可以包括:优先级最高的预定义对象组,或者,优先级高于预设级别的预定义对象组。This situation can be regarded as determining the scene category of the current shooting scene based on multiple tags. As an example, if the scene category of the current shooting scene is the scene category of part of the shooting scene represented by the multiple predefined object groups, specifically, the "predefined objects whose priority meets the condition" in the multiple predefined object groups may be The scene category of the shooting scene represented by "group" is used as the scene category of the current shooting scene. Among them, the predefined object group whose priority satisfies the condition may include: the predefined object group with the highest priority, or the predefined object group with the priority higher than the preset level.
以“第一终端中存储的多个拍摄场景为台阶场景、海边场景和夕阳场景,且预定义对象组的优先级顺序由高到低依次为:台阶、海边、夕阳”为例,若第一预览图像中包括台阶和夕阳,则第一终端可以基于台阶和夕阳的优先级顺序,将台阶场景确定为当前拍摄场景。Take "the multiple shooting scenes stored in the first terminal are step scenes, seaside scenes, and sunset scenes, and the priority order of the predefined object groups from high to low: steps, seaside, sunset" as an example, if the first The preview image includes steps and sunset, and the first terminal may determine the step scene as the current shooting scene based on the priority order of the steps and sunset.
需要说明的是,如果识别结果是第一预览图像不包含任何一个预定义对象组,也就是说,当前拍摄场景不是上述以所包含的预定义对象区别的拍摄场景,则第一终端设备可以将当前拍摄场景确定为默认场景。其中,默认场景也可以是第一终端中预存的场景。It should be noted that if the recognition result is that the first preview image does not contain any predefined object group, that is, the current shooting scene is not the above-mentioned shooting scene distinguished by the included predefined objects, then the first terminal device may The current shooting scene is determined as the default scene. Wherein, the default scene may also be a scene pre-stored in the first terminal.
(可选的)S103:第一终端显示当前拍摄场景的场景类别信息。场景类别信息可以包括:场景类别的标识信息,如文字信息、图片信息等。(Optional) S103: The first terminal displays scene category information of the current shooting scene. The scene category information may include: identification information of the scene category, such as text information, picture information, and so on.
具体的,第一终端在显示屏上显示当前拍摄场景的场景类别信息。Specifically, the first terminal displays scene category information of the current shooting scene on the display screen.
S104:第一终端获取目标参考姿势、目标参考姿势在第二预览图像中的位置,以及目标参考姿势在第二预览图像中所占的大小。目标参考姿势至少是基于当前拍摄场景的场景类别得到的。目标参考姿势的个数可以是一个或多个。S104: The first terminal acquires the target reference posture, the position of the target reference posture in the second preview image, and the size of the target reference posture in the second preview image. The target reference pose is obtained at least based on the scene category of the current shooting scene. The number of target reference postures can be one or more.
第二预览图像可以是执行S105时,显示在第一终端上的针对当前拍照场景的预览图像。第二预览图像可以是第一终端上安装的摄像头采集的图像,或者可以是对第一终端上安装的摄像头采集的图像进行处理后得到的图像,其处理步骤可以参考上文。The second preview image may be a preview image for the current photographing scene displayed on the first terminal when S105 is executed. The second preview image may be an image collected by a camera installed on the first terminal, or may be an image obtained by processing an image collected by a camera installed on the first terminal, and the processing steps can be referred to above.
在第一预览图像与第二预览图像之间,可能存在一帧或多帧预览图像。Between the first preview image and the second preview image, there may be one or more frames of preview images.
可以理解的是,实际拍摄过程中,可能因拍摄者抖动等,使得第一终端在显示第一预览图像和显示第二预览图像时,所针对的当前拍摄场景有差别。考虑到这一点,为了方便描述,本申请实施例均是以第一终端在显示第一预览图像和显示第二预览图像的过程中,抖动在误差范围内,即当前拍摄场景的变化较小,可以忽略不计,为例进行说明的。在此统一说明,下文不再赘述。It is understandable that in the actual shooting process, the current shooting scene may be different when the first terminal displays the first preview image and the second preview image due to the shake of the photographer. Considering this point, for the convenience of description, the embodiments of the present application are based on the fact that the jitter is within the error range when the first terminal displays the first preview image and the second preview image, that is, the current shooting scene has little change. It can be ignored, as an example. This is a unified description, and will not be repeated below.
可以理解的是,目标参考姿势可以在预览图像流中的第一预览图像之后的每一帧预览图像中均显示。可选的,目标参考姿势在其所显示的每一帧预览图像中的位置相同(或者大致相同)。It is understandable that the target reference posture may be displayed in each frame of preview image after the first preview image in the preview image stream. Optionally, the position of the target reference posture in each frame of the preview image displayed by it is the same (or approximately the same).
可选的,目标参考姿势与第一姿势满足如下条件1至条件3中的至少一种条件:Optionally, the target reference posture and the first posture satisfy at least one of the following conditions 1 to 3:
条件1:目标参考姿势与第一姿势不同。Condition 1: The target reference posture is different from the first posture.
条件2:目标参考姿势在第二预览图像中的相对位置,与第一姿势在第一预览图像中的相对位置不同。Condition 2: The relative position of the target reference posture in the second preview image is different from the relative position of the first posture in the first preview image.
在一种实现方式中,目标参考姿势在第二预览图像中的相对位置,可以是目标参考姿势在当前拍摄场景中的相对于一个参考对象的位置。第一姿势在第一预览图像中的相对位置可以是第一姿势在当前拍摄场景中的相对于该参考对象的位置。其中,该参考对象可以是预定义的对象,也可以是第一终端实时确定的当前拍摄场景中的一个对象。In an implementation manner, the relative position of the target reference posture in the second preview image may be the position of the target reference posture relative to a reference object in the current shooting scene. The relative position of the first posture in the first preview image may be the position of the first posture relative to the reference object in the current shooting scene. Wherein, the reference object may be a predefined object, or may be an object in the current shooting scene determined by the first terminal in real time.
在另一种实现方式中,目标参考姿势在第二预览图像中的相对位置,可以是目标参考姿势在第二预览图像所在的坐标系中的位置。第一姿势在第一预览图像中的相对位置可以是第一姿势在第一预览图像所在的坐标系中的位置。其中,这两个坐标系相同,或者是大致相同。可以理解的是,如果不考虑第一终端在拍照过程中的抖动等问题,也就是说,显示第一预览图像时所针对的当前拍摄场景,与显示第二预览图像时所针对的当前拍摄场景相同,那么,这两个坐标系通常是相同的。In another implementation manner, the relative position of the target reference posture in the second preview image may be the position of the target reference posture in the coordinate system where the second preview image is located. The relative position of the first posture in the first preview image may be the position of the first posture in the coordinate system where the first preview image is located. Among them, the two coordinate systems are the same or roughly the same. It is understandable that if we do not consider issues such as the shaking of the first terminal during the photographing process, that is to say, the current photographing scene when the first preview image is displayed is different from the current photographing scene when the second preview image is displayed. Same, then the two coordinate systems are usually the same.
条件3:目标参考姿势在第二预览图像中所占的大小,与第一姿势在第一预览图像中所占的大小不同。Condition 3: The size occupied by the target reference posture in the second preview image is different from the size occupied by the first posture in the first preview image.
以下,说明本申请实施例提供的获取目标参考姿势,获取目标参考姿势在第二预览图像中的位置,以及获取目标参考姿势在第二预览图像中所占的大小的具体实现方式:The following describes the specific implementation manners of obtaining the target reference pose, obtaining the position of the target reference pose in the second preview image, and obtaining the size of the target reference pose in the second preview image provided by the embodiments of the present application:
第一,获取目标参考姿势First, get the target reference pose
本申请实施例对如何获取目标参考姿势不进行限定。以下提供可能的实现方式:The embodiment of the present application does not limit how to obtain the target reference posture. Possible implementations are provided below:
方式1、目标参考姿势是基于当前拍摄场景的场景类别得到的。具体的,第一终端可以基于多个预设拍摄场景的场景类别与多个参考姿势之间的对应关系,确定与当前拍摄场景的场景类别对应的参考姿势,并将所确定的参考姿势作为目标参考姿势。其中,该对应关系是第一终端中预存的,或者是第一终端从网络设备获取的。 Manner 1. The target reference pose is obtained based on the scene category of the current shooting scene. Specifically, the first terminal may determine the reference pose corresponding to the scene category of the current shooting scene based on the correspondence between the scene categories of the multiple preset shooting scenes and the multiple reference poses, and use the determined reference pose as the target Reference posture. Wherein, the corresponding relationship is pre-stored in the first terminal or acquired by the first terminal from the network device.
其中,一个拍摄场景的场景类别可以对应一个或多个参考姿势,不同拍摄场景的 场景类别对应的参考姿势可以相同,也可以不同。如表1所示,为本申请实施例提供的一种拍摄场景的场景类别与参考姿势之间的对应关系。Among them, the scene category of a shooting scene may correspond to one or more reference poses, and the reference poses corresponding to the scene categories of different shooting scenes may be the same or different. As shown in Table 1, the corresponding relationship between the scene category of the shooting scene and the reference posture provided in this embodiment of the application.
表1Table 1
Figure PCTCN2020142530-appb-000001
Figure PCTCN2020142530-appb-000001
可选的,如果当前拍摄场景的场景类别对应多个参考姿势,那么:Optionally, if the scene category of the current shooting scene corresponds to multiple reference poses, then:
在一个示例中,目标参考姿势可以是与当前拍摄场景的类别对应的多个参考姿势中的任意一个或多个参考姿势。例如,参见表1,如果当前拍摄场景的场景类别是台阶场景,则目标参考姿势可以是参考姿势21和参考姿势22中的至少一种姿势。In an example, the target reference posture may be any one or more of the multiple reference postures corresponding to the category of the current shooting scene. For example, referring to Table 1, if the scene category of the current shooting scene is a step scene, the target reference posture may be at least one of the reference posture 21 and the reference posture 22.
在另一个示例中,目标参考姿势可以是与当前拍摄场景的类别对应的多个参考姿势中的,与第一姿势之间的相似度大于等于第一阈值的参考姿势。例如,参见表1,如果当前拍摄场景的场景类别是台阶场景,则目标参考姿势可以是参考姿势21和参考姿势22中的,与第一姿势之间的相似度大于等于第一阈值的参考姿势。In another example, the target reference posture may be a reference posture whose similarity with the first posture is greater than or equal to the first threshold among multiple reference postures corresponding to the category of the current shooting scene. For example, referring to Table 1, if the scene category of the current shooting scene is a step scene, the target reference posture may be the reference posture of the reference posture 21 and the reference posture 22, and the similarity with the first posture is greater than or equal to the first threshold. .
在又一个示例中,目标参考姿势可以是与当前拍摄场景的类别对应的多个参考姿势中的,与第一姿势之间的相似度最高的参考姿势。参见表1,如果当前拍摄场景的场景类别是台阶场景,则目标参考姿势可以是参考姿势21和参考姿势22中的,与第一姿势之间的相似度最高的参考姿势。In another example, the target reference posture may be the reference posture with the highest similarity to the first posture among the multiple reference postures corresponding to the category of the current shooting scene. Referring to Table 1, if the scene category of the current shooting scene is a step scene, the target reference posture may be the reference posture with the highest similarity between the reference posture 21 and the reference posture 22 and the first posture.
其中,关于姿势之间的相似度的具体实现方式可以参考下文,此处不再赘述。For the specific implementation of the similarity between postures, please refer to the following, which will not be repeated here.
方式2、目标参考姿势是基于当前拍摄场景的场景类别和第一姿势的姿势类别确定的。其中,第一姿势的姿势类别可以用于确定目标参考姿势的姿势类别。例如,目标参考姿势的姿势类别与第一姿势的姿势类别一致。Manner 2: The target reference posture is determined based on the scene category of the current shooting scene and the posture category of the first posture. The posture category of the first posture can be used to determine the posture category of the target reference posture. For example, the posture category of the target reference posture is consistent with the posture category of the first posture.
具体的,第一终端可以基于多个预设拍摄场景的场景类别、预设姿势类别、与多个参考姿势之间的对应关系,确定与当前拍摄场景的场景类别和第一姿势类别均对应的参考姿势,并将所确定的参考姿势作为目标参考姿势。其中,该对应关系是第一终端中预存的,或者是第一终端从网络设备获取的。Specifically, the first terminal may determine the corresponding relationship between the scene category of the multiple preset shooting scenes, the preset posture category, and the multiple reference postures, to determine the scene category corresponding to the current shooting scene and the first posture category. Reference posture, and use the determined reference posture as the target reference posture. Wherein, the corresponding relationship is pre-stored in the first terminal or acquired by the first terminal from the network device.
姿势类别可以包括:站姿、坐姿和卧姿中的一种或多种。当然,具体实现时,在一个示例中,姿势类别还可以包含与站姿、坐姿和卧姿并列的姿势。在另一个示例中,姿势类别还可以是对站姿、坐姿和卧姿等中的任一种或多种姿势进行更细粒度的划分,从而得到更细粒度的姿势类别。当然还可以有其他实现方式,本申请实施例对此不进行限定。下文中的具体示例中均以姿势类别包括站姿、坐姿和卧姿为例进行说明。The posture category may include one or more of standing posture, sitting posture, and prone posture. Of course, in specific implementation, in an example, the posture category may also include postures parallel to the standing posture, sitting posture, and prone posture. In another example, the posture category may also be a more fine-grained classification of any one or more of the standing posture, sitting posture, and lying posture, so as to obtain a more fine-grained posture category. Of course, there may also be other implementation manners, which are not limited in the embodiment of the present application. In the following specific examples, the posture categories include standing posture, sitting posture, and lying posture as examples.
一个拍摄场景的场景类别可以对应一个或多个姿势类别。一个姿势类别可以对应一个或多个参考姿势。不同拍摄场景的场景类别对应的姿势类别可以相同,也可以不同。不同场景的场景类别下的同一种姿势类别对应的参考状态可以相同,也可以不同。如表2所示,为本申请实施例提供的一种拍摄场景的场景类别、姿势类别与参考姿势之间的对应关系。The scene category of a shooting scene can correspond to one or more pose categories. A pose category can correspond to one or more reference poses. The posture categories corresponding to the scene categories of different shooting scenes may be the same or different. The reference states corresponding to the same posture category under different scene categories may be the same or different. As shown in Table 2, the corresponding relationship between the scene category, the posture category, and the reference posture of the shooting scene provided in this embodiment of the application.
表2Table 2
Figure PCTCN2020142530-appb-000002
Figure PCTCN2020142530-appb-000002
可选的,如果与当前拍摄场景的场景类别和第一姿势的姿势类别均对应的参考姿势有多个,那么:Optionally, if there are multiple reference poses corresponding to both the scene category of the current shooting scene and the pose category of the first pose, then:
在一个示例中,目标参考姿势可以是与当前拍摄场景的类别和第一姿势的姿势类别均对应的多个参考姿势中的任意一个或多个参考姿势。例如,参见表2,如果当前拍摄场景的场景类别是草地场景,第一姿势的姿势类别是站姿,则目标参考姿势可以是参考姿势11A和参考姿势11B中的至少一种。In an example, the target reference posture may be any one or more of the multiple reference postures corresponding to the category of the current shooting scene and the posture category of the first posture. For example, referring to Table 2, if the scene category of the current shooting scene is a grass scene and the posture category of the first posture is a standing posture, the target reference posture may be at least one of the reference posture 11A and the reference posture 11B.
在另一个示例中,目标参考姿势可以是与当前拍摄场景的类别和第一姿势的姿势类别均对应的多个参考姿势中的,与第一姿势之间的相似度大于等于第一阈值的参考姿势。例如,参见表2,如果当前拍摄场景的场景类别是草地场景,第一姿势的姿势类别是站姿,则目标参考姿势可以是参考姿势11A和参考姿势11B中的,与第一姿势之间的相似度大于等于第一阈值的参考姿势。In another example, the target reference posture may be a reference of a plurality of reference postures corresponding to the category of the current shooting scene and the posture category of the first posture, and the similarity with the first posture is greater than or equal to the first threshold. posture. For example, referring to Table 2, if the scene category of the current shooting scene is a grass scene, and the pose category of the first posture is a standing posture, the target reference posture may be between the reference posture 11A and the reference posture 11B and the first posture. The reference posture whose similarity is greater than or equal to the first threshold.
在又一个示例中,目标参考姿势可以是与当前拍摄场景的类别和第一姿势的姿势类别均对应的多个参考姿势中的,与第一姿势之间的相似度最高的参考姿势。参见表2,如果当前拍摄场景的场景类别是草地场景,第一姿势的姿势类别是站姿,则目标参考姿势可以是参考姿势11A和参考姿势11B中的,与第一姿势之间的相似度最高的参考姿势。In another example, the target reference posture may be the reference posture with the highest similarity to the first posture among multiple reference postures corresponding to the category of the current shooting scene and the posture category of the first posture. Referring to Table 2, if the scene category of the current shooting scene is a grass scene, and the posture category of the first posture is a standing posture, the target reference posture can be the similarity between the reference posture 11A and the reference posture 11B and the first posture The highest reference posture.
需要说明的是,拍摄场景的场景类别对应的参考姿势,是第一终端在该拍摄场景下可用于向用户推荐的姿势。与拍摄场景的场景类别和某一姿势类别均对应的参考姿势,是第一终端在该拍摄场景下且被拍摄者当前姿势的姿势类别下可用于向用户推荐的姿势。在一个示例中,通俗地讲,参考姿势是第一终端/网络设备确定的优美自然的姿势。本申请实施例对拍摄场景的场景类别对应的参考姿势的确定方式不进行限定,例如,可以是基于大数据分析等方法所确定的,并预存在第一终端或网络设备中的。It should be noted that the reference posture corresponding to the scene category of the shooting scene is a posture that the first terminal can use to recommend to the user in the shooting scene. The reference posture corresponding to both the scene category of the shooting scene and a certain posture category is a posture that the first terminal can use to recommend to the user in the shooting scene and the posture category of the current posture of the subject. In an example, in layman's terms, the reference posture is a graceful and natural posture determined by the first terminal/network device. The embodiment of the present application does not limit the determination method of the reference posture corresponding to the scene category of the shooting scene. For example, it may be determined based on methods such as big data analysis and pre-stored in the first terminal or network device.
可选的,拍摄场景的场景类别,每种拍摄场景的场景类别对应的参考姿势,每种拍摄场景的场景类别对应的姿势类别,以及每种拍摄场景的场景类别对应的每种姿势类别的参考姿势等均是可以更新的。例如,将本申请实施例提供的方法由第一终端中安装的一个应用实现,通过更新该应用的版本等更新上述信息。又如,上述信息均存储在网络设备,由第一终端实时向网络设备获取上述信息等。Optionally, the scene category of the shooting scene, the reference pose corresponding to the scene category of each shooting scene, the pose category corresponding to the scene category of each shooting scene, and the reference of each pose category corresponding to the scene category of each shooting scene Posture etc. can be updated. For example, the method provided in the embodiment of the present application is implemented by an application installed in the first terminal, and the above-mentioned information is updated by updating the version of the application and so on. In another example, the above-mentioned information is all stored in the network device, and the first terminal obtains the above-mentioned information from the network device in real time.
第二,获取目标参考姿势在第二预览图像中的位置Second, get the position of the target reference pose in the second preview image
本申请实施例对如何获取目标参考姿势在第二预览图像中的位置不进行限定。The embodiment of the present application does not limit how to obtain the position of the target reference posture in the second preview image.
可选的,目标参考姿势在第二预览图像中的位置,是基于第一预览图像中的第一预设对象在第一预览图像中的位置确定的。目标参考姿势中的第一局部姿势与第一预设对象在同一图像中的位置之间具有第一关联关系,第一关联关系是预定义或者实时确定的。Optionally, the position of the target reference posture in the second preview image is determined based on the position of the first preset object in the first preview image in the first preview image. There is a first association relationship between the first local posture in the target reference posture and the position of the first preset object in the same image, and the first association relationship is predefined or determined in real time.
第一预设对象可以是预定义的一个或多个对象。第一预设对象与当前拍摄场景的类别中所包含的对象可以相同也可以不同。例如,在塔场景中,第一预览图像中包含塔,第一预设对象可以是塔。在草地场景中,第一预览图像中可以包括夕阳和草地等,第一预设对象可以是夕阳。更具体的,第一预设对象可以是塔底或塔顶、夕阳中心、夕阳边缘等。另外,第一预设对象可以是第一人像,或者第一人像的一部分。The first preset object may be one or more predefined objects. The first preset object and the objects included in the category of the current shooting scene may be the same or different. For example, in a tower scene, the first preview image contains a tower, and the first preset object may be a tower. In the grass scene, the first preview image may include sunset and grass, etc., and the first preset object may be the sunset. More specifically, the first preset object may be the bottom or top of the tower, the center of the sunset, the edge of the sunset, and so on. In addition, the first preset object may be the first portrait, or a part of the first portrait.
第一局部姿势可以是预定义的一个或多个姿势,如人的手部等。The first local posture may be one or more pre-defined postures, such as a human hand.
第一局部姿势与第一预设对象具有第一关联关系可以包括:第一局部姿势与第一预设对象具有在方位上具有关联关系,和/或在距离上具有关联关系等。The first local posture and the first preset object having the first association relationship may include: the first local posture and the first preset object have an association relationship in orientation, and/or an association relationship in distance, and the like.
示例的,第一局部姿势与第一预设对象在方位上具有关联关系,可以包括:第一局部姿势在第一预设对象的上部、下部、斜上方等。第一局部姿势与第一预设对象在距离上具有关联关系,可以包括:第一局部姿势与第一预设对象之间的距离小于等于阈值等。For example, the first local posture has an association relationship with the first preset object in terms of orientation, which may include: the first local posture is above, below, diagonally above the first preset object, and so on. The first local posture and the first preset object have an association relationship in distance, which may include: the distance between the first local posture and the first preset object is less than or equal to a threshold, and the like.
第一关联关系可以是预定义的,例如,第一关联关系是预定义在第一终端中的,或者预定义在网络设备中的。或者,第一关联关系可以是实时获取的,例如,第一关联关系是第一终端或网络设备基于预存的一些图像,通过一定的分析计算实时获得的。The first association relationship may be predefined. For example, the first association relationship is predefined in the first terminal or predefined in the network device. Alternatively, the first association relationship may be obtained in real time. For example, the first association relationship is obtained in real time by the first terminal or network device based on some pre-stored images through certain analysis and calculation.
例如,当当前拍摄场景是塔场景时,如果目标参考姿势是“手托塔”的姿势,则预设对象可以是塔(具体是塔底),局部姿势可以是用于“托塔”的手的姿势。如图5所示,为本申请实施例提供的一种塔场景下第一终端上显示的图像的示意图。其中,图5中的a图示意出了第二预览图像的局部图,其中包括人的手部41和塔42(即预设对象)。目标参考姿势是“手托塔”的姿势。基于此,第一终端可以基于“用于托塔的手”与“塔底”之间的关联关系(即相对方位信息和相对距离信息),确定目标参考姿势在第二预览图像中的位置,如图5中的b图所示。For example, when the current shooting scene is a tower scene, if the target reference posture is the posture of "hand support tower", the preset object can be the tower (specifically the tower bottom), and the local posture can be the hand used for "tota" Posture. As shown in FIG. 5, a schematic diagram of an image displayed on a first terminal in a tower scenario provided by an embodiment of this application. Wherein, the diagram a in FIG. 5 illustrates a partial diagram of the second preview image, which includes a human hand 41 and a tower 42 (ie, a preset object). The target reference posture is the posture of the "hand support tower". Based on this, the first terminal can determine the position of the target reference posture in the second preview image based on the association relationship between the “hand for the tower” and the “bottom of the tower” (ie, relative orientation information and relative distance information), As shown in figure b in Figure 5.
第三,获取目标参考姿势在第二预览图像中的大小Third, get the size of the target reference pose in the second preview image
可选的,目标参考姿势在第二预览图像中所占的大小,是基于第一预览图像中的第二预设对象在第一预览图像中所占的大小确定的。其中,目标参考姿势与第二预设对象在同一图像中的大小之间具有第二关联关系,第二关联关系是预定义或者实时确定的。Optionally, the size occupied by the target reference posture in the second preview image is determined based on the size occupied by the second preset object in the first preview image in the first preview image. There is a second association relationship between the target reference posture and the size of the second preset object in the same image, and the second association relationship is predefined or determined in real time.
如果目标参考姿势在第二预览图像中所占的大小,可以是目标参考姿势在第二预览图像中所占的像素点,或者包含目标参考姿势的最小矩形框(或其他形状的框)在第二预览图像中所占的像素点等。If the size of the target reference pose in the second preview image occupies, it can be the pixel points occupied by the target reference pose in the second preview image, or the smallest rectangular frame (or other shapes) that contains the target reference pose in the first preview image. 2. The pixels occupied in the preview image, etc.
第二预设对象与上述第一预设对象可以相同,也可以不同。The second preset object may be the same as or different from the above-mentioned first preset object.
目标参考姿势与第二预设对象在同一图像中的大小之间具有第二关联关系,可以是目标参考姿势与第二预设对象在同一图像中的占比满足预设关系。There is a second association relationship between the target reference pose and the size of the second preset object in the same image, and it may be that the proportion of the target reference pose and the second preset object in the same image satisfies the preset relationship.
如图6所示,为本申请实施例提供的一种夕阳场景下第一终端上显示的图像的示 意图。其中,图6的a图表示第二预览图像,该图中包括夕阳51和被拍摄者52。图6的b图表示显示有目标参考姿势53的第二预览图像。其中,目标参考姿势53的大小是基于第二预览图像中的夕阳的大小(即第二预设对象)确定的。As shown in Fig. 6, a schematic diagram of an image displayed on the first terminal in a sunset scene provided by this embodiment of the application. Wherein, the diagram a in FIG. 6 represents the second preview image, which includes the sunset 51 and the subject 52. FIG. 6B shows the second preview image in which the target reference posture 53 is displayed. The size of the target reference posture 53 is determined based on the size of the sunset in the second preview image (that is, the second preset object).
可选的,目标参考姿势在第二预览图像中的位置和大小,是基于第一预览图像的构图确定的。示例的,第二预览图像中使用目标参考姿势的人像替换第二姿势的人像之后得到的图像的构图,优于第一预览图像的构图。本申请实施例对比较两个构图之间谁优谁劣的具体判断方式不进行限定,具体可以基于本技术领域普遍的一些判断标准或判断算法来确定,此处不再赘述。Optionally, the position and size of the target reference posture in the second preview image are determined based on the composition of the first preview image. For example, the composition of the image obtained after replacing the portrait of the second pose with the portrait of the target reference pose in the second preview image is better than the composition of the first preview image. The embodiment of the present application does not limit the specific judgment method of comparing who is superior or inferior between two compositions, and it can be determined based on some common judgment standards or judgment algorithms in the technical field, which will not be repeated here.
需要说明的是,上述任意多个技术方案中的部分或全部技术特征,在不冲突的情况下,均可以进行结合使用,从而构成新的技术方案。It should be noted that some or all of the technical features in any of the above-mentioned technical solutions can be used in combination without conflict to form a new technical solution.
可选的,目标参考姿势的信息可以是第一终端自身确定的,如第一终端基于自身存储的信息确定的;也可以是第一终端从网络设备中获取的。其中,目标参考姿势的信息包括但不限于以下至少一项:目标参考姿势的姿势类型,目标参考姿势在第二预览图像中的位置,或者目标参考姿势在第二预览图像中的大小等。其中,目标参考姿势在第二预览图像中的大小,可以通过目标参考姿势所占的像素数量来表征。Optionally, the information of the target reference posture may be determined by the first terminal itself, for example, determined by the first terminal based on information stored by itself; it may also be obtained by the first terminal from a network device. The information of the target reference posture includes but is not limited to at least one of the following: the posture type of the target reference posture, the position of the target reference posture in the second preview image, or the size of the target reference posture in the second preview image. Wherein, the size of the target reference posture in the second preview image can be characterized by the number of pixels occupied by the target reference posture.
本申请实施例对第一终端从网络设备中获取目标参考姿势的信息的具体实现方式不进行限定。例如,第一终端向网络设备发送当前拍摄场景的第一预览图像(或者对第一预览图像进行处理后得到的信息)。网络设备执行以下步骤:首先,基于接收到的信息,确定当前拍摄场景的场景类别。然后,在数据库中选择与当前拍摄场景的场景类别相对应的参考姿势。从这些参考姿势中,选择姿势类型与“第一姿势的姿势类型”相同的参考姿势,并将所选择的参考姿势作为目标参考姿势;接着,基于上述方式一至三中的一种或多种的结合,确定目标参考姿势在第二预览图像中的位置和大小,并将所确定的目标参考姿势、目标参考姿势在第二预览图像中的位置和大小等信息发送给第一终端。第一终端基于所接收到的信息,在第二预览图像中显示目标参考姿势。The embodiment of the present application does not limit the specific implementation manner in which the first terminal obtains the target reference posture information from the network device. For example, the first terminal sends a first preview image of the current shooting scene (or information obtained after processing the first preview image) to the network device. The network device performs the following steps: First, based on the received information, determine the scene category of the current shooting scene. Then, the reference pose corresponding to the scene category of the current shooting scene is selected in the database. From these reference postures, select the reference posture with the same posture type as the "posture type of the first posture", and use the selected reference posture as the target reference posture; then, based on one or more of the above methods 1 to 3 In combination, the position and size of the target reference posture in the second preview image are determined, and information such as the determined target reference posture and the position and size of the target reference posture in the second preview image are sent to the first terminal. Based on the received information, the first terminal displays the target reference posture in the second preview image.
需要说明的是,相比终端来说,网络设备的存储空间较大,计算能力较强,因此,网络设备的数据库中所存储的图像会更丰富,这样,由网络设备确定目标参考姿势、目标参考姿势在第二预览图像中的位置和大小等,能够使得拍照效果更好。It should be noted that, compared to the terminal, the storage space of the network device is larger and the computing power is stronger. Therefore, the image stored in the database of the network device will be richer. In this way, the network device determines the target reference posture and target. The position and size of the reference posture in the second preview image can make the photographing effect better.
S105:第一终端显示当前拍摄场景下的第二预览图像,并在第二预览图像中显示目标参考姿势。其中,目标参考姿势在第二预览图像中的位置和大小可以分别是S104中所确定的位置和大小。第二预览图像包括被拍摄者在第二姿势下的第二人像。S105: The first terminal displays the second preview image in the current shooting scene, and displays the target reference posture in the second preview image. Wherein, the position and size of the target reference posture in the second preview image may be the position and size determined in S104, respectively. The second preview image includes a second portrait of the subject in the second posture.
第一终端在显示屏上显示当前拍摄场景下的第二预览图像。第二姿势是第二预览图像中该被拍摄者的当前姿势,第二人像是该当前姿势下该被拍摄者的图像。关于第二预览图像的其他解释可以参考上文,此处不再赘述。The first terminal displays the second preview image in the current shooting scene on the display screen. The second posture is the current posture of the subject in the second preview image, and the second portrait is the image of the subject in the current posture. For other explanations about the second preview image, please refer to the above, which will not be repeated here.
第一姿势和第二姿势是同一拍摄场景中的同一被拍摄者在不同时刻的姿势。可选的,第一姿势与第二姿势不同。The first posture and the second posture are the postures of the same subject in the same shooting scene at different moments. Optionally, the first posture is different from the second posture.
可选的,第一终端可以在执行S103之后,且执行S106之前,第一终端所显示的每帧第二预览图像中显示目标参考姿势。Optionally, the first terminal may display the target reference posture in each frame of the second preview image displayed by the first terminal after performing S103 and before performing S106.
在本申请一些实施例中,认为目标参考姿势不是第二预览图像中的一部分(或者说不是第二预览图像的组成部分),而是在第二预览图像的上层显示的图像。下文中 的其他特征也是基于此进行描述的。需要说明的是,如果认为目标参考姿势是第二预览图像中的一部分,则下述S106中“基于第二预览图像生成目标图像”具体可以包括:基于不包含目标参考姿势的第二预览图像,生成目标图像。In some embodiments of the present application, it is considered that the target reference pose is not a part of the second preview image (or not a component of the second preview image), but an image displayed on the upper layer of the second preview image. The other features below are also described based on this. It should be noted that if it is considered that the target reference pose is a part of the second preview image, the “generating the target image based on the second preview image” in S106 below may specifically include: based on the second preview image that does not contain the target reference pose, Generate the target image.
本申请实施例对以何种方式在第二预览图像中显示目标参考姿势不进行限定,例如,可以以人体骨架或人体轮廓等方式显示目标参考姿势。如图4中的a图所示,为一种以人体骨架方式显示目标参考姿势的示意图,其中,人体骨架中的点,可以是人体的特定关节等。图4中的b图为一种以人体轮廓方式显示目标参考姿势的示意图。其中,人体轮廓可以以简笔画的方式呈现。The embodiment of the present application does not limit the manner in which the target reference posture is displayed in the second preview image. For example, the target reference posture may be displayed in a manner such as a human skeleton or a human body contour. As shown in Figure a in Figure 4, it is a schematic diagram of displaying the target reference posture in the form of a human skeleton, where the points in the human skeleton may be specific joints of the human body. Figure b in Figure 4 is a schematic diagram of displaying the target reference posture in the form of a human body contour. Among them, the outline of the human body can be presented in the form of simple strokes.
可选的,如图7所示,在S105之前或之后或同时,该方法还可以包括以下步骤1~2:Optionally, as shown in FIG. 7, before or after or at the same time as S105, the method may further include the following steps 1 to 2:
步骤1:第一终端向第二终端发送目标参考姿势的信息和第二预览图像的信息,以指示第二终端显示第二预览图像,并在第二预览图像中显示目标参考姿势。Step 1: The first terminal sends the target reference posture information and the second preview image information to the second terminal to instruct the second terminal to display the second preview image, and display the target reference posture in the second preview image.
步骤2:第二终端基于接收到的信息,显示第二预览图像,并在第二预览图像中显示目标参考姿势。Step 2: The second terminal displays a second preview image based on the received information, and displays the target reference posture in the second preview image.
可以理解的是,第一终端的显示屏上显示的内容是拍摄者能够看到的,通常被拍摄者不能看到。此处,第二终端可以是被拍摄者所使用的终端,或者说,第二终端的显示屏上显示的内容是能够被拍摄者看到的终端。本申请实施例对第一终端与第二终端之间的连接方式不进行限定,例如,可以是蓝牙连接等。It is understandable that the content displayed on the display screen of the first terminal can be seen by the photographer, and usually cannot be seen by the photographer. Here, the second terminal may be a terminal used by the photographer, or in other words, the content displayed on the display screen of the second terminal is a terminal that can be seen by the photographer. The embodiment of the present application does not limit the connection mode between the first terminal and the second terminal. For example, it may be a Bluetooth connection.
该技术方案可以描述为:将拍摄者所使用的终端上显示的信息,同步到被拍摄者所使用的终端上。这样,对于被拍摄者而言,可以通过第二终端上显示的内容,看到第二预览图像和目标参考姿势,从而更方便进行姿势调整,从而使得拍摄效果更佳。而不需要像现有技术一样,仅凭拍摄者与被拍摄者之间通过沟通来引导被拍摄者调整姿势。The technical solution can be described as: synchronizing the information displayed on the terminal used by the photographer to the terminal used by the photographer. In this way, the person who is photographed can see the second preview image and the target reference posture through the content displayed on the second terminal, so that posture adjustment is more convenient and the photographing effect is better. There is no need to guide the photographer to adjust the posture through communication between the photographer and the photographer as in the prior art.
S106:如果第二姿势与目标参考姿势匹配,则第一终端基于第二预览图像生成目标图像。后续,第一终端可以保存目标图像。S106: If the second posture matches the target reference posture, the first terminal generates the target image based on the second preview image. Subsequently, the first terminal may save the target image.
目标图像可以是第一设备对当前拍摄场景进行拍摄得到的图像。换句话说,目标图像是第一终端需要保存的图像。作为对比,上述第一预览图像和第二预览图像,是第一终端不需要保存的图像。当然具体实现时,不限于此。The target image may be an image obtained by the first device shooting the current shooting scene. In other words, the target image is the image that the first terminal needs to save. In comparison, the above-mentioned first preview image and second preview image are images that the first terminal does not need to save. Of course, the specific implementation is not limited to this.
在被拍摄者调整姿势的过程的,第一终端可以实时获取第二预览图像,并识别第二预览图像中的该被拍摄者的姿势(标记为第二姿势),然后判断第二姿势与目标参考姿势是否匹配。如果第二姿势与目标参考姿势匹配,则基于第二预览图像确定目标图像。可选的,如果第二姿势与目标参考姿势不匹配,被拍摄者可以继续调整姿势,第一终端可以继续采集第二预览图像,直至采集到的第二预览图像中的第二姿势与目标姿势匹配为止。During the process of adjusting the posture of the subject, the first terminal can obtain the second preview image in real time, and recognize the posture of the subject in the second preview image (marked as the second posture), and then determine the second posture and the target Whether the reference posture matches. If the second posture matches the target reference posture, the target image is determined based on the second preview image. Optionally, if the second posture does not match the target reference posture, the subject can continue to adjust the posture, and the first terminal can continue to collect the second preview image until the second posture in the collected second preview image is the target posture So far.
基于第二预览图像确定目标图像,可以包括:将第二预览图像直接作为目标图像;或者,对第二预览图像进行处理(如增强、降噪等)得到目标图像。Determining the target image based on the second preview image may include: directly using the second preview image as the target image; or processing the second preview image (such as enhancement, noise reduction, etc.) to obtain the target image.
可选的,基于上述S103中的描述可知,当前拍摄场景的场景类别可能包括多种。基于此:Optionally, based on the description in S103, the scene category of the current shooting scene may include multiple types. Based on:
在S104中,基于当前拍摄场景的每种场景类别可以确定一个目标参考姿势。In S104, a target reference posture can be determined based on each scene category of the current shooting scene.
在S105中,第一终端可以在第二预览图像中显示所确定的每个目标参考姿势。其中,不同目标参考姿势可以以相同或不同的方式进行显示,例如,显示不同颜色的人体轮廓,以显示不同的目标参考姿势等。In S105, the first terminal may display each determined target reference posture in the second preview image. Among them, different target reference postures can be displayed in the same or different manners, for example, human body contours of different colors are displayed to display different target reference postures, and so on.
基于此:在一种实现方式中,在S106中,第一终端可以在确定第二姿势与多个目标参考姿势中的任意一种目标参考姿势匹配时,基于第二预览图像生成目标图像。在另一种实现方式中,第一终端可以在执行S105之后,接收用户指示的操作,响应于该操作,以在第二预览图像中显示一个目标参考姿势。也就是说,由用户从S105中所显示的多个目标参考姿势中选择一个目标参考姿势进行显示。该情况下,执行S106时,第一终端使用第二姿势与用户所选择出的目标参考姿势进行匹配即可。其中,这里的“用户”可以是拍摄者,或者被拍摄者。Based on this: In an implementation manner, in S106, the first terminal may generate a target image based on the second preview image when determining that the second posture matches any one of the multiple target reference postures. In another implementation manner, after performing S105, the first terminal may receive an operation instructed by the user, and in response to the operation, display a target reference gesture in the second preview image. That is, the user selects one target reference posture from the multiple target reference postures displayed in S105 for display. In this case, when S106 is executed, the first terminal uses the second posture to match the target reference posture selected by the user. Among them, the "user" here can be the photographer or the person being photographed.
可选的,如果第二姿势与目标参考姿势之间的相似度大于等于第四阈值,则确定第二姿势与目标参考姿势匹配。本申请实施例对如何确定第二姿势与目标参考姿势之间的相似度不进行限定,例如,可以通过以下方式一或方式二实现:Optionally, if the similarity between the second posture and the target reference posture is greater than or equal to the fourth threshold, it is determined that the second posture matches the target reference posture. The embodiment of the present application does not limit how to determine the similarity between the second posture and the target reference posture. For example, it can be implemented in the following manner one or two:
方式一:method one:
步骤A:计算第一向量和第二向量;其中,第一向量是第二人像中的关键点相对角度信息构成的向量,用于表征第二姿势。第二向量是目标参考姿势下的人像中的关键点相对角度信息构成的向量,用于表征目标参考姿势。Step A: Calculate the first vector and the second vector; where the first vector is a vector formed by the relative angle information of the key points in the second portrait, and is used to represent the second posture. The second vector is a vector formed by the relative angle information of key points in the portrait in the target reference posture, and is used to characterize the target reference posture.
关键点是用于表征人体姿势的点,例如可以是人体骨骼关键点,如关节等。如图8所示,为可适用于本申请实施例的一种人体关键点的示意图。图8中所示的关键点包括:下巴、锁骨中心、肩部、肘部、手部、胯骨、膝关节、脚踝等。The key point is a point used to characterize the posture of the human body, for example, it may be a key point of a human bone, such as a joint. As shown in FIG. 8, it is a schematic diagram of a human body key point applicable to the embodiment of the present application. The key points shown in Figure 8 include: chin, clavicle center, shoulders, elbows, hands, hip bones, knee joints, ankles, etc.
关键点的相对角度信息,具体为:人体上具有连接关系的关键点之间的相对角度的信息。例如,以关键点是左腿膝关节为例,关键点的相对角度信息可以是“左腿膝关节与左脚脚踝所在直线(即左侧大腿)”与“腿膝关节与左边胯骨所在直线(与左侧小腿)”之间的夹角的信息。又如,以关键点是左手臂的肘部为例,关键点的相对角度信息可以是“左手臂的肘部与左肩所在直线”与“左手臂的肘部与左手所在直线”之间的夹角的信息。The relative angle information of the key points is specifically: information about the relative angle between the key points that have a connection relationship on the human body. For example, taking the key point is the left leg knee joint as an example, the relative angle information of the key point can be "the straight line between the left leg knee joint and the left ankle (that is, the left thigh)" and "the straight line between the leg knee joint and the left hip bone ( And the left calf)". For another example, taking the key point is the elbow of the left arm as an example, the relative angle information of the key point can be the clip between "the line between the elbow of the left arm and the left shoulder" and "the line between the elbow of the left arm and the left hand" Angle of information.
可以理解的是,对于某些关键点(具体是在某一方向上的最后一个关键点)来说,可能没有相对角度信息,例如,以图8为例,如果关键点是左手,则其没有相对角度信息。此仅为示例,其不对本申请实施例所适用的关键点的相对角度信息的确定构成限定。It is understandable that for some key points (specifically the last key point in a certain direction), there may be no relative angle information. For example, taking Figure 8 as an example, if the key point is the left hand, there is no relative angle information. Angle information. This is only an example, and it does not limit the determination of the relative angle information of the key points applicable to the embodiments of the present application.
本申请实施例对表征人体姿势的关键点具体是哪些,以及计算哪些关键点的相对角度信息均不进行限定,例如,表征人体姿势的关键点的确定方法可以参考现有技术。可以理解的是,人体姿势的关键点以及需要计算哪些关键点的相对角度信息均可以是预定义的。这些信息确定之后,可以基于现有技术中的角度计算方式,确定出这些关键点的相对角度信息。The embodiments of the present application do not limit the specific key points that characterize the human body posture, and the relative angle information of which key points are calculated. For example, the method for determining the key points that characterize the human body posture can refer to the prior art. It is understandable that the key points of the human body posture and the relative angle information of which key points need to be calculated can be predefined. After the information is determined, the relative angle information of these key points can be determined based on the angle calculation method in the prior art.
可选的,第一向量与第二向量的元素个数相同,且这两个向量中同一位置的元素分别表示人体中同一个关键点的相对角度信息。例如,第一向量为[A1,A2,A3,A4];第二向量为[B1,B2,B3,B4]。其中,A1和B1分别表示第二姿势和目标参考姿势下的人体左肩的相对角度信息,A2和B2分别表示第二姿势和目标参考姿势下的人体右 肩的相对角度信息。其他元素的含义与此类似,不再一一说明。Optionally, the number of elements of the first vector and the second vector are the same, and the elements at the same position in the two vectors respectively represent the relative angle information of the same key point in the human body. For example, the first vector is [A1, A2, A3, A4]; the second vector is [B1, B2, B3, B4]. Among them, A1 and B1 respectively represent the relative angle information of the human left shoulder in the second posture and the target reference posture, and A2 and B2 represent the relative angle information of the human right shoulder in the second posture and the target reference posture, respectively. The meanings of other elements are similar to this and will not be explained one by one.
可以理解的是,由于关键点的相对角度信息可以度量人体的具体姿势,比如大腿和小腿角度成90度时,那么膝盖是一个弯曲的状态。因此,基于人体多个具有连接关系的关键点之间的相对角度信息可以度量人体的整体姿势。基于此,方式一的基本原理为:将对人体的整体姿势的相似性进行度量,分解为:对人体的关键点的具体姿势的相似性进行度量。It is understandable that because the relative angle information of the key points can measure the specific posture of the human body, for example, when the angle of the thigh and the calf is 90 degrees, then the knee is in a bent state. Therefore, the overall posture of the human body can be measured based on the relative angle information between multiple key points of the human body that have a connection relationship. Based on this, the basic principle of the first method is: the similarity of the overall posture of the human body is measured and decomposed into: the similarity of the specific posture of the key points of the human body is measured.
步骤B:计算第一向量与第二向量之间的距离。例如,计算第一向量和第二向量之间的欧式距离等。Step B: Calculate the distance between the first vector and the second vector. For example, calculating the Euclidean distance between the first vector and the second vector, etc.
步骤C:如果第一向量与第二向量之间的距离小于等于第五阈值,则确定第二姿势与目标参考姿势的相似度大于等于第四阈值。Step C: If the distance between the first vector and the second vector is less than or equal to the fifth threshold, it is determined that the similarity between the second posture and the target reference posture is greater than or equal to the fourth threshold.
第一向量与第二向量之间的距离越小,第二姿势与目标参考姿势之间的相似度越大。The smaller the distance between the first vector and the second vector, the greater the similarity between the second posture and the target reference posture.
其中,第五阈值是预定义的,用于表征参考姿势与第二姿势的相似度是第四阈值时,第一向量与第二向量之间的距离。The fifth threshold is predefined, and is used to characterize the distance between the first vector and the second vector when the similarity between the reference posture and the second posture is the fourth threshold.
方式二:Way two:
将第二姿势和目标参考姿势输入神经网络,得到第二姿势与目标参考姿势之间的相似度;其中,神经网络用于表征输入的多种姿势之间的相似度。The second posture and the target reference posture are input to the neural network to obtain the similarity between the second posture and the target reference posture; wherein the neural network is used to characterize the similarity between the input multiple postures.
上述方式一中是基于常规的方法计算姿势之间的相似程度。方式二是基于神经网络例如卷积神经网络(convolutional neural network,CNN)计算姿势之间的相似度的。具体实现时,第一终端中可以预存神经网络模型,该神经网络模型可以是基于多组训练数据训练得到的,其中,一组训练数据包括具有不同姿势的两个图像(该图像可以是摄像头采集的图像,也可以是对摄像头采集的图像进行处理后得到的图像),以及这两个图像中的人体姿势之间的相似程度。针对多组训练数据进行训练,可以获得神经网络模型。基于方式一中人体具体姿势与整体姿势的度量的关系的原理介绍,在一个示例中,对训练数据进行训练的过程,可以认为是神经网络模型学习关键点的相似性度量关系(即学习获得用于表征姿势的向量)的过程。The first method above is based on a conventional method to calculate the similarity between postures. The second method is based on a neural network such as a convolutional neural network (convolutional neural network, CNN) to calculate the similarity between postures. In specific implementation, the neural network model can be pre-stored in the first terminal. The neural network model can be obtained by training based on multiple sets of training data, where one set of training data includes two images with different poses (the images can be captured by a camera). The image can also be the image obtained by processing the image collected by the camera), and the degree of similarity between the posture of the human body in the two images. For training on multiple sets of training data, a neural network model can be obtained. Based on the introduction of the principle of the relationship between the specific posture of the human body and the overall posture measurement in mode 1, in an example, the process of training the training data can be considered as the similarity measurement relationship of the key points of the neural network model learning (that is, the learning gains use For the process of characterizing the posture vector).
在一个示例中,第一终端中预存的神经网络模型是可以更新的。例如,以本申请实施例提供的方法由安装在第一终端中的一个应用执行的为例,该神经网络模型可以由该应用的更新(如版本的更新)等进行更新。当然本申请实施例不限于此。In an example, the neural network model pre-stored in the first terminal can be updated. For example, taking the method provided in the embodiment of the present application executed by an application installed in the first terminal as an example, the neural network model may be updated by an update of the application (such as a version update). Of course, the embodiments of the present application are not limited to this.
上述方式一和方式二仅为示例,其不对可适用于本申请实施例的计算两个人体姿势之间的相似度的计算方法构成限定。The above-mentioned method 1 and method 2 are only examples, which do not constitute a limitation on the calculation method applicable to the embodiment of the present application for calculating the similarity between two human postures.
在S106中,如果第二姿势与目标参考姿势匹配,则第一终端基于第二预览图像生成目标图像。具体的:In S106, if the second posture matches the target reference posture, the first terminal generates the target image based on the second preview image. specific:
在一种实现方式中,第一终端可以在确定第二姿势与目标参考姿势匹配的情况下,自动基于第二预览图像生成目标图像。也就是说,第一终端自主拍摄,或者是抓拍。该过程不需要用户参与,因此与用户的交互性更好,更智能,这有助于提高用户体验。In an implementation manner, the first terminal may automatically generate the target image based on the second preview image when it is determined that the second posture matches the target reference posture. In other words, the first terminal takes pictures autonomously, or takes a snapshot. This process does not require user involvement, so the interaction with the user is better and smarter, which helps to improve the user experience.
在另一种实现方式中,如图9所示,上述S106可以包括:In another implementation manner, as shown in FIG. 9, the foregoing S106 may include:
S106A:第一终端在确定第二姿势与目标参考姿势匹配的情况下,输出提示信息,该提示信息用于提示第二姿势与目标参考姿势匹配。S106A: When it is determined that the second posture matches the target reference posture, the first terminal outputs prompt information, where the prompt information is used to prompt that the second posture matches the target reference posture.
S106B:第一终端接收第一操作。S106B: The first terminal receives the first operation.
第一操作可以是语音操作,或者触屏操作等。例如,以特定触摸方式触摸显示屏上的虚拟控件的方式,按压第一终端上特定实体控件的方式等。The first operation can be a voice operation, or a touch screen operation. For example, a method of touching a virtual control on the display screen in a specific touch mode, a method of pressing a specific physical control on the first terminal, and so on.
S106C:第一终端响应于第一操作,基于第二预览图像生成目标图像。S106C: In response to the first operation, the first terminal generates a target image based on the second preview image.
也就是说,在用户的指示下拍照。需要说明的是,该实现方式中,虽然是在用户的指示下进行拍照,但是,向用户输出提示信息,是第一终端自主确定第二姿势与目标参考姿势匹配的情况下,输出的。该过程并不需要用户来判断,因此有助于提高用户体验。In other words, take pictures under the user's instructions. It should be noted that in this implementation manner, although the photo is taken under the instruction of the user, the prompt information output to the user is output when the first terminal autonomously determines that the second posture matches the target reference posture. This process does not require the user to judge, so it helps to improve the user experience.
这里的提示信息,可以是语音提示信息,文字提示信息,图案提示信息,界面上某个控件特殊标记(如闪烁或变亮)等任一种提示信息,或者任意多种提示信息的组合,本申请实施例对此不进行限定。The prompt information here can be any prompt information such as voice prompt information, text prompt information, pattern prompt information, a special mark of a control on the interface (such as flashing or brightening), or any combination of various prompt information. The application embodiment does not limit this.
本申请实施例提供的图像处理方法中,第一终端自动确定当前拍摄场景,并自动基于当前拍摄场景推荐目标参考姿势,以指示(或引导)被拍摄者调整姿势。也就是说,本申请实施例提供了一种融合场景信息的智能姿势引导/推荐方法,并且整个推荐姿势的过程不需要用户参与,因此交互性更好,且更智能化,从而能够提高用户的体验。In the image processing method provided by the embodiment of the present application, the first terminal automatically determines the current shooting scene, and automatically recommends the target reference posture based on the current shooting scene, so as to instruct (or guide) the person being photographed to adjust the posture. That is to say, the embodiment of the present application provides an intelligent gesture guidance/recommendation method that integrates scene information, and the entire process of recommending gestures does not require user participation, so the interaction is better and more intelligent, which can improve the user’s Experience.
以下,结合上文中描述的方法,说明本申请实施例提供的技术方案的一个实际应用场景。Hereinafter, in combination with the method described above, an actual application scenario of the technical solution provided by the embodiment of the present application is explained.
如图10所示,为本申请实施例提供的一种拍照方法的流程示意图。图10所示的方法可以包括以下步骤:As shown in FIG. 10, it is a schematic flowchart of a photographing method provided by an embodiment of this application. The method shown in FIG. 10 may include the following steps:
S201:用户(可以是拍摄者或被拍摄者等任一用户)向第一终端发出第二操作。第二操作用于第一终端启动相机应用。第二操作可以是用户发出的触屏操作或语音操作等。S201: The user (which may be any user such as the photographer or the photographed person) sends a second operation to the first terminal. The second operation is for the first terminal to start the camera application. The second operation may be a touch screen operation or a voice operation issued by the user.
S202:第一终端接收第二操作。响应于第二操作,第一终端启动相机应用。S202: The first terminal receives the second operation. In response to the second operation, the first terminal launches the camera application.
S203:第一终端在显示屏上显示相机应用的目标用户界面。目标用户界面上包含“姿势推荐模式”控件。触发姿势推荐模式能够使第一终端执行本申请实施例提供的图像处理方法。S203: The first terminal displays the target user interface of the camera application on the display screen. The target user interface contains a "posture recommendation mode" control. The trigger gesture recommendation mode can enable the first terminal to execute the image processing method provided in the embodiment of the present application.
其中,目标用户界面,可以是相机应用启动后的首个用户界面,也可以是相机应用启动后的非首个用户界面。例如,在相机应用启动后,且显示该用户界面之前,用户可以选择是否打开闪光等,从而使得目标用户界面并非启动后的首个用户界面。The target user interface may be the first user interface after the camera application is started, or it may be the non-first user interface after the camera application is started. For example, after the camera application is started and before the user interface is displayed, the user can choose whether to turn on the flash, etc., so that the target user interface is not the first user interface after startup.
S204:用户(可以是拍摄者或被拍摄者等任一用户)向第一终端发出第三操作。第三操作是作用于姿势推荐模式控件。第三操作可以是用户发出的触屏操作等。S204: The user (which may be any user such as the photographer or the photographed person) sends a third operation to the first terminal. The third operation is to act on the gesture recommendation mode control. The third operation may be a touch screen operation issued by the user.
S205:第一终端接收第三操作。响应于第三操作,第一终端进入姿势推荐模式。接着执行以下S206。S205: The first terminal receives the third operation. In response to the third operation, the first terminal enters a gesture recommendation mode. Then, the following S206 is executed.
针对上述S203~S205,可替换地,第一终端可以不在第一终端上显示上述目标用户界面(即包含由姿势推荐模式空间的目标用户界面),而是由第一终端在启动相机应用之后,自动进入姿势推荐模式,接着执行以下S206。Regarding the foregoing S203 to S205, alternatively, the first terminal may not display the foregoing target user interface (that is, the target user interface containing the mode space recommended by the gesture) on the first terminal, but after the first terminal starts the camera application, It automatically enters the posture recommendation mode, and then executes the following S206.
S206:第一终端执行上述步骤S101~S105。S206: The first terminal executes the foregoing steps S101 to S105.
此步骤结束之后,第一终端上显示有第二预览图像,且第二预览图像中显示由目 标参考姿势。其中,第二预览图像中被拍摄者的姿势是第二姿势。可以理解的,第一终端上会实时地采集当前拍摄场景的实际图像,并基于实际图像生成一帧一帧的第二预览图像并显示,从而形式显示预览图像流的效果,且一帧或多帧(如每帧)第二预览图像中均显示有目标参考姿势。After this step is completed, a second preview image is displayed on the first terminal, and the target reference posture is displayed in the second preview image. Wherein, the posture of the subject in the second preview image is the second posture. It is understandable that the first terminal will collect the actual image of the current shooting scene in real time, and based on the actual image, generate and display a second preview image of frame by frame, thereby displaying the effect of the preview image stream, and one or more frames The target reference posture is displayed in the second preview image of each frame (for example, each frame).
S207:被拍摄者基于第二预览图像中显示的目标参考姿势调整当前姿势。S207: The subject adjusts the current posture based on the target reference posture displayed in the second preview image.
在一种实现方式中,拍摄者基于第一终端上显示的第二预览图像,以及第二预览图像中显示的目标参考姿势,指导被拍摄者调整当前姿势。In an implementation manner, the photographer instructs the photographer to adjust the current posture based on the second preview image displayed on the first terminal and the target reference posture displayed in the second preview image.
在另一种实现方式中,第一终端可以基于上述步骤1~步骤2,将第二预览图像和目标参考姿势显示在第二终端的显示屏上。被拍摄者通过查看第二终端的显示屏上显示的第二预览图像,以及第二预览图像中显示的目标参考姿势,调整当前姿势。In another implementation manner, the first terminal may display the second preview image and the target reference posture on the display screen of the second terminal based on the above steps 1 to 2. The photographer adjusts the current posture by viewing the second preview image displayed on the display screen of the second terminal and the target reference posture displayed in the second preview image.
S208:如果目标参考姿势与第二姿势匹配,则第一终端基于第二预览图像生成目标图像。后续,第一终端可以保存目标图像。S208: If the target reference posture matches the second posture, the first terminal generates the target image based on the second preview image. Subsequently, the first terminal may save the target image.
该步骤中的第二预览图像可以是S207中的任意一帧第二预览图像,相应的,第二姿势是该第二预览图像中显示的被拍摄者的姿势。The second preview image in this step may be any frame of the second preview image in S207, and correspondingly, the second posture is the posture of the subject displayed in the second preview image.
关于S208的具体实现方式可以参考上文,此处不再赘述。For the specific implementation of S208, please refer to the above, which will not be repeated here.
如图11所示,为本申请实施例提供的一种拍照效果对比示意图。其中,图11中的a图表示第一预览图像,该照片效果一般。图11中的b图表示基于“满足第二姿势与目标参考姿势匹配的第二预览图像”得到的目标图像。显然,通常情况下,用户会认为相比第一预览图像,目标图像中的人体姿势更优美更自然。As shown in FIG. 11, it is a schematic diagram of a comparison of photographing effects provided by an embodiment of this application. Wherein, the diagram a in FIG. 11 represents the first preview image, and the effect of the photo is average. Diagram b in FIG. 11 represents a target image obtained based on "a second preview image that satisfies the second posture to match the target reference posture". Obviously, under normal circumstances, the user will think that the posture of the human body in the target image is more graceful and natural compared to the first preview image.
可以理解的是,为了实现上述实施例中功能,终端包括了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本申请中所公开的实施例描述的各示例的单元及方法步骤,本申请能够以硬件或硬件和计算机软件相结合的形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用场景和设计约束条件。It can be understood that, in order to implement the functions in the foregoing embodiments, the terminal includes hardware structures and/or software modules corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and method steps of the examples described in the embodiments disclosed in the present application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application scenarios and design constraints of the technical solution.
图12包含本申请的实施例提供的可能的图像处理装置的结构示意图。这些图像处理装置可以用于实现上述方法实施例中终端的功能,因此也能实现上述方法实施例所具备的有益效果。在本申请的实施例中,该图像处理装置可以是如图1所示的终端100,还可以是应用于终端的模块(如芯片)。下文中以该图像处理装置是终端11为例进行说明。FIG. 12 contains a schematic structural diagram of a possible image processing device provided by an embodiment of the present application. These image processing apparatuses can be used to implement the functions of the terminal in the foregoing method embodiments, and therefore can also achieve the beneficial effects of the foregoing method embodiments. In the embodiment of the present application, the image processing apparatus may be the terminal 100 as shown in FIG. 1, or may be a module (such as a chip) applied to the terminal. In the following, the image processing apparatus is the terminal 11 as an example for description.
终端11包括:显示单元111、确定单元112和生成单元113。显示单元111,用于显示当前拍摄场景的第一预览图像,第一预览图像包括被拍摄者在第一姿势下的第一人像。确定单元112,用于对第一预览图像进行识别,以确定当前拍摄场景的场景类别。显示单元111,还用于显示当前拍摄场景下的第二预览图像,并在第二预览图像中显示目标参考姿势;目标参考姿势至少是基于当前拍摄场景的场景类别得到的;其中,第二预览图像包括被拍摄者在第二姿势下的第二人像。生成单元113,用于如果第二姿势与目标参考姿势匹配,则根据第二预览图像生成目标图像。例如,结合图3,显示单元111可以用于执行S101和S105。确定单元112可以用于执行S102。生成单元113可以用于执行S106。The terminal 11 includes: a display unit 111, a determination unit 112, and a generation unit 113. The display unit 111 is configured to display a first preview image of a current shooting scene, and the first preview image includes a first portrait of the photographed person in a first posture. The determining unit 112 is configured to recognize the first preview image to determine the scene category of the current shooting scene. The display unit 111 is further configured to display a second preview image in the current shooting scene, and display the target reference pose in the second preview image; the target reference pose is obtained at least based on the scene category of the current shooting scene; wherein, the second preview The image includes a second portrait of the subject in the second posture. The generating unit 113 is configured to generate a target image according to the second preview image if the second posture matches the target reference posture. For example, in conjunction with FIG. 3, the display unit 111 may be used to perform S101 and S105. The determining unit 112 may be used to perform S102. The generating unit 113 may be used to perform S106.
可选的,目标参考姿势与第一姿势满足如下至少一种条件:目标参考姿势与第一 姿势不同;目标参考姿势在第二预览图像中的相对位置,与第一姿势在第一预览图像中的相对位置不同;或者,目标参考姿势在第二预览图像中所占的大小,与第一姿势在第一预览图像中所占的大小不同。Optionally, the target reference posture and the first posture meet at least one of the following conditions: the target reference posture is different from the first posture; the relative position of the target reference posture in the second preview image is different from the first posture in the first preview image The relative position of is different; or, the size of the target reference posture in the second preview image is different from the size of the first posture in the first preview image.
可选的,当前拍摄场景的场景类别包括以下类别中的至少一项:草地场景、台阶场景、海边场景、夕阳场景、马路场景、或塔场景。Optionally, the scene category of the current shooting scene includes at least one of the following categories: grass scene, step scene, seaside scene, sunset scene, road scene, or tower scene.
可选的,目标参考姿势的姿势类别是基于第一姿势的姿势类别得到的;其中,姿势类别包括坐姿、站姿或卧姿。Optionally, the posture category of the target reference posture is obtained based on the posture category of the first posture; wherein the posture category includes a sitting posture, a standing posture, or a lying posture.
可选的,目标参考姿势是与当前拍摄场景的类别对应的多个参考姿势中的,与第一姿势之间的相似度大于等于第一阈值的参考姿势。Optionally, the target reference posture is a reference posture whose similarity with the first posture is greater than or equal to a first threshold among multiple reference postures corresponding to the category of the current shooting scene.
可选的,目标参考姿势是与当前拍摄场景的类别对应的多个参考姿势中的,与第一姿势之间的相似度最高的参考姿势。Optionally, the target reference pose is the reference pose with the highest similarity to the first pose among multiple reference poses corresponding to the category of the current shooting scene.
可选的,目标参考姿势在第二预览图像中的位置,是基于第一预览图像中的第一预设对象在第一预览图像中的位置确定的。其中,目标参考姿势中的第一局部姿势与第一预设对象在同一图像中的位置之间具有第一关联关系,第一关联关系是预定义或者实时确定的。Optionally, the position of the target reference posture in the second preview image is determined based on the position of the first preset object in the first preview image in the first preview image. Wherein, the first local posture in the target reference posture and the position of the first preset object in the same image have a first association relationship, and the first association relationship is predefined or determined in real time.
可选的,目标参考姿势在第二预览图像中所占的大小,是基于第一预览图像中的第二预设对象在第一预览图像中所占的大小确定的。其中,目标参考姿势与第二预设对象在同一图像中的大小之间具有第二关联关系,第二关联关系是预定义或者实时确定的。Optionally, the size occupied by the target reference posture in the second preview image is determined based on the size occupied by the second preset object in the first preview image in the first preview image. There is a second association relationship between the target reference posture and the size of the second preset object in the same image, and the second association relationship is predefined or determined in real time.
可选的,显示单元111具体用于,在第二预览图像中以人体骨架或人体轮廓显示目标参考姿势。例如,结合图4,显示单元11可以显示图4所示的目标参考姿势。Optionally, the display unit 111 is specifically configured to display the target reference posture in the second preview image with a human skeleton or a human contour. For example, in conjunction with FIG. 4, the display unit 11 may display the target reference posture shown in FIG. 4.
可选的,目标参考姿势的信息是终端自身确定的,或者是终端从网络设备中获取的。Optionally, the target reference posture information is determined by the terminal itself, or the terminal obtains it from a network device.
可选的,显示单元111具体用于:如果当前拍摄场景的场景类别包括多种场景类别,则在第二预览图像中显示多个目标参考姿势;其中,场景类别与目标参考状态一一对应。生成单元113具体用于:如果第二姿势与多个目标参考姿势中的任意一个目标参考姿势匹配,则根据第二预览图像生成目标图像。Optionally, the display unit 111 is specifically configured to: if the scene category of the current shooting scene includes multiple scene categories, display multiple target reference poses in the second preview image; wherein the scene category corresponds to the target reference state one-to-one. The generating unit 113 is specifically configured to generate a target image according to the second preview image if the second posture matches any one of the multiple target reference postures.
可选的,终端11还包括:发送单元114,用于向第二终端发送目标参考姿势的信息和第二预览图像的信息,以指示第二终端显示第二预览图像,并在第二预览图像中显示目标参考姿势。例如,结合图7,发送单元114可以用于执行步骤1。第二终端可以用于执行步骤2。Optionally, the terminal 11 further includes: a sending unit 114, configured to send information about the target reference pose and information about the second preview image to the second terminal, so as to instruct the second terminal to display the second preview image, and display the second preview image on the second terminal. The target reference posture is displayed in. For example, with reference to FIG. 7, the sending unit 114 may be used to perform step 1. The second terminal can be used to perform step 2.
可选的,显示单元111还用于,在第二预览图像中显示当前拍摄场景的类别信息。Optionally, the display unit 111 is further configured to display category information of the current shooting scene in the second preview image.
可选的,不同的场景类别通过不同预定义对象组来表征;如果第一预览图像包含一个预定义对象组,则当前拍摄场景的场景类别是预定义对象组所表征的场景类别;如果第一预览图像包含多个预定义对象组,则当前拍摄场景的场景类别是多个预定义对象组所表征的部分或全部场景类别。Optionally, different scene categories are characterized by different predefined object groups; if the first preview image contains a predefined object group, the scene category of the current shooting scene is the scene category represented by the predefined object group; if the first preview image contains a predefined object group The preview image contains multiple predefined object groups, and the scene category of the current shooting scene is part or all of the scene categories represented by the multiple predefined object groups.
可选的,第一人像占第一预览图像的比例大于等于第二阈值;或者,第一人像的像素点的个数大于等于第三阈值。Optionally, the proportion of the first portrait in the first preview image is greater than or equal to the second threshold; or, the number of pixels of the first portrait is greater than or equal to the third threshold.
可选的,终端11还包括:输出单元115,用于如果第二姿势与目标参考姿势匹配, 则输出提示信息,提示信息用于提示第二姿势与目标参考姿势匹配。接收单元116,用于接收第一操作。生成单元113具体用于,响应于第一操作,根据第二预览图像生成目标图像。例如,结合图9,输出单元115可以用于执行S106A,接收单元116可以用于执行S106B,生成单元116可以用于执行S106C。Optionally, the terminal 11 further includes: an output unit 115, configured to output prompt information if the second posture matches the target reference posture, and the prompt information is used to prompt that the second posture matches the target reference posture. The receiving unit 116 is configured to receive the first operation. The generating unit 113 is specifically configured to generate the target image according to the second preview image in response to the first operation. For example, with reference to FIG. 9, the output unit 115 may be used to perform S106A, the receiving unit 116 may be used to perform S106B, and the generating unit 116 may be used to perform S106C.
可选的,确定单元112还用于,如果第二姿势与目标参考姿势的相似度大于等于第四阈值,则确定第二姿势与目标参考姿势匹配。Optionally, the determining unit 112 is further configured to, if the similarity between the second posture and the target reference posture is greater than or equal to a fourth threshold, determine that the second posture matches the target reference posture.
可选的,终端11还包括:计算单元117。Optionally, the terminal 11 further includes: a calculation unit 117.
在一种实现方式中,计算单元117用于计算第一向量和第二向量;其中,第一向量是第二人像中的关键点相对角度信息构成的向量,用于表征第二姿势;第二向量是目标参考姿势下的人像中的关键点相对角度信息构成的向量,用于表征目标参考姿势。以及,计算第一向量与第二向量之间的距离。确定单元112还用于,如果距离小于等于第五阈值,则确定第二姿势与目标参考姿势的相似度大于等于第四阈值。In one implementation, the calculation unit 117 is used to calculate the first vector and the second vector; where the first vector is a vector formed by the relative angle information of the key points in the second portrait, and is used to represent the second posture; The vector is a vector formed by the relative angle information of the key points in the portrait in the target reference pose, and is used to characterize the target reference pose. And, calculate the distance between the first vector and the second vector. The determining unit 112 is further configured to, if the distance is less than or equal to the fifth threshold, determine that the similarity between the second posture and the target reference posture is greater than or equal to the fourth threshold.
在另一种实现方式中,计算单元117,用于将第二姿势和目标参考姿势输入神经网络,得到第二姿势与目标参考姿势之间的相似度;其中,神经网络用于表征输入的多种姿势之间的相似度。In another implementation manner, the calculation unit 117 is configured to input the second posture and the target reference posture into the neural network to obtain the similarity between the second posture and the target reference posture; wherein the neural network is used to represent the amount of input. The similarity between different postures.
关于上述可选方式的具体描述可以参见前述的方法实施例,此处不再赘述。此外,上述提供的任一种图像处理装置11的解释以及有益效果的描述均可参考上述对应的方法实施例,不再赘述。For specific descriptions of the foregoing optional manners, reference may be made to the foregoing method embodiments, and details are not described herein again. In addition, the explanation and the description of the beneficial effects of any of the image processing apparatuses 11 provided above can refer to the corresponding method embodiments described above, and will not be repeated.
作为示例,结合图1,上述显示单元111的功能可以通过显示屏194实现。上述确定单元112、生成单元113和计算单元117中的任意一个单元的功能,均可以通过处理器110调用存储内部存储器121中的程度代码实现。上述发送单元114可以通过移动通信模块150或无线通信模块160的功能,并结合其所连接的天线等实现。上述输出单元115可以通过显示屏114或扬声器170A等用于输出信息的器件实现。上述接收单元116可以通过显示屏、麦克风170C等用于输入信息的器件实现。As an example, with reference to FIG. 1, the functions of the above-mentioned display unit 111 may be implemented through the display screen 194. The function of any one of the above-mentioned determining unit 112, generating unit 113, and calculating unit 117 can be implemented by calling the degree code stored in the internal memory 121 by the processor 110. The above-mentioned sending unit 114 can be realized by the functions of the mobile communication module 150 or the wireless communication module 160 in combination with the antenna connected thereto. The above-mentioned output unit 115 may be implemented by a device for outputting information, such as the display screen 114 or the speaker 170A. The above-mentioned receiving unit 116 may be implemented by a device for inputting information, such as a display screen, a microphone 170C, and the like.
本申请另一实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当指令在终端执行上述方法实施例所示的方法流程中该终端执行的各个步骤。Another embodiment of the present application further provides a computer-readable storage medium that stores instructions in the computer-readable storage medium. When the instructions are executed on a terminal, each step executed by the terminal in the method flow shown in the foregoing method embodiment is performed.
在一些实施例中,所公开的方法可以实施为以机器可读格式被编码在计算机可读存储介质上的或者被编码在其它非瞬时性介质或者制品上的计算机程序指令。In some embodiments, the disclosed methods may be implemented as computer program instructions encoded on a computer-readable storage medium in a machine-readable format or encoded on other non-transitory media or articles.
应该理解,这里描述的布置仅仅是用于示例的目的。因而,本领域技术人员将理解,其它布置和其它元素(例如,机器、接口、功能、顺序、和功能组等等)能够被取而代之地使用,并且一些元素可以根据所期望的结果而一并省略。另外,所描述的元素中的许多是可以被实现为离散的或者分布式的组件的、或者以任何适当的组合和位置来结合其它组件实施的功能实体。It should be understood that the arrangement described here is for illustrative purposes only. Thus, those skilled in the art will understand that other arrangements and other elements (for example, machines, interfaces, functions, sequences, and functional groups, etc.) can be used instead, and some elements can be omitted altogether depending on the desired result . In addition, many of the described elements are functional entities that can be implemented as discrete or distributed components, or combined with other components in any appropriate combination and position.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机执行指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读 存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer execution instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from a website, computer, server, or data center through a cable (such as Coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer, or may include one or more data storage devices such as a server or a data center that can be integrated with the medium. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention. It should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (39)

  1. 一种图像处理方法,其特征在于,应用于第一终端,所述方法包括:An image processing method, characterized in that it is applied to a first terminal, and the method includes:
    显示当前拍摄场景的第一预览图像,所述第一预览图像包括被拍摄者在第一姿势下的第一人像;Displaying a first preview image of the current shooting scene, where the first preview image includes a first portrait of the subject in the first posture;
    对所述第一预览图像进行识别,以确定所述当前拍摄场景的场景类别;Recognizing the first preview image to determine the scene category of the current shooting scene;
    显示所述当前拍摄场景下的第二预览图像,并在所述第二预览图像中显示目标参考姿势;所述目标参考姿势至少是基于所述当前拍摄场景的场景类别得到的;其中,所述第二预览图像包括所述被拍摄者在第二姿势下的第二人像;Display the second preview image in the current shooting scene, and display the target reference pose in the second preview image; the target reference pose is obtained at least based on the scene category of the current shooting scene; wherein, the The second preview image includes a second portrait of the subject in the second posture;
    如果所述第二姿势与所述目标参考姿势匹配,则根据所述第二预览图像生成目标图像。If the second posture matches the target reference posture, a target image is generated according to the second preview image.
  2. 根据权利要求1所述的方法,其特征在于,所述目标参考姿势与所述第一姿势满足如下至少一种条件:The method according to claim 1, wherein the target reference posture and the first posture satisfy at least one of the following conditions:
    所述目标参考姿势与所述第一姿势不同;The target reference posture is different from the first posture;
    所述目标参考姿势在所述第二预览图像中的相对位置,与所述第一姿势在所述第一预览图像中的相对位置不同;The relative position of the target reference posture in the second preview image is different from the relative position of the first posture in the first preview image;
    或者,所述目标参考姿势在所述第二预览图像中所占的大小,与所述第一姿势在所述第一预览图像中所占的大小不同。Alternatively, the size occupied by the target reference posture in the second preview image is different from the size occupied by the first posture in the first preview image.
  3. 根据权利要求1或2所述的方法,其特征在于,所述当前拍摄场景的场景类别包括以下类别中的至少一项:草地场景、台阶场景、海边场景、夕阳场景、马路场景、或塔场景。The method according to claim 1 or 2, wherein the scene category of the current shooting scene includes at least one of the following categories: grass scene, step scene, seaside scene, sunset scene, road scene, or tower scene .
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述目标参考姿势的姿势类别与所述第一姿势的姿势类别一致;其中,所述姿势类别包括坐姿、站姿或卧姿。The method according to any one of claims 1 to 3, wherein the posture category of the target reference posture is consistent with the posture category of the first posture; wherein the posture category includes a sitting posture, a standing posture, or a lying posture. posture.
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述目标参考姿势是与所述当前拍摄场景的类别对应的多个参考姿势中的,与所述第一姿势之间的相似度大于等于第一阈值的参考姿势。The method according to any one of claims 1 to 4, wherein the target reference posture is one of a plurality of reference postures corresponding to the category of the current shooting scene, which is between the first posture and the target posture. The reference posture whose similarity is greater than or equal to the first threshold.
  6. 根据权利要求1至4任一项所述的方法,其特征在于,所述目标参考姿势是与所述当前拍摄场景的类别对应的多个参考姿势中的,与所述第一姿势之间的相似度最高的参考姿势。The method according to any one of claims 1 to 4, wherein the target reference posture is one of a plurality of reference postures corresponding to the category of the current shooting scene, which is between the first posture and the target posture. The reference pose with the highest similarity.
  7. 根据权利要求1至6任一项所述的方法,其特征在于,The method according to any one of claims 1 to 6, characterized in that,
    所述目标参考姿势在所述第二预览图像中的位置,是基于所述第一预览图像中的第一预设对象在所述第一预览图像中的位置确定的;The position of the target reference posture in the second preview image is determined based on the position of the first preset object in the first preview image in the first preview image;
    其中,所述目标参考姿势中的第一局部姿势与所述第一预设对象在同一图像中的位置之间具有第一关联关系,所述第一关联关系是预定义或者实时确定的。Wherein, the first local posture in the target reference posture and the position of the first preset object in the same image have a first association relationship, and the first association relationship is predefined or determined in real time.
  8. 根据权利要求1至7任一项所述的方法,其特征在于,The method according to any one of claims 1 to 7, characterized in that:
    所述目标参考姿势在所述第二预览图像中所占的大小,是基于所述第一预览图像中的第二预设对象在所述第一预览图像中所占的大小确定的;The size occupied by the target reference pose in the second preview image is determined based on the size occupied by the second preset object in the first preview image in the first preview image;
    其中,所述目标参考姿势与所述第二预设对象在同一图像中的大小之间具有第二关联关系,所述第二关联关系是预定义或者实时确定的。Wherein, there is a second association relationship between the target reference posture and the size of the second preset object in the same image, and the second association relationship is predefined or determined in real time.
  9. 根据权利要求1至8任一项所述的方法,其特征在于,在所述第二预览图像中 显示目标参考姿势,包括:The method according to any one of claims 1 to 8, wherein displaying the target reference pose in the second preview image comprises:
    在所述第二预览图像中以人体骨架或人体轮廓方式显示所述目标参考姿势。The target reference posture is displayed in the form of a human skeleton or a human contour in the second preview image.
  10. 根据权利要求1至9任一项所述的方法,其特征在于,所述目标参考姿势的信息是所述第一终端自身确定的,或者是所述第一终端从网络设备中获取的。The method according to any one of claims 1 to 9, wherein the information of the target reference posture is determined by the first terminal itself, or obtained by the first terminal from a network device.
  11. 根据权利要求1至10任一项所述的方法,其特征在于,所述在所述第二预览图像中显示目标参考姿势,包括:The method according to any one of claims 1 to 10, wherein the displaying the target reference posture in the second preview image comprises:
    如果所述当前拍摄场景的场景类别包括多种场景类别,则在所述第二预览图像中显示多个目标参考姿势;其中,场景类别与目标参考状态一一对应;If the scene category of the current shooting scene includes multiple scene categories, display multiple target reference poses in the second preview image; wherein, the scene category corresponds to the target reference state one-to-one;
    所述如果所述第二姿势与所述目标参考姿势匹配,则根据所述第二预览图像生成目标图像,包括:If the second posture matches the target reference posture, generating a target image according to the second preview image includes:
    如果所述第二姿势与所述多个目标参考姿势中的任意一个目标参考姿势匹配,则根据所述第二预览图像生成目标图像。If the second posture matches any one of the multiple target reference postures, a target image is generated according to the second preview image.
  12. 根据权利要求1至11任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 11, wherein the method further comprises:
    向第二终端发送所述目标参考姿势的信息和所述第二预览图像的信息,以指示所述第二终端显示所述第二预览图像,并在所述第二预览图像中显示所述目标参考姿势。Send the information of the target reference posture and the information of the second preview image to the second terminal to instruct the second terminal to display the second preview image, and display the target in the second preview image Reference posture.
  13. 根据权利要求1至12任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 12, wherein the method further comprises:
    在所述第二预览图像中显示所述当前拍摄场景的类别信息。The category information of the current shooting scene is displayed in the second preview image.
  14. 根据权利要求1至13任一项所述的方法,其特征在于,不同的场景类别通过不同预定义对象组来表征;The method according to any one of claims 1 to 13, wherein different scene categories are characterized by different predefined object groups;
    如果所述第一预览图像包含一个预定义对象组,则所述当前拍摄场景的场景类别是所述预定义对象组所表征的场景类别;If the first preview image contains a predefined object group, the scene category of the current shooting scene is the scene category represented by the predefined object group;
    如果所述第一预览图像包含多个预定义对象组,则所述当前拍摄场景的场景类别是所述多个预定义对象组所表征的部分或全部场景类别。If the first preview image contains multiple predefined object groups, the scene category of the current shooting scene is part or all of the scene categories represented by the multiple predefined object groups.
  15. 根据权利要求1至14任一项所述的方法,其特征在于,The method according to any one of claims 1 to 14, characterized in that,
    所述第一人像占所述第一预览图像的比例大于等于第二阈值;The proportion of the first portrait in the first preview image is greater than or equal to a second threshold;
    或者,所述第一人像的像素点的个数大于等于第三阈值。Alternatively, the number of pixels of the first portrait is greater than or equal to the third threshold.
  16. 根据权利要求1至15任一项所述的方法,其特征在于,如果所述第二姿势与所述目标参考姿势匹配,则根据所述第二预览图像生成目标图像,包括:The method according to any one of claims 1 to 15, wherein if the second posture matches the target reference posture, generating a target image according to the second preview image comprises:
    如果所述第二姿势与所述目标参考姿势匹配,则输出提示信息,所述提示信息用于提示所述第二姿势与所述目标参考姿势匹配;If the second posture matches the target reference posture, output prompt information, where the prompt information is used to prompt that the second posture matches the target reference posture;
    接收第一操作;Receive the first operation;
    响应于所述第一操作,根据所述第二预览图像生成目标图像。In response to the first operation, a target image is generated based on the second preview image.
  17. 根据权利要求1至16任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 16, wherein the method further comprises:
    如果所述第二姿势与所述目标参考姿势的相似度大于等于第四阈值,则确定所述第二姿势与所述目标参考姿势匹配。If the similarity between the second posture and the target reference posture is greater than or equal to a fourth threshold, it is determined that the second posture matches the target reference posture.
  18. 根据权利要求17所述的方法,其特征在于,所述方法包括:The method according to claim 17, wherein the method comprises:
    计算第一向量和第二向量;其中,所述第一向量是所述第二人像中的关键点相对角度信息构成的向量,用于表征所述第二姿势;所述第二向量是所述目标参考姿势下的人像中的关键点相对角度信息构成的向量,用于表征所述目标参考姿势;Calculate the first vector and the second vector; wherein, the first vector is a vector formed by the relative angle information of key points in the second portrait, and is used to characterize the second posture; the second vector is the The vector formed by the relative angle information of the key points in the portrait in the target reference pose is used to characterize the target reference pose;
    计算所述第一向量与所述第二向量之间的距离;Calculating the distance between the first vector and the second vector;
    如果所述距离小于等于第五阈值,则确定所述第二姿势与所述目标参考姿势的相似度大于等于所述第四阈值。If the distance is less than or equal to the fifth threshold, it is determined that the similarity between the second posture and the target reference posture is greater than or equal to the fourth threshold.
  19. 根据权利要求17所述的方法,其特征在于,所述方法还包括:The method according to claim 17, wherein the method further comprises:
    将所述第二姿势和所述目标参考姿势输入神经网络,得到所述第二姿势与所述目标参考姿势之间的相似度;其中,所述神经网络用于表征输入的多种姿势之间的相似度。Input the second posture and the target reference posture into a neural network to obtain the similarity between the second posture and the target reference posture; wherein, the neural network is used to characterize the difference between the input multiple postures的similarity.
  20. 一种终端,其特征在于,所述终端包括:显示单元、确定单元和生成单元;A terminal, characterized in that the terminal includes: a display unit, a determining unit, and a generating unit;
    所述显示单元,用于显示当前拍摄场景的第一预览图像,所述第一预览图像包括被拍摄者在第一姿势下的第一人像;The display unit is configured to display a first preview image of a current shooting scene, the first preview image including a first portrait of the subject in a first posture;
    所述确定单元,用于对所述第一预览图像进行识别,以确定所述当前拍摄场景的场景类别;The determining unit is configured to recognize the first preview image to determine the scene category of the current shooting scene;
    所述显示单元,还用于显示所述当前拍摄场景下的第二预览图像,并在所述第二预览图像中显示目标参考姿势;所述目标参考姿势至少是基于所述当前拍摄场景的场景类别得到的;其中,所述第二预览图像包括所述被拍摄者在第二姿势下的第二人像;The display unit is further configured to display a second preview image in the current shooting scene, and display a target reference pose in the second preview image; the target reference pose is at least a scene based on the current shooting scene Category obtained; wherein, the second preview image includes a second portrait of the subject in a second pose;
    所述生成单元,用于如果所述第二姿势与所述目标参考姿势匹配,则根据所述第二预览图像生成目标图像。The generating unit is configured to generate a target image according to the second preview image if the second posture matches the target reference posture.
  21. 根据权利要求20所述的终端,其特征在于,所述目标参考姿势与所述第一姿势满足如下至少一种条件:The terminal according to claim 20, wherein the target reference posture and the first posture satisfy at least one of the following conditions:
    所述目标参考姿势与所述第一姿势不同;The target reference posture is different from the first posture;
    所述目标参考姿势在所述第二预览图像中的相对位置,与所述第一姿势在所述第一预览图像中的相对位置不同;The relative position of the target reference posture in the second preview image is different from the relative position of the first posture in the first preview image;
    或者,所述目标参考姿势在所述第二预览图像中所占的大小,与所述第一姿势在所述第一预览图像中所占的大小不同。Alternatively, the size occupied by the target reference posture in the second preview image is different from the size occupied by the first posture in the first preview image.
  22. 根据权利要求20或21所述的终端,其特征在于,所述当前拍摄场景的场景类别包括以下类别中的至少一项:草地场景、台阶场景、海边场景、夕阳场景、马路场景、或塔场景。The terminal according to claim 20 or 21, wherein the scene category of the current shooting scene includes at least one of the following categories: grass scene, step scene, seaside scene, sunset scene, road scene, or tower scene .
  23. 根据权利要求20至22任一项所述的终端,其特征在于,所述目标参考姿势的姿势类别与所述第一姿势的姿势类别一致;其中,所述姿势类别包括坐姿、站姿或卧姿。The terminal according to any one of claims 20 to 22, wherein the posture category of the target reference posture is consistent with the posture category of the first posture; wherein the posture category includes a sitting posture, a standing posture, or a lying posture. posture.
  24. 根据权利要求20至23任一项所述的终端,其特征在于,所述目标参考姿势是与所述当前拍摄场景的类别对应的多个参考姿势中的,与所述第一姿势之间的相似度大于等于第一阈值的参考姿势。The terminal according to any one of claims 20 to 23, wherein the target reference posture is one of a plurality of reference postures corresponding to the category of the current shooting scene and the one between the first posture and the first posture. The reference posture whose similarity is greater than or equal to the first threshold.
  25. 根据权利要求20至23任一项所述的终端,其特征在于,所述目标参考姿势是与所述当前拍摄场景的类别对应的多个参考姿势中的,与所述第一姿势之间的相似度最高的参考姿势。The terminal according to any one of claims 20 to 23, wherein the target reference posture is one of a plurality of reference postures corresponding to the category of the current shooting scene and the one between the first posture and the first posture. The reference pose with the highest similarity.
  26. 根据权利要求20至25任一项所述的终端,其特征在于,The terminal according to any one of claims 20 to 25, wherein:
    所述目标参考姿势在所述第二预览图像中的位置,是基于所述第一预览图像中的第一预设对象在所述第一预览图像中的位置确定的;The position of the target reference posture in the second preview image is determined based on the position of the first preset object in the first preview image in the first preview image;
    其中,所述目标参考姿势中的局部姿势与所述第一预设对象在同一图像中的位置之间具有第一关联关系,所述第一关联关系是预定义或者实时确定的。Wherein, the local posture in the target reference posture has a first association relationship with the position of the first preset object in the same image, and the first association relationship is predefined or determined in real time.
  27. 根据权利要求20至26任一项所述的终端,其特征在于,The terminal according to any one of claims 20 to 26, wherein:
    所述目标参考姿势在所述第二预览图像中所占的大小,是基于所述第一预览图像中的第二预设对象在所述第一预览图像中所占的大小确定的;The size occupied by the target reference pose in the second preview image is determined based on the size occupied by the second preset object in the first preview image in the first preview image;
    其中,所述目标参考姿势与所述第二预设对象在同一图像中的大小之间具有第二关联关系,所述第二关联关系是预定义或者实时确定的。Wherein, there is a second association relationship between the target reference posture and the size of the second preset object in the same image, and the second association relationship is predefined or determined in real time.
  28. 根据权利要求20至27任一项所述的终端,其特征在于,The terminal according to any one of claims 20 to 27, wherein:
    所述显示单元具体用于,在所述第二预览图像中以人体骨架或人体轮廓显示所述目标参考姿势。The display unit is specifically configured to display the target reference posture in the second preview image with a human skeleton or a human contour.
  29. 根据权利要求20至28任一项所述的终端,其特征在于,所述目标参考姿势的信息是所述终端自身确定的,或者是所述终端从网络设备中获取的。The terminal according to any one of claims 20 to 28, wherein the target reference posture information is determined by the terminal itself, or acquired by the terminal from a network device.
  30. 根据权利要求20至29任一项所述的终端,其特征在于,The terminal according to any one of claims 20 to 29, wherein:
    所述显示单元具体用于:如果所述当前拍摄场景的场景类别包括多种场景类别,则在所述第二预览图像中显示多个目标参考姿势;其中,场景类别与目标参考状态一一对应;The display unit is specifically configured to: if the scene category of the current shooting scene includes multiple scene categories, display multiple target reference poses in the second preview image; wherein the scene category corresponds to the target reference state one-to-one ;
    所述生成单元具体用于:如果所述第二姿势与所述多个目标参考姿势中的任意一个目标参考姿势匹配,则根据所述第二预览图像生成目标图像。The generating unit is specifically configured to generate a target image according to the second preview image if the second posture matches any one of the multiple target reference postures.
  31. 根据权利要求20至30任一项所述的终端,其特征在于,所述终端还包括:The terminal according to any one of claims 20 to 30, wherein the terminal further comprises:
    发送单元,用于向第二终端发送所述目标参考姿势的信息和所述第二预览图像的信息,以指示所述第二终端显示所述第二预览图像,并在所述第二预览图像中显示所述目标参考姿势。The sending unit is configured to send the information of the target reference posture and the information of the second preview image to the second terminal, so as to instruct the second terminal to display the second preview image, and display the information on the second preview image. The target reference posture is displayed in.
  32. 根据权利要求20至31任一项所述的终端,其特征在于,The terminal according to any one of claims 20 to 31, wherein:
    所述显示单元还用于,在所述第二预览图像中显示所述当前拍摄场景的类别信息。The display unit is further configured to display category information of the current shooting scene in the second preview image.
  33. 根据权利要求20至32任一项所述的终端,其特征在于,不同的场景类别通过不同预定义对象组来表征;The terminal according to any one of claims 20 to 32, wherein different scene categories are characterized by different predefined object groups;
    如果所述第一预览图像包含一个预定义对象组,则所述当前拍摄场景的场景类别是所述预定义对象组所表征的场景类别;If the first preview image contains a predefined object group, the scene category of the current shooting scene is the scene category represented by the predefined object group;
    如果所述第一预览图像包含多个预定义对象组,则所述当前拍摄场景的场景类别是所述多个预定义对象组所表征的部分或全部场景类别。If the first preview image contains multiple predefined object groups, the scene category of the current shooting scene is part or all of the scene categories represented by the multiple predefined object groups.
  34. 根据权利要求20至33任一项所述的终端,其特征在于,The terminal according to any one of claims 20 to 33, wherein:
    所述第一人像占所述第一预览图像的比例大于等于第二阈值;The proportion of the first portrait in the first preview image is greater than or equal to a second threshold;
    或者,所述第一人像的像素点的个数大于等于第三阈值。Alternatively, the number of pixels of the first portrait is greater than or equal to the third threshold.
  35. 根据权利要求20至34任一项所述的终端,其特征在于,所述终端还包括:The terminal according to any one of claims 20 to 34, wherein the terminal further comprises:
    输出单元,用于如果所述第二姿势与所述目标参考姿势匹配,则输出提示信息,所述提示信息用于提示所述第二姿势与所述目标参考姿势匹配;An output unit, configured to output prompt information if the second posture matches the target reference posture, where the prompt information is used to prompt that the second posture matches the target reference posture;
    接收单元,用于接收第一操作;A receiving unit for receiving the first operation;
    所述生成单元具体用于,响应于所述第一操作,根据所述第二预览图像生成目标图像。The generating unit is specifically configured to generate a target image according to the second preview image in response to the first operation.
  36. 根据权利要求20至35任一项所述的终端,其特征在于,The terminal according to any one of claims 20 to 35, wherein:
    所述确定单元还用于,如果所述第二姿势与所述目标参考姿势的相似度大于等于第四阈值,则确定所述第二姿势与所述目标参考姿势匹配。The determining unit is further configured to, if the similarity between the second posture and the target reference posture is greater than or equal to a fourth threshold, determine that the second posture matches the target reference posture.
  37. 根据权利要求36所述的终端,其特征在于,所述终端还包括:The terminal according to claim 36, wherein the terminal further comprises:
    计算单元,用于计算第一向量和第二向量;其中,所述第一向量是所述第二人像中的关键点相对角度信息构成的向量,用于表征所述第二姿势;所述第二向量是所述目标参考姿势下的人像中的关键点相对角度信息构成的向量,用于表征所述目标参考姿势;以及,计算所述第一向量与所述第二向量之间的距离;The calculation unit is configured to calculate a first vector and a second vector; wherein, the first vector is a vector formed by relative angle information of key points in the second portrait, and is used to characterize the second posture; The second vector is a vector composed of relative angle information of key points in the portrait in the target reference pose, and is used to characterize the target reference pose; and calculating the distance between the first vector and the second vector;
    所述确定单元还用于,如果所述距离小于等于第五阈值,则确定所述第二姿势与所述目标参考姿势的相似度大于等于所述第四阈值。The determining unit is further configured to, if the distance is less than or equal to a fifth threshold, determine that the similarity between the second posture and the target reference posture is greater than or equal to the fourth threshold.
  38. 根据权利要求36所述的终端,其特征在于,所述终端还包括:The terminal according to claim 36, wherein the terminal further comprises:
    计算单元,用于将所述第二姿势和所述目标参考姿势输入神经网络,得到所述第二姿势与所述目标参考姿势之间的相似度;其中,所述神经网络用于表征输入的多种姿势之间的相似度。The calculation unit is configured to input the second posture and the target reference posture into a neural network to obtain the similarity between the second posture and the target reference posture; wherein the neural network is used to characterize the input The similarity between multiple poses.
  39. 一种终端,其特征在于,包括:处理器、存储器和显示屏,所述显示屏用于显示图像,所述存储器用于存储计算机程序和指令,所述处理器用于调用所述计算机程序和指令,与所述显示屏协同执行如权利要求1-19中任一项所述的方法。A terminal, characterized by comprising: a processor, a memory, and a display screen, the display screen is used to display images, the memory is used to store computer programs and instructions, and the processor is used to call the computer programs and instructions , To execute the method according to any one of claims 1-19 in cooperation with the display screen.
PCT/CN2020/142530 2020-03-07 2020-12-31 Image processing method and device WO2021179773A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202010153760 2020-03-07
CN202010153760.1 2020-03-07
CN202010480843.1 2020-05-30
CN202010480843.1A CN113364971B (en) 2020-03-07 2020-05-30 Image processing method and device

Publications (1)

Publication Number Publication Date
WO2021179773A1 true WO2021179773A1 (en) 2021-09-16

Family

ID=77524350

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/142530 WO2021179773A1 (en) 2020-03-07 2020-12-31 Image processing method and device

Country Status (2)

Country Link
CN (1) CN113364971B (en)
WO (1) WO2021179773A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113890994A (en) * 2021-09-30 2022-01-04 荣耀终端有限公司 Image capturing method, system, storage medium, and program product
CN113905174A (en) * 2021-09-18 2022-01-07 咪咕文化科技有限公司 Method, Apparatus, Device, and Computer-readable Storage Medium for Photographing Gesture Recommendation
CN114285988A (en) * 2021-12-03 2022-04-05 维沃移动通信有限公司 Display method, display device, electronic equipment and storage medium
CN115278060A (en) * 2022-07-01 2022-11-01 北京五八信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN115423752A (en) * 2022-08-03 2022-12-02 荣耀终端有限公司 Image processing method, electronic device and readable storage medium
CN116074623A (en) * 2022-05-30 2023-05-05 荣耀终端有限公司 Resolution selecting method and device for camera
WO2023192771A1 (en) * 2022-03-29 2023-10-05 Qualcomm Incorporated Recommendations for image capture
CN117011946A (en) * 2023-10-08 2023-11-07 武汉海昌信息技术有限公司 Unmanned rescue method based on human behavior recognition

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113835354B (en) * 2021-10-14 2022-05-27 北京联盛德微电子有限责任公司 Internet of things household appliance control system
CN114020157B (en) * 2021-11-15 2024-07-19 广州小鹏汽车科技有限公司 Method and device for checking vehicles, vehicles and storage medium
CN116996761A (en) * 2022-04-14 2023-11-03 北京字跳网络技术有限公司 Photography methods, devices, equipment, storage media and program products

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110221921A1 (en) * 2010-03-12 2011-09-15 Sanyo Electric Co., Ltd. Electronic camera
US20130038759A1 (en) * 2011-08-10 2013-02-14 Yoonjung Jo Mobile terminal and control method of mobile terminal
CN107734251A (en) * 2017-09-29 2018-02-23 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN108156385A (en) * 2018-01-02 2018-06-12 联想(北京)有限公司 Image acquiring method and image acquiring device
CN110049180A (en) * 2018-11-27 2019-07-23 阿里巴巴集团控股有限公司 Shoot posture method for pushing and device, intelligent terminal
CN110868538A (en) * 2019-11-11 2020-03-06 三星电子(中国)研发中心 Method and electronic equipment for recommending shooting posture

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101762769B1 (en) * 2011-04-18 2017-08-07 삼성전자주식회사 Apparatus and method for capturing subject in photographing device
CN106331508B (en) * 2016-10-19 2020-04-03 深圳市道通智能航空技术有限公司 Method and device for shooting composition
CN106791364A (en) * 2016-11-22 2017-05-31 维沃移动通信有限公司 Method and mobile terminal that a kind of many people take pictures
EP3590095B1 (en) * 2017-05-16 2024-04-24 Apple Inc. Emoji recording and sending
CN108600632B (en) * 2018-05-17 2021-04-20 Oppo(重庆)智能科技有限公司 Photographing prompting method, intelligent glasses and computer readable storage medium
CN109194879B (en) * 2018-11-19 2021-09-07 Oppo广东移动通信有限公司 Photographing method, device, storage medium and mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110221921A1 (en) * 2010-03-12 2011-09-15 Sanyo Electric Co., Ltd. Electronic camera
US20130038759A1 (en) * 2011-08-10 2013-02-14 Yoonjung Jo Mobile terminal and control method of mobile terminal
CN107734251A (en) * 2017-09-29 2018-02-23 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN108156385A (en) * 2018-01-02 2018-06-12 联想(北京)有限公司 Image acquiring method and image acquiring device
CN110049180A (en) * 2018-11-27 2019-07-23 阿里巴巴集团控股有限公司 Shoot posture method for pushing and device, intelligent terminal
CN110868538A (en) * 2019-11-11 2020-03-06 三星电子(中国)研发中心 Method and electronic equipment for recommending shooting posture

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113905174A (en) * 2021-09-18 2022-01-07 咪咕文化科技有限公司 Method, Apparatus, Device, and Computer-readable Storage Medium for Photographing Gesture Recommendation
CN113890994A (en) * 2021-09-30 2022-01-04 荣耀终端有限公司 Image capturing method, system, storage medium, and program product
CN113890994B (en) * 2021-09-30 2022-12-23 荣耀终端有限公司 Image photographing method, system and storage medium
CN114285988A (en) * 2021-12-03 2022-04-05 维沃移动通信有限公司 Display method, display device, electronic equipment and storage medium
CN114285988B (en) * 2021-12-03 2024-04-09 维沃移动通信有限公司 Display method, display device, electronic equipment and storage medium
US11871104B2 (en) 2022-03-29 2024-01-09 Qualcomm Incorporated Recommendations for image capture
WO2023192771A1 (en) * 2022-03-29 2023-10-05 Qualcomm Incorporated Recommendations for image capture
CN116074623B (en) * 2022-05-30 2023-11-28 荣耀终端有限公司 Resolution selecting method and device for camera
CN116074623A (en) * 2022-05-30 2023-05-05 荣耀终端有限公司 Resolution selecting method and device for camera
CN115278060A (en) * 2022-07-01 2022-11-01 北京五八信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN115278060B (en) * 2022-07-01 2024-04-09 北京五八信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN115423752B (en) * 2022-08-03 2023-07-07 荣耀终端有限公司 Image processing method, electronic equipment and readable storage medium
CN115423752A (en) * 2022-08-03 2022-12-02 荣耀终端有限公司 Image processing method, electronic device and readable storage medium
CN117011946A (en) * 2023-10-08 2023-11-07 武汉海昌信息技术有限公司 Unmanned rescue method based on human behavior recognition
CN117011946B (en) * 2023-10-08 2023-12-19 武汉海昌信息技术有限公司 Unmanned rescue method based on human behavior recognition

Also Published As

Publication number Publication date
CN113364971A (en) 2021-09-07
CN113364971B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
WO2021179773A1 (en) Image processing method and device
CN109814766B (en) Application display method and electronic equipment
CN113645351B (en) Application interface interaction method, electronic device and computer-readable storage medium
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
CN113254120B (en) Data processing method and related device
WO2022206589A1 (en) Image processing method and related device
WO2023029547A1 (en) Video processing method, and electronic device
CN111553846A (en) Super-resolution processing method and device
US20230351570A1 (en) Image processing method and apparatus
WO2022001258A1 (en) Multi-screen display method and apparatus, terminal device, and storage medium
WO2022143180A1 (en) Collaborative display method, terminal device, and computer readable storage medium
CN112150499B (en) Image processing method and related device
CN110955373A (en) A display method and electronic device for displaying elements
CN112449101A (en) Shooting method and electronic equipment
CN113452969B (en) Image processing method and device
WO2021204103A1 (en) Picture preview method, electronic device, and storage medium
CN114995715A (en) Control method of floating ball and related device
US20230224574A1 (en) Photographing method and apparatus
CN110968247A (en) Electronic equipment control method and electronic equipment
WO2021180095A1 (en) Method and apparatus for obtaining pose
CN114422686A (en) Parameter adjusting method and related device
WO2021190097A1 (en) Image processing method and device
CN118444832B (en) Touch operation method and electronic device
WO2022222702A1 (en) Screen unlocking method and electronic device
WO2024221929A1 (en) Display method and electronic device

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: 20924691

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: 20924691

Country of ref document: EP

Kind code of ref document: A1