WO2020134891A1 - Photo previewing method for electronic device, graphical user interface and electronic device - Google Patents

Photo previewing method for electronic device, graphical user interface and electronic device Download PDF

Info

Publication number
WO2020134891A1
WO2020134891A1 PCT/CN2019/122516 CN2019122516W WO2020134891A1 WO 2020134891 A1 WO2020134891 A1 WO 2020134891A1 CN 2019122516 W CN2019122516 W CN 2019122516W WO 2020134891 A1 WO2020134891 A1 WO 2020134891A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
electronic device
person
photographed
preview
Prior art date
Application number
PCT/CN2019/122516
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 WO2020134891A1 publication Critical patent/WO2020134891A1/en

Links

Images

Classifications

    • 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/62Control of parameters via user interfaces

Definitions

  • the invention relates to the field of electronic technology, in particular to a photo preview method applied to electronic devices, a graphical user interface, and electronic devices.
  • the object of the present invention is to provide a photo preview method, graphic user interface (GUI) and electronic device of an electronic device, which can enable the user to beautify the person being photographed during the photo preview process, and the operation is intuitive and simple Effective, can improve the utilization rate of electronic equipment.
  • GUI graphic user interface
  • a photo preview method for an electronic device may have a 3D camera module.
  • the method may include: the electronic device may turn on the 3D camera module, and collect the first image of the photographed person through the 3D camera module.
  • the electronic device may display a first graphical user interface, and the first graphical user interface may include a preview frame, and the preview frame displays the first image of the photographed person.
  • the electronic device may detect the first user operation, and in response to the first user operation, may display the second image of the photographed person in the preview box of the first graphical user interface.
  • the contour of the first body part of the photographed person in the second image is adjusted according to the first body parameters
  • the contour of the second body part of the photographed person in the second image is adjusted according to the second body parameters
  • the first part is different from the second part
  • the first body parameters are different from the second body parameters. That is to say, the electronic device can adjust the contours of different body parts in the first image by using different body parameters.
  • the first graphical user interface may further include a first control, and the first user operation is a user operation for selecting a beauty level that acts on the first control; the selected The higher the body level, the greater the gap between the contour of the first part in the second image and the contour of the first part in the first image, and the greater the gap between the contour of the second part in the second image and the contour of the second part in the first image .
  • the first user operation may specifically include a second user operation acting on the first control (such as a rightward sliding operation on the first control), and a third user operation acting on the first control (such as the first control Swipe left).
  • a second user operation acting on the first control such as a rightward sliding operation on the first control
  • a third user operation acting on the first control such as the first control Swipe left
  • the electronic device can detect a second user operation acting on the first control (such as a rightward sliding operation on the first control).
  • the second user operation can be used to increase the body level corresponding to the person being photographed (such as increasing from body level 7 To body level 10).
  • the electronic device may refresh the display content in the preview box.
  • the body shape of the photographed person's body image in the preview frame after refreshing has a beautification compared with the body shape of the photographed person's body image in the preview frame before refreshing. That is to say, in response to the second user operation, the outline of the first part in the second image in the preview frame after refreshing is compared with the outline of the first part in the second image in the preview frame before refreshing, and The gap between the contours of the first part is larger.
  • the contour of the second part in the second image in the preview frame after refreshing is larger than the contour of the second part in the first image.
  • the electronic device can detect a third user operation acting on the first control (such as a leftward sliding operation on the first control).
  • the third user operation can be used to reduce the body level corresponding to the person being photographed (such as from the body level 10 Up to body level 7), in response to the operation of the third user, the display content in the preview box can be refreshed.
  • the body shape of the photographed person's body image in the preview frame after refreshing is closer to the actual body shape of the photographed person than that in the preview frame before refreshing.
  • the outline of the first part in the second image in the preview frame after refreshing is compared with the outline of the first part in the second image in the preview frame before refreshing, and The gap between the contours of the first part is smaller.
  • the contour of the second part in the second image in the preview frame after refreshing is smaller than the contour of the second part in the second image in the preview frame before refreshing, and the contour of the second part in the first image is smaller.
  • the electronic device may display a prompt message (such as the text "pregnant woman detected") in the preview box.
  • the photographed person is a pregnant woman.
  • the electronic device can use the beauty parameters corresponding to the selected beauty level to perform beauty treatment on the color images of other partial bodies of the photographed person (such as arms, legs, and shoulders), but not the stomach of the photographed person.
  • the image is processed with a body to preserve the characteristics of the pregnant woman. That is to say, the outline of the belly of the photographed person in the second image displayed in the preview frame matches the outline of the belly of the photographed person in the first image.
  • the electronic device may adjust the color value of the face skin of the person photographed in the second image in response to the detected fourth user operation.
  • the fourth user operation may be a user operation that turns on the “beauty skin” function and selects a specific skin beauty level (such as skin beauty level 7).
  • the electronic device may refresh the display in the preview box Content, the image of the photographed person displayed in the refreshed preview box includes a face image and a body image, where the face image is a face image after skin treatment, and the body image is corresponding to the selected beauty level Body image
  • the electronic device may also display the second control in the preview box.
  • the electronic device may display the first image in the preview box.
  • the electronic device may display the second image in the preview box. In this way, the user can compare the body shape represented by the first image with the body shape represented by the second image.
  • the electronic device may display the first prompt information in the preview box for prompting the contour of the first part in the second image and the contour of the first part in the first image ,
  • the second image is the image of the photographed person after the body treatment displayed in the preview frame
  • the first image is the image of the photographed person collected by the 3D camera module.
  • the contours of the body parts of the captured person in the first image are consistent with the actual contours. These differences can be expressed as the difference in waist circumference, the difference in leg circumference, the difference in leg length, the difference in shoulder width and so on.
  • the first prompt information may also be used to prompt one or more of the following manifestations: weight to be lost, required amount of exercise, and calories to be consumed.
  • weight that needs to be lost is used to indicate how much weight the person to be photographed needs to lose to approach or reach the body shape represented by the body image displayed in the preview box.
  • required amount of exercise is used to indicate how much exercise the person to be photographed needs to approach or reach the figure represented by the body image displayed in the preview box.
  • the calories that need to be consumed are used to remind how much calories the person to be photographed needs to approach or reach the body shape shown in the preview frame.
  • the electronic device displays the third control and the second prompt message in the preview box.
  • the third control can be used To monitor user operations for sharing fitness information, the second prompt information can be used to prompt the user to click the third control to share fitness information with the person being photographed.
  • the electronic device may display a user interface for sharing fitness information.
  • the electronic device may share fitness information with the selected contact.
  • the electronic device may display the fourth control and the third prompt information in the preview box.
  • the third prompt information It can be used to prompt the user to click the fourth control to view fitness information.
  • the electronic device may display fitness information.
  • the first graphical user interface may further include: a shooting control.
  • the electronic device may save the second image displayed in the preview frame in response to the detected user operation acting on the shooting control.
  • the first graphical user interface may further include: a shooting mode list, the shooting mode list includes multiple shooting mode options; the multiple shooting modes include: the first shooting mode option and the first Two shooting mode options. among them:
  • the shooting control is specifically used to monitor the user operation that triggers the photographing, and in response to the detected user operation acting on the shooting control, saving the second image displayed in the preview box, specifically including : In response to the detected user operation acting on the shooting control, save the second image displayed in the preview box as a photo.
  • the shooting control is specifically used to monitor the user operation that triggers the recording.
  • the second image displayed in the preview box is saved, specifically including :
  • the second image displayed in the preview box is saved, specifically including :
  • the electronic device before displaying the second image of the photographed person in the preview box of the first graphical user interface in response to the first user operation, the electronic device may also be based on the photographed person Of the images identify human bone points.
  • the electronic device may further determine the photographed person The angle with the plane where the electronic device is located, and the angle does not exceed the preset angle threshold.
  • the electronic device may also according to the photographed person The angle with the plane where the electronic device is located determines the perspective transformation matrix, and performs perspective transformation on the first image of the person to be photographed according to the perspective transformation matrix.
  • a photo preview method for an electronic device may have a 3D camera module.
  • the method may include: the electronic device turns on the 3D camera module, and may collect the image of the person being photographed through the 3D camera module.
  • the electronic device can display a second graphical user interface.
  • the second graphical user interface includes: a preview box and a body template column; wherein, the preview box displays a color image collected by the 3D camera module, and the body template column displays one or more bodies Template options.
  • the electronic device may display the fifth control.
  • the electronic device may refresh the preview box.
  • the body image of the photographed person's body image in the preview box after refreshing is closer to the body type represented by the selected body template than that of the body image of the photographed person in the preview box before refreshing.
  • the electronic device can refresh the preview frame; the body image of the photographed person in the preview frame after refreshing is compared with the body shape of the preview frame before refreshing The body shape of the photographed person's body image is closer to the actual shape of the person being photographed.
  • an electronic device may include a 3D camera module, a display screen, a touch sensor, a wireless communication module, a memory, and one or more processors.
  • the one or more processors are used to execute One or more computer programs stored in the aforementioned memory, wherein:
  • the 3D camera module can be used to collect the first image of the person being photographed
  • the display screen may be used to display a first graphical user interface, and the first user interface may include a preview frame, and the preview frame displays a first image of the photographed person collected by the 3D camera module.
  • the touch sensor may be used to detect the first user operation.
  • the display screen may be used to display the second image of the person being photographed in the preview box in response to the first operation.
  • the contour of the first body part of the photographed person in the second image is adjusted according to the first body parameters
  • the contour of the second body part of the photographed person in the second image is adjusted according to the second body parameters
  • the first part is different from the second part
  • the first body parameters are different from the second body parameters. That is to say, the electronic device can adjust the contours of different body parts in the first image by using different body parameters.
  • an electronic device may include an apparatus, which may implement any possible implementation manner as in the first aspect, or as any possible implementation manner in the second aspect.
  • a photo preview device which has a function to implement the behavior of an electronic device in the above method.
  • the above-mentioned functions can be realized by hardware, and can also be realized by hardware executing corresponding software.
  • the above hardware or software includes one or more modules corresponding to the above functions.
  • a computer device which includes a memory, a processor, and a computer program stored on the memory and operable on the processor, characterized in that, when the processor executes the computer program, the computer device is realized As in any possible implementation manner in the first aspect, or as in any possible implementation manner in the second aspect.
  • a computer program product containing instructions is characterized in that, when the computer program product runs on an electronic device, the electronic device is caused to execute any possible implementation manner as in the first aspect, or as in the second Any possible implementation in any aspect.
  • a computer-readable storage medium which includes instructions, characterized in that, when the above instructions run on an electronic device, the above electronic device executes any possible implementation manner as in the first aspect, or as in Any possible implementation in the two aspects.
  • FIG. 1A is a schematic diagram of a structure of an electronic device provided by an embodiment
  • 1B is a schematic diagram of a software structure of an electronic device provided by an embodiment
  • 2A is a schematic diagram of a user interface for an application menu on an electronic device provided by an embodiment
  • 2B is a schematic diagram of a rear 3D camera module on an electronic device provided by an embodiment
  • 3A-3C are schematic diagrams of shooting scenes involved in this application.
  • 3D-3E are schematic diagrams of a user interface of a character beautification function provided by an embodiment
  • 4A-4H are schematic diagrams of a UI for beautifying a person being photographed during a photo preview provided by an embodiment
  • 5A-5D are schematic diagrams of a UI provided for revoking a beautified body during a photo preview provided by an embodiment
  • 6A-6G are schematic diagrams of a UI for pushing fitness information during a photo preview provided by an embodiment
  • FIGS. 7A-7H are schematic diagrams of UIs for pushing fitness information during a photo preview provided by another embodiment
  • FIGS. 8A-8B are schematic diagrams of UI provided before and after beautification of a comparison body during a photo preview provided by an embodiment
  • 9A-9C are schematic diagrams of UIs for users to take photos provided by an embodiment
  • 10A-10G are schematic diagrams of a UI for beautifying a photographed person during video preview provided by an embodiment
  • 11A-11E are schematic diagrams of a UI for beautifying a photographed person using a body shape template provided by an embodiment
  • 12A-12C are schematic diagrams of a one-button UI for full-body beautification provided by an embodiment
  • 13A-13D are schematic diagrams of UI for beautifying multiple people provided by an embodiment
  • 14A-14B are schematic diagrams of a UI for manual beautification provided by an embodiment
  • 15A-15D are schematic diagrams of UI for beautifying the figures in the captured pictures provided by an embodiment
  • FIG. 16 is a schematic flowchart of a photo preview method provided by an embodiment
  • 17A-17C show pixel points in a color image, a depth image, and a 3D coordinate space, respectively;
  • Figure 18 shows basic human bone points
  • FIG. 19 is a schematic diagram of calculating the angle ⁇ between the photographed person and the electronic device according to the depth value of the bone point and the 2D coordinates;
  • 20 is a schematic diagram of calculating the length of the bone between the bone points according to the depth value of the bone points and the 2D coordinates;
  • 21 is a schematic diagram of dividing a color image collected by a 3D camera module into a color image (that is, a foreground image) and a background image of a person to be photographed;
  • Fig. 22 is a comparison diagram before and after image restoration
  • FIG. 23 is an architectural diagram of functional modules included in an electronic device according to an embodiment.
  • the electronic device may be a portable electronic device that also contains other functions such as personal digital assistant and/or music player functions, such as a mobile phone, a tablet computer, and a wearable electronic device with wireless communication function (such as a smart watch) Wait.
  • portable electronic devices include, but are not limited to Or portable electronic devices of other operating systems.
  • the above portable electronic device may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface or a touch panel. It should also be understood that in some other embodiments, the above electronic device may not be a portable electronic device, but a desktop computer with a touch-sensitive surface or a touch panel.
  • UI user interface
  • the term “user interface (UI)” in the specification, claims, and drawings of this application is a media interface for interaction and information exchange between applications or operating systems and users, which implements the internal form of information And users can accept the conversion between forms.
  • the user interface of the application is source code written in a specific computer language such as java and extensible markup language (XML).
  • the interface source code is parsed and rendered on the terminal device, and finally presented as content that can be recognized by the user.
  • Controls also called widgets
  • Typical controls include toolbars, menu bars, text boxes, buttons, and scroll bars. (scrollbar), pictures and text.
  • the attributes and contents of the controls in the interface are defined by tags or nodes.
  • XML uses ⁇ Textview>, ⁇ ImgView>, ⁇ VideoView> and other nodes to specify the controls contained in the interface.
  • a node corresponds to a control or attribute in the interface, and the node is rendered as user-visible content after being parsed and rendered.
  • applications such as hybrid applications (hybrid application) interface usually also contains web pages.
  • a web page, also known as a page, can be understood as a special control embedded in the application interface.
  • the web page is source code written in a specific computer language, such as hypertext markup language (hypertext markuplanguage, GTML), cascading styles Tables (cascading styles, CSS), java scripts (JavaScript, JS), etc.
  • web page source code can be loaded and displayed as user-recognizable content by the browser or a web page display component similar to the browser function.
  • the specific content contained in a web page is also defined by tags or nodes in the source code of the web page.
  • GTML uses ⁇ p>, ⁇ img>, ⁇ video>, and ⁇ canvas> to define the elements and attributes of the web page.
  • GUI graphical user interface
  • the following embodiments of the present application provide a photo preview method for an electronic device, a graphical user interface, and an electronic device, which can enable the user to beautify the person being photographed during the camera preview process, and the operation is intuitive and simple and effective, which can improve the electronic device Of usage.
  • the application “camera” of an electronic device such as a smartphone can provide two kinds of beautification functions: a “beauty” function and a “beauty” function. among them,
  • the "beauty” function can be used to adjust the face image of the person being photographed during the photo preview or video preview process, so that the face represented by the adjusted face image occurs compared to the actual face of the person being photographed
  • Skin beautification such as skin whitening, skin dermabrasion (such as removing acne, freckles, wrinkles, etc.), and so on.
  • the adjustment of the face image involved in the "beauty” function may refer to the smoothing of the face image using algorithms such as surface blur, mean filtering, and bilateral filtering. In the following embodiments of the present application, such processing performed on the face image may be referred to as skin beautification processing.
  • the "Beauty" function can be used to adjust the body image of the person being photographed during the photo preview or video preview process, so that the body shape of the adjusted body image is beautified compared to the actual body shape of the person being photographed.
  • Body beautification can include: beautifying the body proportions (such as lengthening the legs, widening the shoulders, etc.), adjusting the body's fat and thin (such as thin waist, thin legs, thin belly, thin buttocks, or full body treatment, etc.) ).
  • the adjustment of the body image involved in the "beauty" function may include: determining the target position to which the bone point needs to be adjusted according to the beautification parameters of the beautification ratio of the body (such as the body parameters corresponding to the elongated legs, which will be introduced in the following content)
  • Common image scaling algorithms such as bicubic, bilinear, and nearest neighbor can be used to scale the local body image between bone points, so that the bone point can be located at its corresponding target position after the local body image is scaled. In order to achieve the purpose of beautifying the proportion of the body.
  • the adjustment of the body image involved in the "beauty" function may also include: using common image scaling algorithms such as bicubic, bilinear, and nearest neighbor to scale the overall body image or partial body image of the person being photographed (scale) Treatment to achieve the purpose of adjusting body fat or thin.
  • the image processing related to stovepipe may include performing compression processing on the leg image using an image scaling algorithm, and the leg image represented by the compressed leg image is slimmer than the actual leg of the person being photographed.
  • the image processing of the waist shaping design may include: using an image scaling algorithm to compress the middle portion of the waist image, and stretching the upper and lower ends of the waist image.
  • the waist image expresses The waist is more curved than the actual waist of the person being photographed, and the waist represented by this image-processed waist image may be an S-shaped waist (the waist is thinner in the middle).
  • body treatment such processing performed on the body image may be referred to as body treatment.
  • body images (including images of various partial bodies, such as leg images) targeted for body treatment refer to color images of the body collected by the color camera module.
  • face image targeted by the beauty treatment also refers to the color image of the face collected by the color camera module.
  • the "Body” function analyzes the color images collected by the color camera module of the electronic device based on the bone point recognition technology to identify the bone points of the person being photographed, such as the head point, neck point, left shoulder point, and right Shoulder point.
  • the following content will introduce the skeleton point recognition technology and the basic skeleton points of the human body, which will not be repeated here.
  • the electronic device can analyze the body proportion, fat and thin body shape of the person being photographed.
  • the electronic device can adjust the body image between the bone points of the photographed person during the camera preview, so that the figure represented by the adjusted body image is more beautified than the actual figure of the figure.
  • the photographer can beautify the photographed person during the camera preview (photo preview and video preview), the operation is intuitive, simple and effective, and the utilization rate of the electronic device can be improved.
  • the "beauty” function and/or the “beauty” function may be integrated into the "portrait” camera function and video recording function included in the "camera” application.
  • the "beauty” function and/or “beauty” function can also be used as a separate camera function in the “camera” application.
  • "Portrait” camera function is a camera function that is set when the subject is a person to highlight the person and enhance the beauty of the person in the captured picture.
  • the electronic device can use a larger aperture to keep the depth of field shallower to highlight the person, and can improve the color effect to optimize the person's skin color.
  • the electronic device can also turn on the flash to perform illumination compensation.
  • Camera is an application for capturing images on smart phones, tablets, and other electronic devices.
  • the application does not limit the name of the application.
  • the "portrait” camera function and video recording function may be the camera function included in the "camera” application.
  • the "camera” application can also include a variety of other camera functions.
  • the camera parameters such as aperture size, shutter speed, and sensitivity corresponding to different camera functions can be different, and different camera effects can be presented.
  • the camera function can also be called a camera mode, for example, the "portrait” camera function can also be called a "portrait” camera mode.
  • “beauty skin”, “beauty body”, and “portrait” are just some of the words used in this embodiment, and the meanings they represent have been recorded in this embodiment, and their names do not constitute any limitation to this embodiment.
  • “beauty skin” may also be referred to as other terms such as “face beauty”.
  • the "beauty body” mentioned in the embodiments of the present application may also be called other names such as "slimming shape” in other embodiments.
  • FIG. 1A shows a schematic structural diagram of the electronic device 100.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, key 190, motor 191, indicator 192, 3D camera module 193, display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyro 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 180G, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown, 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 (application processor, AP), a central processing unit (CPU), and a graphics processing unit (GPU).
  • Application processor application processor
  • CPU central processing unit
  • GPU graphics processing unit
  • Neural network processor neural-network processing unit, NPU
  • modem processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • the different processing units may be independent devices or may be integrated in one or more processors.
  • the electronic device 100 may also include one or more processors 110.
  • the controller may be the nerve center and command center of the electronic device 100.
  • the controller can generate the operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetch and execution.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. The repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the electronic device 100.
  • the processor 110 may include one or more interfaces.
  • Interfaces can include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit, sound, I2S) interface, pulse code modulation (pulse code modulation (PCM) interface, universal asynchronous transceiver (universal) asynchronous 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.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may respectively couple the touch sensor 180K, charger, flash, 3D camera module 193, etc. through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface, and realize the touch function of the electronic device 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, to realize the function of answering the phone call through the Bluetooth headset.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering the phone call through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the 3D camera module 193.
  • MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI) and so on.
  • the processor 110 and the 3D camera module 193 communicate through a CSI interface to implement the camera function of the electronic device 100.
  • the processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the electronic device 100.
  • the GPIO interface can be configured via software.
  • the GPIO interface can be configured as a control signal or a data signal.
  • the GPIO interface may be used to connect the processor 110 to the 3D camera module 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiments of the present invention is only a schematic description, and does not constitute a limitation on the structure of the electronic device 100.
  • the electronic device 100 may also use different interface connection methods in the foregoing embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
  • 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 charge management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 194, 3D camera module 193, and wireless communication module 160.
  • the power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
  • the power management module 141 may also be disposed in the processor 110.
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like.
  • the mobile communication module 150 can receive the electromagnetic wave from the antenna 1 and filter, amplify, etc. the received electromagnetic wave, and transmit it to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor and convert it to electromagnetic wave radiation through the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be transmitted into a high-frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110, and may be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (bluetooth, BT), and global navigation satellites that are applied to the electronic device 100 Wireless communication solutions such as global navigation (satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR), etc.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives the electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and sends the processed signal to the processor 110.
  • the wireless communication module 160 can also receive the signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and convert it to electromagnetic waves through the antenna 2 to radiate it out.
  • the wireless communication module 160 may include a Bluetooth module, a Wi-Fi module, and the like.
  • the antenna 1 of the electronic device 100 and the mobile communication module 150 are coupled, and the antenna 2 and the wireless communication module 160 are coupled so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global mobile communication system (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long-term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation system (BDS), and a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite-based augmentation system (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS beidou navigation system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation system
  • the electronic device 100 can realize a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, connecting 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 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 use a 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) emitting diode, AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the electronic device 100 can realize a camera function through a 3D camera module 193, an ISP, a video codec, a GPU, a display screen 194, an application processor AP, and a neural network processor NPU.
  • the 3D camera module 193 can be used to collect color image data and depth data of the subject.
  • the ISP can be used to process the color image data collected by the 3D camera module 193. For example, when taking a picture, the shutter is opened, and light is transmitted to the photosensitive element of the camera through the lens, and the optical signal is converted into an electrical signal. The photosensitive element of the camera transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye.
  • ISP can also optimize the algorithm of 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 set in the 3D camera module 193.
  • the 3D camera module 193 may be composed of a color camera module and a 3D sensing module.
  • the photosensitive element of the camera of the color camera module may be a charge coupled device (charge), a coupled device (CCD), or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other format image signals.
  • the 3D sensing module may be a (time of flight, TOF) 3D sensing module or a structured light (structured light) 3D sensing module.
  • the structured light 3D sensing is an active depth sensing technology.
  • the basic components of the structured light 3D sensing module may include an infrared (Infrared) emitter, an IR camera module, and the like.
  • the working principle of the structured light 3D sensing module is to first emit a specific pattern of spots on the object to be photographed, and then receive the light spot pattern encoding on the surface of the object, and then compare the similarities and differences with the original projected spot. And use the principle of triangle to calculate the three-dimensional coordinates of the object.
  • the three-dimensional coordinates include the distance between the electronic device 100 and the object to be photographed.
  • TOF 3D sensing is also an active depth sensing technology.
  • the basic components of TOF 3D sensing modules may include infrared (Infrared) transmitters, IR camera modules, and so on.
  • the working principle of the TOF 3D sensing module is to calculate the distance (that is, the depth) between the TOF 3D sensing module and the object to be captured by the time of infrared foldback to obtain a 3D depth map.
  • the structured light 3D sensing module can also be used in the fields of face recognition, somatosensory game consoles, industrial machine vision inspection, etc.
  • the TOF 3D sensing module can also be used in game consoles, augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) and other fields.
  • the 3D camera module 193 may also be composed of two or more cameras.
  • the two or more cameras may include a color camera, and the color camera may be used to collect color image data of the object to be photographed.
  • the two or more cameras may use stereo vision technology to collect depth data of the object being photographed.
  • Stereo vision technology is based on the principle of parallax of human eyes. Under natural light, two or more cameras are used to capture images of the same object from different angles, and then triangulation and other operations are performed to obtain the electronic device 100 and the The distance information between the objects is the depth information.
  • the electronic device 100 may include 1 or N 3D camera modules 193, where N is a positive integer greater than 1.
  • the electronic device 100 may include a front 3D camera module 193 and a rear 3D camera module 193.
  • the front 3D camera module 193 can usually be used to collect the color image data and depth data of the photographer facing the display screen 194, and the rear 3D camera module can be used to collect the subject (such as people) faced by the photographer , Landscape, etc.) color image data and depth data.
  • the CPU or GPU or NPU in the processor 110 can process the color image data and depth data collected by the 3D camera module 193.
  • the NPU can recognize the color image collected by the 3D camera module 193 (specifically, the color camera module) through a neural network algorithm based on the bone point recognition technology, such as a convolutional neural network algorithm (CNN) Data to determine the bone points of the person being photographed.
  • CNN convolutional neural network algorithm
  • the CPU or GPU can also run a neural network algorithm to determine the bone point of the person to be photographed based on the color image data.
  • the CPU, GPU, or NPU can also be used to confirm the figure of the person being photographed based on the depth data collected by the 3D camera module 193 (specifically, the 3D sensing module) and the identified bone points (such as The proportion of the body, the fatness and thinness of the body parts between the bone points), and can further determine the body beautification parameters for the photographed person, and finally process the photographed image of the photographed person according to the body beautification parameters to make the shooting The figure in the image is beautified. Subsequent embodiments will introduce in detail how to perform body treatment on the image of the captured person based on the color image data and depth data collected by the 3D camera module 193, which will not be repeated here.
  • the digital signal processor is used to process digital signals. In addition to digital image signals, it can also process other digital signals. For example, when the electronic device 100 is selected at a frequency point, the digital signal processor is used to perform Fourier transform on the energy at the frequency point.
  • the video codec is used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (MPEG)-1, MPEG-2, MPEG-3, MPEG-4, etc.
  • MPEG moving picture experts group
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can realize applications such as intelligent recognition of the electronic device 100, such as image recognition, face recognition, voice recognition, and text understanding.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 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, photos, videos and other data in an external memory card.
  • the internal memory 121 may be used to store one or more computer programs including instructions.
  • the processor 110 may run the above instructions stored in the internal memory 121, so that the electronic device 100 executes the photo preview method of the electronic device provided in some embodiments of the present application, as well as various functional applications and data processing.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store the operating system; the storage program area can also store one or more application programs (such as gallery, contacts, etc.) and so on.
  • the storage data area may store data (such as photos, contacts, etc.) created during use of the electronic device 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 memory (universal flash storage, UFS), and so on.
  • a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and so on.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
  • the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also known as "handset" is used to convert audio electrical signals into sound signals.
  • the voice can be received by bringing the receiver 170B close to the ear.
  • the microphone 170C also known as “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 to the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C. In addition to collecting sound signals, it may also implement a noise reduction function. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the headset interface 170D is used to connect wired headsets.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile electronic device (open mobile terminal) platform (OMTP) standard interface, and the American Telecommunications Industry Association (cellular telecommunications industry association of the United States, CTIA) standard interface.
  • OMTP open mobile electronic device
  • CTIA American Telecommunications Industry Association
  • 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 be a parallel plate including at least two conductive materials. When force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 100 determines the strength of the pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations that act on the same touch position but have different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than the first pressure threshold acts on 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 electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 180B.
  • the gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the jitter angle of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the jitter of the electronic device 100 through 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 electronic device 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 electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the electronic device 100 may detect the opening and closing of the clamshell according to the magnetic sensor 180D.
  • characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to recognize the posture of electronic devices, and can be used in horizontal and vertical screen switching, pedometer and other applications.
  • the distance sensor 180F is used to measure the distance.
  • the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting scenes, the electronic device 100 may use the distance sensor 180F to measure 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 electronic device 100 emits infrared light outward through the light emitting diode.
  • the electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100.
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 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, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense the brightness of ambient light.
  • the electronic device 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 electronic device 100 is in a pocket to prevent accidental touch.
  • the fingerprint sensor 180G is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access to application lock, fingerprint photo taking, fingerprint answering call, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 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, the electronic device 100 performs to reduce the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature.
  • the electronic device 100 when the temperature is below another threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
  • the touch sensor 180K can also be called a touch panel or a touch-sensitive surface.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 constitute a touch screen, also called a "touch screen”.
  • the touch sensor 180K is used to detect a touch operation 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 electronic device 100, which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive a blood pressure beating signal.
  • the bone conduction sensor 180M may also be provided in the earphone and combined into a bone conduction earphone.
  • the audio module 170 may parse out the voice signal based on the vibration signal of the vibrating bone block of the voice part acquired by the bone conduction sensor 180M to realize the voice function.
  • the application processor may analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
  • the key 190 includes a power-on key, a volume key, and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100.
  • the motor 191 may generate a vibration prompt.
  • the motor 191 can be used for vibration notification of incoming calls and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminder, receiving information, alarm clock, game, etc.
  • Touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the amount of power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards may be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 can also be compatible with external memory cards.
  • the electronic device 100 interacts with the network through a SIM card to realize functions such as call and data communication.
  • the electronic device 100 uses eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
  • the electronic device 100 exemplarily shown in FIG. 1A may display various user interfaces described in the following embodiments through the display screen 194.
  • the electronic device 100 can detect a touch operation in each user interface through the touch sensor 180K, for example, a click operation in each user interface (such as a touch operation on an icon, a double-click operation), and, for example, an upward or in each user interface. Swipe down, or perform a gesture of drawing a circle, and so on.
  • the electronic device 100 may detect a motion gesture performed by the user holding the electronic device 100, such as shaking the electronic device, through the gyro sensor 180B, the acceleration sensor 180E, or the like.
  • the electronic device 100 can detect non-touch gesture operations through the 3D camera module 193 (eg, 3D camera, depth camera).
  • the software system of the electronic device 100 may adopt a layered architecture, event-driven architecture, micro-core architecture, micro-service architecture, or cloud architecture.
  • the embodiment of the present invention takes the Android system with a layered architecture as an example to exemplarily explain the software structure of the electronic device 100.
  • FIG. 1B is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present invention.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor.
  • the layers communicate with each other through a software interface.
  • the Android system is divided into four layers, from top to bottom are the application layer, the application framework layer, the Android runtime and the system library, and the kernel layer.
  • the application layer may include a series of application packages.
  • the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • the application framework layer provides an application programming interface (application programming interface) and programming framework for applications at the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and so on.
  • 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, intercept the screen, etc.
  • Content providers are used to store and retrieve data, and make these data accessible to applications.
  • the data may include videos, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
  • the view system includes visual controls, such as controls for displaying text and controls for displaying pictures.
  • the view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface including an SMS notification icon may include a view to display text and a view to display pictures.
  • the phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connection, hang 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 applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a short stay without user interaction.
  • the notification manager is used to notify the completion of downloading, message reminders, etc.
  • 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 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.
  • the text message is displayed in the status bar, a prompt sound is emitted, the electronic device vibrates, and the indicator light flashes.
  • Android Runtime includes core library and virtual machine. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library contains two parts: one part is the function function that Java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in the virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer into binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library may include multiple functional modules. For example: surface manager (surface manager), media library (Media library), 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
  • surface manager surface manager
  • media library Media library
  • 3D graphics processing library for example: OpenGL ES
  • 2D graphics engine for example: SGL
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports a variety of commonly used audio, video format playback and recording, and still image files.
  • the media library can support multiple audio and video encoding formats, such as: MPEG4, G.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to realize 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 the display driver, camera driver, audio driver, and sensor driver.
  • the software system shown in Figure 1B involves the presentation of applications that use sharing capabilities (such as a gallery, file manager), an instant sharing module that provides sharing capabilities, a print service (print service) and a print spooler (print background service) that provide print capabilities , And the application framework layer provide printing framework, WLAN services, Bluetooth services, and the core and the bottom layer provide WLAN Bluetooth capabilities and basic communication protocols.
  • sharing capabilities such as a gallery, file manager
  • instant sharing module that provides sharing capabilities
  • print service print service
  • print spooler print background service
  • the following describes the workflow of the software and hardware of the electronic device 100 in combination with capturing a photographing scene.
  • the corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into original input events (including touch coordinates, time stamps and other information of touch operations).
  • the original input event is stored in the kernel layer.
  • the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch operation, the control corresponding to the touch operation is a camera application icon as an example.
  • the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer, and the 3D camera Module 193 captures still images or video.
  • the following describes an exemplary user interface for the application menu on the electronic device 100.
  • FIG. 2A exemplarily shows an exemplary user interface 21 on the electronic device 100 for an application menu.
  • the electronic device 100 may be configured with a 3D camera module 193.
  • 193-1 may be a color camera
  • 193-2 may be a structured light 3D camera module.
  • 193-1 may be a color camera
  • 193-2 may be a TOF 3D camera module.
  • 193-1 and 193-2 may be two color cameras.
  • the 3D camera module 193 may be disposed on the top of the electronic device 100, such as the "bangs" position of the electronic device 100 (ie, the area AA shown in FIG. 2A).
  • the area AA may also include an illuminator 197 (not shown in FIG. 1A), a speaker 170A, a proximity light sensor 180G, an ambient light sensor 180L, and the like.
  • the back of the electronic device 100 may also be equipped with a 3D camera module 193 and an illuminator 197.
  • the user interface 21 may include a status bar 201, a tray 223 with frequently used application icons, a calendar indicator 203, a weather indicator 205, a navigation bar 225, and other application icons. among them:
  • the status bar 201 may include: one or more signal strength indicators 201-1 of the mobile communication signal (also called a cellular signal), an indicator 201-2 of the operator of the mobile communication signal, a time indicator 201-3, Battery status indicator 201-4, etc.
  • the calendar indicator 203 can be used to indicate the current time, such as date, day of the week, hour and minute information, and so on.
  • the weather indicator 205 can be used to indicate the weather type, such as cloudy to sunny, light rain, etc., and can also be used to indicate temperature and other information.
  • the tray 223 with frequently used application icons may display: a phone icon 223-1, a short message icon 223-2, a contact icon 221-4, and the like.
  • the navigation bar 225 may include: a return button 225-1, a main screen (Gome) button 225-3, an outgoing task history button 225-5, and other system navigation keys.
  • the electronic device 100 may display the previous page of the current page.
  • the main interface button 225-3 the electronic device 100 may display the main interface.
  • the electronic device 100 may display the task recently opened by the user.
  • the naming of each navigation key can be other, and this application does not limit it. Not limited to virtual keys, each navigation key in the navigation bar 225 may also be implemented as a physical key.
  • Other application icons may be, for example: Wechat icon 211, QQ icon 212, Twitter icon 213, Facebook icon 214, mailbox icon 215, cloud sharing icon 216, memo Icon 217, set icon 218, gallery icon 219, camera icon 220.
  • the user interface 21 may also include a page indicator 221.
  • Other application icons may be distributed on multiple pages, and the page indicator 221 may be used to indicate which page of the application the user is currently browsing. The user can slide the area of other application icons left and right to browse the application icons in other pages.
  • the user interface 21 exemplarily shown in FIG. 2A may be a main interface (Gome screen).
  • the electronic device 100 may further include a home screen key.
  • the home screen key may be a physical key or a virtual key (such as key 225-3).
  • the home screen key can be used to receive user instructions and return the currently displayed UI to the home interface, which can facilitate the user to view the home screen at any time.
  • the above instruction may specifically be an operation instruction in which the user presses the home screen key once, or an operation instruction in which the user presses the home screen key twice in a short period of time, or a long press of the home screen key in a predetermined time Operating instructions.
  • the home screen key may also be integrated with a fingerprint reader, so that when the home screen key is pressed, fingerprint collection and identification are performed accordingly.
  • FIG. 2A only exemplarily shows the user interface on the electronic device 100, and should not constitute a limitation on the embodiments of the present application.
  • the electronic device may detect a touch operation (such as a click operation on the icon 220) acting on the icon 220 of the camera, and in response to the operation, the user interface 31 exemplarily shown in FIG. 3B may be displayed.
  • the user interface 31 may be a user interface of a "camera” application, and may be used for a user to take a picture, for example, take a picture or record a video.
  • "Camera” is an application for capturing images on smart phones, tablets, and other electronic devices. The application does not limit the name of the application. That is to say, the user can click the icon 220 to open the user interface 31 of the "camera". Not limited to this, the user may also open the user interface 31 in other applications, for example, the user clicks the shooting control in “WeChat” to open the user interface 31.
  • “WeChat” is a social application that allows users to share photos taken with others.
  • FIG. 3B exemplarily shows a user interface 31 of a “camera” application on an electronic device such as a smartphone.
  • the user interface 31 may include an area 301, a shooting mode list 302, a control 303, a control 304, and a control 305. among them:
  • the area 301 may be referred to as a preview frame 301.
  • the preview frame 301 can be used to display the color image collected by the 3D camera module 193 in real time.
  • the electronic device can refresh the display content in real time, so that the user can preview the color image currently collected by the 3D camera module 193.
  • the 3D camera module 193 may be a rear camera or a front camera.
  • the one or more shooting mode options may be displayed in the shooting mode list 302.
  • the one or more camera options may include: night view mode option 302A, portrait mode option 302B, camera mode option 302C, video mode option 302D, and more shooting mode options 302E.
  • the one or more camera options can be represented as text information on the interface, for example, night view mode option 302A, portrait mode option 302B, camera mode option 302C, video mode option 302D, and more shooting mode options 302E can correspond to the text "night view” , "Portrait”, “Take Photo", “Video”, “More”.
  • the one or more camera options can also be represented as icons or other forms of interactive elements (IE) on the interface.
  • IE interactive elements
  • the electronic device 100 may select the photographing mode option 302C by default, and the display state of the photographing mode option 302C (eg, the photographing mode option 302C is highlighted) may indicate that the photographing mode option 302C has been selected.
  • the electronic device 100 may detect a user operation acting on a shooting mode option, and the user operation may be used to select a shooting mode, and in response to the operation, the electronic device 100 may turn on the shooting mode selected by the user.
  • the electronic device 100 can further display more other shooting mode options, such as large aperture shooting mode options, slow motion shooting mode options, etc., which can be shown to the user More abundant camera functions.
  • more shooting mode options 302E may not be displayed in the shooting mode list 302, and the user may browse other shooting mode options by swiping left/right in the shooting mode list 302.
  • the control 303 can be used to monitor user operations that trigger shooting (photographing or video recording).
  • the electronic device can detect a user operation on the control 303 (such as a click operation on the control 303), and in response to the operation, the electronic device 100 can save the image in the preview box 301.
  • the saved image can be a picture or a video.
  • the electronic device 100 can also display the thumbnail of the saved image in the control 304. That is to say, the user can click the control 303 to trigger shooting.
  • the control 303 may be a button or other forms of controls. In this application, the control 303 may be referred to as a shooting control.
  • the control 304 can be used to monitor user operations that trigger camera switching.
  • the electronic device 100 can detect a user operation on the control 304 (such as a click operation on the control 304), and in response to the operation, the electronic device 100 can switch the camera (such as switching the rear camera to the front camera, or the front Set the camera to switch to the rear camera).
  • the control 305 can be used to monitor user operations that trigger the opening of the "Gallery".
  • the electronic device 100 can detect a user operation (such as a click operation on the control 305) acting on the control 305, and in response to the operation, the electronic device 100 can display a user interface of "Gallery", in which the electronic device can be displayed 100 saved pictures.
  • "Gallery” is an application for managing pictures on smart phones, tablet computers, and other electronic devices, and may also be called an "album.” In this embodiment, the name of the application is not limited. "Gallery” can support users to perform various operations on the pictures stored on the electronic device, such as browsing, editing, deleting, selecting and other operations.
  • the user interface 31 can show the user various camera functions (modes) provided by the “camera”, and the user can choose to turn on the corresponding shooting mode by clicking the shooting mode option.
  • modes camera functions
  • UI user interface
  • FIG. 3C exemplarily shows the user interface 32 provided by the “portrait” photographing function of the “camera” application.
  • the electronic device 100 can detect a user operation acting on the portrait mode option 302B (such as a click operation on the portrait mode option 302B), and in response to the user operation, the electronic device 100 can turn on the "portrait” photo Function and display the user interface shown as an example in FIG. 3C.
  • a user operation acting on the portrait mode option 302B such as a click operation on the portrait mode option 302B
  • the electronic device 100 can turn on the "portrait" photo Function and display the user interface shown as an example in FIG. 3C.
  • the definition of the electronic device 100 enabling the "portrait" camera function has been explained in the foregoing, and will not be repeated here.
  • the portrait mode option may be referred to as the first shooting mode option.
  • the user interface 32 includes: a preview box 301, a shooting mode list 302, a control 303, a control 304, a control 305, and 306, a control 207.
  • a preview box 301 a shooting mode list 302
  • a control 303 a control 304
  • a control 305 a control 305
  • 306 a control 207
  • the control 306 can be used to monitor the user operation of opening the light effect template option
  • the control 307 can be used to monitor the user operation of opening the character beautification option.
  • the electronic device 100 may display various light effect template options in the user interface 31.
  • Different light effect templates can represent (or correspond to) different light effect parameters, such as light source position, layer fusion parameter, texture pattern projection position, projection direction, etc.
  • the user can select different light effect templates to make the photos taken show different effects.
  • This application does not limit the interface representation forms of various light effect template options in the user interface 31.
  • the electronic device 100 may display the user interface 33 exemplarily shown in FIG. 3D.
  • FIG. 3D exemplarily shows the user interface provided by the character beautification function.
  • the user interface shown by way of example in FIG. 3D will be described in detail in the following content, which will not be repeated here.
  • the electronic device 100 may also update the display state of the portrait shooting mode option, and the updated display state may indicate that the portrait shooting mode has been selected.
  • the updated display state may be the text information "Portrait” corresponding to the highlight shooting mode option 303B.
  • the updated display state can also present other interface expressions, such as the font of the text information "Portrait” becomes larger, the text information "Portrait” is framed, the text information "Portrait” is underlined, options 303B color deepening, etc.
  • a prompt message 308 may be output in the preview box 301
  • the prompt information 308 may be the text “No person detected”, which may be used to alert the electronic device 100 that no person has been detected.
  • the character beautification function can be integrated into the "portrait" camera function.
  • the person beautification function may also be a camera function in the “camera” application.
  • the person beautification mode option may be displayed in the shooting mode list 302 in the user interface 31.
  • the electronic device 100 may display the user interface provided by the character beautification function exemplarily shown in FIGS. 3D-3E.
  • 3D-3E exemplarily show the user interface 33 provided by the character beautification function of the "camera” application.
  • the user interface 33 includes a preview frame 301, a shooting mode list 302, a control 303, a control 304, a control 305, and a skin beauty option 309 and a body beauty option 310.
  • a shooting mode list 302 for the preview box 301, the shooting mode list 302, the control 303, the control 304, and the control 305, reference may be made to the relevant description in the user interface 31, which will not be repeated here.
  • the skin beauty option 309 and the body beauty option 310 can be represented as icons on the interface, as shown in FIG. 3D. Not limited to icons, the skin beauty option 309 and the body beauty option 310 can also be expressed as text (such as text “beauty”, “beauty”) or other forms of interactive elements (IE) on the interface.
  • icons such as text “beauty”, “beauty”
  • IE interactive elements
  • the electronic device 100 When the electronic device 100 detects a user operation acting on the skin beautification option 309 (such as a click operation on the skin beautification option 309), as shown in FIG. 3D, the electronic device 100 may display the control 311 in the user interface 33, and may Turn on the "beauty” function.
  • the "beauty” function can be used to perform skin beautification on the face image of the person being photographed in the photo preview or video preview process, so that the face represented by the face image after skin treatment is compared with the actual face of the person being photographed Skin beautification has occurred on the face, such as skin whitening, skin dermabrasion (such as removing acne, freckles, wrinkles, etc.), and so on.
  • the control 311 can be used by the user to adjust the degree of skin beauty of the person being photographed.
  • the degree of beautification may refer to the degree of beautification of the skin of the face of the photographed person.
  • the degree of skin beautification can also be called the skin beautification level.
  • the face image of the photographed person displayed in the preview frame 301 does not show skin beautification compared to the actual face of the photographed person; the beautification level 10 can represent a greater degree of the face of the photographed person Skin beautification, at this time the face represented by the face image of the photographed person displayed in the preview frame 301 has a greater degree of skin beautification than the actual face of the photographed person.
  • the electronic device 100 When the electronic device 100 detects a user operation (such as a click operation on the body option 310) acting on the body option 310, the user operation is used to select the body option 310.
  • a user operation such as a click operation on the body option 310 acting on the body option 310
  • the user operation is used to select the body option 310.
  • the electronic device 100 may The control 312 is displayed in the interface 33, and the "Body" function can be turned on.
  • the "Beauty” function can be used to perform body treatment on the body image of the person being photographed during the photo preview or video preview process, so that the body image after the body treatment performs a body beautification compared to the actual body shape of the person being photographed.
  • the control 312 may be a slider.
  • the control 312 can be used by the user to adjust the beauty of the person being photographed.
  • the degree of beautification may refer to the degree of beautification of the body of the person being photographed.
  • the body level can also be called the body level.
  • the body image of the photographed person displayed in the preview box 301 is consistent with the actual body shape of the photographed person, that is, no beautification occurs; the body level 10 can represent a greater degree of body beautification of the body of the photographed person.
  • the body image of the photographed person displayed in the preview frame 301 has a greater degree of body beautification than the actual shape of the photographed person.
  • the skin beauty option 309 may be the option selected by default. That is, when a user operation for turning on the character beautification function is detected, the electronic device 100 may display the user interface shown in FIG. 3D by default.
  • the body style option 310 may be the option selected by default. That is, when a user operation for turning on the character beautification function is detected, the electronic device 100 may display the user interface shown in FIG. 3E by default.
  • the user operation for turning on the character beautification function may be the aforementioned user operation acting on the portrait mode option 302B, and the aforementioned user operation acting on the character beautification mode option.
  • the display state of the beauty option 309 may indicate that the beauty option 309 has been selected; when the beauty option 310 is selected.
  • the display state of the body style option 310 may indicate that the body style option 310 has been selected.
  • the display state in which the skin beauty option 309 (or body beauty option 310) has been selected may be the highlight skin beauty option 309 (or body beauty option 310).
  • the display state may also present other interface expressions.
  • a prompt message 308 may be output in the preview box 301,
  • the prompt information 308 may be the text “No person detected”, which may be used to prompt the electronic device 100 that no person is detected.
  • the electronic device 100 can detect whether the color image collected by the 3D camera module 193 includes a face image. If the face image is included, it is determined that a person is detected, otherwise it is determined that no person is detected.
  • a prompt message 308 may be output in the preview box 301, prompting
  • the information 308 may be the text "No person detected", which may be used to prompt the electronic device 100 that no person has been detected.
  • the electronic device 100 may analyze whether the color image collected by the 3D camera module 193 contains human bone points based on the bone point recognition technology. If the human bone points are included, it is determined that a person is detected, otherwise it is determined that no person is detected. The specific implementation of determining human bone points based on bone point recognition technology will be described in detail in the subsequent content, and will not be expanded here first.
  • FIGS. 4A-4G exemplarily show a UI embodiment for beautifying a photographed person during a photo preview.
  • the 3D camera module 193 can collect the image of the person 411.
  • the image of the person 411 may be an image of the front body of the person 411 or an image of the back body of the person 411.
  • the image of the person 411 may include a body image and a face image.
  • the body image may include images of multiple partial bodies (eg, legs, waist, shoulders, stomach, etc.).
  • the electronic device 100 may determine that the person has been detected and may be used to detect A user operation of performing a body treatment on the image of the person photographed in the preview frame 301. This user operation may be referred to as a first user operation.
  • the electronic device 100 may update the display content in the preview frame 301, and display the image of the photographed person after the body treatment in the preview frame 301.
  • the image of the photographed person after the body treatment displayed in the preview frame 301 may be referred to as a second image.
  • the image of the captured person (that is, the foreground image) collected by the 3D camera module displayed in the preview frame 301 may be referred to as a first image.
  • the contour of the first body part of the photographed person in the second image can be adjusted according to the first body parameters
  • the contour of the second body part of the photographed person in the second image can be adjusted according to the second body parameters
  • the first part and the second part may be different
  • the first body parameter and the second body parameter may be different. That is to say, the electronic device 100 can use different body parameters to adjust the contours of different body parts in the first image to obtain the contours of different body parts in the second image.
  • the first user operation may specifically include a second user operation acting on the control 312 (such as a rightward sliding operation on the control 312), and a third user operation acting on the control 312 (such as a leftward operation on the control 312) Slide operation).
  • a second user operation acting on the control 312 such as a rightward sliding operation on the control 312
  • a third user operation acting on the control 312 such as a leftward operation on the control 312) Slide operation.
  • the electronic device 100 does not perform the body treatment on the body image of the person 411.
  • the figure represented by the body image of the person 411 displayed in the preview frame 301 matches the actual figure of the person 411.
  • the body image of the person 411 displayed in the preview frame 301 is the first image of the captured person.
  • the electronic device 100 can detect a second user operation (such as a rightward sliding operation on the control 312) acting on the control 312, and the second user operation can be used to increase the body level corresponding to the character 411 (such as from Body level 7 is increased to body level 10).
  • the electronic device 100 may refresh the display content in the preview box 301.
  • the body image of the person 411 in the preview frame 301 after refreshing is more beautified than the body image of the person 411 in the preview frame 301 before refreshing.
  • body beautification can include one or more of the following: beautification of body proportions (such as elongated legs, widened shoulders, etc.), and the whole body or partial body (such as waist, legs, stomach, shoulders, etc.) Fat and thin to adjust.
  • Beautifying the body ratio can refer to adjusting the length and width of each part of the body according to the human body aesthetics, so that the adjusted body ratio is closer to the standard body ratio defined by the human body aesthetics, such as the golden ratio of the upper and lower body (with the navel as the boundary, upper The lower body ratio is about 5 to 8).
  • the beautification of body proportions can also be not limited to human body aesthetics. For example, the person to be photographed that satisfies the golden ratio of the upper and lower body can still stretch his legs to show the advantage of stature with protruding legs.
  • the outline of the first part in the second image in the preview frame after refreshing is compared with the outline of the first part in the second image in the preview frame before refreshing, and The difference in the outline of the first part in the first image is greater.
  • the contour of the second part in the second image in the preview frame after refreshing is larger than the contour of the second part in the first image.
  • the electronic device 100 can detect a third user operation acting on the control 312 (such as a leftward sliding operation on the control 312), and the third user operation can be used to lower the body level corresponding to the character 411 (such as from The body level 10 is reduced to the body level 7), in response to the third user operation, the display content in the preview box 301 can be refreshed.
  • the body image of the person 411 in the preview frame 301 after refreshing is closer to the actual body shape of the person 411 than the body image of the person 411 in the preview frame 301 before refreshing.
  • the outline of the first part in the second image in the preview frame after refreshing is compared with the outline of the first part in the second image in the preview frame before refreshing, and The difference in the outline of the first part in the first image is smaller.
  • the contour of the second part in the second image in the preview frame after refreshing is smaller than the contour of the second part in the second image in the preview frame before refreshing, and the contour of the second part in the first image is smaller.
  • body level 5 or other body levels may be the default body level of the “Body” function, so that the user can click the “Body option 310” to open the “Body” function and see in the preview box 301 To the image of the person who has been processed by the body, the user can directly click on the control 303 to save the image of the person 411 that has been processed by the body.
  • the operation is simple and the use efficiency is high.
  • the default body level is body level 5, which is in the middle of the control 312, then the sliding distance required by the user to manually adjust the body level to the left or right can be greatly reduced, which can save user operations and improve the use efficiency.
  • the electronic device 100 can successively detect multiple user operations to improve the body level, and can refresh the display content in the preview box 301 multiple times, so that Compared with the body image before the refresh, the body image after each refresh has a body beautification, which can provide a visual effect of gradually enhancing the body beautification in the preview box 301.
  • the electronic device 100 can successively detect multiple user operations that lower the body level, and can refresh the display content in the preview box 301 multiple times. Provides a visual effect that gradually diminishes beautification.
  • both the third user operation or the third user operation are used to select a body shape level for the photographed person 411, and the electronic device 100 may utilize the selected body level ( For example, the beauty parameters corresponding to the beauty level 5) perform a body treatment on the body image of the person 411 collected by the 3D camera module 193, so as to obtain the body image of the person 411 displayed in the refreshed preview frame 301.
  • the electronic device uses the beauty parameters corresponding to the selected beauty level to perform the body treatment on the body image of the person 411, details will be described in the subsequent method embodiments, and details are not described here.
  • the electronic device 100 may display a prompt message (such as the text "pregnant woman detected") in the preview box 301, the prompt message may be Prompt character 411 is a pregnant woman.
  • the electronic device 100 can use the beauty parameters corresponding to the selected beauty level to perform beautification on the color images of other partial bodies of the person 411 (such as arms, legs, and shoulders) Processing without performing body treatment on the belly image of the person 411 to retain the characteristics of the pregnant woman.
  • the electronic device 100 may also display a switch control in the preview box 301.
  • the switch control When the switch control is in the "on” state, it means that the characteristics of pregnant women are retained, that is, the electronic device 100 does not perform body treatment on the belly image; when the switch control is in the "off” state, it means that the characteristics of the pregnant woman are not retained, that is, the electronic device 100 can be Fig. 4A shows body contouring on the belly image to show the effect of thin belly.
  • the electronic device 100 may still use the body parameters corresponding to the selected body level to perform body treatment on the current person being photographed.
  • the electronic device 100 can refresh the display content in the preview box 301, the image of the person 411 displayed in the refreshed preview box 301 includes the face The image and the body image, wherein the face image is a face image after skin treatment, and the body image is a body image that has undergone body treatment using the body parameters corresponding to the selected body level.
  • the user can continue to beautify the skin of the photographed person on the basis of the beautification of the photographed person to achieve a more comprehensive beautification effect. Conversely, the user can continue to beautify the photographed person on the basis of the skin beautification of the photographed person.
  • the electronic device 100 may also perform a beautification process on the body image of the photographed person in response to the user operation for selecting the body-beauty level, so as to realize the beautification of the photographed person in other poses.
  • FIGS. 5A-5D exemplarily show a UI embodiment in which the beautification is cancelled during the photo preview.
  • FIGS. 5A-5B exemplarily show a UI embodiment for revoking a partial body
  • FIG. 5C-5D exemplarily show a UI embodiment for revoking a whole-body body with one click.
  • the partial body where the figure 411 has been beautified includes: left arm, right arm, stomach, left leg, and right leg. These partial bodies were respectively beautified as follows: thin left arm, thin right arm, thin belly, elongated left leg, elongated right leg.
  • the electronic device 100 may display the undo icon 501 on the images of these partial beautified bodies. In this way, the user can click the undo icon 501 on the partial body image to undo the beautification of the partial body.
  • the electronic device 100 can detect a user operation of the undo icon 501 (such as a click operation on the undo icon 501) acting on the belly image of the person 411. In response to this operation, the electronic device 100 can refresh the display content in the preview box 301, the shape of the belly represented by the belly image of the person 411 in the preview box 301 after refreshing matches the actual shape of the belly of the person 411, and the preview before refreshing The belly image of the character 411 in the frame 301 is thinner than the actual belly of the character 411.
  • a user operation of the undo icon 501 such as a click operation on the undo icon 501 acting on the belly image of the person 411.
  • the electronic device 100 can refresh the display content in the preview box 301, the shape of the belly represented by the belly image of the person 411 in the preview box 301 after refreshing matches the actual shape of the belly of the person 411, and the preview before refreshing
  • the belly image of the character 411 in the frame 301 is thinner than the actual belly of the character 411.
  • the electronic device 100 can detect a user operation (such as a click operation on the undo icon 501) of the undo icon 501 acting on the partial body image of the person being photographed.
  • the partial body image is the selected partial body image.
  • the electronic device 100 may refresh the preview box 301.
  • the shape of the partial body represented by the selected partial body image in the preview box 301 after refreshing is consistent with the actual shape of the partial body of the person being photographed, and the representation of the selected partial body image in the preview box 301 before refreshing Compared to the actual part of the person being photographed, the part of the body has been beautified.
  • FIGS. 5A-5B can support the user to cancel the body treatment of the partial body of the person being photographed in the preview box 301, so that the user can retain the original features of certain body parts (such as a sturdy and thick arm), which can be more Flexible to meet the user's body needs.
  • certain body parts such as a sturdy and thick arm
  • the electronic device 100 may display the one-key undo icon 503 in the preview box 301. In this way, the user can click the one-key undo icon 503 to undo all body treatments performed on the entire body.
  • the electronic device 100 can detect a user operation (such as a click operation on the icon 503) acting on the one-key undo icon 503. In response to this operation, the electronic device 100 can refresh the display content in the preview box 301.
  • the body image of the person 411 in the preview box 301 after refreshing shows the same shape as the actual figure of the person 411, while the preview box 301 before refreshing
  • the figure represented by the body image of the person 411 is beautified compared to the actual figure of the person 411.
  • FIGS. 5C-5D can support the user to cancel the whole body body performed on the photographed person in the preview box 301 with one key, the operation is simple and effective, and the use efficiency can be improved.
  • FIGS. 6A-6G exemplarily show some UI embodiments for pushing fitness information during a photo preview.
  • Fitness information can include fitness classes, fitness methods, fitness diet, etc.
  • fitness information may be referred to as the first content.
  • FIGS. 6A-6D exemplarily show UI embodiments for pushing fitness information when the rear camera module shoots
  • FIGS. 6E-6G exemplarily show UI implementations for pushing fitness information when the front camera module shoots example.
  • the image of the person 411 displayed in the preview frame 301 is collected by the rear 3D camera module 193 of the electronic device 100.
  • the person 411 is usually not a photographer holding the electronic device 100, but a friend, relative, etc. of the photographer. The photographer can share the fitness information with the photographed person 411 to help or encourage the photographed person 411 to exercise.
  • the electronic device 100 can display the control 601 and the prompt information 603 in the preview box 301.
  • the control 601 can be used to monitor user operations that share fitness information.
  • the prompt information 603 can be used to prompt the user to click the control 601 to share fitness information such as fitness classes, fitness methods, fitness diets, and the like with the characters 411.
  • the prompt information 603 may gradually disappear in the preview box 301 after being displayed for a period of time (eg, 1 second).
  • the user can also cancel the display of the prompt information 603 by swiping up or left on the prompt information 603.
  • the electronic device 100 can detect a user operation (such as a click operation on the control 601) acting on the control 601. In response to this operation, the electronic device 100 may display a user interface 605 for sharing fitness information. The user can select a contact in the user interface 605 to share fitness information with the contact. The electronic device 100 may detect a user operation of selecting a contact to share fitness information in the user interface 605. In response to this operation, the electronic device 100 can share fitness information with the selected contact.
  • a user operation such as a click operation on the control 601 acting on the control 601.
  • the electronic device 100 may display a user interface 605 for sharing fitness information.
  • the user can select a contact in the user interface 605 to share fitness information with the contact.
  • the electronic device 100 may detect a user operation of selecting a contact to share fitness information in the user interface 605. In response to this operation, the electronic device 100 can share fitness information with the selected contact.
  • the user interface 605 may be exemplarily shown in FIG. 6C.
  • the user interface 605 may be a recent chat interface of the application "WeChat", and the conversation list 605-1 in the interface may be used to display a conversation in which one or more conversations have recently occurred. entry. These multiple conversations are associated with different contacts, such as "MAC”, "Kate”, “William”, etc.
  • the electronic device 100 can detect a user operation of selecting a contact, such as a click operation on the conversation item of the user and the contact "Kate", and in response to the operation, the electronic device 100 can share fitness information with the selected contact "Kate” , And can display the user and contact "Kate” dialogue interface 607.
  • the dialogue interface 607 may be exemplarily shown in FIG.
  • a message 607-1 sent by the user to the contact "Kate” may be displayed.
  • Message 607-1 may include a brief description of fitness information.
  • the message 607-1 may also be associated with a link to fitness information, which may be provided by a third-party fitness application. In this way, the contact "Kate" can click the message 607-1 to open the link after receiving the message 607-1, so that he can jump to the user interface of the third-party fitness application to view fitness information.
  • the user interface 605 for sharing fitness information can also be the user interface of other social applications or other data sharing functions (such as Apple's AirDrop, Huawei's Huawei Share (Guawei, Share, etc.) provides a user interface for sharing data. In this way, it is easy to promote the fitness information, and it is convenient for the photographed person to obtain fitness information, which can encourage or help the photographed person to exercise.
  • other social applications or other data sharing functions such as Apple's AirDrop, Huawei's Huawei Share (Guawei, Share, etc.
  • the image of the person 411 displayed in the preview frame 301 is collected by the front-mounted 3D camera module 193 of the electronic device 100.
  • the person 411 may generally be (or include) a photographer holding the electronic device 100.
  • the electronic device 100 can display the control 608 and the prompt information 606 in the preview box 301.
  • the prompt information 606 can be used to prompt the user to click the control 608 to view fitness information.
  • the control 608 in the preview box 301 can be used to monitor user operations that open fitness information instead of sharing fitness information. In this way, it is convenient for the photographer to obtain fitness information such as fitness classes, fitness guidance, and fitness diet plans when taking a self-portrait, thereby improving the user experience.
  • the electronic device 100 can detect a user operation (such as a click operation on the control 608) acting on the control 608. In response to this operation, the electronic device 100 can display fitness information.
  • the fitness information may be specifically displayed in the user interface 609 exemplarily shown in FIG. 6G.
  • the user interface 609 may be a user interface of a third-party fitness application program (such as "ABC Fitness"), and the specific implementation of the user interface is not limited in this application.
  • the fitness information may be related to the body-level selected for the person being photographed. For example, the higher the body-level, the higher the difficulty of the fitness class.
  • the fitness information can also be related to the gender, age and other characteristics of the person being photographed. For example, if the person being photographed is a female, the fitness information can be a fitness class suitable for women.
  • Fitness information can also be related to the current shape of the person being photographed. For example, the fatter the person being photographed, the more difficult the fitness of the fitness class.
  • the electronic device 100 may specifically display the control 601 or the control 608 in the preview box 301 in the following situations:
  • Case 1 After detecting that the user selects the beauty level, the time for keeping the selected beauty level unchanged does not exceed a specific duration (such as 1 second).
  • Case 2 It is detected that the user clicks the control 303 under the selected beauty level to trigger shooting, and the selected beauty level may be a beauty level other than the beauty level 0.
  • both case 1 and case 2 can indicate that the user is satisfied with the body shape of the photographed person presented in the preview box 301 at the selected beauty level.
  • the electronic device 100 may also display the control 601 or the control 608 in the preview box 301 in other cases, so that the photographer can share fitness information with the person being photographed or the photographer can open the fitness information by himself.
  • FIGS. 7A-7G exemplarily show other UI embodiments for pushing fitness information during a photo preview.
  • FIGS. 7A-7D exemplarily show UI embodiments for pushing fitness information when shooting with the rear camera module
  • FIGS. 7E-7G exemplarily show UI implementations for pushing fitness information when shooting with the front camera module example.
  • FIG. 7A-7G embodiments can refer to FIG. 6A-6G embodiments. Different from the embodiment of FIGS. 6A-6G, the electronic device 100 may display prompt information 703 in the preview box 301.
  • the prompt information 703 can be used to prompt the difference between the contour of the first part in the second image and the contour of the first part in the first image, the second part in the second image The difference between the outline of and the outline of the second part in the first image.
  • the second image is the image of the photographed person after the body treatment displayed in the preview frame 301
  • the first image is the image of the photographed person collected by the 3D camera module.
  • the contours of the body parts of the photographed person in the first image are consistent with the actual contours. These differences can be expressed as: differences in waist circumference, differences in leg circumference, differences in leg length, differences in shoulder width and so on.
  • the prompt information 703 can also be used to prompt one or more of the following manifestations: weight to be lost, amount of exercise required, calories to be consumed, and so on.
  • the weight that needs to be lost is used to prompt how much weight the person to be photographed needs to lose to approach or reach the body shape represented by the body image displayed in the preview box 301.
  • the required amount of exercise is used to indicate how much exercise the person to be photographed needs to approach or reach the figure represented by the body image displayed in the preview box 301.
  • the calories that need to be consumed are used to indicate how much calories the person to be shot needs to approach or reach the body shape represented by the body image displayed in the preview box 301.
  • the gap can be the text "You still need to be away from your ideal size: weight loss 5KG aerobic run 100KM consumes 7000 calories”. This makes it easier for users to understand fitness goals and encourages users to exercise to achieve their ideal body shape.
  • the ideal body shape may be the body shape displayed in the preview box 301 at the currently selected beauty level.
  • the prompt information 703-1 can also be displayed in the prompt information 703.
  • the prompt information 703-1 can be used to prompt the user to click the prompt information 703-1 to share fitness information with the photographed person 411.
  • the electronic device can detect a user operation acting on the prompt information 703-1 (such as a click operation on the prompt information 703-1).
  • the electronic device 100 may display a user interface 705 for sharing fitness information.
  • the user can select a contact in the user interface 705 to share fitness information to the contact.
  • the electronic device 100 may detect a user operation of selecting a contact to share fitness information in the user interface 705.
  • the electronic device 100 can share fitness information with the selected contact.
  • the prompt information 706 may also be displayed in the prompt information 706.
  • the prompt information 706-1 can be used to prompt the user to click the prompt information 706-1 to share fitness information with the person 411 to be photographed.
  • the electronic device can detect a user operation (such as a click operation on the prompt information 706-1) acting on the prompt information 706-1.
  • the electronic device 100 can display fitness information.
  • 8A-8B exemplarily show UI embodiments before and after beautification of a comparison body during a photo preview.
  • the electronic device 100 may
  • the control 801 is displayed in the preview box 301.
  • the electronic device 100 can detect a user operation acting on the control 801, such as on the control 801 Press and hold the user operation without releasing. In response to this operation, the electronic device 100 can refresh the display content in the preview frame 301, and the refreshed preview frame 301 displays the body image of the person 411 actually collected by the 3D camera module 193.
  • the electronic device 100 can detect the user acting on the control 801 An operation, such as a user operation of releasing the control 801 (that is, releasing the control 801 when it is no longer held). In response to this operation, the electronic device 100 may refresh the display content in the preview frame 301, and the body image of the person 411 displayed in the refreshed preview frame 301 is the body image after the body treatment.
  • the user can compare the body image of the person 411 actually collected by the 3D camera module 193 with the body image of the person 411 displayed in the refreshed preview frame 301.
  • 9A-9C exemplarily show a UI embodiment in which a user takes a photo.
  • the body shape of the photographed person 411 in the preview frame 301 has a beautification compared to the actual shape of the photographed person 411.
  • the electronic device 100 can detect a user operation (such as a click operation on the control 303) acting on the control 303, and in response to the operation, the electronic device 100 can save the image in the preview box 301, and can also display the saved in the control 304 Thumbnail of the image. Because the currently selected camera option is a portrait mode option, the image in the preview box 301 can be saved as a photo.
  • the electronic device 100 can also detect a user operation (such as a click operation on the control 304) acting on the control 304, and in response to the operation, the photo 801 recently saved by the electronic device 100 can be displayed. In this way, the user can view the image in the preview frame 301 that has just been saved, and the body image of the photographed person 411 included in the image is more beautified than the actual shape of the photographed person 411.
  • a user operation such as a click operation on the control 304
  • FIGS. 10A-10C exemplarily show a UI embodiment for beautifying a photographed person during video preview.
  • the electronic device 100 can detect a user operation (such as a click operation on the recording mode option 302D) acting on the recording mode option 302D, and in response to the user operation, the electronic device 100 can turn on the recording function, and
  • the user interface shown exemplarily in FIGS. 10A to 10C is displayed.
  • the user interface shown in FIGS. 10A to 10C can be specifically referred to the aforementioned UI embodiment for beautifying the photographed person during the photo preview, which will not be repeated here. The difference is that at this time the control 303 can be used to monitor user operations that trigger recording.
  • the recording mode option 302D may be referred to as the second shooting mode option.
  • the electronic device 100 can respond to the detected user operation on the control 303,
  • the image in the preview box 301 can be started to record, and the user interface during recording can be displayed.
  • the user interface during recording may be exemplarily shown in FIG. 10D.
  • the electronic device 100 can respond to the detected user operation on the control 10D-1, can end recording the image in the preview box 301, and can save the recorded image as a video, and display the saved in the control 304 Thumbnail of your video.
  • the display content in the preview box 301 is updated regularly, for example, every 10 ms.
  • the body image of the photographed person displayed in the preview frame 301 may be the body image of the body of the photographed person using the body parameters corresponding to the selected body level.
  • the electronic device 100 can also detect a user operation (such as a click operation on the control 304) acting on the control 304, and in response to the operation, the video 10F-1 recently saved by the electronic device 100 can be displayed. In this way, the user can view the video that has just been saved, and the body image of the photographed person 411 included in the video is subjected to body treatment on the body image of the photographed person using the body parameters corresponding to the selected body level.
  • a user operation such as a click operation on the control 304
  • the user can beautify the person being photographed before starting to record.
  • the body image of the photographed person displayed in the preview box 301 has been subjected to body treatment using the body parameters corresponding to the body level selected before starting the recording. In this way, the body shape of the photographed person's body image will be consistent throughout the video recording process.
  • the user interface in the recording may also include a control 312 for adjusting the beauty level and/or a control 3311 for adjusting the beauty level, so that the user can also adjust The figure's body level and/or skin level.
  • the electronic device 100 may adopt the default body contour level (such as the body contour level 5) or the body contour parameter corresponding to the previously selected body contour level Take a body image of the person's body image for body treatment.
  • Some UI embodiments during the photo preview described in the foregoing content such as the embodiment of undoing the beautification shown in FIGS. 5A-5D, and the embodiment of pushing fitness information shown in FIGS. 6A-6G and 7A-7G
  • the embodiments before and after the beautification of the figure shown in FIGS. 8A-8B, and subsequent UI embodiments are also applicable to the figure beautification in the recording scene, which will not be repeated here.
  • FIGS. 11A to 11E exemplarily show an embodiment of a UI for beautifying a photographed person using a figure template.
  • the user interface 33 may further display a control 11B-1.
  • the control 11B-1 can be used to monitor and view user operations of the open-body template.
  • the electronic device 100 can detect a user operation (such as a click operation on the control 11B-1) acting on the control 11B-1, and in response to the operation, the user interface exemplarily shown in FIG. 11B may be displayed.
  • the user interface may include a preview box 301, a control 303, a control 304, a control 305, a shooting mode list 302, and a figure template list 11B-2.
  • the body template list 11B-2 may display one or more body template options 11B-3. Different figure templates can represent different figures.
  • the preview box 301, the control 303, the control 304, the control 305, and the shooting mode list 302 reference may be made to the description in the foregoing embodiment, and details are not repeated here.
  • the electronic device 100 can detect a user operation (such as a click operation on the body template option 11B-3) acting on the body template option 11B-3, which can be used to select a body template, such as Figure template "Kate".
  • a user operation such as a click operation on the body template option 11B-3 acting on the body template option 11B-3, which can be used to select a body template, such as Figure template "Kate”.
  • the user interface exemplarily shown in FIG. 11C may be displayed.
  • the user interface may include icons 11B-4, controls 314, a shooting mode list 302, controls 303, controls 304, and controls 305.
  • the icon 11B-4 can be used to indicate the selected figure template.
  • the control 314 can be used to select a beauty level. The higher the beauty level, the closer the body image of the photographed person displayed in the preview box 301 is to the body type represented by the body shape template.
  • the control 303, the control 304, the control 305, and the shooting mode list 302 reference may be made to
  • the electronic device 100 may detect the first user operation (such as a rightward sliding operation on the control 314) acting on the control 314, the first user The operation can be used to increase the figure level corresponding to the character 411 (eg, from figure level 7 to figure level 10).
  • the electronic device 100 can refresh the display content in the preview box 301, and the body image of the person 411 in the preview box 301 after refreshing is compared with the figure of the person 411 in the preview box 301 before refreshing The figure represented by the body image is closer to the figure represented by the selected figure template.
  • the higher the body contour level the closer the body shape of the person 411 in the preview frame 301 is to the body shape represented by the selected body shape template.
  • the body contour level is 10 (the highest body contour level)
  • the body image represented by the body image of the person 411 in the preview frame 301 is consistent with the body shape represented by the selected body template.
  • the electronic device 100 may detect a second user operation (such as a leftward sliding operation on the control 314) acting on the control 314, the second user The operation can be used to lower the figure level corresponding to the character 411 (for example, from figure level 10 to figure level 7).
  • the electronic device 100 can refresh the display content in the preview box 301, and the body image of the person 411 in the preview box 301 after refreshing is compared with the figure of the person 411 in the preview box 301 before refreshing The figure represented by the body image is closer to the actual figure of the person 411.
  • the body template options displayed in the body template list 11B-2 may be related to the gender, age, and other characteristics of the person being photographed. For example, if the person to be photographed is a female, a body template suitable for women is displayed in the body template list 11B-2, and a body template suitable for men is not displayed.
  • the electronic device 100 may refresh the display content in the preview box 301, and the refreshed preview box 301 represents the body image of the photographed person.
  • the figure is the same as the figure represented by the selected figure template. That is to say, the user can directly beautify the figure of the person being photographed to be the same as the figure represented by the figure template by clicking the figure template option.
  • 12A-12C exemplarily show a one-click UI embodiment for full-body beautification.
  • the user interface 33 may also display a control 12B-1.
  • the electronic device 100 can detect a user operation (such as a click operation on the control 12B-1) acting on the control 12B-1, and in response to the operation, the user interface exemplarily shown in FIG. 12B may be displayed.
  • the user interface may include a preview box 301, a control 303, a control 304, a control 305, a shooting mode list 302, a control 313, and an icon 12B-2.
  • the icon 12B-2 can be used to indicate that the currently selected character beautification method is full-body beautification.
  • Full-body beautification may refer to facial beautification and body beautification of the person being photographed.
  • the control 313 can be used for the user to select the level of full-body beautification.
  • the control 303, the control 304, the control 305, and the shooting mode list 302 reference may be made to the description in the foregoing embodiment, and details are not repeated here.
  • the electronic device 100 can detect a user operation for selecting a full-body beautification level, and in response to the operation, the electronic device 100 can beautify the body image of the person being photographed according to the selected full-body beautification level
  • the face image of the photographed person is subjected to skin beautification processing, and the preview frame 301 is refreshed.
  • the preview box 301 displays the image of the photographed person who has undergone the body treatment and skin treatment.
  • the higher the overall beautification level the greater the difference between the body image of the photographed person displayed in the preview frame 301 and the actual body shape of the photographed person. The greater the difference in the actual facial skin of the person photographed.
  • the one-button UI embodiment for full-body beautification shown in FIGS. 12A to 12C can quickly realize the whole-body beautification of the photographed person, the operation is simple and effective, and the use efficiency of the electronic device can be improved.
  • 13A to 13D exemplarily show a UI embodiment for beautifying multiple people.
  • the electronic device 100 can respond to the detected user operation for selecting the body-level, using the The body parameters corresponding to the selected body level perform body processing on the body images of the plurality of photographed persons, and refresh the display content in the preview box 301.
  • the refreshed preview frame 301 displays the body images of the plurality of photographed persons after the body treatment. That is to say, the user can beautify the plurality of photographed people with the same beauty level.
  • the electronic device 100 can detect a user operation to select the captured person (such as when shooting Click operation on the image of the character), and a user operation to select a body level is detected. In response to this operation, the electronic device 100 can perform the body treatment on the body image of the selected photographed person using the body parameters corresponding to the selected body level, and refresh the display content in the preview box 301.
  • the refreshed preview frame 301 displays the body image of the selected photographed person and the body image of the unselected photographed person.
  • the body image of the selected photographed person has undergone body treatment and is not The body image of the selected person to be photographed has not undergone body treatment. That is to say, the user can select a certain person or persons from the plurality of shot persons for beautification.
  • the electronic device 100 may recognize the image of a specific person from the images of the plurality of captured persons collected by the 3D camera module 193, such as the owner of the electronic device 100.
  • the electronic device 100 may perform body treatment on the image of the specific person by default.
  • the electronic device 100 can use the image data stored on the electronic device 100 (such as photos in a gallery) to identify the image of a specific person from the images of multiple photographed persons, for example, the face image in the image of the specific person
  • the facial images in the pictures marked, favorited or named in the gallery show the same facial features.
  • 14A-14B exemplarily show a UI embodiment for manually performing beautification.
  • the electronic device 100 can detect a user operation acting on the body image of the photographed person, as shown in FIG. 14A, a pinch gesture on the belly image. In response to the operation, the electronic device 100 may determine the partial body image selected by the operation, and then perform body treatment on the partial body image.
  • the magnitude of the user's operation can determine the degree of body treatment. For example, the greater the magnitude, the greater the degree of body treatment.
  • the user can slim down a body part through a pinch operation on the body part.
  • the stretching gesture on the leg image can be used to lengthen the leg, and the pressing operation on the tummy image can also be used to thin the belly.
  • 15A to 15D exemplarily show a UI embodiment for beautifying a person in a captured picture.
  • the electronic device 100 may mark such a picture in the gallery, for example, displaying an indicator 15A-1 on the thumbnail of the picture .
  • the indicator 15A-1 can be used to indicate that the image of the person in the picture has undergone body treatment and/or skin treatment.
  • the user interface displaying the picture 15B-1 may also display the control 15B-2.
  • the electronic device 100 may display the control 312, the control 309, and the control 310 in the user interface displaying the picture 15B-1.
  • the control 312, the control 309, and the control 310 reference may be made to the foregoing content, and details are not described here.
  • the electronic device 100 can use the body parameters corresponding to the selected body level to perform the body image of the person in the picture 15B-1 Perform body treatment and refresh picture 15B-1.
  • the body image of the person's body image in the refreshed picture 15B-1 is more beautified than the body image of the person's body image in the before-refresh picture 15B-1.
  • the picture 15B-1 may also include pictures that have not been subjected to body treatment or skin treatment.
  • the user can beautify the figures in the photo after the photo is taken.
  • the user can also beautify the figures in the captured video.
  • FIGS. 15A to 15D For specific implementation, refer to the embodiments in FIGS. 15A to 15D, and details are not described here.
  • the image of the photographed person collected by the 3D camera module 193 displayed in the preview frame 301 may be referred to as the first image of the photographed person, and the image of the photographed person displayed in the preview frame 301 after the body treatment It can be called the second image of the person being photographed.
  • control 312 may be referred to as a first control
  • control 801 may be referred to as a second control
  • the prompt information 703 in the embodiments of FIGS. 7A-7G may be referred to as first prompt information.
  • the method may include:
  • the electronic device can turn on the 3D camera module and collect color images and depth images through the 3D camera module.
  • the color image may include an image of a person being photographed (ie, a foreground image) and a background image.
  • the depth image may include depth information of the person being photographed.
  • the color image may include a plurality of pixels, and each pixel has two-dimensional coordinates and color values.
  • the color value can be an RGB value or a YUV value.
  • the depth image may include a plurality of pixels, each pixel having two-dimensional coordinates and a depth value.
  • the color value of the corresponding pixel in the color image of the position represents the color of the position (for example, the color of clothing, the color of bare skin, etc.), and the position corresponds to the depth image
  • the depth value of the pixel indicates the vertical distance between the position and the electronic device (specifically a 3D camera module).
  • the two-dimensional coordinates of the corresponding pixel point of the position A in the color image is (x1, y1), the pixel point
  • the RGB value of is (255,255,255);
  • the two-dimensional coordinates of the corresponding pixel in position A in the depth image are (x1,y1), and the depth value of the pixel is 350 cm.
  • the color at position A is white, and the vertical distance between position A and the electronic device is 350 cm.
  • the RGB value (0,0,0) of the pixel corresponding to the location B in the color image and the pixel corresponding to the location B in the depth image A depth value of 345 cm can indicate that the color at position B is black, and the vertical distance between position B and the electronic device is 345 cm.
  • the two-dimensional coordinates of each photographed part of the photographed person, the depth value relative to the 3D camera module, and the color value can be determined.
  • the two-dimensional coordinates and depth values may represent 3D coordinates.
  • the color image and the depth image shown in FIGS. 17A and 17B can be combined into a distribution of color values in a 3D coordinate space, as shown in FIG. 17C.
  • the z axis represents the depth value.
  • the RGB value at the 3D coordinate is (255,255,255)
  • the 3D coordinate of position B is (x2,y2,z2)
  • z2 345 Cm
  • the RGB value at this 3D coordinate is (0,0,0).
  • the photographed part refers to the part captured by the 3D camera module.
  • the photographed part of the photographed person may include a face, stomach, etc.
  • the buttocks and back are not the part to be photographed.
  • the electronic device may display a first user interface.
  • the first user interface may be a user interface provided by the character beautification function of the "camera" application.
  • the user interface may be the user interface shown in FIGS. 4A-4G, the user interface shown in FIGS. 5A-5D, the user interface shown in FIGS. 6A-6G, or the user interface shown in FIGS. 7A-7H.
  • User interface the user interface shown in FIGS. 13A-13D.
  • the first user interface is the user interface shown in FIGS. 4A-4G, the user interface shown in FIGS. 5A-5D, the user interface shown in FIGS. 6A-6G, or the one shown in FIGS. 7A-7H User interface, the user interface shown in FIGS. 8A-8B, the user interface shown in FIGS. 9A-9C, the user interface shown in FIGS. 10A-10G, the user interface shown in FIGS. 12A-12C, and FIG. 13A- The user interface shown in FIG. 13D.
  • the body treatment method adopted by the electronic device in the subsequent S108 is the body treatment method 1.
  • the body style option 310 is in a selected state, and the control 312 can be used for the user to select the body style for the person being photographed.
  • the control 312 can be used for the user to select the body style for the person being photographed.
  • the body treatment method adopted by the electronic device in subsequent S108 is the body treatment method 2.
  • the first user interface can be used for the user to select a beauty template for the photographed person, and can also be used for the user to adjust the beauty level under the selected beauty template.
  • the user operation of the user selecting the beauty template and adjusting the beauty level reference may be made to the embodiments of FIGS. 11A to 11E in detail, and details are not described here.
  • the electronic device can use the color image of the photographed person and the human bone point positioning algorithm to identify the skeleton point of the person.
  • recognizing the bone point means identifying the 2D coordinates of the bone point.
  • the 2D coordinates of the identified bone point and the depth value of the bone point determined in S104 can be used by the electronic device to determine the body shape of the photographed person in subsequent S106, and can also be used by the electronic device to determine the photographed person and electronic equipment in subsequent S105 The angle between the planes.
  • the input of the human bone point positioning algorithm may be a color image of the human body
  • the output of the human bone point positioning algorithm may be the 2D coordinates of the human bone point.
  • the electronic device can specifically take the color image of the photographed person as input and obtain the 2D coordinates of each bone point in the color image of the photographed person through the human bone point positioning algorithm.
  • the electronic device can recognize the basic human bone points shown in FIG. 18, such as head point, neck point, left shoulder point, right shoulder point, left elbow point, right elbow point, left hand point, right hand point, left hip point, Right hip point, left knee point, right knee point, left foot point, right foot point.
  • the electronic device can also recognize more or fewer human bone points.
  • the human bone point positioning algorithm is obtained by training a neural network algorithm by using a large number of human color images and human bone points in the color image as training data.
  • the reliability of the human skeleton point positioning algorithm (ie neural network algorithm) obtained by the last training is relatively high, for example, the confidence is above 90%.
  • the electronic device may use the two-dimensional coordinates of the skeleton point of the photographed person and the depth information of the photographed person identified in S102 to determine the depth value of the skeleton point of the photographed person.
  • the determined depth value of the bone point and the 2D coordinates of the bone point determined in the foregoing S103 can be used by the electronic device to determine the body shape of the photographed person in subsequent S106, and can also be used by the electronic device to determine where the photographed person and electronic device are located in subsequent S105 The angle between the planes.
  • the two-dimensional coordinates of the left hip point (position A) of the photographed person are (x1, y1). Since the pixel at the two-dimensional coordinates (x1, y1) has a depth value of 350 cm in the color image of the person being photographed, the depth value of the left hip point is 350 cm.
  • the electronic device can also determine the depth value of other body parts of the person being photographed, such as the depth value of the belly, because the depth value of the belly can be used to determine the fatness and thinness of the belly of the person being photographed.
  • the depth value of the belly may include the depth value of one or more feature points on the belly.
  • the vertical distance between each bone point of the human body and the plane where the electronic device is located is usually not equal.
  • the more common situation is that the vertical distance between the body of the upper half of the human body (such as the head) and the plane where the electronic device is located is smaller, and the vertical distance between the body of the lower half of the human body (such as the legs) and the plane where the electronic device is located The distance is larger.
  • the electronic device can correct the visual effect of "short head and thighs" by performing a perspective transformation on the color image before performing body treatment on the color image of the photographed person.
  • the electronic device may first determine the angle between the person being photographed and the plane where the electronic device is located. Then, the electronic device can calculate the perspective transformation matrix using the included angle, and finally use the perspective transformation matrix to perform perspective transformation on the color image of the photographed person.
  • the two-dimensional coordinates (x, y) of any pixel in the color image are transformed into the 3D coordinates (X, Y, Z) after the following matrix transformation:
  • the z value of any pixel is set to 1.
  • the two-dimensional coordinates (x, y) can be transformed into three-dimensional coordinates (X, Y, Z) through matrix transformation. Then X, Y can be divided by the value of Z to get x’, y’.
  • the original two-dimensional coordinates (x, y) are converted into new two-dimensional coordinates (x', y') to obtain a perspective-transformed color image.
  • the 2D coordinates of the human skeleton point after the perspective transformation can be obtained by multiplying the 2D coordinates of the human skeleton point before the perspective transformation by the transformation matrix.
  • the electronic device can determine the angle ⁇ between the person being photographed and the plane where the electronic device is located in the following two ways:
  • Method 1 The angle ⁇ is determined by the depth value of each bone point and the 2D coordinates.
  • the vertical distance between the left hip point P1 and the left knee point P2 of the person being photographed and the electronic device will be D1 and D2, respectively.
  • the electronic device can calculate multiple angle values by calculating multiple sets of bone points, and then can normalize the multiple angle values.
  • the normalized angle value can be determined as the angle ⁇ between the person being photographed and the plane where the electronic device is located.
  • Method 2 Collect the pitch angle ⁇ of the electronic device through a sensor of the electronic device (such as a gyro sensor) (value range is -180° to 180°), and determine the included angle ⁇ according to the pitch angle ⁇ .
  • the electronic device can determine the shape of the person to be photographed based on the color image of the person to be photographed and the depth information of the person to be photographed. If the electronic device performs perspective transformation on the color image collected by the 3D camera module, the color image of the photographed person may specifically be a color image after the perspective transformation of the photographed person.
  • the determined body shape of the photographed person can be used by the electronic device to perform a body treatment on the color image of the photographed person in S108.
  • the electronic device determines the figure of the person being photographed, which may include one or more of the following:
  • the electronic device can determine the length of the bone between the bone points (such as the length of the leg, the width of the shoulder, etc.), and can determine the proportion of the body of the person to be photographed, such as the head-to-body ratio, according to the length of each bone.
  • the electronic device may determine the length of the bone between the bone points according to the depth value of the bone points and the 2D coordinates of the bone points. For example, as shown in FIG. 20, the vertical distance between the left hip point P1 and the left knee point P2 of the person being photographed and the electronic device will be D1 and D2, respectively. In the color image of the photographed person, the distance L between the left hip point P1 and the left knee point P2 can be calculated from the 2D coordinates of P1 and the 2D coordinates of P2.
  • the bone length X of the thigh between the left hip point P1 and the left knee point P2 can be calculated as: If the electronic device performs perspective transformation on the color image collected by the 3D camera module, the 2D coordinates of the bone points (such as the left hip point P1 and the left knee point P2) may be the 2D coordinates of the bone points after perspective transformation.
  • the electronic device can determine the entire human body contour of the photographed person through the color image of the photographed person and the human body contour detection algorithm, and then can further determine the contour of the local body (such as the stomach, waist, and legs) between the bone points, that is, the local contour.
  • the local contour of the waist can be used to determine the waist circumference
  • the local contour of the leg can be used to determine the leg circumference, and so on. That is to say, the contour of the partial body can be used to determine the fatness and thinness of the partial body.
  • the input of the human body contour detection algorithm may be a color image of the human body
  • the output of the human body contour detection algorithm may be a set of two-dimensional coordinates representing the human body contour.
  • the electronic device can specifically take the perspective-transformed color image of the photographed person as an input, and obtain a two-dimensional coordinate set of the human body contour in the color-transformed color image after the human body contour detection algorithm.
  • the human body contour detection algorithm is obtained by training a neural network algorithm by using a large number of human body color images and a set of two-dimensional coordinates of the human body contours in the color image as training data.
  • the reliability of the human contour detection algorithm (that is, the neural network algorithm) obtained by the final training is relatively high, for example, the confidence is above 90%.
  • the smaller the depth value of the partial body the closer it is to the electronic device, and thus the higher the degree of protrusion of the partial body, that is, the fatter the partial body.
  • the protruding part is closer to the electronic device, that is, the depth value of the protruding part is smaller.
  • the electronic device Before subjecting the body image to the color image of the photographed person (S108), as shown in FIG. 21, the electronic device may divide the color image into a color image (ie, foreground image) and background image of the photographed person. Among them, (a) shows the color image of the person being photographed, and (b) shows the background image.
  • the segmented color image of the photographed person can be used for subsequent body treatment. If the electronic device performs perspective transformation on the color image collected by the 3D camera module, the divided color image may be a color image after perspective transformation.
  • body treatment refers to the processing of the body image of the photographed person, such as image stretching, image compression, shading, etc., so that the body shape of the processed body image is compared with the actual body shape of the photographed person. beautify. If the electronic device performs perspective transformation on the color image collected by the 3D camera module, the body image of the photographed person may specifically be the body image of the photographed person after perspective transformation.
  • the electronic device may perform a body treatment process when it detects a user operation for selecting a body level (that is, a user operation acting on the control 312 ).
  • a body treatment process when it detects a user operation for selecting a body level (that is, a user operation acting on the control 312 ).
  • a body treatment method 1 described later.
  • the electronic device can detect a user operation for selecting a body shape template, or select a user operation at a beauty level under the selected body shape template
  • the body treatment is executed at the time (that is, the user operation acting on the control 312).
  • the method of body treatment at this time please refer to the body treatment method 2 described in the following content.
  • the electronic device may fuse the color image and the background image of the photographed person after the body treatment.
  • the electronic device can also use the background image data at the hollow edge to interpolate the hollow part to compensate Fully hollow out the part to get the restored image.
  • FIG. 22 shows a case where there is a hollow before the interpolation process is performed
  • FIG. 22 shows a case where the hollow is repaired after the interpolation process is performed.
  • the electronic device can update and display the restored image in the preview box when shooting the preview.
  • the body image of the photographed person included in the restored image is subjected to body treatment, and the body image represented by the body image is beautified compared to the actual body shape of the photographed person.
  • the image of the photographed person (that is, the foreground image) collected by the 3D camera module may be referred to as a first image, and the image of the photographed person subjected to body treatment may be referred to as a second image.
  • the electronic device may adjust the contour of the first body part of the photographed person in the first image according to the first body parameters, to obtain the contour of the first body part of the photographed person in the second image. That is to say, the contour of the first body part of the photographed person in the second image can be adjusted according to the first body parameters.
  • the electronic device may adjust the contour of the second body part of the person in the first image according to the second body parameters to obtain the contour of the second body part of the person in the second image. That is to say, the outline of the second body part of the photographed person in the second image is adjusted according to the second body parameters.
  • the first part and the second part may be different, and the first body parameter and the second body parameter may be different. That is to say, the electronic device can adjust the contours of different body parts in the first image by using different body parameters.
  • the following describes two implementation manners in which the electronic device performs body treatment on the body image of the photographed person.
  • the electronic device may perform body treatment on the body image of the photographed person according to the body treatment parameters corresponding to the selected body treatment level (the body treatment level selected by the user or the default body treatment level).
  • the body treatment level the body treatment level selected by the user or the default body treatment level.
  • Body parameters Beautify Legs 0.1 Elongated legs belly -0.05 Thin belly Shoulder 0.3 Widen shoulders waist -0.1 Thin waist
  • the value of the body parameter corresponding to the leg 0.1 is a positive value, which can indicate that the leg is elongated; the value of the body parameter 0.1 can also indicate the length of the leg, and the larger the value, the leg The greater the elongation of the department.
  • 0.1 can mean stretching the leg by 10%. The example is only an implementation manner of the embodiment of the present application, and should not constitute a limitation.
  • the value of the body parameters corresponding to the belly -0.05 is a negative value, which can indicate thin stomach treatment; the absolute value of the value of the body parameters -0.05 can also indicate the degree of thin stomach, and the larger the absolute value, the thin stomach The greater the degree.
  • -0.05 can mean that the belly is thinned by 5%. The example is only an implementation manner of the embodiment of the present application, and should not constitute a limitation.
  • the value of the body-body parameter corresponding to the shoulder is 0.3, which can indicate that the shoulder is widened; the value of the body-body parameter of 0.3 can also indicate the degree of shoulder widening, and the larger the value, the greater the value The greater the width of the shoulder.
  • 0.3 may indicate a 30% widening of the shoulder.
  • the example is only an implementation manner of the embodiment of the present application, and should not constitute a limitation.
  • the value of the body parameter corresponding to the waist -0.1 is a negative value, which can indicate thin waist treatment; the absolute value of the value of the body parameter -0.1 can also indicate the degree of thin waist, and the larger the absolute value, the thin waist The greater the degree.
  • -0.1 can mean thinning the waist by 10%. The example is only an implementation manner of the embodiment of the present application, and should not constitute a limitation.
  • the value of the body-body parameter corresponding to the whole body -0.09 is a negative value, which can indicate that the whole body is thinned; the absolute value of the body-body parameter -0.09 can also indicate the degree of weight loss.
  • 0.1 can mean 10% thinner body.
  • the example is only an implementation manner of the embodiment of the present application, and should not constitute a limitation.
  • the body parameters corresponding to the specific body level may be a set of body parameters, which may include the body parameters corresponding to each body part.
  • some body parameters in the set of body parameters may be invalid.
  • the electronic device 100 may invalidate the body parameters corresponding to the thin belly (for example, the value is set to 0), that is, the contour of the pregnant woman’s belly in the first image is not Make adjustments so that the outline of the belly of the person photographed in the second image matches the outline of the belly of the person photographed in the first image to preserve the characteristics of the pregnant woman.
  • Table 1 only exemplarily shows an implementation of body-body parameters, which is not limited thereto.
  • the body-body parameters may also include more or less parameters, or other different parameters.
  • the body treatment refers to processing the color image of the body of the person being photographed.
  • the electronic device 100 may perform one or more of the following body treatments.
  • the electronic device 100 can perform the following body treatment on the leg image of the person 411 to achieve the beautification of the elongated leg: First, in the image collected by the 3D camera module 193, according to the parameter value 0.1 corresponding to the leg and the The actual leg length of the photographed person determined in S106, and determine the respective target positions of the skeletal points of the knee point and the foot point; then stretch the leg image of the person 411, so that the leg image is stretched Skeletal points such as the back knee point and the foot point can be at their respective target positions. In this way, the legs of the person 411 represented by the leg image after the stretching process are longer than the actual legs of the person 411.
  • the electronic device 100 can perform the following body treatment on the belly image of the person 411 to realize the slimming of the belly: perform image compression processing on the belly image of the person 411, so that the belly expressed by the processed belly image is compared with the person The actual belly of 411 is thinner (or narrower); the belly image of the person 411 is shaded, so that the belly expressed by the processed belly image is flatter than the actual belly of the person 411, that is, the degree of protrusion of the belly can be reduced.
  • the value of the body parameter corresponding to the belly -0.05 and the actual contour and depth values of the belly of the person to be photographed determined in S106 can be used to determine the range of the belly image to be compressed and the target position to be compressed,
  • the parameter value -0.05 can also be used to determine the image range of the belly image plus shadow and the brightness of the shadow. In this way, the belly of the belly image after the processing is thinner (narrower and flatter) than the actual belly of the person 411.
  • the electronic device 100 can perform the following body treatment on the shoulder image of the person 411 to achieve the beautification of the widened shoulder: First, in the image collected by the 3D camera module 193, according to the body parameters corresponding to the widened shoulder The value 0.3 and the shoulder width determined in S106 determine the respective target positions of the left shoulder point and the right shoulder point; then the shoulder image of the person 411 is stretched so that the left shoulder point, The right shoulder point can be at its respective target position. In this way, the shoulder of the person 411 expressed by the shoulder image after the stretching process is wider than the actual shoulder of the person 411.
  • the electronic device 100 can perform the following body treatment on the waist image of the person 411 to realize the slimming of the waist: perform a compression process on the middle part of the waist image of the person 411, so that the waist represented by the image-processed waist image Thinner than the actual waist of character 411.
  • the value of the body parameter corresponding to the waist-0.1 and the waist contour determined in S106 can be used to determine the range of the waist image to be compressed and the target position to be compressed.
  • the electronic device 100 can perform the following body treatment on the waist image of the person 411 to achieve a slim waist beautification: perform a compression process on the color image of the entire body of the person 411, in which the face image of the person 411 is excluded so that The color image of the body after the image processing is thinner than the actual figure of the person 411.
  • Compressing the color image of the entire body of the person 411 may specifically include separately compressing the color images of each partial body between the bone points, so that the partial body represented by the color image of each partial body (such as arms and legs) , Belly, waist, etc.) are thinner than the actual parts of the character 411.
  • the color image (belly image) of some partial bodies can also be shaded to present a more natural slimming effect.
  • the value of the body parameter corresponding to the whole body -0.09 and the contour of the entire body determined in S106 can be used to determine the range and target of the color image of the entire body or the color image of each partial body to be compressed position.
  • the electronic device 100 may also perform other body treatments to achieve other body beautification.
  • the body parameters corresponding to each body level may be equal to the base body parameters multiplied by the weight.
  • the specific implementation may include:
  • the body parameters corresponding to the body level 10 may be used as the basic body parameters.
  • the body parameters corresponding to other body levels can be obtained by multiplying the basic body parameters by the weight, and the weight is determined by the body level.
  • the weight corresponding to the body level 10 is 1, and the weight corresponding to other body levels may be greater than 0 and less than 1.
  • the smaller the body-level the smaller the weight.
  • Table 1 shows that the beauty level 10 corresponds to the beauty parameters, and the weight corresponding to the beauty level 9 is 0.9.
  • the body parameters corresponding to body level 9 are specifically: 0.1*0.9 (body parameters corresponding to elongated legs), -0.05*0.9 (body parameters corresponding to thin stomachs), 0.3*0.9 (body corresponding to widened shoulders) Parameter), -0.1*0.9 (body parameters corresponding to thin waist), -0.09*0.9 (body parameters corresponding to thin body).
  • the body parameters corresponding to the body level 1 may be used as the basic body parameters.
  • the body parameters corresponding to other body levels can be obtained by multiplying the basic body parameters by the weight, and the weight is determined by the body level.
  • the weight corresponding to body level 1 is 1, and the weight corresponding to other body levels may be greater than 1.
  • the greater the body level the greater the weight.
  • Table 1 shows that the beauty level 1 corresponds to the beauty parameters, and the beauty level 5 corresponds to the beauty weight 1.2.
  • body parameters corresponding to body level 5 are: 0.1*1.2 (body parameters corresponding to elongated legs), -0.05*1.2 (body parameters corresponding to thin belly), 0.3*1.2 (body parameters corresponding to widened shoulders) ), -0.1*1.2 (body parameters corresponding to thin waist), -0.09*1.2 (body parameters corresponding to thin body).
  • the body parameters corresponding to each body level may also be pre-configured separately, and may not have a multiple relationship of weight expression. This application does not limit how to specify the body parameters corresponding to each body level.
  • the body contour parameters used for body contour processing on the color image of the photographed person's body may also be related to the gender, age, and other characteristics of the photographed person. There may be some differences between the body parameters corresponding to men and the body parameters corresponding to women. Because men's body beautification needs and women's body beautification needs are usually different. For example, men prefer thinner shoulders and women prefer narrower shoulders. Then, the body parameters of widened shoulders corresponding to men may have larger values than those of women. For another example, women prefer slim waists more than men, then the absolute value of body parameters corresponding to women's thin waist may be greater than the absolute value of body parameters corresponding to men's thin waist.
  • body parameters corresponding to people of different ages there may be some differences in body parameters corresponding to people of different ages. Because the beautification needs of people of different ages can also be different. In this way, it is possible to differentiate the body of the person being photographed of different genders, ages, etc. in the preview box 301, and to achieve a better body-body imaging effect. This application does not limit how to differentiate the body parameters according to the characteristics of the person being photographed, such as gender and age.
  • the beauty parameters used to perform the beauty treatment on the color image of the photographed person's body may also be related to the actual figure of the photographed person.
  • the body parameters corresponding to the fat person can be obtained by multiplying the body parameters exemplarily shown in Table 1 by a weight of 1.2 to achieve the purpose of enhancing body beautification
  • the body parameters corresponding to the thin person can be obtained through the body parameters exemplarily shown in Table 1. It is obtained by multiplying the weight by 0.8 to achieve the purpose of weakening the beautification.
  • the body of the person with different body types can be differentiated to achieve a better body-effect camera effect.
  • the body-building parameters corresponding to people of different body types may also be pre-configured separately, and there may not be a multiple relationship of weight expression among each other. This application does not limit how to define body parameters corresponding to people of different body types.
  • the electronic device may use the selected body shape template (the body shape template selected by the user or the default body shape template) to perform beauty treatment on the color image of the photographed person.
  • the selected body shape template the body shape template selected by the user or the default body shape template
  • FIGS. 11A-11E For UI embodiments, reference may be made to FIGS. 11A-11E.
  • the posture of the figure template and the posture of the subject may be different.
  • the posture of the photographed object can be determined according to the color image of the photographed person and the depth information of the photographed person.
  • the electronic device can transform the posture of the figure template into the posture of the photographed person through similar transformation. Specifically, the electronic device can compare the displacement of the bone points of the two poses in the two-dimensional space, and the relative angle between the two limbs connected by the bone points of the photographed person. Then, the electronic device can rotate or translate the bone points of the body template and the limbs connected to the bone points, so that the posture of the transformed body template is consistent with the posture of the object to be photographed.
  • the electronic device can align the bone points of the person being photographed with the bone points of the body template, and then pull the image of the body of the person being photographed according to the difference between the body template and the contour of the body of the person being photographed Stretching treatment (such as elongated legs) or compression treatment (such as thin legs).
  • Stretching treatment such as elongated legs
  • compression treatment such as thin legs.
  • the degree of stretch or compression can be determined by the body level under the selected body template. The higher the body level, the greater the degree of stretch or compression.
  • FIGS. 11D-11E For example, as shown in FIG.
  • the image of the person’s limb can be stretched (such as elongated legs) or compressed (such as skinny legs) so that The contour of the limb represented by the image of the stretched or compressed limb is consistent with the contour of the limb of the body template.
  • the electronic device may perform image preprocessing.
  • the image pre-processing may include pre-processing operations such as image enhancement, depth complementation, and denoising of color images and depth information.
  • the image enhancement may be to enhance the brightness of the image for a dark or low-light environment.
  • Depth completion may refer to smoothing the holes in the depth map.
  • Denoising can refer to removing some noise in the depth map to avoid the noise above the depth value from affecting the calculation of the bone point depth.
  • the electronic device detects in S105 that the angle between the person being photographed and the plane on which the electronic device is located is too large and exceeds a preset angle threshold (such as 65°). In response to this situation, the electronic device may not perform perspective transformation on the color image collected by the 3D camera, and may not perform body treatment on the color image of the photographed person. In addition, the electronic device can also output prompt information in the preview box 301 to remind the user that the body treatment is not supported in this case.
  • a preset angle threshold such as 65°
  • the photo preview method described in the embodiment of FIG. 16 can realize the adjustment of the body image of the photographed person displayed in the preview frame during shooting preview, so that the body shape of the adjusted body image occurs compared with the actual body shape of the photographed person Beautify the shape, the user's operation is simple and intuitive, which can effectively improve the utilization rate of electronic equipment.
  • FIG. 23 shows a structural diagram of a functional module included in an electronic device in conjunction with a 3D camera module 193. Expand below:
  • the 3D camera module 193 can be used to collect color images and depth information.
  • the color image may include the color image of the person to be photographed and the color image of the background.
  • the depth information may include depth information of the person being photographed and depth information of the background.
  • the color image of the photographed person may include a body image and a face image.
  • the 3D camera module 193 may be composed of a color camera module and a depth camera module.
  • the depth camera module may be a TOF depth camera module or a structured light camera module.
  • the human skeleton point positioning algorithm module can be used to identify the skeleton point of the photographed person by using the color image of the photographed person and the human skeleton point positioning algorithm.
  • the human bone point positioning algorithm module For specific implementation of the human bone point positioning algorithm module, reference may be made to S103 in the method embodiment of FIG. 16, and details are not described herein again.
  • the skeletal point depth acquisition module can be used to determine the skeletal point of the photographed person based on the 2D coordinates of the skeletal point of the photographed person identified by the human skeletal point positioning algorithm module and the depth information of the photographed person collected by the 3D camera module 193 Depth value.
  • the bone point depth acquisition module reference may be made to S104 in the method embodiment of FIG. 16, and details are not described herein again.
  • the bone length calculation module can be used to determine the length of the bone between the bone points according to the depth value of each bone point determined by the bone point depth acquisition module and the 2D coordinates of the bone point of the photographed person identified by the human bone point positioning algorithm module.
  • the bone length calculation module reference may be made to S106 in the method embodiment of FIG. 16, and details are not described here.
  • the perspective transformation module can be used to determine the depth value of each bone point determined by the bone point depth acquisition module and the length of the bone determined by the bone length calculation module, to determine the angle ⁇ between the photographed person and the plane where the electronic device is located, and use this angle to calculate The perspective transformation matrix is obtained, and finally the perspective transformation matrix is used to perform perspective transformation on the color image of the photographed person.
  • the perspective transformation module may also determine the angle ⁇ according to the pitch angle of the electronic device.
  • the portrait segmentation module can be used to segment the color image obtained by the perspective transformation module into a color image (ie, a foreground image) and a background image of the person being photographed.
  • a color image ie, a foreground image
  • a background image ie, a portrait segmentation module
  • the body processing module can be used to process the body image of the person after the perspective transformation, such as image stretching, image compression, shadowing, etc., so that the body shape of the processed body image occurs compared to the actual body shape of the person To beautify the body.
  • the body treatment module may be used to perform body treatment on the body image of the photographed person according to the body treatment parameters corresponding to the selected body treatment level (user-selected body treatment level or default body treatment level).
  • the beauty parameters can be determined by the beauty parameter determination module.
  • the body treatment module may be used to perform body treatment on the color image of the photographed person using the selected body template (user-selected body template or default body template).
  • S108 for a specific implementation of the body treatment module, reference may be made to S108 in the method embodiment of FIG. 16, and details are not described herein again.
  • the image restoration module can be used to fuse the color image and background image of the photographed person after body treatment. During image fusion, in order to avoid the hollow between the limb image and the background image after the body treatment, the image repair module can also be used to interpolate the hollow part using the background image data at the hollow edge to complete the hollow part, To get the repaired image.
  • the image finally output by the image repair module can be updated and displayed in the preview box of the first user interface.

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • User Interface Of Digital Computer (AREA)
  • Studio Devices (AREA)

Abstract

A photo previewing method for an electronic device, a graphical user interface and an electronic device, the method comprising: adjusting a body image of a photographed individual during photo previewing or video previewing so that the body represented by the adjusted body image is beautified compared to the actual body of the photographed individual. Body beautification may comprise: beautifying body proportions (for example, lengthening the legs, and widening the shoulders), and adjusting the size of the body (for example, thinning the waist, thinning the legs, thinning the stomach and thinning the hips or enlarging parts of the body). The described solution enables a user to beautify the body of a photographed individual during image capture previewing, and operation is intuitive, simple and effective.

Description

电子设备的拍照预览方法、图形用户界面及电子设备Photo preview method of electronic device, graphical user interface and electronic device
本申请要求在2018年12月26日提交中国国家知识产权局、申请号为201811608420.2、发明名称为“电子设备的拍照预览方法、图形用户界面及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the State Intellectual Property Office of China on December 26, 2018, with the application number 201811608420.2 and the invention titled "Photo Preview Method for Electronic Devices, Graphic User Interface, and Electronic Devices", all of which are The content is incorporated into this application by reference.
技术领域Technical field
本发明涉及电子技术领域,特别涉及应用在电子设备的拍照预览方法、图形用户界面及电子设备。The invention relates to the field of electronic technology, in particular to a photo preview method applied to electronic devices, a graphical user interface, and electronic devices.
背景技术Background technique
随着社交网络的流行,市场对智能人像美化的需求越来越大,各式各样的美颜相机不断涌现。然而,搭载体型美化功能的便携式电子设备(如手机、平板电脑等)仍然没有被广泛使用。现有的Photoshop之类的体型美化应用程序对计算资源的要求较高,不适合配置到便携式电子设备上。而且,现有的Photoshop之类的体型美化应用程序的用户交互设计不直观,需要专业人士才能比较熟练的使用,而且操作比较复杂、繁琐。With the popularity of social networks, there is an increasing demand for smart portrait beautification in the market, and a variety of beauty cameras are constantly emerging. However, portable electronic devices (such as mobile phones and tablet computers) equipped with beautification functions are still not widely used. Existing beautification applications such as Photoshop have high requirements on computing resources and are not suitable for deployment on portable electronic devices. Moreover, the user interaction design of existing beautification applications such as Photoshop is not intuitive and requires professionals to use it more skillfully, and the operation is more complicated and cumbersome.
发明内容Summary of the invention
本发明的目的在于提供一种电子设备的拍照预览方法、图形用户界面(graphic user interface,GUI)及电子设备,可使得用户在拍照预览过程中能够对被拍摄人物进行体型美化,操作直观且简单有效,可提高电子设备的使用率。The object of the present invention is to provide a photo preview method, graphic user interface (GUI) and electronic device of an electronic device, which can enable the user to beautify the person being photographed during the photo preview process, and the operation is intuitive and simple Effective, can improve the utilization rate of electronic equipment.
上述目标和其他目标将通过独立权利要求中的特征来达成。进一步的实现方式在从属权利要求、说明书和附图中体现。The above and other objectives will be achieved by the features in the independent claims. Further implementations are reflected in the dependent claims, the description and the drawings.
第一方面,提供一种电子设备的拍照预览方法,该电子设备可具有3D摄像模组。该方法可包括:该电子设备可以开启3D摄像模组,并通过3D摄像模组采集被拍摄人物的第一图像。该电子设备可以显示第一图形用户界面,第一图形用户界面可以包括预览框,预览框中显示有被拍摄人物的第一图像。该电子设备可以检测到第一用户操作,响应于第一用户操作,可以在第一图形用户界面的预览框中显示被拍摄人物的第二图像。In a first aspect, a photo preview method for an electronic device is provided. The electronic device may have a 3D camera module. The method may include: the electronic device may turn on the 3D camera module, and collect the first image of the photographed person through the 3D camera module. The electronic device may display a first graphical user interface, and the first graphical user interface may include a preview frame, and the preview frame displays the first image of the photographed person. The electronic device may detect the first user operation, and in response to the first user operation, may display the second image of the photographed person in the preview box of the first graphical user interface.
其中,第二图像中被拍摄人物的第一身体部位的轮廓被根据第一美体参数进行了调整,第二图像中被拍摄人物的第二身体部位的轮廓被根据第二美体参数进行了调整,第一部位与第二部位不同,第一美体参数与第二美体参数不同。也即是说,电子设备可以采用不同的美体参数对第一图像中不同身体部位的轮廓进行调整。Among them, the contour of the first body part of the photographed person in the second image is adjusted according to the first body parameters, and the contour of the second body part of the photographed person in the second image is adjusted according to the second body parameters, The first part is different from the second part, and the first body parameters are different from the second body parameters. That is to say, the electronic device can adjust the contours of different body parts in the first image by using different body parameters.
结合第一方面,在一种可能的实现方式中,第一图形用户界面还可以包括第一控件,第一用户操作为作用于第一控件的用于选择美体级别的用户操作;已选定的美体级别越高,第二图像中第一部位的轮廓与第一图像中第一部位的轮廓差距越大,第二图像中第二部位的轮廓与第一图像中第二部位的轮廓差距越大。With reference to the first aspect, in a possible implementation manner, the first graphical user interface may further include a first control, and the first user operation is a user operation for selecting a beauty level that acts on the first control; the selected The higher the body level, the greater the gap between the contour of the first part in the second image and the contour of the first part in the first image, and the greater the gap between the contour of the second part in the second image and the contour of the second part in the first image .
具体的,第一用户操作可以具体包括作用于第一控件第二用户操作(如在第一控件上的向右滑动操作)、作用于第一控件的第三用户操作(如在第一控件上的向左滑动操作)。具体 的:Specifically, the first user operation may specifically include a second user operation acting on the first control (such as a rightward sliding operation on the first control), and a third user operation acting on the first control (such as the first control Swipe left). specific:
电子设备可以检测到作用于第一控件的第二用户操作(如在第一控件上的向右滑动操作),第二用户操作可用于提高被拍摄人物对应的美体级别(如从美体级别7提高至美体级别10)。响应第二用户操作,电子设备可以刷新预览框中的显示内容。刷新后的预览框中被拍摄人物的身体图像所表现的体型相较于刷新前的预览框中被拍摄人物的身体图像所表现的体型发生了体型美化。也即是说,响应第二用户操作,刷新后的预览框中第二图像中第一部位的轮廓相较于刷新前的预览框中第二图像中第一部位的轮廓,与第一图像中第一部位的轮廓的差距更大。刷新后的预览框中第二图像中第二部位的轮廓相较于刷新前的预览框中第二图像中第二部位的轮廓,与第一图像中第二部位的轮廓的差距更大。The electronic device can detect a second user operation acting on the first control (such as a rightward sliding operation on the first control). The second user operation can be used to increase the body level corresponding to the person being photographed (such as increasing from body level 7 To body level 10). In response to the second user operation, the electronic device may refresh the display content in the preview box. The body shape of the photographed person's body image in the preview frame after refreshing has a beautification compared with the body shape of the photographed person's body image in the preview frame before refreshing. That is to say, in response to the second user operation, the outline of the first part in the second image in the preview frame after refreshing is compared with the outline of the first part in the second image in the preview frame before refreshing, and The gap between the contours of the first part is larger. Compared with the contour of the second part in the second image in the preview frame before refreshing, the contour of the second part in the second image in the preview frame after refreshing is larger than the contour of the second part in the first image.
电子设备可以检测到作用于第一控件的第三用户操作(如在第一控件上的向左滑动操作),第三用户操作可用于降低被拍摄人物对应的美体级别(如从美体级别10降至美体级别7),响应第三用户操作,可以刷新预览框中的显示内容。刷新后的预览框中被拍摄人物的身体图像所表现的体型相较于刷新前的预览框中被拍摄人物的身体图像所表现的体型更加接近被拍摄人物的实际体型。The electronic device can detect a third user operation acting on the first control (such as a leftward sliding operation on the first control). The third user operation can be used to reduce the body level corresponding to the person being photographed (such as from the body level 10 Up to body level 7), in response to the operation of the third user, the display content in the preview box can be refreshed. The body shape of the photographed person's body image in the preview frame after refreshing is closer to the actual body shape of the photographed person than that in the preview frame before refreshing.
也即是说,响应第三用户操作,刷新后的预览框中第二图像中第一部位的轮廓相较于刷新前的预览框中第二图像中第一部位的轮廓,与第一图像中第一部位的轮廓的差距更小。刷新后的预览框中第二图像中第二部位的轮廓相较于刷新前的预览框中第二图像中第二部位的轮廓,与第一图像中第二部位的轮廓的差距更小。That is to say, in response to the third user operation, the outline of the first part in the second image in the preview frame after refreshing is compared with the outline of the first part in the second image in the preview frame before refreshing, and The gap between the contours of the first part is smaller. The contour of the second part in the second image in the preview frame after refreshing is smaller than the contour of the second part in the second image in the preview frame before refreshing, and the contour of the second part in the first image is smaller.
结合第一方面,在一种可能的实现方式中,当检测到被拍摄人物是孕妇时,电子设备可以在预览框中显示提示信息(如文字“检测到孕妇”),该提示信息可以提示被拍摄人物是孕妇。此时,电子设备可以利用已选定的美体级别对应的美体参数对被拍摄人物的其他的局部身体(如手臂、腿部、肩部)的彩色图像进行美体处理,而不对被拍摄人物的肚子图像进行美体处理,以保留孕妇特征。也即是说,预览框中显示的第二图像中被拍摄人物的肚子的轮廓与第一图像中被拍摄人物的肚子的轮廓一致。With reference to the first aspect, in a possible implementation manner, when it is detected that the person being photographed is a pregnant woman, the electronic device may display a prompt message (such as the text "pregnant woman detected") in the preview box. The photographed person is a pregnant woman. At this time, the electronic device can use the beauty parameters corresponding to the selected beauty level to perform beauty treatment on the color images of other partial bodies of the photographed person (such as arms, legs, and shoulders), but not the stomach of the photographed person. The image is processed with a body to preserve the characteristics of the pregnant woman. That is to say, the outline of the belly of the photographed person in the second image displayed in the preview frame matches the outline of the belly of the photographed person in the first image.
结合第一方面,在一种可能的实现方式中,电子设备可以响应于检测到的第四用户操作,对第二图像中被拍摄人物的脸部皮肤的颜色值进行调整。其中,第四用户操作可以是打开“美肤”功能并选择特定美肤级别(如美肤级别7)的用户操作。With reference to the first aspect, in a possible implementation manner, the electronic device may adjust the color value of the face skin of the person photographed in the second image in response to the detected fourth user operation. The fourth user operation may be a user operation that turns on the “beauty skin” function and selects a specific skin beauty level (such as skin beauty level 7).
具体的,当预览框中显示的被拍摄人物的身体图像已经利用已选定的美体级别对应的美体参数进行过美体处理,且检测到第四用户操作时,电子设备可以刷新预览框中的显示内容,刷新后的预览框中显示的被拍摄人物的图像包括脸部图像和身体图像,其中脸部图像是经过美肤处理后的脸部图像,身体图像是利用已选定的美体级别对应的美体参数进行过美体处理的身体图像。也即是说,用户可以在已对被拍摄人物进行的体型美化的基础上继续对被拍摄人物进行皮肤美化,以达到更全面的美化效果。反之亦可,用户也可以在已对被拍摄人物进行的皮肤美化的基础上继续对被拍摄人物进行体型美化。Specifically, when the body image of the photographed person displayed in the preview box has been subjected to body treatment using the body parameters corresponding to the selected body level, and the fourth user operation is detected, the electronic device may refresh the display in the preview box Content, the image of the photographed person displayed in the refreshed preview box includes a face image and a body image, where the face image is a face image after skin treatment, and the body image is corresponding to the selected beauty level Body image The body image that has undergone body treatment. That is to say, the user can continue to beautify the skin of the photographed person on the basis of the beautification of the photographed person to achieve a more comprehensive beautification effect. Conversely, the user can continue to beautify the photographed person on the basis of the skin beautification of the photographed person.
结合第一方面,在一种可能的实现方式中,电子设备还可以在预览框中显示第二控件。响应于检测到的在第二控件上按住不释放的用户操作,电子设备可以在预览框中显示第一图像。响应于检测到的释放第二控件的用户操作,电子设备可以在预览框中显示第二图像。这样,用户便可以对比第一图像表现的体型和第二图像表现的体型。With reference to the first aspect, in a possible implementation, the electronic device may also display the second control in the preview box. In response to the detected user operation of pressing and holding on the second control without releasing, the electronic device may display the first image in the preview box. In response to the detected user operation to release the second control, the electronic device may display the second image in the preview box. In this way, the user can compare the body shape represented by the first image with the body shape represented by the second image.
结合第一方面,在一种可能的实现方式中,电子设备可以在预览框中显示第一提示信息用于 提示第二图像中的第一部位的轮廓与第一图像中的第一部位的轮廓的差异、第二图像中的第二部位的轮廓与第一图像中的第二部位的轮廓的差异。其中,第二图像是预览框中显示的经过美体处理的被拍摄人物的图像,第一图像是3D摄像模组采集的被拍摄人物的图像。第一图像中被拍摄人物的各个身体部位的轮廓与实际轮廓一致。这些差异可以表现为,腰围的差距、腿围的差距、腿长的差距、肩宽的差距等等。With reference to the first aspect, in a possible implementation manner, the electronic device may display the first prompt information in the preview box for prompting the contour of the first part in the second image and the contour of the first part in the first image , The difference between the outline of the second part in the second image and the outline of the second part in the first image. The second image is the image of the photographed person after the body treatment displayed in the preview frame, and the first image is the image of the photographed person collected by the 3D camera module. The contours of the body parts of the captured person in the first image are consistent with the actual contours. These differences can be expressed as the difference in waist circumference, the difference in leg circumference, the difference in leg length, the difference in shoulder width and so on.
结合第一方面,在一种可能的实现方式中,第一提示信息还可用于提示以下一项或多项体现:需要减掉的体重、需要的运动量、需要消耗的热量等。需要减掉的体重用于提示被拍摄人物需要减掉多少体重来接近或达到预览框中显示的身体图像表现的体型。需要的运动量用于提示被拍摄人物需要进行多少运动来接近或达到预览框中显示的身体图像表现的体型。需要消耗的热量用于提示被拍摄人物需要消耗多少热量来接近或达到预览框中显示的身体图像表现的体型。With reference to the first aspect, in a possible implementation manner, the first prompt information may also be used to prompt one or more of the following manifestations: weight to be lost, required amount of exercise, and calories to be consumed. The weight that needs to be lost is used to indicate how much weight the person to be photographed needs to lose to approach or reach the body shape represented by the body image displayed in the preview box. The required amount of exercise is used to indicate how much exercise the person to be photographed needs to approach or reach the figure represented by the body image displayed in the preview box. The calories that need to be consumed are used to remind how much calories the person to be photographed needs to approach or reach the body shape shown in the preview frame.
结合第一方面,在一种可能的实现方式中,如果3D摄像模组是后置的3D摄像模组,则电子设备在预览框中显示第三控件和第二提示信息,第三控件可以用于监听分享健身资讯的用户操作,第二提示信息可以用于提示用户点击第三控件以向被拍摄人物分享健身资讯。响应于检测到的作用于第三控件的用户操作,电子设备可以显示用于分享健身资讯的用户界面。响应于检测到的在用于分享健身资讯的用户界面中选择联系人分享健身资讯的用户操作,电子设备可以向已选定的联系人分享健身资讯。With reference to the first aspect, in a possible implementation, if the 3D camera module is a rear-mounted 3D camera module, the electronic device displays the third control and the second prompt message in the preview box. The third control can be used To monitor user operations for sharing fitness information, the second prompt information can be used to prompt the user to click the third control to share fitness information with the person being photographed. In response to the detected user operation acting on the third control, the electronic device may display a user interface for sharing fitness information. In response to the detected user operation of selecting a contact in the user interface for sharing fitness information to share fitness information, the electronic device may share fitness information with the selected contact.
结合第一方面,在一种可能的实现方式中,如果3D摄像模组是前置的3D摄像模组,则电子设备可以在预览框中显示第四控件和第三提示信息,第三提示信息可以用于提示用户点击第四控件以查看健身资讯。响应于检测到的作用于第四控件的用户操作,电子设备可以显示健身资讯。With reference to the first aspect, in a possible implementation, if the 3D camera module is a front-mounted 3D camera module, the electronic device may display the fourth control and the third prompt information in the preview box. The third prompt information It can be used to prompt the user to click the fourth control to view fitness information. In response to the detected user operation acting on the fourth control, the electronic device may display fitness information.
结合第一方面,在一种可能的实现方式中,第一图形用户界面还可以包括:拍摄控件。电子设备可以响应于检测到的作用于拍摄控件的用户操作,保存预览框中显示的第二图像。With reference to the first aspect, in a possible implementation manner, the first graphical user interface may further include: a shooting control. The electronic device may save the second image displayed in the preview frame in response to the detected user operation acting on the shooting control.
结合第一方面,在一种可能的实现方式中,第一图形用户界面还可以包括:拍摄模式列表,拍摄模式列表包括多个拍摄模式选项;多个拍摄模式包括:第一拍摄模式选项和第二拍摄模式选项。其中:With reference to the first aspect, in a possible implementation, the first graphical user interface may further include: a shooting mode list, the shooting mode list includes multiple shooting mode options; the multiple shooting modes include: the first shooting mode option and the first Two shooting mode options. among them:
当第一拍摄模式选项处于被选定状态时,拍摄控件具体用于监听触发拍照的用户操作,响应于检测到的作用于拍摄控件的用户操作,保存预览框中显示的第二图像,具体包括:响应于检测到的作用于拍摄控件的用户操作,将预览框中显示的第二图像保存为照片。When the first shooting mode option is in the selected state, the shooting control is specifically used to monitor the user operation that triggers the photographing, and in response to the detected user operation acting on the shooting control, saving the second image displayed in the preview box, specifically including : In response to the detected user operation acting on the shooting control, save the second image displayed in the preview box as a photo.
当第二拍摄模式选项处于被选定状态时,拍摄控件具体用于监听触发录像的用户操作,响应于检测到的作用于拍摄控件的用户操作,保存预览框中显示的第二图像,具体包括:响应于检测到的作用于拍摄控件的用户操作,将预览框中显示的第二图像保存为视频。When the second shooting mode option is selected, the shooting control is specifically used to monitor the user operation that triggers the recording. In response to the detected user operation acting on the shooting control, the second image displayed in the preview box is saved, specifically including : In response to the detected user operation acting on the shooting control, save the second image displayed in the preview box as a video.
结合第一方面,在一种可能的实现方式中,在响应于第一用户操作,在第一图形用户界面的预览框中显示被拍摄人物的第二图像之前,电子设备还可以基于被拍摄人物的图像识别出人体骨骼点。With reference to the first aspect, in a possible implementation manner, before displaying the second image of the photographed person in the preview box of the first graphical user interface in response to the first user operation, the electronic device may also be based on the photographed person Of the images identify human bone points.
结合第一方面,在一种可能的实现方式中,在响应于第一用户操作,在第一图形用户界面的预览框中显示被拍摄人物的第二图像之前,电子设备还可以确定被拍摄人物与电子设备所在平面之间的夹角,且夹角不超过预设角度阈值。With reference to the first aspect, in a possible implementation manner, before displaying the second image of the photographed person in the preview box of the first graphical user interface in response to the first user operation, the electronic device may further determine the photographed person The angle with the plane where the electronic device is located, and the angle does not exceed the preset angle threshold.
结合第一方面,在一种可能的实现方式中,在响应于第一用户操作,在第一图形用户界面的 预览框中显示被拍摄人物的第二图像之前,电子设备还可以根据被拍摄人物与电子设备所在平面之间的夹角确定透视变换矩阵,根据透视变换矩阵对被拍摄人物的第一图像进行透视变换。With reference to the first aspect, in a possible implementation manner, before the second image of the photographed person is displayed in the preview box of the first graphical user interface in response to the first user operation, the electronic device may also according to the photographed person The angle with the plane where the electronic device is located determines the perspective transformation matrix, and performs perspective transformation on the first image of the person to be photographed according to the perspective transformation matrix.
第二方面,提供一种电子设备的拍照预览方法,该电子设备可具有3D摄像模组。该方法可包括:电子设备开启3D摄像模组,并可以通过3D摄像模组采集被拍摄人物的图像。电子设备可以显示第二图形用户界面,第二图形用户界面包括:预览框、体型模板列;其中,预览框中显示有3D摄像模组采集的彩色图像,体型模板列中显示有一个或多个体型模板选项。In a second aspect, a photo preview method for an electronic device is provided. The electronic device may have a 3D camera module. The method may include: the electronic device turns on the 3D camera module, and may collect the image of the person being photographed through the 3D camera module. The electronic device can display a second graphical user interface. The second graphical user interface includes: a preview box and a body template column; wherein, the preview box displays a color image collected by the 3D camera module, and the body template column displays one or more bodies Template options.
响应于检测到的作用于体型模板选项的用户操作,电子设备可以显示第五控件。In response to the detected user operation acting on the figure template option, the electronic device may display the fifth control.
响应于检测到的作用于第五控件的第一用户操作,电子设备可以刷新预览框。刷新后的预览框中的被拍摄人物的身体图像表现的体型相较于刷新前的预览框中的被拍摄人物的身体图像所表现的体型更加接近已选定的体型模板代表的体型。In response to the detected first user operation acting on the fifth control, the electronic device may refresh the preview box. The body image of the photographed person's body image in the preview box after refreshing is closer to the body type represented by the selected body template than that of the body image of the photographed person in the preview box before refreshing.
响应于检测到的作用于第五控件的第二用户操作,电子设备可以刷新预览框;刷新后的预览框中的被拍摄人物的身体图像表现的体型相较于刷新前的预览框中的被拍摄人物的身体图像所表现的体型更加接近被拍摄人物的实际体型。In response to the detected second user operation acting on the fifth control, the electronic device can refresh the preview frame; the body image of the photographed person in the preview frame after refreshing is compared with the body shape of the preview frame before refreshing The body shape of the photographed person's body image is closer to the actual shape of the person being photographed.
第三方面,还提供一种电子设备,该电子设备可包括3D摄像模组、显示屏、触摸传感器、无线通信模块、存储器、以及一个或多个处理器,上述一个或多个处理器用于执行存储在上述存储器中的一个或多个计算机程序,其中:In a third aspect, an electronic device is also provided. The electronic device may include a 3D camera module, a display screen, a touch sensor, a wireless communication module, a memory, and one or more processors. The one or more processors are used to execute One or more computer programs stored in the aforementioned memory, wherein:
3D摄像模组可用于采集被拍摄人物的第一图像;The 3D camera module can be used to collect the first image of the person being photographed;
显示屏可用于显示第一图形用户界面,第一用户界面中可包括预览框,预览框中显示有3D摄像模组采集的被拍摄人物的第一图像。The display screen may be used to display a first graphical user interface, and the first user interface may include a preview frame, and the preview frame displays a first image of the photographed person collected by the 3D camera module.
触摸传感器可用于检测到第一用户操作。The touch sensor may be used to detect the first user operation.
显示屏可用于响应于第一用于操作,在预览框中显示被拍摄人物的第二图像。The display screen may be used to display the second image of the person being photographed in the preview box in response to the first operation.
其中,第二图像中被拍摄人物的第一身体部位的轮廓被根据第一美体参数进行了调整,第二图像中被拍摄人物的第二身体部位的轮廓被根据第二美体参数进行了调整,第一部位与第二部位不同,第一美体参数与第二美体参数不同。也即是说,电子设备可以采用不同的美体参数对第一图像中不同身体部位的轮廓进行调整。Among them, the contour of the first body part of the photographed person in the second image is adjusted according to the first body parameters, and the contour of the second body part of the photographed person in the second image is adjusted according to the second body parameters, The first part is different from the second part, and the first body parameters are different from the second body parameters. That is to say, the electronic device can adjust the contours of different body parts in the first image by using different body parameters.
第三方面中电子设备包括的各个部件的具体实现方式可以参考第一方面描述的拍照预览方法,这里不再赘述。For a specific implementation manner of each component included in the electronic device in the third aspect, reference may be made to the photo preview method described in the first aspect, and details are not described herein again.
第四方面,还提供一种电子设备,该电子设备可包括一种装置,该装置可实现如第一方面中任一可能的实现方式,或如第二方面中任一可能的实现方式。According to a fourth aspect, an electronic device is also provided. The electronic device may include an apparatus, which may implement any possible implementation manner as in the first aspect, or as any possible implementation manner in the second aspect.
第五方面,还提供一种拍照预览装置,该装置具有实现上述方法实际中电子设备行为的功能。上述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。上述硬件或软件包括一个或多个与上述功能相对应的模块。In a fifth aspect, there is also provided a photo preview device, which has a function to implement the behavior of an electronic device in the above method. The above-mentioned functions can be realized by hardware, and can also be realized by hardware executing corresponding software. The above hardware or software includes one or more modules corresponding to the above functions.
第六方面,提供一种计算机设备,包括存储器,处理器以及存储在上述存储器上并可在上述处理器上运行的计算机程序,其特征在于,上述处理器执行上述计算机程序时使得上述计算机设备实现如第一方面中任一可能的实现方式,或如第二方面中任一可能的实现方式。According to a sixth aspect, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and operable on the processor, characterized in that, when the processor executes the computer program, the computer device is realized As in any possible implementation manner in the first aspect, or as in any possible implementation manner in the second aspect.
第七方面,一种包含指令的计算机程序产品,其特征在于,当上述计算机程序产品在电子设备上运行时,使得上述电子设备执行如第一方面中任一可能的实现方式,或如第二方面中任一可能的实现方式。According to a seventh aspect, a computer program product containing instructions is characterized in that, when the computer program product runs on an electronic device, the electronic device is caused to execute any possible implementation manner as in the first aspect, or as in the second Any possible implementation in any aspect.
第八方面,提供一种计算机可读存储介质,包括指令,其特征在于,当上述指令在电子设备上运行时,使得上述电子设备执行如第一方面中任一可能的实现方式,或如第二方面中任一可能的实现方式。In an eighth aspect, a computer-readable storage medium is provided, which includes instructions, characterized in that, when the above instructions run on an electronic device, the above electronic device executes any possible implementation manner as in the first aspect, or as in Any possible implementation in the two aspects.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本申请实施例中的技术方案,下面将对本申请实施例中所需要使用的附图进行说明。In order to more clearly explain the technical solutions in the embodiments of the present application, the drawings required in the embodiments of the present application will be described below.
图1A为一实施例提供的电子设备的结构的示意性图;FIG. 1A is a schematic diagram of a structure of an electronic device provided by an embodiment;
图1B为一实施例提供的电子设备的软件结构的示意图;1B is a schematic diagram of a software structure of an electronic device provided by an embodiment;
图2A为一实施例提供的电子设备上的用于应用程序菜单的用户界面的示意图;2A is a schematic diagram of a user interface for an application menu on an electronic device provided by an embodiment;
图2B为一实施例提供的电子设备上的后置3D摄像模组的示意图;2B is a schematic diagram of a rear 3D camera module on an electronic device provided by an embodiment;
图3A-图3C为本申请涉及的拍摄场景的示意图;3A-3C are schematic diagrams of shooting scenes involved in this application;
图3D-图3E为一实施例提供的人物美化功能的用户界面的示意图;3D-3E are schematic diagrams of a user interface of a character beautification function provided by an embodiment;
图4A-图4H为一实施例提供的在拍照预览时对被拍摄人物进行体型美化的UI示意图;4A-4H are schematic diagrams of a UI for beautifying a person being photographed during a photo preview provided by an embodiment;
图5A-图5D为一实施例提供的在拍照预览时撤销体型美化的UI示意图;5A-5D are schematic diagrams of a UI provided for revoking a beautified body during a photo preview provided by an embodiment;
图6A-图6G为一实施例提供的在拍照预览时推送健身资讯的UI示意图;6A-6G are schematic diagrams of a UI for pushing fitness information during a photo preview provided by an embodiment;
图7A-图7H为另一实施例提供的在拍照预览时推送健身资讯的UI示意图;7A-7H are schematic diagrams of UIs for pushing fitness information during a photo preview provided by another embodiment;
图8A-图8B为一实施例提供的在拍照预览时对比体型美化前后的UI示意图;8A-8B are schematic diagrams of UI provided before and after beautification of a comparison body during a photo preview provided by an embodiment;
图9A-图9C为一实施例提供的用户拍摄照片的UI示意图;9A-9C are schematic diagrams of UIs for users to take photos provided by an embodiment;
图10A-图10G为一实施例提供的在录像预览时对被拍摄人物进行体型美化的UI示意图;10A-10G are schematic diagrams of a UI for beautifying a photographed person during video preview provided by an embodiment;
图11A-图11E为一实施例提供的使用体型模板对被拍摄人物进行体型美化的UI示意图;11A-11E are schematic diagrams of a UI for beautifying a photographed person using a body shape template provided by an embodiment;
图12A-图12C为一实施例提供的一键进行全身美化的UI示意图;12A-12C are schematic diagrams of a one-button UI for full-body beautification provided by an embodiment;
图13A-图13D为一实施例提供的对多人进行体型美化的UI示意图;13A-13D are schematic diagrams of UI for beautifying multiple people provided by an embodiment;
图14A-图14B为一实施例提供的手动进行体型美化的UI示意图;14A-14B are schematic diagrams of a UI for manual beautification provided by an embodiment;
图15A-图15D为一实施例提供的对已拍摄图片中的人物进行体型美化的UI示意图;15A-15D are schematic diagrams of UI for beautifying the figures in the captured pictures provided by an embodiment;
图16为一实施例提供的拍照预览方法流程示意图;FIG. 16 is a schematic flowchart of a photo preview method provided by an embodiment;
图17A-图17C分别示出了彩色图像、深度图像、3D坐标空间中的像素点;17A-17C show pixel points in a color image, a depth image, and a 3D coordinate space, respectively;
图18示出了基本的人体骨骼点;Figure 18 shows basic human bone points;
图19为根据骨骼点的深度值以及2D坐标确定被拍摄人物与电子设备之间的夹角α的计算示意图;FIG. 19 is a schematic diagram of calculating the angle α between the photographed person and the electronic device according to the depth value of the bone point and the 2D coordinates;
图20为根据骨骼点的深度值以及2D坐标确定骨骼点之间的骨骼的长度的计算示意图;20 is a schematic diagram of calculating the length of the bone between the bone points according to the depth value of the bone points and the 2D coordinates;
图21为将3D摄像模组采集到的彩色图像分割成被拍摄人物的彩色图像(即前景图像)和背景图像的示意图;21 is a schematic diagram of dividing a color image collected by a 3D camera module into a color image (that is, a foreground image) and a background image of a person to be photographed;
图22为图像修复前和图像修复后的对比示意图;Fig. 22 is a comparison diagram before and after image restoration;
图23为一实施例提供的电子设备包括的功能模块的架构图。FIG. 23 is an architectural diagram of functional modules included in an electronic device according to an embodiment.
具体实施方式detailed description
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一 个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。The terminology used in the following embodiments of the present application is only for the purpose of describing specific embodiments, and is not intended to be a limitation of the present application. As used in the specification and appended claims of this application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also Includes plural expressions unless the context clearly indicates otherwise. It should also be understood that the term "and/or" used in this application refers to and includes any or all possible combinations of one or more of the listed items.
以下介绍了电子设备、用于这样的电子设备的用户界面、和用于使用这样的电子设备的实施例。在一些实施例中,电子设备可以是还包含其它功能诸如个人数字助理和/或音乐播放器功能的便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴电子设备(如智能手表)等。便携式电子设备的示例性实施例包括但不限于搭载
Figure PCTCN2019122516-appb-000001
Figure PCTCN2019122516-appb-000002
或者其它操作系统的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,诸如具有触敏表面或触控面板的膝上型计算机(Laptop)等。还应当理解的是,在其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是具有触敏表面或触控面板的台式计算机。
The following describes an electronic device, a user interface for such an electronic device, and an embodiment for using such an electronic device. In some embodiments, the electronic device may be a portable electronic device that also contains other functions such as personal digital assistant and/or music player functions, such as a mobile phone, a tablet computer, and a wearable electronic device with wireless communication function (such as a smart watch) Wait. Exemplary embodiments of portable electronic devices include, but are not limited to
Figure PCTCN2019122516-appb-000001
Figure PCTCN2019122516-appb-000002
Or portable electronic devices of other operating systems. The above portable electronic device may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface or a touch panel. It should also be understood that in some other embodiments, the above electronic device may not be a portable electronic device, but a desktop computer with a touch-sensitive surface or a touch panel.
本申请的说明书和权利要求书及附图中的术语“用户界面(user interface,UI)”,是应用程序或操作系统与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。应用程序的用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在终端设备上经过解析,渲染,最终呈现为用户可以识别的内容,比如图片、文字、按钮等控件。控件(control)也称为部件(widget),是用户界面的基本元素,典型的控件有工具栏(toolbar)、菜单栏(menu bar)、文本框(text box)、按钮(button)、滚动条(scrollbar)、图片和文本。界面中的控件的属性和内容是通过标签或者节点来定义的,比如XML通过<Textview>、<ImgView>、<VideoView>等节点来规定界面所包含的控件。一个节点对应界面中一个控件或属性,节点经过解析和渲染之后呈现为用户可视的内容。此外,很多应用程序,比如混合应用(hybrid application)的界面中通常还包含有网页。网页,也称为页面,可以理解为内嵌在应用程序界面中的一个特殊的控件,网页是通过特定计算机语言编写的源代码,例如超文本标记语言(hyper text markup language,GTML),层叠样式表(cascading style sheets,CSS),java脚本(JavaScript,JS)等,网页源代码可以由浏览器或与浏览器功能类似的网页显示组件加载和显示为用户可识别的内容。网页所包含的具体内容也是通过网页源代码中的标签或者节点来定义的,比如GTML通过<p>、<img>、<video>、<canvas>来定义网页的元素和属性。The term “user interface (UI)” in the specification, claims, and drawings of this application is a media interface for interaction and information exchange between applications or operating systems and users, which implements the internal form of information And users can accept the conversion between forms. The user interface of the application is source code written in a specific computer language such as java and extensible markup language (XML). The interface source code is parsed and rendered on the terminal device, and finally presented as content that can be recognized by the user. Such as pictures, text, buttons and other controls. Controls (also called widgets) are the basic elements of the user interface. Typical controls include toolbars, menu bars, text boxes, buttons, and scroll bars. (scrollbar), pictures and text. The attributes and contents of the controls in the interface are defined by tags or nodes. For example, XML uses <Textview>, <ImgView>, <VideoView> and other nodes to specify the controls contained in the interface. A node corresponds to a control or attribute in the interface, and the node is rendered as user-visible content after being parsed and rendered. In addition, many applications, such as hybrid applications (hybrid application) interface usually also contains web pages. A web page, also known as a page, can be understood as a special control embedded in the application interface. The web page is source code written in a specific computer language, such as hypertext markup language (hypertext markuplanguage, GTML), cascading styles Tables (cascading styles, CSS), java scripts (JavaScript, JS), etc., web page source code can be loaded and displayed as user-recognizable content by the browser or a web page display component similar to the browser function. The specific content contained in a web page is also defined by tags or nodes in the source code of the web page. For example, GTML uses <p>, <img>, <video>, and <canvas> to define the elements and attributes of the web page.
用户界面常用的表现形式是图形用户界面(graphic user interface,GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的一个图标、窗口、控件等界面元素,其中控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。The common form of user interface is the graphical user interface (graphic user interface, GUI), which refers to the user interface related to computer operation displayed in a graphical manner. It can be an icon, window, control and other interface elements displayed on the display screen of the electronic device, where the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. Visual interface elements.
本申请以下实施例提供了一种电子设备的拍照预览方法、图形用户界面及电子设备,可使得用户在摄像预览过程中能够对被拍摄人物进行体型美化,操作直观且简单有效,可提高电子设备的使用率。The following embodiments of the present application provide a photo preview method for an electronic device, a graphical user interface, and an electronic device, which can enable the user to beautify the person being photographed during the camera preview process, and the operation is intuitive and simple and effective, which can improve the electronic device Of usage.
本申请以下实施例中,智能手机等电子设备的应用程序“相机”可提供两种人物美化功能:“美肤”功能和“美体”功能。其中,In the following embodiments of the present application, the application "camera" of an electronic device such as a smartphone can provide two kinds of beautification functions: a "beauty" function and a "beauty" function. among them,
“美肤”功能可用于在拍照预览或录像预览过程中对被拍摄人物的脸部图像进行调整,使得调整后的脸部图像所表现的脸部相较于被拍摄人物的实际脸部发生了皮肤美化,例如皮肤美白、皮肤磨皮(如去除人物脸上的痘痘、雀斑、皱纹等),等等。“美肤”功能所涉及的 对脸部图像进行调整可以是指采用表面模糊、均值滤波、双边滤波等算法对脸部图像进行平滑处理。本申请以下实施例中,对脸部图像进行的这种处理可以称为美肤处理。The "beauty" function can be used to adjust the face image of the person being photographed during the photo preview or video preview process, so that the face represented by the adjusted face image occurs compared to the actual face of the person being photographed Skin beautification, such as skin whitening, skin dermabrasion (such as removing acne, freckles, wrinkles, etc.), and so on. The adjustment of the face image involved in the "beauty" function may refer to the smoothing of the face image using algorithms such as surface blur, mean filtering, and bilateral filtering. In the following embodiments of the present application, such processing performed on the face image may be referred to as skin beautification processing.
“美体”功能可用于在拍照预览或录像预览过程中对被拍摄人物的身体图像进行调整,使得调整后的身体图像所表现的体型相较于被拍摄人物的实际体型发生了体型美化。体型美化可包括:美化身体比例(如拉长腿部、扩宽肩部等)、对身体的胖瘦进行调整(如瘦腰、瘦腿、瘦肚子、瘦臀部或对身体局部进行丰满处理等)。“美体”功能所涉及的对身体图像进行调整可以包括:根据美化身体比例的美体参数(如腿部拉长对应的美体参数,后续内容中会介绍)确定骨骼点需要调整到的目标位置,然后可以采用双立方、双线性、近邻等常见的图像缩放算法对骨骼点之间的局部身体图像进行缩放(scale)处理,使得在局部身体图像被缩放后骨骼点能够位于其对应的目标位置,以实现美化身体比例的目的。“美体”功能所涉及的对身体图像进行调整还可以包括:采用双立方、双线性、近邻等常见的图像缩放算法来对被拍摄人物的整体身体图像或局部身体图像进行图像缩放(scale)处理来实现调整身体胖瘦或塑形的目的。例如瘦腿涉及的图像处理可包括采用图像缩放算法对腿部图像进行压缩处理,压缩处理后的腿部图像表现的腿部比被拍摄人物的实际腿部更苗条。又例如腰部塑形设计的图像处理可包括:采用图像缩放算法对腰部图像的中间部分进行压缩处理,对腰部图像的上下两端进行拉伸处理,经过这种图像处理后的腰部图像所表现的腰部比被拍摄人物的实际腰部更有曲线,经过这种图像处理后的腰部图像所表现的腰部可以为S形腰部(腰部中间细)。本申请以下实施例中,对身体图像进行的这种处理可以称为美体处理。The "Beauty" function can be used to adjust the body image of the person being photographed during the photo preview or video preview process, so that the body shape of the adjusted body image is beautified compared to the actual body shape of the person being photographed. Body beautification can include: beautifying the body proportions (such as lengthening the legs, widening the shoulders, etc.), adjusting the body's fat and thin (such as thin waist, thin legs, thin belly, thin buttocks, or full body treatment, etc.) ). The adjustment of the body image involved in the "beauty" function may include: determining the target position to which the bone point needs to be adjusted according to the beautification parameters of the beautification ratio of the body (such as the body parameters corresponding to the elongated legs, which will be introduced in the following content) Common image scaling algorithms such as bicubic, bilinear, and nearest neighbor can be used to scale the local body image between bone points, so that the bone point can be located at its corresponding target position after the local body image is scaled. In order to achieve the purpose of beautifying the proportion of the body. The adjustment of the body image involved in the "beauty" function may also include: using common image scaling algorithms such as bicubic, bilinear, and nearest neighbor to scale the overall body image or partial body image of the person being photographed (scale) Treatment to achieve the purpose of adjusting body fat or thin. For example, the image processing related to stovepipe may include performing compression processing on the leg image using an image scaling algorithm, and the leg image represented by the compressed leg image is slimmer than the actual leg of the person being photographed. For another example, the image processing of the waist shaping design may include: using an image scaling algorithm to compress the middle portion of the waist image, and stretching the upper and lower ends of the waist image. After the image processing, the waist image expresses The waist is more curved than the actual waist of the person being photographed, and the waist represented by this image-processed waist image may be an S-shaped waist (the waist is thinner in the middle). In the following embodiments of the present application, such processing performed on the body image may be referred to as body treatment.
本申请以下实施例中,美体处理所针对的身体图像(包括各个局部身体的图像,如腿部图像)是指彩色摄像模组采集到的身体的彩色图像。同样的,美肤处理所针对的脸部图像也是指彩色摄像模组采集到的脸部的彩色图像。In the following embodiments of the present application, body images (including images of various partial bodies, such as leg images) targeted for body treatment refer to color images of the body collected by the color camera module. Similarly, the face image targeted by the beauty treatment also refers to the color image of the face collected by the color camera module.
本申请以下实施例中,“美体”功能基于骨骼点识别技术分析电子设备的彩色摄像模组采集的彩色图像来识别被拍摄人物的骨骼点,如头部点、颈部点、左肩点、右肩点等。后续内容中会介绍骨骼点识别技术以及人体的基本骨骼点,这里先不赘述。进一步结合电子设备的深度摄像模组所采集的针对被拍摄人物的深度数据(包括骨骼点的深度数据),电子设备便可以分析出被拍摄人物的身体比例、胖瘦等体型情况。然后电子设备可以在摄像预览时对被拍摄人物的骨骼点之间的身体图像进行调整,使得调整后的身体图像所表现的体型相较于被拍摄人物的实际体型发生体型美化。这样,可使得拍摄者在摄像预览(拍照预览和录像预览)时便可对被拍摄人物进行体型美化,操作直观且简单有效,可提高电子设备的使用率。In the following embodiments of the present application, the "Body" function analyzes the color images collected by the color camera module of the electronic device based on the bone point recognition technology to identify the bone points of the person being photographed, such as the head point, neck point, left shoulder point, and right Shoulder point. The following content will introduce the skeleton point recognition technology and the basic skeleton points of the human body, which will not be repeated here. Further combined with the depth data (including bone point depth data) collected by the depth camera module of the electronic device for the person being photographed, the electronic device can analyze the body proportion, fat and thin body shape of the person being photographed. Then, the electronic device can adjust the body image between the bone points of the photographed person during the camera preview, so that the figure represented by the adjusted body image is more beautified than the actual figure of the figure. In this way, the photographer can beautify the photographed person during the camera preview (photo preview and video preview), the operation is intuitive, simple and effective, and the utilization rate of the electronic device can be improved.
本申请以下实施例中,“美肤”功能和/或“美体”功能可以集成于“相机”应用程序中包括的“人像”拍照功能、录像功能。“美肤”功能和/或“美体”功能也可以作为“相机”应用程序中的独立的摄像功能。“人像”拍照功能是针对拍摄对象为人物时设置的摄像功能,以突出人物,提升拍摄图片中人物的美感。当电子设备开启“人像”拍照功能时,电子设备可以采用较大的光圈保持景深较浅,以突出人物,并可以改善色彩效果,以优化人物肤色。在检测到环境光线强度低于一定阈值时,电子设备还可以开启闪光灯进行光照补偿。In the following embodiments of the present application, the "beauty" function and/or the "beauty" function may be integrated into the "portrait" camera function and video recording function included in the "camera" application. The "beauty" function and/or "beauty" function can also be used as a separate camera function in the "camera" application. "Portrait" camera function is a camera function that is set when the subject is a person to highlight the person and enhance the beauty of the person in the captured picture. When the electronic device turns on the "portrait" camera function, the electronic device can use a larger aperture to keep the depth of field shallower to highlight the person, and can improve the color effect to optimize the person's skin color. When it is detected that the ambient light intensity is below a certain threshold, the electronic device can also turn on the flash to perform illumination compensation.
“相机”是智能手机、平板电脑等电子设备上的一款图像拍摄的应用程序,本申请对该应用程序的名称不做限制。“人像”拍照功能、录像功能可以是“相机”应用程序中包括的摄像功能。除此之外,“相机”应用程序还可以包括其他多种摄像功能,在不同摄像功能对应的光圈大小、快门速度以及感光度等摄像参数可以不相同,可以呈现出不同的摄像效果。 摄像功能又可以称为摄像模式,例如“人像”拍照功能又可以称为“人像”拍照模式。"Camera" is an application for capturing images on smart phones, tablets, and other electronic devices. The application does not limit the name of the application. The "portrait" camera function and video recording function may be the camera function included in the "camera" application. In addition, the "camera" application can also include a variety of other camera functions. The camera parameters such as aperture size, shutter speed, and sensitivity corresponding to different camera functions can be different, and different camera effects can be presented. The camera function can also be called a camera mode, for example, the "portrait" camera function can also be called a "portrait" camera mode.
可以理解的是,“美肤”、“美体”、“人像”只是本实施例中所使用的一些词语,其代表的含义在本实施例中已经记载,其名称并不能对本实施例构成任何限制。另外,在本申请其他一些实施例中,“美肤”也可以被称为例如“人脸美容”等其他名词。同样的,本申请实施例中提到的“美体”,在其他一些实施例中也可以被称为例如“瘦身塑型”等其他名字。It can be understood that “beauty skin”, “beauty body”, and “portrait” are just some of the words used in this embodiment, and the meanings they represent have been recorded in this embodiment, and their names do not constitute any limitation to this embodiment. . In addition, in some other embodiments of the present application, “beauty skin” may also be referred to as other terms such as “face beauty”. Similarly, the "beauty body" mentioned in the embodiments of the present application may also be called other names such as "slimming shape" in other embodiments.
首先介绍本申请以下实施例中提供的示例性电子设备100。First, an exemplary electronic device 100 provided in the following embodiments of the present application is introduced.
图1A示出了电子设备100的结构示意图。FIG. 1A shows a schematic structural diagram of the electronic device 100.
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,3D摄像模组193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180G,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 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, a battery 142, an antenna 1, an antenna 2 , Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, key 190, motor 191, indicator 192, 3D camera module 193, display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro 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 180G, 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 the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 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),中央处理器(central processing unit,CPU),图形处理器(graphics processing unit,GPU),神经网络处理器(neural-network processing unit,NPU),调制解调处理器,图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。在一些实施例中,电子设备100也可以包括一个或多个处理器110。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a central processing unit (CPU), and a graphics processing unit (GPU). , Neural network processor (neural-network processing unit, NPU), modem processor, image signal processor (ISP), controller, memory, video codec, digital signal processor (digital signal processor) processor, DSP), baseband processor, etc. Among them, the different processing units may be independent devices or may be integrated in one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100. The controller can generate the operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetch and execution.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了电子设备100的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. The repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the electronic device 100.
在一些实施例中,处理器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. Interfaces can include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit, sound, I2S) interface, pulse code modulation (pulse code modulation (PCM) interface, universal asynchronous transceiver (universal) asynchronous 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.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,3D摄像模组193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may include multiple sets of I2C buses. The processor 110 may respectively couple the touch sensor 180K, charger, flash, 3D camera module 193, etc. through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface, and realize the touch function of the electronic device 100.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, to realize the function of answering the phone call through the Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering the phone call through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,3D摄像模组193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和3D摄像模组193通过CSI接口通信,实现电子设备100的摄像功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the 3D camera module 193. MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI) and so on. In some embodiments, the processor 110 and the 3D camera module 193 communicate through a CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the electronic device 100.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与3D摄像模组193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured via software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 to the 3D camera module 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. GPIO interface can also be configured as 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 conforms to the USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present invention is only a schematic description, and does not constitute a limitation on the structure of the electronic device 100. In other embodiments, the electronic device 100 may also use different interface connection methods in the foregoing embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可 以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive the charging input of the wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,3D摄像模组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 charge management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 194, 3D camera module 193, and wireless communication module 160. The power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。 Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like. The mobile communication module 150 can receive the electromagnetic wave from the antenna 1 and filter, amplify, etc. the received electromagnetic wave, and transmit it to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor and convert it to electromagnetic wave radiation through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is processed by the baseband processor and then passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110, and may be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。示例性地,无线通信模块160可以包括蓝牙模块、Wi-Fi模块等。The wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (bluetooth, BT), and global navigation satellites that are applied to the electronic device 100 Wireless communication solutions such as global navigation (satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR), etc. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives the electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and convert it to electromagnetic waves through the antenna 2 to radiate it out. Exemplarily, the wireless communication module 160 may include a Bluetooth module, a Wi-Fi module, and the like.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple  access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 and the mobile communication module 150 are coupled, and the antenna 2 and the wireless communication module 160 are coupled so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global mobile communication system (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long-term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation system (BDS), and a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite-based augmentation system (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等可以实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行指令以生成或改变显示信息。The electronic device 100 can realize a display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting 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 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 use a 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) emitting diode, AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
电子设备100可以通过3D摄像模组193,ISP,视频编解码器,GPU,显示屏194以及应用处理器AP、神经网络处理器NPU等实现摄像功能。The electronic device 100 can realize a camera function through a 3D camera module 193, an ISP, a video codec, a GPU, a display screen 194, an application processor AP, and a neural network processor NPU.
3D摄像模组193可用于采集拍摄对象的彩色图像数据以及深度数据。ISP可用于处理3D摄像模组193采集的彩色图像数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在3D摄像模组193中。The 3D camera module 193 can be used to collect color image data and depth data of the subject. The ISP can be used to process the color image data collected by the 3D camera module 193. For example, when taking a picture, the shutter is opened, and light is transmitted to the photosensitive element of the camera through the lens, and the optical signal is converted into an electrical signal. The photosensitive element of the camera transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. ISP can also optimize the algorithm of 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 set in the 3D camera module 193.
在一些实施例中,3D摄像模组193可以由彩色摄像模组和3D感测模组组成。In some embodiments, the 3D camera module 193 may be composed of a color camera module and a 3D sensing module.
在一些实施例中,彩色摄像模组的摄像头的感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。In some embodiments, the photosensitive element of the camera of the color camera module may be a charge coupled device (charge), a coupled device (CCD), or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other format image signals.
在一些实施例中,3D感测模组可以是(time of flight,TOF)3D感测模块或结构光(structured light)3D感测模块。其中,结构光3D感测是一种主动式深度感测技术,结构光3D感测模组的基本零组件可包括红外线(Infrared)发射器、IR相机模等。结构光3D感测模组的工作原理是先对被拍摄物体发射特定图案的光斑(pattern),再接收该物体表面上的光斑图案编码(light coding),进而比对与原始投射光斑的异同,并利用三角原理计算出物体的三维坐标。该三维坐标中就包括电子设备100距离被拍摄物体的距离。其中,TOF 3D感测也是主动式深度感测技术,TOF 3D感测模组的基本组件可包括红外线(Infrared)发射器、IR相机模等。TOF 3D感测模组的工作原理是通过红外线折返的时间去计算TOF 3D感测模组跟被拍摄物体之间的距离(即深度),以得到3D景深图。In some embodiments, the 3D sensing module may be a (time of flight, TOF) 3D sensing module or a structured light (structured light) 3D sensing module. Among them, the structured light 3D sensing is an active depth sensing technology. The basic components of the structured light 3D sensing module may include an infrared (Infrared) emitter, an IR camera module, and the like. The working principle of the structured light 3D sensing module is to first emit a specific pattern of spots on the object to be photographed, and then receive the light spot pattern encoding on the surface of the object, and then compare the similarities and differences with the original projected spot. And use the principle of triangle to calculate the three-dimensional coordinates of the object. The three-dimensional coordinates include the distance between the electronic device 100 and the object to be photographed. Among them, TOF 3D sensing is also an active depth sensing technology. The basic components of TOF 3D sensing modules may include infrared (Infrared) transmitters, IR camera modules, and so on. The working principle of the TOF 3D sensing module is to calculate the distance (that is, the depth) between the TOF 3D sensing module and the object to be captured by the time of infrared foldback to obtain a 3D depth map.
结构光3D感测模组还可应用于人脸识别、体感游戏机、工业用机器视觉检测等领域。 TOF 3D感测模组还可应用于游戏机、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)等领域。The structured light 3D sensing module can also be used in the fields of face recognition, somatosensory game consoles, industrial machine vision inspection, etc. The TOF 3D sensing module can also be used in game consoles, augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) and other fields.
在另一些实施例中,3D摄像模组193还可以由两个或更多个摄像头构成。这两个或更多个摄像头可包括彩色摄像头,彩色摄像头可用于采集被拍摄物体的彩色图像数据。这两个或更多个摄像头可采用立体视觉(stereo vision)技术来采集被拍摄物体的深度数据。立体视觉技术是基于人眼视差的原理,在自然光源下,透过两个或两个以上的摄像头从不同的角度对同一物体拍摄影像,再进行三角测量法等运算来得到电子设备100与被拍摄物之间的距离信息,即深度信息。In other embodiments, the 3D camera module 193 may also be composed of two or more cameras. The two or more cameras may include a color camera, and the color camera may be used to collect color image data of the object to be photographed. The two or more cameras may use stereo vision technology to collect depth data of the object being photographed. Stereo vision technology is based on the principle of parallax of human eyes. Under natural light, two or more cameras are used to capture images of the same object from different angles, and then triangulation and other operations are performed to obtain the electronic device 100 and the The distance information between the objects is the depth information.
在一些实施例中,电子设备100可以包括1个或N个3D摄像模组193,N为大于1的正整数。具体的,电子设备100可以包括1个前置3D摄像模组193以及1个后置3D摄像模组193。其中,前置3D摄像模组193通常可用于采集面对显示屏194的拍摄者自己的彩色图像数据以及深度数据,后置3D摄像模组可用于采集拍摄者所面对的拍摄对象(如人物、风景等)的彩色图像数据以及深度数据。In some embodiments, the electronic device 100 may include 1 or N 3D camera modules 193, where N is a positive integer greater than 1. Specifically, the electronic device 100 may include a front 3D camera module 193 and a rear 3D camera module 193. Among them, the front 3D camera module 193 can usually be used to collect the color image data and depth data of the photographer facing the display screen 194, and the rear 3D camera module can be used to collect the subject (such as people) faced by the photographer , Landscape, etc.) color image data and depth data.
在一些实施例中,处理器110中的CPU或GPU或NPU可以对3D摄像模组193所采集的彩色图像数据和深度数据进行处理。在一些实施例中,NPU可以通过骨骼点识别技术所基于的神经网络算法,例如卷积神经网络算法(CNN),来识别3D摄像模组193(具体是彩色摄像模组)所采集的彩色图像数据,以确定被拍摄人物的骨骼点。CPU或GPU也可来运行神经网络算法以实现根据彩色图像数据确定被拍摄人物的骨骼点。在一些实施例中,CPU或GPU或NPU还可用于根据3D摄像模组193(具体是3D感测模组)所采集的深度数据和已识别出的骨骼点来确认被拍摄人物的身材(如身体比例、骨骼点之间的身体部位的胖瘦情况),并可以进一步确定针对该被拍摄人物的身体美化参数,最终根据该身体美化参数对被拍摄人物的拍摄图像进行处理,以使得该拍摄图像中该被拍摄人物的体型被美化。后续实施例中会详细介绍如何基于3D摄像模组193所采集的彩色图像数据和深度数据对被拍摄人物的图像进行美体处理,这里先不赘述。In some embodiments, the CPU or GPU or NPU in the processor 110 can process the color image data and depth data collected by the 3D camera module 193. In some embodiments, the NPU can recognize the color image collected by the 3D camera module 193 (specifically, the color camera module) through a neural network algorithm based on the bone point recognition technology, such as a convolutional neural network algorithm (CNN) Data to determine the bone points of the person being photographed. The CPU or GPU can also run a neural network algorithm to determine the bone point of the person to be photographed based on the color image data. In some embodiments, the CPU, GPU, or NPU can also be used to confirm the figure of the person being photographed based on the depth data collected by the 3D camera module 193 (specifically, the 3D sensing module) and the identified bone points (such as The proportion of the body, the fatness and thinness of the body parts between the bone points), and can further determine the body beautification parameters for the photographed person, and finally process the photographed image of the photographed person according to the body beautification parameters to make the shooting The figure in the image is beautified. Subsequent embodiments will introduce in detail how to perform body treatment on the image of the captured person based on the color image data and depth data collected by the 3D camera module 193, which will not be repeated here.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。The digital signal processor is used to process digital signals. In addition to digital image signals, it can also process other digital signals. For example, when the electronic device 100 is selected at a frequency point, the digital signal processor is used to perform Fourier transform on the energy at the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)-1,MPEG-2,MPEG-3,MPEG-4等。The video codec is used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (MPEG)-1, MPEG-2, MPEG-3, MPEG-4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information and can continue to self-learn. The NPU can realize applications such as intelligent recognition of the electronic device 100, such as image recognition, face recognition, voice recognition, and text understanding.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐、照片、视频等数据保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 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, photos, videos and other data in an external memory card.
内部存储器121可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器110可以通过运行存储在内部存储器121的上述指令,从而使得电子设备100执行本申请一些实施例中所提供的电子设备的拍照预览方法,以及各种功能应用以及数据处理 等。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统;该存储程序区还可以存储一个或多个应用程序(比如图库、联系人等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如照片,联系人等)。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 121 may be used to store one or more computer programs including instructions. The processor 110 may run the above instructions stored in the internal memory 121, so that the electronic device 100 executes the photo preview method of the electronic device provided in some embodiments of the present application, as well as various functional applications and data processing. The internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store the operating system; the storage program area can also store one or more application programs (such as gallery, contacts, etc.) and so on. The storage data area may store data (such as photos, contacts, etc.) created during use of the electronic device 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 memory (universal flash storage, UFS), and so on.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an 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 analog audio signal output, and also used to convert analog audio input into 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 disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also known as "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or voice message, the voice can be received by bringing the receiver 170B close to the ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also known as "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 to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C. In addition to collecting sound signals, it may also implement a noise reduction function. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The headset interface 170D is used to connect wired headsets. The earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile electronic device (open mobile terminal) platform (OMTP) standard interface, and the American Telecommunications Industry Association (cellular telecommunications industry association of the United States, 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, and capacitive pressure sensors. The capacitive pressure sensor may be a parallel plate including at least two conductive materials. When force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure according to the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position based on 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 intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than the first pressure threshold acts on 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 electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the jitter angle of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the jitter of the electronic device 100 through 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 electronic device 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 electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a clamshell machine, the electronic device 100 may detect the opening and closing of the clamshell according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the holster or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to recognize the posture of electronic devices, and can be used in horizontal and vertical screen switching, pedometer and other applications.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting scenes, the electronic device 100 may use the distance sensor 180F to measure 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 electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 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, pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense the brightness of ambient light. The electronic device 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 electronic device 100 is in a pocket to prevent accidental touch.
指纹传感器180G用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180G is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access to application lock, fingerprint photo taking, fingerprint answering call, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the electronic device 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, the electronic device 100 performs to reduce the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In some other embodiments, when the temperature is below another threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
触摸传感器180K,也可称触控面板或触敏表面。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The touch sensor 180K can also be called a touch panel or a touch-sensitive surface. The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 constitute a touch screen, also called a "touch screen". The touch sensor 180K is used to detect a touch operation 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 electronic device 100, which is different from the location where the display screen 194 is located.
骨传导传感器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 acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive a blood pressure beating signal. In some embodiments, the bone conduction sensor 180M may also be provided in the earphone and combined into a bone conduction earphone. The audio module 170 may parse out the voice signal based on the vibration signal of the vibrating bone block of the voice part acquired by the bone conduction sensor 180M to realize the voice function. The application processor may analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The key 190 includes a power-on key, a volume key, and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 may generate a vibration prompt. The motor 191 can be used for vibration notification of incoming calls and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, audio playback, etc.) may correspond to different vibration feedback effects. For the touch operation of different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminder, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. Touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the amount of power change, and can also be used to indicate messages, missed calls, notifications, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. The same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards may be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through a SIM card to realize functions such as call and data communication. In some embodiments, the electronic device 100 uses eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
图1A示例性所示的电子设备100可以通过显示屏194显示以下各个实施例中所描述的各个用户界面。电子设备100可以通过触摸传感器180K在各个用户界面中检测触控操作,例如在各个用户界面中的点击操作(如在图标上的触摸操作、双击操作),又例如在各个用户界面中的向上或向下的滑动操作,或执行画圆圈手势的操作,等等。在一些实施例中,电子设备100可以通过陀螺仪传感器180B、加速度传感器180E等检测用户手持电子设备100执行的运动手势,例如晃动电子设备。在一些实施例中,电子设备100可以通过3D摄像模组193(如3D摄像头、深度摄像头)检测非触控的手势操作。The electronic device 100 exemplarily shown in FIG. 1A may display various user interfaces described in the following embodiments through the display screen 194. The electronic device 100 can detect a touch operation in each user interface through the touch sensor 180K, for example, a click operation in each user interface (such as a touch operation on an icon, a double-click operation), and, for example, an upward or in each user interface. Swipe down, or perform a gesture of drawing a circle, and so on. In some embodiments, the electronic device 100 may detect a motion gesture performed by the user holding the electronic device 100, such as shaking the electronic device, through the gyro sensor 180B, the acceleration sensor 180E, or the like. In some embodiments, the electronic device 100 can detect non-touch gesture operations through the 3D camera module 193 (eg, 3D camera, depth camera).
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, event-driven architecture, micro-core architecture, micro-service architecture, or cloud architecture. The embodiment of the present invention takes the Android system with a layered architecture as an example to exemplarily explain the software structure of the electronic device 100.
图1B是本发明实施例的电子设备100的软件结构框图。FIG. 1B is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present invention.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom are the application layer, the application framework layer, the Android runtime and the system library, and the kernel layer.
应用程序层可以包括一系列应用程序包。The application layer may include a series of application packages.
如图1B所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in FIG. 1B, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface) and programming framework for applications at the application layer. The application framework layer includes some predefined functions.
如图1B所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in FIG. 1B, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and so on.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。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, intercept the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data, and make these data accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text and controls for displaying pictures. 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 including an SMS notification icon may include a view to display text and a view to display pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connection, hang 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 applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify the completion of downloading, message reminders, etc. 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 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, the text message is displayed in the status bar, a prompt sound is emitted, the electronic device vibrates, and the indicator light flashes.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core library and virtual machine. Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library contains two parts: one part is the function function that Java language needs to call, and the other part is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the application framework layer into binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library may include multiple functional modules. For example: surface manager (surface manager), media library (Media library), 3D 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 the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,G.264,MP3,AAC,AMR,JPG,PNG等。The media library supports a variety of commonly used audio, video format playback and recording, and still image files. The media library can support multiple audio and video encoding formats, such as: MPEG4, G.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to realize 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 the display driver, camera driver, audio driver, and sensor driver.
图1B所示的软件系统涉及到使用分享能力的应用呈现(如图库,文件管理器),提供分享能力的即时分享模块,提供打印能力的打印服务(print service)和打印后台服务(print spooler),以及应用框架层提供打印框架、WLAN服务、蓝牙服务,以及内核和底层提供WLAN蓝牙能力和基本通信协议。The software system shown in Figure 1B involves the presentation of applications that use sharing capabilities (such as a gallery, file manager), an instant sharing module that provides sharing capabilities, a print service (print service) and a print spooler (print background service) that provide print capabilities , And the application framework layer provide printing framework, WLAN services, Bluetooth services, and the core and the bottom layer provide WLAN Bluetooth capabilities and basic communication protocols.
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。The following describes the workflow of the software and hardware of the electronic device 100 in combination with capturing a photographing scene.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操 作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸触摸操作,该触摸操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过3D摄像模组193捕获静态图像或视频。When the touch sensor 180K receives the touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes touch operations into original input events (including touch coordinates, time stamps and other information of touch operations). The original input event is stored in the kernel layer. The application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch operation, the control corresponding to the touch operation is a camera application icon as an example. The camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer, and the 3D camera Module 193 captures still images or video.
下面介绍电子设备100上的用于应用程序菜单的示例性用户界面。The following describes an exemplary user interface for the application menu on the electronic device 100.
图2A示例性示出了电子设备100上的用于应用程序菜单的示例性用户界面21。如图2A所示,电子设备100可以配置有3D摄像模组193。在一些实施例中,193-1可以是彩色摄像头,193-2可以是结构光3D摄像模组。在另一些实施例中,193-1可以是彩色摄像头,193-2可以是TOF 3D摄像模组。在再一些实施例中,193-1、193-2可以是两个彩色摄像头。如图2A所示,3D摄像模组193可设置于电子设备100的顶端,如电子设备100的“刘海”位置(即图2A中示出的区域AA)。可以知道,区域AA中除了包括3D摄像模组193之外,还可以包括照明器197(未在图1A中示出)、扬声器170A、接近光传感器180G、环境光传感器180L等。在一些实施例中,如图2B所示,电子设备100的背面也可以配置有3D摄像模组193,以及照明器197。FIG. 2A exemplarily shows an exemplary user interface 21 on the electronic device 100 for an application menu. As shown in FIG. 2A, the electronic device 100 may be configured with a 3D camera module 193. In some embodiments, 193-1 may be a color camera, and 193-2 may be a structured light 3D camera module. In other embodiments, 193-1 may be a color camera, and 193-2 may be a TOF 3D camera module. In still other embodiments, 193-1 and 193-2 may be two color cameras. As shown in FIG. 2A, the 3D camera module 193 may be disposed on the top of the electronic device 100, such as the "bangs" position of the electronic device 100 (ie, the area AA shown in FIG. 2A). It can be known that, in addition to the 3D camera module 193, the area AA may also include an illuminator 197 (not shown in FIG. 1A), a speaker 170A, a proximity light sensor 180G, an ambient light sensor 180L, and the like. In some embodiments, as shown in FIG. 2B, the back of the electronic device 100 may also be equipped with a 3D camera module 193 and an illuminator 197.
如图2A所示,用户界面21可包括:状态栏201,具有常用应用程序图标的托盘223,日历指示符203,天气指示符205,导航栏225,以及其他应用程序图标。其中:As shown in FIG. 2A, the user interface 21 may include a status bar 201, a tray 223 with frequently used application icons, a calendar indicator 203, a weather indicator 205, a navigation bar 225, and other application icons. among them:
状态栏201可包括:移动通信信号(又可称为蜂窝信号)的一个或多个信号强度指示符201-1、移动通信信号的运营商的指示符201-2、时间指示符201-3、电池状态指示符201-4等。The status bar 201 may include: one or more signal strength indicators 201-1 of the mobile communication signal (also called a cellular signal), an indicator 201-2 of the operator of the mobile communication signal, a time indicator 201-3, Battery status indicator 201-4, etc.
日历指示符203可用于指示当前时间,例如日期、星期几、时分信息等。The calendar indicator 203 can be used to indicate the current time, such as date, day of the week, hour and minute information, and so on.
天气指示符205可用于指示天气类型,例如多云转晴、小雨等,还可以用于指示气温等信息。The weather indicator 205 can be used to indicate the weather type, such as cloudy to sunny, light rain, etc., and can also be used to indicate temperature and other information.
具有常用应用程序图标的托盘223可展示:电话图标223-1、短消息图标223-2、联系人图标221-4等。The tray 223 with frequently used application icons may display: a phone icon 223-1, a short message icon 223-2, a contact icon 221-4, and the like.
导航栏225可包括:返回按键225-1、主界面(Gome screen)按键225-3、呼出任务历史按键225-5等系统导航键。当检测到用户点击返回按键225-1时,电子设备100可显示当前页面的上一个页面。当检测到用户点击主界面按键225-3时,电子设备100可显示主界面。当检测到用户点击呼出任务历史按键225-5时,电子设备100可显示用户最近打开的任务。各导航键的命名还可以为其他,本申请对此不做限制。不限于虚拟按键,导航栏225中的各导航键也可以实现为物理按键。The navigation bar 225 may include: a return button 225-1, a main screen (Gome) button 225-3, an outgoing task history button 225-5, and other system navigation keys. When it is detected that the user clicks the return button 225-1, the electronic device 100 may display the previous page of the current page. When it is detected that the user clicks the main interface button 225-3, the electronic device 100 may display the main interface. When it is detected that the user clicks the outgoing task history button 225-5, the electronic device 100 may display the task recently opened by the user. The naming of each navigation key can be other, and this application does not limit it. Not limited to virtual keys, each navigation key in the navigation bar 225 may also be implemented as a physical key.
其他应用程序图标可例如:微信(Wechat)的图标211、QQ的图标212、推特(Twitter)的图标213、脸书(Facebook)的图标214、邮箱的图标215、云共享的图标216、备忘录的图标217、设置的图标218、图库的图标219、相机的图标220。用户界面21还可包括页面指示符221。其他应用程序图标可分布在多个页面,页面指示符221可用于指示用户当前浏览的是哪一个页面中的应用程序。用户可以左右滑动其他应用程序图标的区域,来浏览其他页面中的应用程序图标。Other application icons may be, for example: Wechat icon 211, QQ icon 212, Twitter icon 213, Facebook icon 214, mailbox icon 215, cloud sharing icon 216, memo Icon 217, set icon 218, gallery icon 219, camera icon 220. The user interface 21 may also include a page indicator 221. Other application icons may be distributed on multiple pages, and the page indicator 221 may be used to indicate which page of the application the user is currently browsing. The user can slide the area of other application icons left and right to browse the application icons in other pages.
在一些实施例中,图2A示例性所示的用户界面21可以为主界面(Gome screen)。In some embodiments, the user interface 21 exemplarily shown in FIG. 2A may be a main interface (Gome screen).
在其他一些实施例中,电子设备100还可以包括主屏幕键。该主屏幕键可以是实体按键, 也可以是虚拟按键(如按键225-3)。该主屏幕键可用于接收用户的指令,将当前显示的UI返回到主界面,这样可以方便用户随时查看主屏幕。上述指令具体可以是用户单次按下主屏幕键的操作指令,也可以是用户在短时间内连续两次按下主屏幕键的操作指令,还可以是用户在预定时间内长按主屏幕键的操作指令。在本申请其他一些实施例中,主屏幕键还可以集成指纹识别器,以便用于在按下主屏幕键的时候,随之进行指纹采集和识别。In some other embodiments, the electronic device 100 may further include a home screen key. The home screen key may be a physical key or a virtual key (such as key 225-3). The home screen key can be used to receive user instructions and return the currently displayed UI to the home interface, which can facilitate the user to view the home screen at any time. The above instruction may specifically be an operation instruction in which the user presses the home screen key once, or an operation instruction in which the user presses the home screen key twice in a short period of time, or a long press of the home screen key in a predetermined time Operating instructions. In some other embodiments of the present application, the home screen key may also be integrated with a fingerprint reader, so that when the home screen key is pressed, fingerprint collection and identification are performed accordingly.
可以理解的是,图2A仅仅示例性示出了电子设备100上的用户界面,不应构成对本申请实施例的限定。It can be understood that FIG. 2A only exemplarily shows the user interface on the electronic device 100, and should not constitute a limitation on the embodiments of the present application.
下面分别描述本申请涉及的一种应用场景:图像拍摄场景。The following describes an application scenario involved in this application: an image shooting scenario.
如图3A所示,电子设备可以检测到作用于相机的图标220的触控操作(如在图标220上的点击操作),响应于该操作,可以显示图3B示例性所示的用户界面31。用户界面31可以是“相机”应用程序的用户界面,可用于用户进行摄像,例如拍照片、录像。“相机”是智能手机、平板电脑等电子设备上的一款图像拍摄的应用程序,本申请对该应用程序的名称不做限制。也即是说,用户可以点击图标220来打开“相机”的用户界面31。不限于此,用户还可以在其他应用程序中打开用户界面31,例如用户在“微信”中点击拍摄控件来打开用户界面31。“微信”是一款社交类应用程序,可支持用户向他人分享所拍摄的照片等。As shown in FIG. 3A, the electronic device may detect a touch operation (such as a click operation on the icon 220) acting on the icon 220 of the camera, and in response to the operation, the user interface 31 exemplarily shown in FIG. 3B may be displayed. The user interface 31 may be a user interface of a "camera" application, and may be used for a user to take a picture, for example, take a picture or record a video. "Camera" is an application for capturing images on smart phones, tablets, and other electronic devices. The application does not limit the name of the application. That is to say, the user can click the icon 220 to open the user interface 31 of the "camera". Not limited to this, the user may also open the user interface 31 in other applications, for example, the user clicks the shooting control in “WeChat” to open the user interface 31. "WeChat" is a social application that allows users to share photos taken with others.
图3B示例性示出了智能手机等电子设备上的“相机”应用程序的一个用户界面31。如图3B所示,用户界面31可包括:区域301、拍摄模式列表302、控件303、控件304及控件305。其中:FIG. 3B exemplarily shows a user interface 31 of a “camera” application on an electronic device such as a smartphone. As shown in FIG. 3B, the user interface 31 may include an area 301, a shooting mode list 302, a control 303, a control 304, and a control 305. among them:
区域301可以称为预览框301。预览框301可用于显示3D摄像模组193实时采集的彩色图像。电子设备可以实时刷新其中的显示内容,以便于用户预览3D摄像模组193当前采集的彩色图像。这里,3D摄像模组193可以是后置摄像头,或者是前置摄像头。The area 301 may be referred to as a preview frame 301. The preview frame 301 can be used to display the color image collected by the 3D camera module 193 in real time. The electronic device can refresh the display content in real time, so that the user can preview the color image currently collected by the 3D camera module 193. Here, the 3D camera module 193 may be a rear camera or a front camera.
拍摄模式列表302中可以显示有一个或多个拍摄模式选项。这一个或多个摄像选项可以包括:夜景模式选项302A、人像模式选项302B、拍照模式选项302C、录像模式选项302D以及更多拍摄模式选项302E。这一个或多个摄像选项在界面上可以表现为文字信息,例如夜景模式选项302A、人像模式选项302B、拍照模式选项302C、录像模式选项302D以及更多拍摄模式选项302E可以分别对应文字“夜景”、“人像”、“拍照”、“录像”、“更多”。不限于此,这一个或多个摄像选项在界面上还可以表现为图标或者其他形式的交互元素(interactive element,IE)。在一些实施例中,电子设备100可以默认选定拍照模式选项302C,拍照模式选项302C的显示状态(如拍照模式选项302C被高亮)可表示拍照模式选项302C已被选定。One or more shooting mode options may be displayed in the shooting mode list 302. The one or more camera options may include: night view mode option 302A, portrait mode option 302B, camera mode option 302C, video mode option 302D, and more shooting mode options 302E. The one or more camera options can be represented as text information on the interface, for example, night view mode option 302A, portrait mode option 302B, camera mode option 302C, video mode option 302D, and more shooting mode options 302E can correspond to the text "night view" , "Portrait", "Take Photo", "Video", "More". Not limited to this, the one or more camera options can also be represented as icons or other forms of interactive elements (IE) on the interface. In some embodiments, the electronic device 100 may select the photographing mode option 302C by default, and the display state of the photographing mode option 302C (eg, the photographing mode option 302C is highlighted) may indicate that the photographing mode option 302C has been selected.
电子设备100可以检测到作用于拍摄模式选项的用户操作,该用户操作可用于选择拍摄模式,响应该操作,电子设备100可以开启用户选择的拍摄模式。特别的,当该用户操作作用于更多拍摄模式选项302E时,电子设备100可以进一步显示更多的其他拍摄模式选项,如大光圈拍摄模式选项、慢动作拍摄模式选项等等,可以向用户展示更丰富的摄像功能。不限于图3B所示,拍摄模式列表302中可以不显示更多拍摄模式选项302E,用户可以通过在拍摄模式列表302中向左/右滑动来浏览其他拍摄模式选项。The electronic device 100 may detect a user operation acting on a shooting mode option, and the user operation may be used to select a shooting mode, and in response to the operation, the electronic device 100 may turn on the shooting mode selected by the user. In particular, when the user operation acts on more shooting mode options 302E, the electronic device 100 can further display more other shooting mode options, such as large aperture shooting mode options, slow motion shooting mode options, etc., which can be shown to the user More abundant camera functions. Not limited to that shown in FIG. 3B, more shooting mode options 302E may not be displayed in the shooting mode list 302, and the user may browse other shooting mode options by swiping left/right in the shooting mode list 302.
控件303可用于监听触发拍摄(拍照或录像)的用户操作。电子设备可以检测到的作用于控件303的用户操作(如在控件303上的点击操作),响应于该操作,电子设备100可以保存预览框301中的图像。保存的图像可以是图片或视频。另外,电子设备100还可以在控件 304中显示所保存的图像的缩略图。也即是说,用户可以点击控件303来触发拍摄。其中,控件303可以是按钮或者其他形式的控件。本申请中,可以将控件303称为拍摄控件。The control 303 can be used to monitor user operations that trigger shooting (photographing or video recording). The electronic device can detect a user operation on the control 303 (such as a click operation on the control 303), and in response to the operation, the electronic device 100 can save the image in the preview box 301. The saved image can be a picture or a video. In addition, the electronic device 100 can also display the thumbnail of the saved image in the control 304. That is to say, the user can click the control 303 to trigger shooting. The control 303 may be a button or other forms of controls. In this application, the control 303 may be referred to as a shooting control.
控件304可用于监听触发切换摄像头的用户操作。电子设备100可以检测到作用于控件304的用户操作(如在控件304上的点击操作),响应于该操作,电子设备100可以切换摄像头(如将后置摄像头切换为前置摄像头,或者将前置摄像头切换为后置摄像头)。The control 304 can be used to monitor user operations that trigger camera switching. The electronic device 100 can detect a user operation on the control 304 (such as a click operation on the control 304), and in response to the operation, the electronic device 100 can switch the camera (such as switching the rear camera to the front camera, or the front Set the camera to switch to the rear camera).
控件305可用于监听触发打开“图库”的用户操作。电子设备100可以检测到作用于控件305的用户操作(如在控件305上的点击操作),响应于该操作,电子设备100可以显示“图库”的用户界面,该用户界面中可显示有电子设备100保存的图片。这里,“图库”是智能手机、平板电脑等电子设备上的一款图片管理的应用程序,又可以称为“相册”,本实施例对该应用程序的名称不做限制。“图库”可以支持用户对存储于电子设备上的图片进行各种操作,例如浏览、编辑、删除、选择等操作。The control 305 can be used to monitor user operations that trigger the opening of the "Gallery". The electronic device 100 can detect a user operation (such as a click operation on the control 305) acting on the control 305, and in response to the operation, the electronic device 100 can display a user interface of "Gallery", in which the electronic device can be displayed 100 saved pictures. Here, "Gallery" is an application for managing pictures on smart phones, tablet computers, and other electronic devices, and may also be called an "album." In this embodiment, the name of the application is not limited. "Gallery" can support users to perform various operations on the pictures stored on the electronic device, such as browsing, editing, deleting, selecting and other operations.
可以看出,用户界面31可向用户展示“相机”所提供的多种摄像功能(模式),用户可以通过点击拍摄模式选项来选择开启相应的拍摄模式。It can be seen that the user interface 31 can show the user various camera functions (modes) provided by the “camera”, and the user can choose to turn on the corresponding shooting mode by clicking the shooting mode option.
基于上述图像拍摄场景,下面介绍电子设备100上实现的用户界面(user interface,UI)的一些实施例。Based on the above image shooting scene, some embodiments of a user interface (UI) implemented on the electronic device 100 are described below.
图3C示例性示出了“相机”应用程序的“人像”拍照功能所提供的用户界面32。FIG. 3C exemplarily shows the user interface 32 provided by the “portrait” photographing function of the “camera” application.
在拍摄模式列表302中,电子设备100可以检测到作用于人像模式选项302B的用户操作(如在人像模式选项302B上的点击操作),响应于该用户操作,电子设备100可以开启“人像”拍照功能,并显示图3C示例性所示用的用户界面。前述内容中已经阐述了电子设备100开启“人像”拍照功能的定义,这里不再赘述。本申请中,人像模式选项可以称为第一拍摄模式选项。In the shooting mode list 302, the electronic device 100 can detect a user operation acting on the portrait mode option 302B (such as a click operation on the portrait mode option 302B), and in response to the user operation, the electronic device 100 can turn on the "portrait" photo Function and display the user interface shown as an example in FIG. 3C. The definition of the electronic device 100 enabling the "portrait" camera function has been explained in the foregoing, and will not be repeated here. In this application, the portrait mode option may be referred to as the first shooting mode option.
如图3C所示,用户界面32包括:预览框301、拍摄模式列表302、控件303、控件304、控件305,以及306、控件207。其中:预览框301、拍摄模式列表302、控件303、控件304、控件305可以参考用户界面31中的相关描述,这里不再赘述。控件306可用于监听打开光效模板选项的用户操作,控件307可用于监听打开人物美化选项的用户操作。As shown in FIG. 3C, the user interface 32 includes: a preview box 301, a shooting mode list 302, a control 303, a control 304, a control 305, and 306, a control 207. Among them: for the preview box 301, the shooting mode list 302, the control 303, the control 304, and the control 305, reference may be made to the relevant description in the user interface 31, which will not be repeated here. The control 306 can be used to monitor the user operation of opening the light effect template option, and the control 307 can be used to monitor the user operation of opening the character beautification option.
当检测到作用于控件306(如在控件306上的点击操作)的用户操作时,电子设备100可以在用户界面31中显示多种光效模板选项。不同的光效模板可以代表(或对应)不同的光效参数,如光源位置、图层融合参数、纹理图案投影的位置、投影的方向等。用户可以选择不同的光效模板使得拍摄得到的照片呈现出不同的效果。本申请对多种光效模板选项在用户界面31中的界面表现形式不做限制。When a user operation acting on the control 306 (such as a click operation on the control 306) is detected, the electronic device 100 may display various light effect template options in the user interface 31. Different light effect templates can represent (or correspond to) different light effect parameters, such as light source position, layer fusion parameter, texture pattern projection position, projection direction, etc. The user can select different light effect templates to make the photos taken show different effects. This application does not limit the interface representation forms of various light effect template options in the user interface 31.
当检测到作用于控件307的用户操作(如在控件307上的点击操作)时,电子设备100可以显示图3D示例性所示的用户界面33。图3D示例性示出了人物美化功能所提供的用户界面。后续内容中会详细介绍图3D示例性示出的用户界面,这里先不赘述。When a user operation (such as a click operation on the control 307) acting on the control 307 is detected, the electronic device 100 may display the user interface 33 exemplarily shown in FIG. 3D. FIG. 3D exemplarily shows the user interface provided by the character beautification function. The user interface shown by way of example in FIG. 3D will be described in detail in the following content, which will not be repeated here.
在一些实施例中,响应于作用于人像模式选项302B的用户操作,电子设备100还可以更新人像拍摄模式选项的显示状态,更新后的显示状态可表示人像拍摄模式已被选定。例如,更新后的显示状态可以是高亮拍摄模式选项303B对应的文本信息“人像”。不限于此,更新后的显示状态还可以呈现其他界面表现形式,如该文本信息“人像”的字体变大、该文本信息“人 像”被加框、该文本信息“人像”被加下划线、选项303B颜色加深等。In some embodiments, in response to a user operation acting on the portrait mode option 302B, the electronic device 100 may also update the display state of the portrait shooting mode option, and the updated display state may indicate that the portrait shooting mode has been selected. For example, the updated display state may be the text information "Portrait" corresponding to the highlight shooting mode option 303B. Not limited to this, the updated display state can also present other interface expressions, such as the font of the text information "Portrait" becomes larger, the text information "Portrait" is framed, the text information "Portrait" is underlined, options 303B color deepening, etc.
在一些实施例中,在电子设备100开启“人像”拍照功能之后,如果电子设备100从3D摄像模组193采集到的彩色图像中没有检测到人物,则可以在预览框301中输出提示信息308,提示信息308可以是文字“未检测到人物”,可用于提示电子设备100未检测到人物。In some embodiments, after the electronic device 100 turns on the "portrait" camera function, if the electronic device 100 does not detect a person in the color image collected from the 3D camera module 193, a prompt message 308 may be output in the preview box 301 In this case, the prompt information 308 may be the text “No person detected”, which may be used to alert the electronic device 100 that no person has been detected.
从图3C可以看出,人物美化功能可以集成于“人像”拍照功能中。不限于此,人物美化功能也可以为“相机”应用程序中的摄像功能,此时,用户界面31中的拍摄模式列表302中可以显示有人物美化模式选项。响应于作用于人物美化模式选项的用户操作,电子设备100可以显示图3D-图3E示例性所示的人物美化功能所提供的用户界面。As can be seen from FIG. 3C, the character beautification function can be integrated into the "portrait" camera function. Not limited to this, the person beautification function may also be a camera function in the “camera” application. At this time, the person beautification mode option may be displayed in the shooting mode list 302 in the user interface 31. In response to the user operation acting on the character beautification mode option, the electronic device 100 may display the user interface provided by the character beautification function exemplarily shown in FIGS. 3D-3E.
图3D-图3E示例性示出了“相机”应用程序的人物美化功能所提供的用户界面33。3D-3E exemplarily show the user interface 33 provided by the character beautification function of the "camera" application.
如图3D-图3E所示,用户界面33包括:预览框301、拍摄模式列表302、控件303、控件304、控件305,以及美肤选项309、美体选项310。其中:预览框301、拍摄模式列表302、控件303、控件304、控件305可以参考用户界面31中的相关描述,这里不再赘述。As shown in FIGS. 3D-3E, the user interface 33 includes a preview frame 301, a shooting mode list 302, a control 303, a control 304, a control 305, and a skin beauty option 309 and a body beauty option 310. Among them: for the preview box 301, the shooting mode list 302, the control 303, the control 304, and the control 305, reference may be made to the relevant description in the user interface 31, which will not be repeated here.
美肤选项309、美体选项310在界面上可以表现为图标,可如图3D所示。不限于图标,美肤选项309、美体选项310在界面上还可以表现为文字(如文字“美肤”、“美体”)或者其他形式的交互元素(IE)。The skin beauty option 309 and the body beauty option 310 can be represented as icons on the interface, as shown in FIG. 3D. Not limited to icons, the skin beauty option 309 and the body beauty option 310 can also be expressed as text (such as text “beauty”, “beauty”) or other forms of interactive elements (IE) on the interface.
当电子设备100检测到作用于美肤选项309的用户操作(如在美肤选项309上的点击操作)时,如图3D所示,电子设备100可以在用户界面33中显示控件311,并可以开启“美肤”功能。“美肤”功能可用于在拍照预览或录像预览过程中对被拍摄人物的脸部图像进行美肤处理,使得美肤处理后的脸部图像所表现的脸部相较于被拍摄人物的实际脸部发生了皮肤美化,例如皮肤美白、皮肤磨皮(如去除人物脸上的痘痘、雀斑、皱纹等),等等。控件311可用于用户调节对被拍摄人物的美肤程度。这里,美肤程度可以是指对被拍摄人物的脸部进行皮肤美化的美化程度。美肤程度又可以称为美肤级别。例如,可以有美肤级别0至美肤级别10共11个美肤级别,美肤级别越高,皮肤美化越高;美肤级别0可表示对被拍摄人物的脸部不进行皮肤美化,此时预览框301中显示的被拍摄人物的脸部图像表现的脸部相较于被拍摄人物的实际脸部没有发生皮肤美化;美肤级别10可表示对被拍摄人物的脸部进行较大程度的皮肤美化,此时预览框301中显示的被拍摄人物的脸部图像所表现的脸部相较于被拍摄人物的实际脸部的发生了较大程度的皮肤美化。When the electronic device 100 detects a user operation acting on the skin beautification option 309 (such as a click operation on the skin beautification option 309), as shown in FIG. 3D, the electronic device 100 may display the control 311 in the user interface 33, and may Turn on the "beauty" function. The "beauty" function can be used to perform skin beautification on the face image of the person being photographed in the photo preview or video preview process, so that the face represented by the face image after skin treatment is compared with the actual face of the person being photographed Skin beautification has occurred on the face, such as skin whitening, skin dermabrasion (such as removing acne, freckles, wrinkles, etc.), and so on. The control 311 can be used by the user to adjust the degree of skin beauty of the person being photographed. Here, the degree of beautification may refer to the degree of beautification of the skin of the face of the photographed person. The degree of skin beautification can also be called the skin beautification level. For example, there can be a total of 11 skin-beauty levels from skin-beauty level 0 to skin-beauty level 10. The higher the skin-beauty level, the higher the beautification of the skin; the skin-beauty level 0 can mean that the face of the person being photographed is not skin-beautified. The face image of the photographed person displayed in the preview frame 301 does not show skin beautification compared to the actual face of the photographed person; the beautification level 10 can represent a greater degree of the face of the photographed person Skin beautification, at this time the face represented by the face image of the photographed person displayed in the preview frame 301 has a greater degree of skin beautification than the actual face of the photographed person.
当电子设备100检测到作用于美体选项310的用户操作(如在美体选项310上的点击操作)时,该用户操作用于选定美体选项310,如图3E所示,电子设备100可以在用户界面33中显示控件312,并可以开启“美体”功能。“美体”功能可用于在拍照预览或录像预览过程中对被拍摄人物的身体图像进行美体处理,使得美体处理后的身体图像所表现的体型相较于被拍摄人物的实际体型发生了体型美化。控件312可以是滑动条。控件312可用于用户调节对被拍摄人物的美体程度。这里,美体程度可以是指对被拍摄人物的身体进行体型美化的美化程度。美体程度又可以称为美体级别。例如,可以有美体级别0至美体级别10共11个美美体级别,美体级别越高,体型美化的美化程度越高;美体级别0可表示对被拍摄人物的身体图像不进行美体处理,此时预览框301中显示的被拍摄人物的身体图像表现的体型和被拍摄人物的实际体型一致,即没有发生体型美化;美体级别10可表示对被拍摄人物的身体进行较大程度的体型美化,此时预览框301中显示的被拍摄人物的身体图像表现的体型相较于 被拍摄人物的实际体型发生了较大程度的体型美化。When the electronic device 100 detects a user operation (such as a click operation on the body option 310) acting on the body option 310, the user operation is used to select the body option 310. As shown in FIG. 3E, the electronic device 100 may The control 312 is displayed in the interface 33, and the "Body" function can be turned on. The "Beauty" function can be used to perform body treatment on the body image of the person being photographed during the photo preview or video preview process, so that the body image after the body treatment performs a body beautification compared to the actual body shape of the person being photographed. The control 312 may be a slider. The control 312 can be used by the user to adjust the beauty of the person being photographed. Here, the degree of beautification may refer to the degree of beautification of the body of the person being photographed. The body level can also be called the body level. For example, there can be a total of 11 beauty levels from body level 0 to body level 10. The higher the body level, the higher the degree of beautification of the body; the body level 0 can indicate that the body image of the person being photographed is not subject to body treatment. The body image of the photographed person displayed in the preview box 301 is consistent with the actual body shape of the photographed person, that is, no beautification occurs; the body level 10 can represent a greater degree of body beautification of the body of the photographed person. The body image of the photographed person displayed in the preview frame 301 has a greater degree of body beautification than the actual shape of the photographed person.
在一些实施例中,美肤选项309可以是默认被选定的选项。也即是说,当检测到用于打开人物美化功能的用户操作时,电子设备100可以默认显示图3D所示的用户界面。在另一些实施例中,美体选项310可以是默认被选定的选项。也即是说,当检测到用于打开人物美化功能的用户操作时,电子设备100可以默认显示图3E所示的用户界面。这里,用于打开人物美化功能的用户操作可以是前述作用于人像模式选项302B的用户操作、前述作用于人物美化模式选项的用户操作。In some embodiments, the skin beauty option 309 may be the option selected by default. That is, when a user operation for turning on the character beautification function is detected, the electronic device 100 may display the user interface shown in FIG. 3D by default. In other embodiments, the body style option 310 may be the option selected by default. That is, when a user operation for turning on the character beautification function is detected, the electronic device 100 may display the user interface shown in FIG. 3E by default. Here, the user operation for turning on the character beautification function may be the aforementioned user operation acting on the portrait mode option 302B, and the aforementioned user operation acting on the character beautification mode option.
在一些实施例中,当美肤选项309被选定(默认选定或用户选定)时,美肤选项309的显示状态可表示美肤选项309已被选定;当美体选项310被选定(默认选定或用户选定)时,美体选项310的显示状态可表示美体选项310已被选定。例如,美肤选项309(或美体选项310)已被选定的显示状态可以是高亮美肤选项309(或美体选项310)。不限于此,该显示状态还可以呈现其他界面表现形式。In some embodiments, when the beauty option 309 is selected (selected by default or selected by the user), the display state of the beauty option 309 may indicate that the beauty option 309 has been selected; when the beauty option 310 is selected When selected by default or selected by the user, the display state of the body style option 310 may indicate that the body style option 310 has been selected. For example, the display state in which the skin beauty option 309 (or body beauty option 310) has been selected may be the highlight skin beauty option 309 (or body beauty option 310). Not limited to this, the display state may also present other interface expressions.
在一些实施例中,在电子设备100开启“美肤”功能之后,如果电子设备100从3D摄像模组193采集的彩色图像中没有检测到人物,则可以在预览框301中输出提示信息308,提示信息308可以是文字“未检测到人物”,可用于提示电子设备100未检测到人物。具体的,电子设备100可以检测3D摄像模组193采集的彩色图像中是否包含人脸图像,如果包含人脸图像,则确定检测到人物,否则确定没有检测到人物。In some embodiments, after the electronic device 100 enables the “beauty skin” function, if the electronic device 100 does not detect a person from the color image collected by the 3D camera module 193, a prompt message 308 may be output in the preview box 301, The prompt information 308 may be the text “No person detected”, which may be used to prompt the electronic device 100 that no person is detected. Specifically, the electronic device 100 can detect whether the color image collected by the 3D camera module 193 includes a face image. If the face image is included, it is determined that a person is detected, otherwise it is determined that no person is detected.
在一些实施例中,在电子设备100开启“美体”功能之后,如果电子设备100从3D摄像模组193采集的彩色图像中没有检测到人物,则可以在预览框301中输出提示信息308,提示信息308可以是文字“未检测到人物”,可用于提示电子设备100未检测到人物。具体的,电子设备100可以基于骨骼点识别技术来分析3D摄像模组193采集的彩色图像中是否包含人体骨骼点,如果包含人体骨骼点,则确定检测到人物,否则确定没有检测到人物。基于骨骼点识别技术确定人体骨骼点的具体实现后续内容中会详细介绍,这里先不展开。In some embodiments, after the electronic device 100 turns on the “Body” function, if the electronic device 100 does not detect a person from the color image collected by the 3D camera module 193, a prompt message 308 may be output in the preview box 301, prompting The information 308 may be the text "No person detected", which may be used to prompt the electronic device 100 that no person has been detected. Specifically, the electronic device 100 may analyze whether the color image collected by the 3D camera module 193 contains human bone points based on the bone point recognition technology. If the human bone points are included, it is determined that a person is detected, otherwise it is determined that no person is detected. The specific implementation of determining human bone points based on bone point recognition technology will be described in detail in the subsequent content, and will not be expanded here first.
图4A-图4G示例性示出了在拍照预览时对被拍摄人物进行体型美化的UI实施例。在图4A-图4E的实施例中,3D摄像模组193可采集到人物411的图像。人物411的图像可以是人物411的正面身体的图像,也可以是人物411的背面身体的图像。人物411的图像可以包括:身体图像和脸部图像。其中身体图像可包括多个局部身体(如腿部、腰部、肩部、肚子等)的图像。FIGS. 4A-4G exemplarily show a UI embodiment for beautifying a photographed person during a photo preview. In the embodiment of FIGS. 4A-4E, the 3D camera module 193 can collect the image of the person 411. The image of the person 411 may be an image of the front body of the person 411 or an image of the back body of the person 411. The image of the person 411 may include a body image and a face image. The body image may include images of multiple partial bodies (eg, legs, waist, shoulders, stomach, etc.).
在图4A-图4C的实施例中,如果基于骨骼点识别技术从采集到的彩色图像中识别出人物411的人体骨骼点,则电子设备100可以确定已检测到人物,并可以检测到用于对预览框301中被拍摄人物的图像进行美体处理的用户操作。该用户操作可以称为第一用户操作。响应第一用户操作,电子设备100可以更新预览框301中的显示内容,在预览框301中显示经过美体处理后的被拍摄人物的图像。预览框301中显示的经过美体处理后的被拍摄人物的图像可以称为第二图像。预览框301中显示的3D摄像模组采集的被拍摄人物的图像(即前景图像)可以称为第一图像。In the embodiment of FIGS. 4A-4C, if the human bone point of the person 411 is recognized from the collected color image based on the bone point recognition technology, the electronic device 100 may determine that the person has been detected and may be used to detect A user operation of performing a body treatment on the image of the person photographed in the preview frame 301. This user operation may be referred to as a first user operation. In response to the first user operation, the electronic device 100 may update the display content in the preview frame 301, and display the image of the photographed person after the body treatment in the preview frame 301. The image of the photographed person after the body treatment displayed in the preview frame 301 may be referred to as a second image. The image of the captured person (that is, the foreground image) collected by the 3D camera module displayed in the preview frame 301 may be referred to as a first image.
其中,第二图像中被拍摄人物的第一身体部位的轮廓可以被根据第一美体参数进行了调整,第二图像中被拍摄人物的第二身体部位的轮廓可以被根据第二美体参数进行了调整,第一部位与第二部位可以不同,第一美体参数与第二美体参数可以不同。也即是说,电子设备 100可以采用不同的美体参数对第一图像中不同身体部位的轮廓进行调整以得到第二图像中不同身体部位的轮廓。Among them, the contour of the first body part of the photographed person in the second image can be adjusted according to the first body parameters, and the contour of the second body part of the photographed person in the second image can be adjusted according to the second body parameters For adjustment, the first part and the second part may be different, and the first body parameter and the second body parameter may be different. That is to say, the electronic device 100 can use different body parameters to adjust the contours of different body parts in the first image to obtain the contours of different body parts in the second image.
具体的,第一用户操作可以具体包括作用于控件312的第二用户操作(如在控件312上的向右滑动操作)、作用于控件312的第三用户操作(如在控件312上的向左滑动操作)。具体的:Specifically, the first user operation may specifically include a second user operation acting on the control 312 (such as a rightward sliding operation on the control 312), and a third user operation acting on the control 312 (such as a leftward operation on the control 312) Slide operation). specific:
如图4A所示,当对人物411选择的美体级别为美体级别0时,电子设备100不对人物411的身体图像进行美体处理。此时,预览框301中显示的人物411的身体图像所表现的体型和人物411的实际体型一致。此时,预览框301中显示的人物411的身体图像即被拍摄人物的第一图像。As shown in FIG. 4A, when the beauty level selected for the person 411 is the body level 0, the electronic device 100 does not perform the body treatment on the body image of the person 411. At this time, the figure represented by the body image of the person 411 displayed in the preview frame 301 matches the actual figure of the person 411. At this time, the body image of the person 411 displayed in the preview frame 301 is the first image of the captured person.
如图4A所示,电子设备100可以检测到作用于控件312的第二用户操作(如在控件312上的向右滑动操作),第二用户操作可用于提高人物411对应的美体级别(如从美体级别7提高至美体级别10)。响应第二用户操作,电子设备100可以刷新预览框301中的显示内容。刷新后的预览框301中人物411的身体图像所表现的体型相较于刷新前的预览框301中人物411的身体图像所表现的体型发生了体型美化。As shown in FIG. 4A, the electronic device 100 can detect a second user operation (such as a rightward sliding operation on the control 312) acting on the control 312, and the second user operation can be used to increase the body level corresponding to the character 411 (such as from Body level 7 is increased to body level 10). In response to the second user operation, the electronic device 100 may refresh the display content in the preview box 301. The body image of the person 411 in the preview frame 301 after refreshing is more beautified than the body image of the person 411 in the preview frame 301 before refreshing.
其中,体型美化可包括以下一项或多项:美化身体比例(如拉长腿部、扩宽肩部等)、对整个身体或局部身体(如腰部、腿部、肚子、肩部等)的胖瘦进行调整。美化身体比例可以是指根据人体美学对身体的各部位的长和/宽进行调整,使得调整后身体比例更加接近人体美学所定义的标准身体比例,如上下身的黄金比例(以肚脐为界,上下身比例约为5比8)。美化身体比例也可以不局限于人体美学,例如对上下身比例满足黄金比例的被拍摄人物仍可以拉长其腿部,以呈现出腿长突出的身材优势。Among them, body beautification can include one or more of the following: beautification of body proportions (such as elongated legs, widened shoulders, etc.), and the whole body or partial body (such as waist, legs, stomach, shoulders, etc.) Fat and thin to adjust. Beautifying the body ratio can refer to adjusting the length and width of each part of the body according to the human body aesthetics, so that the adjusted body ratio is closer to the standard body ratio defined by the human body aesthetics, such as the golden ratio of the upper and lower body (with the navel as the boundary, upper The lower body ratio is about 5 to 8). The beautification of body proportions can also be not limited to human body aesthetics. For example, the person to be photographed that satisfies the golden ratio of the upper and lower body can still stretch his legs to show the advantage of stature with protruding legs.
也即是说,响应于检测到的第二用户操作,刷新后的预览框中第二图像中第一部位的轮廓相较于刷新前的预览框中第二图像中第一部位的轮廓,与第一图像中第一部位的轮廓的差距更大。刷新后的预览框中第二图像中第二部位的轮廓相较于刷新前的预览框中第二图像中第二部位的轮廓,与第一图像中第二部位的轮廓的差距更大。That is, in response to the detected second user operation, the outline of the first part in the second image in the preview frame after refreshing is compared with the outline of the first part in the second image in the preview frame before refreshing, and The difference in the outline of the first part in the first image is greater. Compared with the contour of the second part in the second image in the preview frame before refreshing, the contour of the second part in the second image in the preview frame after refreshing is larger than the contour of the second part in the first image.
如图4A所示,电子设备100可以检测到作用于控件312的第三用户操作(如在控件312上的向左滑动操作),第三用户操作可用于降低人物411对应的美体级别(如从美体级别10降至美体级别7),响应第三用户操作,可以刷新预览框301中的显示内容。刷新后的预览框301中人物411的身体图像所表现的体型相较于刷新前的预览框301中人物411的身体图像所表现的体型更加接近人物411的实际体型。As shown in FIG. 4A, the electronic device 100 can detect a third user operation acting on the control 312 (such as a leftward sliding operation on the control 312), and the third user operation can be used to lower the body level corresponding to the character 411 (such as from The body level 10 is reduced to the body level 7), in response to the third user operation, the display content in the preview box 301 can be refreshed. The body image of the person 411 in the preview frame 301 after refreshing is closer to the actual body shape of the person 411 than the body image of the person 411 in the preview frame 301 before refreshing.
也即是说,响应于检测到的第三用户操作,刷新后的预览框中第二图像中第一部位的轮廓相较于刷新前的预览框中第二图像中第一部位的轮廓,与第一图像中第一部位的轮廓的差距更小。刷新后的预览框中第二图像中第二部位的轮廓相较于刷新前的预览框中第二图像中第二部位的轮廓,与第一图像中第二部位的轮廓的差距更小。That is, in response to the detected third user operation, the outline of the first part in the second image in the preview frame after refreshing is compared with the outline of the first part in the second image in the preview frame before refreshing, and The difference in the outline of the first part in the first image is smaller. The contour of the second part in the second image in the preview frame after refreshing is smaller than the contour of the second part in the second image in the preview frame before refreshing, and the contour of the second part in the first image is smaller.
在一些实施例中,除了美体级别0,美体级别5或其他美体级别可以是“美体”功能的默认美体级别,这样用户点击“美体选项310”打开“美体”功能便可以在预览框301中看到已经过美体处理的人物图像,用户可以直接点击控件303保存已经过美体处理的人物411的图像,操作简单,使用效率高。特别的,如果默认美体级别为美体级别5,处于控件312的中间位置,那么用户手动向左或向右调整美体级别所需的滑动距离可以大大减小,可以节约用户操作,提高使用效率。In some embodiments, in addition to body level 0, body level 5 or other body levels may be the default body level of the “Body” function, so that the user can click the “Body option 310” to open the “Body” function and see in the preview box 301 To the image of the person who has been processed by the body, the user can directly click on the control 303 to save the image of the person 411 that has been processed by the body. The operation is simple and the use efficiency is high. In particular, if the default body level is body level 5, which is in the middle of the control 312, then the sliding distance required by the user to manually adjust the body level to the left or right can be greatly reduced, which can save user operations and improve the use efficiency.
综合图4A可以看出,在用户在控件312上从左向右滑动过程中,电子设备100可以先后检测到多次提高美体级别的用户操作,可以多次刷新预览框301中的显示内容,使得每次刷新后的身体图像所表现的体型相较于刷新前的身体图像所表现的体型都发生了体型美化,可在预览框301中提供一种逐渐增强体型美化的视觉效果。另外,在用户在控件312上从右向左滑动过程中,电子设备100可以先后检测到多次降低美体级别的用户操作,可以多次刷新预览框301中的显示内容,可在预览框301中提供一种逐渐减弱体型美化的视觉效果。As can be seen from FIG. 4A, during the process of the user sliding from the left to the right on the control 312, the electronic device 100 can successively detect multiple user operations to improve the body level, and can refresh the display content in the preview box 301 multiple times, so that Compared with the body image before the refresh, the body image after each refresh has a body beautification, which can provide a visual effect of gradually enhancing the body beautification in the preview box 301. In addition, when the user slides from right to left on the control 312, the electronic device 100 can successively detect multiple user operations that lower the body level, and can refresh the display content in the preview box 301 multiple times. Provides a visual effect that gradually diminishes beautification.
在一些实施例中,响应第二用户操作或第三用户操作,第三用户操作或第三用户操作均用于为被拍摄人物411选择美体级别,电子设备100可以利用已选定的美体级别(如美体级别5)对应的美体参数对3D摄像模组193采集到的人物411的身体图像进行美体处理,以得到刷新后的预览框301中显示的人物411的身体图像。关于电子设备如何利用已选定的美体级别对应的美体参数对人物411的身体图像进行美体处理,后续方法实施例中会详细说明,这里先不赘述。In some embodiments, in response to the second user operation or the third user operation, both the third user operation or the third user operation are used to select a body shape level for the photographed person 411, and the electronic device 100 may utilize the selected body level ( For example, the beauty parameters corresponding to the beauty level 5) perform a body treatment on the body image of the person 411 collected by the 3D camera module 193, so as to obtain the body image of the person 411 displayed in the refreshed preview frame 301. Regarding how the electronic device uses the beauty parameters corresponding to the selected beauty level to perform the body treatment on the body image of the person 411, details will be described in the subsequent method embodiments, and details are not described here.
在一些实施例中,如图4D-图4E所示,当检测到人物411是孕妇时,电子设备100可以在预览框301中显示提示信息(如文字“检测到孕妇”),该提示信息可以提示人物411是孕妇。此时,如图4D-图4E所示,电子设备100可以利用已选定的美体级别对应的美体参数对人物411的其他的局部身体(如手臂、腿部、肩部)的彩色图像进行美体处理,而不对人物411的肚子图像进行美体处理,以保留孕妇特征。也即是说,预览框301中显示的第二图像中被拍摄人物的肚子的轮廓与第一图像中被拍摄人物的肚子的轮廓一致。可选的,当检测到人物411是孕妇时,电子设备100还可以在预览框301中显示一个开关控件。当该开关控件处于“开”状态时,表示保留孕妇特征,即电子设备100不对肚子图像进行美体处理;当该开关控件处于“关”状态时,表示不保留孕妇特征,即电子设备100可以如图4A所示对肚子图像进行美体,以呈现瘦肚子的效果。In some embodiments, as shown in FIGS. 4D-4E, when it is detected that the person 411 is a pregnant woman, the electronic device 100 may display a prompt message (such as the text "pregnant woman detected") in the preview box 301, the prompt message may be Prompt character 411 is a pregnant woman. At this time, as shown in FIGS. 4D-4E, the electronic device 100 can use the beauty parameters corresponding to the selected beauty level to perform beautification on the color images of other partial bodies of the person 411 (such as arms, legs, and shoulders) Processing without performing body treatment on the belly image of the person 411 to retain the characteristics of the pregnant woman. That is to say, the outline of the belly of the photographed person in the second image displayed in the preview frame 301 matches the outline of the belly of the photographed person in the first image. Optionally, when detecting that the person 411 is a pregnant woman, the electronic device 100 may also display a switch control in the preview box 301. When the switch control is in the "on" state, it means that the characteristics of pregnant women are retained, that is, the electronic device 100 does not perform body treatment on the belly image; when the switch control is in the "off" state, it means that the characteristics of the pregnant woman are not retained, that is, the electronic device 100 can be Fig. 4A shows body contouring on the belly image to show the effect of thin belly.
在一些实施例中,当检测到人物411改变姿态或者检测到被拍摄人物发生改变时,电子设备100依然可以采用已选定的美体级别对应的美体参数对当前的被拍摄人物进行美体处理。In some embodiments, when it is detected that the person 411 changes the posture or the person being photographed is changed, the electronic device 100 may still use the body parameters corresponding to the selected body level to perform body treatment on the current person being photographed.
在一些实施例中,如图4D-图4E所示,当预览框301中显示的人物411的身体图像已经利用已选定的美体级别对应的美体参数进行过美体处理,且检测到打开“美肤”功能并选择特定美肤级别(如美肤级别7)的用户操作时,电子设备100可以刷新预览框301中的显示内容,刷新后的预览框301中显示的人物411的图像包括脸部图像和身体图像,其中脸部图像是经过美肤处理后的脸部图像,身体图像是利用已选定的美体级别对应的美体参数进行过美体处理的身体图像。也即是说,用户可以在已对被拍摄人物进行的体型美化的基础上继续对被拍摄人物进行皮肤美化,以达到更全面的美化效果。反之亦可,用户也可以在已对被拍摄人物进行的皮肤美化的基础上继续对被拍摄人物进行体型美化。In some embodiments, as shown in FIGS. 4D-4E, when the body image of the person 411 displayed in the preview box 301 has been subjected to body treatment using the body parameters corresponding to the selected body level, and it is detected Skin” function and select a specific skin beauty level (such as skin beauty level 7) user operation, the electronic device 100 can refresh the display content in the preview box 301, the image of the person 411 displayed in the refreshed preview box 301 includes the face The image and the body image, wherein the face image is a face image after skin treatment, and the body image is a body image that has undergone body treatment using the body parameters corresponding to the selected body level. That is to say, the user can continue to beautify the skin of the photographed person on the basis of the beautification of the photographed person to achieve a more comprehensive beautification effect. Conversely, the user can continue to beautify the photographed person on the basis of the skin beautification of the photographed person.
不限于被拍摄人物处于正面或背面拍摄的场景,如图4F-图4H所示,当3D摄像模组193采集到被拍摄人物的姿态为其他姿态(如侧面站姿或侧面坐姿等)时,电子设备100也可以响应于选择美体级别的用户操作,对被拍摄人物的身体图像进行美体处理,以实现对其他姿态下的被拍摄人物进行体型美化。It is not limited to scenes where the person being photographed is shot in front or back, as shown in FIGS. 4F-4H, when the posture of the person being captured by the 3D camera module 193 is other postures (such as standing sideways or sitting sideways, etc.), The electronic device 100 may also perform a beautification process on the body image of the photographed person in response to the user operation for selecting the body-beauty level, so as to realize the beautification of the photographed person in other poses.
图5A-图5D示例性示出了在拍照预览时撤销体型美化的UI实施例。其中,图5A-图5B示例性示出了撤销局部美体的UI实施例;图5C-图5D示例性示出了一键撤销全身美体的UI 实施例。FIGS. 5A-5D exemplarily show a UI embodiment in which the beautification is cancelled during the photo preview. Among them, FIGS. 5A-5B exemplarily show a UI embodiment for revoking a partial body; FIG. 5C-5D exemplarily show a UI embodiment for revoking a whole-body body with one click.
如图5A所示,在预览框301显示的人体图像中,人物411发生了体型美化的局部身体包括:左手臂、右手臂、肚子、左腿、右腿。这些局部身体分别进行了如下体型美化:瘦左手臂、瘦右手臂、瘦肚子、拉长左腿、拉长右腿。在预览框301中,电子设备100可以在这些发生了体型美化的局部身体的图像上显示撤销图标501。这样用户便可以点击局部身体图像上的撤销图标501以撤销对局部身体所进行的体型美化。As shown in FIG. 5A, in the human body image displayed in the preview frame 301, the partial body where the figure 411 has been beautified includes: left arm, right arm, stomach, left leg, and right leg. These partial bodies were respectively beautified as follows: thin left arm, thin right arm, thin belly, elongated left leg, elongated right leg. In the preview box 301, the electronic device 100 may display the undo icon 501 on the images of these partial beautified bodies. In this way, the user can click the undo icon 501 on the partial body image to undo the beautification of the partial body.
如图5B所示,电子设备100可以检测到作用于人物411的肚子图像上的撤销图标501的用户操作(如在撤销图标501上的点击操作)。响应该操作,电子设备100可以刷新预览框301中的显示内容,刷新后的预览框301中的人物411的肚子图像表现的肚子的形状和人物411的肚子的实际形状一致,而刷新前的预览框301中的人物411的肚子图像表现的肚子比人物411的实际的肚子瘦。As shown in FIG. 5B, the electronic device 100 can detect a user operation of the undo icon 501 (such as a click operation on the undo icon 501) acting on the belly image of the person 411. In response to this operation, the electronic device 100 can refresh the display content in the preview box 301, the shape of the belly represented by the belly image of the person 411 in the preview box 301 after refreshing matches the actual shape of the belly of the person 411, and the preview before refreshing The belly image of the character 411 in the frame 301 is thinner than the actual belly of the character 411.
也即是说,电子设备100可以检测到作用于被拍摄人物的局部身体图像上的撤销图标501的用户操作(如在撤销图标501上的点击操作)。该局部身体图像即已选定的局部身体图像。响应于该操作,电子设备100可以刷新预览框301。刷新后的预览框301中的已选定的局部身体图像表现的局部身体的形状和被拍摄人物的该局部身体的实际形状一致,而刷新前预览框301中的已选定的局部身体图像表现的该局部身体相较于被拍摄人物的实际的该局部身体发生了体型美化。That is, the electronic device 100 can detect a user operation (such as a click operation on the undo icon 501) of the undo icon 501 acting on the partial body image of the person being photographed. The partial body image is the selected partial body image. In response to this operation, the electronic device 100 may refresh the preview box 301. The shape of the partial body represented by the selected partial body image in the preview box 301 after refreshing is consistent with the actual shape of the partial body of the person being photographed, and the representation of the selected partial body image in the preview box 301 before refreshing Compared to the actual part of the person being photographed, the part of the body has been beautified.
图5A-图5B实施例可支持用户撤销在预览框301中对被拍摄人物的局部身体进行的美体处理,使得用户可以保留某些身体部位的原来特征(如健硕粗壮的手臂),可以更灵活的满足用户的美体需求。The embodiments of FIGS. 5A-5B can support the user to cancel the body treatment of the partial body of the person being photographed in the preview box 301, so that the user can retain the original features of certain body parts (such as a sturdy and thick arm), which can be more Flexible to meet the user's body needs.
如图5C所示,在预览框301显示的人体图像中,人物411发生了体型美化。在预览框301中,电子设备100可以在预览框301中显示一键撤销图标503。这样用户便可以点击一键撤销图标503以撤销对整个身体所进行的所有美体处理。As shown in FIG. 5C, in the human body image displayed in the preview frame 301, the figure 411 has been beautified. In the preview box 301, the electronic device 100 may display the one-key undo icon 503 in the preview box 301. In this way, the user can click the one-key undo icon 503 to undo all body treatments performed on the entire body.
如图5D所示,电子设备100可以检测到作用于一键撤销图标503的用户操作(如在图标503上的点击操作)。响应该操作,电子设备100可以刷新预览框301中的显示内容,刷新后的预览框301中的人物411的身体图像表现的体型和人物411的实际体型一致,而刷新前的预览框301中的人物411的身体图像表现的体型相较于人物411的实际体型发生了体型美化。As shown in FIG. 5D, the electronic device 100 can detect a user operation (such as a click operation on the icon 503) acting on the one-key undo icon 503. In response to this operation, the electronic device 100 can refresh the display content in the preview box 301. The body image of the person 411 in the preview box 301 after refreshing shows the same shape as the actual figure of the person 411, while the preview box 301 before refreshing The figure represented by the body image of the person 411 is beautified compared to the actual figure of the person 411.
图5C-图5D实施例可支持用户一键撤销在预览框301中对被拍摄人物进行的全身美体,操作简单有效,可提高使用效率。The embodiments of FIGS. 5C-5D can support the user to cancel the whole body body performed on the photographed person in the preview box 301 with one key, the operation is simple and effective, and the use efficiency can be improved.
图6A-图6G示例性示出了在拍照预览时推送健身资讯的一些UI实施例。健身资讯可以包括健身课程、健身方法、健身饮食等。本申请中,可以将健身资讯称为第一内容。其中,图6A-图6D示例性示出了后置摄像模组拍摄时推送健身资讯的UI实施例;图6E-图6G示例性示出了前置摄像模组拍摄时推送健身资讯的UI实施例。6A-6G exemplarily show some UI embodiments for pushing fitness information during a photo preview. Fitness information can include fitness classes, fitness methods, fitness diet, etc. In this application, fitness information may be referred to as the first content. Among them, FIGS. 6A-6D exemplarily show UI embodiments for pushing fitness information when the rear camera module shoots; FIGS. 6E-6G exemplarily show UI implementations for pushing fitness information when the front camera module shoots example.
在图6A-图6D实施例中,预览框301中显示的人物411的图像是电子设备100的后置3D摄像模组193采集的。此时,人物411通常不是手持电子设备100的拍摄者,而是拍摄者的朋友、亲人等。拍摄者可以将健身资讯分享给被拍摄人物411,以帮助或鼓励被拍摄人物411进行健身。In the embodiments of FIGS. 6A-6D, the image of the person 411 displayed in the preview frame 301 is collected by the rear 3D camera module 193 of the electronic device 100. At this time, the person 411 is usually not a photographer holding the electronic device 100, but a friend, relative, etc. of the photographer. The photographer can share the fitness information with the photographed person 411 to help or encourage the photographed person 411 to exercise.
如图6A所示,电子设备100可以在预览框301中显示控件601和提示信息603。控件601可用于监听分享健身资讯的用户操作。提示信息603可用于提示用户点击控件601以向人物411分享健身课程、健身方法、健身饮食等健身资讯。在一些实施例中,提示信息603在被显示一段时间(如1秒)后可以逐渐消失在预览框301中。用户也可以通过在提示信息603上的向上或向左等滑动操作来取消显示提示信息603。As shown in FIG. 6A, the electronic device 100 can display the control 601 and the prompt information 603 in the preview box 301. The control 601 can be used to monitor user operations that share fitness information. The prompt information 603 can be used to prompt the user to click the control 601 to share fitness information such as fitness classes, fitness methods, fitness diets, and the like with the characters 411. In some embodiments, the prompt information 603 may gradually disappear in the preview box 301 after being displayed for a period of time (eg, 1 second). The user can also cancel the display of the prompt information 603 by swiping up or left on the prompt information 603.
如图6B-图6D所示,电子设备100可以检测到作用于控件601的用户操作(如在控件601上的点击操作)。响应该操作,电子设备100可以显示用于分享健身资讯的用户界面605。用户可以在用户界面605中选择联系人以分享健身资讯到该联系人。电子设备100可以用户界面605中检测到选择联系人分享健身资讯的用户操作。响应该操作,电子设备100可以向已选定联系人分享健身资讯。As shown in FIGS. 6B-6D, the electronic device 100 can detect a user operation (such as a click operation on the control 601) acting on the control 601. In response to this operation, the electronic device 100 may display a user interface 605 for sharing fitness information. The user can select a contact in the user interface 605 to share fitness information with the contact. The electronic device 100 may detect a user operation of selecting a contact to share fitness information in the user interface 605. In response to this operation, the electronic device 100 can share fitness information with the selected contact.
例如,用户界面605可以如图6C示例性所示,用户界面605可以是应用程序“微信”的最近聊天界面,该界面中的对话列表605-1可用于显示最近发生一个或多个对话的对话条目。这多个对话各自关联不同的联系人,如“MAC”、“Kate”、“William”等。电子设备100可以检测到选择联系人的用户操作,如在用户和联系人“Kate”的对话条目上的点击操作,响应该操作,电子设备100可以向已选定联系人“Kate”分享健身资讯,并可以显示用户和联系人“Kate”的对话界面607。对话界面607可以如图6D示例性所示,其中可显示有用户向联系人“Kate”发送的消息607-1。消息607-1可包括健身资讯的简要描述。消息607-1还可关联健身资讯的链接,健身资讯可以是第三方健身类应用程序提供的。这样联系人“Kate”在收到消息607-1后便可点击消息607-1来打开该链接,从而可以跳转至第三方健身类应用程序的用户界面以查看健身资讯。For example, the user interface 605 may be exemplarily shown in FIG. 6C. The user interface 605 may be a recent chat interface of the application "WeChat", and the conversation list 605-1 in the interface may be used to display a conversation in which one or more conversations have recently occurred. entry. These multiple conversations are associated with different contacts, such as "MAC", "Kate", "William", etc. The electronic device 100 can detect a user operation of selecting a contact, such as a click operation on the conversation item of the user and the contact "Kate", and in response to the operation, the electronic device 100 can share fitness information with the selected contact "Kate" , And can display the user and contact "Kate" dialogue interface 607. The dialogue interface 607 may be exemplarily shown in FIG. 6D, in which a message 607-1 sent by the user to the contact "Kate" may be displayed. Message 607-1 may include a brief description of fitness information. The message 607-1 may also be associated with a link to fitness information, which may be provided by a third-party fitness application. In this way, the contact "Kate" can click the message 607-1 to open the link after receiving the message 607-1, so that he can jump to the user interface of the third-party fitness application to view fitness information.
不限于应用程序“微信”,用于分享健身资讯的用户界面605还可以是其他社交类应用程序的用户界面或者其他数据分享功能(如如苹果公司的隔空投送(AirDrop),华为公司的华为分享(Guawei Share)等)提供的用于分享数据的用户界面。这样,可便于健身资讯的推广,也便于被拍摄人物获取健身资讯,可以鼓励或帮助被拍摄人物健身。Not limited to the application "WeChat", the user interface 605 for sharing fitness information can also be the user interface of other social applications or other data sharing functions (such as Apple's AirDrop, Huawei's Huawei Share (Guawei, Share, etc.) provides a user interface for sharing data. In this way, it is easy to promote the fitness information, and it is convenient for the photographed person to obtain fitness information, which can encourage or help the photographed person to exercise.
在图6E-图6G实施例中,预览框301中显示的人物411的图像是电子设备100的前置置3D摄像模组193采集的。此时,人物411通常可以是(或包括)手持电子设备100的拍摄者。In the embodiments of FIGS. 6E-6G, the image of the person 411 displayed in the preview frame 301 is collected by the front-mounted 3D camera module 193 of the electronic device 100. At this time, the person 411 may generally be (or include) a photographer holding the electronic device 100.
如图6E所示,电子设备100可以在预览框301中显示控件608和提示信息606。提示信息606可用于提示用户点击控件608以查看健身资讯。和图6A-图6D实施例不同的是,预览框301中的控件608可用于监听打开健身资讯而不是分享健身资讯的用户操作。这样,可便于拍摄者在进行自拍时获取健身课程、健身指导、健身饮食计划等健身资讯,提高了用户体验。As shown in FIG. 6E, the electronic device 100 can display the control 608 and the prompt information 606 in the preview box 301. The prompt information 606 can be used to prompt the user to click the control 608 to view fitness information. Different from the embodiments of FIGS. 6A-6D, the control 608 in the preview box 301 can be used to monitor user operations that open fitness information instead of sharing fitness information. In this way, it is convenient for the photographer to obtain fitness information such as fitness classes, fitness guidance, and fitness diet plans when taking a self-portrait, thereby improving the user experience.
如图6F-图6G所示,电子设备100可以检测到作用于控件608的用户操作(如在控件608上的点击操作)。响应该操作,电子设备100可以显示健身资讯。健身资讯具体可以显示在图6G示例性所示的用户界面609中。用户界面609可以是第三方健身类应用程序(如“ABC健身”)的用户界面,本申请对该用户界面的具体实现不做限制。As shown in FIGS. 6F-6G, the electronic device 100 can detect a user operation (such as a click operation on the control 608) acting on the control 608. In response to this operation, the electronic device 100 can display fitness information. The fitness information may be specifically displayed in the user interface 609 exemplarily shown in FIG. 6G. The user interface 609 may be a user interface of a third-party fitness application program (such as "ABC Fitness"), and the specific implementation of the user interface is not limited in this application.
在图6A-图6D实施例或图6E-图6G实施例中,健身资讯可以和为被拍摄人物选定的美体级别相关,例如美体级别越高,健身课程的难度越高。健身资讯还可以和被拍摄人物的性别、年龄等特征相关,例如如果被拍摄人物是女性,则健身资讯可以是适用于女性的健身课程。健身资讯还可以和被拍摄人物的当前体型相关,例如被拍摄人物越胖,健身课程的健身 难度越高。In the embodiments of FIGS. 6A-6D or FIGS. 6E-6G, the fitness information may be related to the body-level selected for the person being photographed. For example, the higher the body-level, the higher the difficulty of the fitness class. The fitness information can also be related to the gender, age and other characteristics of the person being photographed. For example, if the person being photographed is a female, the fitness information can be a fitness class suitable for women. Fitness information can also be related to the current shape of the person being photographed. For example, the fatter the person being photographed, the more difficult the fitness of the fitness class.
在图6A-图6D实施例或图6E-图6G实施例中,电子设备100具体可以在下述几种情况下在预览框301中显示控件601或控件608:In the embodiments of FIGS. 6A-6D or 6E-6G, the electronic device 100 may specifically display the control 601 or the control 608 in the preview box 301 in the following situations:
情况1:在检测到用户选择美体级别后,且保持已选择的美体级别不变的时间超过特定时长(如1秒)。Case 1: After detecting that the user selects the beauty level, the time for keeping the selected beauty level unchanged does not exceed a specific duration (such as 1 second).
情况2:检测到用户在已选择的美体级别下点击控件303触发拍摄,该已选择的美体级别可以是美体级别0之外的美体级别。Case 2: It is detected that the user clicks the control 303 under the selected beauty level to trigger shooting, and the selected beauty level may be a beauty level other than the beauty level 0.
情况3:检测到被拍摄人物的体型不是标准体型。Case 3: It is detected that the figure of the person being photographed is not a standard figure.
其中,情况1和情况2都可以表明用户对已选定美体级别下预览框301中呈现的被拍摄人物的体型满意。不限于上述几种情况,电子设备100还可以在其他情况下在预览框301中显示控件601或控件608,以便于拍摄者分享健身资讯至被拍摄人物或者便于拍摄者自己打开健身资讯。Among them, both case 1 and case 2 can indicate that the user is satisfied with the body shape of the photographed person presented in the preview box 301 at the selected beauty level. Not limited to the above cases, the electronic device 100 may also display the control 601 or the control 608 in the preview box 301 in other cases, so that the photographer can share fitness information with the person being photographed or the photographer can open the fitness information by himself.
图7A-图7G示例性示出了在拍照预览时推送健身资讯的另一些UI实施例。其中,图7A-图7D示例性示出了后置摄像模组拍摄时推送健身资讯的UI实施例;图7E-图7G示例性示出了前置摄像模组拍摄时推送健身资讯的UI实施例。7A-7G exemplarily show other UI embodiments for pushing fitness information during a photo preview. Among them, FIGS. 7A-7D exemplarily show UI embodiments for pushing fitness information when shooting with the rear camera module; FIGS. 7E-7G exemplarily show UI implementations for pushing fitness information when shooting with the front camera module example.
图7A-图7G实施例具体可参考图6A-图6G实施例。和图6A-图6G实施例不同的是,电子设备100可以在预览框301中显示提示信息703。7A-7G embodiments can refer to FIG. 6A-6G embodiments. Different from the embodiment of FIGS. 6A-6G, the electronic device 100 may display prompt information 703 in the preview box 301.
提示信息703可用于提示所述第二图像中的所述第一部位的轮廓与所述第一图像中的所述第一部位的轮廓的差异、所述第二图像中的所述第二部位的轮廓与所述第一图像中的所述第二部位的轮廓的差异。其中,第二图像是预览框301中显示的经过美体处理的所述被拍摄人物的图像,第一图像是3D摄像模组采集的被拍摄人物的图像。第一图像中所述被拍摄人物的各个身体部位的轮廓与实际轮廓一致。这些差异可以表现为:腰围的差异、腿围的差异、腿长的差异、肩宽的差异等等。The prompt information 703 can be used to prompt the difference between the contour of the first part in the second image and the contour of the first part in the first image, the second part in the second image The difference between the outline of and the outline of the second part in the first image. Wherein, the second image is the image of the photographed person after the body treatment displayed in the preview frame 301, and the first image is the image of the photographed person collected by the 3D camera module. The contours of the body parts of the photographed person in the first image are consistent with the actual contours. These differences can be expressed as: differences in waist circumference, differences in leg circumference, differences in leg length, differences in shoulder width and so on.
提示信息703还可用于提示以下一项或多项体现:需要减掉的体重、需要的运动量、需要消耗的热量等。需要减掉的体重用于提示被拍摄人物需要减掉多少体重来接近或达到预览框301中显示的身体图像表现的体型。需要的运动量用于提示被拍摄人物需要进行多少运动来接近或达到预览框301中显示的身体图像表现的体型。需要消耗的热量用于提示被拍摄人物需要消耗多少热量来接近或达到预览框301中显示的身体图像表现的体型。例如该差距可以是文字“距离理想体型还需:减重5KG有氧跑100KM消耗7000大卡”。这样可便于用户了解健身目标,并可以鼓励用户健身以达到理想体型。这里,理想体型可以是在当前已选定的美体级别下显示于预览框301中的体型。The prompt information 703 can also be used to prompt one or more of the following manifestations: weight to be lost, amount of exercise required, calories to be consumed, and so on. The weight that needs to be lost is used to prompt how much weight the person to be photographed needs to lose to approach or reach the body shape represented by the body image displayed in the preview box 301. The required amount of exercise is used to indicate how much exercise the person to be photographed needs to approach or reach the figure represented by the body image displayed in the preview box 301. The calories that need to be consumed are used to indicate how much calories the person to be shot needs to approach or reach the body shape represented by the body image displayed in the preview box 301. For example, the gap can be the text "You still need to be away from your ideal size: weight loss 5KG aerobic run 100KM consumes 7000 calories". This makes it easier for users to understand fitness goals and encourages users to exercise to achieve their ideal body shape. Here, the ideal body shape may be the body shape displayed in the preview box 301 at the currently selected beauty level.
其中,在图7A-图7D实施例中,提示信息703中还可以显示提示信息703-1。提示信息703-1可用于提示用户点击提示信息703-1以分享健身资讯给被拍摄人物411。电子设备可以检测到作用于提示信息703-1的用户操作(如在提示信息703-1上的点击操作)。响应该操作,电子设备100可以显示用于分享健身资讯的用户界面705。用户可以在用户界面705中选择联系人以分享健身资讯到该联系人。电子设备100可以用户界面705中检测到选择联系人分享健身资讯的用户操作。响应该操作,电子设备100可以向已选定联系人分享健身资讯。具体可参考图6A-图6D实施例,这里不再赘述。Among them, in the embodiment of FIGS. 7A-7D, the prompt information 703-1 can also be displayed in the prompt information 703. The prompt information 703-1 can be used to prompt the user to click the prompt information 703-1 to share fitness information with the photographed person 411. The electronic device can detect a user operation acting on the prompt information 703-1 (such as a click operation on the prompt information 703-1). In response to this operation, the electronic device 100 may display a user interface 705 for sharing fitness information. The user can select a contact in the user interface 705 to share fitness information to the contact. The electronic device 100 may detect a user operation of selecting a contact to share fitness information in the user interface 705. In response to this operation, the electronic device 100 can share fitness information with the selected contact. For details, reference may be made to the embodiments in FIGS. 6A to 6D, and details are not described herein again.
其中,在图7E-图7G实施例中,提示信息706中还可以显示提示信息706-1。提示信息706-1可用于提示用户点击提示信息706-1以分享健身资讯给被拍摄人物411。电子设备可以检测到作用于提示信息706-1的用户操作(如在提示信息706-1上的点击操作)。电子设备100可以显示健身资讯。具体可参考图7E-图7G实施例,这里不再赘述。Among them, in the embodiment of FIGS. 7E-7G, the prompt information 706 may also be displayed in the prompt information 706. The prompt information 706-1 can be used to prompt the user to click the prompt information 706-1 to share fitness information with the person 411 to be photographed. The electronic device can detect a user operation (such as a click operation on the prompt information 706-1) acting on the prompt information 706-1. The electronic device 100 can display fitness information. For details, reference may be made to the embodiments of FIGS. 7E-7G, and details are not described herein again.
图8A-图8B示例性示出了在拍照预览时对比体型美化前后的UI实施例。8A-8B exemplarily show UI embodiments before and after beautification of a comparison body during a photo preview.
如图8A-图8B所示,在利用已选定的美体级别(如美体级别10)对应的美体参数对3D摄像模组193采集到的人物411的身体图像进行美体处理后,电子设备100可以在预览框301中显示控件801。As shown in FIGS. 8A-8B, after using the body parameters corresponding to the selected body level (such as body level 10) to perform body treatment on the body image of the person 411 collected by the 3D camera module 193, the electronic device 100 may The control 801 is displayed in the preview box 301.
如图8A-图8B所示,当预览框301中显示的人物411的身体图像是经过美体处理后的身体图像时,电子设备100可以检测到作用于控件801的用户操作,如在控件801上按住不释放的用户操作。响应该操作,电子设备100可以刷新预览框301中的显示内容,刷新后的预览框301中显示3D摄像模组193实际采集到的人物411的身体图像。As shown in FIGS. 8A-8B, when the body image of the person 411 displayed in the preview frame 301 is a body image after body treatment, the electronic device 100 can detect a user operation acting on the control 801, such as on the control 801 Press and hold the user operation without releasing. In response to this operation, the electronic device 100 can refresh the display content in the preview frame 301, and the refreshed preview frame 301 displays the body image of the person 411 actually collected by the 3D camera module 193.
如图8A-图8B所示,当预览框301中显示的人物411的身体图像是3D摄像模组193实际采集到的人物411的身体图像时,电子设备100可以检测到作用于控件801的用户操作,如释放控件801(即松开不再按住控件801)的用户操作。响应该操作,电子设备100可以刷新预览框301中的显示内容,刷新后的预览框301中显示的人物411的身体图像是经过美体处理后的身体图像。As shown in FIGS. 8A-8B, when the body image of the person 411 displayed in the preview frame 301 is the body image of the person 411 actually collected by the 3D camera module 193, the electronic device 100 can detect the user acting on the control 801 An operation, such as a user operation of releasing the control 801 (that is, releasing the control 801 when it is no longer held). In response to this operation, the electronic device 100 may refresh the display content in the preview frame 301, and the body image of the person 411 displayed in the refreshed preview frame 301 is the body image after the body treatment.
这样,用户便可以对比3D摄像模组193实际采集到的人物411的身体图像和刷新后的预览框301中的显示的人物411的身体图像。In this way, the user can compare the body image of the person 411 actually collected by the 3D camera module 193 with the body image of the person 411 displayed in the refreshed preview frame 301.
图9A-图9C示例性示出了用户拍摄照片的UI实施例。9A-9C exemplarily show a UI embodiment in which a user takes a photo.
如图9A-图9C所示,在预览框301中被拍摄人物411的身体图像所表现的体型相较于被拍摄人物411的实际体型发生了体型美化。电子设备100可以检测到作用于控件303的用户操作(如在控件303上的点击操作),响应于该操作,电子设备100可以保存预览框301中的图像,还可以在控件304中显示所保存的图像的缩略图。因为当前已选定的摄像选项是人像模式选项,因此预览框301中的图像可以被保存为照片。As shown in FIGS. 9A-9C, the body shape of the photographed person 411 in the preview frame 301 has a beautification compared to the actual shape of the photographed person 411. The electronic device 100 can detect a user operation (such as a click operation on the control 303) acting on the control 303, and in response to the operation, the electronic device 100 can save the image in the preview box 301, and can also display the saved in the control 304 Thumbnail of the image. Because the currently selected camera option is a portrait mode option, the image in the preview box 301 can be saved as a photo.
另外,电子设备100还可以检测作用于控件304的用户操作(如在控件304上的点击操作),响应该操作,可以显示电子设备100最近保存的照片801。这样,用户便可以查看刚刚被保存的预览框301中的图像,该图像中包括的被拍摄人物411的身体图像所表现的体型相较于被拍摄人物411的实际体型发生了体型美化。In addition, the electronic device 100 can also detect a user operation (such as a click operation on the control 304) acting on the control 304, and in response to the operation, the photo 801 recently saved by the electronic device 100 can be displayed. In this way, the user can view the image in the preview frame 301 that has just been saved, and the body image of the photographed person 411 included in the image is more beautified than the actual shape of the photographed person 411.
图10A-图10C示例性示出了在录像预览时对被拍摄人物进行体型美化的UI实施例。FIGS. 10A-10C exemplarily show a UI embodiment for beautifying a photographed person during video preview.
在拍摄模式列表302中,电子设备100可以检测到作用于录像模式选项302D的用户操作(如在录像模式选项302D上的点击操作),响应于该用户操作,电子设备100可以开启录像功能,并显示图10A-图10C示例性所示用的用户界面。图10A-图10C示例性所示用的用户界面具体可参考前述在拍照预览时对被拍摄人物进行体型美化的UI实施例,这里不再赘述。不同的是,此时控件303可用于监听触发录像的用户操作。本申请中,可以将录像模式选项302D称为第二拍摄模式选项。In the shooting mode list 302, the electronic device 100 can detect a user operation (such as a click operation on the recording mode option 302D) acting on the recording mode option 302D, and in response to the user operation, the electronic device 100 can turn on the recording function, and The user interface shown exemplarily in FIGS. 10A to 10C is displayed. The user interface shown in FIGS. 10A to 10C can be specifically referred to the aforementioned UI embodiment for beautifying the photographed person during the photo preview, which will not be repeated here. The difference is that at this time the control 303 can be used to monitor user operations that trigger recording. In this application, the recording mode option 302D may be referred to as the second shooting mode option.
如图10D-图10F所示,在利用已选定的美体级别对应的美体参数对被拍摄人物的身体图像进行美体处理后,电子设备100可以响应于检测到的作用于控件303的用户操作,可以开始记录预览框301中的图像,并可以显示录像中用户界面。录像中用户界面可如图10D示例性所示。然后,电子设备100可以响应于检测到的作用于控件10D-1的用户操作,可以结束记录预览框301中的图像,并可以将已记录的图像保存为视频,以及在控件304中显示所保存的视频的缩略图。预览框301中的显示内容是定时更新的,如每10ms更新一次。在记录过程中,预览框301中显示的被拍摄人物的身体图像可以是利用已选定的美体级别对应的美体参数对被拍摄人物的身体图像进行美体处理后的。As shown in FIGS. 10D-10F, after performing body treatment on the body image of the photographed person using the body parameters corresponding to the selected body level, the electronic device 100 can respond to the detected user operation on the control 303, The image in the preview box 301 can be started to record, and the user interface during recording can be displayed. The user interface during recording may be exemplarily shown in FIG. 10D. Then, the electronic device 100 can respond to the detected user operation on the control 10D-1, can end recording the image in the preview box 301, and can save the recorded image as a video, and display the saved in the control 304 Thumbnail of your video. The display content in the preview box 301 is updated regularly, for example, every 10 ms. During the recording process, the body image of the photographed person displayed in the preview frame 301 may be the body image of the body of the photographed person using the body parameters corresponding to the selected body level.
另外,电子设备100还可以检测作用于控件304的用户操作(如在控件304上的点击操作),响应该操作,可以显示电子设备100最近保存的视频10F-1。这样,用户便可以查看刚刚被保存的视频,该视频中包括的被拍摄人物411的身体图像是利用已选定的美体级别对应的美体参数对被拍摄人物的身体图像进行美体处理后的。In addition, the electronic device 100 can also detect a user operation (such as a click operation on the control 304) acting on the control 304, and in response to the operation, the video 10F-1 recently saved by the electronic device 100 can be displayed. In this way, the user can view the video that has just been saved, and the body image of the photographed person 411 included in the video is subjected to body treatment on the body image of the photographed person using the body parameters corresponding to the selected body level.
从图10A-图10C实施例可以看出,用户可以在开始录像之前对被拍摄人物进行体型美化。在整个录像过程中,预览框301中显示的被拍摄人物的身体图像已经被采用开始录像之前选定的美体级别对应的美体参数进行美体处理了。这样可使得被拍摄人物的身体图像所表现的体型在整个录像过程中呈现出一致性。It can be seen from the embodiments of FIGS. 10A to 10C that the user can beautify the person being photographed before starting to record. During the entire recording process, the body image of the photographed person displayed in the preview box 301 has been subjected to body treatment using the body parameters corresponding to the body level selected before starting the recording. In this way, the body shape of the photographed person's body image will be consistent throughout the video recording process.
不限于此,如图10G所示,录像中用户界面也可以包括用于调节美体级别的控件312和/或用于调整美肤级别的控件3311,这样用户也可以在录像过程中调整针对被拍摄人物的美体级别和/或美肤级别。Not limited to this, as shown in FIG. 10G, the user interface in the recording may also include a control 312 for adjusting the beauty level and/or a control 3311 for adjusting the beauty level, so that the user can also adjust The figure's body level and/or skin level.
在一些实施例中,在录像过程中,如果检测到被拍摄人物发生改变,则电子设备100可以采用默认美体级别(如美体级别5)或之前已选定的美体级别对应的美体参数对当前被拍摄人物的身体图像进行美体处理。In some embodiments, during the recording process, if it is detected that the person to be photographed has changed, the electronic device 100 may adopt the default body contour level (such as the body contour level 5) or the body contour parameter corresponding to the previously selected body contour level Take a body image of the person's body image for body treatment.
前述内容中描述的拍照预览时的一些UI实施例,如图5A-图5D所示的撤销体型美化的实施例、图6A-图6G及图7A-图7G所示的推送健身资讯的实施例、图8A-图8B所示的对比体型美化前后的实施例等,以及后续UI实施例,也适用录像场景下的体型美化,这里不再赘述。Some UI embodiments during the photo preview described in the foregoing content, such as the embodiment of undoing the beautification shown in FIGS. 5A-5D, and the embodiment of pushing fitness information shown in FIGS. 6A-6G and 7A-7G The embodiments before and after the beautification of the figure shown in FIGS. 8A-8B, and subsequent UI embodiments are also applicable to the figure beautification in the recording scene, which will not be repeated here.
图11A-图11E示例性示出了使用体型模板对被拍摄人物进行体型美化的UI实施例。FIGS. 11A to 11E exemplarily show an embodiment of a UI for beautifying a photographed person using a figure template.
如图11A-图11C所示,用户界面33中还可以显示有控件11B-1。控件11B-1可用于监听查看开体型模板的用户操作。电子设备100可以检测到作用于控件11B-1的用户操作(如在控件11B-1上的点击操作),响应该操作,可以显示图11B示例性所示的用户界面。该用户界面可包括预览框301、控件303、控件304、控件305、拍摄模式列表302和体型模板列表11B-2。体型模板列表11B-2中可显示有一个或多个体型模板选项11B-3。不同的体型模板可以代表不同的身材。预览框301、控件303、控件304、控件305、拍摄模式列表302可参考前述实施例中的说明,这里不再赘述。As shown in FIGS. 11A-11C, the user interface 33 may further display a control 11B-1. The control 11B-1 can be used to monitor and view user operations of the open-body template. The electronic device 100 can detect a user operation (such as a click operation on the control 11B-1) acting on the control 11B-1, and in response to the operation, the user interface exemplarily shown in FIG. 11B may be displayed. The user interface may include a preview box 301, a control 303, a control 304, a control 305, a shooting mode list 302, and a figure template list 11B-2. The body template list 11B-2 may display one or more body template options 11B-3. Different figure templates can represent different figures. For the preview box 301, the control 303, the control 304, the control 305, and the shooting mode list 302, reference may be made to the description in the foregoing embodiment, and details are not repeated here.
如图11A-图11C所示,电子设备100可以检测到作用于体型模板选项11B-3的用户操作(如在体型模板选项11B-3上的点击操作),该操作可用于选择体型模板,如体型模板“Kate”。响应该操作,可以显示图11C示例性所示的用户界面。该用户界面可包括图标11B-4、控件314、拍摄模式列表302、控件303、控件304、控件305。其中,图标11B-4可用于指示已选 定的体型模板。控件314可用于选择美体级别,美体级别越高,预览框301中显示的被拍摄人物的身体图像表现的体型越接近体型模板代表的体型。控件303、控件304、控件305、拍摄模式列表302可参考前述实施例中的说明,这里不再赘述。As shown in FIGS. 11A-11C, the electronic device 100 can detect a user operation (such as a click operation on the body template option 11B-3) acting on the body template option 11B-3, which can be used to select a body template, such as Figure template "Kate". In response to this operation, the user interface exemplarily shown in FIG. 11C may be displayed. The user interface may include icons 11B-4, controls 314, a shooting mode list 302, controls 303, controls 304, and controls 305. Among them, the icon 11B-4 can be used to indicate the selected figure template. The control 314 can be used to select a beauty level. The higher the beauty level, the closer the body image of the photographed person displayed in the preview box 301 is to the body type represented by the body shape template. For the control 303, the control 304, the control 305, and the shooting mode list 302, reference may be made to the description in the foregoing embodiment, and details are not described herein again.
如图11D-图11E所示,在已选定体型模板的条件下,电子设备100可以检测到作用于控件314的第一用户操作(如在控件314上的向右滑动操作),第一用户操作可用于提高人物411对应的美体级别(如从美体级别7提高至美体级别10)。响应第一用户操作,电子设备100可以刷新预览框301中的显示内容,刷新后的预览框301中的人物411的身体图像所表现的体型相较于刷新前的预览框301中的人物411的身体图像所表现的体型更加接近已选定的体型模板代表的体型。而且,美体级别越高,预览框301中的人物411的身体图像所表现的体型越接近已选定的体型模板代表的体型。例如,如图11E所示,当美体级别为10(最高美体级别)时,预览框301中的人物411的身体图像所表现的体型和已选定的体型模板代表的体型一致。As shown in FIGS. 11D-11E, under the condition that the figure template has been selected, the electronic device 100 may detect the first user operation (such as a rightward sliding operation on the control 314) acting on the control 314, the first user The operation can be used to increase the figure level corresponding to the character 411 (eg, from figure level 7 to figure level 10). In response to the first user operation, the electronic device 100 can refresh the display content in the preview box 301, and the body image of the person 411 in the preview box 301 after refreshing is compared with the figure of the person 411 in the preview box 301 before refreshing The figure represented by the body image is closer to the figure represented by the selected figure template. Moreover, the higher the body contour level, the closer the body shape of the person 411 in the preview frame 301 is to the body shape represented by the selected body shape template. For example, as shown in FIG. 11E, when the body contour level is 10 (the highest body contour level), the body image represented by the body image of the person 411 in the preview frame 301 is consistent with the body shape represented by the selected body template.
如图11D-图11E所示,在已选定体型模板的条件下,电子设备100可以检测到作用于控件314的第二用户操作(如在控件314上的向左滑动操作),第二用户操作可用于降低人物411对应的美体级别(如从美体级别10降至美体级别7)。响应第二用户操作,电子设备100可以刷新预览框301中的显示内容,刷新后的预览框301中的人物411的身体图像所表现的体型相较于刷新前的预览框301中的人物411的身体图像所表现的体型更加接近人物411的实际体型。As shown in FIGS. 11D-11E, under the condition that the figure template has been selected, the electronic device 100 may detect a second user operation (such as a leftward sliding operation on the control 314) acting on the control 314, the second user The operation can be used to lower the figure level corresponding to the character 411 (for example, from figure level 10 to figure level 7). In response to the second user operation, the electronic device 100 can refresh the display content in the preview box 301, and the body image of the person 411 in the preview box 301 after refreshing is compared with the figure of the person 411 in the preview box 301 before refreshing The figure represented by the body image is closer to the actual figure of the person 411.
在一些实施例中,体型模板列表11B-2中显示的体型模板选项可以和被拍摄人物的性别、年龄等特征相关。例如,如果被拍摄人物是女性,则在体型模板列表11B-2中显示适合女性的体型模板,而不显示适合男性的体型模板。In some embodiments, the body template options displayed in the body template list 11B-2 may be related to the gender, age, and other characteristics of the person being photographed. For example, if the person to be photographed is a female, a body template suitable for women is displayed in the body template list 11B-2, and a body template suitable for men is not displayed.
在一些实施例中,响应于检测到的用于选择体型模板的用户操作,电子设备100可以刷新预览框301中的显示内容,刷新后的预览框301中的被拍摄人物的身体图像所表现的体型和已选定的体型模板代表的体型一致。也即是说,用户可以通过点击体型模板选项来直接将被拍摄人物的体型美化得和体型模板代表的体型一样。In some embodiments, in response to the detected user operation for selecting the body template, the electronic device 100 may refresh the display content in the preview box 301, and the refreshed preview box 301 represents the body image of the photographed person. The figure is the same as the figure represented by the selected figure template. That is to say, the user can directly beautify the figure of the person being photographed to be the same as the figure represented by the figure template by clicking the figure template option.
图12A-图12C示例性示出了一键进行全身美化的UI实施例。12A-12C exemplarily show a one-click UI embodiment for full-body beautification.
如图12A-图12C,用户界面33中还可以显示有控件12B-1。电子设备100可以检测到作用于控件12B-1的用户操作(如在控件12B-1上的点击操作),响应该操作,可以显示图12B示例性所示的用户界面。该用户界面可包括预览框301、控件303、控件304、控件305、拍摄模式列表302、控件313和图标12B-2。图标12B-2可用于指示当前选择的人物美化方式是全身美化。全身美化可以是指对被拍摄人物进行脸部美化和体型美化。控件313可用于用户选择全身美化级别。预览框301、控件303、控件304、控件305、拍摄模式列表302可参考前述实施例中的说明,这里不再赘述。As shown in FIGS. 12A-12C, the user interface 33 may also display a control 12B-1. The electronic device 100 can detect a user operation (such as a click operation on the control 12B-1) acting on the control 12B-1, and in response to the operation, the user interface exemplarily shown in FIG. 12B may be displayed. The user interface may include a preview box 301, a control 303, a control 304, a control 305, a shooting mode list 302, a control 313, and an icon 12B-2. The icon 12B-2 can be used to indicate that the currently selected character beautification method is full-body beautification. Full-body beautification may refer to facial beautification and body beautification of the person being photographed. The control 313 can be used for the user to select the level of full-body beautification. For the preview box 301, the control 303, the control 304, the control 305, and the shooting mode list 302, reference may be made to the description in the foregoing embodiment, and details are not repeated here.
如图12A-图12C所示,电子设备100可以检测到用于选择全身美化级别的用户操作,响应该操作,电子设备100可以根据已选定的全身美化级别对被拍摄人物的身体图像进行美体处理,对被拍摄人物的脸部图像进行美肤处理,并刷新预览框301。刷新后预览框301中显示已经过美体处理和美肤处理后的被拍摄人物的图像。全身美化级别越高,预览框301显示的被拍摄人物的身体图像表现的体型与被拍摄人物的实际体型相差越大,预览框301显示的 被拍摄人物的脸部图像表现的脸部皮肤与被拍摄人物的实际脸部皮肤相差越大。As shown in FIGS. 12A-12C, the electronic device 100 can detect a user operation for selecting a full-body beautification level, and in response to the operation, the electronic device 100 can beautify the body image of the person being photographed according to the selected full-body beautification level In the processing, the face image of the photographed person is subjected to skin beautification processing, and the preview frame 301 is refreshed. After refreshing, the preview box 301 displays the image of the photographed person who has undergone the body treatment and skin treatment. The higher the overall beautification level, the greater the difference between the body image of the photographed person displayed in the preview frame 301 and the actual body shape of the photographed person. The greater the difference in the actual facial skin of the person photographed.
图12A-图12C所示的一键进行全身美化的UI实施例可实现快速的对被拍摄人物进行全身美化,操作简单而有效,可提高电子设备的使用效率。The one-button UI embodiment for full-body beautification shown in FIGS. 12A to 12C can quickly realize the whole-body beautification of the photographed person, the operation is simple and effective, and the use efficiency of the electronic device can be improved.
图13A-图13D示例性示出了对多人进行体型美化的UI实施例。13A to 13D exemplarily show a UI embodiment for beautifying multiple people.
如图13A-图13B所示,当预览框301中显示有3D摄像模组193采集的多个被拍摄人物的图像时,电子设备100可以响应于检测到的选择美体级别的用户操作,利用已选定的美体级别对应的美体参数对这多个被拍摄人物的身体图像都进行美体处理,并刷新预览框301中的显示内容。刷新后的预览框301中显示有经过美体处理后的这多个被拍摄人物的身体图像。也即是说,用户可以对这多个被拍摄人物采用相同的美体级别进行体型美化。As shown in FIGS. 13A-13B, when the preview frame 301 displays a plurality of images of the captured person captured by the 3D camera module 193, the electronic device 100 can respond to the detected user operation for selecting the body-level, using the The body parameters corresponding to the selected body level perform body processing on the body images of the plurality of photographed persons, and refresh the display content in the preview box 301. The refreshed preview frame 301 displays the body images of the plurality of photographed persons after the body treatment. That is to say, the user can beautify the plurality of photographed people with the same beauty level.
如图13C-图13D所示,当预览框301中显示有3D摄像模组193采集的多个被拍摄人物的图像时,电子设备100可以检测到选择被拍摄人物的用户操作(如在被拍摄人物的图像上的点击操作),且检测到选择美体级别的用户操作。响应该操作,电子设备100可以利用已选定的美体级别对应的美体参数对已选定的被拍摄人物的身体图像进行美体处理,并刷新预览框301中的显示内容。刷新后的预览框301中显示有已选定的被拍摄人物的身体图像以及未被选择的被拍摄人物的身体图像,其中,已选定的被拍摄人物的身体图像有经过美体处理,未被选择的被拍摄人物的身体图像没有经过美体处理。也即是说,用户可以从这多个被拍摄人物中选择出某个或某些人物进行体型美化。As shown in FIGS. 13C-13D, when the preview frame 301 displays a plurality of images of the captured person captured by the 3D camera module 193, the electronic device 100 can detect a user operation to select the captured person (such as when shooting Click operation on the image of the character), and a user operation to select a body level is detected. In response to this operation, the electronic device 100 can perform the body treatment on the body image of the selected photographed person using the body parameters corresponding to the selected body level, and refresh the display content in the preview box 301. The refreshed preview frame 301 displays the body image of the selected photographed person and the body image of the unselected photographed person. Among them, the body image of the selected photographed person has undergone body treatment and is not The body image of the selected person to be photographed has not undergone body treatment. That is to say, the user can select a certain person or persons from the plurality of shot persons for beautification.
在一些实施例中,电子设备100可以从3D摄像模组193采集的多个被拍摄人物的图像中识别出特定人物的图像,如电子设备100的拥有者。电子设备100可以默认对该特定人物的图像进行美体处理。可选的,电子设备100可以利用电子设备100上存储的图像数据(如图库中的照片)从多个被拍摄人物的图像中识别出特定人物的图像,例如特定人物的图像中的脸部图像与图库中被标记、被收藏或被命名的图片中的人脸图像表现相同的面部特征。In some embodiments, the electronic device 100 may recognize the image of a specific person from the images of the plurality of captured persons collected by the 3D camera module 193, such as the owner of the electronic device 100. The electronic device 100 may perform body treatment on the image of the specific person by default. Optionally, the electronic device 100 can use the image data stored on the electronic device 100 (such as photos in a gallery) to identify the image of a specific person from the images of multiple photographed persons, for example, the face image in the image of the specific person The facial images in the pictures marked, favorited or named in the gallery show the same facial features.
图14A-图14B示例性示出了手动进行体型美化的UI实施例。14A-14B exemplarily show a UI embodiment for manually performing beautification.
如图14A-图14B所示,在预览框301中,电子设备100可以检测到作用于被拍摄人物的身体图像上的用户操作,如图14A所示的在肚子图像上的捏合手势。响应该操作,电子设备100可以确定该操作所选择的局部身体图像,然后对该局部身体图像进行美体处理。该用户操作的幅度可以确定美体处理的程度,如幅度越大,美体处理的程度越大。As shown in FIGS. 14A-14B, in the preview frame 301, the electronic device 100 can detect a user operation acting on the body image of the photographed person, as shown in FIG. 14A, a pinch gesture on the belly image. In response to the operation, the electronic device 100 may determine the partial body image selected by the operation, and then perform body treatment on the partial body image. The magnitude of the user's operation can determine the degree of body treatment. For example, the greater the magnitude, the greater the degree of body treatment.
也即是说,用户可以通过在某个身体部分上的捏合操作来对该身体部分进行瘦身。That is to say, the user can slim down a body part through a pinch operation on the body part.
不限于图14A-图14B的用户操作,在腿部图像上的拉伸手势可用来拉长腿部,在肚子图像的按压操作还可用来瘦肚子。Not limited to the user operations of FIGS. 14A-14B, the stretching gesture on the leg image can be used to lengthen the leg, and the pressing operation on the tummy image can also be used to thin the belly.
图15A-图15D示例性示出了对已拍摄图片中的人物进行体型美化的UI实施例。15A to 15D exemplarily show a UI embodiment for beautifying a person in a captured picture.
如图15A所示,对于包含经过美体处理和/或美肤处理的人物图像的图片,电子设备100可以在图库中对这种图片进行标记,例如在图片的缩略图上显示指示符15A-1。该指示符15A-1可用于指示这种图片中的人物图像经过了美体处理和/或美肤处理。As shown in FIG. 15A, for a picture containing a person image subjected to body treatment and/or skin treatment, the electronic device 100 may mark such a picture in the gallery, for example, displaying an indicator 15A-1 on the thumbnail of the picture . The indicator 15A-1 can be used to indicate that the image of the person in the picture has undergone body treatment and/or skin treatment.
如图15B-图15D所示,显示图片15B-1的用户界面中还可显示控件15B-2。响应于检测到的作用于控件15B-2的用户操作,电子设备100可以在显示图片15B-1的用户界面中显示 控件312、控件309和控件310。控件312、控件309和控件310的说明可参考前述内容,这里不再赘述。响应于检测到的选择美体级别的用户操作(如在控件312上的向右滑动操作),电子设备100可以利用已选定的美体级别对应的美体参数对图片15B-1中的人物的身体图像进行美体处理,并刷新图片15B-1。刷新后的图片15B-1中的人物的身体图像表现的体型相较于刷新前的图片15B-1中的人物的身体图像表现的体型发生了体型美化。As shown in FIGS. 15B-15D, the user interface displaying the picture 15B-1 may also display the control 15B-2. In response to the detected user operation acting on the control 15B-2, the electronic device 100 may display the control 312, the control 309, and the control 310 in the user interface displaying the picture 15B-1. For the description of the control 312, the control 309, and the control 310, reference may be made to the foregoing content, and details are not described here. In response to the detected user operation of selecting the body level (such as a swipe right operation on the control 312), the electronic device 100 can use the body parameters corresponding to the selected body level to perform the body image of the person in the picture 15B-1 Perform body treatment and refresh picture 15B-1. The body image of the person's body image in the refreshed picture 15B-1 is more beautified than the body image of the person's body image in the before-refresh picture 15B-1.
不限于前述包含经过美体处理和/或美肤处理的人物图像的图片,图片15B-1还可以包括未经过美体处理或美肤处理的图片。这样用户便可以在照片拍摄完成后对照片中的人物进行体型美化。类似的,用户还可以对已拍摄的视频中的人物进行体型美化,其具体实现可参考图15A-图15D实施例,这里不再赘述。It is not limited to the foregoing pictures containing the image of the person subjected to body treatment and/or skin treatment, and the picture 15B-1 may also include pictures that have not been subjected to body treatment or skin treatment. In this way, the user can beautify the figures in the photo after the photo is taken. Similarly, the user can also beautify the figures in the captured video. For specific implementation, refer to the embodiments in FIGS. 15A to 15D, and details are not described here.
上述UI实施例中,预览框301中显示的3D摄像模组193采集的被拍摄人物的图像可以称为被拍摄人物的第一图像,预览框301中显示的经过美体处理的被拍摄人物的图像可以称为被拍摄人物的第二图像。In the above UI embodiment, the image of the photographed person collected by the 3D camera module 193 displayed in the preview frame 301 may be referred to as the first image of the photographed person, and the image of the photographed person displayed in the preview frame 301 after the body treatment It can be called the second image of the person being photographed.
上述UI实施例中,可以将控件312称为第一控件,可以将控件801称为第二控件;可以将图7A-图7G实施例中的提示信息703称为第一提示信息。In the above UI embodiment, the control 312 may be referred to as a first control, and the control 801 may be referred to as a second control; the prompt information 703 in the embodiments of FIGS. 7A-7G may be referred to as first prompt information.
基于前述内容介绍的电子设备100以及前述UI实施例,下面实施例介绍本申请提供的拍照预览方法。如图16所示,该方法可包括:Based on the electronic device 100 introduced in the foregoing and the foregoing UI embodiments, the following embodiments describe the photo preview method provided by the present application. As shown in FIG. 16, the method may include:
S101,采集图像。S101. Acquire images.
具体的,电子设备可以开启3D摄像模组,并通过3D摄像模组采集彩色图像和深度图像。该彩色图像可包括被拍摄人物的图像(即前景图像)和背景图像。该深度图像可包括被拍摄人物的深度信息。Specifically, the electronic device can turn on the 3D camera module and collect color images and depth images through the 3D camera module. The color image may include an image of a person being photographed (ie, a foreground image) and a background image. The depth image may include depth information of the person being photographed.
其中,彩色图像可以包括多个像素点,每个像素点都具有二维坐标以及颜色值。颜色值可以是RGB值或YUV值。深度图像可以包括多个像素点,每个像素点具有二维坐标以及深度值。针对被拍摄人物身体上的某个位置,该位置在彩色图像中对应的像素点的颜色值表示该位置的颜色(例如服饰的颜色、裸露的皮肤的颜色等),该位置在深度图像中对应的像素点的深度值表示该位置与电子设备(具体可以为3D摄像模组)之间的垂直距离。Wherein, the color image may include a plurality of pixels, and each pixel has two-dimensional coordinates and color values. The color value can be an RGB value or a YUV value. The depth image may include a plurality of pixels, each pixel having two-dimensional coordinates and a depth value. For a position on the body of the person being photographed, the color value of the corresponding pixel in the color image of the position represents the color of the position (for example, the color of clothing, the color of bare skin, etc.), and the position corresponds to the depth image The depth value of the pixel indicates the vertical distance between the position and the electronic device (specifically a 3D camera module).
例如,如图17A-图17B所示,针对被拍摄人物身体上的位置A(左髋点),位置A在彩色图像中对应的像素点的二维坐标为(x1,y1),该像素点的RGB值为(255,255,255);位置A在深度图像中对应的像素点的二维坐标为(x1,y1),该像素点的深度值为350厘米。这表示位置A处的颜色为白色,位置A和电子设备之间的垂直距离为350厘米。类似的,针对被拍摄人物身体上的位置B(左膝点),位置B在彩色图像中对应的像素点的RGB值(0,0,0)和位置B在深度图像中对应的像素点的深度值345厘米可表示位置B处的颜色为黑色,位置B和电子设备之间的垂直距离为345厘米。For example, as shown in FIGS. 17A-17B, for the position A (left hip point) on the body of the photographed person, the two-dimensional coordinates of the corresponding pixel point of the position A in the color image is (x1, y1), the pixel point The RGB value of is (255,255,255); the two-dimensional coordinates of the corresponding pixel in position A in the depth image are (x1,y1), and the depth value of the pixel is 350 cm. This means that the color at position A is white, and the vertical distance between position A and the electronic device is 350 cm. Similarly, for the location B (left knee point) on the body of the person being photographed, the RGB value (0,0,0) of the pixel corresponding to the location B in the color image and the pixel corresponding to the location B in the depth image A depth value of 345 cm can indicate that the color at position B is black, and the vertical distance between position B and the electronic device is 345 cm.
可以看出,结合被拍摄人物的彩色图像和深度信息,可以确定出被拍摄人物的每一个被拍摄部位的二维坐标、相对于3D摄像模组的深度值,以及颜色值。其中,二维坐标和深度值可表示3D坐标。It can be seen that, in combination with the color image and depth information of the photographed person, the two-dimensional coordinates of each photographed part of the photographed person, the depth value relative to the 3D camera module, and the color value can be determined. Among them, the two-dimensional coordinates and depth values may represent 3D coordinates.
例如,图17A和图17B分别所示的彩色图像、深度图像可结合为颜色值在3D坐标空间中的分布,可如图17C所示。z轴表示深度值。其中,位置A的3D坐标为(x1,y1,z1),z1=350 厘米,该3D坐标处的RGB值为(255,255,255);位置B的3D坐标为(x2,y2,z2),z2=345厘米,该3D坐标处的RGB值为(0,0,0)。For example, the color image and the depth image shown in FIGS. 17A and 17B can be combined into a distribution of color values in a 3D coordinate space, as shown in FIG. 17C. The z axis represents the depth value. Among them, the 3D coordinate of position A is (x1, y1, z1), z1=350 cm, the RGB value at the 3D coordinate is (255,255,255); the 3D coordinate of position B is (x2,y2,z2), z2=345 Cm, the RGB value at this 3D coordinate is (0,0,0).
这里,被拍摄部位是指被3D摄像模组采集到图像的部位,例如当被拍摄人物正面面对3D摄像模组站立时,该被拍摄人物的被拍摄部位可以包括脸部、肚子等正面面对3D摄像模组的身体部位,而臀部、后背则不属于被拍摄部位。Here, the photographed part refers to the part captured by the 3D camera module. For example, when the photographed person stands facing the 3D camera module, the photographed part of the photographed person may include a face, stomach, etc. For the body part of the 3D camera module, the buttocks and back are not the part to be photographed.
S102,电子设备可以显示第一用户界面。S102. The electronic device may display a first user interface.
具体的,第一用户界面可以是“相机”应用程序的人物美化功能所提供的用户界面。该用户界面可以是图4A-图4G所示的用户界面、图5A-图5D所示的用户界面、图6A-图6G所示的用户界面、图7A-图7H所示的用户界面、图8A-图8B所示的用户界面、图9A-图9C所示的用户界面、图10A-图10G所示的用户界面、图11A-图11E所示的用户界面、图12A-图12C所示的用户界面、图13A-图13D所示的用户界面。Specifically, the first user interface may be a user interface provided by the character beautification function of the "camera" application. The user interface may be the user interface shown in FIGS. 4A-4G, the user interface shown in FIGS. 5A-5D, the user interface shown in FIGS. 6A-6G, or the user interface shown in FIGS. 7A-7H. User interfaces shown in 8A-8B, user interfaces shown in FIGS. 9A-9C, user interfaces shown in FIGS. 10A-10G, user interfaces shown in FIGS. 11A-11E, shown in FIGS. 12A-12C User interface, the user interface shown in FIGS. 13A-13D.
具体的,如果第一用户界面是图4A-图4G所示的用户界面、图5A-图5D所示的用户界面、图6A-图6G所示的用户界面、图7A-图7H所示的用户界面、图8A-图8B所示的用户界面、图9A-图9C所示的用户界面、图10A-图10G所示的用户界面、图12A-图12C所示的用户界面、图13A-图13D所示的用户界面。那么,电子设备在后续S108中采用的美体处理方式为美体处理方式1。在这些附图所示的用户界面中,美体选项310处于被选定的状态,控件312可用于用户为被拍摄人物选择美体级别。关于这些用户界面的具体实现,可参考相应的前述UI实施例,这里不再赘述。Specifically, if the first user interface is the user interface shown in FIGS. 4A-4G, the user interface shown in FIGS. 5A-5D, the user interface shown in FIGS. 6A-6G, or the one shown in FIGS. 7A-7H User interface, the user interface shown in FIGS. 8A-8B, the user interface shown in FIGS. 9A-9C, the user interface shown in FIGS. 10A-10G, the user interface shown in FIGS. 12A-12C, and FIG. 13A- The user interface shown in FIG. 13D. Then, the body treatment method adopted by the electronic device in the subsequent S108 is the body treatment method 1. In the user interfaces shown in these figures, the body style option 310 is in a selected state, and the control 312 can be used for the user to select the body style for the person being photographed. For the specific implementation of these user interfaces, reference may be made to the corresponding aforementioned UI embodiments, which will not be repeated here.
具体的,如果第一用户界面是图11A-图11E实施例描述的用户界面,则电子设备在后续S108中采用的美体处理方式为美体处理方式2。关于该用户界面的具体实现,可参考图11A-图11C实施例,这里不再赘述。此时,第一用户界面可用于用户为被拍摄人物选择美体模板,还可用于用户在已选定美体模板下调节美体级别。关于用户选择美体模板、调节美体级别的用户操作,可具体参考图11A-图11E实施例,这里不再赘述。Specifically, if the first user interface is the user interface described in the embodiments of FIGS. 11A to 11E, the body treatment method adopted by the electronic device in subsequent S108 is the body treatment method 2. For specific implementation of the user interface, reference may be made to the embodiments of FIGS. 11A to 11C, and details are not described here. At this time, the first user interface can be used for the user to select a beauty template for the photographed person, and can also be used for the user to adjust the beauty level under the selected beauty template. Regarding the user operation of the user selecting the beauty template and adjusting the beauty level, reference may be made to the embodiments of FIGS. 11A to 11E in detail, and details are not described here.
S103,识别人体骨骼点。S103. Identify human bone points.
具体的,电子设备可以利用被拍摄人物的彩色图像和人体骨骼点定位算法,识别出被拍摄人物的骨骼点。这里,识别出骨骼点是指确定骨骼点的2D坐标。识别出的骨骼点的2D坐标和S104中确定出的骨骼点的深度值可用于电子设备在后续S106中确定被拍摄人物的体型,还可用于电子设备在后续S105中确定被拍摄人物和电子设备所在平面之间的夹角。Specifically, the electronic device can use the color image of the photographed person and the human bone point positioning algorithm to identify the skeleton point of the person. Here, recognizing the bone point means identifying the 2D coordinates of the bone point. The 2D coordinates of the identified bone point and the depth value of the bone point determined in S104 can be used by the electronic device to determine the body shape of the photographed person in subsequent S106, and can also be used by the electronic device to determine the photographed person and electronic equipment in subsequent S105 The angle between the planes.
其中,人体骨骼点定位算法(human pose estimation)的输入可以是人体的彩色图像,人体骨骼点定位算法的输出可以是人体的骨骼点的2D坐标。这样,电子设备具体可以将被拍摄人物的彩色图像作为输入,经过人体骨骼点定位算法,得到被拍摄人物的彩色图像中各骨骼点的2D坐标。电子设备可以识别出图18所示的基本的人体骨骼点,如头部点、颈部点、左肩点、右肩点、左肘点、右肘点、左手点、右手点、左髋点、右髋点、左膝点、右膝点、左脚点、右脚点。不限于图18所示,电子设备也可以识别出更多或更少的人体骨骼点。The input of the human bone point positioning algorithm (human pose estimation) may be a color image of the human body, and the output of the human bone point positioning algorithm may be the 2D coordinates of the human bone point. In this way, the electronic device can specifically take the color image of the photographed person as input and obtain the 2D coordinates of each bone point in the color image of the photographed person through the human bone point positioning algorithm. The electronic device can recognize the basic human bone points shown in FIG. 18, such as head point, neck point, left shoulder point, right shoulder point, left elbow point, right elbow point, left hand point, right hand point, left hip point, Right hip point, left knee point, right knee point, left foot point, right foot point. Not limited to that shown in FIG. 18, the electronic device can also recognize more or fewer human bone points.
这里,人体骨骼点定位算法是以大量的人体彩色图像和该彩色图像中的人体骨骼点为训练数据,对神经网络算法进行训练得到的。最后训练得到的人体骨骼点定位算法(即神经网络算法)的可信赖度比较高,例如置信度在90%以上。Here, the human bone point positioning algorithm is obtained by training a neural network algorithm by using a large number of human color images and human bone points in the color image as training data. The reliability of the human skeleton point positioning algorithm (ie neural network algorithm) obtained by the last training is relatively high, for example, the confidence is above 90%.
S104,确定骨骼点的深度值。S104: Determine the depth value of the bone point.
具体的,电子设备可以利用S102中已识别出的被拍摄人物的骨骼点的二维坐标以及被拍 摄人物的深度信息,确定出被拍摄人物的骨骼点的深度值。确定出的骨骼点的深度值和前述S103中确定的骨骼点2D坐标可用于电子设备在后续S106中确定被拍摄人物的体型,还可用于电子设备在后续S105中确定被拍摄人物和电子设备所在平面之间的夹角。Specifically, the electronic device may use the two-dimensional coordinates of the skeleton point of the photographed person and the depth information of the photographed person identified in S102 to determine the depth value of the skeleton point of the photographed person. The determined depth value of the bone point and the 2D coordinates of the bone point determined in the foregoing S103 can be used by the electronic device to determine the body shape of the photographed person in subsequent S106, and can also be used by the electronic device to determine where the photographed person and electronic device are located in subsequent S105 The angle between the planes.
例如,如图17A-图17B所示,在被拍摄人物的彩色图像中,被拍摄人物的左髋点(位置A)的二维坐标为(x1,y1)。由于二维坐标(x1,y1)处的像素点在被拍摄人物的彩色图像中的深度值为350厘米,因此左髋点的深度值为350厘米。For example, as shown in FIGS. 17A-17B, in the color image of the photographed person, the two-dimensional coordinates of the left hip point (position A) of the photographed person are (x1, y1). Since the pixel at the two-dimensional coordinates (x1, y1) has a depth value of 350 cm in the color image of the person being photographed, the depth value of the left hip point is 350 cm.
除了骨骼点的深度值,电子设备还可以确定被拍摄人物的其他身体部位的深度值,例如肚子的深度值,因为肚子的深度值可用来确定被拍摄人物的肚子的胖瘦程度。肚子的深度值可包括肚子上的一个或多个特征点的深度值。In addition to the depth value of the bone point, the electronic device can also determine the depth value of other body parts of the person being photographed, such as the depth value of the belly, because the depth value of the belly can be used to determine the fatness and thinness of the belly of the person being photographed. The depth value of the belly may include the depth value of one or more feature points on the belly.
S105,透视变换。S105, perspective transformation.
在拍摄时,人体各个骨骼点和电子设备所在平面之间的垂直距离通常不相等。比较常见的情况是,人体上半部分的身体(如头部)和电子设备所在平面之间的垂直距离较小,人体下半部分的身体(如腿部)和电子设备所在平面之间的垂直距离较大。这样导致被拍摄人物在拍摄图像中呈现出“头大腿短”的视觉效果。可选的,电子设备在对被拍摄人物的彩色图像进行美体处理前,可以先通过对彩色图像进行透视变换便可以矫正“头大腿短”的视觉效果。When shooting, the vertical distance between each bone point of the human body and the plane where the electronic device is located is usually not equal. The more common situation is that the vertical distance between the body of the upper half of the human body (such as the head) and the plane where the electronic device is located is smaller, and the vertical distance between the body of the lower half of the human body (such as the legs) and the plane where the electronic device is located The distance is larger. This causes the person being photographed to present a visual effect of "short head and thighs" in the captured image. Optionally, the electronic device can correct the visual effect of "short head and thighs" by performing a perspective transformation on the color image before performing body treatment on the color image of the photographed person.
具体的,电子设备可以先确定被拍摄人物和电子设备所在平面之间的夹角。然后,电子设备可以利用该夹角计算得到透视变换矩阵,最后利用透视变换矩阵对被拍摄人物的彩色图像进行透视变换。Specifically, the electronic device may first determine the angle between the person being photographed and the plane where the electronic device is located. Then, the electronic device can calculate the perspective transformation matrix using the included angle, and finally use the perspective transformation matrix to perform perspective transformation on the color image of the photographed person.
假设透视变换矩阵为下面的3×3矩阵,彩色图像中任意像素点的二维坐标(x,y)经过下述矩阵变换后得到3D坐标(X,Y,Z):Assuming that the perspective transformation matrix is the following 3×3 matrix, the two-dimensional coordinates (x, y) of any pixel in the color image are transformed into the 3D coordinates (X, Y, Z) after the following matrix transformation:
Figure PCTCN2019122516-appb-000003
Figure PCTCN2019122516-appb-000003
上面矩阵变换中将该任一像素点的z值设为1。该二维坐标(x,y)可以通过矩阵变换变成三维坐标(X,Y,Z)。然后可以将X,Y除以Z的值,得到x’,y’。彩色图像中,原来的二维坐标(x,y)转换成新的二维坐标(x’,y’),以得到透视变换后的彩色图像。透视变换后的人体骨骼点的2D坐标可通过透视变换前的人体骨骼点的2D坐标乘以变换矩阵得到。In the above matrix transformation, the z value of any pixel is set to 1. The two-dimensional coordinates (x, y) can be transformed into three-dimensional coordinates (X, Y, Z) through matrix transformation. Then X, Y can be divided by the value of Z to get x’, y’. In a color image, the original two-dimensional coordinates (x, y) are converted into new two-dimensional coordinates (x', y') to obtain a perspective-transformed color image. The 2D coordinates of the human skeleton point after the perspective transformation can be obtained by multiplying the 2D coordinates of the human skeleton point before the perspective transformation by the transformation matrix.
电子设备可以通过下述两种方式来确定被拍摄人物和电子设备所在平面之间的夹角α:The electronic device can determine the angle α between the person being photographed and the plane where the electronic device is located in the following two ways:
方式1:通过各个骨骼点的深度值以及2D坐标确定夹角α。Method 1: The angle α is determined by the depth value of each bone point and the 2D coordinates.
例如,如图19所示,被拍摄人物的左髋点P1、左膝点P2和电子设备之间的垂直距离分别会是D1、D2。在被拍摄人物的彩色图像中,左髋点P1、左膝点P2之间的距离L可以由P1的2D坐标和P2的2D坐标计算得到。因此,被拍摄人物和电子设备所在平面之间的夹角α可以计算得到:α=arc[tan((D2-D1)/L)]。For example, as shown in FIG. 19, the vertical distance between the left hip point P1 and the left knee point P2 of the person being photographed and the electronic device will be D1 and D2, respectively. In the color image of the person being photographed, the distance L between the left hip point P1 and the left knee point P2 can be calculated from the 2D coordinates of P1 and the 2D coordinates of P2. Therefore, the angle α between the person being photographed and the plane where the electronic device is located can be calculated as: α=arc[tan((D2-D1)/L)].
可选的,电子设备可以通过多组骨骼点计算得到多个夹角值,然后可以对这个多个夹角值进行归一化。归一化得到的夹角值可确定为被拍摄人物和电子设备所在平面之间的夹角α。Optionally, the electronic device can calculate multiple angle values by calculating multiple sets of bone points, and then can normalize the multiple angle values. The normalized angle value can be determined as the angle α between the person being photographed and the plane where the electronic device is located.
方式2:通过电子设备的传感器(如陀螺仪传感器)采集电子设备的俯仰角θ(取值范围为-180°至180°),根据俯仰角θ确定夹角α。俯仰角θ和夹角α之间的关系可以是:θ=α或者θ=α-180°。因此,根据电子设备的俯仰角θ可以确定夹角α。Method 2: Collect the pitch angle θ of the electronic device through a sensor of the electronic device (such as a gyro sensor) (value range is -180° to 180°), and determine the included angle α according to the pitch angle θ. The relationship between the pitch angle θ and the included angle α may be: θ=α or θ=α-180°. Therefore, the angle α can be determined according to the pitch angle θ of the electronic device.
S106,确定被拍摄人物的体型。S106. Determine the figure of the person being photographed.
电子设备可以根据被拍摄人物的彩色图像、被拍摄人物的深度信息确定被拍摄人物的体 型。如果电子设备对3D摄像模组采集到的彩色图像进行了透视变换,则被拍摄人物的彩色图像具体可以是被拍摄人物的透视变换后的彩色图像。确定出的被拍摄人物的体型可用于电子设备在S108中对被拍摄人物的彩色图像进行美体处理。电子设备确定被拍摄人物的体型,具体可包括以下一项或多项:The electronic device can determine the shape of the person to be photographed based on the color image of the person to be photographed and the depth information of the person to be photographed. If the electronic device performs perspective transformation on the color image collected by the 3D camera module, the color image of the photographed person may specifically be a color image after the perspective transformation of the photographed person. The determined body shape of the photographed person can be used by the electronic device to perform a body treatment on the color image of the photographed person in S108. The electronic device determines the figure of the person being photographed, which may include one or more of the following:
1.确定身体比例1. Determine the body ratio
具体的,电子设备可以确定骨骼点之间的骨骼的长度(如腿部长度、肩部宽度等),并可以根据各骨骼的长度确定被拍摄人物的身体比例,例如头身比。Specifically, the electronic device can determine the length of the bone between the bone points (such as the length of the leg, the width of the shoulder, etc.), and can determine the proportion of the body of the person to be photographed, such as the head-to-body ratio, according to the length of each bone.
具体的,电子设备可以根据骨骼点的深度值以及骨骼点的2D坐标确定骨骼点之间的骨骼的长度。例如,如图20所示,被拍摄人物的左髋点P1、左膝点P2和电子设备之间的垂直距离分别会是D1、D2。在被拍摄人物的彩色图像中,左髋点P1、左膝点P2之间的距离L可以由P1的2D坐标和P2的2D坐标计算得到。因此,可以计算出左髋点P1、左膝点P2之间大腿的骨骼长度X为:
Figure PCTCN2019122516-appb-000004
如果电子设备对3D摄像模组采集到的彩色图像进行了透视变换,则骨骼点(如左髋点P1、左膝点P2)的2D坐标可以是透视变换后的骨骼点的2D坐标。
Specifically, the electronic device may determine the length of the bone between the bone points according to the depth value of the bone points and the 2D coordinates of the bone points. For example, as shown in FIG. 20, the vertical distance between the left hip point P1 and the left knee point P2 of the person being photographed and the electronic device will be D1 and D2, respectively. In the color image of the photographed person, the distance L between the left hip point P1 and the left knee point P2 can be calculated from the 2D coordinates of P1 and the 2D coordinates of P2. Therefore, the bone length X of the thigh between the left hip point P1 and the left knee point P2 can be calculated as:
Figure PCTCN2019122516-appb-000004
If the electronic device performs perspective transformation on the color image collected by the 3D camera module, the 2D coordinates of the bone points (such as the left hip point P1 and the left knee point P2) may be the 2D coordinates of the bone points after perspective transformation.
2.确定局部身体的轮廓2. Determine the outline of the local body
电子设备可以通过被拍摄人物的彩色图像和人体轮廓检测算法确定被拍摄人物的整个人体轮廓,然后可以进一步确定出骨骼点之间的局部身体(如肚子、腰部、腿部)的轮廓,即局部轮廓。腰部的局部轮廓可用来确定腰围、腿部的局部轮廓可用来确定腿围,等等。也即是说,局部身体的轮廓可用来确定局部身体的胖瘦。The electronic device can determine the entire human body contour of the photographed person through the color image of the photographed person and the human body contour detection algorithm, and then can further determine the contour of the local body (such as the stomach, waist, and legs) between the bone points, that is, the local contour. The local contour of the waist can be used to determine the waist circumference, the local contour of the leg can be used to determine the leg circumference, and so on. That is to say, the contour of the partial body can be used to determine the fatness and thinness of the partial body.
其中,人体轮廓检测算法的输入可以是人体的彩色图像,人体轮廓检测算法的输出可以是表示人体轮廓的二维坐标的集合。这样,电子设备具体可以将被拍摄人物的透视变换后的彩色图像作为输入,经过人体轮廓检测算法,得到透视变换后的彩色图像中的人体轮廓的二维坐标的集合。The input of the human body contour detection algorithm may be a color image of the human body, and the output of the human body contour detection algorithm may be a set of two-dimensional coordinates representing the human body contour. In this way, the electronic device can specifically take the perspective-transformed color image of the photographed person as an input, and obtain a two-dimensional coordinate set of the human body contour in the color-transformed color image after the human body contour detection algorithm.
这里,人体轮廓检测算法是以大量的人体彩色图像和该彩色图像中的人体轮廓的二维坐标的集合为训练数据,对神经网络算法进行训练得到的。最后训练得到的人体轮廓检测算法(即神经网络算法)的可信赖度比较高,例如置信度在90%以上。Here, the human body contour detection algorithm is obtained by training a neural network algorithm by using a large number of human body color images and a set of two-dimensional coordinates of the human body contours in the color image as training data. The reliability of the human contour detection algorithm (that is, the neural network algorithm) obtained by the final training is relatively high, for example, the confidence is above 90%.
3.确定局部身体的深度值3. Determine the depth value of the local body
具体的,局部身体的深度值越小,可表示其距离电子设备越近,从而可表示该局部身体的突起程度越高,即该局部身体越胖。例如,当被拍摄人物正面面对电子设备进行拍摄时,比较胖的肚子会突起,突起部分距离电子设备比较近,即突起部分的深度值较小。Specifically, the smaller the depth value of the partial body, the closer it is to the electronic device, and thus the higher the degree of protrusion of the partial body, that is, the fatter the partial body. For example, when the person to be photographed faces the electronic device for shooting, a fat belly will protrude, and the protruding part is closer to the electronic device, that is, the depth value of the protruding part is smaller.
S107,分割人像。S107, split portrait.
在对被拍摄人物的彩色图像进行美体处理(S108)之前,如图21所示,电子设备可以将彩色图像分割成被拍摄人物的彩色图像(即前景图像)和背景图像。其中,(a)图示出了被拍摄人物的彩色图像,(b)图示出了背景图像。分割得到的被拍摄人物的彩色图像可用于后续的美体处理。如果电子设备对3D摄像模组采集到的彩色图像进行了透视变换,则被分割的彩色图像可以是透视变换后的彩色图像。Before subjecting the body image to the color image of the photographed person (S108), as shown in FIG. 21, the electronic device may divide the color image into a color image (ie, foreground image) and background image of the photographed person. Among them, (a) shows the color image of the person being photographed, and (b) shows the background image. The segmented color image of the photographed person can be used for subsequent body treatment. If the electronic device performs perspective transformation on the color image collected by the 3D camera module, the divided color image may be a color image after perspective transformation.
S108,美体处理。S108, body treatment.
具体的,美体处理是指对被拍摄人物的身体图像进行处理,如图像拉伸、图像压缩、打阴影等,使得处理后的身体图像表现的体型相较于被拍摄人物的实际体型发生了体型美化。 如果电子设备对3D摄像模组采集到的彩色图像进行了透视变换,则被拍摄人物的身体图像具体可以是被拍摄人物的透视变换后的身体图像。Specifically, body treatment refers to the processing of the body image of the photographed person, such as image stretching, image compression, shading, etc., so that the body shape of the processed body image is compared with the actual body shape of the photographed person. beautify. If the electronic device performs perspective transformation on the color image collected by the 3D camera module, the body image of the photographed person may specifically be the body image of the photographed person after perspective transformation.
在第一用户界面(如图4A所示的用户界面)中,电子设备可以在检测到用于选择美体级别的用户操作(即作用于控件312的用户操作)时执行美体处理。此时的美体处理的方式可参考后面内容中介绍的美体处理方式1。In the first user interface (such as the user interface shown in FIG. 4A ), the electronic device may perform a body treatment process when it detects a user operation for selecting a body level (that is, a user operation acting on the control 312 ). For the method of body treatment at this time, please refer to the body treatment method 1 described later.
在第一用户界面(如图11A-图11C所示的用户界面)中,电子设备可以在检测到用于选择体型模板的用户操作,或者在已选定的体型模板下选择美体级别的用户操作时(即作用于控件312的用户操作)时执行美体处理。此时的美体处理的方式可参考后面内容中介绍的美体处理方式2。In the first user interface (as shown in FIGS. 11A-11C), the electronic device can detect a user operation for selecting a body shape template, or select a user operation at a beauty level under the selected body shape template The body treatment is executed at the time (that is, the user operation acting on the control 312). For the method of body treatment at this time, please refer to the body treatment method 2 described in the following content.
S109,图像修复。S109, image restoration.
具体的,电子设备可以将经过美体处理后的被拍摄人物的彩色图像和背景图像进行融合。在进行图像融合时,为了避免经过美体处理后的肢体图像与背景图像之间存在镂空,如图22所示,电子设备还可以利用镂空边缘处的背景图像数据对镂空部分进行插值处理,以补全镂空部分,以得到修复后的图像。其中,图22中的(a)图示出了进行插值处理之前存在镂空的情况,图22中的(b)图示出了进行插值处理之后修复了镂空的情况。Specifically, the electronic device may fuse the color image and the background image of the photographed person after the body treatment. During image fusion, in order to avoid the hollow between the limb image and the background image after the body treatment, as shown in FIG. 22, the electronic device can also use the background image data at the hollow edge to interpolate the hollow part to compensate Fully hollow out the part to get the restored image. Among them, (a) in FIG. 22 shows a case where there is a hollow before the interpolation process is performed, and (b) in FIG. 22 shows a case where the hollow is repaired after the interpolation process is performed.
最后,电子设备可以在拍摄预览时,将修复后的图像更新显示在预览框中。该修复后的图像中包括的被拍摄人物的身体图像经过了美体处理,该身体图像所表现的体型相较于被拍摄人物的实际体型发生了体型美化。Finally, the electronic device can update and display the restored image in the preview box when shooting the preview. The body image of the photographed person included in the restored image is subjected to body treatment, and the body image represented by the body image is beautified compared to the actual body shape of the photographed person.
本申请实施例中,可以将3D摄像模组采集的被拍摄人物的图像(即前景图像)称为第一图像,可以将经过美体处理的被拍摄人物的图像称为第二图像。In the embodiment of the present application, the image of the photographed person (that is, the foreground image) collected by the 3D camera module may be referred to as a first image, and the image of the photographed person subjected to body treatment may be referred to as a second image.
电子设备可以根据第一美体参数对第一图像中被拍摄人物的第一身体部位的轮廓进行调整,得到第二图像中被拍摄人物的第一身体部位的轮廓。也即是说,第二图像中所述被拍摄人物的第一身体部位的轮廓可以被根据第一美体参数进行了调整。The electronic device may adjust the contour of the first body part of the photographed person in the first image according to the first body parameters, to obtain the contour of the first body part of the photographed person in the second image. That is to say, the contour of the first body part of the photographed person in the second image can be adjusted according to the first body parameters.
电子设备可以根据第二美体参数对第一图像中被拍摄人物的第二身体部位的轮廓进行调整,得到第二图像中被拍摄人物的第二身体部位的轮廓。也即是说,所述第二图像中所述被拍摄人物的第二身体部位的轮廓被根据第二美体参数进行了调整。The electronic device may adjust the contour of the second body part of the person in the first image according to the second body parameters to obtain the contour of the second body part of the person in the second image. That is to say, the outline of the second body part of the photographed person in the second image is adjusted according to the second body parameters.
其中,所述第一部位与所述第二部位可以不同,所述第一美体参数与所述第二美体参数可以不同。也即是说,电子设备可以采用不同的美体参数对第一图像中不同身体部位的轮廓进行调整。Wherein, the first part and the second part may be different, and the first body parameter and the second body parameter may be different. That is to say, the electronic device can adjust the contours of different body parts in the first image by using different body parameters.
下面说明电子设备对被拍摄人物的身体图像进行美体处理的两种实现方式。The following describes two implementation manners in which the electronic device performs body treatment on the body image of the photographed person.
美体处理方式1 Body treatment 1
电子设备可以根据已选定的美体级别(用户选择的美体级别或默认的美体级别)对应的美体参数对被拍摄人物的身体图像进行美体处理。UI实施例可参考图4A。The electronic device may perform body treatment on the body image of the photographed person according to the body treatment parameters corresponding to the selected body treatment level (the body treatment level selected by the user or the default body treatment level). For an embodiment of the UI, refer to FIG. 4A.
假设已选定的美体级别对应的美体参数可以如表1示例性所示。It is assumed that the beauty parameters corresponding to the selected beauty level can be exemplarily shown in Table 1.
身体部位body parts 美体参数Body parameters 体型美化Beautify
腿部Legs 0.10.1 拉长腿部Elongated legs
肚子belly -0.05-0.05 瘦肚子Thin belly
肩部Shoulder 0.30.3 扩宽肩部Widen shoulders
腰部waist -0.1-0.1 瘦腰Thin waist
整个身体(不包括头部)Whole body (excluding head) -0.09-0.09 全身瘦Thin body
表1Table 1
其中,腿部对应的美体参数的取值0.1是正值,可表示对腿部进行拉长处理;该美体参数的取值0.1还可表示腿部的拉长程度,取值越大可表示腿部的拉长程度越大。例如0.1可以表示将腿部拉长10%。示例仅仅是本申请实施例的一种实现方式,不应构成限定。Among them, the value of the body parameter corresponding to the leg 0.1 is a positive value, which can indicate that the leg is elongated; the value of the body parameter 0.1 can also indicate the length of the leg, and the larger the value, the leg The greater the elongation of the department. For example, 0.1 can mean stretching the leg by 10%. The example is only an implementation manner of the embodiment of the present application, and should not constitute a limitation.
其中,肚子对应的美体参数的取值-0.05是负值,可表示进行瘦肚子处理;该美体参数的取值-0.05的绝对值还可表示瘦肚子的程度,绝对值越大可表示瘦肚子的程度越大。例如-0.05可以表示将肚子变瘦5%。示例仅仅是本申请实施例的一种实现方式,不应构成限定。Among them, the value of the body parameters corresponding to the belly -0.05 is a negative value, which can indicate thin stomach treatment; the absolute value of the value of the body parameters -0.05 can also indicate the degree of thin stomach, and the larger the absolute value, the thin stomach The greater the degree. For example, -0.05 can mean that the belly is thinned by 5%. The example is only an implementation manner of the embodiment of the present application, and should not constitute a limitation.
其中,肩部对应的美体参数的取值0.3是正值,可表示对肩部进行扩宽处理;该美体参数的的取值0.3还可表示肩部的扩宽程度,取值越大可表示肩部的扩宽程度越大。例如0.3可以表示将肩部扩宽30%。示例仅仅是本申请实施例的一种实现方式,不应构成限定。Among them, the value of the body-body parameter corresponding to the shoulder is 0.3, which can indicate that the shoulder is widened; the value of the body-body parameter of 0.3 can also indicate the degree of shoulder widening, and the larger the value, the greater the value The greater the width of the shoulder. For example, 0.3 may indicate a 30% widening of the shoulder. The example is only an implementation manner of the embodiment of the present application, and should not constitute a limitation.
其中,腰部对应的美体参数的取值-0.1是负值,可表示进行瘦腰处理;该美体参数的取值-0.1的绝对值还可表示瘦腰的程度,绝对值越大可表示瘦腰的程度越大。例如-0.1可以表示将腰部变瘦10%。示例仅仅是本申请实施例的一种实现方式,不应构成限定。Among them, the value of the body parameter corresponding to the waist -0.1 is a negative value, which can indicate thin waist treatment; the absolute value of the value of the body parameter -0.1 can also indicate the degree of thin waist, and the larger the absolute value, the thin waist The greater the degree. For example, -0.1 can mean thinning the waist by 10%. The example is only an implementation manner of the embodiment of the present application, and should not constitute a limitation.
其中,全身对应的美体参数的取值-0.09是负值,可表示进行整个身体的瘦身处理;该美体参数的取值-0.09的绝对值还可以表示瘦身的程度。例如0.1可以表示将身体变瘦10%。示例仅仅是本申请实施例的一种实现方式,不应构成限定。Among them, the value of the body-body parameter corresponding to the whole body -0.09 is a negative value, which can indicate that the whole body is thinned; the absolute value of the body-body parameter -0.09 can also indicate the degree of weight loss. For example, 0.1 can mean 10% thinner body. The example is only an implementation manner of the embodiment of the present application, and should not constitute a limitation.
从表1可以看出,特定美体级别对应的美体参数可以是一个美体参数集合,可以包括各身体部位各自对应的美体参数。在一些实施例中,该美体参数集合中的部分美体参数可以是无效的。例如当(通过神经网络算法)识别出被拍摄人物为孕妇时,电子设备100可以将瘦肚子对应的美体参数置为无效(如取值置为0),即不对第一图像中孕妇的肚子轮廓进行调整,使得第二图像中被拍摄人物的肚子的轮廓与第一图像中被拍摄人物的肚子的轮廓一致,以保留孕妇特征。表1仅仅示例性示出了美体参数的一种实现,不限于此,美体参数还可以包括更多或更少参数,或者其他不同的参数。As can be seen from Table 1, the body parameters corresponding to the specific body level may be a set of body parameters, which may include the body parameters corresponding to each body part. In some embodiments, some body parameters in the set of body parameters may be invalid. For example, when the person to be photographed is identified as a pregnant woman (through a neural network algorithm), the electronic device 100 may invalidate the body parameters corresponding to the thin belly (for example, the value is set to 0), that is, the contour of the pregnant woman’s belly in the first image is not Make adjustments so that the outline of the belly of the person photographed in the second image matches the outline of the belly of the person photographed in the first image to preserve the characteristics of the pregnant woman. Table 1 only exemplarily shows an implementation of body-body parameters, which is not limited thereto. The body-body parameters may also include more or less parameters, or other different parameters.
本申请中,美体处理是指对被拍摄人物的身体的彩色图像进行处理。结合表1示例性所示的美体参数,电子设备100可以执行下述一项或几项美体处理。In the present application, the body treatment refers to processing the color image of the body of the person being photographed. With reference to the body parameters exemplarily shown in Table 1, the electronic device 100 may perform one or more of the following body treatments.
A.电子设备100可以对人物411的腿部图像进行下述美体处理以实现拉长腿部的体型美化:首先在3D摄像模组193采集的图像中,根据腿部对应的参数值0.1以及在S106中已确定的被拍摄人物的实际的腿部长度,确定膝点、脚点这些骨骼点各自的目标位置;然后对人物411的腿部图像进行拉伸处理,使得腿部图像在拉伸处理后膝点、脚点这些骨骼点能够处于各自的目标位置。这样腿部图像在拉伸处理后所表现的人物411的腿部相较于人物411的实际腿部更长。A. The electronic device 100 can perform the following body treatment on the leg image of the person 411 to achieve the beautification of the elongated leg: First, in the image collected by the 3D camera module 193, according to the parameter value 0.1 corresponding to the leg and the The actual leg length of the photographed person determined in S106, and determine the respective target positions of the skeletal points of the knee point and the foot point; then stretch the leg image of the person 411, so that the leg image is stretched Skeletal points such as the back knee point and the foot point can be at their respective target positions. In this way, the legs of the person 411 represented by the leg image after the stretching process are longer than the actual legs of the person 411.
B.电子设备100可以对人物411的肚子图像进行下述美体处理以实现瘦肚子的体型美化:对人物411的肚子图像进行图像压缩处理,使得处理后的肚子图像所表现的肚子相较于人物411的实际肚子更细(或更窄);对人物411的肚子图像加阴影,使得处理后的肚子图像所表现的肚子相较于人物411的实际肚子更平坦,即可以降低肚子的突起程度。其中,肚子对应的美体参数的值-0.05以及在S106中已确定的被拍摄人物的肚子的实际轮廓、深度值,可以用来确定肚子图像要被压缩的范围以及要被压缩到的目标位置,参数值-0.05还可以用来确定肚子图像加阴影的图像范围以及阴影的亮暗。这样,肚子图像在处理后所表现的肚子相较于 人物411的实际肚子更瘦(更窄更平坦)。B. The electronic device 100 can perform the following body treatment on the belly image of the person 411 to realize the slimming of the belly: perform image compression processing on the belly image of the person 411, so that the belly expressed by the processed belly image is compared with the person The actual belly of 411 is thinner (or narrower); the belly image of the person 411 is shaded, so that the belly expressed by the processed belly image is flatter than the actual belly of the person 411, that is, the degree of protrusion of the belly can be reduced. Among them, the value of the body parameter corresponding to the belly -0.05 and the actual contour and depth values of the belly of the person to be photographed determined in S106 can be used to determine the range of the belly image to be compressed and the target position to be compressed, The parameter value -0.05 can also be used to determine the image range of the belly image plus shadow and the brightness of the shadow. In this way, the belly of the belly image after the processing is thinner (narrower and flatter) than the actual belly of the person 411.
C.电子设备100可以对人物411的肩部图像进行下述美体处理以实现扩宽肩部的体型美化:首先在3D摄像模组193采集的图像中,根据扩宽肩部对应的美体参数的值0.3以及在S106中已确定的肩部宽度,确定左肩点、右肩点各自的目标位置;然后对人物411的肩部图像进行拉伸处理,使得肩部图像在拉伸处理后左肩点、右肩点能够处于各自的目标位置。这样肩部图像在拉伸处理后所表现的人物411的肩部相较于人物411的实际肩部更宽。C. The electronic device 100 can perform the following body treatment on the shoulder image of the person 411 to achieve the beautification of the widened shoulder: First, in the image collected by the 3D camera module 193, according to the body parameters corresponding to the widened shoulder The value 0.3 and the shoulder width determined in S106 determine the respective target positions of the left shoulder point and the right shoulder point; then the shoulder image of the person 411 is stretched so that the left shoulder point, The right shoulder point can be at its respective target position. In this way, the shoulder of the person 411 expressed by the shoulder image after the stretching process is wider than the actual shoulder of the person 411.
D.电子设备100可以对人物411的腰部图像进行下述美体处理以实现瘦腰的体型美化:对人物411的对腰部图像的中间部分进行压缩处理,使得图像处理后的腰部图像所表现的腰部比人物411的实际腰部更细。其中,腰部对应的美体参数的值-0.1以及在S106中已确定的腰部轮廓可以用来确定腰部图像要被压缩的范围以及要被压缩到的目标位置。D. The electronic device 100 can perform the following body treatment on the waist image of the person 411 to realize the slimming of the waist: perform a compression process on the middle part of the waist image of the person 411, so that the waist represented by the image-processed waist image Thinner than the actual waist of character 411. The value of the body parameter corresponding to the waist-0.1 and the waist contour determined in S106 can be used to determine the range of the waist image to be compressed and the target position to be compressed.
E.电子设备100可以对人物411的腰部图像进行下述美体处理以实现瘦腰的体型美化:对人物411的整个身体的彩色图像进行压缩处理,其中人物411的脸部图像被排除在外,使得图像处理后的身体的彩色图像所表现的体型比人物411的实际体型更瘦。对人物411的整个身体的彩色图像进行压缩处理可具体包括对骨骼点之间的各个局部身体的彩色图像分别进行压缩处理,使得各个局部身体的彩色图像所表现的局部身体(如手臂、腿部、肚子、腰部等)都比人物411的实际的各个局部身体更瘦。可选的,还可以对某些局部身体的彩色图像(肚子图像)加阴影,以呈现更自然的瘦身效果。其中,全身对应的美体参数的值-0.09以及在S106中已确定的整个身体的轮廓可以用来确定整个身体的彩色图像或各个局部身体的彩色图像要被压缩的范围以及要被压缩到的目标位置。E. The electronic device 100 can perform the following body treatment on the waist image of the person 411 to achieve a slim waist beautification: perform a compression process on the color image of the entire body of the person 411, in which the face image of the person 411 is excluded so that The color image of the body after the image processing is thinner than the actual figure of the person 411. Compressing the color image of the entire body of the person 411 may specifically include separately compressing the color images of each partial body between the bone points, so that the partial body represented by the color image of each partial body (such as arms and legs) , Belly, waist, etc.) are thinner than the actual parts of the character 411. Optionally, the color image (belly image) of some partial bodies can also be shaded to present a more natural slimming effect. Among them, the value of the body parameter corresponding to the whole body -0.09 and the contour of the entire body determined in S106 can be used to determine the range and target of the color image of the entire body or the color image of each partial body to be compressed position.
不限于上述A-E所阐述的一些美体处理,电子设备100还可以执行其他美体处理以实现其他的体型美化。Not limited to some of the body treatments described in A-E above, the electronic device 100 may also perform other body treatments to achieve other body beautification.
在一些实施例中,各个美体级别对应的美体参数可以等于基础美体参数乘以权重。其具体实现可以包括:In some embodiments, the body parameters corresponding to each body level may be equal to the base body parameters multiplied by the weight. The specific implementation may include:
一种实现方式中,可以将美体级别10(即最高美体级别)对应的美体参数作为基础美体参数。其他美体级别对应的美体参数可以通过基础美体参数乘以权重得到,权重由美体级别确定。美体级别10对应的权重为1,其他美体级别对应的权重可以大于0且小于1。对于其他美体级别来说,美体级别越小,权重越小。例如,假设表1示出的是美体级别10对应美体参数,美体级别9对应的权重是0.9。那么,美体级别9对应的美体参数具体为:0.1*0.9(拉长腿部对应的美体参数)、-0.05*0.9(瘦肚子对应的美体参数)、0.3*0.9(扩宽肩部对应的美体参数)、-0.1*0.9(瘦腰对应的美体参数)、-0.09*0.9(全身瘦对应的美体参数)。In one implementation, the body parameters corresponding to the body level 10 (that is, the highest body level) may be used as the basic body parameters. The body parameters corresponding to other body levels can be obtained by multiplying the basic body parameters by the weight, and the weight is determined by the body level. The weight corresponding to the body level 10 is 1, and the weight corresponding to other body levels may be greater than 0 and less than 1. For other body-levels, the smaller the body-level, the smaller the weight. For example, suppose that Table 1 shows that the beauty level 10 corresponds to the beauty parameters, and the weight corresponding to the beauty level 9 is 0.9. Then, the body parameters corresponding to body level 9 are specifically: 0.1*0.9 (body parameters corresponding to elongated legs), -0.05*0.9 (body parameters corresponding to thin stomachs), 0.3*0.9 (body corresponding to widened shoulders) Parameter), -0.1*0.9 (body parameters corresponding to thin waist), -0.09*0.9 (body parameters corresponding to thin body).
另一种实现方式中,可以将美体级别1对应的美体参数作为基础美体参数。其他美体级别对应的美体参数可以通过基础美体参数乘以权重得到,权重由美体级别确定。美体级别1对应的权重为1,其他美体级别对应的权重可以大于1。对于其他美体级别来说,美体级别越大,权重越大。例如,假设表1示出的是美体级别1对应美体参数,美体级别5对应的美体权重为1.2。那么美体级别5对应的美体参数具体为:0.1*1.2(拉长腿部对应的美体参数)、-0.05*1.2(瘦肚子对应的美体参数)、0.3*1.2(扩宽肩部对应的美体参数)、-0.1*1.2(瘦腰对应的美体参数)、-0.09*1.2(全身瘦对应的美体参数)。In another implementation manner, the body parameters corresponding to the body level 1 may be used as the basic body parameters. The body parameters corresponding to other body levels can be obtained by multiplying the basic body parameters by the weight, and the weight is determined by the body level. The weight corresponding to body level 1 is 1, and the weight corresponding to other body levels may be greater than 1. For other beauty levels, the greater the body level, the greater the weight. For example, suppose that Table 1 shows that the beauty level 1 corresponds to the beauty parameters, and the beauty level 5 corresponds to the beauty weight 1.2. Then the body parameters corresponding to body level 5 are: 0.1*1.2 (body parameters corresponding to elongated legs), -0.05*1.2 (body parameters corresponding to thin belly), 0.3*1.2 (body parameters corresponding to widened shoulders) ), -0.1*1.2 (body parameters corresponding to thin waist), -0.09*1.2 (body parameters corresponding to thin body).
不限于基础美体参数乘以权重的这种方式,各个美体级别对应的美体参数也可以分别被预先配置,相互之间可以不具有权重表现的倍数关系。本申请对于如何规定各个美体级别对 应的美体参数不做限制。It is not limited to the method of multiplying the basic body parameters by the weight, and the body parameters corresponding to each body level may also be pre-configured separately, and may not have a multiple relationship of weight expression. This application does not limit how to specify the body parameters corresponding to each body level.
在一些实施例中,在已选定的美体级别下,用于对被拍摄人物的身体的彩色图像进行美体处理的美体参数还可以和被拍摄人物的性别、年龄等特征有关。男性对应的美体参数和女性对应的美体参数可以存在一些差异。因为男性的体型美化需求和女性的体型美化需求通常是有区别的。例如男性更细喜欢宽阔的肩部,女性更喜欢较窄的肩部,那么男性对应的扩宽肩部的美体参数的取值可以比女性对应的扩宽肩部的美体参数的取值大。又例如,女性比男性更喜欢纤细腰部,那么女性的瘦腰对应的美体参数的绝对值可以男性的瘦腰对应的美体参数的绝对值大。可选的,不同年龄段的人对应的美体参数也可以存在一些差异。因为不同年龄段的人的体型美化需求也可以是有区别的。这样可实现在预览框301中对不同性别、年龄等的被拍摄人物进行区别化美体,达到更好的美体摄像效果。本申请对如何根据被拍摄人物的性别、年龄等特征而区别化规定美体参数不做限制。In some embodiments, at the selected body contour level, the body contour parameters used for body contour processing on the color image of the photographed person's body may also be related to the gender, age, and other characteristics of the photographed person. There may be some differences between the body parameters corresponding to men and the body parameters corresponding to women. Because men's body beautification needs and women's body beautification needs are usually different. For example, men prefer thinner shoulders and women prefer narrower shoulders. Then, the body parameters of widened shoulders corresponding to men may have larger values than those of women. For another example, women prefer slim waists more than men, then the absolute value of body parameters corresponding to women's thin waist may be greater than the absolute value of body parameters corresponding to men's thin waist. Optionally, there may be some differences in body parameters corresponding to people of different ages. Because the beautification needs of people of different ages can also be different. In this way, it is possible to differentiate the body of the person being photographed of different genders, ages, etc. in the preview box 301, and to achieve a better body-body imaging effect. This application does not limit how to differentiate the body parameters according to the characteristics of the person being photographed, such as gender and age.
在一些实施例中,在已选定的美体级别下,用于对被拍摄人物的身体的彩色图像进行美体处理的美体参数还可以和被拍摄人物的实际体型有关。例如,胖人对应的美体参数可以通过表1示例性所示的美体参数乘以权重1.2得到,以达到增强体型美化的目的,瘦人对应的美体参数可以通过表1示例性所示的美体参数乘以权重0.8得到,以达到减弱体型美化的目的。这样可实现在预览框301中对不同体型的被拍摄人物进行区别化美体,达到更好的美体摄像效果。不限于示例提供的这种乘以权重的方法,不同体型的人对应的美体参数也可以分别被预先配置,相互之间可以不具有权重表现的倍数关系。本申请对于如何规定不同体型的人对应的美体参数不做限制。In some embodiments, at the selected beauty level, the beauty parameters used to perform the beauty treatment on the color image of the photographed person's body may also be related to the actual figure of the photographed person. For example, the body parameters corresponding to the fat person can be obtained by multiplying the body parameters exemplarily shown in Table 1 by a weight of 1.2 to achieve the purpose of enhancing body beautification, and the body parameters corresponding to the thin person can be obtained through the body parameters exemplarily shown in Table 1. It is obtained by multiplying the weight by 0.8 to achieve the purpose of weakening the beautification. In this way, in the preview box 301, the body of the person with different body types can be differentiated to achieve a better body-effect camera effect. Not limited to the method of multiplying the weight provided by the example, the body-building parameters corresponding to people of different body types may also be pre-configured separately, and there may not be a multiple relationship of weight expression among each other. This application does not limit how to define body parameters corresponding to people of different body types.
美体处理方式2 Body treatment 2
电子设备可以利用已选定的体型模板(用户选择的体型模板或默认的体型模板)对被拍摄人物的彩色图像进行美体处理。UI实施例可参考图11A-图11E。The electronic device may use the selected body shape template (the body shape template selected by the user or the default body shape template) to perform beauty treatment on the color image of the photographed person. For UI embodiments, reference may be made to FIGS. 11A-11E.
在方式2中,体型模板的姿态和被拍摄对象的姿态可能不同。被拍摄对象的姿态可以根据被拍摄人物的彩色图像、被拍摄人物的深度信息确定。此时,电子设备可以通过相似变换将体型模板的姿态变换为被拍摄人物的姿态。具体的,电子设备可以比较这两个姿态的骨骼点在二维空间中的位移,以及被拍摄人物的骨骼点连接的两段肢体的相对夹角。然后,电子设备可以将体型模板的骨骼点以及骨骼点连接的肢体进行旋转或平移,使得变换后的体型模板的姿态和被拍摄对象的姿态一致。In method 2, the posture of the figure template and the posture of the subject may be different. The posture of the photographed object can be determined according to the color image of the photographed person and the depth information of the photographed person. At this time, the electronic device can transform the posture of the figure template into the posture of the photographed person through similar transformation. Specifically, the electronic device can compare the displacement of the bone points of the two poses in the two-dimensional space, and the relative angle between the two limbs connected by the bone points of the photographed person. Then, the electronic device can rotate or translate the bone points of the body template and the limbs connected to the bone points, so that the posture of the transformed body template is consistent with the posture of the object to be photographed.
在调整体型模板的姿态之后,电子设备可以将被拍摄人物的骨骼点和体型模板的骨骼点对齐,然后根据体型模板和被拍摄人物的肢体的轮廓差异,对被拍摄人物的肢体的图像进行拉伸处理(如拉长腿)或压缩处理(如瘦腿)。拉伸程度或压缩程度可以由已选定的体型模板下的美体级别确定。美体级别越高,拉伸程度或压缩程度越大。美体级别的选择可参考图11D-图11E实施例。例如,如图11E所示,当美体级别为10(最高美体级别)时,可以对被拍摄人物的肢体的图像进行拉伸处理(如拉长腿)或压缩处理(如瘦腿),使得拉伸或压缩后的肢体的图像表现的肢体的轮廓和体型模板的肢体的轮廓一致。After adjusting the posture of the body template, the electronic device can align the bone points of the person being photographed with the bone points of the body template, and then pull the image of the body of the person being photographed according to the difference between the body template and the contour of the body of the person being photographed Stretching treatment (such as elongated legs) or compression treatment (such as thin legs). The degree of stretch or compression can be determined by the body level under the selected body template. The higher the body level, the greater the degree of stretch or compression. For the selection of the beauty level, reference may be made to the embodiments in FIGS. 11D-11E. For example, as shown in FIG. 11E, when the body level is 10 (the highest body level), the image of the person’s limb can be stretched (such as elongated legs) or compressed (such as skinny legs) so that The contour of the limb represented by the image of the stretched or compressed limb is consistent with the contour of the limb of the body template.
在一些实施例中,在通过3D摄像模组采集彩色图像和深度信息之后,电子设备可以进行图像预处理。该图像预处理可包括对彩色图像和深度信息进行图像增强、深度补全、去噪等 预处理操作。其中,图像增强可以是针对暗光或低光照环境做图像的亮度增强。深度补全可以是指对深度图中存在的空洞做平滑处理。去噪可以指是将深度图里面的一些噪声祛除,避免深度值上面的噪声影响到骨骼点深度的计算。In some embodiments, after acquiring color images and depth information through the 3D camera module, the electronic device may perform image preprocessing. The image pre-processing may include pre-processing operations such as image enhancement, depth complementation, and denoising of color images and depth information. Among them, the image enhancement may be to enhance the brightness of the image for a dark or low-light environment. Depth completion may refer to smoothing the holes in the depth map. Denoising can refer to removing some noise in the depth map to avoid the noise above the depth value from affecting the calculation of the bone point depth.
在一些可能的情况下,电子设备在S105中检测到被拍摄人物和电子设备所在平面之间的夹角过大,超过预设角度阈值(如65°)。针对这种情况,电子设备可以不对3D摄像头采集到的彩色图像进行透视变换,也可以不对被拍摄人物的彩色图像进行美体处理。另外,电子设备还可以在预览框301中输出提示信息,以提示用户这种情况不支持进行美体处理。In some possible cases, the electronic device detects in S105 that the angle between the person being photographed and the plane on which the electronic device is located is too large and exceeds a preset angle threshold (such as 65°). In response to this situation, the electronic device may not perform perspective transformation on the color image collected by the 3D camera, and may not perform body treatment on the color image of the photographed person. In addition, the electronic device can also output prompt information in the preview box 301 to remind the user that the body treatment is not supported in this case.
图16实施例描述的拍照预览方法可实现在拍摄预览时对预览框中显示的被拍摄人物的身体图像进行调整,使得调整后的身体图像表现的体型相较于被拍摄人物的实际体型发生了体型美化,用户操作简单而直观,可有效提高电子设备的使用率。The photo preview method described in the embodiment of FIG. 16 can realize the adjustment of the body image of the photographed person displayed in the preview frame during shooting preview, so that the body shape of the adjusted body image occurs compared with the actual body shape of the photographed person Beautify the shape, the user's operation is simple and intuitive, which can effectively improve the utilization rate of electronic equipment.
可以理解的,电子设备在第一用户界面中所检测到的用户操作以及相应的响应,可参考前述UI实施例,这里不再赘述。图16方法实施例中未提及的内容可参考前述UI实施例,这里不再赘述。It can be understood that, for the user operation and the corresponding response detected by the electronic device in the first user interface, reference may be made to the foregoing UI embodiment, and details are not described herein again. For content not mentioned in the method embodiment of FIG. 16, reference may be made to the foregoing UI embodiment, and details are not described herein again.
图23结合3D摄像模组193示出了电子设备包括的功能模块的架构图。下面展开:FIG. 23 shows a structural diagram of a functional module included in an electronic device in conjunction with a 3D camera module 193. Expand below:
3D摄像模组193可用于采集彩色图像和深度信息。其中,彩色图像可包括被拍摄人物的彩色图像和背景的彩色图像。深度信息可包括被拍摄人物的深度信息和背景的深度信息。被拍摄人物的彩色图像可包括身体图像和脸部图像。具体实现中,3D摄像模组193可由彩色摄像模组和深度摄像模组组成,深度摄像模组可以是TOF深度摄像模组或结构光摄像模组。The 3D camera module 193 can be used to collect color images and depth information. The color image may include the color image of the person to be photographed and the color image of the background. The depth information may include depth information of the person being photographed and depth information of the background. The color image of the photographed person may include a body image and a face image. In a specific implementation, the 3D camera module 193 may be composed of a color camera module and a depth camera module. The depth camera module may be a TOF depth camera module or a structured light camera module.
人体骨骼点定位算法模块可用于利用被拍摄人物的彩色图像和人体骨骼点定位算法,识别出被拍摄人物的骨骼点。人体骨骼点定位算法模块的具体实现可参考图16方法实施例中的S103,这里不再赘述。The human skeleton point positioning algorithm module can be used to identify the skeleton point of the photographed person by using the color image of the photographed person and the human skeleton point positioning algorithm. For specific implementation of the human bone point positioning algorithm module, reference may be made to S103 in the method embodiment of FIG. 16, and details are not described herein again.
骨骼点深度获取模块可用于根据人体骨骼点定位算法模块识别出的被拍摄人物的骨骼点的2D坐标以及3D摄像模组193采集的被拍摄人物的深度信息,确定出被拍摄人物的骨骼点的深度值。该骨骼点深度获取模块的具体实现可参考图16方法实施例中的S104,这里不再赘述。The skeletal point depth acquisition module can be used to determine the skeletal point of the photographed person based on the 2D coordinates of the skeletal point of the photographed person identified by the human skeletal point positioning algorithm module and the depth information of the photographed person collected by the 3D camera module 193 Depth value. For specific implementation of the bone point depth acquisition module, reference may be made to S104 in the method embodiment of FIG. 16, and details are not described herein again.
骨骼长度计算模块可用于根据骨骼点深度获取模块确定的各个骨骼点的深度值以及人体骨骼点定位算法模块识别出的被拍摄人物的骨骼点的2D坐标确定骨骼点之间的骨骼的长度。骨骼长度计算模块的具体实现可参考图16方法实施例中的S106,这里不再赘述。The bone length calculation module can be used to determine the length of the bone between the bone points according to the depth value of each bone point determined by the bone point depth acquisition module and the 2D coordinates of the bone point of the photographed person identified by the human bone point positioning algorithm module. For specific implementation of the bone length calculation module, reference may be made to S106 in the method embodiment of FIG. 16, and details are not described here.
透视变换模块可用于骨骼点深度获取模块确定的各个骨骼点的深度值以及骨骼长度计算模块确定的骨骼的长度,确定被拍摄人物和电子设备所在平面之间的夹角α,利用该夹角计算得到透视变换矩阵,最后利用透视变换矩阵对被拍摄人物的彩色图像进行透视变换。可选的,透视变换模块还可以根据电子设备的俯仰角确定夹角α。透视变换模块的具体实现可参考图16方法实施例中的S105,这里不再赘述。The perspective transformation module can be used to determine the depth value of each bone point determined by the bone point depth acquisition module and the length of the bone determined by the bone length calculation module, to determine the angle α between the photographed person and the plane where the electronic device is located, and use this angle to calculate The perspective transformation matrix is obtained, and finally the perspective transformation matrix is used to perform perspective transformation on the color image of the photographed person. Optionally, the perspective transformation module may also determine the angle α according to the pitch angle of the electronic device. For specific implementation of the perspective transformation module, reference may be made to S105 in the method embodiment of FIG. 16, and details are not described herein again.
人像分割模块可用于将透视变换模块进行透视变换得到的彩色图像分割成被拍摄人物的彩色图像(即前景图像)和背景图像。人像分割模块的具体实现可参考图16方法实施例中的S107,这里不再赘述。The portrait segmentation module can be used to segment the color image obtained by the perspective transformation module into a color image (ie, a foreground image) and a background image of the person being photographed. For the specific implementation of the portrait segmentation module, reference may be made to S107 in the method embodiment of FIG. 16, and details are not described here.
美体处理模块可用于对被拍摄人物的透视变换后的身体图像进行处理,如图像拉伸、图 像压缩、打阴影等,使得处理后的身体图像表现的体型相较于被拍摄人物的实际体型发生了体型美化。在一种实现方式中,美体处理模块可用于根据已选定的美体级别(用户选择的美体级别或默认的美体级别)对应的美体参数对被拍摄人物的身体图像进行美体处理。美体参数可由美体参数确定模块确定出。在另一种实现方式中,美体处理模块可用于利用已选定的体型模板(用户选择的体型模板或默认的体型模板)对被拍摄人物的彩色图像进行美体处理。美体处理模块的具体实现可参考图16方法实施例中的S108,这里不再赘述。The body processing module can be used to process the body image of the person after the perspective transformation, such as image stretching, image compression, shadowing, etc., so that the body shape of the processed body image occurs compared to the actual body shape of the person To beautify the body. In one implementation, the body treatment module may be used to perform body treatment on the body image of the photographed person according to the body treatment parameters corresponding to the selected body treatment level (user-selected body treatment level or default body treatment level). The beauty parameters can be determined by the beauty parameter determination module. In another implementation manner, the body treatment module may be used to perform body treatment on the color image of the photographed person using the selected body template (user-selected body template or default body template). For a specific implementation of the body treatment module, reference may be made to S108 in the method embodiment of FIG. 16, and details are not described herein again.
图像修复模块可用于将经过美体处理后的被拍摄人物的彩色图像和背景图像进行融合。在进行图像融合时,为了避免经过美体处理后的肢体图像与背景图像之间存在镂空,图像修复模块还可用于利用镂空边缘处的背景图像数据对镂空部分进行插值处理,以补全镂空部分,以得到修复后的图像。The image restoration module can be used to fuse the color image and background image of the photographed person after body treatment. During image fusion, in order to avoid the hollow between the limb image and the background image after the body treatment, the image repair module can also be used to interpolate the hollow part using the background image data at the hollow edge to complete the hollow part, To get the repaired image.
图像修复模块最终输出的图像可以更新显示在第一用户界面的预览框中。The image finally output by the image repair module can be updated and displayed in the preview box of the first user interface.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only the specific implementation of this application, but the scope of protection of this application is not limited to this, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in this application. It should be covered by the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (17)

  1. 一种电子设备的拍照预览方法,其特征在于,所述电子设备具有3D摄像模组,所述方法包括:An electronic device photo preview method, characterized in that the electronic device has a 3D camera module, the method includes:
    开启所述3D摄像模组;Turn on the 3D camera module;
    通过所述3D摄像模组采集被拍摄人物的第一图像;Collecting the first image of the person being photographed through the 3D camera module;
    显示第一图形用户界面,所述第一图形用户界面包括预览框,所述预览框中显示有所述被拍摄人物的第一图像;Displaying a first graphical user interface, where the first graphical user interface includes a preview box, and the preview box displays a first image of the photographed person;
    检测到第一用户操作,响应于所述第一用户操作,在所述第一图形用户界面的预览框中显示所述被拍摄人物的第二图像;其中,所述第二图像中所述被拍摄人物的第一身体部位的轮廓被根据第一美体参数进行了调整,所述第二图像中所述被拍摄人物的第二身体部位的轮廓被根据第二美体参数进行了调整,所述第一部位与所述第二部位不同,所述第一美体参数与所述第二美体参数不同。A first user operation is detected, and in response to the first user operation, a second image of the photographed person is displayed in the preview box of the first graphical user interface; The contour of the first body part of the photographed person is adjusted according to the first body parameters, and the contour of the second body part of the photographed person in the second image is adjusted according to the second body parameters. One part is different from the second part, and the first body parameters are different from the second body parameters.
  2. 如权利要求1所述的方法,其特征在于,所述第一图形用户界面还包括第一控件,所述第一用户操作为作用于所述第一控件的用于选择美体级别的用户操作;所述第一用户操作选择的美体级别越高,所述第二图像中所述第一部位的轮廓与所述第一图像中所述第一部位的轮廓差距越大,所述第二图像中所述第二部位的轮廓与所述第一图像中所述第二部位的轮廓差距越大。The method according to claim 1, wherein the first graphical user interface further comprises a first control, and the first user operation is a user operation for selecting a body level that acts on the first control; The higher the beauty level selected by the first user operation, the greater the gap between the outline of the first part in the second image and the outline of the first part in the first image, in the second image The greater the difference between the outline of the second part and the outline of the second part in the first image.
  3. 如权利要求2所述的方法,其特征在于,所述第一用户操作包括:作用于所述第一控件的第二用户操作,所述第二用户操作用于提高美体级别;The method of claim 2, wherein the first user operation comprises: a second user operation acting on the first control, and the second user operation is used to increase a body level;
    所述响应于所述第一用户操作,在所述第一图形用户界面的预览框中显示所述被拍摄人物的第一图像,具体包括:The displaying the first image of the photographed person in the preview box of the first graphical user interface in response to the first user operation specifically includes:
    响应于所述第二用户操作,刷新所述预览框中的显示内容;刷新后的所述预览框中所述第二图像中所述第一部位的轮廓相较于刷新前的所述预览框中所述第二图像中所述第一部位的轮廓,与所述第一图像中所述第一部位的轮廓的差距更大;刷新后的所述预览框中所述第二图像中所述第二部位的轮廓相较于刷新前的所述预览框中所述第二图像中所述第二部位的轮廓,与所述第一图像中所述第二部位的轮廓的差距更大。In response to the second user operation, refresh the display content in the preview box; the outline of the first part in the second image in the preview box after refreshing is compared with the preview box before refreshing The outline of the first part in the second image is larger than the outline of the first part in the first image; the second image in the preview frame after the refresh The contour of the second part is larger than the contour of the second part in the second image in the preview frame before refreshing, and the gap between the contour of the second part in the first image is greater.
  4. 如权利要求2-3中任一项所述的方法,其特征在于,所述第一用户操作包括:作用于所述第一控件的第三用户操作,所述第三用户操作用于降低美体级别;The method according to any one of claims 2-3, wherein the first user operation comprises: a third user operation acting on the first control, the third user operation is used to reduce the body level;
    所述响应于所述第一用户操作,在所述第一图形用户界面的预览框中显示所述被拍摄人物的第一图像,具体包括:The displaying the first image of the photographed person in the preview box of the first graphical user interface in response to the first user operation specifically includes:
    响应于所述第三用户操作,刷新所述预览框中的显示内容;刷新后的所述预览框中所述第二图像中所述第一部位的轮廓相较于刷新前的所述预览框中所述第二图像中所述第一部位的轮廓,与所述第一图像中所述第一部位的轮廓的差距更小;刷新后的所述预览框中所述第二图像中所述第二部位的轮廓相较于刷新前的所述预览框中所述第二图像中所述第二部位的轮廓,与所述第一图像中所述第二部位的轮廓的差距更小。In response to the third user operation, refresh the display content in the preview box; the outline of the first part in the second image in the preview box after refreshing is compared with the preview box before refreshing The outline of the first part in the second image is smaller than the outline of the first part in the first image; the second image in the preview frame after the refresh The contour of the second part is smaller than the contour of the second part in the second image in the preview frame before refreshing, and the gap between the contour of the second part in the first image is smaller.
  5. 如权利要求1-4中任一项所述的方法,其特征在于,还包括:当检测到所述被拍摄人物为孕妇时,在所述预览框中显示提示信息,所述提示信息用于提示所述被拍摄人物为孕妇;所述第二图像中所述被拍摄人物的肚子的轮廓与所述第一图像中所述被拍摄人物的肚子的轮廓一致。The method according to any one of claims 1 to 4, further comprising: when it is detected that the photographed person is a pregnant woman, displaying prompt information in the preview box, the prompt information is used for It is suggested that the photographed person is a pregnant woman; the contour of the stomach of the photographed person in the second image is consistent with the contour of the stomach of the photographed person in the first image.
  6. 如权利要求1-5中任一项所述的方法,其特征在于,还包括:响应于检测到的第四用户操作,对所述第二图像中所述被拍摄人物的脸部皮肤的颜色值进行调整。The method according to any one of claims 1-5, further comprising: in response to the detected fourth user operation, the color of the face skin of the photographed person in the second image The value is adjusted.
  7. 如权利要求1-6中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1-6, further comprising:
    所述电子设备在所述预览框中显示第二控件;The electronic device displays a second control in the preview box;
    响应于检测到的在第二控件上按住不释放的用户操作,在所述预览框中显示所述第一图像;Displaying the first image in the preview box in response to the detected user operation of pressing and holding on the second control without releasing it;
    响应于检测到的释放第二控件的用户操作,在所述预览框中显示所述第二图像。In response to the detected user operation of releasing the second control, the second image is displayed in the preview box.
  8. 如权利要求1-7中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1-7, further comprising:
    在所述预览框中显示第一提示信息,第一提示信息用于提示所述第二图像中的所述第一部位的轮廓与所述第一图像中的所述第一部位的轮廓的差异、所述第二图像中的所述第二部位的轮廓与所述第一图像中的所述第二部位的轮廓的差异。Displaying first prompt information in the preview box, the first prompt information is used to prompt the difference between the contour of the first part in the second image and the contour of the first part in the first image 2. The difference between the outline of the second part in the second image and the outline of the second part in the first image.
  9. 如权利要求1-8中任一项所述的方法,其特征在于,所述第一图形用户界面还包括:拍摄控件;所述方法还包括:响应于检测到的作用于所述拍摄控件的用户操作,保存所述预览框中显示的所述第二图像。The method according to any one of claims 1-8, wherein the first graphical user interface further comprises: a shooting control; the method further comprises: in response to a detected action on the shooting control The user operates to save the second image displayed in the preview frame.
  10. 如权利要求9所述的方法,其特征在于,所述第一图形用户界面还包括:拍摄模式列表,所述拍摄模式列表包括多个拍摄模式选项;所述多个拍摄模式包括:第一拍摄模式选项和第二拍摄模式选项;The method of claim 9, wherein the first graphical user interface further comprises: a shooting mode list, the shooting mode list includes a plurality of shooting mode options; the plurality of shooting modes includes: a first shooting Mode options and second shooting mode options;
    当所述第一拍摄模式选项处于被选定状态时,所述拍摄控件具体用于监听触发拍照的用户操作,所述响应于检测到的作用于所述拍摄控件的用户操作,保存所述预览框中显示的所述第二图像,具体包括:响应于检测到的作用于所述拍摄控件的用户操作,将所述预览框中显示的所述第二图像保存为照片;When the first shooting mode option is in a selected state, the shooting control is specifically used to monitor a user operation that triggers a photograph, and the user operation that acts on the shooting control in response to the detection is saved in the preview The second image displayed in the frame specifically includes: in response to a detected user operation acting on the shooting control, saving the second image displayed in the preview frame as a photo;
    当所述第二拍摄模式选项处于被选定状态时,所述拍摄控件具体用于监听触发录像的用户操作,所述响应于检测到的作用于所述拍摄控件的用户操作,保存所述预览框中显示的所述第二图像,具体包括:响应于检测到的作用于所述拍摄控件的用户操作,将所述预览框中显示的所述第二图像保存为视频。When the second shooting mode option is in a selected state, the shooting control is specifically used to monitor a user operation that triggers recording, and the response to the detected user operation acting on the shooting control is to save the preview The second image displayed in the frame specifically includes: in response to the detected user operation acting on the shooting control, saving the second image displayed in the preview frame as a video.
  11. 如权利要求1-10中任一项所述的方法,其特征在于,在所述响应于所述第一用户操作,在所述第一图形用户界面的预览框中显示所述被拍摄人物的第二图像之前,还包括:基于所述被拍摄人物的图像识别出人体骨骼点。The method according to any one of claims 1-10, wherein, in response to the first user operation, the image of the person being photographed is displayed in a preview box of the first graphical user interface Before the second image, it further includes: identifying a human skeleton point based on the image of the photographed person.
  12. 如权利要求1-11中任一项所述的方法,其特征在于,在所述响应于所述第一用户操作,在所述第一图形用户界面的预览框中显示所述被拍摄人物的第二图像之前,还包括:确定所述被拍摄人物与所述电子设备所在平面之间的夹角,且所述夹角不超过预设角度阈值。The method according to any one of claims 1 to 11, wherein in response to the first user operation, the image of the photographed person is displayed in a preview box of the first graphical user interface Before the second image, the method further includes: determining an angle between the photographed person and the plane where the electronic device is located, and the angle does not exceed a preset angle threshold.
  13. 如权利要求12所述的方法,其特征在于,在所述响应于所述第一用户操作,在所述第一图形用户界面的预览框中显示所述被拍摄人物的第二图像之前,还包括:The method according to claim 12, wherein before the second image of the photographed person is displayed in the preview box of the first graphical user interface in response to the first user operation, include:
    根据所述所述被拍摄人物与所述电子设备所在平面之间的夹角确定透视变换矩阵;Determine a perspective transformation matrix according to the angle between the photographed person and the plane where the electronic device is located;
    根据所述透视变换矩阵对所述被拍摄人物的所述第一图像进行透视变换。Perform perspective transformation on the first image of the photographed person according to the perspective transformation matrix.
  14. 一种电子设备,包括3D摄像模组、显示屏、触摸传感器,存储器,一个或多个处理器,多个应用程序,以及一个或多个程序;其中所述一个或多个程序被存储在所述存储器中;其特征在于,所述一个或多个处理器在执行所述一个或多个程序时,使得所述电子设备实现如权利要求1至13任一项所述的方法。An electronic device includes a 3D camera module, a display screen, a touch sensor, a memory, one or more processors, multiple application programs, and one or more programs; wherein the one or more programs are stored in the The memory; characterized in that, when the one or more processors execute the one or more programs, the electronic device enables the electronic device to implement the method according to any one of claims 1 to 13.
  15. 一种计算机设备,包括存储器,处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时使得所述计算机设备实现如权利要求1至13任一项所述的方法。A computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, when the processor executes the computer program, the computer device is realized The method according to any one of claims 1 to 13.
  16. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求1至13任一项所述的方法。A computer program product containing instructions, characterized in that, when the computer program product runs on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 13.
  17. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1至13任一项所述的方法。A computer-readable storage medium including instructions, characterized in that when the instructions run on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 13.
PCT/CN2019/122516 2018-12-26 2019-12-03 Photo previewing method for electronic device, graphical user interface and electronic device WO2020134891A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811608420.2 2018-12-26
CN201811608420.2A CN109495688B (en) 2018-12-26 2018-12-26 Photographing preview method of electronic equipment, graphical user interface and electronic equipment

Publications (1)

Publication Number Publication Date
WO2020134891A1 true WO2020134891A1 (en) 2020-07-02

Family

ID=65712517

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/122516 WO2020134891A1 (en) 2018-12-26 2019-12-03 Photo previewing method for electronic device, graphical user interface and electronic device

Country Status (2)

Country Link
CN (1) CN109495688B (en)
WO (1) WO2020134891A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111861868A (en) * 2020-07-15 2020-10-30 广州光锥元信息科技有限公司 Image processing method and device for beautifying portrait in video
CN112380990A (en) * 2020-11-13 2021-02-19 咪咕文化科技有限公司 Picture adjusting method, electronic device and readable storage medium
CN112770058A (en) * 2021-01-22 2021-05-07 维沃移动通信(杭州)有限公司 Shooting method, shooting device, electronic equipment and readable storage medium
CN115225753A (en) * 2021-04-19 2022-10-21 华为技术有限公司 Shooting method, related device and system
CN115278060A (en) * 2022-07-01 2022-11-01 北京五八信息技术有限公司 Data processing method and device, electronic equipment and storage medium
EP4274217A4 (en) * 2020-12-30 2024-06-12 Vivo Mobile Communication Co Ltd Display control method and apparatus, electronic device, and medium

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495688B (en) * 2018-12-26 2021-10-01 华为技术有限公司 Photographing preview method of electronic equipment, graphical user interface and electronic equipment
CN114666435B (en) * 2019-04-19 2023-03-28 华为技术有限公司 Method for using enhanced function of electronic device, chip and storage medium
CN111866404B (en) * 2019-04-25 2022-04-29 华为技术有限公司 Video editing method and electronic equipment
CN110289072A (en) * 2019-05-10 2019-09-27 咪咕互动娱乐有限公司 Generation method, device, electronic equipment and the readable storage medium storing program for executing of body-building scheme
CN110264431A (en) * 2019-06-29 2019-09-20 北京字节跳动网络技术有限公司 Video beautification method, device and electronic equipment
CN110727488B (en) * 2019-09-09 2022-03-25 联想(北京)有限公司 Information processing method, electronic equipment and computer readable storage medium
CN110719455A (en) * 2019-09-29 2020-01-21 深圳市火乐科技发展有限公司 Video projection method and related device
CN110852958B (en) * 2019-10-11 2022-12-16 北京迈格威科技有限公司 Self-adaptive correction method and device based on object inclination angle
CN111064887A (en) * 2019-12-19 2020-04-24 上海传英信息技术有限公司 Photographing method of terminal device, terminal device and computer-readable storage medium
CN111107281B (en) * 2019-12-30 2022-04-12 维沃移动通信有限公司 Image processing method, image processing apparatus, electronic device, and medium
CN113382154A (en) * 2020-02-25 2021-09-10 荣耀终端有限公司 Human body image beautifying method based on depth and electronic equipment
CN111339971B (en) * 2020-03-02 2022-06-28 北京字节跳动网络技术有限公司 Human shoulder and neck processing method and device in video and electronic equipment
CN111402116A (en) * 2020-03-11 2020-07-10 北京字节跳动网络技术有限公司 Method and device for processing human waist body beautification in picture and electronic equipment
CN111311519A (en) * 2020-03-12 2020-06-19 北京字节跳动网络技术有限公司 Human waist body beautifying processing method and device in video and electronic equipment
CN111310749A (en) * 2020-03-23 2020-06-19 北京字节跳动网络技术有限公司 Human body hip beautifying processing method and device in video and electronic equipment
CN111405198A (en) * 2020-03-23 2020-07-10 北京字节跳动网络技术有限公司 Method and device for processing human chest body beautification in video and electronic equipment
CN111445405B (en) * 2020-03-24 2022-06-17 北京字节跳动网络技术有限公司 Human body shoulder and neck processing method and device in picture and electronic equipment
CN111445514A (en) * 2020-03-24 2020-07-24 北京字节跳动网络技术有限公司 Method and device for processing human body buttocks in picture and electronic equipment
CN111885333A (en) * 2020-06-15 2020-11-03 东方通信股份有限公司 Device and method for acquiring three-dimensional audio and video and motion gestures
CN112035195A (en) * 2020-07-30 2020-12-04 北京达佳互联信息技术有限公司 Application interface display method and device, electronic equipment and storage medium
CN112383713B (en) * 2020-11-13 2022-02-22 艾体威尔电子技术(北京)有限公司 Driving method for automatically loading human face MIPI or human face USB camera
CN112641441B (en) * 2020-12-18 2024-01-02 河南翔宇医疗设备股份有限公司 Posture evaluation method, system, device and computer readable storage medium
CN113489895B (en) * 2021-06-23 2022-05-31 荣耀终端有限公司 Method for determining recommended scene and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130141605A1 (en) * 2011-12-06 2013-06-06 Youngkoen Kim Mobile terminal and control method for the same
CN104159032A (en) * 2014-08-20 2014-11-19 广东欧珀移动通信有限公司 Method and device of adjusting facial beautification effect in camera photographing in real time
CN105227832A (en) * 2015-09-09 2016-01-06 厦门美图之家科技有限公司 A kind of self-timer method based on critical point detection, self-heterodyne system and camera terminal
CN106991654A (en) * 2017-03-09 2017-07-28 广东欧珀移动通信有限公司 Human body beautification method and apparatus and electronic installation based on depth
CN107077719A (en) * 2014-09-05 2017-08-18 波莱特股份有限公司 Perspective correction based on depth map in digital photograph
CN107124548A (en) * 2017-04-25 2017-09-01 深圳市金立通信设备有限公司 A kind of photographic method and terminal
JP2017199008A (en) * 2017-06-12 2017-11-02 フリュー株式会社 Photography game device, control method, and program
CN107808137A (en) * 2017-10-31 2018-03-16 广东欧珀移动通信有限公司 Image processing method, device, electronic equipment and computer-readable recording medium
CN109495688A (en) * 2018-12-26 2019-03-19 华为技术有限公司 Method for previewing of taking pictures, graphic user interface and the electronic equipment of electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105303523A (en) * 2014-12-01 2016-02-03 维沃移动通信有限公司 Image processing method and mobile terminal
US20160357578A1 (en) * 2015-06-03 2016-12-08 Samsung Electronics Co., Ltd. Method and device for providing makeup mirror
CN105657249A (en) * 2015-12-16 2016-06-08 东莞酷派软件技术有限公司 Image processing method and user terminal
CN106445168A (en) * 2016-11-01 2017-02-22 中南大学 Intelligent gloves and using method thereof
CN107123081A (en) * 2017-04-01 2017-09-01 北京小米移动软件有限公司 image processing method, device and terminal
CN107590481A (en) * 2017-09-28 2018-01-16 北京小米移动软件有限公司 Pier glass, data processing method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130141605A1 (en) * 2011-12-06 2013-06-06 Youngkoen Kim Mobile terminal and control method for the same
CN104159032A (en) * 2014-08-20 2014-11-19 广东欧珀移动通信有限公司 Method and device of adjusting facial beautification effect in camera photographing in real time
CN107077719A (en) * 2014-09-05 2017-08-18 波莱特股份有限公司 Perspective correction based on depth map in digital photograph
CN105227832A (en) * 2015-09-09 2016-01-06 厦门美图之家科技有限公司 A kind of self-timer method based on critical point detection, self-heterodyne system and camera terminal
CN106991654A (en) * 2017-03-09 2017-07-28 广东欧珀移动通信有限公司 Human body beautification method and apparatus and electronic installation based on depth
CN107124548A (en) * 2017-04-25 2017-09-01 深圳市金立通信设备有限公司 A kind of photographic method and terminal
JP2017199008A (en) * 2017-06-12 2017-11-02 フリュー株式会社 Photography game device, control method, and program
CN107808137A (en) * 2017-10-31 2018-03-16 广东欧珀移动通信有限公司 Image processing method, device, electronic equipment and computer-readable recording medium
CN109495688A (en) * 2018-12-26 2019-03-19 华为技术有限公司 Method for previewing of taking pictures, graphic user interface and the electronic equipment of electronic equipment

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111861868A (en) * 2020-07-15 2020-10-30 广州光锥元信息科技有限公司 Image processing method and device for beautifying portrait in video
CN111861868B (en) * 2020-07-15 2023-10-27 广州光锥元信息科技有限公司 Image processing method and device for beautifying human images in video
CN112380990A (en) * 2020-11-13 2021-02-19 咪咕文化科技有限公司 Picture adjusting method, electronic device and readable storage medium
EP4274217A4 (en) * 2020-12-30 2024-06-12 Vivo Mobile Communication Co Ltd Display control method and apparatus, electronic device, and medium
CN112770058A (en) * 2021-01-22 2021-05-07 维沃移动通信(杭州)有限公司 Shooting method, shooting device, electronic equipment and readable storage medium
CN115225753A (en) * 2021-04-19 2022-10-21 华为技术有限公司 Shooting method, related device and system
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

Also Published As

Publication number Publication date
CN109495688A (en) 2019-03-19
CN109495688B (en) 2021-10-01

Similar Documents

Publication Publication Date Title
WO2020134891A1 (en) Photo previewing method for electronic device, graphical user interface and electronic device
WO2021169394A1 (en) Depth-based human body image beautification method and electronic device
WO2021103981A1 (en) Split-screen display processing method and apparatus, and electronic device
WO2021000881A1 (en) Screen splitting method and electronic device
CN113645351B (en) Application interface interaction method, electronic device and computer-readable storage medium
WO2020077511A1 (en) Method for displaying image in photographic scene and electronic device
WO2021036585A1 (en) Flexible screen display method and electronic device
WO2020102978A1 (en) Image processing method and electronic device
WO2020029306A1 (en) Image capture method and electronic device
WO2021013132A1 (en) Input method and electronic device
WO2021169399A1 (en) Method for caching application interface, and electronic apparatus
WO2023065873A1 (en) Frame rate adjustment method, terminal device, and frame rate adjustment system
CN114115769A (en) Display method and electronic equipment
WO2020118490A1 (en) Automatic screen-splitting method, graphical user interface, and electronic device
WO2020113534A1 (en) Method for photographing long-exposure image and electronic device
CN113949803B (en) Photographing method and electronic equipment
WO2020173152A1 (en) Facial appearance prediction method and electronic device
WO2023241209A1 (en) Desktop wallpaper configuration method and apparatus, electronic device and readable storage medium
CN113973189A (en) Display content switching method, device, terminal and storage medium
WO2021042878A1 (en) Photography method and electronic device
CN112150499A (en) Image processing method and related device
WO2022206494A1 (en) Target tracking method and device
CN115115679A (en) Image registration method and related equipment
EP4321978A1 (en) Display method, electronic device, storage medium and program product
WO2022062985A1 (en) Method and apparatus for adding special effect in video, and terminal 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: 19904164

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

Country of ref document: EP

Kind code of ref document: A1