Photographing method and electronic device

By detecting occlusion gestures in the direction of the camera and switching image processing methods, the problem of cumbersome selfie image style switching in existing technologies is solved, thus improving the user experience.

CN116055853BActive Publication Date: 2025-11-07HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111266286.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-28
Publication Date
2025-11-07
Estimated Expiration
2041-10-28

AI Technical Summary

Technical Problem

Switching image styles when taking selfies on current electronic devices requires cumbersome operations, resulting in a poor user experience.

Method used

By detecting occlusion gestures in the camera's shooting direction, the image processing mode is switched to achieve the switching of image stylization effects. The first image processing mode and the second image processing mode correspond to different image stylization effects.

Benefits of technology

The process of switching image styles has been simplified, improving the user experience when taking selfies, eliminating the need for operation on the inner screen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116055853B_ABST
    Figure CN116055853B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a photographing method and an electronic device. The photographing method is applied to an electronic device with a camera. The method comprises the following steps: in response to a first operation, starting a camera application to start the camera, so as to collect an image by the camera; processing the collected image by using a first image processing mode; when detecting that a shielding gesture moves away in the camera direction, processing a newly collected image by using a second image processing mode, wherein the distance between the shielding gesture and the camera is less than or equal to a preset distance, and the first image processing mode and the second image processing mode correspond to different image stylization effects. Thus, the image stylization effect of the image can be switched by the shielding gesture, and the experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of electronics, and in particular, to a photographing method and an electronic device. BACKGROUND

[0002] With the development of electronic technology, the functions of cameras on electronic devices are becoming more and more rich. The existing camera applications have developed various image styles, such as filter modes, AR sticker modes, black-and-white filters, and the like. When a user takes a selfie using an electronic device, the user needs to select or set an image style in advance on a screen. For example, an existing mobile phone has an outer screen integrated on the back, and the user can preview an image collected by a rear camera through the outer screen. The user selects or sets an image style on an inner screen, and then flips the mobile phone to take a selfie using the rear camera, and previews the imaging effect on the outer screen. If the imaging effect is not as expected by the user, the user needs to flip the mobile phone again and go back to the inner screen to select or set the image style again. The process of switching the image style by the user when taking a selfie is extremely cumbersome, and the user experience is not good. SUMMARY

[0003] Embodiments of the present application provide a photographing method and an electronic device, and a user switches an image processing mode through a shielding gesture, thereby realizing switching of an image stylization effect of an image.

[0004] In a first aspect, embodiments of the present application provide a photographing method applied to an electronic device with a camera, and the method includes: starting a camera application in response to a first operation; starting the camera to collect images through the camera; processing the collected images by using a first image processing mode; and when a shielding gesture is detected to move away in a camera direction of the camera, processing newly collected images by using a second image processing mode, wherein the distance between the shielding gesture and the camera is less than or equal to a preset distance, and the first image processing mode and the second image processing mode correspond to different image stylization effects. For any one image collected by the camera, the first image processing mode is used to process the image to obtain a first image stylization effect, and the second image processing mode is used to process the image to obtain a second image stylization effect. Thus, the image stylization effect of the image is switched through the shielding gesture, and the user experience is prompted.

[0005] In some embodiments, the preset distance is 3 centimeters to 10 centimeters.

[0006] In some embodiments, when the shielding gesture is detected in the camera direction, a plurality of images collected by the camera change from bright to dark.

[0007] In some embodiments, when the blocking gesture is detected to move away in the camera shooting direction, processing the newly captured image in the second image processing mode includes: when the blocking gesture is detected to move away in the camera shooting direction within a preset time period, processing the newly captured image in the second image processing mode.

[0008] In some embodiments, after processing the newly captured image in the second image processing mode when the blocking gesture is detected to move away in the camera shooting direction, the method further includes: processing the newly captured image in a third image processing mode when the blocking gesture is detected to move away in the camera shooting direction, wherein the third image processing mode and the second image processing mode correspond to different image stylization effects.

[0009] In some embodiments, before processing the newly captured image in the second image processing mode when the blocking gesture is detected to move away in the camera shooting direction, the method further includes: displaying a setting list, the setting list including image style options, wherein the image style options are used for a user to select an image style controlled by the blocking gesture; in response to a selection operation of the user on the image style options, obtaining a target image style; and then processing the newly captured image in the second image processing mode includes: obtaining a second image processing mode corresponding to the target image style; and processing the newly captured image in the second image processing mode.

[0010] In some embodiments, the method further includes: detecting that the camera application updates a new image style, and adding the new image style to the setting list.

[0011] In some embodiments, processing the captured image in the first image processing mode includes: processing the captured image in the first image processing mode to obtain a first preview image; and processing the newly captured image in the second image processing mode includes: processing the newly captured image in the second image processing mode to obtain a second preview image; the method further includes: displaying the first preview image and a name of an image style corresponding to the first image processing mode; and displaying the second preview image and a name of an image style corresponding to the second image processing mode.

[0012] In some embodiments, the electronic device includes an inner screen and an outer screen, the inner screen and the outer screen facing away from each other; and the method includes: displaying the first preview image or the second preview image on the inner screen and the outer screen simultaneously.

[0013] In some embodiments, the method further includes: when the electronic device is in a folded state, the inner screen is turned off, and the outer screen displays the first preview image or the second preview image.

[0014] In some embodiments, the method further includes: when the electronic device is in a folded state, the outer screen receives a first operation.

[0015] In some embodiments, the camera is a front-facing camera or a rear-facing camera.

[0016] In a second aspect, the embodiments of the present application provide an electronic device, comprising: at least one memory configured to store a program; and at least one processor configured to execute the program stored in the memory, when the program is executed by the processor, to cause the electronic device to perform the photographing method of any one of the above.

[0017] In a third aspect, the embodiments of the present application provide an electronic device, comprising: a camera configured to capture an image; one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and, when the one or more programs are executed by the processor, cause the electronic device to perform the following steps: in response to a first operation, starting a camera application; starting the camera to capture an image through the camera; processing the captured image by using a first image processing mode; when detecting that a blocking gesture moves away in a camera capturing direction of the camera, processing a newly captured image by using a second image processing mode, wherein the distance between the blocking gesture and the camera is less than or equal to a preset distance, and the first image processing mode and the second image processing mode correspond to different image stylization effects; and a display screen configured to display the image obtained by processing the captured image by using the first image processing mode or the second image processing mode.

[0018] In some embodiments, the display screen comprises an inner screen and an outer screen, and the inner screen and the outer screen are opposite to each other.

[0019] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, which comprises computer instructions, when the computer instructions are executed on an electronic device, cause the electronic device to perform the method of any one of the above.

[0020] In a fifth aspect, the embodiments of the present application provide a computer program product, which comprises computer program code, when the computer program code is executed by a computer, the computer program code can cause the computer to perform the photographing method of any one of the above.

[0021] The beneficial effects corresponding to the above other aspects can be referred to the description of the beneficial effects of the method aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0022] FIG. 1 FIG. 1 is a structural schematic diagram of an electronic device provided by the embodiments of the present application.

[0023] FIG. 2A to FIG. 2B FIG. 2 is a product form schematic diagram of an electronic device provided by the embodiments of the present application.

[0024] FIG. 3A to FIG. 3C Another product form diagram of an electronic device provided by an embodiment of the present application.

[0025] FIG. 4A to FIG. 4E A graphical user interface diagram when the "occlusion gesture" function on the mobile phone is opened, provided by an embodiment of the present application.

[0026] FIG. 5A to FIG. 5C A diagram for switching the front camera, provided by an embodiment of the present application.

[0027] FIG. 6A to FIG. 6C A selfie process diagram, provided by an embodiment of the present application.

[0028] FIG. 7A to FIG. 7C Respectively, FIG. 6A to FIG. 6C A graphical user interface diagram of a mobile phone.

[0029] FIG. 8A to FIG. 8C Another selfie process diagram, provided by an embodiment of the present application.

[0030] FIG. 9A to FIG. 9C Respectively, FIG. 8A to FIG. 8C A graphical user interface diagram of a mobile phone.

[0031] FIG. 10A to FIG. 10C An image stylization effect change diagram, provided by an embodiment of the present application.

[0032] FIG. 11 A photographing method flow diagram, provided by an embodiment of the present application. DETAILED DESCRIPTION

[0033] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0034] The plurality of in the present application refers to two or more. In addition, it should be understood that in the description of the present application, the words "first", "second", etc. are only used for distinguishing the purpose of description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating or implying order.

[0035] Based on the above, the user needs to perform extremely cumbersome operations to switch the image style when taking a selfie. To this end, an embodiment of the present application provides a photographing method. An electronic device adopts a first image processing manner to process an image collected by a camera to obtain a first preview image. When the electronic device detects that a blocking gesture is moved away in the camera direction of the camera, a second image processing manner is adopted to process a newly collected image to obtain a second preview image. The first image processing manner and the second image processing manner correspond to different image stylization effects, i.e., the image stylization effects of the first preview image and the second preview image are different. The user only needs to use the blocking gesture to block the camera and move the blocking gesture away from the camera to trigger the electronic device to switch the image processing manner, realize switching of the image stylization effect, and there is no need for the user to perform operations on the inner screen, thereby improving the user experience.

[0036] The photographing method provided by the embodiment of the present application can be applied to an electronic device with a photographing function, for example, an electronic device with a camera. The electronic device may, for example, be a mobile phone, a tablet computer, a personal computer (PC), a personal digital assistant (PDA), a smart watch, a netbook, a wearable electronic device, an augmented reality (AR) device, a virtual reality (VR) device, a vehicle-mounted device, a smart screen, a smart car, a smart speaker, a robot, etc., and the specific form of the electronic device is not specially limited in the embodiment of the present application.

[0037] For example, FIG. 1 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown.

[0038] The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a loudspeaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0039] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software or a combination of software and hardware.

[0040] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.

[0041] In the embodiments of the present application, the DSP can monitor the voice data in real time, and when the similarity of the voice data monitored by the DSP and the wake-up word registered in the electronic device meets the preset condition, the voice data can be handed over to the AP. The AP performs text verification and voiceprint verification on the voice data. When the AP determines that the voice data matches the wake-up word registered by the user, the electronic device can start the voice assistant.

[0042] The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of fetching instructions and executing instructions.

[0043] The memory in the processor 110 can also be provided to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. Avoiding repeated access reduces the waiting time of the processor 110, thus improving the efficiency of the system.

[0044] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0045] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 can include multiple sets of I2C buses. The processor 110 can be coupled to a touch sensor, a charger, a flash, a camera 193, etc. through different I2C bus interfaces, respectively. For example, the processor 110 can be coupled to a touch sensor through an I2C interface, so that the processor 110 and the touch sensor communicate through the I2C bus interface, and the touch function of the electronic device 100 is realized.

