Motion blurred image obtaining method, electronic device, and computer-readable storage medium

By calculating the speed of each frame layer and sampling and weighting the pixels, motion blur effect is achieved for a single frame layer, solving the power consumption problem caused by multiple layers and saving resources.

WO2026066148A1PCT designated stage Publication Date: 2026-04-02HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

The use of multiple layers to achieve motion blur effects in existing technologies increases the power consumption of electronic devices, leading to a waste of resources.

Method used

By calculating the velocity of each edge of each frame layer and sampling and weighting the pixels in each frame layer, motion blur effect is achieved. This simplifies the process to the pixels in a single frame layer and does not depend on the layer data of previous frames.

Benefits of technology

It reduces the power consumption of electronic devices, saves resources, and simplifies the implementation of motion blur.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025096212_02042026_PF_FP_ABST
    Figure CN2025096212_02042026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a motion blurred image obtaining method, an electronic device, and a computer-readable storage medium. In the motion blurred image obtaining method, in response to an operation of a user, an electronic device shifts pixel points in a first layer in two directions perpendicular to each other to obtain a second layer, and then the electronic device displays the second layer, so that a motion blurring effect can be implemented on each frame of layer of an application interface. In addition, in the motion blurred image obtaining method, motion blurring processing is performed on pixel points in a single frame of layer without depending on previous multi-frame layer data, thereby simplifying the implementation of motion blurring, reducing the power consumption of the electronic device, and saving resources.
Need to check novelty before this filing date? Find Prior Art

Description

Method for obtaining motion-blurred image, electronic device and computer-readable storage medium

[0001] The present application claims priority to the Chinese patent application No. 202411400287.7, filed on September 30, 2024, and entitled "Method for obtaining motion-blurred image, electronic device and computer-readable storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] Embodiments of the present application relate to the technical field of intelligent terminal, in particular to a method for obtaining a motion-blurred image, an electronic device and a computer-readable storage medium. BACKGROUND

[0003] Motion blur refers to a blurring effect in an image or video caused by the movement of an object or a camera. This blur is usually presented along the direction of motion, making the image appear unclear and the edges of the object become blurred. Although motion blur is often considered as a defect that needs to be avoided in many cases, when the screen refresh rate of an electronic device (for example: a smart phone, etc.) is low, the user may feel that the display of the application interface is slightly lagging during the application startup process; similarly, the user may also feel that the closing of the application interface is slightly lagging during the application exit process, at this time, the application interface can be processed with motion blur to increase the visual smoothness.

[0004] In the prior art, a plurality of layers are generally superimposed to achieve the effect of motion blur, but this scheme increases the power consumption of the electronic device, resulting in resource waste. SUMMARY

[0005] Embodiments of the present application provide a method for obtaining a motion-blurred image, an electronic device and a computer-readable storage medium to achieve motion blur effect on each frame of the application interface during the startup or exit process of the application, simplify the implementation of motion blur, reduce the power consumption of the electronic device and save resources.

[0006] In a first aspect, the present application provides a method for obtaining a motion-blurred image, comprising: in response to the operation of a user, offsetting the pixel points in a first layer to two directions perpendicular to each other to obtain a second layer; displaying the second layer.

[0007] In the method for obtaining the motion-blurred image, the electronic device shifts the pixel points in the first layer to two mutually perpendicular directions in response to a user operation, obtains a second layer, and then displays the second layer, so that the motion-blurred effect can be realized for each frame of the application interface, and the method for obtaining the motion-blurred image is to perform motion-blurred processing on the pixel points in a single frame, and thus does not need to rely on the data of previous frames, simplifies the realization of the motion-blurred effect, reduces the power consumption of the electronic device, and saves resources.

[0008] In one possible implementation, the shifting of the pixel points in the first layer to two mutually perpendicular directions to obtain a second layer includes: obtaining a center point of the first layer; performing N times of sampling on the adjacent pixel points of the currently blurred pixel point in the first layer according to the center point of the first layer; N is an integer and N>0; calculating an average value of the colors of the N times of sampled pixel points, and taking the average value as the color of the currently blurred pixel point.

[0009] In one possible implementation, when performing the N times of sampling on the adjacent pixel points, the farther from the center point of the first layer, the larger the interval of the sampled pixel points. Therefore, the closer to the center point in the second layer, the clearer the image, and the farther from the center point, the more blurred the image. That is, the motion-blurred effect realized on the first layer in this implementation is an outward blurred effect.

[0010] In one possible implementation, the obtaining of the center point of the first layer includes: determining the speed of each side of the first layer according to the position of the first layer in the current frame and the previous frame; and determining the center point of the first layer in the current frame according to the speed of each side of the first layer.

