WO2022127787A1 - Image display method and electronic device - Google Patents

Image display method and electronic device Download PDF

Info

Publication number
WO2022127787A1
WO2022127787A1 PCT/CN2021/137940 CN2021137940W WO2022127787A1 WO 2022127787 A1 WO2022127787 A1 WO 2022127787A1 CN 2021137940 W CN2021137940 W CN 2021137940W WO 2022127787 A1 WO2022127787 A1 WO 2022127787A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
camera
electronic device
application
interface
Prior art date
Application number
PCT/CN2021/137940
Other languages
French (fr)
Chinese (zh)
Inventor
沈日胜
许虎
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022127787A1 publication Critical patent/WO2022127787A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters

Definitions

  • the present invention relates to the technical field of electronic devices, and in particular, to an image display method and electronic device.
  • the user experience can be improved by extending the animation duration of the camera app startup, but the duration of the camera app startup animation is usually determined by the system and cannot be modified. Extending the animation duration of the camera app launch can't really avoid the black background when the camera app launches. In addition, the animation time started by the camera application is too long, which will also affect the user experience.
  • the application can save a frame of the image sampled when the camera exits, as the background image the next time the camera application starts.
  • a part of the memory needs to be consumed to save the sampled images.
  • the electronics interface still presents a black background during camera startup.
  • an embodiment of the present invention provides an image display method.
  • the shooting preview interface of the electronic device displays a blurred image
  • the shooting preview interface of the electronic device displays the real-time image collected by the camera of the electronic device, which improves the user experience.
  • an embodiment of the present application provides an image display method, the method includes detecting a first operation of a user, and in response to the first operation, the electronic device displays a first shooting preview interface, the first shooting
  • the preview interface includes a first preview frame, the first preview frame displays a first image, and the first image is a blurred image; after a first preset time, the electronic device displays a second shooting preview interface, and the first image is a blurred image.
  • the second shooting preview interface includes a second preview frame, and the second preview frame displays an image captured in real time by a camera of the electronic device.
  • the first image is an image obtained by blurring an image collected by a camera of the electronic device.
  • the first preset time is a power-on time of the camera of the electronic device.
  • the method before the electronic device displays the first shooting preview interface, the method further includes: saving the first image.
  • saving the first image Through the above setting manner, during the startup process of the camera application, the first image can be quickly provided, the waiting time of the user is reduced, and the user experience is improved. All applications using the system camera service on the electronic device can obtain the stored image data through the RAM and ROM corresponding to the camera application when the camera is started, instead of saving the image data in its corresponding storage space separately, saving Memory.
  • the first image is a black image.
  • the blurring process is to use a blur coefficient to process the image collected by the camera.
  • a blurred image with a similar blurring degree to that in the focusing process can be obtained, so that the switching to the focusing process after displaying the blurred image is smoother, and the user experience is improved.
  • embodiments of the present application provide an electronic device, including one or more touch screens, one or more memories, and one or more processors; wherein the one or more memories store one or more computers a program; the one or more touch screens are used to detect a first operation of the user; in response to the first operation, the one or more touch screens are also used to display a first shooting preview interface, the first
  • the shooting preview interface includes a first preview frame, the first preview frame displays a first image, and the first image is a blurred image; after a first preset time, the one or more touch screens are also used to display the first image.
  • the second shooting preview interface includes a second preview frame, and the second preview frame displays the image captured by the camera of the electronic device in real time.
  • the first image is an image obtained by blurring an image collected by a camera of the electronic device.
  • the first preset time is a power-on time of the camera of the electronic device.
  • the one or more memories are used to save the first image.
  • the first image can be quickly provided, the waiting time of the user is reduced, and the user experience is improved.
  • All applications using the system camera service on the electronic device can obtain the stored image data through the RAM and ROM corresponding to the camera application when the camera is started, instead of saving the image data in its corresponding storage space separately, saving Memory.
  • the first image is a black image.
  • the one or more processors are configured to process the image collected by the camera by using a blur coefficient.
  • a blurred image with a similar blurring degree to that in the focusing process can be obtained, so that the switching to the focusing process after displaying the blurred image is smoother, and the user experience is improved.
  • embodiments of the present application provide a computer-readable storage medium, including instructions, when the instructions are executed on an electronic device, the electronic device is made to perform the above first aspect, or any of the above first aspects. An implementation of the method described.
  • an embodiment of the present application provides a computer program product, which, when the computer program product runs on an electronic device, enables the electronic device to perform the above first aspect, or any one of the above first aspect. method described.
  • the interface of the electronic device switches from displaying the blurred image of the last frame of image collected during the previous operation of the camera to displaying the image during the focusing process of the camera, and then to displaying the image after the focusing of the camera is completed.
  • the process of images is smoother, which improves the user experience.
  • all the application programs on the electronic device that use the system camera service can obtain the stored image data through the internal memory, and different application programs do not need to save memory separately.
  • FIG. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of an operating system in an electronic device provided by an embodiment of the present application.
  • FIG. 3A is a schematic diagram of a scene of starting a camera application according to an embodiment of the present application.
  • 3B is a schematic diagram of a scene where a camera application is started
  • FIG. 4 is a schematic diagram of an image display method provided by an embodiment of the present application.
  • FIG. 5 is an interaction diagram for querying and obtaining image data after blurring processing provided by an embodiment of the present application
  • FIG. 6 is an interaction diagram of a fuzzification process provided by an embodiment of the present application.
  • FIG. 7 is a flowchart of querying and acquiring image data after blurring processing provided by an embodiment of the present application.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure or characteristic described in connection with that embodiment is included in at least one embodiment of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • the term “when” may be interpreted to mean “if” or “after” or “in response to determining" or “in response to detecting" depending on the context.
  • the phrases “in determining" or “if detecting (the stated condition or event)” can be interpreted to mean “if determining" or “in response to determining" or “on detecting (the stated condition or event)” or “in response to the detection of (the stated condition or event)”.
  • the electronic device may be a portable electronic device that also includes other functions such as personal digital assistant and/or music player functions, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication capabilities (eg, a smart watch) Wait.
  • portable electronic devices include, but are not limited to, carry-on Or portable electronic devices with other operating systems.
  • the portable electronic device described above may also be other portable electronic devices, such as a laptop computer (Laptop) or the like with a touch panel or a touch-sensitive surface.
  • the above-mentioned electronic device may not be a portable electronic device, but a desktop computer.
  • FIG. 1 is a schematic structural diagram of an electronic device 100 .
  • the electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and an augmented reality (AR) device, virtual reality (virtual reality, VR) equipment, artificial intelligence (artificial intelligence, AI) equipment, wearable equipment, vehicle-mounted equipment, etc., the specific types of the electronic equipment are not particularly limited in this embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the electronic device 100 .
  • the I2S interface can be used for audio communication.
  • the processor 110 may contain multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 110 with the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • global positioning system global positioning system, GPS
  • global navigation satellite system global navigation satellite system, GLONASS
  • Beidou navigation satellite system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quadsi -zenith satellite system, QZSS
  • SBAS satellite based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • 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 or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED organic light-emitting diode
  • AMOLED organic light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • 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 converts it into an image visible to the naked eye.
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the camera 193 may be used to collect images, and send the collected images to the camera service module.
  • the camera 193 can receive the start-up instruction sent by the camera service module. After the camera 193 receives the start-up instruction, it takes a period of time to start up. After the camera 193 is started, it collects still images or videos through the photosensitive element.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process 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 and so on.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG Moving Picture Experts Group
  • MPEG2 moving picture experts group
  • MPEG3 MPEG4
  • MPEG4 Moving Picture Experts Group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • the Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, may include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the internal memory 121 may include random access memory (random access memory, RAM).
  • the RAM can be read and written at any time, and the read and write speed is fast.
  • the RAM is usually used as a temporary data storage medium for the operating system or other running programs. Once the power is turned off, the data stored in the RAM will be lost.
  • the internal memory 121 may also include a read-only memory (ROM), the data stored in the ROM is stable, and the data stored in the ROM will not change after the power is turned off.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor. For example, in this embodiment of the present application, the processor 110 may execute the instructions stored in the internal memory 121 for capturing images, acquiring images, extracting blur coefficients, blurring, and caching images.
  • the internal memory 121 may allocate corresponding storage spaces for different application programs.
  • the RAM and ROM in the internal memory 121 will allocate corresponding storage space for the camera application, which is used to save the image captured by the camera or the image after blurring.
  • the last frame of image captured during camera operation can be stored either in RAM or in ROM.
  • the blurred image can be stored either in RAM or in ROM.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • the gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 .
  • the angular velocity of electronic device 100 about three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light to the outside through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection.
  • Touch sensor 180K also called “touch device”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also referred to as a "touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to realize functions such as call and data communication.
  • the electronic device 100 employs an eSIM, ie: an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • FIG. 2 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present invention takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 as an example.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include an image processing module, and the image processing module has the functions of acquiring images, extracting blur coefficients, and blurring.
  • the image processing module can obtain the image collected by the camera through the internal memory, and extract the blur coefficient of the obtained image; the image processing module can also obtain the last frame of the image collected during the operation of the camera through the internal memory, and the collected image The last frame of the image is blurred; the image processing module can also save the blurred image in the RAM corresponding to the camera application, or save the blurred image in the ROM corresponding to the camera application.
  • the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide the communication function of the electronic device 100 .
  • the management of call status including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • a corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into raw input events (including touch coordinates, timestamps of touch operations, etc.). Raw input events are stored at the kernel layer.
  • the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon, for example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer.
  • the camera 193 captures still images or video.
  • FIG. 3A is a schematic diagram of a scene of starting a camera application according to an embodiment of the present application.
  • the interface of the electronic device displays a first image 301 .
  • the above-mentioned first image is an image obtained by blurring the last frame of image collected during the last camera operation.
  • the above-mentioned first image may also be a blurred image of the last frame of image collected during the first operation of the camera when the user uses the camera application for the first time.
  • the camera application startup process refers to the process from the camera application receiving the user's opening instruction (for example, the user's click on the control of the camera application displayed on the electronic device interface) to the camera being able to collect still images or videos through the photosensitive element , for example, the process of powering up the camera.
  • the running process of the camera including the camera receiving the start command, the camera powering on and starting, collecting still images or videos through the photosensitive element, the camera receiving the shutdown command, the camera stopping the process of collecting still images or videos, including the process of collecting still images or videos in response to user operations Image and the process of saving the image.
  • the above-mentioned blurring processing refers to using a preset blurring algorithm, and processing the image according to the blurring coefficient corresponding to the blurring algorithm.
  • the preset blur algorithm can be Gaussian blur algorithm, box blur algorithm, Kawase blur algorithm, double blur algorithm, bokeh blur algorithm, tilt-shift blur algorithm, aperture blur algorithm, granular blur algorithm, radial blur algorithm, direction blur
  • One of the algorithms such as fuzzy algorithm.
  • the above-mentioned preset fuzzy algorithm may also be other fuzzy algorithms that may be used, and the above-mentioned preset fuzzy algorithm is not particularly limited in this embodiment of the present application.
  • Different blurring algorithms have different blurring coefficients, wherein the blurring coefficient refers to a set of parameters corresponding to the blurring algorithms, and the parameters are used to adjust the blurring degree of the image.
  • the blur coefficient corresponding to the Gaussian blur algorithm is (scale, radius), where scale represents the magnification factor, and radius represents the radius.
  • the first preset time may be the time when the camera is powered on.
  • the time for the camera to be powered on includes the time when the camera application receives the user's opening instruction (for example, the user clicks on the controls of the camera application displayed on the interface of the electronic device), the time when the camera receives the startup instruction, the time when the camera is powered on and can pass the light sensor. The time elapsed between the capture of a still image or video by an element.
  • the first preset time can also be the time from when the camera application receives the user's opening instruction to the time when the camera can focus to present a clear image, that is, the time when the camera is powered on and the time when the camera completes the focusing process (focusing).
  • the process is that the camera can collect still images or videos through the photosensitive element, and the camera cannot focus to make the blurred image appear until the camera can focus and complete the time to display a clear image.
  • the focusing process is for the camera to adjust the distance of its own focus. the process of making the photos clear).
  • the first preset time may also be the time elapsed from the time when the camera application receives the user's opening instruction to the end of any time point during the camera focusing process.
  • the interface of the electronic device displays the second image 303 collected by the camera.
  • the above-mentioned second image refers to an image collected by the camera after focusing during the operation of the camera. During the operation of the camera, the camera will focus first, and the image collected during the focus will appear blurred to a certain extent. After the focus is completed, a second image 303 is displayed, and the second image is the image collected after the focus is completed.
  • the user currently wants to use the camera to capture an image of a potted plant. If the last time the user used the camera application, the last frame of image collected during the running of the camera was an image of a cup.
  • the blurred image of the cup image is displayed.
  • the camera After the camera application is started, the camera first focuses on the potted plants, and the captured images of the potted plants during the focusing process will be displayed, and the images of the potted plants collected during the focusing process will appear blurry. After the camera is focused, the image of the potted plant captured after focusing is displayed.
  • the problem that the black background is displayed for too long during the startup process of the camera application can be eliminated, and the user experience can be improved.
  • the user can directly open the camera application. For example, if a user wishes to use the camera to take pictures, when taking a video, the camera application can be directly opened.
  • the interface of the electronic device displays the blurred image of the last frame of the image collected during the previous camera operation. image.
  • the camera collects images, and when the electronic device receives the image data collected by the camera, the interface of the electronic device displays the image collected by the camera.
  • the images collected by the camera include images collected during the focusing process and images collected after the focusing is completed.
  • the user can also open the camera application through other applications.
  • the user can click "Scan" in the payment software, open the camera application, and use the camera to scan the payment QR code
  • some applications support the face recognition function to authenticate the user's identity.
  • the user can open the camera application through the application and use the camera to perform face recognition.
  • the electronic device displays the last frame of the image collected during the previous camera operation after blurring processing.
  • Image After the camera application is started, the camera can capture images, and when the electronic device receives the image data captured by the camera, the electronic device displays the image captured by the camera.
  • the images collected by the camera include images collected during the focusing process and images collected after the focusing is completed.
  • the following describes an image display method provided by an embodiment of the present application by taking a user directly opening a camera application as an example.
  • an image display method provided by an embodiment of the present application may include the following steps:
  • Step S401a The camera application sends an instruction to activate the camera to the camera.
  • Step S401b The camera application sends an instruction to acquire the image data of the last frame of image collected during the last camera operation after blurring processing to the image processing module.
  • step S401a and step S401b are parallel steps.
  • Step S402 the image processing module sends an instruction to the internal memory for acquiring the image data of the last frame of the image collected during the last camera operation after being blurred.
  • the internal memory includes RAM and ROM corresponding to the camera application.
  • the above-mentioned image processing module may store, in the RAM corresponding to the camera application, the blurred image data of the last frame of the image collected during the last camera operation.
  • the image processing module can also generate an image file from the image data of the last frame of the image collected during the last camera operation after the blurring process, and store the image file in the ROM corresponding to the camera application.
  • the image processing module can also generate an image file from the last frame of image data collected during the last camera running process, and store it in the ROM corresponding to the camera application.
  • the internal memory queries whether the RAM corresponding to the camera application stores the blurred image data of the last frame of the image collected during the last camera operation. If there is blurred image data of the last frame of image collected during the last camera operation, the blurred image data is sent to the image processing module. If the blurred image data is not available, check whether the ROM corresponding to the camera application stores an image file generated from the blurred image data of the last frame image collected during the last camera operation. If there is an image file generated from the blurred image data of the last frame of image collected during the last camera operation, load the image file into the RAM corresponding to the camera application, generate the corresponding image data, and store the image The data is sent to the image processing module.
  • the preset blur algorithm can be Gaussian blur algorithm, box blur algorithm, Kawase blur algorithm, double blur algorithm, bokeh blur algorithm, axis-shift blur algorithm, aperture blur algorithm, granular blur algorithm, radial blur algorithm, direction blur
  • One of the algorithms such as the fuzzy algorithm may also be other fuzzy algorithms that may be used, and the above-mentioned preset fuzzy algorithms are not particularly limited in this embodiment of the present application.
  • the above-mentioned blurring processing refers to using a preset blurring algorithm, and processing the image according to the blurring coefficient corresponding to the blurring algorithm.
  • the above-mentioned method for extracting the blur coefficient will be described in detail with reference to FIG. 5 and FIG. 6 in subsequent embodiments.
  • Step S403 the internal memory sends the image data of the last frame of the image collected during the last operation of the camera after the blurring process to the image processing module.
  • Step S404 The image processing module sends the blurred image data of the last frame of image collected during the last camera operation to the camera application. After the camera application receives the blurred image data of the last frame of the image collected during the last camera running process sent in step S404, the interface of the electronic device can display the blurred image of the last frame of the image collected during the last camera running process. processed image.
  • Step S405 the camera sends the collected image data to the image processing module.
  • D1 is used to represent the time for performing step S401a, the time for the camera to collect one frame of image, the sum of the time for the camera to perform step S405, and D2 is used to represent the time for performing steps S401b and S402, and the time between steps S403 and S404. and.
  • the duration of D1 is much longer than that of D2.
  • the above-mentioned fuzzy coefficient extraction method may include the following steps:
  • Step S501a the camera application sends an instruction to activate the camera to the camera.
  • Step S501b The camera application sends an instruction to acquire image data to the image processing module.
  • step S501a and step S501b are parallel steps.
  • Step S502 the camera sends the collected image data to the internal memory.
  • the camera After the camera receives the instruction to start the camera sent in step S501a, the camera is powered on, the camera collects images, and sends the collected image data to the internal memory. During the operation of the camera, focus will be performed first, and the images collected during the focusing process will be blurred to a certain extent.
  • the images collected by the camera include images collected during the focusing process and images collected after the focusing is completed.
  • the image data collected in step S502 are sent in the order of collecting images. During the operation of the camera, each time a frame of image is collected, the collected image data will be sent to the internal memory through step S502.
  • Step S503 The image processing module sends an instruction for acquiring image data to the internal memory.
  • the image processing module can obtain and extract the images collected in the above focusing process through the internal memory. Specifically, after the camera collects the image, it will send the collected image data to the internal memory, and the image collected by the camera includes the image in the focusing process.
  • Step S504 The internal memory sends the image data collected by the camera to the image processing module, where the internal memory sends the first frame of image collected by the camera, or the Nth frame of image collected by the camera, where N represents greater than or equal to 1. Integer. It should be explained that the Nth frame of images includes images collected during the focusing process of the camera.
  • Step S505 the image processing module extracts the blur coefficient after acquiring the first frame of image data collected by the camera.
  • the image processing module After the image processing module acquires the first frame of image collected by the camera, the image can be input into the blur coefficient model, and the model coefficient model can output a set of blur coefficients.
  • the above-mentioned fuzzy coefficient model can be obtained by artificial intelligence (artificial intelligence, AI) training according to a preset fuzzy algorithm.
  • the preset blur algorithm can be Gaussian blur algorithm, box blur algorithm, Kawase blur algorithm, double blur algorithm, bokeh blur algorithm, axis-shift blur algorithm, aperture blur algorithm, granular blur algorithm, radial blur algorithm, direction blur
  • One of the algorithms such as the fuzzy algorithm may also be other fuzzy algorithms that may be used, and the above-mentioned preset fuzzy algorithms are not particularly limited in this embodiment of the present application.
  • the fuzzy coefficients output by the fuzzy coefficient model are different.
  • a Gaussian blur algorithm is selected as the preset blur algorithm, and the blur coefficient corresponding to the Gaussian blur algorithm is (scale, radius), where scale represents a magnification factor, and radius represents a radius.
  • Multiple sets of image data with different fuzzy coefficients are used as data training sets, and a neural network is used for multi-layer training to obtain a fuzzy coefficient model.
  • Input the image into the blur coefficient model, and the blur coefficient model can output the blur coefficient corresponding to the Gaussian blur algorithm.
  • the image processing module may input the above-mentioned N frames of images into the above-mentioned blur coefficient model, and the blur coefficient model may output the blur coefficient corresponding to the Gaussian blur algorithm.
  • the image input to the blur coefficient model may be the first frame of image collected during the camera operation, or may be N frame images of different blur states in a single scene during the camera focusing process.
  • the image processing module extracts the blur coefficients of the images collected by the camera through the above method
  • the collected blur coefficients are stored in the RAM corresponding to the camera application, or the collected blur coefficients can be stored in the ROM corresponding to the camera application.
  • the above-mentioned blurring processing method may include the following steps:
  • Step S601a the camera application sends an instruction to close the camera to the camera.
  • Step S601b The camera application sends an instruction to acquire image data to the image processing module.
  • step S601a and step S601b are parallel steps.
  • Step S602 the camera receives the shutdown instruction, and captures the last frame of image.
  • Step S603 the camera sends the last frame of image collected to the internal memory.
  • Step S604 the camera is turned off, and image capture is stopped.
  • Step S605 The image processing module sends an instruction to acquire the last frame of image data to the internal memory.
  • Step S606 the internal memory sends the last frame of image data to the image processing module.
  • Step S607 The image processing module performs blurring processing on the last frame of image collected during the operation of the camera.
  • the image processing module extracts the blur coefficient of the first frame image collected by the camera, and saves the blur coefficient in the RAM corresponding to the camera application, or in the ROM corresponding to the camera application.
  • the image processing module can obtain the blur coefficient of the first frame image collected by the camera in the RAM corresponding to the camera application.
  • the image processing module performs blurring processing on the last frame of image collected during the operation of the camera according to the extracted blur coefficient through a preset blurring algorithm.
  • the preset blur algorithm is a Gaussian blur algorithm
  • the blur coefficient corresponding to the Gaussian blur algorithm extracted by the image processing module is (scale, radius).
  • the image processing module adopts a Gaussian blur algorithm, and according to the blur coefficient (scale, radius) of the Gaussian blur algorithm, blurs the last frame image collected during the operation of the camera to generate a blurred image.
  • the blur coefficient used may also be the blur coefficient preset by the system.
  • the preset fuzzy coefficient of the system is set for the preset fuzzy algorithm according to factors such as electronic device type, camera model, memory compression, and user information security requirements.
  • the preset blur algorithm is a Gaussian blur algorithm
  • the preset blur coefficient of the system is (scale_1, radius_1)
  • the image processing module obtains the last frame of image collected during the operation of the camera through the camera service module, and uses Gaussian.
  • the blurring algorithm performs blurring processing on the image according to the preset blurring coefficients (scale_1, radius_1) to generate a blurred image.
  • Step S608 The image processing module sends the image data obtained by blurring the last frame of the image collected during the operation of the camera to the internal memory.
  • the internal memory can store the blurred image data of the last frame of the image collected during the operation of the camera. Specifically, after the image processing module performs the blurring process on the last frame of the image collected during the operation of the camera, it can store the blurred image of the last frame of the image collected during the operation of the camera in the RAM corresponding to the camera application. data. It is also possible to generate an image file from the blurred image data of the last frame of the image collected during the operation of the camera, and store it in the ROM corresponding to the camera application. It is also possible to generate an image file from the last frame of image data collected during the operation of the camera, and store it in the ROM corresponding to the camera application.
  • the image processing module can send The camera sends an image acquisition instruction for acquiring a frame of image. After the camera captures the image, the captured image data is sent to the internal memory, and then the image processing module can acquire the image, perform blurring processing on the image, and store the blurred image data in the RAM corresponding to the camera application. , or generate an image file from the blurred image data, and store it in the ROM corresponding to the camera application. Alternatively, the image processing module may sample the image data, generate an image file from the image data, and store it in the ROM corresponding to the camera application.
  • FIG. 7 is a flowchart of querying and acquiring blurred image data provided by an embodiment of the present application.
  • the image processing module when the image processing module receives the instruction to obtain the blurred image data, it will query whether the RAM corresponding to the camera application stores the last frame of the image collected during the last camera operation after blurring. image data. If there is blurred image data of the last frame image collected during the last camera operation, the internal memory sends the blurred image data to the image processing module. If the blurred image data is not available, query the ROM corresponding to the camera application to see if there is a blurred image file of the last frame of the image collected during the last camera operation.
  • the blurred image data can be stored in the RAM corresponding to the camera application, or the blurred image data can be stored in the RAM corresponding to the camera application.
  • the processed image data generates an image file, which is stored in the ROM corresponding to the camera application.
  • the image processing module receives the instruction to obtain the blurred image data, it does not query the RAM corresponding to the camera application to find the blurred image data of the last frame of the image collected during the last camera operation, nor does it query the image data in the RAM corresponding to the camera application.
  • the ROM corresponding to the camera application the blurred image file of the last frame of the image collected during the last camera operation was queried, and the last image file collected during the last camera operation was not queried in the ROM corresponding to the camera application.
  • the image file of the frame image the image processing module extracts the blur coefficient of the first frame of image data collected during the focusing process of the camera through the blur coefficient extraction method described in the above embodiment. And by the blurring processing method described in the above embodiment, blurring processing is performed on the last frame of image collected during the operation of the camera.
  • the interface of the electronic device displays the blurred image of the last frame of the image captured during the last camera operation. After the camera finishes focusing, the interface of the electronic device displays the focused image collected by the camera.
  • the images captured by the cameras may have different sharpness and brightness.
  • ⁇ 1 is used to represent the sharpness threshold of the image captured by the camera
  • ⁇ 2 is used to represent the brightness threshold of the image captured by the camera.
  • the above-mentioned sharpness threshold and brightness threshold may be set by the user, or may be preset by the system.
  • the interface of the above-mentioned electronic device displays that the last frame of the image collected during the previous operation of the camera has been blurred. processed image.
  • the interface of the electronic device displays the image collected by the camera.
  • different application programs may acquire image data after blurring of the last frame of image collected during the last camera running process and stored in the RAM corresponding to the camera application.
  • Different application programs can also obtain the blurred image file stored in the ROM corresponding to the camera application from the last frame of the image collected during the last camera running process.
  • Different applications can also acquire the image file of the last frame of image collected during the last camera running process and stored in the ROM corresponding to the camera application.
  • the internal memory can quickly provide the blurred image data of the last frame of the image collected during the last camera running process. What the user sees is the blurred image of the last frame of the image collected during the last camera operation, which improves the user experience.
  • All applications using the system camera service on the electronic device can obtain the blurred image data stored in the internal memory when the camera application is started, and each application does not need to store the last frame of the image collected during the operation of the camera. Blur the image data to save memory.
  • a blur coefficient model is obtained, and the blur coefficient model is used to extract the blur coefficient of the image collected during the camera focusing process, and the blur coefficient is used to blur the last frame of the image collected during the previous camera operation.
  • an image similar to the degree of blurring during the focusing process of the camera can be presented to the user, so that the interface of the electronic device can display the blurred image from the last frame of the image collected during the previous operation of the camera.
  • the process of switching to displaying the image while the camera is in focus, and then to displaying the image after the camera is in focus is smoother.
  • Each functional unit in each of the embodiments of the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