[0046] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple sets of I2S buses. The processor 110 can be coupled to the audio module 170 through the I2S bus, and communication between the processor 110 and the audio module 170 is realized. In some embodiments, the audio module 170 can deliver an audio signal to the wireless communication module 160 through the I2S interface, and the function of answering a phone through a Bluetooth headset is realized.

[0047] The PCM interface can also be used for audio communication, which samples, quantizes and encodes analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled through the PCM bus interface. In some embodiments, the audio module 170 can also deliver an audio signal to the wireless communication module 160 through the PCM interface, and the function of answering a phone through a Bluetooth headset is realized. Both the I2S interface and the PCM interface can be used for audio communication.

[0048] The UART interface is a universal serial bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is usually 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 realize the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to realize the function of playing music through the Bluetooth headset.

[0049] The MIPI interface can be used to connect the processor 110 and peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through the CSI interface to realize the shooting 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.

[0050] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 and the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0051] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection methods or combinations of multiple interface connection methods in the above embodiments.

[0052] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input through the wireless charging coil of the electronic device 100. The charging management module 140 charges the battery 142 while also providing power to the electronic device through the power management module 141.

[0053] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 can receive input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like.

[0054] The power management module 141 can be configured to monitor performance parameters of the battery, such as battery capacity, battery cycle count, battery charging voltage, battery discharging voltage, battery health status (e.g., leakage, impedance), and the like. In some other embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can be disposed in the same device.

[0055] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, and the like.

[0056] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.

[0057] The mobile communication module 150 can provide a solution for wireless communication, including 2G / 3G / 4G / 5G, and the like, applied to the electronic device 100. The mobile communication module 150 can include one or more filters, switches, power amplifiers, low noise amplifiers (LNAs), and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and perform filtering, amplification, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify signals modulated by the modem processor, and convert the amplified signals into electromagnetic waves to be radiated through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed 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 can be disposed in the same device.

[0058] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a 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 processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a microphone 170B, etc.), or displays an image or a video through the display 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110 and disposed in the same device as the mobile communication module 150 or other functional modules.

[0059] The wireless communication module 160 can provide a wireless communication solution including a wireless local area network (WLAN) (such as a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, and the like, which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate one or more communication processing modules. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification thereon, and radiate the signal as an electromagnetic wave via the antenna 2.

[0060] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include 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, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidu navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).

[0061] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs, which execute program instructions to generate or change display information.

[0062] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diode (QLED), or the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.

[0063] The following describes several implementation forms of the display screen 194.

[0064] When the product form of the electronic device 100 is a bar phone, as shown in FIG. 1A, the electronic device 100 includes a back cover 101, a front camera 193A, and a display screen 194 mounted on the back cover 101. The back cover 101 does not have a display screen or a touch screen function. The display surface of the display screen 194 is the front area of the electronic device 100. The front camera 193A and the display screen 194 are mounted on the same side of the electronic device 100. As shown in FIG. 1B, the back camera 193B is on one side of the back cover 101, and the front camera 193A and the back camera 193B are arranged opposite to each other. The imaging direction of the front camera 193A is towards a first direction, and the display surface of the display screen 194 is towards a second direction, the first direction and the second direction are towards the same or similar. The imaging direction of the back camera 193B is towards a third direction, the third direction is opposite to the first direction, and the third direction is opposite to the second direction. FIG. 2A FIG. 2B

[0065] ​​In a product form of the electronic device 100 is a foldable smart phone, the display screen 194 can be implemented as a foldable screen which can be folded to form at least two screens. For example, the foldable screen can be folded along a folding edge or folding axis to form a first screen and a second screen. Among them, the folding manner of the foldable screen on the electronic device 100 can be divided into two categories. One is the foldable screen folded outward (referred to as outward folding foldable screen), and the other is the foldable screen folded inward (referred to as inward folding foldable screen). Among them, taking the foldable screen which can be folded to form a first screen and a second screen as an example. After the outward folding foldable screen is folded, the direction of the first screen and the direction of the second screen are opposite. After the inward folding foldable screen is folded, the direction of the first screen and the direction of the second screen are opposite.

[0066] As shown in FIG. 3A , the front camera 193A is installed on one side of the display screen 194. The display screen 194 can be folded along the folding edge, and the display screen 194 can form a first screen 194A and a second screen 194B in a half-folded form as shown in FIG. 3B . After the display screen 194 is folded into the first screen 194A and the second screen 194B, the display screen 194 can continue to fold along the folding edge, as shown in FIG. 3C , after the display screen 194 is completely folded, the first screen 194A and the second screen 194B are opposite and invisible to the user.

[0067] The display screen arranged on the front area of the electronic device 100 is referred to as an inner screen, and the display screen 194 as shown in FIG. 3A is an inner screen, FIG. 3B , the first screen 194A and the second screen 194B as shown are inner screens. The display screen arranged on the back area of the electronic device 100 is referred to as an outer screen, and the third screen 194C as shown in FIG. 3C is an outer screen. The inner screen and the outer screen are arranged opposite to each other.

[0068] The display screen 194 of the electronic device 100 can include an inner screen and an outer screen. As shown in FIG. 3B , when the inward folding screen of the electronic device 100 is completely folded, the third screen 194C is opposite to the first screen 194A, and the third screen 194C is visible to the user. Among them, the third screen 194C is on the same side as the rear camera 193B on the electronic device 100. It can be understood that for the electronic device 100 with such an inward folding screen, when the inward folding screen is in a completely folded state, an image can be displayed on the third screen 194C; when the inward folding screen is in a half-folded state or an unfolded state, an image can be displayed on the first screen 194A, the second screen 194B and the third screen 194C.

[0069] The above FIG. 3A to FIG. 3CIn this embodiment, the folding screen of the electronic device 100 is folded horizontally, that is, folded along the horizontal folding edge to form two screens (i.e., the first screen and the second screen). Alternatively, the folding screen of the electronic device 100 can be folded vertically, that is, folded along the vertical folding edge to form two screens (i.e., the first screen and the second screen). This application does not specifically limit the embodiment in this way.

[0070] In some embodiments, the camera that is launched by default after the camera application is started can be named the rear camera, and the camera set opposite to the rear camera can be the front camera.

[0071] Camera 193 is used to capture still images or videos. An object passes through the lens to generate an optical image that is projected onto a photosensitive element. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to an ISP (Internet Service Provider) for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP (Digital Signal Processor) for processing. The DSP converts the digital image signal into image signals in standard formats such as RGB and YUV. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0072] Optionally, the N cameras 193 can be front-facing cameras, rear-facing cameras, or both. That is, all N cameras 193 can be front-facing cameras, all can be rear-facing cameras, or some can be front-facing cameras and others can be rear-facing cameras. This application embodiment does not limit this. For example, please refer to [further details omitted]. FIG. 2A to FIG. 2B ,and FIG. 3A to FIG. 3C The electronic device 100 is equipped with one front-facing camera 193A and two rear-facing cameras 193B. In other embodiments, the number of front-facing cameras 193A and rear-facing cameras 193B may be two or more, which is not limited here.

[0073] Optionally, the N cameras 193 may include a single camera, dual cameras, or triple cameras, etc., and this application embodiment does not limit this. For example, the N cameras 193 may include three cameras, of which one is a main camera, one is a wide-angle camera, and one is a telephoto camera.

[0074] It should be noted that the camera 193 can be a wide-angle camera, a long-focus camera, etc. For example, still taking two cameras as an example, the front-facing camera can be a long-focus camera, and the rear-facing camera can be a wide-angle camera. In this way, the field of view of the image captured by the rear-facing camera is larger, and the image information is more abundant. Generally, the camera 193 can include a photosensitive element such as a lens group and an image sensor, wherein the lens group includes a plurality of lenses (convex lenses or concave lenses) for collecting light signals reflected by an object to be photographed (such as a user's face, scenery, etc.) and transmitting the collected light signals to the image sensor. The image sensor generates an image of the object to be photographed according to the light signals. If the display screen 194 of the electronic device 100 displays a shooting interface of a camera application, the display screen 194 displays the image generated by the image sensor in the shooting interface.

[0075] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor, etc.

[0076] The ISP is used to process data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and conversion into an image visible to the naked eye. The ISP can also optimize algorithms for image noise, brightness, and skin color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be provided in the camera 193.

[0077] The digital signal processor is used to process digital signals, which can process not only digital image signals but also other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0078] The video codec is used for digital video compression or decompression. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0079] The NPU is a neural-network (NN) calculation processor, which processes input information quickly by referring to the structure of a biological neural network, such as the transmission mode between human brain neurons, and can also constantly self-learn. Through the NPU, intelligent cognition applications of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0080] The external memory interface 120 can be configured to connect an external memory card, such as a Micro SD card, to extend the memory capacity of the electronic device 100. The external memory card can communicate with the processor 110 via the external memory interface 120 to store data, such as music, video, and the like.

[0081] The internal memory 121 can be configured to store one or more computer programs including instructions. The processor 110 can execute the above-described instructions stored in the internal memory 121 to cause the electronic device 100 to perform the method of voice interaction provided in some embodiments of the present application, as well as various functional applications and data processing. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, and can also store one or more application programs (such as a gallery, contacts, and the like). The data storage area can store data created during the use of the electronic device 101 (such as photos, contacts, and the like). In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, universal flash storage (UFS), and the like. In other embodiments, the processor 110 executes the instructions stored in the internal memory 121 and / or the instructions stored in the memory disposed in the processor to cause the electronic device 100 to perform the method of voice interaction provided in the embodiments of the present application, as well as various functional applications and data processing.

[0082] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, the application processor, and the like. For example, music playback, recording, and the like.

[0083] The audio module 170 is configured to convert digital audio information into an analog audio signal output, and is also configured to convert an analog audio input into a digital audio signal. The audio module 170 can also be configured to encode and decode audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or some functional modules of the audio module 170 can be disposed in the processor 110.

[0084] The speaker 170A, also known as a "loudspeaker", is configured to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0085] The receiver 170B, also known as a "earpiece", is configured to convert an audio electrical signal into a sound signal. When the electronic device 100 receives a call or a voice message, the receiver 170B can be held close to the ear to listen to the voice.

[0086] The microphone 170C, also referred to as a "microphone", "microphone", is used to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can speak into the microphone 170C by placing the mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with one or more microphones 170C. In some embodiments, the electronic device 100 can be provided with two microphones 170C, in addition to collecting sound signals, it can also achieve noise reduction function. In some embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, to achieve the functions of collecting sound signals, noise reduction, identifying sound sources, realizing directional recording, etc.

[0087] The earphone interface 170D is used to connect a wired earphone. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0088] The sensor module 180 can include a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc. The embodiments of the present application do not make any limitation in this regard.