[0011] In one possible implementation, before the performing of the N times of sampling on the adjacent pixel points of the currently blurred pixel point in the first layer according to the center point of the first layer, the method further includes: calculating the offset amount of the pixel points in the first layer in the two mutually perpendicular directions respectively according to the speed of each side of the first layer; and the performing of the N times of sampling on the adjacent pixel points of the currently blurred pixel point in the first layer according to the center point of the first layer includes: performing the N times of sampling on the adjacent pixel points of the currently blurred pixel point in the first layer according to the center point of the first layer and in combination with the offset amount.

[0012] In a possible implementation, the determining the center point of the first layer according to the speeds of the edges of the first layer comprises: determining a horizontal coordinate of the center point of the first layer in the current frame according to the speeds of the left and right edges of the first layer; and determining a vertical coordinate of the center point of the first layer in the current frame according to the speeds of the top and bottom edges of the first layer.

[0013] In a possible implementation, the calculating the offset of the pixel point in the first layer in two mutually perpendicular directions according to the speeds of the edges of the first layer respectively comprises: calculating the offset of the pixel point in the first layer in a horizontal direction according to the speeds of the left and right edges of the first layer; and calculating the offset of the pixel point in the first layer in a vertical direction according to the speeds of the top and bottom edges of the first layer.

[0014] In a possible implementation, before the offsetting the pixel points in the first layer in two mutually perpendicular directions to obtain the second layer, the electronic device can further start an application corresponding to an icon operated by the user in response to the operation of the user; or the electronic device can further perform an exit operation on the operated application in response to an exit operation of the user on the application. That is, in this implementation, the electronic device can mark the first layer on which the application interface is located in the process of starting or exiting the application, and then implement the motion blur effect on each frame of the application interface.

[0015] In a possible implementation, before the offsetting the pixel points in the first layer in two mutually perpendicular directions to obtain the second layer, the electronic device can further render the first layer.

[0016] In a possible implementation, the offsetting the pixel points in the first layer in two mutually perpendicular directions to obtain the second layer comprises: offsetting the pixel points in the rendered first layer in two mutually perpendicular directions to obtain the second layer.

[0017] In a possible implementation, before the offsetting the pixel points in the first layer in two mutually perpendicular directions to obtain the second layer, the electronic device can further perform Gaussian blur on the first layer.

[0018] In a second aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; a plurality of application programs; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs comprise instructions, which, when executed by the electronic device, cause the electronic device to perform the method in the first aspect.

[0019] It should be understood that the second aspect of the embodiments of the present application is consistent with the technical solutions of the first aspect of the embodiments of the present application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation manners are similar, which will not be described herein.

[0020] In a third aspect, the embodiments of the present application provide a computer readable storage medium, and the computer readable storage medium stores a computer program, which, when executed on a computer, causes the computer to perform the method provided in the first aspect.

[0021] In a fourth aspect, the embodiments of the present application provide a computer program, which, when executed on a computer, is configured to perform the method provided in the first aspect.

[0022] In a possible design, the program in the fourth aspect can be stored in a storage medium packaged with the processor in whole or in part, or in a storage medium not packaged with the processor in whole or in part. BRIEF DESCRIPTION OF DRAWINGS

[0023] FIG. 1 is a structural schematic diagram of an electronic device according to an embodiment of the present application;

[0024] FIG. 2 is a software structure block diagram of the electronic device 100 according to an embodiment of the present application;

[0025] FIG. 3 is a flowchart of a method for obtaining a motion-blurred image according to an embodiment of the present application;

[0026] FIG. 4 is a schematic diagram of an application interface during an application startup process according to an embodiment of the present application;

[0027] FIG. 5 is a schematic diagram of an application interface during an application startup process according to another embodiment of the present application;

[0028] FIG. 6 is a schematic diagram of positions of a first layer in two adjacent frames according to an embodiment of the present application;

[0029] FIG. 7 is a flowchart of a method for obtaining a motion-blurred image according to another embodiment of the present application;

[0030] FIG. 8 is a schematic diagram of a surface synthesizer performing motion blurring on a first layer according to an embodiment of the present application;

[0031] FIG. 9 is a schematic diagram of the electronic device 100 displaying interfaces of an application 1 and an application 2 in a split screen manner according to an embodiment of the present application;

[0032] FIG. 10 is a schematic diagram of a graphics subsystem performing motion blurring on a first layer according to an embodiment of the present application;

[0033] FIG. 11 is a structural schematic diagram of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION

[0034] The terms used in the implementation part of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0035] In the prior related art, the effect of motion blur is generally achieved by using multiple layers superimposed, but this scheme will increase the power consumption of the electronic device, resulting in waste of resources.

[0036] Based on the above problems, the embodiments of the present application provide a motion blurred image obtaining method, which calculates the speed of each side of each frame layer, sets various parameters according to the speed, and performs sampling and weighted average on each pixel point in each frame layer, thereby achieving the motion blur effect for each frame layer of the application interface. The motion blurred image obtaining method is a motion blur processing for the pixel points in a single frame layer, and does not need to rely on the previous multiple frame layer data, thus simplifying the implementation of motion blur, reducing the power consumption of the electronic device, and saving resources.