Abstract

An image display method, comprising: detecting a first operation of a user, and in response to the first operation, an electronic device displaying a first photography preview interface, the first photography preview interface comprising a first preview box, the first preview box displaying a first image, and the first image being a blurred image; after a first preset duration, the electronic device displaying a second photography preview interface, the second photography preview interface comprising a second preview box, and the second preview box displaying an image captured in real time by a camera of the electronic device, such that during the startup of a camera application, what a user sees is an image obtained by blurring the last image frame acquired during the previous camera operation, thereby improving user experience.

Description

一种图像显示的方法及电子设备An image display method and electronic device
本申请要求在2020年12月18日提交中国国家知识产权局、申请号为202011504970.7的中国专利申请的优先权,发明名称为“一种图像显示的方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number of 202011504970.7 filed with the State Intellectual Property Office of China on December 18, 2020, and the priority of the Chinese patent application with the invention titled "A method and electronic device for image display" , the entire contents of which are incorporated herein by reference.
技术领域technical field
本发明涉及电子设备技术领域,尤其涉及一种图像显示的方法及电子设备。The present invention relates to the technical field of electronic devices, and in particular, to an image display method and electronic device.
背景技术Background technique
随着移动设备的发展,相机在移动设备中的使用非常广泛,用户可以直接使用系统相机应用,例如,直接使用相机应用启动摄像头进行拍摄。用户也可以通过其他应用程序调用相机应用,例如使用其他应用程序时的“扫一扫”、“AI识别”等场景都会用到相机应用,这些应用程序可以调用系统相机服务。然而,由于硬件能力的限制,通常摄像头的启动时间较长,从而导致相机应用启动过程中,电子设备的界面一直呈现黑色图像,影响用户体验。With the development of mobile devices, cameras are widely used in mobile devices, and users can directly use the system camera application, for example, directly use the camera application to start the camera to shoot. Users can also call the camera application through other applications. For example, when using other applications, "sweep", "AI recognition" and other scenarios will use the camera application, and these applications can call the system camera service. However, due to the limitation of hardware capabilities, the startup time of the camera is usually long, so that during the startup process of the camera application, the interface of the electronic device always presents a black image, which affects the user experience.
一方面,可以通过延长相机应用启动的动画时长来改善用户体验,但相机应用启动动画的时长通常是系统决定的,无法进行修改。延长相机应用启动的动画时长,无法真正避免相机应用启动时的黑色背景。并且,相机应用启动的动画时长过长,也会影响用户体验。On the one hand, the user experience can be improved by extending the animation duration of the camera app startup, but the duration of the camera app startup animation is usually determined by the system and cannot be modified. Extending the animation duration of the camera app launch can't really avoid the black background when the camera app launches. In addition, the animation time started by the camera application is too long, which will also affect the user experience.
另一方面,应用程序可以保存一帧相机退出时采样的图像,作为下一次相机应用启动时的背景图。然而,对于不同的应用程序,都需要消耗一部分内存,用于保存采样的图像。而且,每个应用程序第一次启动摄像头时,电子设备界面仍会在摄像头启动过程中呈现黑色背景。On the other hand, the application can save a frame of the image sampled when the camera exits, as the background image the next time the camera application starts. However, for different applications, a part of the memory needs to be consumed to save the sampled images. Also, the first time each application launches the camera, the electronics interface still presents a black background during camera startup.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明实施例提供了一种图像显示的方法。通过该图像显示的方法,在相机应用启动过程中,电子设备的拍摄预览界面显示模糊图像,相机应用启动后,电子设备的拍摄预览界面显示电子设备的摄像头实时采集的图像,提升了用户体验。In view of this, an embodiment of the present invention provides an image display method. Through the image display method, during the startup of the camera application, the shooting preview interface of the electronic device displays a blurred image, and after the camera application is started, the shooting preview interface of the electronic device displays the real-time image collected by the camera of the electronic device, which improves the user experience.
第一方面,本申请实施例提供一种图像显示的方法,所述方法包括检测到用户的第一操作,响应于所述第一操作,电子设备显示第一拍摄预览界面,所述第一拍摄预览界面包括第一预览框,所述第一预览框显示第一图像,所述第一图像为一模糊图像;经过第一预设时间,所述电子设备显示第二拍摄预览界面,所述第二拍摄预览界面包括第二预览框,所述第二预览框显示所述电子设备的摄像头实时采集得到的图像。通过上述设置方式,在用户等待相机应用启动过程中,用户可以看到模糊处理后的图像,提升了用户体验。In a first aspect, an embodiment of the present application provides an image display method, the method includes detecting a first operation of a user, and in response to the first operation, the electronic device displays a first shooting preview interface, the first shooting The preview interface includes a first preview frame, the first preview frame displays a first image, and the first image is a blurred image; after a first preset time, the electronic device displays a second shooting preview interface, and the first image is a blurred image. The second shooting preview interface includes a second preview frame, and the second preview frame displays an image captured in real time by a camera of the electronic device. Through the above setting method, while the user is waiting for the camera application to start, the user can see the blurred image, which improves the user experience.
根据第一方面的一种可能的实现方式,所述第一图像为所述电子设备的摄像头采集得到的图像经过模糊化处理后得到的图像。According to a possible implementation manner of the first aspect, the first image is an image obtained by blurring an image collected by a camera of the electronic device.
根据第一方面,或以上第一方面的任意一种实现方式,所述第一预设时间为所述电子设备的所述摄像头的上电时间。According to the first aspect, or any implementation manner of the above first aspect, the first preset time is a power-on time of the camera of the electronic device.
根据第一方面,或以上第一方面的任意一种实现方式,电子设备显示第一拍摄预览界面之前,所述方法还包括:保存所述第一图像。通过上述设置方式,在相机应用启动过程中,能快速提供所述第一图像,减少了用户的等待时长,提升了用户体验。电子设备上所有使用系统相机服务的应用程序,在启动摄像头时,能通过相机应用对应的RAM和ROM中,获取存储的图像数据,而不用在其对应的存储空间中单独保存图像数据,节省了内存。According to the first aspect, or any implementation manner of the above first aspect, before the electronic device displays the first shooting preview interface, the method further includes: saving the first image. Through the above setting manner, during the startup process of the camera application, the first image can be quickly provided, the waiting time of the user is reduced, and the user experience is improved. All applications using the system camera service on the electronic device can obtain the stored image data through the RAM and ROM corresponding to the camera application when the camera is started, instead of saving the image data in its corresponding storage space separately, saving Memory.
根据第一方面,或以上第一方面的任意一种实现方式,若所述第一图像未保存在所述电子设备中,所述第一图像为黑色图像。According to the first aspect, or any implementation manner of the above first aspect, if the first image is not stored in the electronic device, the first image is a black image.
根据第一方面,或以上第一方面的任意一种实现方式,所述模糊化处理为采用模糊系数对所述摄像头采集得到的图像进行处理。通过上述设置方式,可以得到和对焦过程模糊程度相近的模糊图像,使显示该模糊处理后的图像,切换到对焦过程更加平滑,提升了用户体验。According to the first aspect, or any implementation manner of the above first aspect, the blurring process is to use a blur coefficient to process the image collected by the camera. Through the above setting method, a blurred image with a similar blurring degree to that in the focusing process can be obtained, so that the switching to the focusing process after displaying the blurred image is smoother, and the user experience is improved.
第二方面,本申请实施例提供一种电子设备,包括一个或多个触摸屏,一个或多个存储器,一个或多个处理器;其中所述一个或多个储存器存储有一个或多个计算机程序;所述一个或多个触摸屏,用于检测到用户的第一操作;响应于所述第一操作,所述一个或多个触摸屏,还用于显示第一拍摄预览界面,所述第一拍摄预览界面包括第一预览框,所述第一预览框显示第一图像,所述第一图像为一模糊图像;经过第一预设时间,所述一个或多个触摸屏,还用于显示第二拍摄预览界面,所述第二拍摄预览界面包括第二预览框,所述第二预览框显示所述电子设备的摄像头实时采集得到的图像。通过上述设置方式,在用户等待相机应用启动过程中,用户可以看到模糊处理后的图像,提升了用户体验。In a second aspect, embodiments of the present application provide an electronic device, including one or more touch screens, one or more memories, and one or more processors; wherein the one or more memories store one or more computers a program; the one or more touch screens are used to detect a first operation of the user; in response to the first operation, the one or more touch screens are also used to display a first shooting preview interface, the first The shooting preview interface includes a first preview frame, the first preview frame displays a first image, and the first image is a blurred image; after a first preset time, the one or more touch screens are also used to display the first image. 2. Shooting preview interface, the second shooting preview interface includes a second preview frame, and the second preview frame displays the image captured by the camera of the electronic device in real time. Through the above setting method, while the user is waiting for the camera application to start, the user can see the blurred image, which improves the user experience.
根据第二方面的一种可能的实现方式,所述第一图像为所述电子设备的摄像头采集得到的图像经过模糊化处理后得到的图像。According to a possible implementation manner of the second aspect, the first image is an image obtained by blurring an image collected by a camera of the electronic device.
根据第二方面,或以上第二方面的任意一种实现方式,所述第一预设时间为所述电子设备的所述摄像头的上电时间。According to the second aspect, or any implementation manner of the above second aspect, the first preset time is a power-on time of the camera of the electronic device.
根据第二方面,或以上第二方面的任意一种实现方式,显示第一拍摄预览界面之前,所述一个或多个存储器,用于保存所述第一图像。通过上述设置方式,在相机应用启动过程中,能快速提供所述第一图像,减少了用户的等待时长,提升了用户体验。电子设备上所有使用系统相机服务的应用程序,在启动摄像头时,能通过相机应用对应的RAM和ROM中,获取存储的图像数据,而不用在其对应的存储空间中单独保存图像数据,节省了内存。According to the second aspect, or any implementation manner of the above second aspect, before the first shooting preview interface is displayed, the one or more memories are used to save the first image. Through the above setting manner, during the startup process of the camera application, the first image can be quickly provided, the waiting time of the user is reduced, and the user experience is improved. All applications using the system camera service on the electronic device can obtain the stored image data through the RAM and ROM corresponding to the camera application when the camera is started, instead of saving the image data in its corresponding storage space separately, saving Memory.
根据第二方面,或以上第二方面的任意一种实现方式,若所述第一图像未保存在所述一个或多个存储器中,所述第一图像为黑色图像。According to the second aspect, or any implementation manner of the above second aspect, if the first image is not stored in the one or more memories, the first image is a black image.
根据第二方面,或以上第二方面的任意一种实现方式,所述一个或多个处理器,用于采用模糊系数对所述摄像头采集得到的图像进行处理。通过上述设置方式,可以得到和对焦过程模糊程度相近的模糊图像,使显示该模糊处理后的图像,切换到对焦过程更加平滑,提升了用户体验。According to the second aspect, or any one of the implementation manners of the above second aspect, the one or more processors are configured to process the image collected by the camera by using a blur coefficient. Through the above setting method, a blurred image with a similar blurring degree to that in the focusing process can be obtained, so that the switching to the focusing process after displaying the blurred image is smoother, and the user experience is improved.
第三方面,本申请实施例提供一种计算机可读存储介质,包括指令,当所述指令在电子设备上运行时,使得所述电子设备执行如以上第一方面,或以上第一方面的任意一种实现方式所述的方法。In a third aspect, embodiments of the present application provide a computer-readable storage medium, including instructions, when the instructions are executed on an electronic device, the electronic device is made to perform the above first aspect, or any of the above first aspects. An implementation of the method described.
第四方面,本申请实施例提供一种计算机程序产品,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如以上第一方面,或以上第一方面的任意一种实现方式所述的方法。In a fourth aspect, an embodiment of the present application provides a computer program product, which, when the computer program product runs on an electronic device, enables the electronic device to perform the above first aspect, or any one of the above first aspect. method described.
通过上述方案,在相机应用启动过程中,用户看到的是上一次摄像头运行过程中采集的最后一帧图像经模糊处理后的图像,能为用户呈现与相机对焦过程中模糊程度相近的图像,进而使电子设备的界面从显示上一次运行摄像头运行过程中采集的最后一帧图像进行模糊处理后的图像,切换到显示相机摄像头摄像头对焦过程中的图像,再到显示相机摄像头摄像头对焦完成后的图像的过程更平滑,提升了用户体验。此外,电子设备上所有使用系统相机服务的应用程序,能通过内部存储器,获取存储的图像数据,不同应用程序不用单独节省了内存。Through the above solution, during the startup of the camera application, what the user sees is the blurred image of the last frame of the image collected during the previous camera operation, which can present the user with an image with a similar degree of blur to the camera during focusing. Then, the interface of the electronic device switches from displaying the blurred image of the last frame of image collected during the previous operation of the camera to displaying the image during the focusing process of the camera, and then to displaying the image after the focusing of the camera is completed. The process of images is smoother, which improves the user experience. In addition, all the application programs on the electronic device that use the system camera service can obtain the stored image data through the internal memory, and different application programs do not need to save memory separately.
附图说明Description of drawings
为了更清楚地说明本发明实施例,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。In order to illustrate the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, which are common in the art. As far as technical personnel are concerned, other drawings can also be obtained based on these drawings without paying creative labor.
图1为本申请实施例提供的一种电子设备的结构示意图;FIG. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
图2为本申请实施例提供的一种电子设备内操作系统的架构示意图;2 is a schematic structural diagram of an operating system in an electronic device provided by an embodiment of the present application;
图3A为本申请实施例提供的一种相机应用启动的场景示意图;FIG. 3A is a schematic diagram of a scene of starting a camera application according to an embodiment of the present application;
图3B为一种相机应用启动的场景示意图;3B is a schematic diagram of a scene where a camera application is started;
图4为本申请实施例提供的一种图像显示的方法的示意图;FIG. 4 is a schematic diagram of an image display method provided by an embodiment of the present application;
图5为本申请实施例提供的一种查询并获取模糊处理后图像数据的交互图;FIG. 5 is an interaction diagram for querying and obtaining image data after blurring processing provided by an embodiment of the present application;
图6为本申请实施例提供的一种模糊化处理的交互图;FIG. 6 is an interaction diagram of a fuzzification process provided by an embodiment of the present application;
图7为本申请实施例提供的一种查询并获取模糊处理后图像数据的流程图。FIG. 7 is a flowchart of querying and acquiring image data after blurring processing provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations of the present application. As used in the specification of this application and the appended claims, the singular expressions "a," "an," "the," "above," "the," and "the" are intended to also Plural expressions such as "one or more" are included unless the context clearly dictates otherwise. It will also be understood that, as used in this application, the term "and/or" refers to and includes any and all possible combinations of one or more of the listed items.
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的至少一个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味 着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References in this specification to "one embodiment" or "some embodiments" and the like mean that a particular feature, structure or characteristic described in connection with that embodiment is included in at least one embodiment of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise.
以下实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。As used in the following examples, the term "when" may be interpreted to mean "if" or "after" or "in response to determining..." or "in response to detecting..." depending on the context. Similarly, depending on the context, the phrases "in determining..." or "if detecting (the stated condition or event)" can be interpreted to mean "if determining..." or "in response to determining..." or "on detecting (the stated condition or event)" or "in response to the detection of (the stated condition or event)".
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。The terms "first", "second", "third", "fourth", etc. (if present) in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those illustrated or described herein.
以下介绍了电子设备、用于这样的电子设备的用户界面、和用于使用这样的电子设备的实施例。在一些实施例中,电子设备可以是还包含其它功能诸如个人数字助理和/或音乐播放器功能的便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴电子设备(如智能手表)等。便携式电子设备的示例性实施例包括但不限于搭载
Figure PCTCN2021137940-appb-000001
或者其它操作系统的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,诸如具有触控面板或触敏表面的膝上型计算机(Laptop)等。在其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是台式计算机。
Electronic devices, user interfaces for such electronic devices, and embodiments for using such electronic devices are described below. In some embodiments, the electronic device may be a portable electronic device that also includes other functions such as personal digital assistant and/or music player functions, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication capabilities (eg, a smart watch) Wait. Exemplary embodiments of portable electronic devices include, but are not limited to, carry-on
Figure PCTCN2021137940-appb-000001
Or portable electronic devices with other operating systems. The portable electronic device described above may also be other portable electronic devices, such as a laptop computer (Laptop) or the like with a touch panel or a touch-sensitive surface. In some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer.
下面将结合本发明实施例中的附图,对本发明实施例进行说明。显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.
图1出了电子设备100的结构示意图。FIG. 1 is a schematic structural diagram of an electronic device 100 .
电子设备100可以是手机、平板电脑、桌面型计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备等,本申请实施例对该电子设备的具体类型不作特殊限制。The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and an augmented reality (AR) device, virtual reality (virtual reality, VR) equipment, artificial intelligence (artificial intelligence, AI) equipment, wearable equipment, vehicle-mounted equipment, etc., the specific types of the electronic equipment are not particularly limited in this embodiment of the present application.
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E, 距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the electronic device 100 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160 . For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 100 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。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 may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR). The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。Display screen 194 is used to display images, videos, and the like. 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 or an active-matrix organic light-emitting diode (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。The ISP is used to process the 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 converts it into an image visible to the naked eye.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
本申请实施例中,摄像头193可用于采集图像,并将采集的图像发送给相机服务模块。摄像头193可接收相机服务模块发送的启动指令,摄像头193接收到启动指令后,需经过一段时间才能启动,摄像头193启动后通过感光元件采集静态图像或视频。In this embodiment of the present application, the camera 193 may be used to collect images, and send the collected images to the camera service module. The camera 193 can receive the start-up instruction sent by the camera service module. After the camera 193 receives the start-up instruction, it takes a period of time to start up. After the camera 193 is started, it collects still images or videos through the photosensitive element.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process 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 and so on.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information and can continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等) 等。此外,内部存储器121可以包括高速随机存取存储器,可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。内部存储器121可以包括随机存取存储器(random access memory,RAM),RAM可以随时读写,读写速度快,RAM通常作为操作系统或其他正在运行中的程序的临时数据存储介质。一旦断电,RAM所存储的数据将随之丢失。内部存储器121还可以包括只读存储器(read-only memory,ROM),ROM所存数据稳定,断电后所存数据也不会改变。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。例如,本申请实施例中,处理器110可以运行存储在内部存储器121中的采集图像、获取图像、模糊系数提取、模糊处理、缓存图像的指令。Internal memory 121 may be used to store computer executable program code, which includes instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like. In addition, the internal memory 121 may include high-speed random access memory, may include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like. The internal memory 121 may include random access memory (random access memory, RAM). The RAM can be read and written at any time, and the read and write speed is fast. The RAM is usually used as a temporary data storage medium for the operating system or other running programs. Once the power is turned off, the data stored in the RAM will be lost. The internal memory 121 may also include a read-only memory (ROM), the data stored in the ROM is stable, and the data stored in the ROM will not change after the power is turned off. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor. For example, in this embodiment of the present application, the processor 110 may execute the instructions stored in the internal memory 121 for capturing images, acquiring images, extracting blur coefficients, blurring, and caching images.
本申请实施例中,内部存储器121可以为不同的应用程序分配对应的存储空间。例如,内部存储器121中的RAM和ROM会为相机应用分配对应的存储空间,用于保存摄像头采集的图像或者模糊处理后的图像。例如,摄像头运行过程中采集的最后一帧图像既可以存储在RAM中,也可以保存在ROM中。模糊处理后的图像既可以保存在RAM中,也可以保存在ROM中。In this embodiment of the present application, the internal memory 121 may allocate corresponding storage spaces for different application programs. For example, the RAM and ROM in the internal memory 121 will allocate corresponding storage space for the camera application, which is used to save the image captured by the camera or the image after blurring. For example, the last frame of image captured during camera operation can be stored either in RAM or in ROM. The blurred image can be stored either in RAM or in ROM.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。 Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 . In some embodiments, the angular velocity of electronic device 100 about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. The gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. The electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light to the outside through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。The temperature sensor 180J is used to detect the temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch device". The touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also referred to as a "touch screen". The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as call and data communication. In some embodiments, the electronic device 100 employs an eSIM, ie: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
图2是本申请实施例的电子设备100的软件结构框图。FIG. 2 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present invention takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 as an example.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 2, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
本申请实施例中,应用程序框架层可以包括图像处理模块,该图像处理模块具有获取图像、模糊系数提取、模糊处理的功能。该图像处理模块可以通过内部存储器获取摄像头采集的图像,并对获取的图像进行模糊系数提取;该图像处理模块也可以通过内部存储器,获取摄像头运行过程中采集的最后一帧图像,并对该采集的最后一帧图像进行模糊化处理;该图像处理模块还可以将模糊化处理后的图像保存在相机应用对应的RAM中,也可以将模糊化处理后的图像保存在相机应用对应的ROM中。In this embodiment of the present application, the application framework layer may include an image processing module, and the image processing module has the functions of acquiring images, extracting blur coefficients, and blurring. The image processing module can obtain the image collected by the camera through the internal memory, and extract the blur coefficient of the obtained image; the image processing module can also obtain the last frame of the image collected during the operation of the camera through the internal memory, and the collected image The last frame of the image is blurred; the image processing module can also save the blurred image in the RAM corresponding to the camera application, or save the blurred image in the ROM corresponding to the camera application.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 2, the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100 . For example, the management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。In the following, the workflow of the software and hardware of the electronic device 100 is exemplarily described in conjunction with the capturing and photographing scene.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所 对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes touch operations into raw input events (including touch coordinates, timestamps of touch operations, etc.). Raw input events are stored at the kernel layer. The application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon, for example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer. The camera 193 captures still images or video.
图3A是本申请实施例提供的一种相机应用启动的场景示意图。FIG. 3A is a schematic diagram of a scene of starting a camera application according to an embodiment of the present application.
如图3A所示,相机应用启动过程中,且电子设备未收到摄像头采集的图像数据时,电子设备的界面显示第一图像301。上述第一图像是上一次摄像头运行过程中采集的最后一帧图像经过模糊化处理后的图像。上述第一图像也可以是用户首次使用相机应用时,摄像头第一次运行过程中采集的最后一帧图像经过模糊化处理后的图像。其中,相机应用启动过程指,相机应用接收到用户的打开指令(例如,用户针对电子设备界面显示的相机应用的控件的点击),到摄像头能够通过感光元件采集静态图像或视频之间经过的过程,例如,摄像头上电的过程。摄像头运行过程,包括摄像头接收到启动的指令,摄像头上电启动,通过感光元件采集静态图像或视频,相机接收到关闭的指令,摄像头停止采集静态图像或视频的过程,包括响应于用户的操作采集图像和保存图像的过程。上述模糊处理指采用预设的模糊算法,根据该模糊算法对应的模糊系数,对图像进行处理。例如,预设的模糊算法可以为高斯模糊算法、方框模糊算法、Kawase模糊算法、双重模糊算法、散景模糊算法、移轴模糊算法、光圈模糊算法、粒状模糊算法、径向模糊算法、方向模糊算法等算法中的一种。上述预设的模糊算法也可以是其他可能采用的模糊算法,本申请实施例中不对上述预设的模糊算法做特殊限制。不同的模糊算法具有不同的模糊系数,其中,模糊系数指一组对应模糊算法的参数,所述参数用于调节图像的模糊程度。例如高斯模糊算法对应的模糊系数为(scale,radius),其中scale表示放大系数,radius表示半径。上述模糊系数的提取方法和模糊化处理方法将在后续实施例中结合图5和图6详细描述。As shown in FIG. 3A , during the startup of the camera application and when the electronic device does not receive the image data collected by the camera, the interface of the electronic device displays a first image 301 . The above-mentioned first image is an image obtained by blurring the last frame of image collected during the last camera operation. The above-mentioned first image may also be a blurred image of the last frame of image collected during the first operation of the camera when the user uses the camera application for the first time. The camera application startup process refers to the process from the camera application receiving the user's opening instruction (for example, the user's click on the control of the camera application displayed on the electronic device interface) to the camera being able to collect still images or videos through the photosensitive element , for example, the process of powering up the camera. The running process of the camera, including the camera receiving the start command, the camera powering on and starting, collecting still images or videos through the photosensitive element, the camera receiving the shutdown command, the camera stopping the process of collecting still images or videos, including the process of collecting still images or videos in response to user operations Image and the process of saving the image. The above-mentioned blurring processing refers to using a preset blurring algorithm, and processing the image according to the blurring coefficient corresponding to the blurring algorithm. For example, the preset blur algorithm can be Gaussian blur algorithm, box blur algorithm, Kawase blur algorithm, double blur algorithm, bokeh blur algorithm, tilt-shift blur algorithm, aperture blur algorithm, granular blur algorithm, radial blur algorithm, direction blur One of the algorithms such as fuzzy algorithm. The above-mentioned preset fuzzy algorithm may also be other fuzzy algorithms that may be used, and the above-mentioned preset fuzzy algorithm is not particularly limited in this embodiment of the present application. Different blurring algorithms have different blurring coefficients, wherein the blurring coefficient refers to a set of parameters corresponding to the blurring algorithms, and the parameters are used to adjust the blurring degree of the image. For example, the blur coefficient corresponding to the Gaussian blur algorithm is (scale, radius), where scale represents the magnification factor, and radius represents the radius. The above-mentioned extraction method and fuzzification processing method of the blur coefficient will be described in detail with reference to FIG. 5 and FIG. 6 in subsequent embodiments.
用户点击相机应用,经过第一预设时间,摄像头上电启动,摄像头可采集图像。其中,第一预设时间可以是摄像头上电的时间。用于摄像头上电的时间包括,相机应用接收用户的打开指令的时间(例如,用户针对电子设备界面显示的相机应用的控件的点击),摄像头接收启动指令的时间,摄像头上电并能够通过感光元件采集静态图像或视频之间经过的时间。第一预设时间也可以是,从相机应用接收用户的打开指令的时间,到摄像头能够对焦使呈现清晰图像的时间,也就是,包括上述摄像头上电的时间和摄像头完成对焦过程的时间(对焦过程为,摄像头能够通过感光元件采集静态图像或视频,经过摄像头无法对焦使呈现模糊图像,直到摄像头能够对焦完成使呈现清晰图像的时间,换句话说,对焦过程为摄像头调整好自身焦点的距离,以使拍出来的照片清晰的过程)。第一预设时间还可以是,从相机应用接收用户的打开指令的时间开始,到摄像头对焦过程中的任意时间点结束所经过的时间。The user clicks on the camera application, and after the first preset time, the camera is powered on and started, and the camera can capture images. The first preset time may be the time when the camera is powered on. The time for the camera to be powered on includes the time when the camera application receives the user's opening instruction (for example, the user clicks on the controls of the camera application displayed on the interface of the electronic device), the time when the camera receives the startup instruction, the time when the camera is powered on and can pass the light sensor. The time elapsed between the capture of a still image or video by an element. The first preset time can also be the time from when the camera application receives the user's opening instruction to the time when the camera can focus to present a clear image, that is, the time when the camera is powered on and the time when the camera completes the focusing process (focusing). The process is that the camera can collect still images or videos through the photosensitive element, and the camera cannot focus to make the blurred image appear until the camera can focus and complete the time to display a clear image. In other words, the focusing process is for the camera to adjust the distance of its own focus. the process of making the photos clear). The first preset time may also be the time elapsed from the time when the camera application receives the user's opening instruction to the end of any time point during the camera focusing process.
如图3B所示,电子设备收到摄像头采集的图像数据时,电子设备的界面显示摄像头采集的第二图像303。上述第二图像指摄像头运行过程中,摄像头对焦后采集到的图像。摄像头运行过程中,摄像头会先进行对焦,对焦过程中采集的图像会呈现一定程度的模糊,对焦完成后显示第二图像303,该第二图像是对焦完成后采集的图像。示例性地,用户当前想要使用相机拍摄一个盆栽的图像,如果用户上一次使用相机应 用时,摄像头运行过程中采集的最后一帧图像是一个杯子的图像,在用户当前使用相机应用时,在相机应用启动过程中,显示该杯子图像模糊处理后的图像。相机应用启动后,摄像头先对盆栽进行对焦,会显示采集的对焦过程中的盆栽图像,该对焦过程中采集的盆栽图像会呈现模糊。相机对焦完成后,会显示对焦完成后采集的盆栽图像。As shown in FIG. 3B , when the electronic device receives the image data collected by the camera, the interface of the electronic device displays the second image 303 collected by the camera. The above-mentioned second image refers to an image collected by the camera after focusing during the operation of the camera. During the operation of the camera, the camera will focus first, and the image collected during the focus will appear blurred to a certain extent. After the focus is completed, a second image 303 is displayed, and the second image is the image collected after the focus is completed. Exemplarily, the user currently wants to use the camera to capture an image of a potted plant. If the last time the user used the camera application, the last frame of image collected during the running of the camera was an image of a cup. During the startup of the camera application, the blurred image of the cup image is displayed. After the camera application is started, the camera first focuses on the potted plants, and the captured images of the potted plants during the focusing process will be displayed, and the images of the potted plants collected during the focusing process will appear blurry. After the camera is focused, the image of the potted plant captured after focusing is displayed.
在相机应用启动过程中,通过显示第一图像,可以消除相机应用启动过程中黑色背景显示时间过长的问题,提高用户体验。During the startup process of the camera application, by displaying the first image, the problem that the black background is displayed for too long during the startup process of the camera application can be eliminated, and the user experience can be improved.
在一些应用场景下,用户可以直接打开相机应用。例如,用户希望使用摄像头进行拍照,拍视频时,可直接打开相机应用。用户直接打开相机应用时,在相机应用启动过程中,且电子设备未收到摄像头采集的图像数据时,该电子设备的界面显示上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像。相机应用启动后,摄像头采集图像,且电子设备收到摄像头采集的图像数据时,该电子设备的界面显示摄像头采集的图像。该摄像头采集的图像包括对焦过程中采集的图像,和对焦完成后采集的图像。In some application scenarios, the user can directly open the camera application. For example, if a user wishes to use the camera to take pictures, when taking a video, the camera application can be directly opened. When the user directly opens the camera application, during the startup process of the camera application and the electronic device does not receive the image data collected by the camera, the interface of the electronic device displays the blurred image of the last frame of the image collected during the previous camera operation. image. After the camera application is started, the camera collects images, and when the electronic device receives the image data collected by the camera, the interface of the electronic device displays the image collected by the camera. The images collected by the camera include images collected during the focusing process and images collected after the focusing is completed.
在另一些应用场景下,用户也可以通过其他应用程序打开相机应用,例如,扫码支付场景下,用户可点击支付软件中的“扫一扫”,打开相机应用,使用摄像头扫描付款二维码;又例如,有些应用程序支持人脸识别功能,用于验证用户身份,在该场景下,用户可通过该应用程序打开相机应用,使用摄像头进行人脸识别。用户通过其他应用程序打开相机应用时,在相机应用启动过程中,且电子设备未收到摄像头采集的图像数据时,该电子设备显示上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像。相机应用启动后,摄像头可采集图像,且电子设备收到摄像头采集的图像数据时,该电子设备显示摄像头采集的图像。该摄像头采集的图像包括对焦过程中采集的图像,和对焦完成后采集的图像。In other application scenarios, the user can also open the camera application through other applications. For example, in the scan code payment scenario, the user can click "Scan" in the payment software, open the camera application, and use the camera to scan the payment QR code For another example, some applications support the face recognition function to authenticate the user's identity. In this scenario, the user can open the camera application through the application and use the camera to perform face recognition. When the user opens the camera application through other applications, during the startup process of the camera application, and the electronic device does not receive the image data collected by the camera, the electronic device displays the last frame of the image collected during the previous camera operation after blurring processing. Image. After the camera application is started, the camera can capture images, and when the electronic device receives the image data captured by the camera, the electronic device displays the image captured by the camera. The images collected by the camera include images collected during the focusing process and images collected after the focusing is completed.
下面以用户直接打开相机应用为例,说明本申请实施例提供的一种图像显示的方法。The following describes an image display method provided by an embodiment of the present application by taking a user directly opening a camera application as an example.
如图4所示,本申请实施例提供的一种图像显示的方法可以包括如下步骤:As shown in FIG. 4 , an image display method provided by an embodiment of the present application may include the following steps:
步骤S401a:相机应用向摄像头发送启动摄像头的指令。Step S401a: The camera application sends an instruction to activate the camera to the camera.
步骤S401b:相机应用将获取上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据的指令发送给图像处理模块。Step S401b: The camera application sends an instruction to acquire the image data of the last frame of image collected during the last camera operation after blurring processing to the image processing module.
需要解释说明的是,步骤S401a和步骤S401b是并行的步骤。It should be explained that step S401a and step S401b are parallel steps.
步骤S402:图像处理模块向内部存储器发送获取上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据的指令。其中,内部存储器包括相机应用对应的RAM和ROM。Step S402 : the image processing module sends an instruction to the internal memory for acquiring the image data of the last frame of the image collected during the last camera operation after being blurred. The internal memory includes RAM and ROM corresponding to the camera application.
上述图像处理模块可以在相机应用对应的RAM中,存储上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据。该图像处理模块也可以将上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据生成图像文件,存储在相机应用对应的ROM中。该图像处理模块还可以将上一次摄像头运行过程中采集的最后一帧图像数据生成图像文件,存储在相机应用对应的ROM中。The above-mentioned image processing module may store, in the RAM corresponding to the camera application, the blurred image data of the last frame of the image collected during the last camera operation. The image processing module can also generate an image file from the image data of the last frame of the image collected during the last camera operation after the blurring process, and store the image file in the ROM corresponding to the camera application. The image processing module can also generate an image file from the last frame of image data collected during the last camera running process, and store it in the ROM corresponding to the camera application.
内部存储器接收到步骤S402中发送的获取模糊处理后的图像数据的指令后,查询相机应用对应的RAM中是否存储有上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据。如果有上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据,则将该模糊处理后的图像数据发送给图像处理模块。如果没有该模糊处理后的图像数据,则查询相机应用对应的ROM中,是否存储有上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据生成的图像文件。如果有上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据生成的图像文件,则将该图像文件加载到相机应用对应的RAM中,生成对应的图像数据,并将该图像数据发送给图像处理模块。如果没有该模糊处理后的图像数据生成的图像文件,则查询相机应用对应的ROM中,是否存储有上一次摄像头运行过程中采集的最后一帧图像的图像文件,如果有,则将该图像文件加载到相机应用对应的RAM中,生成对应的图像数据,并采用预设的模糊算法,对该图像进行模糊处理,再将上一次摄像头运行过程中采集的最后一帧图像经模糊处理后的图像数据发送给图像处理模块。其中,预设的模糊算法可以为高斯模糊算法、方框模糊算法、Kawase模糊算法、双重模糊算法、散景模糊算法、移轴模糊算法、光圈模糊算法、粒状模糊算法、径向模糊算法、方向模糊算法等算法中的一种,也可以是其他可能采用的模糊算法,本申请实施例中不对上述预设的模糊算法做特殊限制。After receiving the instruction to obtain the blurred image data sent in step S402, the internal memory queries whether the RAM corresponding to the camera application stores the blurred image data of the last frame of the image collected during the last camera operation. If there is blurred image data of the last frame of image collected during the last camera operation, the blurred image data is sent to the image processing module. If the blurred image data is not available, check whether the ROM corresponding to the camera application stores an image file generated from the blurred image data of the last frame image collected during the last camera operation. If there is an image file generated from the blurred image data of the last frame of image collected during the last camera operation, load the image file into the RAM corresponding to the camera application, generate the corresponding image data, and store the image The data is sent to the image processing module. If there is no image file generated from the blurred image data, query the ROM corresponding to the camera application to see if there is an image file of the last frame of image collected during the last camera operation, and if so, check the image file. Load it into the RAM corresponding to the camera application, generate the corresponding image data, and use the preset blurring algorithm to blur the image, and then blur the last frame of the image collected during the last camera operation. The data is sent to the image processing module. The preset blur algorithm can be Gaussian blur algorithm, box blur algorithm, Kawase blur algorithm, double blur algorithm, bokeh blur algorithm, axis-shift blur algorithm, aperture blur algorithm, granular blur algorithm, radial blur algorithm, direction blur One of the algorithms such as the fuzzy algorithm may also be other fuzzy algorithms that may be used, and the above-mentioned preset fuzzy algorithms are not particularly limited in this embodiment of the present application.
上述模糊处理指采用预设的模糊算法,根据该模糊算法对应的模糊系数,对图像进行处理。上述模糊系数的提取方法将在后续实施例中结合图5和图6详细描述。The above-mentioned blurring processing refers to using a preset blurring algorithm, and processing the image according to the blurring coefficient corresponding to the blurring algorithm. The above-mentioned method for extracting the blur coefficient will be described in detail with reference to FIG. 5 and FIG. 6 in subsequent embodiments.
步骤S403:内部存储器向图像处理模块发送上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据。Step S403 : the internal memory sends the image data of the last frame of the image collected during the last operation of the camera after the blurring process to the image processing module.
步骤S404:图像处理模块向相机应用发送上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据。相机应用接收到步骤S404中发送的上一次摄像头运行过程中采集的最后一帧图像经模糊处理后的图像数据后,电子设备的界面可以显示上一次摄像头运行过程中采集的最后一帧图像经模糊处理后的图像。Step S404: The image processing module sends the blurred image data of the last frame of image collected during the last camera operation to the camera application. After the camera application receives the blurred image data of the last frame of the image collected during the last camera running process sent in step S404, the interface of the electronic device can display the blurred image of the last frame of the image collected during the last camera running process. processed image.
步骤S405:摄像头将采集的图像数据发送给图像处理模块。Step S405: the camera sends the collected image data to the image processing module.
为便于说明,采用D1表示执行步骤S401a的时间,摄像头采集一帧图像的时间,摄像头执行步骤S405的时间之和,采用D2表示执行步骤S401b、步骤S402的时间,步骤S403和步骤S404的时间之和。D1的时长远远大于D2的时长。For the convenience of description, D1 is used to represent the time for performing step S401a, the time for the camera to collect one frame of image, the sum of the time for the camera to perform step S405, and D2 is used to represent the time for performing steps S401b and S402, and the time between steps S403 and S404. and. The duration of D1 is much longer than that of D2.
下面以用户首次直接打开相机应用的场景为例,结合图5详细说明本申请实施例提供的一种模糊系数提取方法。Taking a scenario where a user directly opens a camera application for the first time as an example, a method for extracting a blur coefficient provided by an embodiment of the present application will be described in detail below with reference to FIG. 5 .
参见图5,上述模糊系数提取方法可以包括以下步骤:Referring to FIG. 5, the above-mentioned fuzzy coefficient extraction method may include the following steps:
步骤S501a:相机应用向摄像头发送启动摄像头的指令。Step S501a: the camera application sends an instruction to activate the camera to the camera.
步骤S501b:相机应用向图像处理模块发送获取图像数据的指令。Step S501b: The camera application sends an instruction to acquire image data to the image processing module.
需要解释说明的是,步骤S501a和步骤S501b是并行的步骤。It should be explained that step S501a and step S501b are parallel steps.
步骤S502:摄像头向内部存储器发送采集的图像数据。Step S502: the camera sends the collected image data to the internal memory.
摄像头接收到步骤S501a发送的启动摄像头的指令后,摄像头上电,摄像头采集图像,并将采集到的图像数据发送给内部存储器。摄像头运行过程中,会先进行对焦, 对焦过程中采集的图像会呈现一定的模糊程度。该摄像头采集的图像包括对焦过程中采集的图像,和对焦完成后采集的图像。步骤S502中发送采集的图像数据是按采集图像的顺序进行发送的,摄像头在运行过程中,每采集到一帧图像,就会将采集到的图像数据通过步骤S502发送给内部存储器。After the camera receives the instruction to start the camera sent in step S501a, the camera is powered on, the camera collects images, and sends the collected image data to the internal memory. During the operation of the camera, focus will be performed first, and the images collected during the focusing process will be blurred to a certain extent. The images collected by the camera include images collected during the focusing process and images collected after the focusing is completed. The image data collected in step S502 are sent in the order of collecting images. During the operation of the camera, each time a frame of image is collected, the collected image data will be sent to the internal memory through step S502.
步骤S503:图像处理模块向内部存储器发送获取图像数据的指令。Step S503: The image processing module sends an instruction for acquiring image data to the internal memory.
图像处理模块可以通过内部存储器,获取提取上述对焦过程中采集的图像。具体而言,摄像头采集到图像后,会将采集的图像数据发送给内部存储器,摄像头采集的图像包括对焦过程中的图像。The image processing module can obtain and extract the images collected in the above focusing process through the internal memory. Specifically, after the camera collects the image, it will send the collected image data to the internal memory, and the image collected by the camera includes the image in the focusing process.
步骤S504:内部存储器向图像处理模块发送摄像头采集的图像数据,其中,内部存储器发送的是摄像头采集的第一帧图像,也可以是摄像头采集的第N帧图像,其中,N代表大于等于1的整数。需要解释说明的是,第N帧图像包括摄像头对焦过程中采集的图像。Step S504: The internal memory sends the image data collected by the camera to the image processing module, where the internal memory sends the first frame of image collected by the camera, or the Nth frame of image collected by the camera, where N represents greater than or equal to 1. Integer. It should be explained that the Nth frame of images includes images collected during the focusing process of the camera.
步骤S505:图像处理模块获取摄像头采集的第一帧图像数据后,进行模糊系数提取。Step S505 : the image processing module extracts the blur coefficient after acquiring the first frame of image data collected by the camera.
图像处理模块获取摄像头采集的第一帧图像后,可以将该图像输入模糊系数模型,模型系数模型可以输出一组模糊系数。上述模糊系数模型可以根据预设的模糊算法,通过人工智能(artificial intelligence,AI)训练得到。其中,预设的模糊算法可以为高斯模糊算法、方框模糊算法、Kawase模糊算法、双重模糊算法、散景模糊算法、移轴模糊算法、光圈模糊算法、粒状模糊算法、径向模糊算法、方向模糊算法等算法中的一种,也可以是其他可能采用的模糊算法,本申请实施例中不对上述预设的模糊算法做特殊限制。针对不同的模糊算法,模糊系数模型输出的模糊系数不同。例如,选择高斯模糊算法作为预设的模糊算法,高斯模糊算法对应的模糊系数为(scale,radius),其中scale表示放大系数,radius表示半径。将多组具有不同模糊系数的图像数据作为数据训练集,采用神经网络,进行多层训练,得到模糊系数模型。将图像输入该模糊系数模型,该模糊系数模型可以输出对应高斯模糊算法的模糊系数。示例性地,图像处理模块可以将上述N帧图像输入上述模糊系数模型,该模糊系数模型可以输出对应高斯模糊算法的模糊系数。After the image processing module acquires the first frame of image collected by the camera, the image can be input into the blur coefficient model, and the model coefficient model can output a set of blur coefficients. The above-mentioned fuzzy coefficient model can be obtained by artificial intelligence (artificial intelligence, AI) training according to a preset fuzzy algorithm. The preset blur algorithm can be Gaussian blur algorithm, box blur algorithm, Kawase blur algorithm, double blur algorithm, bokeh blur algorithm, axis-shift blur algorithm, aperture blur algorithm, granular blur algorithm, radial blur algorithm, direction blur One of the algorithms such as the fuzzy algorithm may also be other fuzzy algorithms that may be used, and the above-mentioned preset fuzzy algorithms are not particularly limited in this embodiment of the present application. For different fuzzy algorithms, the fuzzy coefficients output by the fuzzy coefficient model are different. For example, a Gaussian blur algorithm is selected as the preset blur algorithm, and the blur coefficient corresponding to the Gaussian blur algorithm is (scale, radius), where scale represents a magnification factor, and radius represents a radius. Multiple sets of image data with different fuzzy coefficients are used as data training sets, and a neural network is used for multi-layer training to obtain a fuzzy coefficient model. Input the image into the blur coefficient model, and the blur coefficient model can output the blur coefficient corresponding to the Gaussian blur algorithm. Exemplarily, the image processing module may input the above-mentioned N frames of images into the above-mentioned blur coefficient model, and the blur coefficient model may output the blur coefficient corresponding to the Gaussian blur algorithm.
需要解释说明的是,输入模糊系数模型的图像,可以是摄像头运行过程中采集的第一帧图像,也可以是摄像头对焦过程中单个场景下不同模糊状态的N帧图像。It should be explained that the image input to the blur coefficient model may be the first frame of image collected during the camera operation, or may be N frame images of different blur states in a single scene during the camera focusing process.
图像处理模块通过上述方法提取到摄像头采集的图像的模糊系数后,将采集到的模糊系数保存在相机应用对应的RAM中,也可以将采集到的模糊系数保存在相机应用对应的ROM中。After the image processing module extracts the blur coefficients of the images collected by the camera through the above method, the collected blur coefficients are stored in the RAM corresponding to the camera application, or the collected blur coefficients can be stored in the ROM corresponding to the camera application.
下面以用户首次直接打开相机应用,使用结束后,用户关闭相机应用的场景为例。结合图6详细说明本申请实施例中提供的一种对摄像头运行过程中采集的最后一帧图像进行模糊化处理的方法。The following is an example of a scenario in which the user directly opens the camera application for the first time, and then closes the camera application after the end of use. A method for blurring the last frame of image collected during the operation of the camera provided in the embodiment of the present application will be described in detail with reference to FIG. 6 .
参见图6,上述模糊处理方法可以包括以下步骤:Referring to FIG. 6, the above-mentioned blurring processing method may include the following steps:
步骤S601a:相机应用向摄像头发送关闭摄像头的指令。Step S601a: the camera application sends an instruction to close the camera to the camera.
步骤S601b:相机应用向图像处理模块发送获取图像数据的指令。Step S601b: The camera application sends an instruction to acquire image data to the image processing module.
需要解释说明的是,步骤S601a和步骤S601b是并行的步骤。It should be explained that step S601a and step S601b are parallel steps.
步骤S602:摄像头接收到关闭的指令,采集最后一帧图像。Step S602: the camera receives the shutdown instruction, and captures the last frame of image.
步骤S603:摄像头将采集的最后一帧图像发送给内部存储器。Step S603: the camera sends the last frame of image collected to the internal memory.
步骤S604:摄像头关闭,停止采集图像。Step S604: the camera is turned off, and image capture is stopped.
步骤S605:图像处理模块向内部存储器发送获取最后一帧图像数据的指令。Step S605: The image processing module sends an instruction to acquire the last frame of image data to the internal memory.
步骤S606:内部存储器向图像处理模块发送最后一帧图像数据。Step S606: the internal memory sends the last frame of image data to the image processing module.
步骤S607:图像处理模块对摄像头运行过程中采集的最后一帧图像进行模糊处理。Step S607: The image processing module performs blurring processing on the last frame of image collected during the operation of the camera.
在用户首次打开相机时,图像处理模块提取了摄像头采集的第一帧图像的模糊系数,并将该模糊系数保存在相机应用对应的RAM中,也可以保存在相机应用对应的ROM中。图像处理模块可以在相机应用对应的RAM中,获取摄像头采集的第一帧图像的模糊系数。图像处理模块接收到摄像头运行过程中采集的最后一帧图像后,图像处理模块通过预设的模糊算法,根据提取的模糊系数,对摄像头运行过程中采集的最后一帧图像进行模糊化处理。示例性地,预设的模糊算法为高斯模糊算法,图像处理模块提取的对应高斯模糊算法的模糊系数为(scale,radius)。图像处理模块采用高斯模糊算法,根据高斯模糊算法的模糊系数(scale,radius),对摄像头运行过程中采集的最后一帧图像进行模糊化处理,生成模糊处理后的图像。When the user turns on the camera for the first time, the image processing module extracts the blur coefficient of the first frame image collected by the camera, and saves the blur coefficient in the RAM corresponding to the camera application, or in the ROM corresponding to the camera application. The image processing module can obtain the blur coefficient of the first frame image collected by the camera in the RAM corresponding to the camera application. After the image processing module receives the last frame of image collected during the operation of the camera, the image processing module performs blurring processing on the last frame of image collected during the operation of the camera according to the extracted blur coefficient through a preset blurring algorithm. Exemplarily, the preset blur algorithm is a Gaussian blur algorithm, and the blur coefficient corresponding to the Gaussian blur algorithm extracted by the image processing module is (scale, radius). The image processing module adopts a Gaussian blur algorithm, and according to the blur coefficient (scale, radius) of the Gaussian blur algorithm, blurs the last frame image collected during the operation of the camera to generate a blurred image.
在另一种可能的实现方式中,图像处理模块对摄像头运行过程中采集的最后一帧图像进行模糊处理时,使用的模糊系数也可以是系统预设的模糊系数。该系统预设的模糊系数,是根据电子设备类型、摄像头型号、内存压缩、用户信息安全要求等因素,针对预设的模糊算法设置的。示例性地,预设的模糊算法是高斯模糊算法,系统预设的模糊系数为(scale_1,radius_1),图像处理模块通过相机服务模块,获取摄像头运行过程中采集的最后一帧图像后,采用高斯模糊算法,根据预设的模糊系数(scale_1,radius_1)对该图像进行模糊处理,生成模糊处理后的图像。In another possible implementation manner, when the image processing module performs blurring processing on the last frame of image collected during the operation of the camera, the blur coefficient used may also be the blur coefficient preset by the system. The preset fuzzy coefficient of the system is set for the preset fuzzy algorithm according to factors such as electronic device type, camera model, memory compression, and user information security requirements. Exemplarily, the preset blur algorithm is a Gaussian blur algorithm, the preset blur coefficient of the system is (scale_1, radius_1), and the image processing module obtains the last frame of image collected during the operation of the camera through the camera service module, and uses Gaussian. The blurring algorithm performs blurring processing on the image according to the preset blurring coefficients (scale_1, radius_1) to generate a blurred image.
步骤S608:图像处理模块将摄像头运行过程中采集的最后一帧图像进行模糊处理后的图像数据发送给内部存储器。Step S608: The image processing module sends the image data obtained by blurring the last frame of the image collected during the operation of the camera to the internal memory.
内部存储器可以存储摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据。具体而言,图像处理模块对摄像头运行过程中采集的最后一帧图像进行模糊处理后,可以在相机应用对应的RAM中,存储该摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据。也可以将摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据生成图像文件,存储在相机应用对应的ROM中。还可以将摄像头运行过程中采集的最后一帧图像数据生成图像文件,存储在相机应用对应的ROM中。The internal memory can store the blurred image data of the last frame of the image collected during the operation of the camera. Specifically, after the image processing module performs the blurring process on the last frame of the image collected during the operation of the camera, it can store the blurred image of the last frame of the image collected during the operation of the camera in the RAM corresponding to the camera application. data. It is also possible to generate an image file from the blurred image data of the last frame of the image collected during the operation of the camera, and store it in the ROM corresponding to the camera application. It is also possible to generate an image file from the last frame of image data collected during the operation of the camera, and store it in the ROM corresponding to the camera application.
在另一些实施例中,如果上述内部存储器中没有存储摄像头运行过程中采集的最后一帧图像或者该摄像头运行过程中采集的最后一帧图像因为格式等问题无法进行获取时,图像处理模块可以向摄像头发送图像采集的指令,用于采集一帧图像。摄像头采集图像后,将该采集的图像数据发送给内部存储器,进而,图像处理模块可获取 该图像,并对该图像进行模糊化处理,在相机应用对应的RAM中存储该图像模糊处理后的数据,或者将该图像模糊处理后的数据生成图像文件,存储在相机应用对应的ROM中。又或者,图像处理模块可采样该图像数据,将该图像数据生成图像文件,存储在相机应用对应的ROM中。In other embodiments, if the above-mentioned internal memory does not store the last frame of image collected during the operation of the camera or the last frame of image collected during the operation of the camera cannot be acquired due to problems such as the format, the image processing module can send The camera sends an image acquisition instruction for acquiring a frame of image. After the camera captures the image, the captured image data is sent to the internal memory, and then the image processing module can acquire the image, perform blurring processing on the image, and store the blurred image data in the RAM corresponding to the camera application. , or generate an image file from the blurred image data, and store it in the ROM corresponding to the camera application. Alternatively, the image processing module may sample the image data, generate an image file from the image data, and store it in the ROM corresponding to the camera application.
图7是本申请实施例提供的一种查询并获取模糊处理后的图像数据的流程图。如图7所示,当图像处理模块收到获取模糊处理后的图像数据的指令后,会查询相机应用对应的RAM中是否存储有上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据。如果有上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据,内部存储器则将该模糊处理后的图像数据发送给图像处理模块。如果没有该模糊处理后的图像数据,则查询相机应用对应的ROM中,是否存储有上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像文件。如果有上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据生成的图像文件,则将该图像文件加载到相机应用对应的RAM中,获取对应的模糊处理后的图像数据,并将该图像数据发送给图像处理模块。如果没有该模糊处理后的图像数据生成的图像文件,则查询相机应用对应的ROM中,是否存储有上一次摄像头运行过程中采集的最后一帧图像的图像文件,如果有,则将该图像文件加载到相机应用对应的RAM中,获取图像数据,并采用预设的模糊算法,对该图像进行模糊化处理,再将该上一次摄像头运行过程中采集的最后一帧图像经模糊处理后的图像数据发送给图像处理模块。需要解释说明的是,图像处理模块对该上一次摄像头运行过程中采集的最后一帧图像进行模糊处理后,可以将该模糊处理后的图像数据存储在相机应用对应的RAM中,或者将该模糊处理后的图像数据生成图像文件,存储在相机应用对应的ROM中。FIG. 7 is a flowchart of querying and acquiring blurred image data provided by an embodiment of the present application. As shown in Figure 7, when the image processing module receives the instruction to obtain the blurred image data, it will query whether the RAM corresponding to the camera application stores the last frame of the image collected during the last camera operation after blurring. image data. If there is blurred image data of the last frame image collected during the last camera operation, the internal memory sends the blurred image data to the image processing module. If the blurred image data is not available, query the ROM corresponding to the camera application to see if there is a blurred image file of the last frame of the image collected during the last camera operation. If there is an image file generated from the blurred image data of the last frame of image collected during the last camera operation, load the image file into the RAM corresponding to the camera application to obtain the corresponding blurred image data. And send the image data to the image processing module. If there is no image file generated from the blurred image data, query the ROM corresponding to the camera application to see if there is an image file of the last frame of image collected during the last camera operation, and if so, check the image file. Load it into the RAM corresponding to the camera application, obtain the image data, and use the preset blurring algorithm to blur the image, and then blur the last frame of the image collected during the last camera operation. The data is sent to the image processing module. It should be explained that after the image processing module performs blurring processing on the last frame of image collected during the last camera operation, the blurred image data can be stored in the RAM corresponding to the camera application, or the blurred image data can be stored in the RAM corresponding to the camera application. The processed image data generates an image file, which is stored in the ROM corresponding to the camera application.
如果图像处理模块收到获取模糊处理后的图像数据的指令后,未在相机应用对应的RAM中查询到上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像数据,也未在相机应用对应的ROM中查询到上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的的图像文件,也未在相机应用对应的ROM中查询到上一次摄像头运行过程中采集的最后一帧图像的图像文件,则图像处理模块通过上述实施例中所述的模糊系数提取方法提取摄像头对焦过程中采集的第一帧图像数据的模糊系数。并通过上述实施例中所述的模糊处理方法,对摄像头运行过程中采集的最后一帧图像进行模糊处理。If the image processing module receives the instruction to obtain the blurred image data, it does not query the RAM corresponding to the camera application to find the blurred image data of the last frame of the image collected during the last camera operation, nor does it query the image data in the RAM corresponding to the camera application. In the ROM corresponding to the camera application, the blurred image file of the last frame of the image collected during the last camera operation was queried, and the last image file collected during the last camera operation was not queried in the ROM corresponding to the camera application. The image file of the frame image, the image processing module extracts the blur coefficient of the first frame of image data collected during the focusing process of the camera through the blur coefficient extraction method described in the above embodiment. And by the blurring processing method described in the above embodiment, blurring processing is performed on the last frame of image collected during the operation of the camera.
在一些实施例中,用户通过其他应用程序打开相机应用时,在摄像头未完成对焦时,电子设备的界面显示上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像。摄像头完成对焦后,电子设备的界面显示摄像头采集的对焦后的图像。In some embodiments, when the user opens the camera application through another application, when the camera has not finished focusing, the interface of the electronic device displays the blurred image of the last frame of the image captured during the last camera operation. After the camera finishes focusing, the interface of the electronic device displays the focused image collected by the camera.
在一些实施例中,摄像头采集的图像会具有不同的清晰度和亮度。采用θ 1表示摄像头采集图像的清晰度阈值,用θ 2表示摄像头采集图像的亮度阈值。上述清晰度阈值和亮度阈值可以是用户设定的,也可以是系统预设的。当摄像头采集的图像的清晰度小于清晰度阈值θ 1,或者该摄像头采集的图像的亮度小于亮度阈值θ 2时,上述 电子设备的界面显示上一次摄像头运行过程中采集的最后一帧图像经过模糊处理后的图像。 In some embodiments, the images captured by the cameras may have different sharpness and brightness. θ 1 is used to represent the sharpness threshold of the image captured by the camera, and θ 2 is used to represent the brightness threshold of the image captured by the camera. The above-mentioned sharpness threshold and brightness threshold may be set by the user, or may be preset by the system. When the sharpness of the image collected by the camera is less than the sharpness threshold θ 1 , or the brightness of the image collected by the camera is less than the brightness threshold θ 2 , the interface of the above-mentioned electronic device displays that the last frame of the image collected during the previous operation of the camera has been blurred. processed image.
当摄像头采集的图像的清晰度大于清晰度阈值θ 1,且该摄像头采集的图像的亮度大于亮度阈值θ 2时,上述电子设备的界面显示摄像头采集的图像。 When the sharpness of the image collected by the camera is greater than the sharpness threshold θ 1 and the brightness of the image collected by the camera is greater than the brightness threshold θ 2 , the interface of the electronic device displays the image collected by the camera.
在一些实施例中,不同的应用程序可以获取相机应用对应的RAM中存储的上一次摄像头运行过程采集的最后一帧图像经模糊处理后的图像数据。不同的应用程序也可以获取在相机应用对应的ROM中存储的上一次摄像头运行过程采集的最后一帧图像经模糊处理后的图像文件。不同的应用程序还可以获取在相机应用对应的ROM中存储的上一次摄像头运行过程采集的最后一帧图像的图像文件。In some embodiments, different application programs may acquire image data after blurring of the last frame of image collected during the last camera running process and stored in the RAM corresponding to the camera application. Different application programs can also obtain the blurred image file stored in the ROM corresponding to the camera application from the last frame of the image collected during the last camera running process. Different applications can also acquire the image file of the last frame of image collected during the last camera running process and stored in the ROM corresponding to the camera application.
通过上述图像显示的方法,在相机应用启动过程中,内部存储器能快速地提供上一次摄像头运行过程采集的最后一帧图像经模糊处理后的图像数据。用户看到的是上一次摄像头运行过程采集的最后一帧图像经模糊处理后的图像,提升了用户体验。Through the above image display method, during the startup process of the camera application, the internal memory can quickly provide the blurred image data of the last frame of the image collected during the last camera running process. What the user sees is the blurred image of the last frame of the image collected during the last camera operation, which improves the user experience.
电子设备上所有使用系统相机服务的应用程序,在启动相机应用时,能获取内部存储器存储的模糊化处理后的图像数据,不需要每个应用程序存储摄像头运行过程中采集的最后一帧图像经模糊处理后的图像数据,节省了内存。All applications using the system camera service on the electronic device can obtain the blurred image data stored in the internal memory when the camera application is started, and each application does not need to store the last frame of the image collected during the operation of the camera. Blur the image data to save memory.
通过AI训练,得到模糊系数模型,使用该模糊系数模型提取摄像头对焦过程中采集图像的模糊系数,并采用该模糊系数,对上一次摄像头运行过程中采集的最后一帧图像进行模糊处理。在用户下一次使用相机时,能为用户呈现与摄像头对焦过程中模糊程度相近的图像,进而使该电子设备的界面从显示上一次摄像头运行过程中采集的最后一帧图像进行模糊处理后的图像,切换到显示摄像头对焦过程中的图像,再到显示摄像头对焦完成后的图像的过程更平滑。Through AI training, a blur coefficient model is obtained, and the blur coefficient model is used to extract the blur coefficient of the image collected during the camera focusing process, and the blur coefficient is used to blur the last frame of the image collected during the previous camera operation. When the user uses the camera next time, an image similar to the degree of blurring during the focusing process of the camera can be presented to the user, so that the interface of the electronic device can display the blurred image from the last frame of the image collected during the previous operation of the camera. , the process of switching to displaying the image while the camera is in focus, and then to displaying the image after the camera is in focus is smoother.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。From the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated as required. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. For the specific working process of the system, apparatus and unit described above, reference may be made to the corresponding process in the foregoing method embodiments, and details are not described herein again.
在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。Each functional unit in each of the embodiments of the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
以上所述,仅为本申请实施例的实施例方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。The above are merely examples of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the embodiments of the present application shall be covered by this within the protection scope of the application examples. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.