[0089] Of course, the electronic device 100 provided by the embodiments of the present application can also include one or more devices such as a key 190, a motor 191, an indicator 192, and a SIM card interface 195, and the embodiments of the present application do not make any limitation in this regard.

[0090] In this embodiment, when the "occlusion gesture" function of the electronic device is enabled, the user can control the image stylization effect of the image using occlusion gestures when taking a selfie. When the electronic device detects that the "occlusion gesture" function is enabled, it can execute the shooting method provided in this embodiment. That is, when the electronic device detects that the occlusion gesture has moved away in the camera's shooting direction, it switches the image processing mode and processes the image captured by the camera using the switched image processing mode. Different image processing modes produce images with different image stylization effects, thus achieving the switching of image stylization effects through occlusion gestures, improving the user experience when taking selfies. Conversely, when the "occlusion gesture" function is disabled, the electronic device does not execute the shooting method provided in this embodiment when taking a selfie. That is, the electronic device does not detect occlusion gestures or, even after detecting occlusion gestures, it does not trigger the switching of image processing modes, and the image stylization effect of the image presented by the electronic device remains unchanged. Users can choose whether to enable the "occlusion gesture" function according to their needs, thereby better meeting user requirements and improving the user experience.

[0091] All the technical solutions involved in the following embodiments can be implemented in the aforementioned electronic device. The shooting method provided in this embodiment will be described in detail below with reference to the accompanying drawings and application scenarios. It should be noted that in the following embodiments, the electronic device is a mobile phone as an example, and the shooting function is implemented using the camera application in the mobile phone as an example.

[0092] The following describes the method for enabling the "occlusion gesture" function on a mobile phone according to the embodiments of this application.

[0093] like FIG. 4A As shown, when the phone is unlocked, the screen displays a graphical user interface (GUI), which is the phone's main interface 401. The main interface 401 includes a status bar 402, a dock bar 403, and icons for applications (apps) (such as a clock icon 41, a calendar icon 42, a gallery icon 43, and a memo icon 44). The status bar 402 includes network type (5G), time, WiFi icon, and remaining battery power. The dock bar 403 includes icons for frequently used applications, such as a camera icon 45, a contacts icon 46, a phone icon 47, and a text message icon 48.

[0094] in, FIG. 4A The main interface 401 can be the interface of a foldable smartphone in an unfolded state or the interface of a candybar phone. This application embodiment does not specifically limit the product form of the phone.

[0095] As shown in FIG. 4A , the user clicks the icon 45 of the camera on the main interface 401. The mobile phone can detect the first operation (such as the click operation on the icon 45) on the icon 45 of the camera, and in response to the first operation, the mobile phone starts the camera application, and the mobile phone displays the shooting interface 404 of the camera application as shown in FIG. 4B . The shooting interface 404 can be used for the user to take a picture, for example, to take a photo or record a video. Generally, after the mobile phone enters the shooting interface 404, it enters the photo mode by default (or the shooting mode in which the camera application was last exited). In some embodiments, the mobile phone can automatically enter the photo mode or the video mode and display the shooting interface 404 after starting the camera. The display state (such as "photo" marked with a triangle) of the photo option on the shooting interface 404 can indicate that the photo option has been selected. When the mobile phone detects that the user clicks the video option, the mobile phone can enter the video mode.

[0096] It can be understood that the shooting method provided by the embodiments of the present application is not limited to the photo mode, but can also be used in the video mode and other shooting modes. That is, when the mobile phone starts the video mode, after the "occlusion gesture" function is enabled, the user can also trigger the mobile phone to switch the image processing mode through the occlusion gesture during the user's video recording. The implementation principle of the image style switching in the video mode is similar to that in the photo mode. The following describes the shooting method provided by the embodiments of the present application applied to the photo mode.

[0097] As shown in FIG. 4B , the shooting interface 404 includes a preview frame 410, a shooting control 411, a switching control 412, a gallery control 413, and a setting control 414. The controls can be buttons or other forms of controls. Among them:

[0098] The preview frame 410 can be called a viewfinder frame. The preview frame 410 can be used to display the image collected by the started camera in real time. The mobile phone can refresh the display content therein in real time to facilitate the user to preview the image currently collected by the camera (front camera or rear camera).

[0099] As shown in FIG. 4B , the preview frame 410 displays the image collected by the rear camera by default after starting the camera application. Correspondingly, if the front camera is currently started, the preview frame 410 displays the image collected by the front camera.

[0100] The shooting control 411 can be used to listen to a user operation for triggering shooting (taking a picture or recording a video). The mobile phone can detect a user operation (e.g., a click operation on the control 411) acting on the shooting control 411, and in response to the operation, the mobile phone can save an image in the preview frame 410. The saved image can be a picture or a video. That is, the user can click the shooting control 411 to trigger shooting.

[0101] The switching control 412 can be used to listen to a user operation for triggering switching of a camera. The mobile phone can detect a user operation (e.g., a click operation on the control 412) acting on the switching control 412, and in response to the operation, the mobile phone can switch the camera (e.g., switch a rear camera to a front camera, or switch a front camera to a rear camera).

[0102] The gallery control 413 can be used to listen to a user operation for triggering opening of a "gallery". The mobile phone can detect a user operation (e.g., a click operation on the control 413) acting on the gallery control 413, and in response to the operation, the mobile phone can display a graphical user interface of the "gallery", in which pictures saved by the mobile phone can be displayed.

[0103] The setting control 414 can be used to listen to a user operation for triggering setting, so as to facilitate the user to manually set related parameters. For example, FIG. 4C As shown in FIG. 4D, the user clicks the setting control 414 on the shooting interface 404. The mobile phone can detect a user operation (e.g., a click operation on the control 414) acting on the setting control 414, and in response to the operation, the mobile phone displays a setting interface 405 of the camera application, as shown in FIG. 4E. FIG. 4D The setting interface 405 includes general settings of shooting resolution, geographical position information, automatic addition of a watermark, ambient light brightness, etc. of the camera application, and shooting settings of a reference line in a shooting process, shooting sound, smiley capture, etc., which are not limited in the present application.

[0104] In the embodiments of the present application, the interface provided for the user for adjusting image style switching when taking a selfie can be set in the setting interface 405 of the camera. As shown in FIG. 4F, the selfie bar 415 includes a blocking gesture switch 416 and an image style option 417. The user can select whether to turn on the blocking gesture switch 416 on the selfie bar 415. The user can also select an image style controlled by the blocking gesture, i.e., a target image style, from the image style option 417. The blocking gesture switch 416 can be turned on by default. The image style option 417 can select a filter image style by default. FIG. 4D

[0105] ​When a user clicks the occlusion gesture switch 416, the occlusion gesture switch is set to "on". The mobile phone detects the user operation (such as clicking on the switch 416) and, in response, activates the "occlusion gesture" function. The mobile phone can use the shooting method provided in this application embodiment to take pictures, that is, when it detects the occlusion gesture in the camera's shooting direction and the removal of the occlusion gesture, the mobile phone determines the corresponding image processing method according to the currently selected target image style (such as filter mode) and processes the image captured by the camera using the determined image processing method.

[0106] like FIG. 4D As shown, when a user clicks on image style option 417, the phone detects the user action (such as a click on option 417) on image style option 417, and in response to this action, the phone displays as shown. FIG. 4E The image style selection box 406 is shown. Image style selection box 406 includes filter switch 420, magic sky replacement switch 421, AR sticker switch 422, AR avatar switch 423, watermark switch 424, frame switch 425, special effects switch 426, beauty switch 427, camera switch 428, etc. When a user clicks the AR sticker switch 422, it turns on, and the AR sticker switch displays "ON". Gesture detection of user actions on the AR sticker switch 422 (such as a click on the switch 422), in response to this action, determines the target image style as AR sticker, and processes the image captured by the camera using the image processing method corresponding to the AR sticker.

[0107] The filter switch, magic sky replacement switch, AR sticker switch, AR avatar switch, watermark switch, frame switch, special effects switch, beauty switch, and camera switch each correspond to their respective image styles. When a switch is turned on, the target image style is determined to be the image style corresponding to that switch. For example, turning on the filter switch sets the target image style to filter mode. Turning on the magic sky replacement switch sets the target image style to magic sky replacement mode. Turning on the AR sticker switch sets the target image style to AR sticker mode. Turning on the AR avatar switch sets the target image style to AR avatar mode. Turning on the watermark switch sets the target image style to watermark mode. Turning on the frame switch sets the target image style to frame mode. Turning on the special effects switch sets the target image style to special effects mode. Turning on the beauty switch sets the target image style to beauty mode. Turning on the camera switch sets the target image style to camera mode. These modes all provide corresponding image stylization effects for the image.

[0108] It should be understood that the image styles are not limited to the foregoing enumerated, and can be updated following the update of the camera application. When the camera application is updated with a new image style, the new image style can be automatically added to the image style options 417, and then a switch corresponding to the new image style can be included in the image style selection box 406. For example, the camera application is updated with a new image style of a makeup mode, and then a makeup switch corresponding to the makeup mode can be included in the image style selection box 406. FIG. 4E

[0109] In the embodiments of the present application, the image styles can include the above-mentioned modes, such as the filter mode, the magic sky change mode, the AR sticker mode, and the like. The image styles can also include different types under the same mode.

[0110] For example, the filter mode can include different types of black-and-white filters, natural filters, oil painting filters, and the like. The magic sky change mode can include different types of railroads, forests, seashores, and the like. The AR sticker mode can include different types of cartoon stickers, New Year's stickers, and the like. The AR avatar mode can include different types of animal avatars, cartoon character avatars, and the like. The watermark mode can include different types of time, location, weather, mood, food, sports, and the like. The photo frame mode can include different types of poster photo frames, picture-in-picture photo frames, and the like. The special effect mode can include different types of snowflake special effects, lightning special effects, and the like. The beautification mode can include different types of skin beautification, face slimming, and the like. The camera mode can include different types of recording modes, micro-movie modes, and the like.

[0111] In the embodiments of the present application, the blocking gesture can switch different modes, or can switch different types under the same mode.

[0112] It should be understood that, in the above introduction of the process of starting the "blocking gesture" function, when the user does not select the image style controlled by the blocking gesture, i.e., the user does not trigger the "image style options 417", the current image style can be a default image style, for example, the default filter mode, and then the blocking gesture can control different types of filters accordingly.

[0113] After the user starts the "blocking gesture" function, and selects the image style options 417 as "AR sticker", the user wants to take a selfie. As shown in FIG. 4L, the user clicks the back key 430 on the image style selection box 406, and the phone displays the setting interface 405 as shown in FIG. 4M. FIG. 5A FIG. 5B FIG. 5C As shown in FIG. 4N, the user clicks the back key 431 on the setting interface 405, and the phone displays the shooting interface 404 as shown in FIG. 4O. The user clicks the switching control 412 on the shooting interface 404 to close the rear camera and start the front camera. The preview box 410 on the shooting interface 404 displays the image of the user collected by the front camera. ​​​