[0037] The motion blurred image obtaining method provided by the embodiments of the present application can be applied to an electronic device, wherein the electronic device can be a smart phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), and the like. The embodiments of the present application do not make any limitation on the specific type of the electronic device.

[0038] Exemplarily, FIG. 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. As shown in FIG. 1, the electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a loudspeaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric 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, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

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

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

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

[0042] The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can hold instructions or data that the processor 110 has just used or cycled through. If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. This avoids repeated access and reduces the latency of the processor 110, thus improving the efficiency of the system.

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

[0044] The USB interface 130 is an interface that conforms to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect earphones to play audio through the earphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

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

[0046] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some embodiments with wired charging, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some embodiments with wireless charging, the charging management module 140 can receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 can charge the battery 142 and power the electronic device 100 through the power management module 141.

[0047] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160, etc. The power management module 141 can also be configured to monitor parameters such as battery capacity, battery cycle count, battery health (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.

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

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

[0050] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transfer the same to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and radiate the same as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the same device as at least part of the modules of the processor 110.

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

[0052] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and radiate it as an electromagnetic wave via the antenna 2.

[0053] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-CDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).

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

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

[0056] The electronic device 100 can implement the photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor.

[0057] The ISP is configured 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 to convert it into an image visible to the naked eye. The ISP can also optimize the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be disposed in the camera 193.

[0058] The camera 193 is configured to capture still images or videos. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1.

[0059] The digital signal processor is used to process digital signals, in addition to being able to process 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, etc.

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

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

[0062] The external memory interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external storage card communicates with the processor 110 through the external memory interface 120 to realize data storage functions. For example, music, video, etc. Files are saved in the external storage card.

[0063] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phonebook, etc.), etc. In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various function applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in the memory provided in the processor.

[0064] The electronic device 100 can realize audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music playing, recording, etc.

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

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

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

[0068] The microphone 170C, also referred to as a "microphone", "transducer", is configured to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can make a sound by holding the mouth close to the microphone 170C, and input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, in addition to collecting sound signals, noise reduction functions can also be realized. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, in addition to collecting sound signals, noise reduction, and can also identify the source of the sound, realize directional recording function, etc.

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

[0070] The keys 190 include a power key, a volume key, etc. The keys 190 can be mechanical keys. They can also be touch keys. The electronic device 100 can receive key inputs, and generate key signal inputs related to user settings and function control of the electronic device 100.

[0071] The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompt, 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 acting on different regions of the display screen 194. Different application scenarios (such as time reminders, received messages, alarms, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0072] The indicator 192 can be an indicator light, which can be used to indicate a charging state, a power change, and can also be used to indicate a message, a missed call, a notification, etc.

[0073] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or pulled out of the SIM card interface 195 to realize contact and separation with the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, and N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. The same SIM card interface 195 can simultaneously insert multiple cards. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external storage cards. The electronic device 100 interacts with a network through the SIM card to realize functions such as calling and data communication. In some embodiments, the electronic device 100 uses an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0074] The software system of the electronic device 100 can use a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. Embodiments of the present application exemplarily illustrate the software structure of the electronic device 100 by taking the layered architecture as an example.

[0075] FIG. 2 is a software structure block diagram of the electronic device 100 provided by an embodiment of the present application.

[0076] The layered architecture divides 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 software system of the electronic device 100 can be divided into five layers, and from top to bottom, the five layers are an application program layer, an application program framework layer, an Android runtime and a system library, and a kernel layer. The system library and the Android runtime can also be referred to as a native framework layer or a native layer.

[0077] The application program layer can include a series of applications (APPs). As shown in FIG. 2, the application program layer can include applications such as phone, control center, desktop, and the like. In an embodiment of the present application, the desktop can control the progress of opening and closing of an application interface, and can also control the blurred state of the application interface during the application startup and exit process.

[0078] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application program layer. The application framework layer includes some pre-defined functions.

[0079] As shown in FIG. 2, the application framework layer can include system basic capabilities, which can include a security subsystem, a graphics subsystem, an artificial intelligence (AI) subsystem, and a user program framework.

[0080] In an embodiment of the present application, the graphics subsystem can perform motion blur processing on view elements in an application interface when rendering the application interface.

[0081] The system library can include an Android runtime (Android Runtime) and a surface compositor (SurfaceFlinger). The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0082] The core library includes two parts: one part is a function function that the java language needs to call, and the other part is the core library of Android.

[0083] The application program layer and the application framework layer run in the virtual machine. The virtual machine executes the java files of the application program layer and the application framework layer into binary files. The virtual machine is used to perform functions such as management of object life cycle, stack management, thread management, security and exception management, and garbage collection.

[0084] SurfaceFlinger is a core component in the software system of the electronic device 100 responsible for managing and combining various graphics layers, and can implement a display composition service. In an embodiment of the present application, SurfaceFlinger can perform motion blur processing on the layers of an application interface when layer composition.

