Brush effect image generation method, image editing method, device and storage medium
By selecting the pattern extraction area on the display screen and using neural network model or image processing technology to generate brush renderings with higher definition, the problem of low clarity in brush renderings in the prior art is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202011111524.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-16
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2040-10-16
AI Technical Summary
In the prior art, the clarity of the brush renderings is low, which affects the user experience.
By responding to the area selection operation on the display screen, the pattern extraction area is determined, the first brush rendering is obtained, and a second brush rendering with higher clarity is generated through neural network model or image processing technology.
Improves the clarity of the brush renderings and enhances the user experience.
Smart Images

Figure CN114445522B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and in particular to a brush effect image generation method, an image editing method, a device and a storage medium. Background Art
[0002] A brush is an image editing tool. By configuring a brush effect map for a brush, you can directly add the pattern in the brush effect map to the image in the form of a brush, such as wood grain texture or starry sky pattern.
[0003] In the related art, brush effect images are usually provided by image editing tools, or are custom designed by users and then added to image editing tools. However, both the brush effect images provided by image editing tools and the brush effect images custom designed by users have the problem of low clarity. Summary of the invention
[0004] In view of this, the present application provides a method for generating a brush effect image, which is applied to a terminal device provided with a display screen, and the method comprises:
[0005] In response to an area selection operation on a display interface in a display screen, determining a pattern extraction area in the display interface;
[0006] According to the pattern extraction area, a first brush effect image is obtained, wherein the pattern of the first brush effect image is the pattern corresponding to the pattern extraction area in the display interface;
[0007] A second brush effect image is obtained according to the first brush effect image, wherein the first brush effect image and the second brush effect image have the same pattern, and the clarity of the second brush effect image is greater than that of the first brush effect image.
[0008] In an optional embodiment, the first brush effect image and the second brush effect image are scalar images, and a resolution of the second brush effect image is greater than that of the first brush effect image.
[0009] In an optional embodiment, obtaining the second brush effect diagram according to the first brush effect diagram includes: obtaining the second brush effect diagram according to the first brush effect diagram and a mapping relationship between the first brush effect diagram and the second brush effect diagram.
[0010] In an optional embodiment, obtaining the second brush effect image according to the first brush effect image includes: inputting the first brush effect image into a trained neural network model, and outputting the second brush effect image.
[0011] In an optional embodiment, the first brush effect graph is a scalar graph, and the second brush effect graph is a vector graph.
[0012] In an optional embodiment, obtaining the second brush effect graph according to the first brush effect graph includes: converting the first brush effect graph as a scalar graph into a vector graph to obtain the second brush effect graph.
[0013] In an optional embodiment, obtaining a first brush effect image according to the pattern extraction area includes: parsing a pattern of the pattern extraction area in the display interface to obtain the first brush effect image.
[0014] In an optional embodiment, obtaining a first brush effect image based on the pattern extraction area includes: parsing a pattern of the pattern extraction area in the display interface; extracting a minimum repeating unit pattern from the parsed pattern to obtain a first brush effect image.
[0015] In an optional embodiment, in response to an area selection operation on the display interface, determining a pattern extraction area in the display interface includes: in response to a circle selection operation on the display interface, determining the pattern extraction area in the display interface according to the circled area of the circle selection operation.
[0016] In an optional embodiment, the method further includes: storing the second brush effect image.
[0017] In an optional embodiment, the display screen is a touch screen, and the method further includes: sending the second brush effect image to a touch input device.
[0018] In a second aspect, an embodiment of the present application provides an image editing method, which is applied to a terminal device provided with a display screen, and is characterized by comprising:
[0019] Generate a second brush effect graph by using the method described in the first aspect, or call a first target brush effect graph or a second target brush effect graph, wherein the first target brush effect graph is any one of the second brush effect graphs stored by the method described in the first aspect, and the second target brush effect graph is any one of the second brush effect graphs sent to the touch input device by using the method described in the first aspect;
[0020] The second brush effect map, the first target brush effect map or the second target brush effect map is applied to the brush to draw the target image.
[0021] In an optional embodiment, the second brush effect map, the first target brush effect map or the second target brush effect map is applied to the brush to draw the target image, including: in response to the zooming in or out operation of the brush effect map, the second brush effect map, the first target brush effect map or the second target brush effect map is zoomed in or out; and the zoomed in or out second brush effect map, the first target brush effect map or the second target brush effect map is applied to the brush to draw the target image.
[0022] In a third aspect, an embodiment of the present application provides a method for generating a brush effect image, which is applied to a touch input device, and the method includes:
[0023] Receiving a second brush effect image sent by the terminal device;
[0024] The second brush effect image is stored in the touch input device.
[0025] In an optional embodiment, the touch input device includes a display screen, and the method further includes: displaying the stored second brush effect image on the display screen of the touch input device.
[0026] In a fourth aspect, an embodiment of the present application provides an image editing method, which is applied to a touch input device, and the method includes:
[0027] In response to the second target brush effect picture calling operation, a second target brush effect picture calling instruction is sent to the terminal device, and the second target brush effect picture calling instruction is used to instruct the terminal device to call the second target brush effect picture, and the second target brush effect picture is any one of the second brush effect pictures stored using the method described in the third aspect.
[0028] In a fifth aspect, an embodiment of the present application provides a terminal device, including:
[0029] Display screen;
[0030] one or more processors;
[0031] Memory;
[0032] 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 include instructions, which, when executed by the terminal device, enable the terminal device to execute the method described in any one of the first aspect and the second aspect.
[0033] In a sixth aspect, an embodiment of the present application provides a touch input device, including:
[0034] one or more processors;
[0035] Memory;
[0036] 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 include instructions, which, when executed by the terminal device, enable the terminal device to execute the method described in any one of the third aspect and the fourth aspect.
[0037] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described in the first aspect and the second aspect.
[0038] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described in the third aspect and the fourth aspect.
[0039] The brush effect image obtained by using the embodiment of the present application has high clarity, which improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0041] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0042] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0043] Figure 3 A schematic diagram of a brush effect image generation method provided in an embodiment of the present application;
[0044] Figure 4 A schematic diagram of a display interface provided in an embodiment of the present application;
[0045] Figure 5 A schematic diagram of a brush effect diagram provided in an embodiment of the present application;
[0046] Figure 6 A schematic diagram of another brush effect diagram provided in an embodiment of the present application;
[0047] Figure 7 A schematic diagram of another method for generating a brush effect image provided in an embodiment of the present application;
[0048] Figure 8 A schematic diagram of another display interface provided in an embodiment of the present application;
[0049] Fig. 9 A schematic diagram of extracting a minimum repeating unit pattern provided in an embodiment of the present application;
[0050] Fig.10 A schematic diagram of a flow chart of an image editing method provided in an embodiment of the present application;
[0051] Fig.11 A schematic diagram of another display interface provided in an embodiment of the present application;
[0052] Fig.12 A schematic diagram of a flow chart of an image editing method provided in an embodiment of the present application;
[0053] Fig.13 A software structure block diagram of an electronic device provided in an embodiment of the present application;
[0054] Fig.14a and Fig.14b A schematic diagram of another display interface provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0056] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0057] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0058] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0059] Before specifically introducing the embodiments of the present application, a brief introduction to the scenarios involved in the present application is first given.
[0060] See also Figure 1 , is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, the electronic device involved in the embodiment of the present application includes a terminal device 101 and a touch input device 102. The terminal device 101 includes a touch screen, and a user can input instructions on the touch screen of the terminal device 101 through the touch input device 102 to complete related operations on the terminal device 101. For example, a file or a drawing can be selected by clicking the touch screen through the touch input device 102.
[0061] In addition to inputting instructions on the touch screen, the touch input device 102 can also communicate with the terminal device 101 to transmit information. The communication network can be a local area network or a wide area network transferred through a relay device. When the communication network is a local area network, exemplarily, the communication network can be a short-range communication network such as a wifi hotspot network, a wifi P2P network, a Bluetooth network, a zigbee network or a near field communication (NFC) network. When the communication network is a wide area network, exemplarily, the communication network can be a third-generation mobile communication technology (3rd-generation wireless telephone technology, 3G) network, a fourth-generation mobile communication technology (the 4th generation mobile communication technology, 4G) network, a fifth-generation mobile communication technology (5th-generation mobile communication technology, 5G) network, a future-evolved public land mobile network (public land mobile network, PLMN) or the Internet, etc.
[0062] It is understandable that, in addition to a tablet computer, the terminal device 101 can also be a mobile phone, a personal computer (PC), a personal digital assistant (PDA), a smart watch, a netbook, a wearable electronic device, an augmented reality (AR) device, a virtual reality (VR) device, a vehicle-mounted device, a smart car, a smart speaker, a robot, smart glasses, etc.
[0063] In some application scenarios provided in the embodiments of the present application, the touch input device 102 may not be included. For example, the user inputs instructions on the touch screen of the terminal device 101 with a finger, or inputs trigger instructions through an external interface device of the terminal device 101 such as a mouse, keyboard, or button.
[0064] See also Figure 2 , is a schematic diagram of the structure of an electronic device 200 provided in an embodiment of the present application. The electronic device 200 may be Figure 1 The terminal device 101 in.
[0065] The electronic device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc. The sensor module 280 may include a pressure sensor 280A, a gyroscope sensor 280B, an air pressure sensor 280C, a magnetic sensor 280D, an acceleration sensor 280E, a distance sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, a bone conduction sensor 280M, etc.
[0066] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0067] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (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 may be independent devices or integrated into one or more processors.
[0068] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0069] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0070] In some embodiments, the processor 210 may include one or more interfaces. The interface may 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.
[0071] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 210 may include multiple groups of I2C buses. The processor 210 may be coupled to the touch sensor 280K, the charger, the flash, the camera 293, etc. through different I2C bus interfaces. For example: the processor 210 may be coupled to the touch sensor 280K through the I2C interface, so that the processor 210 communicates with the touch sensor 280K through the I2C bus interface, thereby realizing the touch function of the electronic device 200.
[0072] The I2S interface can be used for audio communication. In some embodiments, the processor 210 can include multiple groups of I2S buses. The processor 210 can be coupled to the audio module 270 via the I2S bus to achieve communication between the processor 210 and the audio module 270. In some embodiments, the audio module 270 can transmit an audio signal to the wireless communication module 260 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0073] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 270 and the wireless communication module 260 can be coupled via a PCM bus interface. In some embodiments, the audio module 270 can also transmit audio signals to the wireless communication module 260 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0074] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 210 and the wireless communication module 260. For example, the processor 210 communicates with the Bluetooth module in the wireless communication module 260 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 270 can transmit an audio signal to the wireless communication module 260 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0075] The MIPI interface can be used to connect the processor 210 with peripheral devices such as the display screen 294 and the camera 293. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 210 and the camera 293 communicate via the CSI interface to realize the shooting function of the electronic device 200. The processor 210 and the display screen 294 communicate via the DSI interface to realize the display function of the electronic device 200.
[0076] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 210 with the camera 293, the display screen 294, the wireless communication module 260, the audio module 270, the sensor module 280, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0077] The USB interface 230 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 230 can be used to connect a charger to charge the electronic device 200, and can also be used to transfer data between the electronic device 200 and a peripheral device. 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, etc.
[0078] It is understandable 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 on the electronic device 200. In other embodiments of the present application, the electronic device 200 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0079] The charging management module 240 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 240 may receive charging input from a wired charger through the USB interface 230. In some wireless charging embodiments, the charging management module 240 may receive wireless charging input through a wireless charging coil of the electronic device 200. While the charging management module 240 is charging the battery 242, it may also power the electronic device through the power management module 241.
[0080] The power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240, and supplies power to the processor 210, the internal memory 221, the display screen 294, the camera 293, and the wireless communication module 260. The power management module 241 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 241 can also be set in the processor 210. In other embodiments, the power management module 241 and the charging management module 240 can also be set in the same device.
[0081] The wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor and the baseband processor.
[0082] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0083] The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 200. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 250 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the same device as at least some of the modules of the processor 210.
[0084] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 270A, a receiver 270B, etc.), or displays an image or video through a display screen 294. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 210 and be set in the same device as the mobile communication module 250 or other functional modules.
[0085] The wireless communication module 260 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 200. The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 210. The wireless communication module 260 can also receive the signal to be sent from the processor 210, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0086] In some embodiments, the antenna 1 of the electronic device 200 is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the electronic device 200 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), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0087] The electronic device 200 implements the display function through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or change display information.
[0088] The display screen 294 is used to display images, videos, etc. The display screen 294 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 (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 200 may include 1 or N display screens 294, where N is a positive integer greater than 1.
[0089] The electronic device 200 can realize the shooting function through ISP, camera 293, video codec, GPU, display screen 294 and application processor.
[0090] The ISP is used to process the data fed back by the camera 293. For example, when taking a photo, the shutter is opened, and 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. The ISP can also perform algorithm optimization on 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 set in the camera 293.
[0091] The camera 293 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the 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 optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted 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 other format. In some embodiments, the electronic device 200 may include 1 or N cameras 293, where N is a positive integer greater than 1.
[0092] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 200 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0093] Video codecs are used to compress or decompress digital videos. The electronic device 200 may support one or more video codecs. Thus, the electronic device 200 may play or record videos in a variety of coding formats, such as moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0094] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the electronic device 200 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0095] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0096] The internal memory 221 can be used to store computer executable program codes, which include instructions. The internal memory 222 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 200 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 210 executes various functional applications and data processing of the electronic device 200 by running instructions stored in the internal memory 221 and / or instructions stored in a memory provided in the processor.
[0097] The electronic device 200 can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone jack 270D, and the application processor.
[0098] The audio module 270 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 270 can also be used to encode and decode audio signals. In some embodiments, the audio module 270 can be arranged in the processor 210, or some functional modules of the audio module 270 can be arranged in the processor 210.
[0099] The speaker 270A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 200 can listen to music or listen to a hands-free call through the speaker 270A.
[0100] The receiver 270B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 200 receives a call or voice message, the voice can be received by placing the receiver 270B close to the human ear.
[0101] Microphone 270C, 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 speak by putting their mouth close to the microphone 270C to input the sound signal into the microphone 270C. The electronic device 200 can be provided with at least one microphone 270C. In other embodiments, the electronic device 200 can be provided with two microphones 270C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 200 can also be provided with three, four or more microphones 270C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0102] The earphone interface 270D is used to connect a wired earphone and can be a USB interface 230 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0103] The pressure sensor 280A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 280A can be disposed on the display screen 294.
[0104] There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. Capacitive pressure sensors can be at least two parallel plates with conductive materials. When a force acts on the pressure sensor 280A, the capacitance between the electrodes changes. The electronic device 200 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 294, the electronic device 200 detects the touch operation intensity according to the pressure sensor 280A. The electronic device 200 can also calculate the position of the touch based on the detection signal of the pressure sensor 280A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0105] The gyro sensor 280B can be used to determine the motion posture of the electronic device 200. In some embodiments, the angular velocity of the electronic device 200 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 280B. The gyro sensor 280B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 280B detects the angle of the electronic device 200 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 200 through reverse movement to achieve anti-shake. The gyro sensor 280B can also be used for navigation and somatosensory game scenes.
[0106] The air pressure sensor 280C is used to measure air pressure. In some embodiments, the electronic device 200 calculates the altitude through the air pressure value measured by the air pressure sensor 280C to assist in positioning and navigation.
[0107] The magnetic sensor 280D includes a Hall sensor. The electronic device 200 can use the magnetic sensor 280D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 200 is a flip phone, the electronic device 200 can detect the opening and closing of the flip cover according to the magnetic sensor 280D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.
[0108] The acceleration sensor 280E can detect the magnitude of the acceleration of the electronic device 200 in all directions (generally three axes). When the electronic device 200 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0109] The distance sensor 280F is used to measure the distance. The electronic device 200 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 200 can use the distance sensor 280F to measure the distance to achieve fast focusing.
[0110] The proximity light sensor 280G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 200 emits infrared light outward through the light emitting diode. The electronic device 200 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 200. When insufficient reflected light is detected, the electronic device 200 can determine that there is no object near the electronic device 200. The electronic device 200 can use the proximity light sensor 280G to detect that the user holds the electronic device 200 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 280G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0111] The ambient light sensor 280L is used to sense the ambient light brightness. The electronic device 200 can adaptively adjust the brightness of the display screen 294 according to the perceived ambient light brightness. The ambient light sensor 280L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 280L can also cooperate with the proximity light sensor 280G to detect whether the electronic device 200 is in a pocket to prevent accidental touch.
[0112] The fingerprint sensor 280H is used to collect fingerprints. The electronic device 200 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc.
[0113] The temperature sensor 280J is used to detect temperature. In some embodiments, the electronic device 200 uses the temperature detected by the temperature sensor 280J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 280J exceeds a threshold, the electronic device 200 reduces the performance of the processor located near the temperature sensor 280J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 200 heats the battery 242 to avoid abnormal shutdown of the electronic device 200 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 200 performs a boost on the output voltage of the battery 242 to avoid abnormal shutdown caused by low temperature.
[0114] The touch sensor 280K is also called a "touch control device". The touch sensor 280K can be set on the display screen 294. The touch sensor 280K and the display screen 294 form a touch screen, also called a "touch control screen". The touch sensor 280K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 294. In other embodiments, the touch sensor 280K can also be set on the surface of the electronic device 200, which is different from the position of the display screen 294.
[0115] The bone conduction sensor 280M can obtain a vibration signal. In some embodiments, the bone conduction sensor 280M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 280M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 280M can also be set in an earphone and combined into a bone conduction earphone. The audio module 270 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 280M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 280M to realize a heart rate detection function.
[0116] The key 290 includes a power key, a volume key, etc. The key 290 can be a mechanical key or a touch key. The electronic device 200 can receive key input and generate key signal input related to user settings and function control of the electronic device 200.
[0117] Motor 291 can generate vibration prompts. Motor 291 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 294, motor 291 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0118] Indicator 292 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0119] The SIM card interface 295 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 200 by inserting it into the SIM card interface 295 or pulling it out from the SIM card interface 295. The electronic device 200 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 295 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 295 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 295 can also be compatible with different types of SIM cards. The SIM card interface 295 can also be compatible with external memory cards. The electronic device 200 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 200 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 200 and cannot be separated from the electronic device 200.
[0120] See also Figure 3 , is a schematic diagram of a method for generating a brush effect image provided by an embodiment of the present application, which can be applied to Figure 1 and Figure 2 The terminal device shown mainly includes the following steps.
[0121] Step S301: In response to an area selection operation on a display interface in a display screen, a pattern extraction area is determined in the display interface.
[0122] It is understandable that in actual application scenarios, before executing the brush effect image generation operation, the terminal device needs to be triggered to enter the brush effect image generation mode. The terminal device can be triggered to enter the brush effect image generation mode through the touch screen or buttons of the terminal device, or by inputting instructions through buttons on a touch input device.
[0123] See also Figure 4 , is a schematic diagram of a display interface provided in an embodiment of the present application. Figure 4 4 shows a display interface 401 of a terminal device and a pattern extraction area 402 in the display interface 401. In an optional embodiment, the area selection operation may be a circle selection operation performed by a user in the display interface 401. Specifically, the user uses a stylus to long-press the touch screen and slides on the touch screen, and the terminal device generates the pattern extraction area 402 according to the sliding path of the stylus.
[0124] It is understandable that the pattern extraction area 402 is a closed area surrounded by the sliding path. However, in actual operation, it is not easy for the user to draw a completely closed area on the touch screen. In the embodiment of the present application, in order to improve the convenience of operation, when the sliding path is not closed or there is an intersection, the terminal device fits the sliding path that is not closed or has an intersection into a closed path, and uses the fitted closed path as the pattern extraction area 402.
[0125] In addition, in order to enhance the user's sense of immersion when using the terminal device, when the user slides on the touch screen, the display interface 401 displays the user's sliding path in real time, and when the sliding is completed, the closed path fitted by the terminal device.
[0126] It is understandable that those skilled in the art may also determine the pattern extraction area in other ways, for example, when a user clicks on the touch screen, the terminal device fits a closed area in the display interface according to the click position, and uses the closed area as the pattern extraction area 402. When there is only one click position, a circular area centered on the click position may be used as the pattern extraction area 402, and the radius of the circular area may be adjusted according to actual needs, which is not limited in the present embodiment of the application.
[0127] Step S302: obtaining a first brush effect diagram according to the pattern extraction area, wherein the pattern of the first brush effect diagram is a pattern corresponding to the pattern extraction area in the display interface.
[0128] After determining the pattern extraction area, the embodiment of the present application analyzes the image in the pattern extraction area in the display interface to obtain a first brush effect map, which is the display content in the pattern extraction area in the display interface. It can be understood that the first brush effect map is a scalar map.
[0129] Step S303: obtaining a second brush effect image according to the first brush effect image, wherein the first brush effect image and the second brush effect image have the same pattern, and the clarity of the second brush effect image is greater than that of the first brush effect image.
[0130] In actual application scenarios, users may need to enlarge the brush effect image, for example, Figure 4 The heart-shaped pattern in the image is magnified and swiped to other positions in the display interface 401. However, the scalar image is easily blurred after being magnified.
[0131] See also Figure 5 , is a schematic diagram of a brush effect diagram provided in an embodiment of the present application. Figure 5501 and 502 are shown in FIG. 501 , wherein the first brush effect image 501 is the first brush effect image before being enlarged, and the first brush effect image 502 is the first brush effect image after being enlarged. Figure 5 As shown, after the first brush effect image is enlarged, the pattern becomes blurred and unclear, which cannot meet the needs of users.
[0132] To address this problem, in an embodiment of the present application, after obtaining a first brush effect image, a second brush effect image with higher definition is obtained based on the first brush effect image. Compared with the first brush effect image, the second brush effect image has a higher definition than the first brush effect image, and the second brush effect image and the first brush effect image have the same pattern or texture.
[0133] See also Figure 6 , is a schematic diagram of another brush effect diagram provided in an embodiment of the present application. Figure 6 6 shows a first brush effect image 601 and second brush effect images 602 and 603, wherein the second brush effect image 602 is the second brush effect image before enlargement, and the second brush effect image 603 is the second brush effect image after enlargement. Figure 6 As shown, since the second brush effect image has a higher definition, after the second brush effect image is enlarged, it still has a higher definition.
[0134] In order to achieve the above effect, the present application provides two implementation methods. First, a scalar image with higher resolution is obtained through the first brush effect image as the second brush effect image to improve the clarity of the second brush effect image; second, the first brush effect image is converted into a vector image to obtain the second brush effect image. The following is a detailed description.
[0135] For the first implementation method mentioned above, it can specifically include: training the neural network model through a large number of high-definition pattern and low-definition pattern data groups to obtain a trained neural network model; inputting the first brush effect image with a lower resolution into the trained neural network model, and outputting the second brush effect image with a higher resolution. It should be pointed out that the resolution here is a relative concept, which means that the resolution of the second brush effect image is higher than that of the first brush effect image. In addition, in addition to using a neural network model, those skilled in the art can also use other technical means to obtain the mapping relationship between high-definition patterns and low-definition patterns, that is, the mapping relationship between the first brush effect image and the second brush effect image, and then obtain the second brush effect image according to the first brush effect image and the mapping relationship between the first brush effect image and the second brush effect image. Without departing from the inventive concept of the present application, they should all fall within the scope of protection of the present application.
[0136] For the second implementation method mentioned above, it can specifically include: by linearizing the first brush effect image, obtaining an edge contour image of the pattern in the first brush effect image; obtaining edge contour points in the edge contour image, and continuous edge contour points constitute a polygon; performing curve fitting on the points of each polygon; drawing the fitted polygon, and filling with colors to obtain a vector image of the first brush effect image, which is the second brush effect image. It can be understood that the vector image will not be distorted after being enlarged, so the clarity of the second brush effect image is higher than that of the first brush effect image. In addition, the above-mentioned method of converting a scalar image into a vector image is only a specific implementation method listed in the embodiment of the present application. Those skilled in the art can use other technical means to realize the vectorization of the scalar image, and the embodiment of the present application does not limit this.
[0137] The brush effect image obtained by using the embodiment of the present application has higher clarity, thereby improving the user experience.
[0138] See also Figure 7 , is a flow chart of another method for generating a brush effect diagram provided in an embodiment of the present application. Figure 3 Expanding on the basis of the embodiment shown, Figure 3 Step S302 in the method: obtaining a first brush effect map according to the pattern extraction area, specifically includes the following steps.
[0139] Step S701: parsing the pattern of the pattern extraction area in the display interface;
[0140] Step S702: extracting a minimum repeating unit pattern from the analyzed pattern to obtain a first brush effect image.
[0141] It is understandable that when the user extracts the brush effect pattern in the display interface, there are usually many repeated pattern units in the display interface. For example, grass in grassland images, waves in sea images, wood grain in furniture images, etc. In this case, it is usually only necessary to obtain the minimum repeating unit pattern to meet the user's demand for the brush. In addition, by extracting the minimum repeating unit pattern, the influence of the edge on the brush effect image can also be reduced.
[0142] See also Figure 8 , is another schematic diagram of a display interface provided in an embodiment of the present application. Figure 88 shows a display interface 801 and a pattern extraction area 802, wherein the pattern extraction area 802 covers a complete "heart-shaped" pattern and two incomplete "heart-shaped" patterns in the display interface 801. If the image corresponding to the pattern extraction area 802 in the display interface 801 is directly used as the brush effect image, then the brush is used to draw in the display interface, and the effect is shown in the brush drawing pattern 803, in which there are two incomplete "heart-shaped" patterns. Obviously, the brush drawing pattern 803 is not the brush effect pattern that the user wants.
[0143] Therefore, after parsing the pattern of the pattern extraction area in the display interface, the embodiment of the present application extracts a minimum repeating unit pattern from the parsed pattern, and uses the minimum repeating unit pattern as the first brush effect image.
[0144] See also Fig. 9 , is a schematic diagram of extracting a minimum repeating unit pattern provided in an embodiment of the present application. Figure 8 After the pattern extraction area 802 in the illustrated embodiment is analyzed, a analyzed image 901 is obtained, and the analyzed image 901 corresponds to the image of the pattern extraction area 802 in the display interface 801. The minimum repeating unit pattern 902 extracted from the analyzed image 901 is a complete "heart-shaped" pattern, and the user can use the brush to draw a "heart-shaped" pattern at other locations on the display interface when applying the brush effect diagram.
[0145] In an alternative embodiment, Figure 4 or Figure 7 Expanding on the basis of the illustrated embodiment, after step S303, the method further includes the step of storing the second brush effect image.
[0146] In actual application scenarios, after the user has finished drawing with the current brush effect image, he may need to use the brush effect image again after a period of time. If you need to select a pattern extraction area in the display interface to regenerate the brush effect image before drawing with the brush effect image each time, it will not only be cumbersome to operate and affect the user experience, but also increase the performance overhead of the terminal device.
[0147] Based on this, after obtaining the second brush effect diagram, the embodiment of the present application stores the second brush effect diagram in the terminal device, and directly calls the stored second brush effect diagram during subsequent use.
[0148] Based on the above brush effect image generation method, the present application embodiment also provides an image editing method. Fig.10 , is a flow chart of an image editing method provided in an embodiment of the present application. The method can be applied to Figure 1 and Figure 2The terminal device shown mainly includes the following steps.
[0149] Step S1001: Generate a second brush effect graph, or call the first target brush effect graph.
[0150] Specifically, the second brush effect image is a second brush effect image generated by any method in the above embodiments, and the first target brush effect image is any one of the second brush effect images stored in the terminal device. When the user uses the brush to draw, on the one hand, he can enter the brush effect image generation mode to make a brush effect image; on the other hand, he can directly select a brush effect image from the second brush effect images stored in the terminal device for use.
[0151] See also Fig.11 , is another schematic diagram of a display interface provided in an embodiment of the present application. Fig.11 1 shows a display interface 1101 and a brush effect graph control 1102, which is used to identify a brush effect graph stored in a terminal device by a user. Figure 1 For the "heart-shaped" pattern, brush effect Figure 2 For the "triangle" pattern, brush effect Figure 3 It is a "five-pointed star" pattern.
[0152] When the user uses a brush to draw, on the one hand, he can enter the brush effect image generation mode to create a brush effect image; on the other hand, he can select a stored brush effect image in the brush effect image control 1102 by clicking the brush effect image control 1102. Figure 2 In the corresponding area, select the "triangle" pattern as the brush effect image of the current brush.
[0153] Step S1002: applying the second brush effect image or the first target brush effect image to a brush to draw a target image.
[0154] If the user enters the brush effect map generation mode, the generated second brush effect map is applied to the brush according to the user's area selection operation, and the target graphic is drawn; if the user calls the stored second brush effect map, the corresponding first target brush effect map is applied to the brush according to the user's operation, and the target graphic is drawn.
[0155] In addition, before using the brush to draw the target image, the user can also enlarge or reduce the brush effect image to draw a brush effect pattern of a corresponding size in the target image. Specifically, in response to the enlargement or reduction operation of the brush effect image, the second brush effect image is enlarged or reduced; the enlarged or reduced brush effect image is applied to the brush to draw the target image.
[0156] See also Fig.12 , is a flow chart of an image editing method provided in an embodiment of the present application. The method can be applied to Figure 1 and Figure 2 The terminal device and touch input device shown mainly include the following steps.
[0157] Step S1201: the terminal device sends a second brush effect image to the touch input device.
[0158] In adopting Figure 3 or Figure 7 After the method of the embodiment generates the second brush effect image, in addition to storing the second brush effect image in the terminal device, the second brush effect image may also be sent to the touch input device and stored in the touch input device.
[0159] Step S1202: the touch input device stores the second brush effect image.
[0160] After receiving the second brush effect image sent by the terminal device, the touch input device stores the second brush effect image in the touch input device.
[0161] Step S1203: the touch input device sends a second target brush effect image calling instruction to the terminal device in response to the second target brush effect image calling operation.
[0162] Specifically, the second target brush effect image calling instruction includes identification information of the brush effect image, and the terminal device can determine which second brush effect image needs to be called through the identification information. The user can trigger the second target brush effect image calling operation by pressing a button on the touch input device.
[0163] In an optional embodiment, the touch input device is provided with a display screen, and the touch input device can display the second brush effect image through the display screen, so that the user can filter the second brush effect image that he wants to call. For example, the display screen is a touch screen, and as the user slides his finger on the touch screen, the second brush effect image displayed on the touch screen keeps switching. When the user clicks the screen, the second target brush effect image calling instruction is triggered, and the second brush effect image currently displayed on the display screen is called.
[0164] Step S1204: The terminal device calls the second target brush effect image.
[0165] After receiving the second target brush effect picture calling instruction, the terminal device calls the corresponding second brush effect picture according to the identification information in the second target brush effect picture calling instruction.
[0166] Step S1205: the terminal device applies the second target brush effect image to the brush to draw the target image.
[0167] In the embodiment of the present application, the terminal device sends the brush effect image to the touch input device for backup, and the call operation of the brush effect image can be triggered by the touch input device.
[0168] See also Fig.13 , which is a software structure block diagram of the electronic device provided in an embodiment of the present application.
[0169] like Fig.13 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0170] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0171] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0172] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0173] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0174] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0175] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0176] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0177] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0178] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0179] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0180] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0181] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0182] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0183] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0184] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0185] A 2D graphics engine is a drawing engine for 2D drawings.
[0186] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0187] The method provided in the embodiment of the present application can be implemented by an application program at the application program layer, or by the bottom layer of the operating system, such as the kernel layer, system library and / or application program framework layer. When the above method is implemented based on the bottom layer of the operating system, it can be used across applications.
[0188] See also Fig.14a and Fig.14b , is another schematic diagram of a display interface provided in an embodiment of the present application. Fig.14a 1401 and the second application window 1402 are shown in the figure. The user determines the pattern extraction area 1403 in the first application window 1401 by circling the selection operation. The terminal device generates a second brush effect image according to the pattern extraction area 1403. It can be understood that the second brush effect image includes a "heart-shaped" pattern. The user uses a brush to add the second brush effect image to the second application window 1402, and a brush drawing pattern 1404 is generated in the second application window 1402.
[0189] In a specific implementation, an embodiment of the present application also provides a terminal device, which includes a display screen; one or more processors; a memory; 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 include instructions, which, when executed by the terminal device, cause the terminal device to perform the following steps: in response to an area selection operation on a display interface in a display screen, determine a pattern extraction area in the display interface; based on the pattern extraction area, obtain a first brush effect map, the pattern of the first brush effect map is the pattern corresponding to the pattern extraction area in the display interface; based on the first brush effect map, obtain a second brush effect map, wherein the patterns of the first brush effect map and the second brush effect map are the same, and the clarity of the second brush effect map is greater than that of the first brush effect map.
[0190] The brush effect image prepared by the embodiment of the present application has high clarity, which improves the user experience.
[0191] In addition to the above steps, the terminal device may also execute any part or all of the steps in the above method embodiment, which will not be repeated here for the sake of brevity.
[0192] In a specific implementation, an embodiment of the present application also provides a touch input device, which includes one or more processors; a memory; 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 include instructions. When the instructions are executed by the terminal device, the terminal device performs the following steps: receiving a second brush effect image sent by the terminal device; and storing the second brush effect image in the touch input device.
[0193] In addition to the above steps, the touch input device can also execute any part or all of the steps in the above method embodiments, which will not be repeated here for the sake of brevity.
[0194] In a specific implementation, the present application further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided in the present application. The storage medium may be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0195] In a specific implementation, an embodiment of the present application further provides a computer program product, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes some or all of the steps in the above method embodiment.
[0196] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0197] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0198] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0199] In several embodiments provided by the present invention, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0200] The above is only a specific embodiment of the present invention. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A brush effect image generation method, applied to a terminal device with a display screen, characterized in that: include: In response to an area selection operation on a display interface in a display screen, determining a pattern extraction area in the display interface; According to the pattern extraction area, a first brush effect image is obtained, wherein the pattern of the first brush effect image is the pattern corresponding to the pattern extraction area in the display interface; According to the first brush effect image, a second brush effect image is obtained, wherein the first brush effect image and the second brush effect image have the same pattern, and the clarity of the second brush effect image is greater than that of the first brush effect image; Wherein, the first brush effect graph and the second brush effect graph are scalar graphs; or, The first brush effect graph is a scalar graph, and the second brush effect graph is a vector graph.
2. The method according to claim 1, characterized in that: The first brush effect image and the second brush effect image are scalar images, and a resolution of the second brush effect image is greater than that of the first brush effect image.
3. The method according to claim 2, characterized in that The step of obtaining a second brush effect diagram according to the first brush effect diagram comprises: A second brush effect graph is obtained according to the first brush effect graph and a mapping relationship between the first brush effect graph and the second brush effect graph.
4. The method according to claim 3, characterized in that The step of obtaining a second brush effect diagram according to the first brush effect diagram comprises: The first brush effect graph is input into the trained neural network model, and a second brush effect graph is output.
5. The method according to claim 1, characterized in that The step of obtaining a second brush effect diagram according to the first brush effect diagram comprises: The first brush effect image, which is a scalar image, is converted into a vector image to obtain a second brush effect image.
6. The method according to claim 1, characterized in that The step of obtaining a first brush effect map according to the pattern extraction area includes: The pattern of the pattern extraction area in the display interface is analyzed to obtain a first brush effect image.
7. The method according to claim 1, characterized in that The step of obtaining a first brush effect map according to the pattern extraction area includes: Analyzing the pattern of the pattern extraction area in the display interface; A minimum repeating unit pattern is extracted from the analyzed pattern to obtain a first brush effect image.
8. The method according to claim 1, characterized in that: The step of determining a pattern extraction area in the display interface in response to an area selection operation on the display interface includes: In response to a circle selection operation on a display interface, a pattern extraction area in the display interface is determined according to a circle selection area of the circle selection operation.
9. The method according to claim 1, characterized in that: Also includes: The second brush effect image is stored.
10. The method according to claim 1, characterized in that The display screen is a touch screen, and the method further includes: The second brush effect image is sent to the touch input device.
11. An image editing method, applied to a terminal device provided with a display screen, characterized in that: include: Generate a second brush effect graph by the method described in any one of claims 1 to 8, or call a first target brush effect graph or a second target brush effect graph, wherein the first target brush effect graph is any one of the second brush effect graphs stored by the method described in claim 9, and the second target brush effect graph is any one of the second brush effect graphs sent to the touch input device by the method described in claim 10; The second brush effect map, the first target brush effect map or the second target brush effect map is applied to the brush to draw the target image.
12. The method according to claim 11, characterized in that Applying the second brush effect map, the first target brush effect map or the second target brush effect map to a brush to draw a target image includes: In response to a zoom-in or zoom-out operation of the brush effect image, zooming in or out the second brush effect image, the first target brush effect image or the second target brush effect image; The enlarged or reduced second brush effect image, the first target brush effect image or the second target brush effect image is applied to the brush to draw the target image.
13. A brush effect image generation method, applied to a touch input device, characterized in that: include: Receiving a second brush effect image sent by a terminal device, wherein the second brush effect image is generated by the method according to any one of claims 1 to 8; The second brush effect image is stored in the touch input device.
14. The method according to claim 13, characterized in that The touch input device includes a display screen, and the method further includes: The stored second brush effect image is displayed on a display screen of the touch input device.
15. An image editing method, applied to a touch input device, characterized in that: include: In response to a second target brush effect map calling operation, a second target brush effect map calling instruction is sent to the terminal device, wherein the second target brush effect map calling instruction is used to instruct the terminal device to call the second target brush effect map, and the second target brush effect map is any one of the second brush effect maps stored using the method described in claim 13 or 14.
16. A terminal device, characterized in that: include: Display screen; one or more processors; Memory; 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 include instructions, which, when executed by the terminal device, enable the terminal device to execute the method described in any one of claims 1 to 12.
17. A touch input device, characterized in that: include: one or more processors; Memory; 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 include instructions, which, when executed by the terminal device, enable the terminal device to execute the method described in any one of claims 13 to 15.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 12.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 13 to 15.
Citation Information
Patent Citations
A high-definition video image processing method
CN101102498A
Image processing apparatus and image processing method
CN102810201A
Cited By
Brush effect picture generation method, image editing method and device, and storage medium
WO2022078116A1