[0114] FIG. 4B In the case that the corresponding target image style (the image style set by default) is a filter, then FIG. 4B In the case that the image displayed on the preview frame 410 corresponds to a filter image stylization effect. FIG. 5C In the case that the corresponding target image style (the image style selected by the user) is an AR sticker, then FIG. 5C In the case that the image displayed on the preview frame 410 corresponds to a sticker image stylization effect. FIG. 5C In the case that the image displayed on the preview frame 410 corresponds to a filter image stylization effect. FIG. 4B In the case that the image displayed on the preview frame 410 corresponds to a sticker image stylization effect.

[0115] It should be understood that FIG. 4A to FIG. 4E In the case that the "occlusion gesture" function is enabled and the image style is selected, the process can be implemented in any process of the user's self-photography, and is not limited to the case that the "occlusion gesture" function is enabled and the image style is selected after the user starts the camera application. After the user takes several photos, the user can enter the setting interface 405, enable the "occlusion gesture" switch, select the image style controlled by the occlusion gesture, and then return to the shooting interface 404 to use the occlusion gesture for self-photography. That is, the user can enable the "occlusion gesture" function and select the image style after starting the camera application, or enable the "occlusion gesture" function and select the image style after using the camera application for a period of time. Alternatively, the user can enable the "occlusion gesture" function and set the image style before starting the camera application, and then there is no need to enable the "occlusion gesture" function and select the image style. For example, at time T0, the user refers to FIG. 4A to FIG. 4E enable the "occlusion gesture" switch and select the image style. At time T2, the user exits the camera application. At time T3, the user restarts the camera application, and the camera application retains the "occlusion gesture" switch enabled and the selected image style at time T0. The user can directly use the occlusion gesture to switch the image stylization effect of the image.

[0116] After the user enables the "occlusion gesture" function and selects the target image style, the user can switch the image stylization effect of the image through the occlusion gesture. The process of the user's self-photography is described below. FIG. 6A to FIG. 6C A schematic diagram of the process of the user's self-photography using a straight phone is provided in the embodiments of the present application. The case in which the user selects the image style as an AR sticker is described.

[0117] As shown in FIG. 5C The user clicks the switching control 412, and the straight phone closes the rear camera and starts the front camera. As shown in FIG. 6AAs shown, the user holds the straight bar phone with one hand, and aims the front camera 193A of the straight bar phone to the part to be photographed. The user can adjust the angle of the straight bar phone according to the user's own shooting needs, so that the content (such as the part) that the user wants to shoot appears in the preview frame 410. The user selects the image style as an AR sticker, and the target image style is an AR sticker. The AR sticker can include multiple types, and the initial type of the AR sticker is a "flower" sticker. The straight bar phone processes the image collected by the front camera 193A in a first image processing mode to obtain a first preview image. The first image processing mode is that the straight bar phone obtains a flower sticker template corresponding to the "flower" sticker, and combines the flower sticker template with the image collected by the front camera 193A to obtain the first preview image. Please refer to FIG. 7A , FIG. 7A corresponding FIG. 6A image user interface diagram of the straight bar phone in FIG. 1. FIG. 6A and FIG. 7A The first preview image in which the flower sticker 71 can be seen is displayed in the preview frame 410. The image in the preview frame 410 can be displayed by the inner screen of the straight bar phone.

[0118] As FIG. 6A shown, the orientation of the front camera 193A is direction D0, and direction D0 is within the shooting range R1 of the front camera 193A, and the shooting range R1 is associated with direction D0. The shooting range is related to the parameters of the corresponding camera, that is, the shooting range R1 is related to the parameters of the front camera 193A, which is not limited in the present application.

[0119] After the front camera 193A is started, the objects appearing in the camera range R1 of the front camera 193A can be collected by the front camera 193A. The camera direction of the front camera 193A includes the orientation direction D0 of the front camera 193A. The camera direction is the direction scattered outward from the camera center, and the direction is within the camera range R1. The direction scattered outward from the center of the front camera 193A (such as direction D0) is within the camera range R1, so the direction is the camera direction. The direction scattered outward from the center of the front camera 193A (such as direction D1) is outside the camera range R1, so it is not the camera direction. If direction D1 is not within the shooting range R1, then direction D1 is not the camera direction of the front camera 193A.

[0120] As FIG. 6BAs shown, the user uses the other hand to shield the front camera 193A, so that the distance between the hand and the front camera 193A is less than or equal to the preset distance, and the straight phone detects the shielding gesture of the user. The user uses the other hand to shield the front camera 193A, that is, places the other hand in the direction of the front camera 193A, that is, the hand appears in the shooting range R1, and the straight phone can collect the image of the hand. Based on the distance between the shielding hand and the front camera 193A being less than or equal to the preset distance, the image collected by the front camera 193A presents a large piece of black, that is, the percentage of the image area about the hand in the entire image is greater than or equal to the preset percentage. Please refer to FIG. 7B , FIG. 7B corresponding FIG. 6B the image user interface diagram of the straight phone in the embodiment. FIG. 6B and FIG. 7B The image of the hand collected by the front camera 193A is displayed in the preview frame 410, which presents a piece of blur or shadow or dark picture. It can be understood that the hand shielding the camera may not completely shield the camera, so FIG. 6B and FIG. 7B There may be a light area in the picture of the preview frame 410, that is, the picture is not completely dark. That is, the percentage of the image area about the hand collected by the front camera 193A in the entire image is greater than or equal to the preset percentage.

[0121] In the embodiment of the present application, when the straight phone detects the shielding gesture of the user, the image processing mode of the image collected by the front camera 193A can be the following three possibilities: the image processing mode before shielding, that is, the image processing mode before detecting the shielding gesture of the user (that is, the first image processing mode). It can also be the image processing mode after switching, that is, when detecting the shielding gesture of the user, that is, switching the image processing mode, using the image processing mode after switching (that is, the second image processing mode described below). It can also be an image processing mode independent of the image style, that is, when detecting the shielding gesture, the straight phone uses an image processing mode independent of the image style to process the image collected by the front camera 193A. The embodiment of the present application does not make specific limitation on this. For example, FIG. 6B and FIG. 7B The image displayed in the preview frame 410 does not use the sticker template.

[0122] For example, FIG. 6CAs shown, the user moves away the blocking gesture which blocks the camera direction of the camera, and the straight bar phone detects the moving away of the blocking gesture, and the straight bar phone switches the image processing mode, and the straight bar phone processes the image collected by the front camera 193A by using the second image processing mode to obtain a second preview image. The second image processing mode is that: when the straight bar phone detects the moving away of the blocking gesture, the straight bar phone uses the next type of AR sticker such as the "rabbit ear" sticker, and the straight bar phone acquires the rabbit ear sticker template corresponding to the "rabbit ear" sticker. Then the straight bar phone combines the rabbit ear sticker template with the image collected by the front camera 193A to obtain the second preview image. For reference, please also see FIG. 7C , FIG. 7C corresponding FIG. 6C image user interface diagram of the straight bar phone. FIG. 6C and FIG. 7C the second preview image in the preview frame 410, and the rabbit ear sticker 72 can be seen in the second preview image.

[0123] In the embodiment of the present application, the phone can detect the moving away of a blocking gesture in the camera direction of the camera, and the phone switches the image processing mode once to make the image processing mode used by the phone before and after the moving away of the blocking gesture different. Exemplarily, for the same mode, the image processing modes corresponding to different types in the mode can be switched in turn. For example, the different types corresponding to the AR sticker include the flower sticker, the rabbit ear sticker, the mustache sticker, the love sticker, etc. At T0 moment, the phone processes the image (i.e. the image collected by the camera at T0 moment) by using the first image processing mode corresponding to the flower sticker. At T1 moment, the moving away of the blocking gesture is detected, and the image (i.e. the image collected by the camera at T1 moment) is processed by using the image processing mode corresponding to the rabbit ear sticker. At T2 moment, the phone detects the moving away of the blocking gesture again, and the image (i.e. the image collected by the camera at T2 moment) is processed by using the second image processing mode corresponding to the mustache sticker. At T3 moment, the phone detects the moving away of the blocking gesture again, and the image (i.e. the image collected by the camera at T3 moment) is processed by using the third image processing mode corresponding to the love sticker, and the like. If the user continues to block the camera by using the blocking gesture and moves away the blocking gesture, the phone can continue to process the image collected by the camera by using the image processing mode different from the last one (i.e. the image processing mode before the blocking).

[0124] It can be understood that the user can also use the rear camera for self-photographing. FIG. 8A to FIG. 8C The user uses the folding smart phone to take a selfie in the process provided by the embodiment of the present application. Taking the user selecting the image style as the AR sticker for example.

[0125] After the user sets the image style, the user folds the folding smart phone and flips the folding smart phone. For example, FIG. 8AAs shown, the user holds the folding smartphone with one hand, and aims the rear camera (193B1 and 193B2) of the folding smartphone to the part to be photographed. The user can adjust the angle of the folding smartphone according to the user's own shooting needs, so that the content (e.g. the part) that the user wants to shoot is displayed in the preview frame 410. The folding smartphone processes the image collected by the rear camera (193B1 and 193B2) in a first image processing mode to obtain a first preview image. The first image processing mode is that the folding smartphone obtains a flower sticker template corresponding to the "flower" sticker, and combines the flower sticker template with the image collected by the rear camera (193B1 and 193B2) to obtain the first preview image. Please refer to FIG. 9A , FIG. 9A corresponding FIG. 8A to the image user interface of the folding smartphone. FIG. 9A and FIG. 8A The first preview image in which the flower sticker 71 can be seen is displayed in the preview frame 410. The image in the preview frame 410 can be displayed by the outer screen of the folding smartphone.

[0126] FIG. 8A The relationship between the orientation D2 of the rear camera 193B1 and its imaging range R2, and the relationship between the orientation D3 of the rear camera 193B2 and its imaging range R3 are shown. It can be understood that after the rear camera 193B1 is started, the object appearing in the imaging range R1 of the rear camera 193B1 can be collected by the rear camera 193B1 to its image. After the rear camera 193B2 is started, the object appearing in the imaging range R3 of the rear camera 193B2 can be collected by the rear camera 193B2 to its image. The imaging direction of the rear camera 193B1 includes the orientation D2 of the rear camera 193B1, as shown in FIG. 8A , if the direction scattering outward from the rear camera 193B1 is within the imaging range R2, it is the imaging direction of the rear camera 193B1. The imaging direction of the rear camera 193B2 includes the orientation D2 of the rear camera 193B2, and if the direction scattering outward from the rear camera 193B2 is within the imaging range R3, it is the imaging direction of the rear camera 193B2. The imaging direction of the rear camera includes the imaging direction of the rear camera 193B1 and the imaging direction of the rear camera 193B2.