[0085] The kernel layer is a layer between hardware and software. The kernel layer can include a Linux kernel and a Hongmeng kernel.

[0086] For the convenience of understanding, the following embodiments of the present application will take the electronic device with the structure shown in FIG. 1 and FIG. 2 as an example, and the motion-blurred image obtaining method provided by the embodiments of the present application will be specifically described in combination with the accompanying drawings and application scenarios.

[0087] FIG. 3 is a flowchart of the motion-blurred image obtaining method provided by one embodiment of the present application. As shown in FIG. 3, the motion-blurred image obtaining method can include the following steps.

[0088] In step 301, in response to the operation of the user, the electronic device 100 offsets the pixel points in the first layer to two mutually perpendicular directions to obtain a second layer.

[0089] In some examples, the operation of the user can be a click operation on the application icon displayed by the electronic device 100. As shown in FIG. 4, which is a schematic diagram of an application interface in an application starting process provided by one embodiment of the present application, in the interface 41 displayed by the electronic device 100, the user clicks the music icon 42 to trigger the electronic device 100 to start the music application. In response to the operation of the user clicking the music icon 42, the electronic device 100 starts the music application and displays the first window 43 of the music application. In some embodiments, the electronic device 100 can mark the first layer corresponding to the first window 43.

[0090] In the above embodiment, the two mutually perpendicular directions can be the horizontal coordinate axis and the vertical coordinate axis in the two-dimensional coordinate system, i.e., the x-axis and the y-axis directions.

[0091] Specifically, offsetting the pixel points in the first layer to the two mutually perpendicular directions to obtain the second layer can include: the electronic device 100 acquires the center point of the first layer, and according to the center point of the first layer, samples N times among the adjacent pixel points of the currently blurred pixel points in the first layer; wherein N is an integer and N>0; then, the electronic device 100 calculates the average value of the colors of the N times sampled pixel points, and uses the above average value as the color of the currently blurred pixel point.

[0092] In the above embodiment, acquiring the center point of the first layer can include: determining the speed of each side of the first layer according to the position of the first layer in the current frame and the position of the first layer in the previous frame, and determining the center point of the first layer in the current frame according to the speed of each side of the first layer.

[0093] In the specific implementation, as shown in FIG. 6, assuming that the position of the first layer in the previous frame is shown as ABCD in FIG. 6, and the position of the first layer in the current frame is shown as A'B'C'D' in FIG. 6, then the speed of each side of the first layer can be determined according to the following formulas (1)-(4). FIG. 6 is a schematic diagram of the position of the first layer in adjacent two frames provided by one embodiment of the present application. left= |left' - left| (1) V top = |top' - top| (2) V right = |right' - right| (3) V bottom = |bottom' - bottom| (4)

[0094] In the formula (1) to formula (4), V left , V top , V right and V bottom are the speeds of the left frame, the top frame, the right frame and the bottom frame of the first image layer respectively; left', top', right' and bottom' are the positions of the left frame, the top frame, the right frame and the bottom frame of the first image layer in the current frame respectively; left, top, right and bottom are the positions of the left frame, the top frame, the right frame and the bottom frame of the first image layer in the last frame respectively.

[0095] After determining the speeds of the edges of the first image layer, the horizontal coordinate of the center point of the first image layer in the current frame can be determined according to the speeds of the left frame and the right frame of the first image layer; and the vertical coordinate of the center point of the first image layer in the current frame can be determined according to the speeds of the top frame and the bottom frame of the first image layer; as shown in formula (5) to formula (6). CenterX = left' + (right' - left') x V left / (V left + V right ) (5) CenterY = top' + (bottom' - top') x V top / (V top + V bottom ) (6)

[0096] In the formula (5) to formula (6), CenterX is the horizontal coordinate of the center point of the first image layer in the current frame, and CenterY is the vertical coordinate of the center point of the first image layer in the current frame; that is, (CenterX, CenterY) is the coordinate of the center point of the first image layer in the current frame, for example, in FIG. 6, the center point of the first image layer in the current frame can be shown as 61.

[0097] In the embodiments of the present application, before the N times of sampling is performed in the adjacent pixel points of the current blurred pixel point of the first layer according to the center point of the first layer, the electronic device 100 can also calculate the offset of the pixel points in the first layer in two mutually perpendicular directions according to the speed of each side of the first layer. Specifically, the offset of the pixel points in the first layer in the horizontal axis direction can be calculated according to the speed of the left and right side frames of the first layer, and the offset of the pixel points in the first layer in the vertical axis direction can be calculated according to the speed of the upper and lower side frames of the first layer, as shown in equations (7) and (8) respectively. left +V right ) (7) stepY=C2×(V top +V bottom ) (8)

[0098] In equations (7)-(8), stepX is the offset of the pixel points in the first layer in the X axis direction, and stepY is the offset of the pixel points in the first layer in the Y axis direction; C1 and C2 are constants, which can be adjusted according to the actual scene.