Claims (13)

  1. 一种图像显示的方法,其特征在于,所述方法包括:A method for image display, characterized in that the method comprises:
    检测到用户的第一操作,The first action of the user is detected,
    响应于所述第一操作,电子设备显示第一拍摄预览界面,所述第一拍摄预览界面包括第一预览框,所述第一预览框显示第一图像,所述第一图像为一模糊图像;In response to the first operation, the electronic device displays a first shooting preview interface, the first shooting preview interface includes a first preview frame, the first preview frame displays a first image, and the first image is a blurred image ;
    经过第一预设时间,所述电子设备显示第二拍摄预览界面,所述第二拍摄预览界面包括第二预览框,所述第二预览框显示所述电子设备的摄像头实时采集得到的图像。After a first preset time, the electronic device displays a second shooting preview interface, the second shooting preview interface includes a second preview frame, and the second preview frame displays an image captured in real time by a camera of the electronic device.
  2. 根据权利要求1所述的方法,其特征在于,所述第一图像为所述电子设备的摄像头采集得到的图像经过模糊化处理后得到的图像。The method according to claim 1, wherein the first image is an image obtained by blurring an image collected by a camera of the electronic device.
  3. 根据权利要求1-2任一项所述的方法,其特征在于,所述第一预设时间为所述电子设备的所述摄像头的上电时间。The method according to any one of claims 1-2, wherein the first preset time is a power-on time of the camera of the electronic device.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,电子设备显示第一拍摄预览界面之前,所述方法还包括:保存所述第一图像。The method according to any one of claims 1-3, wherein before the electronic device displays the first shooting preview interface, the method further comprises: saving the first image.
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:The method according to claim 4, wherein the method further comprises:
    若所述第一图像未保存在所述电子设备中,所述第一图像为黑色图像。If the first image is not stored in the electronic device, the first image is a black image.
  6. 根据权利要求2-5任一项所述的方法,其特征在于,所述模糊化处理为采用模糊系数对所述摄像头采集得到的图像进行处理。The method according to any one of claims 2-5, characterized in that, the blurring process is to use a blur coefficient to process the image collected by the camera.
  7. 一种电子设备,包括一个或多个触摸屏,一个或多个存储器,一个或多个处理器;其中所述一个或多个储存器存储有一个或多个计算机程序;其特征在于,An electronic device comprising one or more touch screens, one or more memories, and one or more processors; wherein the one or more memories store one or more computer programs; it is characterized in that:
    所述一个或多个触摸屏,用于检测到用户的第一操作;the one or more touch screens for detecting the first operation of the user;
    响应于所述第一操作,所述一个或多个触摸屏,还用于显示第一拍摄预览界面,所述第一拍摄预览界面包括第一预览框,所述第一预览框显示第一图像,所述第一图像为一模糊图像;In response to the first operation, the one or more touch screens are further configured to display a first shooting preview interface, the first shooting preview interface includes a first preview frame, and the first preview frame displays a first image, the first image is a blurred image;
    经过第一预设时间,所述一个或多个触摸屏还用于显示第二拍摄预览界面,所述第二拍摄预览界面包括第二预览框,所述第二预览框显示所述电子设备的摄像头实时采集得到的图像。After a first preset time, the one or more touch screens are further configured to display a second shooting preview interface, where the second shooting preview interface includes a second preview frame, and the second preview frame displays the camera of the electronic device Images acquired in real time.
  8. 根据权利要求7所述的电子设备,其特征在于,所述第一图像为所述电子设备的摄像头采集得到的图像经过模糊化处理后得到的图像。The electronic device according to claim 7, wherein the first image is an image obtained by blurring an image captured by a camera of the electronic device.
  9. 根据权利要求7-8任一项所述的电子设备,其特征在于,所述第一预设时间为所述电子设备的所述摄像头的上电时间。The electronic device according to any one of claims 7-8, wherein the first preset time is a power-on time of the camera of the electronic device.
  10. 根据权利要求7-9任一项所述的电子设备,其特征在于,显示第一拍摄预览界面之前,所述一个或多个存储器,用于保存所述第一图像。The electronic device according to any one of claims 7-9, wherein before displaying the first shooting preview interface, the one or more memories are used to save the first image.
  11. 根据权利要求10所述的电子设备,其特征在于,若所述第一图像未保存在所述一个或多个存储器中,所述第一图像为黑色图像。The electronic device of claim 10, wherein if the first image is not stored in the one or more memories, the first image is a black image.
  12. 根据权利要求8-11任一项所述的电子设备,其特征在于,所述一个或多个处理器,用于采用模糊系数对所述摄像头采集得到的图像进行处理。The electronic device according to any one of claims 8-11, wherein the one or more processors are configured to process the images collected by the camera by using blur coefficients.
  13. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-6任一项所述的方法。A computer-readable storage medium comprising instructions, characterized in that, when the instructions are executed on an electronic device, the electronic device is caused to perform the method according to any one of claims 1-6.