[0127] As shown in FIG. 8B , the user uses the thumb to shield the rear camera (193B1 and 193B2), so that the distance between the thumb and the rear camera (193B1 and 193B2) is less than or equal to a preset distance, and the folding smartphone detects the shielding gesture of the user. As shown in FIG. 8A and FIG. 8BAs shown, the direction of the rear camera 193B1 is direction D2, and direction D2 is within the shooting range R2 of the rear camera 193B1, and the shooting range R2 is associated with direction D2. The direction of the rear camera 193B2 is direction D3, and direction D3 is within the shooting range R3 of the rear camera 193B2, and the shooting range R3 is associated with direction D3. The shooting ranges of the rear cameras 193B1 and 193B2 include R2 and R3. The shooting range is related to the parameters of the corresponding camera, that is, the shooting range R2 is related to the parameters of the rear camera 193B1, and the shooting range R3 is related to the parameters of the rear camera 193B2, which is not limited in the present application.

[0128] The user blocks the rear camera (193B1 and 193B2) with the thumb, that is, places the thumb in the camera direction of the rear camera (193B1 and 193B2), that is, the thumb appears on the shooting range R2 and R3, and the folding smart phone can collect the image of the thumb. Based on the distance between the blocking thumb and the rear camera (193B1 and 193B2) being less than or equal to the preset distance, the image collected by the rear camera (193B1 and 193B2) presents a large piece of black, that is, the percentage of the image area about the thumb to the entire image is greater than or equal to the preset percentage. Please also refer to FIG. 9B , FIG. 9B Corresponding FIG. 8B to the image user interface diagram of the folding smart phone. FIG. 9B and FIG. 8B The image of the hand collected by the rear camera (193B1 and 193B2) is displayed in the preview frame 410.

[0129] As FIG. 8C shown, the user moves away the blocking gesture in the camera direction (that is, moves away the thumb blocking the rear camera), and the phone detects that the blocking gesture is moved away, and the phone switches the image processing mode. The folding smart phone uses a second image processing mode to process the image collected by the rear camera (193B1 and 193B2) to obtain a second preview image. The second image processing mode is that when the folding smart phone detects that the blocking gesture is moved away, the folding smart phone uses the next type of AR sticker such as "rabbit ears" sticker, and the folding smart phone obtains the rabbit ear sticker template corresponding to the "rabbit ears" sticker. Then the folding smart phone combines the rabbit ear sticker template with the image collected by the rear camera (193B1 and 193B2) to obtain the second preview image. Please also refer to FIG. 9C , FIG. 9C Corresponding FIG. 8C to the image user interface diagram of the folding smart phone. FIG. 9C and FIG. 8CThe second preview image is displayed in the preview frame 410, in which the rabbit ear sticker 72 can be seen.

[0130] It can be understood that the user continues to shield the rear camera using the shielding gesture, and the folding smart phone processes the image collected by the rear camera using the third image processing mode. The implementation principle of using the rear camera for self-photography is similar to that of the front camera, and details are not described herein.

[0131] The above describes switching different types in the same mode through the shielding gesture. The following describes switching different modes through the shielding gesture.

[0132] The user turns on the "shielding gesture" function, but does not select an image style in the image style option 417, that is, all switches in the image style selection frame 406 are turned off. When the phone detects that the user's shielding gesture is removed, the phone switches the image styles listed in the image style selection frame 406 in turn, for example, first switching to the filter mode, and then switching from the filter mode to the camera mode, and then switching from the camera mode to the AR sticker mode through the shielding gesture. If the user determines a certain mode, the user can input a confirmation instruction to the electronic device to make the electronic device determine the mode. The way the user inputs the confirmation instruction includes but is not limited to: the user touching the electronic device, such as clicking the screen, inputting a specific gesture on the plane, long-pressing a key (power key, volume key), tapping (single click or double click) the back of the electronic device. Or, the user inputs a specific air gesture, such as the user making a "like" gesture.

[0133] In some embodiments, the photographing method provided by the embodiments of the present application can also provide a function switching gesture to switch between different modes. In this way, the function switching gesture is used to switch between different modes, and after the user wants to switch to a certain mode, the shielding gesture is used to switch between different types in the mode.

[0134] The function switching gesture includes but is not limited to: the user touching the electronic device, such as clicking the screen, inputting a specific gesture on the plane, long-pressing a key (power key, volume key), tapping (single click or double click) the electronic device (such as the back or screen). Or, the user inputs a specific air gesture, such as the user making a "like" gesture. When the user holds the phone with one hand to take a selfie using the rear camera, the back of the phone faces the user, so the user can directly tap the back of the phone to facilitate user operation. When the user holds the phone with one hand to take a selfie using the front camera, the screen (such as the inner screen) of the phone faces the user, so the user can directly tap the screen of the phone to facilitate user operation. In some embodiments, the force of tapping (single click or double click) the electronic device can be set to be greater than a set value.

[0135] In the embodiments of the present application, the name corresponding to the current image style can also be displayed. For example, if the current image style is a filter mode, the name "filter" is displayed. If the image style is a black and white filter in the filter mode, the name "black and white filter" is displayed.

[0136] For example, refer to FIG. 10A to FIG. 10C , FIG. 10A to FIG. 10C The interface schematic diagram of the image style switching provided by the embodiments of the present application is introduced.

[0137] The user opens the "occlusion gesture" function and does not select the image style controlled by the occlusion gesture. The phone detects that the "occlusion gesture" function is opened, and then the phone can select a mode from the image style selection box 406 as the current image style. For example, the phone selects a filter mode as the target image style. Based on the default initial type of the filter mode being a black and white filter, the phone uses the image processing mode corresponding to the black and white filter to process the image collected by the camera to obtain a first preview image. As shown in FIG. 10A , the first preview image and a prompt box 73 are displayed on the preview box 410. The text "filter mode: black and white filter" displayed on the prompt box 73 is used to prompt that the current enters the filter mode and the type is a black and white filter.

[0138] The user occludes the camera. When the phone detects that the occlusion gesture is removed, the phone switches the mode and enters an AR sticker mode. The image processing mode corresponding to the AR sticker mode is used to process the image collected by the camera. Based on the default initial type of the AR sticker mode being a "flower" sticker, the image processing mode corresponding to the "flower" sticker is used to process the image collected by the camera to obtain a second preview image. As shown in FIG. 10B , the second preview image and a prompt box 74 are displayed on the preview box 410. The text "AR sticker: flower" displayed on the prompt box 74 is used to prompt that the current enters the AR sticker mode and the type is a flower sticker. The image stylization effects of the first preview image and the second preview image are different. The second preview image does not have a black and white filter relative to the first preview image, and the second preview image has a flower sticker 71 added.

[0139] The user can continue to use the occlusion gesture to switch different modes. The user confirms to enter the AR sticker mode, and then the user can long press the volume key to confirm to enter the AR sticker mode. The user occludes the camera. When the phone detects that the occlusion gesture is removed, the phone switches different types in the AR sticker mode. For example, FIG. 10B , the initial type is a "flower" sticker, the phone switches to a "rabbit ear" sticker, and the phone uses the image processing mode corresponding to the "rabbit ear" sticker to process the image collected by the camera to obtain a third preview image. As shown in FIG. 10CAs shown, the third preview image and a prompt box 75 are displayed on the preview box 410, and the prompt box 75 displays a text prompt "AR Sticker: Rabbit Ear" indicating that the AR Sticker mode is currently entered, and the type is a rabbit ear sticker. The third preview image is different from the image stylization effect of the second preview image, and the third preview image deletes the flower sticker 71 and adds the rabbit ear sticker 72 relative to the second preview image.

[0140] In combination with the above embodiments and related drawings, the embodiments of the present application provide a photographing method, which can be implemented in the electronic device described above. Taking the electronic device as a mobile phone as an example, please refer to FIG. 11 , FIG. 11 A flowchart of a photographing method provided by the embodiments of the present application. The photographing method includes the following steps:

[0141] Step 111, in response to a first operation, starting a camera application.

[0142] In the embodiments of the present application, the mobile phone is installed with a camera application. When the user wants to take a selfie using the mobile phone, the user can first start the camera application in the mobile phone.

[0143] In the embodiments of the present application, the user can input a first operation (for example, a touch operation, a key operation, a gesture operation, or a voice operation, etc.) to the mobile phone to instruct the mobile phone to start the camera application.

[0144] For example, as shown in FIG. 4A , the mobile phone detects the operation of the user clicking the icon 45 of the camera, and the mobile phone starts the camera application in response to the operation. For another example, the mobile phone can also start the camera application in response to other first operations, such as a shortcut gesture operation (for example, three-finger downward sliding, rightward sliding, or leftward sliding, etc.), or a voice instruction (for example, "open the camera"), etc.

[0145] In the embodiments of the present application, the outer screen or the inner screen of the mobile phone can receive the first operation of the user, and the present application does not make specific limitations thereon. For example, for a folding smart phone in a folded state, the camera application can be quickly started through the outer screen. For example, the outer screen displays time information by default, and the user can instruct the mobile phone to start the camera application by sliding the outer screen left or right.

[0146] The camera application can be a standalone application installed on an electronic device (e.g., a mobile phone). The application can be a downloadable application or an embedded application (i.e., a system application of the electronic device) in the electronic device. The embedded application is an application provided as part of the implementation of the electronic device. For example, the embedded application can be a "Settings" application, a "Short Message" application, and a "Camera" application, etc. The downloadable application is an application that can provide its own internet protocol multimedia subsystem (IMS) connection. The downloadable application can be an application pre-installed in the electronic device or an application provided by a third party and installed in the electronic device by a user.

[0147] In the embodiments of the present application, the camera application can include a plurality of image styles, which can provide a plurality of image stylization effects for the user. The plurality of image styles include filters, magic sky change, AR stickers, AR avatars, watermarks, photo frames, special effects, beautification, camera modes, etc.

[0148] In some embodiments, the camera application can be associated with a plurality of software development kits (SDKs) including image processing algorithms related to image styles, i.e., the SDKs are related to image styles. For example, the camera application can include a plurality of SDKs; or the camera application and the plurality of SDKs are both included in the electronic device (e.g., a mobile phone), but the camera application is associated with the plurality of SDKs, so that after the camera application is started, the SDKs can be called. The image processing algorithms in the SDKs include filter algorithms, magic sky change algorithms, AR sticker algorithms, AR avatar algorithms, watermark algorithms, photo frame algorithms, special effect algorithms, beautification algorithms, and camera algorithms, etc. The camera application can achieve the image stylization effects corresponding to the above image styles by calling the SDKs.