[0099] In this way, the N times of sampling in the adjacent pixel points of the current blurred pixel point of the first layer according to the center point of the first layer can be: the electronic device 100 performs N times of sampling in the adjacent pixel points of the current blurred pixel point of the first layer according to the center point of the first layer in combination with the above offsets.

[0100] After the N times of sampling is performed, the electronic device 100 calculates the average value of the color of the N times of sampled pixel points, and uses the above average value as the color of the current blurred pixel point, as shown in equation (9).

[0101] In equation (9), Color(x, y) is the color of the current blurred pixel point of the first layer.

[0102] As can be seen from equation (9), the farther the distance from the center point, the larger the interval of the sampled pixel points, and therefore, the closer to the center point in the second layer, the clearer the image, and the farther from the center point, the more blurred the image. That is, the motion blur effect achieved on the first layer in the embodiments of the present application is a blur effect outward from all around.

[0103] In the embodiment of the present application, after the electronic device 100 calculates the speed of each border of the first layer, the coordinates of the center point and the offset of the pixel points in the first layer in two mutually perpendicular directions are determined according to the speed of each border, and then the electronic device 100 averages the colors of the pixel points sampled for N times to obtain the color of the current blurred pixel point, thereby achieving the motion blur effect on the first layer and simplifying the implementation of the motion blur.

[0104] In step 302, the electronic device 100 displays the second layer.

[0105] Still taking FIG. 4 as an example, the electronic device 100 offsets the pixel points in the first layer corresponding to the first window 43 in two mutually perpendicular directions, which is equivalent to performing motion blur processing on the first layer to obtain the second layer. In some embodiments, before displaying the second layer, the electronic device 100 can render the above-mentioned second layer to the frame buffer, thereby displaying the above-mentioned second layer. In the embodiment of the present application, after performing motion blur processing on the first layer corresponding to the first window 43, the obtained second layer can be as shown in 51 of FIG. 5, which is a schematic diagram of an application interface in an application starting process provided by another embodiment of the present application.

[0106] In the above-mentioned method for obtaining a motion blurred image, in response to the operation of the user, the electronic device 100 offsets the pixel points in the first layer in two mutually perpendicular directions to obtain the second layer, and then the electronic device 100 displays the second layer, thereby achieving the motion blur effect on each frame of the application interface. Moreover, the above-mentioned method for obtaining a motion blurred image performs motion blur processing on the pixel points in a single frame of the layer, and does not need to rely on the data of the previous multiple frames of the layer, thereby simplifying the implementation of the motion blur, reducing the power consumption of the electronic device 100, and saving resources.

[0107] FIG. 7 is a flowchart of a method for obtaining a motion blurred image provided by another embodiment of the present application. As shown in FIG. 7, before step 301 in the embodiment of FIG. 3, the method can further include:

[0108] In step 701, in response to the operation of the user, the electronic device 100 renders the first layer.

[0109] Specifically, the electronic device 100 can perform off-screen rendering on the first layer. Off-screen rendering is also known as background rendering or inactive rendering, which allows the first layer to be rendered without directly using the final output device (for example, a screen).

[0110] In this way, step 301 can be:

[0111] In step 702, the electronic device 100 offsets the pixel points in the rendered first layer in two mutually perpendicular directions to obtain the second layer.

[0112] In some examples, before step 301, the electronic device 100 can also perform Gaussian blur on the first layer.

[0113] Wherein, the Gaussian blur can be realized by using a Gaussian kernel to perform convolution operation on the layer. The Gaussian kernel is a discrete version of a two-dimensional Gaussian function, usually represented as a matrix, the size of the Gaussian kernel determines the degree of blur, usually an odd number, such as 3x3 or 5x5, etc. Specifically, performing Gaussian blur on the first layer can include:

[0114] First, create a Gaussian kernel matrix: select the size of the Gaussian kernel according to the required degree of blur, for example: 3x3 or 5x5.

[0115] Second, calculate the value of each element of the Gaussian kernel and normalize it so that the sum of all elements is equal to 1.

[0116] Third, perform convolution operation on each pixel in the first layer. Specifically, traverse each pixel point, and use the Gaussian kernel to perform convolution calculation with the pixel point and the pixel points in its neighborhood. When performing convolution calculation, align the center of the Gaussian kernel with the target pixel point, and then sum the pixel values in the neighborhood by weighting.

[0117] For the pixels on the edge of the layer, due to the lack of part of the neighborhood pixels, the following processing methods can be used:

[0118] 1) Zero padding: treat the missing pixels as 0.

[0119] 2) Mirror padding: use the mirror value of the edge pixel.

[0120] 3) Repeat the edge pixel: directly use the value of the edge pixel.

[0121] Finally, integrate the results: replace the original pixel value with the convolution result of each pixel point to generate a new blurred image.