PCT/CN2021/137940 2020-12-18 2021-12-14 Image display method and electronic device WO2022127787A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011504970.7A CN114650363B (en) 2020-12-18 2020-12-18 Image display method and electronic equipment
CN202011504970.7 2020-12-18

Publications (1)

Publication Number Publication Date
WO2022127787A1 true WO2022127787A1 (en) 2022-06-23

Family

ID=81990060

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/137940 WO2022127787A1 (en) 2020-12-18 2021-12-14 Image display method and electronic device

Country Status (2)

Country Link
CN (1) CN114650363B (en)
WO (1) WO2022127787A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115514871A (en) * 2022-09-30 2022-12-23 读书郎教育科技有限公司 Overturning camera preview optimization system and method based on intelligent terminal
CN115767290A (en) * 2022-09-28 2023-03-07 荣耀终端有限公司 Image processing method and electronic device
CN116048379A (en) * 2022-06-30 2023-05-02 荣耀终端有限公司 Data recharging method and device
CN116708753A (en) * 2022-12-19 2023-09-05 荣耀终端有限公司 Method, device and storage medium for determining preview blocking reason
CN116744106A (en) * 2022-10-25 2023-09-12 荣耀终端有限公司 Control method of camera application and terminal equipment
CN116744106B (en) * 2022-10-25 2024-04-30 荣耀终端有限公司 Control method of camera application and terminal equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117135341A (en) * 2023-01-19 2023-11-28 荣耀终端有限公司 Image processing method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170126962A1 (en) * 2015-04-30 2017-05-04 Jrd Communication Inc. Method and system for quickly starting camera based on eyeprint identification
CN110505389A (en) * 2019-09-03 2019-11-26 RealMe重庆移动通信有限公司 Camera control method, device, storage medium and electronic equipment
CN111543049A (en) * 2018-07-16 2020-08-14 华为技术有限公司 Photographing method and electronic equipment
CN111885305A (en) * 2020-07-28 2020-11-03 Oppo广东移动通信有限公司 Preview picture processing method and device, storage medium and electronic equipment
CN112055156A (en) * 2020-09-15 2020-12-08 Oppo(重庆)智能科技有限公司 Preview image updating method and device, mobile terminal and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106161956A (en) * 2016-08-16 2016-11-23 深圳市金立通信设备有限公司 The processing method of a kind of preview screen when shooting and terminal
CN110636353B (en) * 2019-06-10 2022-09-02 海信视像科技股份有限公司 Display device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170126962A1 (en) * 2015-04-30 2017-05-04 Jrd Communication Inc. Method and system for quickly starting camera based on eyeprint identification
CN111543049A (en) * 2018-07-16 2020-08-14 华为技术有限公司 Photographing method and electronic equipment
CN110505389A (en) * 2019-09-03 2019-11-26 RealMe重庆移动通信有限公司 Camera control method, device, storage medium and electronic equipment
CN111885305A (en) * 2020-07-28 2020-11-03 Oppo广东移动通信有限公司 Preview picture processing method and device, storage medium and electronic equipment
CN112055156A (en) * 2020-09-15 2020-12-08 Oppo(重庆)智能科技有限公司 Preview image updating method and device, mobile terminal and storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116048379A (en) * 2022-06-30 2023-05-02 荣耀终端有限公司 Data recharging method and device
CN116048379B (en) * 2022-06-30 2023-10-24 荣耀终端有限公司 Data recharging method and device
CN115767290A (en) * 2022-09-28 2023-03-07 荣耀终端有限公司 Image processing method and electronic device
CN115767290B (en) * 2022-09-28 2023-09-29 荣耀终端有限公司 Image processing method and electronic device
CN115514871A (en) * 2022-09-30 2022-12-23 读书郎教育科技有限公司 Overturning camera preview optimization system and method based on intelligent terminal
CN116744106A (en) * 2022-10-25 2023-09-12 荣耀终端有限公司 Control method of camera application and terminal equipment
CN116744106B (en) * 2022-10-25 2024-04-30 荣耀终端有限公司 Control method of camera application and terminal equipment
CN116708753A (en) * 2022-12-19 2023-09-05 荣耀终端有限公司 Method, device and storage medium for determining preview blocking reason
CN116708753B (en) * 2022-12-19 2024-04-12 荣耀终端有限公司 Method, device and storage medium for determining preview blocking reason

