Image processing method and device
By using the neural network processor in the terminal device to analyze the image data and determine the image processing parameters, and segment the frequency band areas for sharpening and enhancement processing, the problem of unclear images in the terminal device is solved, and the display clarity of the image and the user experience are improved.
Patent Information
- Application Number
- CN202310875400.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-07-14
AI Technical Summary
The terminal device may be unclear when playing videos or displaying images, which affects the user experience. It is difficult to effectively improve the clarity of images with existing technology.
An image processing method is used to decode the source image data through the decoder. The neural network processor analyzes the decoded image data and determines the image processing parameters, including enhancement coefficients and thresholds in multiple frequency bands. The display processor uses these parameters to The image is sharpened and enhanced, and multiple frequency band areas are divided for processing to reduce noise and improve sharpness.
It improves the clarity of the image displayed on the terminal device and enhances the user experience. By dynamically adjusting the processing parameters to sharpen and enhance according to the image information, it adapts to the needs of different frequency band areas and improves the presentation of detailed picture information.
Smart Images

Figure CN117726543B
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to an image processing method and apparatus. Background Technology
[0002] Currently, the process of a terminal device playing videos or displaying images is as follows: the acquired image data is decoded by a decoder to obtain decoded image data; then, the display processor processes the decoded image data using preset image processing parameters to obtain processed image data; finally, the processed image data is displayed on the screen. However, the videos played or images displayed by the terminal device may appear blurry, affecting the user experience.
[0003] There is an urgent need to provide a method to improve the clarity of images displayed on terminal devices. Summary of the Invention
[0004] This application provides an image processing method and apparatus that can improve the clarity of images displayed on terminal devices, thereby enhancing the user experience.
[0005] In a first aspect, an image processing method is provided, applied to a terminal device including a decoder, a neural network processor, a display processor, and a display screen. The method includes: decoding source image data of a first image using the decoder to obtain decoded image data of the first image; transmitting the decoded image data of the first image to the display processor and the neural network processor respectively; analyzing and processing the decoded image data of the first image using the neural network processor to obtain image processing parameters of the first image, and transmitting the image processing parameters of the first image to the display processor, wherein the image processing parameters of the first image include an enhancement coefficient for each frequency band region in a plurality of frequency band regions of the first image, and a threshold for dividing the decoded image data of the first image into the plurality of frequency band regions; sharpening and enhancing the decoded image data of the first image using the image processing parameters of the first image through the display processor to obtain first image data; and transmitting the first image data to the display screen to display the first image.
[0006] The image processing method of this application involves a neural network processor analyzing and calculating the decoded image data of a first image to determine the enhancement coefficient of each frequency band region in multiple frequency band regions of the first image, as well as a threshold for dividing the multiple frequency band regions. This allows the display processor to perform sharpening and enhancement processing on each frequency band in the decoded image data of the first image using the enhancement coefficient of each frequency band region. Compared to preset image processing parameters, since the image processing parameters for the first image are determined based on the image information of the decoded image data of the first image, and these parameters also include the enhancement coefficient of each frequency band region in multiple frequency band regions for processing the decoded image data, when a certain frequency band region has a lot of noise, the enhancement coefficient corresponding to that frequency band region can be smaller, so that using the smaller enhancement coefficient to perform sharpening and enhancement processing on that frequency band region can reduce the noise in that frequency band region. Conversely, when the edge information of a certain frequency band region is not prominent enough compared to the surrounding pixels, the enhancement coefficient corresponding to that frequency band region can be larger, so that using the larger enhancement coefficient to perform sharpening and enhancement processing on that frequency band region can improve the sharpness of that frequency band region, allowing the image corresponding to that frequency band region to include more detail information. Therefore, by processing the decoded image data of the first image using the image processing parameters of the first image, the terminal device can display a clearer first image, thereby improving the user experience.
[0007] It should be understood that the first image can be a single image or a frame from a video. The decoded image data of the first image can also be understood as the pixel data of the first image. The source image data of the first image can be network data obtained by the terminal device, such as NAL data, or image data stored in the terminal device. Multiple frequency band regions include at least two frequency band regions. Each frequency band region in the multiple frequency band regions corresponds to an enhancement coefficient, and the enhancement coefficients corresponding to each frequency band region in the multiple frequency band regions can be the same or different.
[0008] In some implementations of the first aspect, the step of analyzing and processing the decoded image data of the first image by the neural network processor to obtain the image processing parameters of the first image includes: dividing the decoded image data of the first image into M groups of image data, where M is a positive integer greater than 1; determining the frequency domain value of each group of image data in the M groups of image data to obtain M groups of frequency domain values, wherein the M groups of frequency domain values include the frequency domain values of the multiple frequency band regions; and obtaining the image processing parameters of the first image based on the M groups of frequency domain values.
[0009] It should be understood that dividing the decoded image data of the first image into M groups of image data can be understood as dividing the decoded image data of the first image into M equal parts, resulting in M groups of image data. Frequency domain values can be understood as frequencies; the magnitude of each frequency domain value in the M groups can reflect the edge information, sharpness information, or grayscale value of the corresponding image area. Compared to not segmenting the decoded image data of the first image, by segmenting the decoded image data of the first image into blocks, performing frequency domain conversion, and analyzing the resulting M groups of frequency domain values, the terminal device can determine the image processing parameters of the first image by comparing the M groups of frequency domain values and based on the differences between each frequency band region of the M groups of frequency domain values.
[0010] In some implementations of the first aspect, obtaining the image processing parameters of the first image based on the M sets of frequency domain values includes: calculating the sum of the absolute values of the frequency domain values of each frequency band region in each of the M sets of frequency domain values; calculating the standard deviation of each frequency band region using the sum of the absolute values of the frequency domain values of each frequency band region in the M sets of frequency domain values; and obtaining the enhancement coefficient of each frequency band region using the standard deviation of each frequency band region.
[0011] It should be understood that by using the standard deviation of each frequency band region, the terminal device can determine the frequency domain value differences of the M groups of frequency domain values in each frequency band region. For example, assuming the standard deviation of the first frequency band region is close to 0, it means the sum of the absolute values of the M groups of frequency domain values in the first frequency band region is relatively close. The terminal device can determine that the information distribution in the image corresponding to the first frequency band region of the decoded image data of the first image is uniform, but may be entirely blurry or overly sharp. Assuming the standard deviation of the second frequency band region is large, it means the sum of the absolute values of the M groups of frequency domain values in the second frequency band region differs significantly. The terminal device can determine that the information distribution in the image corresponding to the second frequency band region of the decoded image data of the first image is uneven, and may exhibit phenomena such as some areas having richer contour and edge information, while other areas are relatively smooth. Therefore, based on the standard deviations of multiple frequency band regions and the relative frequency levels between multiple frequency band regions, the terminal device can determine the enhancement coefficients of multiple frequency band regions in the decoded image data of the first image.
[0012] In some implementations of the first aspect, the enhancement factor of the i-th frequency band region in the plurality of frequency band regions is obtained by the following formula:
[0013] W=ω*σ i +b
[0014] Where W is the enhancement coefficient of the first frequency band region, σ iLet be the standard deviation of the i-th frequency band region, i∈{1,2,…N}, N be the number of frequency band regions included in the multiple frequency band regions, and ω and b be empirical parameters.
[0015] In some implementations of the first aspect, obtaining the image processing parameters of the first image based on the M sets of frequency domain values includes: using the standard deviation of adjacent frequency band regions in the plurality of frequency band regions to obtain the threshold for dividing the decoded image data of the first image into the plurality of frequency band regions.
[0016] It should be understood that adjacent frequency band regions in multiple frequency band regions can refer to adjacent frequency band regions after being sorted by frequency from highest to lowest. For example, for a first frequency band region, a second frequency band region, and a third frequency band region, if the frequency domain values in the first frequency band region are all lower than those in the second frequency band region, and the frequency domain values in the second frequency band region are all lower than those in the third frequency band region, then the first and second frequency band regions are adjacent frequency band regions, and the second and third frequency band regions are adjacent frequency band regions. Based on the standard deviation of adjacent frequency band regions, the threshold used by the display processor to divide these two adjacent frequency band regions from the decoded image data of the first image can be determined. In this way, the display processor can divide the decoded image data of the first image into multiple frequency band regions, the same number as the enhancement coefficients.
[0017] In some implementations of the first aspect, the threshold for dividing the decoded image data of the first image into the i-th frequency band region and the j-th frequency band region of the plurality of frequency band regions is obtained by the following formula:
[0018]
[0019] Among them, T i-j The threshold used to divide the i-th frequency band region and the j-th frequency band region, i∈{1,2,…N-1}, j∈{2,3,…N}, N is the number of frequency band regions included in the plurality of frequency band regions, j is 1 greater than i, σ i Let σ be the standard deviation of the i-th frequency band region. j Let be the standard deviation of the j-th frequency band region, and ω', k, and b' be empirical parameters.
[0020] In some implementations of the first aspect, determining the frequency domain value of each group of image data in the M groups of image data to obtain the M groups of frequency domain values includes: converting the M groups of image data into frequency domain data respectively through discrete cosine transform (DCT).
[0021] It should be understood that frequency domain conversion via DCT can be achieved using the hardware capabilities of neural network processors. Furthermore, compared to Fourier transform, DCT is a discrete-time conversion method; therefore, frequency domain conversion via DCT can reduce the power consumption of terminal devices.
[0022] In some implementations of the first aspect, the neural network processor is equipped with a trained deep learning neural network model; the step of analyzing and processing the decoded image data of the first image through the neural network processor to obtain the image processing parameters of the first image includes: inputting the decoded image data of the first image into the trained deep learning neural network model and outputting the image processing parameters of the first image.
[0023] It should be understood that a well-trained deep learning neural network model can extract texture feature information from the decoded image data of the first image, thereby analyzing and processing the decoded image data of the first image and determining the image processing parameters of the first image.
[0024] In some implementations of the first aspect, before inputting the decoded image data of the first image into the trained deep learning neural network model, the method further includes: acquiring sample image data; performing image degradation processing on the sample image data to obtain degraded image data; inputting the degraded image data into the deep learning neural network model and outputting image processing parameters of the degraded image data; using the image processing parameters of the degraded image data to perform sharpening and enhancement processing on the degraded image data to obtain sharpened and enhanced image data; determining a loss function based on the sharpened and enhanced image data and the sample image data; and training the deep learning neural network model based on the loss function to obtain the trained deep learning neural network model.
[0025] It should be understood that the sample image data can be any image with high resolution. Sample image data can also be referred to as ground truth. Degrading the sample image data reduces its resolution. Therefore, compared to the sample image data, the resolution of the degraded image data is lower. The closer the sharpened and enhanced image data is to the sample image data, the higher the accuracy of the image processing parameters determined by the deep learning neural network model. Through this training method, the image processing parameters determined by the trained neural network module for the original image are highly accurate.
[0026] In some implementations of the first aspect, where the image degradation processing includes downsampling, before performing sharpening and enhancement processing on the degraded image data, the method further includes: performing upsampling processing on the degraded image data to obtain upsampled image data; the step of using the image processing parameters of the degraded image data to perform sharpening and enhancement processing on the degraded image data includes: using the image processing parameters of the degraded image data to perform sharpening and enhancement processing on the upsampled image data.
[0027] It should be understood that, in cases where image degradation processing includes downsampling, in order to ensure that the image data after sharpening and enhancement processing and the sample image data have the same size, the terminal device needs to perform upsampling processing on the image data after degradation processing before inputting it into the sharpening and enhancement module.
[0028] In some implementations of the first aspect, the display processor includes a display preprocessing module and a sharpening enhancement hardware module; the step of using the display processor to perform sharpening enhancement processing on the decoded image data of the first image using the image processing parameters of the first image to obtain first image data includes: the display preprocessing module transmitting the image processing parameters of the first image to the sharpening enhancement hardware module; the display preprocessing module performing display preprocessing on the decoded image data of the first image to obtain display pre-image data of the first image, and transmitting the display pre-image data to the sharpening enhancement hardware module, wherein the display preprocessing includes at least one of linear scaling to screen size, gamma processing, and 3D LUT color optimization; and the sharpening enhancement hardware module using the image processing parameters of the first image to perform sharpening enhancement processing on the display pre-image data to obtain the first image data.
[0029] It should be understood that the display preprocessing module can be used to perform conventional display preprocessing on the decoded image data of the first image. Gamma processing can also be called gamma correction or gamma adjustment; 3D LUT color optimization can also be called 3D LUT color correction. The sharpening enhancement hardware module can also be called a sharpening hardware module. This module can be an N-band sharpening hardware module, such as a 3-band sharpening (tri-band sharpness) hardware module. N-band indicates that before the sharpening enhancement hardware module performs sharpening enhancement processing on the decoded image data of the first image, it divides the decoded image data of the first image into N frequency band regions. Since the number of enhancement coefficients included in the image processing parameters of the first image is the same as the number of frequency band regions included in the N frequency band regions, the N-band sharpening hardware module can use the enhancement coefficients corresponding to each frequency band region in the N frequency band regions to sharpen and enhance each frequency band region.
[0030] In some implementations of the first aspect, the sharpening enhancement hardware module uses image processing parameters of the first image to perform sharpening enhancement processing on the pre-display image data to obtain the first image data, including: the sharpening enhancement hardware module performs frequency domain conversion on the decoded image data of the first image to obtain the frequency domain value of the first image; the sharpening enhancement hardware module divides the first image into the plurality of frequency band regions according to the threshold and the frequency domain value of the first image; the sharpening enhancement hardware module uses the enhancement coefficient corresponding to each frequency band region to perform sharpening enhancement processing on the frequency domain value in each frequency band region to obtain a plurality of sharpened enhanced frequency band regions; the sharpening enhancement hardware module merges the plurality of sharpened enhanced frequency band regions to obtain the first image data.
[0031] It should be understood that dividing the first image into multiple frequency band regions can be interpreted as splitting the first image into multiple frames, with each frame corresponding to a frequency band region. For example, if the sharpening enhancement hardware module is a 3-segment sharpening enhancement hardware module, then the sharpening enhancement hardware module will split the first image into 3 frames: one frame includes the content corresponding to the lowest frequency band region; one frame includes the content corresponding to the highest frequency band region; and one frame includes the content corresponding to the frequency band region of intermediate size.
[0032] In some implementations of the first aspect, the threshold includes a first threshold and a second threshold, the first threshold being less than the second threshold, the plurality of frequency band regions including a first frequency band region, a second frequency band region, and a third frequency band region, the frequency domain value of the first frequency band region being greater than or equal to the frequency domain value of the second frequency band region, and the frequency domain value of the second frequency band region being greater than or equal to the frequency domain value of the third frequency band region; the sharpening enhancement hardware module divides the first image into the plurality of frequency band regions according to the threshold and the frequency domain value of the first image, including: the display processor assigning frequency domain values of the first image that are less than the first threshold to the third frequency band region of the first image; the display processor assigning frequency domain values of the first image that are greater than or equal to the first threshold and less than the second threshold to the second frequency band region of the first image; and the display processor assigning frequency domain values of the first image that are greater than or equal to the second threshold to the first frequency band region of the first image.
[0033] It should be understood that the number of thresholds is one less than the number of frequency band regions. In the above technical solution, the number of thresholds is two, and the number of enhancement coefficients and frequency band regions is three each. The sharpening enhancement hardware module can be a three-segment sharpening enhancement hardware module. When the sharpening enhancement hardware module is a sharpening enhancement hardware module with other segment numbers, the number of thresholds will also change. The specific implementation method of the sharpening enhancement hardware module dividing the first image into multiple frequency band regions according to the thresholds and the frequency domain values of the first image is similar to the above division method.
[0034] In some implementations of the first aspect, the step of analyzing and processing the decoded image data of the first image by the neural network processor to obtain the image processing parameters of the first image includes: when the decoded image data of the first image is compressed data, performing decompression and format conversion processing on the decoded image data of the first image by the neural network processor to obtain YUV format image data; and analyzing and processing the YUV format image data by the neural network processor to obtain the image processing parameters of the first image.
[0035] It should be understood that before displaying the first image, the terminal device's display processor decompresses the compressed decoded image data of the first image, and then sharpens and enhances the decompressed decoded image data based on the image processing parameters of the first image. Therefore, when the decoded image data of the first image is compressed, the neural network processor can first decompress the decoded image data of the first image. In this way, compared to determining the processing parameters of the first image based on the compressed decoded image data, the display processor uses the image processing parameters of the first image determined based on the decompressed decoded image data of the first image to perform sharpening and enhancement processing on the decompressed decoded image data of the first image, which is more conducive to improving the clarity of the first image.
[0036] In some implementations of the first aspect, the method further includes: decoding the source image data of the second image using the decoder to obtain decoded image data of the second image; transmitting the decoded image data of the second image to the display processor; using the display processor, sharpening and enhancing the decoded image data of the second image using preset image processing parameters to obtain second image data; and transmitting the second image data to the display screen to display the second image.
[0037] It should be understood that the first image and the second image can be two frames from a video. That is, when the terminal device processes images from a video, the decoder in the terminal device can periodically or randomly transmit decoded image data of some frames from the video to the neural network processor; or, the decoder in the terminal device transmits decoded image data of each frame to the display processor and the neural network processor, but the neural network processor periodically or randomly analyzes and processes the decoded image data from the decoder. In this way, in the video played by the terminal device, some frames are displayed after being sharpened and enhanced by the display processor using image processing parameters corresponding to those frames; the remaining frames are displayed after being sharpened and enhanced using preset image processing parameters. Through the above technical solution, the clarity of the video played by the terminal device is improved without causing excessive power consumption of the terminal device.
[0038] Secondly, this application provides an image processing apparatus, including a processor coupled to a memory, which can be used to execute instructions in the memory to implement the method in any of the possible implementations of the first aspect described above. Optionally, the apparatus further includes a memory. Optionally, the apparatus further includes a communication interface, to which the processor is coupled.
[0039] In one implementation, the device is a terminal device.
[0040] In another implementation, the device is a chip configured in a terminal device. When the device is a chip configured in a terminal device, the aforementioned communication interface can be an input / output interface.
[0041] Thirdly, a processor is provided, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is configured to receive signals through the input circuit and transmit signals through the output circuit, causing the processor to execute the method in any possible implementation of the first aspect described above.
[0042] In the specific implementation process, the processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, gate circuit, flip-flop, and various logic circuits. The input signal received by the input circuit can be received and input by, for example, but not limited to, a receiver, and the signal output by the output circuit can be output to, for example, but not limited to, a transmitter and transmitted by the transmitter. Furthermore, the input circuit and the output circuit can be the same circuit, which is used as the input circuit and the output circuit at different times. This application does not limit the specific implementation of the processor and various circuits.
[0043] Fourthly, a processing apparatus is provided, including a processor and a memory. The processor is used to read instructions stored in the memory and to receive signals via a receiver and transmit signals via a transmitter to execute the method in any of the possible implementations of the first aspect described above.
[0044] Optionally, the processor may be one or more, and the memory may be one or more.
[0045] Optionally, the memory may be integrated with the processor, or the memory may be separated from the processor.
[0046] In the specific implementation process, the memory can be a non-transitory memory, such as read-only memory (ROM), which can be integrated with the processor on the same chip or set on different chips. This application does not limit the type of memory or the way the memory and processor are set.
[0047] It should be understood that the relevant data interaction process, such as sending instruction information, can be a process of outputting instruction information from the processor, and receiving capability information can be a process of the processor receiving input capability information. Specifically, the processed output data can be output to the transmitter, and the input data received by the processor can come from the receiver. Here, the transmitter and receiver can be collectively referred to as transceivers.
[0048] The processing device in the fourth aspect above can be a chip. The processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. The memory can be integrated into the processor or located outside the processor and exist independently.
[0049] Fifthly, a computer program product is provided, the computer program product comprising: a computer program (also referred to as code or instructions), which, when run, causes a computer to perform the method in any possible implementation of the first aspect described above.
[0050] In a sixth aspect, a computer-readable storage medium is provided that stores a computer program (also referred to as code or instructions) that, when executed on a computer, causes the computer to perform the methods in any of the possible implementations of the first aspect described above. Attached Figure Description
[0051] Figure 1 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application;
[0052] Figure 2 This is a software structure block diagram of a terminal device according to an embodiment of this application;
[0053] Figure 3 A schematic diagram illustrating the process of displaying an image on a terminal device;
[0054] Figure 4 A schematic flowchart of the image processing method provided in the embodiments of this application;
[0055] Figure 5 A schematic diagram illustrating the process of determining image processing parameters according to an embodiment of this application;
[0056] Figure 6 A schematic diagram illustrating the process of training a pre-trained deep learning neural network model provided in an embodiment of this application;
[0057] Figure 7 This is a schematic diagram of an image processing method provided in an embodiment of this application;
[0058] Figure 8 This is a schematic diagram illustrating another image processing method provided in an embodiment of this application;
[0059] Figure 9 A schematic diagram illustrating another image processing method provided in this application embodiment;
[0060] Figure 10 This is a schematic block diagram of an image processing apparatus provided in an embodiment of this application. Detailed Implementation
[0061] The technical solutions in this application will now be described with reference to the accompanying drawings.
[0062] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. For example, the first value and the second value are only used to distinguish different values and do not limit their order. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that terms such as "first" and "second" do not necessarily imply that they are different.
[0063] It should be noted that, in the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplarily" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0064] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or 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, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.
[0065] The terminal device provided in this application is a terminal device with a touch screen, specifically a mobile phone, tablet computer, desktop computer, laptop computer, etc. This application does not limit the specific technology or device form used in the terminal device.
[0066] To better understand the terminal device in the embodiments of this application, the following is combined with... Figure 1 The hardware structure of the terminal device in the embodiments of this application will be described in detail.
[0067] Figure 1 This is a schematic diagram of the structure of the terminal device 100 provided in an embodiment of this application. Figure 1 As shown, the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 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 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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.
[0068] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0069] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, image codec, digital signal processor (DSP), baseband processor, neural network processing unit (NPU), display processing unit (DPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0070] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0071] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0072] In some embodiments, the processor 110 may include one or more interfaces. Interfaces 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.
[0073] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the terminal device 100.
[0074] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0075] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0076] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0077] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the shooting function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to enable the display function of the terminal device 100.
[0078] The GPIO interface is configurable via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0079] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge terminal device 100, and can also be used for data transfer between terminal device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other terminal devices, such as AR devices.
[0080] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.
[0081] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the terminal device 100. While charging the battery 142, the charging management module 140 can also supply power to the terminal device via the power management module 141.
[0082] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0083] The wireless communication function of the terminal device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0084] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, 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 conjunction with a tuning switch.
[0085] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0086] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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 processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0087] The wireless communication module 160 can provide solutions for wireless communication applications on the terminal device 100, 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), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0088] In some embodiments, antenna 1 of terminal device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling terminal device 100 to communicate with networks and other devices via 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 technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0089] Terminal device 100 implements display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0090] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, terminal device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0091] Terminal device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0092] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0093] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. 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 passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the terminal device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0094] A digital signal processor (DSP) is used to process digital signals. Besides digital image signals, it can also process other digital signals. For example, when terminal device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0095] Video codecs are used to compress or decompress digital video. Terminal device 100 may support one or more video codecs. Thus, terminal device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0096] NPU stands for Neural Network (NN) Computing Processor. By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in terminal devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0097] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external storage card.
[0098] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of terminal device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of terminal device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.
[0099] Terminal device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0100] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0101] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music or make hands-free calls through the speaker 170A.
[0102] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the terminal device 100 answers a phone call or voice message, the receiver 170B can be brought close to the listener's ear to hear the voice.
[0103] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Terminal device 100 may be equipped with at least one microphone 170C. In some embodiments, terminal device 100 may be equipped with two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, terminal device 100 may be equipped with three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.
[0104] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0105] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Terminal device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, terminal device 100 detects the intensity of the touch operation based on pressure sensor 180A. Terminal device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example: when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0106] The gyroscope sensor 180B can be used to determine the motion attitude of the terminal device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the terminal device 100 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shaking of the terminal device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shaking of the terminal device 100 by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.
[0107] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0108] The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover. In some embodiments, when the terminal device 100 is a flip phone, the terminal device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be set.
[0109] The 180E accelerometer can detect the magnitude of acceleration of the terminal device 100 in various directions (typically three axes). When the terminal device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the attitude of the terminal device, and can be applied to applications such as landscape / portrait switching and pedometers.
[0110] A distance sensor 180F is used to measure distance. The terminal device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, the terminal device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.
[0111] The proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The terminal device 100 emits infrared light outward through the LED. The terminal device 100 uses the 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 terminal device 100. When insufficient reflected light is detected, the terminal device 100 can determine that there is no object near the terminal device 100. The terminal device 100 may use the proximity sensor 180G to detect when a user holds the terminal device 100 close to their ear for a call, so as to automatically turn off the screen to save power. The proximity sensor 180G can also be used in holster mode and pocket mode for automatic unlocking and screen locking.
[0112] The ambient light sensor 180L is used to sense the ambient light intensity. The terminal device 100 can adaptively adjust the brightness of the display screen 194 based on the sensed ambient light intensity. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also work with the proximity sensor 180G to detect whether the terminal device 100 is in a pocket to prevent accidental touches.
[0113] The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0114] Temperature sensor 180J is used to detect temperature. In some embodiments, terminal device 100 uses the temperature detected by temperature sensor 180J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, terminal device 100 reduces the performance of the processor located near temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is below another threshold, terminal device 100 heats battery 142 to prevent abnormal shutdown of terminal device 100 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, terminal device 100 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.
[0115] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit 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 display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of terminal device 100, in a different position than display screen 194.
[0116] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 180M can also be incorporated into headphones to form bone conduction headphones. The audio module 170 can parse the voice signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 180M to realize voice functionality. The application processor can parse heart rate information from the blood pressure signals acquired by the bone conduction sensor 180M to realize heart rate detection functionality.
[0117] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Terminal device 100 can receive button input and generate key signal inputs related to user settings and function control of terminal device 100.
[0118] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0119] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0120] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the terminal device 100. The terminal device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external storage cards. The terminal device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the terminal device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100. The software system of the terminal device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application uses the layered architecture of the Android system as an example to illustrate the software structure of the terminal device 100.
[0121] Figure 2 This is a software structure block diagram of the terminal device 100 according to an embodiment of this application.
[0122] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0123] The application layer can include a series of application packages. For example... Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0124] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 2 As shown, the application framework layer may include a window manager, a content provider, a decoding module, a display engine, an image processing module, and an image analysis algorithm module.
[0125] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0126] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0127] The decoding module is used to call the hardware decoder to decode video or image data, and then transmit the decoded image data to the display engine and image analysis algorithm module respectively.
[0128] The display engine, also known as the display module, is used to transmit decoded image data from the decoding module to the image processing module.
[0129] The image analysis algorithm module is used to call the NPU to analyze and process the decoded image data, determine the image processing parameters of the target frame image in the decoded image data, and transmit the image processing parameters to the image processing module.
[0130] The image processing module is used to call the DPU to sharpen and enhance the target frame image using image processing parameters, thereby obtaining processed image data; and to send the processed image data to the display screen of the terminal device so that the processed image data can be displayed.
[0131] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0132] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0133] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0134] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0135] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0136] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0137] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0138] A 2D graphics engine is a graphics engine for 2D drawing.
[0139] The kernel layer is the layer between hardware and software. It drives the hardware, enabling it to function. The kernel layer includes at least a display driver, a central processing unit (CPU) driver, a DPU driver, an NPU driver, and an audio driver, though this embodiment does not limit the specific drivers. For example, a DPU driver can drive the DPU to perform sharpening and enhancement processing on image data.
[0140] To facilitate understanding of this application, we will first combine... Figure 3 The process of displaying images or playing videos on a terminal device is described in detail.
[0141] Figure 3 This is a schematic diagram illustrating the process of displaying an image on a terminal device. For example... Figure 3 As shown, the terminal device acquires image data, taking network abstract layer (NAL) data as an example; the NAL data is transmitted to the decoder, which decodes the NAL data to obtain decoded image data; then the decoded image data is transmitted to the display processor, which performs conventional pre-display processing on the decoded image data, such as linearly enlarging it to the screen size, and sharpening and enhancing the decoded image data using preset image processing parameters to obtain processed image data; finally, the processed image data is displayed on the screen.
[0142] It should be understood that the image displayed by the terminal device can be a single image or a frame from a video, and this application does not specifically limit it in this regard.
[0143] However, videos played or images displayed on terminal devices may appear blurry. For example, poor network quality can result in low resolution video data, leading to unclear playback. Conversely, even with high resolution video data, issues like camera shake during recording or a damaged camera can cause "fake high-definition," where the actual displayed image is blurry. While terminal devices use a display processor to sharpen decoded image data based on preset image processing parameters before displaying, the causes of low image clarity can vary. Applying the same parameters to all images may result in some images having reduced clarity. For instance, excessively high or low sharpness in the source image data can lead to blurry decoded image data. Even if the display processor improves sharpness using preset parameters, it cannot improve the clarity of decoded source image data with excessively high sharpness. Therefore, a method to improve the clarity of images displayed on terminal devices is urgently needed.
[0144] To address the aforementioned technical problems, this application provides an image processing method and apparatus. The terminal device first decodes the source image data of the first image to obtain decoded image data; then, a neural network processor analyzes and processes the decoded image data from the decoder to determine the image processing parameters of the first image; the terminal device uses a display processor to sharpen and enhance the decoded image data using the image processing parameters to obtain the first image data; finally, the terminal device's display screen displays the first image data. The image processing parameters of the first image include enhancement coefficients for different frequency band regions and thresholds for dividing multiple frequency band regions. The display processor can then divide the decoded image data into multiple frequency band regions based on these thresholds and process each frequency band of the decoded image data using the enhancement coefficient for each frequency band region. Compared to preset image processing parameters, since the image processing parameters of the first image are determined based on the image information of the decoded image data of the first image, the display processor can use these parameters to process multiple frequency band regions of the first image. This allows for sharpening and enhancement of the decoded image data of the first image based on the edge information, sharpness information, or grayscale value information of each frequency band region in the decoded image data. For example, for frequency band regions with excessively high sharpness, the corresponding enhancement coefficient can be smaller. Therefore, this image processing method enables the terminal device to display a first image with higher clarity.
[0145] The following is combined with Figures 4 to 9This application provides a detailed description of the image processing method. The embodiments shown in this application can be executed by terminal devices, such as mobile phones, tablets, and smart bracelets. The specific forms and numbers of the devices shown are merely examples and should not be construed as limiting the implementation of the method provided in this application. Below, using a terminal device as the execution subject, the image processing method of the embodiments of this application will be described in detail.
[0146] It should be understood that the terminal device can be the terminal device itself, or a chip, chip system, or processor that supports the terminal device in implementing image processing methods. It can also be a logic module or software that can implement all or part of the terminal device's functions. The hardware structure of the terminal device can be as follows: Figure 1 As shown, the software structure can be as follows: Figure 2 As shown, this application does not impose specific limitations on this.
[0147] Figure 4 This is a flowchart illustrating an image processing method 400 provided in an embodiment of this application. Method 400 is applied to a terminal device including a decoder, a neural network processor, a display processor, and a display screen. The hardware structure of the terminal device can... Figure 1 As shown, the software structure can be as follows: Figure 2 As shown. Figure 4 As shown, method 400 includes the following steps:
[0148] S401. The source image data of the first image is decoded by the decoder to obtain the decoded image data of the first image.
[0149] It should be understood that the first image can be a single image or a frame from a video. The decoded image data of the first image can also be understood as the pixel data of the first image. The source image data of the first image can be network data obtained by the terminal device, such as NAL data, or image data stored in the terminal device. This application does not specifically limit the source and format of the source image data of the first image.
[0150] The decoder can be a hardware decoder or a software decoder. The decoded image data can be compressed image data or uncompressed image data.
[0151] S402, The decoded image data of the first image is transmitted to the display processor and the neural network processor respectively.
[0152] It should be understood that when the terminal device needs to display the first image and needs to improve the clarity of the first image, the decoded image data of the first image is transmitted to the display processor and the neural network processor respectively.
[0153] S403. The decoded image data of the first image is analyzed and processed by the neural network processor to obtain the image processing parameters of the first image, and the image processing parameters of the first image are transmitted to the display processor. The image processing parameters of the first image include the enhancement coefficient of each frequency band region in multiple frequency band regions of the first image, and the threshold for dividing the decoded image data of the first image into multiple frequency band regions.
[0154] It should be understood that the multiple frequency band regions include at least two frequency band regions. Each frequency band region corresponds to an enhancement coefficient, and the enhancement coefficients for each frequency band region can be the same or different. The enhancement coefficient can be any positive or negative value within a certain range. The number of thresholds used to divide the decoded image data of the first image into multiple frequency band regions is one less than the amount of data in each frequency band region. For example, if there are three frequency band regions, then there are two thresholds, and the display processor can use these two thresholds to divide the decoded image data of the first image into three frequency band regions.
[0155] It is understood that in the embodiments of this application, the number of frequency band regions included in the multiple frequency band regions can be a preset value greater than or equal to 2. As the number of frequency band regions included in the multiple frequency band regions increases, the accuracy of the image processing parameters of the first image determined by the terminal device is higher. That is, after the terminal device processes the first image using the image processing parameters of the first image, the clarity of the first image displayed by the terminal device is higher.
[0156] S404. The display processor uses the image processing parameters of the first image to perform sharpening and enhancement processing on the decoded image data of the first image to obtain the first image data.
[0157] It should be understood that sharpening enhancement processing is not necessarily a sharpening process for an image. Sharpening enhancement processing can be a process that increases the contrast between edge information and surrounding pixels in an image, making the edges of the image more prominent; it can also be a smoothing blurring process. In other words, sharpening enhancement processing is a general term, and through this process, the effect produced by the decoded image data is determined by the image processing parameters of the first image.
[0158] In one possible implementation, in addition to sharpening and enhancing the decoded image data of the first image using the image processing parameters of the first image, the display processor also performs conventional pre-display processing on the decoded image data of the first image, such as linearly enlarging it to the display screen size.
[0159] S405. The first image data is transmitted to the display screen to display the first image.
[0160] The image processing method of this application involves a neural network processor analyzing and calculating the decoded image data of a first image to determine the enhancement coefficient of each frequency band region in multiple frequency band regions of the first image, as well as a threshold for dividing the multiple frequency band regions. This allows the display processor to perform sharpening and enhancement processing on each frequency band in the decoded image data of the first image using the enhancement coefficient of each frequency band region. Compared to preset image processing parameters, since the image processing parameters for the first image are determined based on the image information of the decoded image data of the first image, and these parameters also include the enhancement coefficient of each frequency band region in multiple frequency band regions for processing the decoded image data, when a certain frequency band region has a lot of noise, the enhancement coefficient corresponding to that frequency band region can be smaller, so that using the smaller enhancement coefficient to perform sharpening and enhancement processing on that frequency band region can reduce the noise in that frequency band region. Conversely, when the edge information of a certain frequency band region is not prominent enough compared to the surrounding pixels, the enhancement coefficient corresponding to that frequency band region can be larger, so that using the larger enhancement coefficient to perform sharpening and enhancement processing on that frequency band region can improve the sharpness of that frequency band region, allowing the image corresponding to that frequency band region to include more detail information. Therefore, by processing the decoded image data of the first image using the image processing parameters of the first image, the terminal device can display a clearer first image, thereby improving the user experience.
[0161] As an optional embodiment, method 400 further includes: decoding the source image data of the second image using a decoder to obtain decoded image data of the second image; transmitting the decoded image data of the second image to a display processor; using the display processor, sharpening and enhancing the decoded image data of the second image using preset image processing parameters to obtain second image data; and transmitting the second image data to a display screen to display the second image.
[0162] It should be understood that when the terminal device needs to display a second image but does not need to improve its clarity, the decoded image data of the second image is transmitted to the display processor instead of the neural network processor; or, the decoded image data of the second image is transmitted to both the display processor and the neural network processor, but the neural network processor does not analyze or calculate the decoded image data of the second image, i.e., it is uncertain about the image processing parameters of the second image, causing the terminal device to... Figure 3 The path shown displays the second image, which can reduce the power consumption of the terminal device.
[0163] The first and second images can be two frames from a video. That is, when the terminal device processes images from a video using method 400, the decoder in the terminal device can periodically or randomly transmit decoded image data of a portion of the video to the neural network processor; or, the decoder in the terminal device transmits decoded image data of each frame to the display processor and the neural network processor, but the neural network processor periodically or randomly analyzes and processes the decoded image data from the decoder. In this way, in the video played by the terminal device, some frames are displayed after being sharpened and enhanced by the display processor using image processing parameters corresponding to those frames; the remaining frames are displayed through... Figure 3 The path shown is illustrated. Through the above technical solution, the clarity of the video played on the terminal device is improved without excessive power consumption. For example, when the terminal device plays video, the decoder transmits the decoded image data of one frame to the neural network processor every 15 frames. The neural network processor analyzes and processes the decoded image data of that frame to determine the image processing parameters for that frame. Then, the display processor can perform sharpening and enhancement processing on the decoded image data of that frame every 15 frames based on the image processing parameters.
[0164] As an optional embodiment, S403 is specifically implemented in the following manner: when the decoded image data of the first image is compressed data, the decoded image data of the first image is decompressed and converted in format by a neural network processor to obtain YUV format image data; the YUV format image data is analyzed and processed by a neural network processor to obtain the image processing parameters of the first image.
[0165] It should be understood that, if the decoded image data of the first image is not compressed, the neural network processor can convert the decoded image data of the first image into YUV format image data before analyzing and processing it; if the decoded image data of the first image is compressed, the neural network processor can decompress the decoded image data of the first image before analyzing and processing it, then convert it into YUV format image data, and then analyze and process it.
[0166] Before displaying the first image, the terminal device's display processor decompresses the compressed decoded image data of the first image and then sharpens and enhances the decompressed decoded image data based on the image processing parameters of the first image. Therefore, when the decoded image data of the first image is compressed, the neural network processor can first decompress the decoded image data of the first image. In this way, compared to determining the processing parameters of the first image based on the compressed decoded image data, the display processor uses the image processing parameters of the first image determined based on the decompressed decoded image data to sharpen and enhance the decoded image data of the first image, which is more conducive to improving the clarity of the first image.
[0167] In S403, the neural network processor can analyze and process the decoded image data of the first image in two ways to obtain the image processing parameters of the first image. The two methods are described in detail below.
[0168] Method 1: The neural network processor determines the image processing parameters of the first image based on the frequency domain information of the decoded image data of the first image.
[0169] As an optional embodiment, S403 is specifically implemented in the following manner: dividing the decoded image data of the first image into M groups of image data, where M is a positive integer greater than 1; determining the frequency domain value of each group of image data in the M groups of image data to obtain M groups of frequency domain values, the M groups of frequency domain values including frequency domain values of multiple frequency band regions; and obtaining the image processing parameters of the first image based on the M groups of frequency domain values.
[0170] It should be understood that M is a preset positive integer greater than 1, such as 6, 10, etc. Dividing the decoded image data of the first image into M groups of image data can be understood as dividing the decoded image data of the first image into M equal parts, resulting in M groups of image data. Frequency domain values can be understood as frequencies. The magnitude of each frequency domain value in the M groups reflects the edge information, sharpness information, or grayscale value of the corresponding image area. Each of the M groups of frequency domain values includes multiple frequency band regions. Determining the frequency domain value of each group of image data in the M groups can be understood as the terminal device performing frequency domain transformation on each of the M groups of image data to obtain the M groups of frequency domain values. Specifically, the terminal device can perform frequency domain transformation using methods such as Fourier transform and discrete cosine transform (DCT).
[0171] Compared to not segmenting the decoded image data of the first image, segmenting the decoded image data of the first image, performing frequency domain transformation, and analyzing the resulting M sets of frequency domain values allows the terminal device to determine the sharpness of the first image by comparing the M sets of frequency domain values. For example, if the differences between the frequency domain values of a certain frequency band in the M sets of frequency domain values are large, the terminal device can determine that the image corresponding to that frequency band in the first image contains both high-frequency and low-frequency regions. The higher-frequency regions correspond to richer details such as contour and edge information, while the lower-frequency regions correspond to smoother and blurrier images. The terminal device can determine that the image corresponding to that frequency band in the first image has higher sharpness. If the differences between the frequency domain values of a certain frequency band in the M sets of frequency domain values are small, the terminal device can determine that the image corresponding to that frequency band in the first image has either all high or all low frequencies. In the case of high frequencies, the image corresponding to that frequency band in the first image may have more noise; in the case of low frequencies, the image corresponding to that frequency band in the first image may be blurry. Then, the terminal device can determine the image processing parameters of the first image based on the differences between each frequency band region of the M groups of frequency domain values, thereby improving the clarity of the first image displayed by the terminal device.
[0172] In one possible implementation, determining the frequency domain value of each group of image data in M groups of image data to obtain M groups of frequency domain values includes: converting the M groups of image data into frequency domain data respectively using DCT.
[0173] It should be understood that frequency domain conversion via DCT can be achieved using the hardware capabilities of neural network processors. Furthermore, compared to Fourier transform, DCT is a discrete-time conversion method; therefore, frequency domain conversion via DCT can reduce the power consumption of terminal devices.
[0174] In one possible implementation, after converting M sets of image data into frequency domain data using DCT, each set of frequency domain values in the M sets is divided into N frequency band regions, where N is a positive integer greater than or equal to 2: taking the point with the lowest frequency in each set of frequency domain values as the center, the region with a distance less than a first preset threshold from the center is the frequency band region with the lowest frequency in the N frequency band regions; the region with a distance greater than or equal to the first preset threshold and less than a second preset threshold from the center is the frequency band region adjacent to the frequency band region with the lowest frequency in the N frequency band regions, and so on, with the region with a distance greater than or equal to a third preset threshold from the center being the frequency band region with the highest frequency in the N frequency band regions.
[0175] It should be understood that the closer a point is to the center of the circle, the lower its frequency. When N is 2, the first, second, and third preset thresholds are the same, meaning that the region with a distance less than the first preset threshold from the center is the region with the lowest frequency among the N frequency bands; the region with a distance greater than or equal to the first preset threshold from the center is the region with the highest frequency among the N frequency bands. The number of preset thresholds used to divide the N frequency bands is N-1.
[0176] In one possible implementation, the image processing parameters of the first image are obtained based on M sets of frequency domain values, including: calculating the sum of the absolute values of the frequency domain values of each frequency band region in each of the M sets of frequency domain values; calculating the standard deviation of each frequency band region using the sum of the absolute values of the frequency domain values of each frequency band region in the M sets of frequency domain values; and obtaining the enhancement coefficient of each frequency band region using the standard deviation of each frequency band region.
[0177] It should be understood that each of the M sets of frequency domain values includes multiple frequency band regions, and each frequency band region can include multiple frequency domain values. Therefore, each frequency band region in each set of frequency domain values corresponds to a sum. For example, assuming that the multiple frequency band regions are N frequency band regions, where N is a positive integer greater than or equal to 2, then each set of frequency domain values corresponds to N sums, which are the sums of the absolute values of the frequency domain values of each frequency band region in the N frequency band regions of each set of frequency domain values; each of the M sets of frequency domain values corresponds to N sums.
[0178] By using the standard deviation of each frequency band region, the terminal device can determine the frequency domain value differences of the M groups of frequency domain values in each frequency band region. For example, assuming the standard deviation of the first frequency band region is close to 0, it indicates that the sum of the absolute values of the frequency domain values of the M groups of frequency domain values in the first frequency band region is relatively close. The terminal device can determine that the information distribution in the image corresponding to the first frequency band region of the decoded image data of the first image is uniform, but may be entirely blurry or overly sharp. Assuming the standard deviation of the second frequency band region is large, it indicates that the sum of the absolute values of the frequency domain values of the M groups of frequency domain values in the second frequency band region differs significantly. The terminal device can determine that the information distribution in the image corresponding to the second frequency band region of the decoded image data of the first image is uneven, possibly with some areas having richer contour and edge information, while other areas are smoother. Therefore, based on the standard deviation of multiple frequency band regions and the relative frequency levels between them, the terminal device can determine the enhancement coefficients of multiple frequency band regions in the decoded image data of the first image.
[0179] In one possible implementation, the terminal device calculates the sum of the absolute values of the frequency domain values of the first frequency band region among multiple frequency band regions using the following formula:
[0180] X=Σ|x g |
[0181] Where X is the sum of the absolute values of the frequency domain values in the first frequency band region, x g Let |x| be the g-th frequency domain value in the first frequency band region. g | represents the absolute value of the g-th frequency domain value, where g ∈ {1, 2, ..., E}, and E is the number of frequency domain values included in the first frequency band region.
[0182] The terminal device calculates the standard deviation of the sum of the absolute values of the frequency domain values in the first frequency band region of the M groups of frequency domain values using the following formula:
[0183]
[0184] Where σ1 is the standard deviation of the sum of the absolute values of the frequency domain values in the first frequency band region of the M group of frequency domain values, and X1 to X M It is the sum of the absolute values of the frequency domain values in the first frequency band region from the first group of frequency domain values to the Mth group of frequency domain values. X1 to X M The average of the sums.
[0185] In one possible implementation, the enhancement factor of the i-th frequency band region in multiple frequency band regions is obtained by the following formula:
[0186] W=ω*σ i +b
[0187] Where W is the enhancement coefficient for the first frequency band, σ i Let be the standard deviation of the i-th frequency band region, i∈{1,2,…N}, N be the number of frequency band regions included in multiple frequency band regions, and ω and b be empirical parameters.
[0188] It should be understood that the empirical parameters in the embodiments of this application are all preset parameters within the terminal device. These empirical parameters can be continuously changed during the development phase to select values that result in higher image clarity after processing using image processing parameters obtained based on these empirical parameters. Furthermore, the empirical parameters are designed to ensure that the image processing parameters (enhancement coefficient and threshold) take values within a certain range. For example, suppose it is necessary to make W less than or equal to 1023, and to make σ... i When W is 100, W equals 1023. Therefore, ω can be preset to 10 and b can be preset to 23. This application does not impose specific restrictions on the value and the way the preset empirical parameters are taken.
[0189] In one possible implementation, the image processing parameters of the first image are obtained based on M sets of frequency domain values, including: using the standard deviation of adjacent frequency band regions in multiple frequency band regions to obtain a threshold for dividing the decoded image data of the first image into multiple frequency band regions.
[0190] It should be understood that adjacent frequency band regions in multiple frequency band regions can refer to adjacent frequency band regions after being sorted by frequency from highest to lowest. For example, for a first frequency band region, a second frequency band region, and a third frequency band region, if the frequency domain values in the first frequency band region are all lower than those in the second frequency band region, and the frequency domain values in the second frequency band region are all lower than those in the third frequency band region, then the first and second frequency band regions are adjacent frequency band regions, and the second and third frequency band regions are adjacent frequency band regions. Based on the standard deviation of adjacent frequency band regions, the threshold used by the display processor to divide these two adjacent frequency band regions from the decoded image data of the first image can be determined. In this way, the display processor can divide the decoded image data of the first image into multiple frequency band regions, the same number as the enhancement coefficients.
[0191] In one possible implementation, the thresholds for dividing the decoded image data of the first image into multiple frequency band regions, specifically the i-th and j-th frequency band regions, are obtained using the following formula:
[0192]
[0193] Among them, T i-j σ is the threshold used to divide the i-th and j-th frequency band regions, where i∈{1,2,…N-1,}j∈{2,3,…N}, N is the number of frequency band regions included in multiple frequency band regions, j is 1 greater than i, and σ i Let σ be the standard deviation of the i-th frequency band region. j Let ω', k, and b' be the standard deviation of the j-th frequency band region, and ω', k, and b' be empirical parameters.
[0194] It should be understood that the i-th frequency band region and the j-th frequency band region are adjacent frequency band regions among multiple frequency band regions.
[0195] The following is combined with Figure 5 Taking M as 6 and 3 frequency band regions as an example, the process of determining image processing parameters is explained in detail.
[0196] Figure 5 This is a schematic diagram illustrating a method for determining image processing parameters provided in an embodiment of this application. For example... Figure 5As shown, the terminal device divides the decoded image data of the first image into 6 groups of image data, and uses DCT to convert each of the 6 groups of image data into frequency domain data, obtaining 6 groups of frequency domain values. Taking the first group of frequency domain values as an example, the frequency domain data of the first group of image data (the first group of frequency domain values) is divided into 3 frequency bands: a first frequency band region 501, a second frequency band region 502, and a third frequency band region 503. The frequency domain values in the first frequency band region 501 are less than those in the second frequency band region 502, and the frequency domain values in the second frequency band region 502 are less than those in the third frequency band region 503. Therefore, the first frequency band region 501 can also be called the low-frequency region, the second frequency band region 502 can also be called the mid-frequency region, and the third frequency band region 503 can also be called the high-frequency region. The process of calculating image processing parameters using the frequency domain values of these three frequency band regions includes process 1, process 2, and process 3.
[0197] Step 1: Calculate the sum of the absolute values of the frequency domain values for the three frequency band regions.
[0198] The sum of the absolute values of the frequency domain values of the first frequency band region 501 of the first group of frequency domain values is calculated using the following formula:
[0199] L=∑|l g |
[0200] Where L is the sum of the absolute values of the frequency domain values in the first frequency band region 501, l g Let g be the g-th frequency domain value in the first frequency band region 501, where g ∈ {1, 2, ... E} and E is the number of frequency domain values included in the first frequency band region.
[0201] The sum of the absolute values of the frequency domain values of the second frequency band region 502 of the first group of frequency domain values is calculated using the following formula:
[0202] M = ∑|m g |
[0203] Where M is the sum of the absolute values of the frequency domain values in the second frequency band region 502, m g Let g be the g-th frequency domain value in the second frequency band region 502, where g ∈ {1, 2, ..., F} and F is the number of frequency domain values included in the second frequency band region.
[0204] The sum of the absolute values of the frequency domain values of the third frequency band region 503 of the first group of frequency domain values is calculated using the following formula:
[0205] H = ∑|h g |
[0206] Where H is the sum of the absolute values of the frequency domain values in the third frequency band region 503, h g Let g be the g-th frequency domain value in the third frequency band region 503, where g ∈ {1, 2, ... K} and K is the number of frequency domain values included in the third frequency band region.
[0207] Similarly, calculate the sum of the absolute values of the frequency domain values in the three frequency band regions of the remaining five sets of frequency domain values, such as... Figure 5 As shown, the sum of the absolute values of the frequency domain values in the first frequency band region 501 of the six sets of frequency domain values are L1, L2, L3, L4, L5 and L6 respectively; the sum of the absolute values of the frequency domain values in the second frequency band region 502 are M1, M2, M3, M4, M5 and M6 respectively; and the sum of the absolute values of the frequency domain values in the third frequency band region 503 are H1, H2, H3, H4, H5 and H6 respectively.
[0208] Step 2: Calculate the standard deviation of the sum of the absolute values of the frequency domain values for the three frequency band regions.
[0209] The standard deviation of the sum of the absolute values of the frequency domain values in the first frequency band region 501 of these 6 sets of frequency domain values is calculated using the following formula:
[0210]
[0211] Where σ1 is the standard deviation of the sum of the absolute values of the frequency domain values in the first frequency band region 501 of the 6 sets of frequency domain values. L1, L2, L3, L4, L5 and L6 are the average of the sum of the absolute values of the frequency domain values of the first frequency band region 501 of the six sets of frequency domain values, respectively.
[0212] The standard deviation of the sum of the absolute values of the frequency domain values in the second frequency band region 502 of these 6 sets of frequency domain values is calculated using the following formula:
[0213]
[0214] Where σ² is the standard deviation of the sum of the absolute values of the frequency domain values in the second frequency band region 502 of the 6 sets of frequency domain values. M1, M2, M3, M4, M5 and M6 are the average of the sum of the absolute values of the frequency domain values of the second frequency band region 502 of the six sets of frequency domain values, respectively.
[0215] The standard deviation of the sum of the absolute values of the frequency domain values in the third frequency band region 503 of these 6 sets of frequency domain values is calculated using the following formula:
[0216]
[0217] Where σ3 is the standard deviation of the sum of the absolute values of the frequency domain values in the third frequency band region 503 of the 6 sets of frequency domain values. H1, H2, H3, H4, H5, and H6 are the average of the sum of the absolute values of the frequency domain values of the third frequency band region 503 of the six sets of image data, respectively.
[0218] Step 3: Calculate image processing parameters.
[0219] The enhancement factor of the first frequency band region 501 is calculated using the following formula:
[0220] W1=ω0*σ1+b0
[0221] Where W1 is the enhancement coefficient of the first frequency band region 501, σ1 is the standard deviation of the sum of the absolute values of the frequency domain values of the first frequency band region 501 of the 6 sets of frequency domain values, and ω0 and b0 are empirical parameters.
[0222] The enhancement factor of the second frequency band region 502 is calculated using the following formula:
[0223] W2=ω1*σ2+b1
[0224] Where W2 is the enhancement coefficient of the second frequency band region 502, σ2 is the standard deviation of the sum of the absolute values of the frequency domain values of the second frequency band region 502 of the 6 sets of frequency domain values, and ω1 and b1 are empirical parameters.
[0225] The enhancement factor for the second frequency band region is calculated using the following formula:
[0226] W3=ω2*σ3+b2
[0227] Where W3 is the enhancement coefficient of the third frequency band region 503, σ3 is the standard deviation of the sum of the absolute values of the frequency domain values of the third frequency band region 503 of the 6 sets of frequency domain values, and ω2 and b2 are empirical parameters.
[0228] The threshold for dividing the first frequency band region 501 and the second frequency band region 502 is calculated using the following formula:
[0229]
[0230] Among them, T 1-2 σ1 is the threshold for dividing the first frequency band region 501 and the second frequency band region 502. σ1 is the standard deviation of the sum of the absolute values of the frequency domain values of the first frequency band region 501 of the 6 sets of frequency domain values. σ2 is the standard deviation of the sum of the absolute values of the frequency domain values of the second frequency band region 502 of the 6 sets of frequency domain values. k0, ω1' and b1' are empirical parameters.
[0231] The division thresholds for the second frequency band region 502 and the third frequency band region 503 are calculated using the following formula:
[0232]
[0233] Among them, T 2-3 σ1 is the threshold for dividing the second frequency band region 502 and the third frequency band region 503. σ2 is the standard deviation of the sum of the absolute values of the frequency domain values of the second frequency band region 502 of the 6 sets of frequency domain values. σ3 is the standard deviation of the sum of the absolute values of the frequency domain values of the third frequency band region 503 of the 6 sets of frequency domain values. k1, ω2' and b2' are empirical parameters.
[0234] Method 2: The neural network processor uses a trained deep learning neural network model to determine the image processing parameters of the first image.
[0235] As an optional embodiment, the neural network processor is equipped with a trained deep learning neural network model; S403 is specifically implemented in the following manner: the decoded image data of the first image is input into the trained deep learning neural network model, and the image processing parameters of the first image are output.
[0236] The following is combined with Figure 6 The training process of a trained deep learning neural network model is explained in detail.
[0237] As an optional embodiment, before inputting the decoded image data of the first image into the trained deep learning neural network model, method 400 further includes: Figure 6 As shown, sample image data is acquired; image degradation processing is performed on the sample image data to obtain degraded image data; the degraded image data is input into a deep learning neural network model, and the image processing parameters of the degraded image data are output; using the image processing parameters of the degraded image data, sharpening and enhancement processing is performed on the degraded image data to obtain sharpened and enhanced image data; based on the sharpened and enhanced image data and the sample image data, a loss function is determined; the deep learning neural network model is trained based on the loss function to obtain a trained deep learning neural network model.
[0238] It should be understood that the sample image data can be any image with high resolution. Sample image data can also be referred to as ground truth. Degrading the sample image data reduces its resolution. Therefore, compared to the sample image data, the resolution of the degraded image data is reduced. Figure 6 The target image data in this context can be understood as the image data after degradation processing. The closer the sharpened and enhanced image data is to the sample image data, the higher the accuracy of the image processing parameters determined by the deep learning neural network model. Through this training method, the image processing parameters of the original image determined by the trained neural network module are highly accurate.
[0239] It should be understood that the trained deep learning neural network model can be trained by a terminal device. That is, the above-mentioned steps for training the deep learning neural network model can be performed by a terminal device or by other devices. This application does not specifically limit the subject that performs the steps of the above-mentioned deep learning neural network model training process.
[0240] In one possible implementation, image degradation processing includes at least one of downsampling, noise addition, or image compression. The image compression can be a JPEG image compression method.
[0241] In one possible implementation, where the image degradation processing includes downsampling, before sharpening and enhancing the degraded image data, method 400 further includes: upsampling the degraded image data to obtain upsampled image data; and sharpening and enhancing the degraded image data using image processing parameters of the degraded image data, including: sharpening and enhancing the upsampled image data using image processing parameters of the degraded image data.
[0242] It should be understood that when image degradation processing includes downsampling, in order to ensure that the image data after sharpening and enhancement is the same size as the sample image data, the terminal device needs to perform upsampling processing on the degraded image data before inputting it into the sharpening and enhancement module. For example... Figure 6 As shown, when image degradation processing includes downsampling, the target image data can be understood as image data after upsampling. The target image data is the image data obtained by upsampling the degraded image data.
[0243] In one possible implementation, upsampling the degraded image data includes: upsampling the degraded image data using a bilinear interpolation method.
[0244] As an optional embodiment, the trained deep learning neural network model is trained through the following steps: acquiring continuous multi-frame sample image data from a video, including target frame image data; performing image degradation processing on the multi-frame sample image data to obtain degraded multi-frame image data; inputting the degraded multi-frame image data into the deep learning neural network model, and outputting image processing parameters for the degraded target frame image data; using the image processing parameters for the degraded target frame image data, performing sharpening and enhancement processing on the degraded target frame image data to obtain sharpened and enhanced target frame image data; determining a loss function based on the sharpened and enhanced target frame image data and the target frame image data; and training the deep learning neural network model based on the loss function to obtain the trained deep learning neural network model.
[0245] It should be understood that a well-trained deep learning neural network can also be trained using continuous multi-frame sample image data from a video. That is, the deep learning neural network determines the image processing parameters of the target frame image from the multi-frame sample image data based on the degraded multi-frame image data. The target frame image data can be the first frame, the last frame, or an intermediate frame image from the multi-frame sample image data.
[0246] Accordingly, when the trained deep learning neural network model is trained based on a consecutive a-frame sample image data in a video, if the a-frame sample image data includes the target frame image data, the first d-frame image data of the target frame image data, and the last c-frame image data of the target frame image data, where a is a positive integer greater than or equal to 2, and d and c are integers greater than or equal to 0, S403 is specifically implemented in the following way: the decoded image data of the first image, the decoded image data of the first d-frame images of the first image, and the decoded image data of the last c-frame images of the first image are input into the trained deep learning neural network model, and the image processing parameters of the first image are output.
[0247] It should be understood that when a well-trained deep learning neural network model is trained based on multiple frames of sample images, the well-trained deep learning neural network model can determine the image processing parameters of the first image in the multiple frames based on the decoded image data of the continuous multiple frames. Temporal information can be introduced to further improve the clarity of the first image.
[0248] As an optional embodiment, the display processor includes a display preprocessing module and a sharpening enhancement hardware module; S404 is specifically implemented in the following manner: the display preprocessing module transmits the image processing parameters of the first image to the sharpening enhancement hardware module; the display preprocessing module performs display preprocessing on the decoded image data of the first image to obtain the display pre-image data of the first image, and transmits the display pre-image data to the sharpening enhancement hardware module, the display preprocessing including at least one of linear scaling to screen size, gamma processing, and three-dimensional look-up table (3D LUT) color optimization; the sharpening enhancement hardware module uses the image processing parameters of the first image to perform sharpening enhancement processing on the display pre-image data to obtain the first image data.
[0249] It should be understood that the display preprocessing module can be used to perform conventional display preprocessing on the decoded image data of the first image. Gamma processing can also be called gamma correction or gamma adjustment; 3D LUT color optimization can also be called 3D LUT color correction. The sharpening enhancement hardware module can also be called a sharpening hardware module. This module can be an N-band sharpening hardware module, such as a 3-band sharpening (tri-band sharpness) hardware module. N-band indicates that before the sharpening enhancement hardware module performs sharpening enhancement processing on the decoded image data of the first image, it divides the decoded image data of the first image into N frequency band regions. Since the number of enhancement coefficients included in the image processing parameters of the first image is the same as the number of frequency band regions included in the N frequency band regions, the N-band sharpening hardware module can use the enhancement coefficients corresponding to each frequency band region in the N frequency band regions to sharpen and enhance each frequency band region.
[0250] In one possible implementation, the number of enhancement coefficients included in the image processing parameters of the first image determined by the neural network processor can be determined based on the performance of the sharpening enhancement hardware module. For example, if the sharpening enhancement hardware module is a 3-segment sharpening hardware module, then when the neural network processor determines the image processing parameters of the first image based on the frequency domain information of the decoded image data of the first image, it can divide each group of frequency domain values in the M groups into 3 frequency band regions, thus enabling the neural network processor to determine 3 enhancement coefficients; if the sharpening enhancement hardware module is a 5-segment sharpening hardware module, then when the neural network processor determines the image processing parameters of the first image based on the frequency domain information of the decoded image data of the first image, it can divide each group of frequency domain values in the M groups into 5 frequency band regions, thus enabling the neural network processor to determine 5 enhancement coefficients.
[0251] In one possible implementation, the sharpening enhancement hardware module uses image processing parameters of the first image to perform sharpening enhancement processing on the image data before display to obtain the first image data. This includes: the sharpening enhancement hardware module performing frequency domain conversion on the decoded image data of the first image to obtain the frequency domain value of the first image; the sharpening enhancement hardware module dividing the first image into multiple frequency band regions based on a threshold and the frequency domain value of the first image; the sharpening enhancement hardware module using enhancement coefficients corresponding to each frequency band region to perform sharpening enhancement processing on the frequency domain value in each frequency band region to obtain multiple sharpened and enhanced frequency band regions; and the sharpening enhancement hardware module merging the multiple sharpened and enhanced frequency band regions to obtain the first image data.
[0252] It should be understood that dividing the first image into multiple frequency band regions can be interpreted as splitting the first image into multiple frames, with each frame corresponding to a frequency band region. For example, if the sharpening enhancement hardware module is a 3-segment sharpening enhancement hardware module, then the sharpening enhancement hardware module will split the first image into 3 frames: one frame includes the content corresponding to the lowest frequency band region; one frame includes the content corresponding to the highest frequency band region; and one frame includes the content corresponding to the frequency band region of intermediate size.
[0253] In one possible implementation, the threshold includes a first threshold and a second threshold, the first threshold being less than the second threshold. Multiple frequency band regions include a first frequency band region, a second frequency band region, and a third frequency band region. The frequency domain value of the first frequency band region is greater than or equal to the frequency domain value of the second frequency band region, and the frequency domain value of the second frequency band region is greater than or equal to the frequency domain value of the third frequency band region. The sharpening enhancement hardware module divides the first image into multiple frequency band regions based on the threshold and the frequency domain values of the first image, including: the display processor assigning frequency domain values of the first image that are less than the first threshold to the third frequency band region of the first image; the display processor assigning frequency domain values of the first image that are greater than or equal to the first threshold and less than the second threshold to the second frequency band region of the first image; and the display processor assigning frequency domain values of the first image that are greater than or equal to the second threshold to the first frequency band region of the first image.
[0254] It should be understood that the number of thresholds is one less than the number of frequency band regions. In the above technical solution, the number of thresholds is two, and the number of enhancement coefficients and frequency band regions is three each. The sharpening enhancement hardware module can be a three-segment sharpening enhancement hardware module. When the sharpening enhancement hardware module is a sharpening enhancement hardware module with other segment numbers, the number of thresholds will also change. The specific implementation method of the sharpening enhancement hardware module dividing the first image into multiple frequency band regions according to the thresholds and the frequency domain values of the first image is similar to the division method when the number of thresholds is two, and can be referred to the description above.
[0255] In a specific example, when there are four thresholds, including a first threshold, a second threshold, a third threshold, and a fourth threshold, the first threshold is less than the second threshold, the second threshold is less than the third threshold, and the third threshold is less than the fourth threshold. Multiple frequency band regions include a first frequency band region, a second frequency band region, a third frequency band region, a fourth frequency band region, and a fifth frequency band region. The frequency domain value of the first frequency band region is greater than or equal to the frequency domain value of the second frequency band region, the frequency domain value of the second frequency band region is greater than or equal to the frequency domain value of the third frequency band region, the frequency domain value of the third frequency band region is greater than or equal to the frequency domain value of the fourth frequency band region, and the frequency domain value of the fourth frequency band region is greater than or equal to the frequency domain value of the fifth frequency band region. The sharpening enhancement hardware module divides the first image into four parts based on the thresholds and the frequency domain values of the first image. Multiple frequency band regions, including: the display processor assigns frequency domain values of the first image that are less than a first threshold to a fifth frequency band region of the first image; the display processor assigns frequency domain values of the first image that are greater than or equal to the first threshold and less than a second threshold to a fourth frequency band region of the first image; the display processor assigns frequency domain values of the first image that are greater than or equal to the second threshold and less than a third threshold to a third frequency band region of the first image; the display processor assigns frequency domain values of the first image that are greater than or equal to the third threshold and less than a fourth threshold to a second frequency band region of the first image; and the display processor assigns frequency domain values of the first image that are greater than or equal to the fourth threshold to a first frequency band region of the first image.
[0256] It is understandable that the image processing process of a terminal device involves not only hardware components such as hardware decoders, neural network processors, display processors, and displays, but also the interaction between software modules within the terminal device. The following section will combine... Figures 7 to 9 Using source image data as NAL data, the terminal device software structure includes a decoding module, an image analysis algorithm module, an image processing module, and a display engine; the hardware structure includes a hardware decoder, a neural network processor, a display processor, and a display screen. Taking this example, the process of image processing is explained in detail.
[0257] Figure 7 and Figure 8 The two specific implementation methods involving the neural network processor to determine image processing parameters are two parallel schemes; Figure 9 This relates to a specific implementation method for a display processor to sharpen and enhance decoded image data using image processing parameters. Figure 7 and Figure 8 Both methods used by neural network processors to determine image processing parameters can be combined with... Figure 9 The display processor combines image processing parameters with methods to sharpen and enhance decoded image data.
[0258] In one possible manner, the terminal device performs... Figure 7 The image processing method shown is as follows. Figure 7 As shown, the terminal device's processing of NAL data is as follows: the decoding module transmits the NAL data to the hardware decoder, the hardware decoder decodes the NAL data to obtain the decoded image data, and transmits the decoded image data to the decoding module; the decoding module transmits the decoded image data to the image analysis algorithm module and the display engine; the image analysis algorithm module calls the neural network processor to analyze and process the decoded image data to determine the image processing parameters of the image corresponding to the NAL data. Specifically, when the decoded image data of the NAL data is compressed image data, the neural network... The processor first decompresses the decoded image data of the NAL data to obtain decompressed image data. Then, it performs frequency domain conversion on the decompressed image data to obtain frequency domain data. The neural network processor then determines the image processing parameters based on the frequency domain data. Next, the image analysis algorithm module transmits the image processing parameters to the image processing module. The display engine transmits the compressed image data to the image processing module. The image processing module calls the display processor to use the image processing parameters to sharpen and enhance the decoded image data of the NAL data to obtain processed image data. The processed image data is then transmitted to the image processing module, which sends it to the display screen. The display screen then displays the processed image data.
[0259] In another possible approach, the terminal device performs... Figure 8 The image processing method shown. Figure 8As shown, the terminal device processes NAL data as follows: the decoding module transmits the NAL data to the hardware decoder, which decodes the NAL data to obtain decoded image data and transmits it back to the decoding module; the decoding module transmits the decoded image data to both the image analysis algorithm module and the display engine; the image analysis algorithm module calls the neural network processor to analyze and process the decoded image data to determine the image processing parameters corresponding to the NAL data. Specifically, when the decoded image data is compressed, the neural network processor first decompresses the decoded image data to obtain decompressed image data, then inputs the decompressed image data into a trained deep learning neural network model, which outputs image processing parameters; the image analysis algorithm module then transmits the image processing parameters to the image processing module; the display engine transmits the compressed image data to the image processing module; the image processing module calls the display processor to use the image processing parameters to sharpen and enhance the decoded image data, obtaining processed image data, which is then transmitted to the image processing module, which sends it to the display; the display screen then displays the processed image data.
[0260] In one possible manner, the terminal device performs... Figure 9 This is a schematic diagram illustrating the image processing method shown. Figure 9As shown, the display processor of the terminal device includes a pre-processing module and a three-segment sharpening hardware module. The terminal device processes NAL data as follows: the decoding module transmits the NAL data to the hardware decoder, which decodes the NAL data to obtain the decoded image data and transmits it to the decoding module; the decoding module transmits the decoded image data to both the image analysis algorithm module and the display engine; the image analysis algorithm module calls the neural network processor to analyze and process the decoded image data to determine the image processing parameters corresponding to the NAL data, which include three enhancement coefficients and two thresholds; then, the image analysis algorithm module transmits the image processing parameters to the image processing module; the display engine compresses the image data... The data is transmitted to the image processing module; the image processing module calls the display processor and uses image processing parameters to sharpen and enhance the decoded image data of the NAL data, obtaining the processed image data; specifically, the display preprocessing module performs conventional preprocessing on the decoded image data of the NAL data, such as decompression and linear scaling to the display screen size, to obtain the pre-display image data. The display preprocessing module transmits the pre-display image data and image processing parameters to the three-segment sharpening hardware module. The three-segment sharpening module uses the image processing parameters to sharpen and enhance the pre-display image data, obtaining the processed image data; the image processing module transmits the processed image data to the image processing module, which then sends it to the display screen; the display screen displays the processed image data.
[0261] It should be understood that the order of the methods listed above does not imply the order of execution. The execution order of each method should be determined by its function and internal logic.
[0262] The above text combined Figures 3 to 9 The image processing method of the embodiments of this application is described in detail below, in conjunction with... Figure 10 The image processing apparatus of the embodiments of this application is described in detail below.
[0263] Figure 10This is a schematic block diagram of an image processing apparatus 1000 provided in an embodiment of this application. The apparatus 1000 includes a processor 1001, a communication interface 1002, and a memory 1003. The processor 1001, communication interface 1002, and memory 1003 communicate with each other via internal connection paths. The memory 1003 stores instructions, and the processor 1001 executes the instructions stored in the memory 1003. The communication interface 1002 can be used to send signals to other devices (e.g., the processor 1001 or a touchscreen of a terminal device) and to receive signals from other devices (e.g., the memory 1003). Exemplarily, the communication interface 1002 reads instructions stored in the memory 1003 and sends the instructions to the processor 1001.
[0264] It should be understood that the device 1000 may specifically be the terminal device in the above embodiments, and may be used to execute the various steps and / or processes corresponding to the terminal device in the above method embodiments. Optionally, the memory 1003 may include read-only memory and random access memory, and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information. The processor 1001 may be used to execute instructions stored in the memory, and when the processor 1001 executes instructions stored in the memory, the processor 1001 is used to execute the various steps and / or processes in the above method embodiments.
[0265] It should be understood that, in the embodiments of this application, the processor may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0266] In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The steps of the method disclosed in the embodiments of this application can be directly manifested as execution by a hardware processor, or as a combination of hardware and software modules within the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor executes the instructions in the memory, combining them with its hardware to complete the steps of the above method. To avoid repetition, detailed descriptions are omitted here.
[0267] This application also provides a computer-readable storage medium for storing a computer program for implementing the methods shown in the above-described method embodiments.
[0268] This application also provides a computer program product, which includes a computer program (also referred to as code or instructions) that, when run on a computer, allows the computer to perform the methods shown in the above-described method embodiments.
[0269] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0270] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0271] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0272] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0273] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0274] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0275] The above description is merely a specific embodiment of this application, but the protection scope of the embodiments of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the embodiments of this application should be included within the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of this application should be determined by the protection scope of the claims.
Claims
1. An image processing method, characterized in that: Applied to a terminal device including a decoder, a neural network processor, a display processor and a display screen, the method includes: Decoding the source image data of the first image by the decoder to obtain decoded image data of the first image; transmitting the decoded image data of the first image to the display processor and the neural network processor respectively; Analyzing and processing the decoded image data of the first image by the neural network processor to obtain image processing parameters of the first image, and transmitting the image processing parameters of the first image to the display processor, wherein the image processing parameters of the first image include an enhancement coefficient for each frequency band region of a plurality of frequency band regions of the first image, and a threshold value for dividing the decoded image data of the first image into the plurality of frequency band regions; By means of the display processor, the decoded image data of the first image is subjected to sharpening and enhancement processing by using the image processing parameters of the first image to obtain first image data; The first image data is transmitted to the display screen to display the first image.
2. The method according to claim 1, characterized in that The analyzing and processing the decoded image data of the first image by the neural network processor to obtain the image processing parameters of the first image includes: Dividing the decoded image data of the first image into M groups of image data, where M is a positive integer greater than 1; Determine the frequency domain value of each group of image data in the M groups of image data to obtain M groups of frequency domain values, wherein the M groups of frequency domain values include frequency domain values of the multiple frequency band regions; Image processing parameters of the first image are obtained according to the M groups of frequency domain values.
3. The method according to claim 2, characterized in that The obtaining, according to the M groups of frequency domain values, image processing parameters of the first image comprises: Respectively calculating the sum of the absolute values of the frequency domain values of each frequency band region of each group of frequency domain values in the M groups of frequency domain values; Calculating the standard deviation of each frequency band region by using the sum of the absolute values of the frequency domain values of each frequency band region in the M groups of frequency domain values; The enhancement coefficient of each frequency band region is obtained by using the standard deviation of each frequency band region.
4. The method according to claim 3, characterized in that The enhancement coefficient of the i-th frequency band region in the multiple frequency band regions is obtained by the following formula: W=ω*σ i +b Wherein, W is the enhancement coefficient of the first frequency band, σ i is the standard deviation of the i-th frequency band area, i∈{1,2,N}, N is the number of frequency band areas included in the multiple frequency band areas, and ω and b are empirical parameters.
5. The method according to claim 3 or 4, characterized in that: The obtaining, according to the M groups of frequency domain values, image processing parameters of the first image comprises: The threshold used for dividing the decoded image data of the first image into the multiple frequency band regions is obtained by using the standard deviation of adjacent frequency band regions among the multiple frequency band regions.
6. The method according to claim 5, characterized in that The threshold used to divide the decoded image data of the first image into the i-th frequency band region and the j-th frequency band region among the multiple frequency band regions is obtained by the following formula: Among them, T i-j is a threshold for dividing the i-th frequency band region and the j-th frequency band region, i∈{1,2,N-1}, j∈{2,3,N}, N is the number of frequency band regions included in the multiple frequency band regions, j is greater than i by 1, σ i is the standard deviation of the i-th frequency band, σ j is the standard deviation of the j-th frequency band, and ω', k, and b' are empirical parameters.
7. The method according to any one of claims 2 to 6, characterized in that The step of determining the frequency domain value of each group of image data in the M groups of image data to obtain the M groups of frequency domain values includes: The M groups of image data are respectively converted into frequency domain data through discrete cosine transform DCT.
8. The method according to claim 1, characterized in that The neural network processor is provided with a trained deep learning neural network model; The analyzing and processing the decoded image data of the first image by the neural network processor to obtain the image processing parameters of the first image includes: The decoded image data of the first image is input into the trained deep learning neural network model, and the image processing parameters of the first image are output.
9. The method according to claim 8, characterized in that Before inputting the decoded image data of the first image into the trained deep learning neural network model, the method further includes: Get sample image data; Performing image degradation processing on the sample image data to obtain image data after degradation processing; Inputting the image data after the degradation processing into a deep learning neural network model, and outputting image processing parameters of the image data after the degradation processing; Using the image processing parameters of the degraded image data, performing sharpening and enhancement processing on the degraded image data to obtain sharpening and enhancement processed image data; Determining a loss function based on the image data after the sharpening enhancement processing and the sample image data; The deep learning neural network model is trained based on the loss function to obtain the trained deep learning neural network model.
10. The method according to claim 9, characterized in that In the case where the image degradation processing includes downsampling processing, before performing sharpening and enhancement processing on the image data after the degradation processing, the method further includes: Performing up-sampling processing on the image data after the degradation processing to obtain up-sampled image data; The step of using the image processing parameters of the degraded image data to perform sharpening and enhancement processing on the degraded image data comprises: The image data after the upsampling process is sharpened and enhanced by using the image processing parameters of the image data after the degradation process.
11. The method according to any one of claims 1 to 10, characterized in that The display processor includes a display pre-processing module and a sharpening enhancement hardware module; The step of performing sharpening and enhancement processing on the decoded image data of the first image by the display processor using the image processing parameters of the first image to obtain the first image data comprises: The pre-display processing module transmits the image processing parameters of the first image to the sharpening enhancement hardware module; The pre-display processing module performs pre-display processing on the decoded image data of the first image to obtain pre-display image data of the first image, and transmits the pre-display image data to the sharpening enhancement hardware module, wherein the pre-display processing includes at least one of linear enlargement to screen size, gamma processing, and three-dimensional display lookup table 3D LUT color optimization; The sharpening enhancement hardware module uses the image processing parameters of the first image to perform sharpening enhancement processing on the pre-display image data to obtain the first image data.
12. The method according to any one of claims 1 to 11, characterized in that The sharpening enhancement hardware module performs sharpening enhancement processing on the pre-display image data using the image processing parameters of the first image to obtain the first image data, including: The sharpening enhancement hardware module performs frequency domain conversion on the decoded image data of the first image to obtain a frequency domain value of the first image; The sharpening enhancement hardware module divides the first image into the multiple frequency band regions according to the threshold and the frequency domain value of the first image; The sharpening enhancement hardware module performs sharpening enhancement processing on the frequency domain value in each frequency band region by using the enhancement coefficient corresponding to each frequency band region of the multiple frequency band regions, so as to obtain multiple frequency band regions after sharpening enhancement processing; The sharpening enhancement hardware module merges the multiple frequency band regions after the sharpening enhancement processing to obtain the first image data.
13. The method according to claim 12, characterized in that The threshold includes a first threshold and a second threshold, the first threshold is less than the second threshold, the multiple frequency band regions include a first frequency band region, a second frequency band region, and a third frequency band region, the frequency domain value of the first frequency band region is greater than or equal to the frequency domain of the second frequency band region, and the frequency domain value of the second frequency band region is greater than or equal to the frequency domain of the third frequency band region; The sharpening enhancement hardware module divides the first image into the plurality of frequency band regions according to the threshold and the frequency domain value of the first image, including: The display processor divides the frequency domain values of the first image that are smaller than the first threshold into a third frequency band area of the first image; The display processor divides the frequency domain values of the first image that are greater than or equal to the first threshold and less than the second threshold into a second frequency band area of the first image; The display processor divides frequency domain values of the first image that are greater than or equal to the second threshold into a first frequency band area of the first image.
14. The method according to any one of claims 1 to 13, characterized in that The analyzing and processing the decoded image data of the first image by the neural network processor to obtain the image processing parameters of the first image includes: In a case where the decoded image data of the first image is compressed data, performing decompression processing and format conversion processing on the decoded image data of the first image by the neural network processor to obtain YUV format image data; The YUV format image data is analyzed and processed by the neural network processor to obtain image processing parameters of the first image.
15. The method according to any one of claims 1 to 14, characterized in that The method further comprises: Decoding the source image data of the second image by the decoder to obtain decoded image data of the second image; transmitting decoded image data of the second image to the display processor; By means of the display processor, the decoded image data of the second image is subjected to sharpening and enhancement processing using preset image processing parameters to obtain second image data; The second image data is transmitted to the display screen to display the second image.
16. An image processing device, characterized in that: include: A processor, wherein the processor is coupled to a memory, wherein the memory is used to store a computer program, and when the processor calls the computer program, the device is caused to execute the method according to any one of claims 1 to 15.
17. A computer-readable storage medium, characterized in that: Used to store a computer program, the computer program comprising instructions for implementing the method according to any one of claims 1 to 15.
18. A computer program product, characterized in that The computer program product includes a computer program code, and when the computer program code is executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Image self-adapting enhancement method based on neural net
CN101452575A
Image processing method, device and equipment and storage medium
CN111402165A
Image processing method, image processing system, electronic equipment and storage medium
CN114764753A
Image processing method and image processing device
CN115735225A
Image enhancement method, device and equipment
CN115841437A