[0122] In the above method of obtaining a motion blurred image, in response to the operation of the user, the electronic device 100 renders the first layer, offsets the pixel points in the rendered first layer in two mutually perpendicular directions, obtains the second layer, and finally the electronic device 100 displays the second layer, so that the motion blur effect can be realized for each frame of the application interface. Layer, and the above method of obtaining a motion blurred image is to perform motion blur processing on the pixel points in a single frame of layer data, so it simplifies the implementation of motion blur, reduces the power consumption of the electronic device 100, and saves resources.

[0123] It should be noted that in the embodiments shown in FIGS. 3-7, the method of performing motion blur on each frame of the application interface during the application starting process is taken as an example for description, and the method provided in the embodiments shown in FIGS. 3-7 can also be used to perform motion blur on each frame of the application interface during the application exiting process, which will not be described herein again. In addition, the method provided in the embodiments shown in FIGS. 3-7 can also be applied to scenarios such as dynamic effects, games, and / or movies, and the application scenarios of the above-mentioned method of obtaining a motion blurred image are not limited in the embodiments.

[0124] Referring to the description in the embodiments shown in FIG. 2, the graphics subsystem in the application program framework layer and the surface compositor in the system library of the electronic device 100 can perform motion blur on the first layer.

[0125] FIG. 8 is a schematic diagram of the surface compositor performing motion blur on the first layer according to an embodiment of the present application. As shown in FIG. 8, the surface compositor performing motion blur on the first layer can include the following steps:

[0126] In step 801, the electronic device 100 performs rendering on the first layer in response to the operation of the user.

[0127] For example, the electronic device 100 can perform off-screen rendering on the first layer. Referring to FIG. 8, the first layer can be rendered by a canvas and a bitmap tool.

[0128] Referring to FIG. 8, in the embodiments of the present application, the surface compositor (SurfaceFlinger) in the electronic device 100 can also mark the first layer that needs to be motion blurred before performing rendering on the first layer in response to the operation of the user.

[0129] In step 802, the electronic device 100 performs Gaussian blur on the first layer.

[0130] In step 803, the electronic device 100 offsets the pixel points in the rendered first layer to two mutually perpendicular directions to obtain a second layer.

[0131] Specifically, referring to FIG. 8, after the electronic device 100 performs rendering on the first layer by a canvas and a bitmap tool, the electronic device 100 can call a motion blur filter to perform motion blur on the rendered first layer, that is, offset the pixel points in the rendered first layer to two mutually perpendicular directions to obtain a second layer.

[0132] The manner of offsetting the pixel points in the rendered first layer to two mutually perpendicular directions to obtain a second layer can refer to the description in step 302 of the embodiment shown in FIG. 3, which will not be described herein again.

[0133] At step 804, the electronic device 100 displays the second layer.

[0134] In some implementations, the electronic device 100 can render the second layer described above to a frame buffer to display the second layer.

[0135] In an embodiment of the present application, the first layer that needs to be subjected to motion blur can be one layer. As shown in FIG. 5, after a user clicks a music icon, the electronic device 100 starts a music application, and in the process of starting the music application, the electronic device 100 subjects the layer on which the interface of the music application is located to motion blur processing, and the obtained blurred interface can be as shown in 51. Alternatively, the first layer that needs to be subjected to motion blur can also include at least two layers. For example, in a scenario in which the electronic device 100 displays two application interfaces in split screen, as shown in 91 in FIG. 9, the left half of the screen of the electronic device 100 displays the interface of application 1, and the right half of the screen displays the interface of application 2. In response to a user's exit operation (for example, an operation in which the user slides a finger from the bottom end of the screen of the electronic device 100 to the middle of the screen) on application 1 and application 2, the electronic device 100 performs an exit operation on application 1 and application 2, marks the layer on which the interface of application 1 is located and the layer on which the interface of application 2 is located as layers that need to be subjected to motion blur, and FIG. 9 is a schematic diagram of the electronic device 100 displaying the interfaces of application 1 and application 2 in split screen provided by an embodiment of the present application.

[0136] After marking the layers that need to be subjected to motion blur, the electronic device 100 renders all the marked layers, and then subjects all the marked layers to motion blur as a whole, so that in the split screen scenario, the effect of motion blur can be consistent, the effect of motion blur can be improved, and the comfort and fluency can be improved. After the layers on which the interfaces of application 1 and application 2 are located are subjected to motion blur, the obtained layers can be as shown in 92 and 93 in FIG. 9, respectively.

[0137] For example, FIG. 10 is a schematic diagram of a graphics subsystem subjecting a first layer to motion blur provided by an embodiment of the present application, and as shown in FIG. 10, can include:

[0138] At step 1001, in response to a user's operation, a desktop requests a graphics subsystem (view) to mark a first layer that needs to be subjected to motion blur.

[0139] At step 1002, the graphics subsystem requests a rendering node (RenderNode) to mark the first layer that needs to be subjected to motion blur.