[0149] In some embodiments, in addition to integrating a plurality of SDKs, the camera application can also integrate a plurality of image processing algorithms (e.g., filter algorithms, magic sky change algorithms, AR sticker algorithms, AR avatar algorithms, watermark algorithms, photo frame algorithms, special effect algorithms, beautification algorithms, and camera algorithms, etc.) related to image styles. In this scenario, the camera application no longer needs to call the SDKs and can achieve the image stylization effects corresponding to the above image styles by directly selecting a certain image processing algorithm.

[0150] In the embodiments of the present application, after starting the camera application, the mobile phone can present a shooting interface of the camera application as shown in FIG. 4B The mobile phone can also display a shooting interface of the camera application as shown in FIG. 4DThe illustrated occlusion gesture switch 416 and the image style option 417. The machine can also display the image style selection box 406 as shown. FIG. 4E The illustrated image style selection box 406.

[0151] It can be understood that the interface design corresponding to the start of the "occlusion gesture" function and the selection of the "image style" can also include other, and the "occlusion gesture" switch and the image style switch can be set in the shooting interface, and the present application does not make specific limitation.

[0152] It should be noted that the above-mentioned image style is a function provided by the existing camera application, which will not be described here. It should be understood that the image style is not limited to the above-mentioned list, and can be updated with the update of the camera application. When the camera application is updated with a new image style, the new image style can be automatically added to FIG. 4E The illustrated image style selection box 406.

[0153] Step 112, starting the camera to collect images through the camera.

[0154] In the embodiment of the present application, the mobile phone opens the camera application, the mobile phone determines one or more cameras that need to be used, and then starts the drive of the one or more cameras that need to be used by calling the kernel layer, and collects static images or videos through the one or more cameras. After starting the camera, the camera can collect images in real time and continuously.

[0155] After starting the camera application, the rear camera can be started or the front camera can be started. By default, the camera started when the camera application is started is the rear camera. The mobile phone detects the operation of the user on the switching control, and the mobile phone responds to the operation to close the rear camera and start the front camera.

[0156] Step 113, processing the images collected by the camera by using a first image processing mode to obtain a first preview image.

[0157] In the embodiment of the present application, after starting the camera, the camera continuously collects images, and the images continuously collected by the camera are video streams. The mobile phone processes the images collected by the camera by using a first image processing mode, that is, processes the video streams collected by the camera.

[0158] The mobile phone processes the images collected by the camera by using a first image processing mode, including the following cases:

[0159] Case one, the user does not select the image style, and the camera application does not set the default image style, then the first image processing mode is the image processing mode irrelevant to the image style.

[0160] Exemplarily, it is assumed that FIG. 4DThe image style "filter" is not set by default in the corresponding image style option, and the user does not select the image style option, that is, the image style option is not triggered to select the image style. The phone, in response to the first operation, starts the camera application and the camera, and processes the image collected by the camera by using a first image processing mode, to obtain a first preview image. The first image processing mode is an image processing mode in which the phone does not call an SDK related to the image style, or does not select an image processing algorithm related to the image style to process the image collected by the camera. For example, the first image processing mode can be an image processing mode in which the resolution of the image collected by the camera is adjusted. The image stylization effect of the first preview image is null, that is, blank.

[0161] In some embodiments, the user does not select an image style, and the camera application does not set a default image style. The phone can select any image style from the image style selection box 406 as the current target image style, and process the image collected by the camera by using the first image processing mode corresponding to the target image style.

[0162] In case two, the user has pre-set an image style, or the camera application has a default image style. Before the phone executes step 123, the user has set an image style, or the camera application has a default image style, so the first image processing mode is the image processing mode corresponding to the pre-set image style or the default image style set by the camera.

[0163] For example, as shown in FIG. 4D , the user has pre-set the image style (or the camera application has set a default image style) to be a filter. After starting the camera application and the camera, the phone processes the image collected by the camera according to the image processing mode corresponding to the filter, that is, the phone calls an SDK related to the filter or selects an image processing algorithm related to the filter to process the image collected by the camera. Based on the initial type of the filter style being a black-and-white filter, the phone calls an SDK related to the black-and-white filter or selects an image processing algorithm related to the black-and-white filter to process the image collected by the camera, to add a black-and-white filter to the image collected by the camera, to obtain a first preview image. As shown in FIG. 4B and 4C , the image displayed in the preview box 410 is the first preview image, and the corresponding image stylization effect is a black-and-white filter.

[0164] In case three, the user selects an image style. Before the phone executes step 123, the user has selected an image style, so the first image processing mode is the image processing mode corresponding to the image style selected by the user.

[0165] For example, as shown in FIG. 4A to FIG. 4E and FIG. 5A to FIG. 5C, the user selects an image style as an AR sticker, and after the mobile phone obtains the image collected by the camera, the mobile phone processes the collected image according to the image processing mode corresponding to the AR sticker, that is, the mobile phone calls the SDK related to the AR sticker or selects the image processing algorithm related to the AR sticker to process the image collected by the camera. Based on the initial type of the AR sticker style being a "flower" sticker, the mobile phone calls the SDK related to the "flower" sticker or selects the image processing algorithm related to the "flower" sticker to process the image collected by the camera. The "flower" sticker is added to the image collected by the camera to obtain a first preview image. As shown in FIG. 5C , the image displayed in the preview frame 410 is the first preview image, and the corresponding image stylization effect is the "flower" sticker.

[0166] Step 114: performing occlusion detection in the imaging direction of the camera to obtain an occlusion detection result.

[0167] In the embodiments of the present application, the mobile phone starts the camera at the same time, and performs occlusion detection in the imaging direction of the started camera. The detection process is performed in real time.

[0168] The imaging direction of the camera includes the orientation of the camera. It can be understood that after the camera is started, the object corresponding to the image collected by the camera appears in the imaging direction of the camera. For example, the camera collects an image of an object, that is, the object appears in the imaging direction of the camera. The image collected by the camera includes part a of object A and part c of object B, that is, part a and part c appear in the imaging direction of the camera.

[0169] In some embodiments, the mobile phone can perform occlusion detection in the imaging direction of the camera at the same time when the mobile phone starts the camera after detecting that the user has turned on the "occlusion gesture" switch. If the mobile phone detects that the user has not turned on the "occlusion gesture" switch, the mobile phone does not perform occlusion detection on the camera when starting the camera.

[0170] In the embodiments of the present application, the mobile phone performs occlusion detection in the imaging direction of the camera, which includes detecting whether there is an occlusion object in the imaging direction of the camera. If there is an occlusion object, the camera is occluded. If there is no occlusion object, the camera is not occluded. As shown in FIG. 6B , the straight mobile phone detects whether there is an occlusion object in the imaging direction of the front camera 193A, which can be understood as detecting whether there is an occlusion object in the shooting range R1. As shown in FIG. 8B , the folding smart phone detects whether there is an occlusion object in the imaging direction of the rear camera (193B1 and 193B2), which can be understood as detecting whether there is an occlusion object in the shooting range R2 and R3.