Also Published As

Publication number Publication date
CN114650363B (en) 2023-07-21
CN114650363A (en) 2022-06-21

Similar Documents

Publication Publication Date Title
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
CN113645351B (en) Application interface interaction method, electronic device and computer-readable storage medium
WO2022127787A1 (en) Image display method and electronic device
WO2021036770A1 (en) Split-screen processing method and terminal device
WO2021104485A1 (en) Photographing method and electronic device
WO2019072178A1 (en) Method for processing notification, and electronic device
WO2021258814A1 (en) Video synthesis method and apparatus, electronic device, and storage medium
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
WO2022001258A1 (en) Multi-screen display method and apparatus, terminal device, and storage medium
WO2022037726A1 (en) Split-screen display method and electronic device
WO2021052139A1 (en) Gesture input method and electronic device
WO2022100685A1 (en) Drawing command processing method and related device therefor
WO2021159746A1 (en) File sharing method and system, and related device
WO2021218429A1 (en) Method for managing application window, and terminal device and computer-readable storage medium
WO2023056795A1 (en) Quick photographing method, electronic device, and computer readable storage medium
WO2022105702A1 (en) Method and electronic device for saving image
WO2022143180A1 (en) Collaborative display method, terminal device, and computer readable storage medium
WO2021057626A1 (en) Image processing method, apparatus, device, and computer storage medium
WO2021052388A1 (en) Video communication method and video communication apparatus
CN115119048A (en) Video stream processing method and electronic equipment
WO2022166435A1 (en) Picture sharing method and electronic device
WO2022062902A1 (en) File transfer method and electronic device
WO2022170854A1 (en) Video call method and related device
WO2022033344A1 (en) Video stabilization method, and terminal device and computer-readable storage medium
WO2022078116A1 (en) Brush effect picture generation method, image editing method and device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21905716

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21905716

Country of ref document: EP

Kind code of ref document: A1