[0140] At step 1003, the rendering node marks the first layer that needs to be subjected to motion blur.

[0141] Step 1004, the rendering node returns a marked complete response to the desktop.

[0142] Step 1005, the desktop sends a drawing instruction to the graphics subsystem, and the drawing instruction is used to request the graphics subsystem to render the first layer.

[0143] Step 1006, the graphics subsystem requests the rendering node drawing unit (RenderNodeDrawable) to render the first layer.

[0144] Step 1007, the rendering node drawing unit (RenderNodeDrawable) calls a motion blur effect to perform motion blur processing on the first layer to obtain a second layer.

[0145] Specifically, the rendering node drawing unit (RenderNodeDrawable) calls the motion blur effect to offset the pixel points in the first layer to two mutually perpendicular directions to obtain the second layer.

[0146] Wherein, the manner of offsetting the pixel points in the rendered first layer to two mutually perpendicular directions to obtain the second layer can refer to the description in step 302 of the embodiment shown in FIG. 3, which will not be described here.

[0147] Step 1008, the rendering node drawing unit (RenderNodeDrawable) returns the second layer.

[0148] Wherein, the second layer can be as shown in 51 of FIG. 5.

[0149] In the embodiment, the electronic device 100 performs motion blur processing on the first layer through the graphics subsystem in the application framework layer, and the embodiment is to perform motion blur processing on the pixel points in the single frame layer, and does not need to rely on the previous multi-frame layer data, so that the implementation of the motion blur is simplified, the power consumption of the electronic device 100 is reduced, and the resources are saved.

[0150] It can be understood that part or all of the steps or operations in the above embodiments are only examples, and the embodiments of the present application can also perform other operations or various modifications of the operations. In addition, each step can be executed in a different order from the above-mentioned embodiments, and it is possible that not all the operations in the above-mentioned embodiments are executed.

[0151] It can be understood that, in order to implement the above functions, the electronic device comprises hardware and / or software modules corresponding to each function. The algorithm steps of each example described in combination with the embodiments disclosed in the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is implemented in hardware or computer software driven hardware depends on the specific application of the technical solution and the design constraints. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered beyond the scope of the present application.

[0152] The present embodiment can divide the functional modules of the electronic device according to the above method embodiments. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one module. The integrated module can be implemented in the form of hardware. It should be noted that the division of modules in the present embodiment is illustrative and is only a logical functional division. Actual implementation can have another division method.

[0153] FIG. 11 is a structural schematic diagram of an electronic device provided by another embodiment of the present application. In the case of dividing each functional module according to each function, FIG. 11 shows a possible composition schematic diagram of the electronic device 1100 involved in the above embodiments. As shown in FIG. 11, the electronic device 1100 can include a receiving unit 1101, a processing unit 1102, and a sending unit 1103.

[0154] The processing unit 1102 can be configured to support the electronic device 1100 to perform steps 301-302, steps 701-702, steps 801-803, and steps 1001-1007, and / or other processes of the technical solutions described in the embodiments of the present application.

[0155] It should be noted that all related contents of each step involved in the method embodiments shown in FIGS. 3-10 of the present application can be cited in the functional description of the corresponding functional module, which will not be repeated here.

[0156] The electronic device 1100 provided by the present embodiment is used to perform the method for obtaining a motion blurred image provided by the embodiments shown in FIGS. 3-10 of the present application, and thus the same effects as the above method can be achieved.

[0157] It should be understood that the electronic device 1100 can correspond to the electronic device 100 shown in FIG. 1. Among them, the functions of the receiving unit 1101 and the sending unit 1103 can be implemented by the processor 110, the antenna 1 and the mobile communication module 150 in the electronic device 100 shown in FIG. 1, and / or by the processor 110, the antenna 2 and the wireless communication module 160; the function of the processing unit 1102 can be implemented by the processor 110, the touch sensor 180K and the display screen 194 in the electronic device 100 shown in FIG. 1.

[0158] In the case of using integrated units, the electronic device 1100 can include a processing module, a storage module and a communication module.

[0159] Among them, the processing module can be used to control and manage the actions of the electronic device 1100, for example, it can be used to support the electronic device 1100 to execute the steps performed by the receiving unit 1101, the processing unit 1102 and the sending unit 1103 described above. The storage module can be used to support the electronic device 1100 to store program codes and data, etc. The communication module can be used to support the electronic device 1100 to communicate with other devices.

[0160] Among them, the processing module can be a processor or a controller, which can implement or execute various exemplary logic blocks, modules and circuits described in combination with the disclosure of the present application. The processor can also be a combination of computing functions, such as one or more microprocessor combinations, digital signal processing (digital signal processing, DSP) and microprocessor combinations, etc. The storage module can be a memory. The communication module can be a device for interacting with other electronic devices, such as radio frequency circuit, Bluetooth chip and / or Wi-Fi chip, etc.

[0161] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device 1100 involved in the embodiment can be a device with the structure shown in FIG. 1.