[0171] In some embodiments, the phone detects whether there is an occlusion in the direction of the camera of the camera by measuring the distance between the camera and the object closest to the camera. The specific ranging identification method can use existing technology. For example, monocular camera ranging can be used, and binocular camera ranging can also be used. For example, for a monocular camera, ranging can be performed by a Time of Flight (ToF) sensor. That is, the ToF sensor sends continuous light pulses, and receives light returned from the object, and calculates the flight time of the light to obtain the distance between the object and the camera, and the distance between the object and the camera is the occlusion detection result. For cameras with two or more lenses, a simultaneous localization and mapping (SLAM) scheme can be used to calculate the distance between the object and the camera according to the distance and angle of the camera movement (when a person holds a phone, the person's hand is constantly moving, but the amplitude is very small, so the camera is also constantly moving), and the distance between the object and the camera is the occlusion detection result.

[0172] In some embodiments, the phone obtains a plurality of images captured by the camera, the plurality of images are adjacent, and the plurality of images can be understood as a small section of a complete video stream in the video stream captured by the camera. The phone performs image analysis on the plurality of images, and obtains an occlusion detection result according to the image analysis result. The image analysis on the plurality of images can be identifying at least one image feature of the image, and the at least one image feature or a combination thereof represents the brightness of the image. For example, the at least one image feature includes image brightness and color features, and the brightness of the image is determined by the image brightness and color features. The image analysis on the plurality of images extracts the image brightness and color features of the plurality of images, detects that the brightness of the plurality of images changes, such as detecting that the plurality of images change from bright to dark, and the average brightness of the last image (i.e., the image captured last by the camera in the plurality of images) is less than or equal to a preset value. The occlusion detection result can include the average brightness of each image in the plurality of images, and the occlusion detection result can also include the brightness change between the plurality of images, such as the average brightness of the images gradually decreasing (i.e., the adjacent plurality of images gradually darkening) with the time of capturing the plurality of images.

[0173] In some embodiments, the phone performs occlusion detection in the direction of the camera of the camera includes: when the phone detects that there is an occlusion in the direction of the camera of the camera, the phone can also detect whether the occlusion is the user's hand. For example, an infrared sensor is installed on the phone, and the infrared sensor is used to detect whether the occlusion is a human body. If the occlusion is a human body, the occlusion detection result is that the occlusion is the user's hand, and if the occlusion is not a human body, the occlusion detection result is that the occlusion is not the user's hand.

[0174] In the embodiments of the present application, the user turns on the "obstruction gesture" switch, the mobile phone detects that there is an obstruction in the imaging direction of the camera, and the obstruction is a human body, which can be understood as the user using a hand to obstruct the camera, so the possibility that the obstruction is the user's hand is relatively large. The mobile phone detects that the "obstruction gesture" switch has been turned on, and that there is an obstruction in the imaging direction of the camera, and the obstruction is a human body, so the mobile phone considers that the obstruction is the user's hand.

[0175] In some embodiments, steps 122 and 124 can be performed simultaneously, for example, when the camera is started, it can be detected by ranging whether there is an obstruction in the imaging direction of the camera. In some embodiments, step 124 is performed after step 123, for example, by image analysis on the multiple frames of images collected by the camera to detect whether there is an obstruction in the imaging direction of the camera.

[0176] Step 115, judging whether an obstruction gesture appears in the imaging direction of the camera according to the obstruction detection result.

[0177] In the embodiments of the present application, the mobile phone judges whether an obstruction gesture appears in the imaging direction of the started camera according to the obstruction detection result, which includes: the mobile phone judges whether there is an obstruction in the imaging direction of the camera according to the obstruction detection result. If there is no obstruction, step 124 can be continued. If there is an obstruction, it is judged that an obstruction gesture appears in the imaging direction of the camera, otherwise, no obstruction gesture appears.

[0178] In actual application scenarios, users generally use their hands to obstruct the camera, so it is usually to identify the obstruction of "hand gesture". However, if the user uses an object or other body parts to obstruct, the mobile phone judges that there is an obstruction in the imaging direction of the camera according to the obstruction detection result, and also considers that "obstruction gesture" appears in the imaging direction of the camera.

[0179] In some embodiments, the identification of the obstruction of the object other than the human body can be excluded. If it is judged that there is an obstruction in the imaging direction of the camera, it is further judged whether the obstruction is the user's hand. If the obstruction is not the user's hand, step 124 can be continued. If the obstruction is the user's hand, it is judged that an obstruction gesture appears in the imaging direction of the camera, otherwise, no obstruction gesture appears.

[0180] In the embodiments of the present application, judging whether there is an obstruction in the imaging direction of the camera according to the obstruction detection result can include but is not limited to the following cases:

[0181] Case one: when it is detected that the distance between the object (such as the user's hand) and the started camera satisfies the preset condition, there is an obstruction in the imaging direction of the camera.

[0182] In the embodiments of the present application, when the distance between the object and the started camera is less than or equal to the preset distance, the distance between the object and the started camera satisfies the preset condition, and there is an occlusion in the imaging direction of the camera. The preset distance is used to exclude the misidentification of identifying a normally photographed object as an "occlusion gesture". When the distance between the object and the started camera is less than or equal to the preset distance, it is considered that the object occludes the camera, and the object is an occlusion. When the distance between the object and the started camera is greater than the preset distance, it is considered that the object does not occlude the camera, and it is determined that there is no occlusion in the imaging direction of the camera.

[0183] In some embodiments, the preset distance can be the distance between the palm of the user's hand and the camera when the palm center of the palm of the user's hand is aligned with the center of the camera, and the image area of the palm in the image collected by the camera accounts for more than or equal to a preset percentage of the entire image. The preset percentage can be 90% to 100%. The preset percentage can be set according to actual conditions, which is not limited in the present application.

[0184] In some embodiments, the preset distance is 3 to 10 centimeters.

[0185] It should be noted that in some cases, the distance between the object and the camera can be close to 0, that is, the object can be close to the camera, and there is an occlusion in the imaging direction of the camera. As shown in FIG. 8, when a user takes a selfie using a folding smartphone in a folded state, the user can use the thumb to occlude the rear camera. When the user takes a selfie using a folding smartphone in a folded state, based on the smaller model, the user is easy to touch the camera, and therefore the occlusion and removal of the occlusion gesture to the camera are set as a trigger mode to trigger the phone to switch the image processing mode. The user can easily occlude the camera and remove the occlusion to the camera when taking a selfie, that is, the user can more conveniently and quickly switch the image processing mode.

[0186] In some embodiments, the phone detects that the distance between the object and the started camera is within a preset distance range, the distance between the object and the started camera satisfies the preset condition, and there is an occlusion in the imaging direction of the camera. The preset distance range is used to exclude the misidentification of identifying a normally photographed object as an "occlusion gesture". When the distance between the object and the started camera is within the preset distance range, it is considered that the object occludes the camera, and the object is an occlusion. When the distance between the object and the started camera is not within the preset distance range, it is considered that the object does not occlude the camera, and it is determined that there is no occlusion in the imaging direction of the camera.

[0187] In some embodiments, when a user holds the mobile phone with one hand, the movement of the fingers (e.g. the thumb) of the hand is likely to block the camera of the mobile phone, resulting in misrecognition. Therefore, the minimum value of the preset distance range can be set as the maximum distance between the fingers (e.g. the thumb) of the hand and the mobile phone when the user holds the mobile phone with one hand. The maximum value of the preset distance range can be the preset distance described above. For example, the minimum value of the preset distance range can be 3-5 cm. The maximum value of the preset distance range is greater than the minimum value of the preset distance range. If the minimum value of the preset distance range is 3 cm, the maximum value of the preset distance range is a value greater than 3 cm.

[0188] It can be understood that the minimum value of the preset distance range should not be too small. If it is set too small, when the user holds the mobile phone with one hand, the movement of the fingers (usually the thumb) of the hand is likely to block the camera, resulting in misrecognition. The maximum value of the preset distance range should not be set too large. If it is set too large, any object captured by the camera can be misrecognized as a "blocking gesture".

[0189] In case two, the plurality of adjacent images captured by the camera change from bright to dark, and the average brightness of the last image is less than or equal to a preset value, indicating that there is an occlusion object in the camera direction of the camera.

[0190] For example, the camera sequentially captures images A1-A5 within a certain time, i.e. image A2 is captured after image A1, image A3 is captured after image A2, image A4 is captured after image A3, and image A5 is captured after image A4. The mobile phone detects that the images A1-A5 change from bright to dark, e.g. the mobile phone calculates the average brightness of the five images respectively, detects that the average brightness of image A2 is less than that of image A1, the average brightness of image A3 is less than that of image A2, the average brightness of image A4 is less than that of image A3, the average brightness of image A5 is less than that of image A4, and the average brightness of image A5 is less than or equal to a preset value, indicating that there is an occlusion object in the camera direction of the camera.

[0191] It can be understood that the specific number of the plurality of adjacent images sequentially captured by the camera within a certain time is not limited. The mobile phone detects that the plurality of adjacent images change from bright to dark, and the average brightness of a certain image (e.g. the last image captured by the camera) in the plurality of images is less than or equal to a preset value, indicating that there is an occlusion object in the camera direction of the camera.

[0192] The preset value can be set according to actual conditions, which is not limited in the embodiments of the present application.

[0193] When the mobile phone determines, according to the blocking detection result, that no blocking gesture appears in the imaging direction of the camera, the mobile phone continues to execute step 124. When the mobile phone determines, according to the blocking detection result, that a blocking gesture appears in the imaging direction of the camera, the mobile phone executes step 126.

[0194] In the embodiments of the present application, the appearance of a blocking gesture in the imaging direction of the camera can be determined in combination with the above-mentioned case one and case two.

[0195] When the mobile phone detects that the blocking gesture moves away in the imaging direction of the camera, the mobile phone processes the newly collected image by using a second image processing mode to obtain a second preview image, wherein the distance between the blocking gesture and the camera is less than or equal to a preset distance, and the first image processing mode and the second image processing mode correspond to different image stylization effects.

[0196] In the embodiments of the present application, before the newly collected image is processed by using the second image processing mode, the mobile phone detects that the user turns on the "blocking gesture" switch and selects an image style. When the mobile phone detects that the blocking gesture moves away in the imaging direction of the camera, the mobile phone processes the image collected by the camera by using a second image processing mode different from the first image processing mode. It can be understood that after the camera is started, the camera continuously collects images, and the mobile phone processes the images collected by the camera in real time to obtain a preview stream, and the mobile phone also displays the preview stream in real time. The mobile phone processes the image A collected by the camera by using the first image processing mode, and processes the newly collected image B by using the second image processing mode, wherein the image A and the image B are not the same image, and the image B is the image collected by the camera after the image A.

[0197] In the embodiments of the present application, the detection of the mobile phone that the blocking gesture moves away in the imaging direction of the camera can include but is not limited to the following cases:

[0198] Case one: when the distance between the blocking gesture and the started camera does not satisfy a preset condition, it is detected that the blocking gesture moves away in the imaging direction of the camera.

[0199] In the embodiments of the present application, when the mobile phone detects that the distance between the blocking gesture and the started camera is greater than a preset distance, the distance between the blocking gesture and the started camera does not satisfy the preset condition, and the blocking gesture moves away in the imaging direction of the camera.

[0200] Case two: when the multiple adjacent images collected by the camera change from dark to bright, and the average brightness of the last image of the multiple adjacent images is detected to be greater than a preset value, it is detected that the blocking gesture moves away in the imaging direction of the camera.

[0201] For example, the camera sequentially captures images A1 to A5 within a certain time, i.e., image A2 is captured after image A1, image A3 is captured after image A2, image A4 is captured after image A3, and image A5 is captured after image A4. The mobile phone detects that images A1 to A5 change from dark to light, such as the mobile phone calculating the average brightness of the five frames of images respectively, detecting that the average brightness of image A2 is greater than that of image A1, the average brightness of image A3 is greater than that of image A2, the average brightness of image A4 is greater than that of image A3, the average brightness of image A5 is greater than that of image A4, and the average brightness of image A5 is greater than a preset value, and it is detected that the blocking gesture is removed in the camera shooting direction.

[0202] It can be understood that the specific number of the plurality of adjacent images sequentially captured by the camera within a certain time is not limited, and the mobile phone detects that the plurality of adjacent images change from dark to light, and it can be judged that the blocking gesture is removed in the camera shooting direction. Alternatively, the mobile phone detects that the plurality of adjacent images change from dark to light, and the average brightness of a certain frame of image (for example, the image captured last by the camera in the plurality of images) in the plurality of images is greater than a preset value, and it is detected that the blocking gesture is removed in the camera shooting direction.

[0203] In some embodiments, if the infrared sensor detects that the blocking object is the user's hand, the infrared sensor can be used to detect whether a human body is currently detected, and if no human body is detected, it is detected that the blocking gesture is removed in the camera shooting direction.

[0204] In some embodiments, after it is judged according to the blocking detection result that the blocking gesture appears in the camera shooting direction, if it is detected that the blocking gesture is removed within a preset time period, a second image processing method is used to process the newly captured image. If it is not detected that the blocking gesture is removed within the preset time period, it is judged that the current blocking is a false trigger, and the first image processing method can be continued to be used to process the newly captured image.

[0205] For example, it is judged that the blocking gesture appears in the camera shooting direction at T0, and it is detected that the gesture is removed at T2. If the time period between T2 and T0 is within a preset time period (such as 2 seconds), the second image processing method is used to process the newly captured image. If the time period between T2 and T0 exceeds the preset time period (such as 2 seconds), the first image processing method is used to process the newly captured image.

[0206] In the embodiments of the present application, when the user triggers the switching of the image style using the "occlusion gesture", the user generally quickly uses the occlusion gesture to occlude the camera and quickly moves away. If the occlusion gesture occludes the camera for a preset time and has not moved away, the occlusion gesture may be a false occlusion, and the occlusion that has not moved away within the preset time period does not trigger the switching of the image processing mode.

[0207] In some embodiments, the preset time period can be 1 second, 2 seconds or 3 seconds, and the preset time period can be set according to actual conditions, which is not specifically limited in the embodiments of the present application.

[0208] In some embodiments, before the newly collected image is processed using the second image processing mode, the method further includes: displaying a setting list, the setting list including image style options, wherein the image style options are used for the user to select the image style controlled by the occlusion gesture; and in response to the user's selection operation on the image style option, obtaining a target image style. Then, the newly collected image is processed using the second image processing mode to obtain a second preview image, including: obtaining a second image processing mode corresponding to the target image style; and processing the newly collected image using the second image processing mode to obtain a second preview image.

[0209] For example, as FIG. 4D to FIG. 4E shown in FIG. 4B, the user triggers the image style option 417, and selects the target style as "AR sticker" in the image style selection box 406. Please refer to FIG. 6A to FIG. 6C and FIG. 7A to FIG. 7C , before the user occludes the front camera, the preview frame 410 on the phone displays the first preview image obtained by processing the image collected by the front camera using the first image processing mode, and the corresponding image stylization effect is "flowers". After moving away the occlusion of the front camera, the preview frame 410 on the phone displays the second preview image obtained by processing the image collected by the front camera using the second image processing mode, and the corresponding image stylization effect is "rabbit ears".

[0210] In some embodiments, it is detected that the camera application updates a new image style, and the new image style is added to the above-mentioned setting list.

[0211] In the embodiments of the present application, when the mobile phone detects that the gesture moving away is detected in the camera shooting direction, the newly collected image is processed by using a second image processing mode to obtain a second preview image, wherein the second image processing mode is different from the first image processing mode in step 123. The first image processing mode and the second image processing mode correspond to different image stylization effects, and correspondingly, the image stylization effects of the first preview image and the second preview image are different. It can be understood that for any image collected by the camera, the first image processing mode can obtain the first image stylization effect, and the second image processing mode can obtain the second image stylization effect.

[0212] Exemplarily, the first image processing mode is an image processing mode corresponding to a filter mode, and the second image processing mode can be an image processing mode corresponding to an AR sticker mode. Alternatively, the first image processing mode is an image processing mode corresponding to a black-and-white filter in the filter mode, and the second image processing mode is an image processing mode corresponding to a natural filter in the filter mode. Alternatively, the first image processing mode corresponds to a conventional image processing mode, i.e., an image processing mode not involving image stylization effect (for example, resolution adjustment), and the second image processing mode can correspond to an image processing mode involving image stylization effect (for example, filter, beauty, or AR sticker, etc.).

[0213] In some embodiments, the following step can also be included: when the gesture moving away is detected in the camera shooting direction, a third image processing mode is used to process the newly collected image to obtain a third preview image, and the third image processing mode and the second image processing mode correspond to different image stylization effects.

[0214] In the embodiments of the present application, after step 126, when the mobile phone detects that the gesture moving away is detected in the camera shooting direction, the newly collected image is processed by using a third image processing mode to obtain a third preview image, wherein the third image processing mode is different from the second image processing mode in step 126. The third image processing mode and the second image processing mode correspond to different image stylization effects, and correspondingly, the image stylization effects of the third preview image and the second preview image are different.

[0215] Exemplarily, the third image processing mode is an image processing mode corresponding to a filter mode, and the second image processing mode can be an image processing mode corresponding to an AR sticker mode. Alternatively, the third image processing mode is an image processing mode corresponding to a black-and-white filter in the filter mode, and the second image processing mode is an image processing mode corresponding to a natural filter in the filter mode.

[0216] In the embodiments of the present application, the mobile phone detects that the shielding gesture is removed in the camera shooting direction, and then switches the image processing mode once, and uses an image processing mode different from the previous one.

[0217] In some embodiments, the mobile phone can display the preview image (the first preview image, the second preview image or the third preview image) and the name of the image style (the image style corresponding to the first image processing mode, the second image processing mode or the third image processing mode). For example, the mobile phone can display the name of the image style corresponding to the second image processing mode and the second preview image.

[0218] In some embodiments, the electronic device includes an inner screen and an outer screen, the outer screen and the rear camera are arranged on the same side of the electronic device, and the inner screen and the outer screen are opposite to each other. Therefore, the first preview image or the second preview image can be displayed on the inner screen and the outer screen at the same time. For example, for a folding smart phone, after the camera captures an image, the mobile phone processes the image captured by the camera and outputs a preview image, and the preview image (the first preview image, the second preview image or the third preview image) is displayed on the inner screen and the outer screen at the same time.

[0219] In some embodiments, when the electronic device is in a folded state, the inner screen is turned off, and the outer screen displays the first preview image or the second preview image. For example, for a folding smart phone in a folded state, the preview image (the first preview image, the second preview image or the third preview image) is displayed on the outer screen.

[0220] In the embodiments of the present application, through simple interaction between the gesture and the camera, the control of some complex image styles can be completed, so that when taking a selfie using the camera, it is no longer a simple shooting, but a more complex image style switching can also be realized. The interaction method is simple and convenient, and the user can easily complete the image style setting and switching through the display screen (such as the outer screen or the inner screen) by holding the mobile phone with one hand and cooperating with the camera with the other hand to shield and remove the shielding of the camera. It is not necessary to unfold the folding mobile phone or flip the mobile phone to the inner screen to operate the camera application, select the image style, and then flip or fold the mobile phone. The shielding gesture can be used to switch between different image styles (different modes or different types in the same mode), and then switch between different types in the mode through the shielding gesture. Thus, most of the functions of the camera application can be switched, and similar effects to operating the camera interface can be achieved.

[0221] The embodiments also provide a computer program product, which, when running on a computer, causes the computer to execute the above-mentioned related steps to realize the shooting method of the application program in the above-mentioned method embodiments.

[0222] In addition, the embodiment of the present application further provides an apparatus, which can be a chip, a component or a module, and the apparatus can include a processor and a memory connected to each other; the memory is used to store computer-executed instructions; when the apparatus is running, the processor can execute the computer-executed instructions stored in the memory, so that the chip executes the application shooting method in the above-mentioned method embodiments.

[0223] The electronic device, the computer storage medium, the computer program product or the chip provided in the embodiment are used to execute the corresponding method provided above, and thus the beneficial effects achieved by the electronic device, the computer storage medium, the computer program product or the chip can refer to the beneficial effects of the corresponding method provided above, which will not be repeated here.

[0224] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity, only the division of the above functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above.

[0225] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other ways. For example, the apparatus embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can be in another division manner, for example, a plurality of units or components can be combined or integrated into another apparatus, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.

[0226] The units described as separate components can or can not be physically separate, and the components shown as units can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed in multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0227] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit.

[0228] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The software product is stored in a storage medium, including a number of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0229] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed in the present application should be covered within the protection scope of the present application.