[0162] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and when the computer program runs on a computer, the computer executes the method provided by the embodiments shown in FIGS. 3-10 of the present application.

[0163] The embodiment of the present application also provides a computer program product, which includes a computer program, and when the computer program runs on a computer, the computer executes the method provided by the embodiments shown in FIGS. 3-10 of the present application.

[0164] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the cases of A alone, A and B together, and B alone. Wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" and the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0165] Those skilled in the art can appreciate that the units and algorithm steps described in the embodiments disclosed herein can be realized by electronic hardware, computer software and combination of electronic hardware and computer software. Whether the functions are realized in hardware or software mode depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0166] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.

[0167] In several embodiments provided in the present application, any function realized in the form of a software function unit and sold or used as an independent product can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0168] The above is merely specific embodiments of the present application, and any skilled person in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered in the protection scope of the present application. The protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of obtaining a motion-blurred image, characterized by, The method comprises the following steps: in response to a user operation, offsetting pixel points in a first layer to two mutually perpendicular directions to obtain a second layer; displaying the second layer.

2. The method of claim 1, wherein, The step of offsetting pixel points in the first layer to two mutually perpendicular directions to obtain a second layer comprises the following steps: obtaining a center point of the first layer; performing N times of sampling in adjacent pixel points of a currently blurred pixel point in the first layer according to the center point of the first layer; wherein N is an integer and N>0; calculating an average value of colors of the N times of sampled pixel points, and taking the average value as the color of the currently blurred pixel point.

3. The method of claim 2, wherein, When performing N times of sampling in the adjacent pixel points, the farther from the center point of the first layer, the larger the interval of the sampled pixel points.

4. The method of claim 2, wherein, The step of obtaining the center point of the first layer comprises the following steps: determining the speed of each side of the first layer according to the position of the first layer in a current frame and a previous frame; determining the center point of the first layer in the current frame according to the speed of each side of the first layer.

5. The method of claim 4, wherein, Before the step of performing N times of sampling in the adjacent pixel points of the currently blurred pixel point in the first layer according to the center point of the first layer, the method further comprises the following steps: calculating the offset amount of pixel points in the first layer in two mutually perpendicular directions respectively according to the speed of each side of the first layer; The step of performing N times of sampling in the adjacent pixel points of the currently blurred pixel point in the first layer according to the center point of the first layer comprises the following steps: performing N times of sampling in the adjacent pixel points of the currently blurred pixel point in the first layer according to the center point of the first layer in combination with the offset amount.

6. The method of claim 4, wherein, The step of determining the center point of the first layer according to the speed of each side of the first layer comprises the following steps: determining the horizontal coordinate of the center point of the first layer in the current frame according to the speed of the left and right side frames of the first layer, and determining the vertical coordinate of the center point of the first layer in the current frame according to the speed of the upper and lower side frames of the first layer.

7. The method of claim 5, wherein, The step of calculating the offset amount of pixel points in the first layer in two mutually perpendicular directions respectively according to the speed of each side of the first layer comprises the following steps: calculating the offset amount of pixel points in the first layer in the horizontal axis direction according to the speed of the left and right side frames of the first layer, and calculating the offset amount of pixel points in the first layer in the vertical axis direction according to the speed of the upper and lower side frames of the first layer.

8. The method of claim 1, wherein, Before the step of offsetting pixel points in the first layer to two mutually perpendicular directions to obtain a second layer, the method further comprises the following steps: in response to a user operation, starting an application corresponding to an icon operated by the user; or in response to a user exit operation for an application, performing an exit operation on the operated application.

9. The method of claim 1, wherein, Before the step of offsetting pixel points in the first layer to two mutually perpendicular directions to obtain a second layer, the method further comprises the following step: rendering the first layer.

10. The method of claim 9, wherein, The step of offsetting pixel points in the first layer to two mutually perpendicular directions to obtain a second layer comprises the following step: offsetting pixel points in the rendered first layer to two mutually perpendicular directions to obtain a second layer.

11. The method according to any one of claims 1 to 10, characterized in that, Before the shifting the pixel points in the first layer to two directions perpendicular to each other to obtain a second layer, the method further comprises: performing Gaussian blur on the first layer.

12. An electronic device, comprising: comprise: one or more processors; a memory; a plurality of application programs; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs comprise instructions which, when executed by the electronic device, cause the electronic device to perform the method according to any one of claims 1-11.

13. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and when the computer program runs on a computer, the computer program causes the computer to perform the method according to any one of claims 1-11.

Citation Information

Patent Citations

  • Staggered layer display method for picture, electronic equipment and storage medium

    CN108845737A

  • Image processing method and device, electronic equipment and computer readable storage medium

    CN112541867A

  • Image processing method and device, electronic equipment and readable storage medium

    CN117729316A

  • System, method, and computer program product for implementing smooth user interface animation using motion blur

    US20140333669A1