Claims

1. A shooting method, applied to an electronic device with a camera, characterized in that, The electronic device includes an inner screen and an outer screen, the inner screen and the outer screen are opposite to each other, and the method includes: Displaying a camera setting interface of a camera application on the inner screen, the camera setting interface including a first control for turning on or off a blocking gesture function for triggering the electronic device to switch an image processing mode of an image captured by the camera in response to a blocking gesture against the camera; In response to a first operation against the first control, the blocking gesture function is turned on; In response to a second operation, the camera application is started, the second operation being an operation received by the outer screen when the electronic device is in a folded state and the inner screen is turned off; Starting the camera to capture an image through the camera; Processing the captured image using a first image processing mode; When a blocking gesture is detected in the camera direction, and the blocking gesture is detected to move away within a preset time period, processing the newly captured image using a second image processing mode, wherein the distance between the blocking gesture and the camera is less than or equal to a preset distance, and the first image processing mode and the second image processing mode correspond to different image stylization effects.

2. The photographing method of claim 1, wherein The preset distance is 3-10 cm.

3. The photographing method of claim 1, wherein When a blocking gesture is detected in the camera direction, the multiple images captured by the camera change from bright to dark.

4. The photographing method according to any one of claims 1 to 3, characterized by, After the newly captured image is processed using the second image processing mode, the method further includes: When the blocking gesture is detected to move away in the camera direction, processing the newly captured image using a third image processing mode, wherein the third image processing mode and the second image processing mode correspond to different image stylization effects.

5. The photographing method according to any one of claims 1 to 3, wherein Before the newly captured image is processed using the second image processing mode when the blocking gesture is detected in the camera direction and the blocking gesture is detected to move away within a preset time period, the method further includes: Displaying a setting list including image style options, wherein the image style options are used for a user to select an image style controlled by the blocking gesture; In response to the user's selection operation on the image style options, a target image style is obtained; The newly captured image is processed using the second image processing mode, including: Obtaining a second image processing mode corresponding to the target image style; Processing the newly captured image using the second image processing mode.

6. The photographing method of claim 5, wherein, The method further includes: Detecting that the camera application updates a new image style, and adding the new image style to the setting list.

7. The photographing method according to any one of claims 1 to 3, wherein Processing the captured image using the first image processing mode, including: Processing the captured image using the first image processing mode to obtain a first preview image; Processing the newly captured image using the second image processing mode, including: Processing the newly captured image using the second image processing mode to obtain a second preview image; The method further includes: Displaying the first preview image and the name of the image style corresponding to the first image processing mode; Display the name of the image style corresponding to the second preview image and the second image processing mode.

8. The photographing method of claim 7, wherein, The method further includes: Displaying the first preview image or the second preview image based on the outer screen.

9. The method of any one of claims 1 to 3, wherein, The camera is a front camera or a rear camera.

10. An electronic device, comprising: Comprise: At least one memory for storing programs; And At least one processor for executing the programs stored in the memory, when the programs are executed by the processor, so that the electronic device executes the photographing method as claimed in any one of claims 1 to 9.

11. An electronic device, comprising: Comprise: Outer screen; Inner screen, opposite to the outer screen; Camera for collecting images; One or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory, when the one or more programs are executed by the processor, so that the electronic device executes the following steps: displaying a camera setting interface of a camera application on the inner screen, the camera setting interface comprising a first control for opening or closing a shielding gesture function, the shielding gesture function being used to trigger the electronic device to switch the image processing mode of the image collected by the camera in response to a shielding gesture against the camera; in response to a first operation against the first control, the shielding gesture function is opened; In response to a second operation, starting the camera application, the second operation being an operation received by the outer screen when the electronic device is in a folded state, and the inner screen is off; Starting the camera to collect images through the camera; Using a first image processing mode to process the collected images; when a shielding gesture is detected in the camera direction, and the shielding gesture is detected to move away within a preset time period, a second image processing mode is used to process the newly collected images, wherein the distance between the shielding gesture and the camera is less than or equal to a preset distance, the first image processing mode and the second image processing mode correspond to different image stylization effects; the outer screen is used to display the images obtained by processing the collected images using the first image processing mode or the second image processing mode.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises computer instructions, when the computer instructions run on the electronic device, so that the electronic device executes the method as claimed in any one of claims 1 to 9.

13. A computer program product, characterised in that, The computer program product comprises computer program code, when the computer program code is executed by a computer, the computer program code can make the computer execute the photographing method of any one of claims 1 to 9. The computer program product comprises computer program code, when the computer program code is executed by a computer, the computer program code can make the computer execute the photographing method of any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method for adjusting photographing preview effect of mobile terminal and mobile terminal

    CN110266948A

  • Mobile terminal and method for controlling the same

    KR1020150133466A

  • Mobile terminal

    KR1020160041544A