Image processing method and device, electronic device and storage medium

By obtaining the color bit depth information of the display screen, determining the target data accuracy and performing filter processing, it solves the problem of high computing power and power consumption in image processing of mobile devices, and achieves the best display effect and performance on different displays. Resource conservation.

CN115297311BActive Publication Date: 2024-09-20GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210871392.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-22
Publication Date
2024-09-20
Estimated Expiration
2042-07-22

AI Technical Summary

Technical Problem

When mobile devices process images with filters, high data precision leads to high computing power and power consumption, and the image effect after processing with low data precision is not good, making it difficult to meet the color bit depth requirements of the display.

Method used

By obtaining the color bit depth information of the display screen, the target data accuracy is determined, and the image is filtered based on this accuracy to ensure that the processed image achieves the best effect on the display screen while reducing computing power consumption and power consumption.

Benefits of technology

While ensuring the image display effect, it minimizes computing power consumption and reduces power consumption. It is suitable for different types of displays and improves the flexibility of filter operations and image processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115297311B
    Figure CN115297311B
Patent Text Reader

Abstract

The present application provides an image processing method, an image processing device, an electronic device, and a non-volatile computer-readable storage medium. The image processing method includes obtaining the color depth information of a display screen; determining the target data accuracy according to the color depth information; and filtering the target image according to the target data accuracy. Considering that the number of bits of the color depth information of the display screen of the image after display filter processing is low, even if a higher data accuracy is used to filter the image, the effect of the image after display filter processing is still poor. Therefore, before performing the filter processing, the color depth of the display screen is first obtained to determine the target data accuracy that matches the color depth. Finally, the LUT table processes the target image according to the target data depth, thereby ensuring that the target image after filter processing can achieve the best display effect of the display screen while maximizing the reduction of computing power consumption and power consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, an image processing device, an electronic device, and a non-volatile computer-readable storage medium. Background Art

[0002] Camera applications on mobile devices generally support filters of various styles. These filters are generally stored in the device in the form of color lookup table (LUT) data files. When the filter effect needs to be displayed, the LUT table files related to these filters are loaded to filter the image. However, in order to ensure the quality of the image after filtering, higher data accuracy is generally used for processing, resulting in the need for higher computing power and higher power consumption. Summary of the invention

[0003] Embodiments of the present application provide an image processing method, an image processing device, an electronic device, and a non-volatile computer-readable storage medium.

[0004] The embodiment of the present application provides an image processing method, which includes acquiring color depth information of a display screen; determining target data accuracy according to the color depth information; and performing filter processing on a target image according to the target data accuracy.

[0005] The embodiment of the present application provides an image processing device. The image processing device includes a first acquisition module, a first determination module and a processing module. The first acquisition module is used to acquire the color depth information of the display screen; the first determination module is used to determine the target data accuracy according to the color depth information; and the processing module is used to perform filter processing on the target image according to the target data accuracy.

[0006] The embodiment of the present application provides an electronic device. The electronic device includes a display screen and a processor. The processor is used to obtain color depth information of the display screen; determine the target data accuracy according to the color depth information; and perform filter processing on the target image according to the target data accuracy.

[0007] The present application provides a non-volatile computer-readable storage medium containing a computer program, and when the computer program is executed by one or more processors, an image processing method is implemented. The image processing method includes obtaining color bit depth information of the display screen; determining target data accuracy according to the color bit depth information; and performing filter processing on the target image according to the target data accuracy.

[0008] In the image processing method, image processing device, electronic device and non-volatile computer-readable storage medium of the present application, considering that the number of bits of the color bit depth information of the display screen of the image processed by the filter is low, even if a higher data precision is used to filter the image, the effect of displaying the image processed by the filter is still poor, and the difference is not much when the image is displayed after the filter is processed using a lower data precision. For example, when a display screen with a color bit depth of 8 bits displays an image processed by a LUT table with 8-bit or 16-bit half-floating point (float) data precision, the display effect is basically the same. Therefore, before the filter processing is performed, the color bit depth of the display screen is first obtained to determine the target data precision matching the color bit depth (such as the number of bits of the target data precision is equal to the number of bits of the color bit depth). Finally, the LUT table processes the target image according to the target data depth, thereby ensuring that the target image after the filter processing can achieve the best display effect of the display screen while maximizing the reduction of computing power consumption and power consumption.

[0009] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0011] Figure 1 is a flowchart of an image processing method of certain embodiments of the present application;

[0012] Figure 2 is a schematic diagram of the structure of an electronic device according to some embodiments of the present application;

[0013] Figure 3 is a flowchart of an image processing method of certain embodiments of the present application;

[0014] Figure 4 is a flowchart of an image processing method of certain embodiments of the present application;

[0015] Figure 5 is a schematic diagram of a module of an image processing device in some embodiments of the present application; and

[0016] Figure 6 The diagram is a schematic diagram of the interaction between a non-volatile computer-readable storage medium and a processor in certain embodiments of the present application. DETAILED DESCRIPTION

[0017] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the embodiments of the present application.

[0018] To facilitate understanding of this application, the terms appearing in this application are explained below:

[0019] Color depth is also called color bit depth, which is a unit that uses bits to represent the number of colors in a digital image. Bit is a binary unit (or bit) in computer calculations, which is the most basic data or information that can be processed in a computer.

[0020] The display look-up table (LUT) is essentially a random access memory (RAM). After writing data into the RAM in advance, every time a signal is input, it is equivalent to inputting an address to look up the table, find out the content corresponding to the address, and then output it.

[0021] In the common process, the dimension, size and data precision of the LUT table data jointly determine the color precision of the filter processing and the overall image quality after interpolation. The size of the LUT table (that is, the number of bits representing the color, displayed in a normalized manner, such as 8 bits to represent the color, 16 bits to represent the color) and the data precision (that is, the data type and value range, such as the data type of 16-bit half-float is floating point, the value range is [0, 2 16 -1]) is a decisive factor. The size and data accuracy of the LUT table will determine the performance and power consumption of the filter algorithm. The greater the data accuracy, the larger the storage space required, and the slower the performance of the filter algorithm and the higher the power consumption; the smaller the data accuracy, the smaller the storage space required, the faster the filter algorithm performance and the lower the power consumption.

[0022] The data accuracy of the LUT table can be 8 bits, 16-bit half float, 32-bit float, etc. For the LUT table of float data, the higher the accuracy, the more storage it occupies, the greater the amount of calculation, the more time and power consumption it consumes, and of course the quality of the image processed by the filter will also be better.

[0023] See also Figure 1 and Figure 2 , the image processing method of the embodiment of the present application includes:

[0024] Step 011: Obtain the color depth information of the display screen 20.

[0025] Specifically, although the higher the image quality requirement after filter processing is, the better, due to the limitation of the color depth of the display screen 20, it may not be possible to show the display effect of the high-quality image after filter processing, and during the preview process, the image after filter processing needs to be displayed faster. Therefore, before performing filter processing, it is necessary to obtain the color depth information of the display screen 20 for image display.

[0026] It can be understood that different types of display screens 20 may have different color depths. For example, when the electronic device 100 is a mobile phone, the number of bits of the color depth of the display screen 20 equipped in a flagship phone is generally much larger than that of an ordinary phone. A color depth with more bits can support more color levels, thereby obtaining a better display effect.

[0027] The color depth of the display screen 20 is determined after it leaves the factory. Therefore, during the use of the mobile phone, the color depth information of the display screen 20, that is, the number of bits of the color depth, can be obtained by obtaining the hardware information of the mobile phone when it leaves the factory.

[0028] Step 012: Determine the target data accuracy according to the color depth information.

[0029] Specifically, previous mobile phones were mostly 8-bit color depth. In recent years, mobile phones have begun to be equipped with 10-bit color depth display screens 20. 8-bit color depth single channel can only support 256 color levels, and 10-bit color depth each channel can support 1024 color levels. For 8-bit display screens 20, since each channel only supports 8-bit 256 color levels, the color of each channel after filter interpolation will be allocated to 256 color levels from 0 to 255. For high-precision float type LUT table data, it will take up more storage and runtime memory, and require more calculation. If the high-precision data is finally allocated to the color level of 0 to 255 after a large amount of calculation, the display screen 20 will not be able to show the better effect brought by high-precision data and large calculation, which will greatly reduce the advantages of more and more delicate colors brought by high-precision LUT table data. For 10-bit color depth display screens 20, if 8-bit precision LUT table data is still used, it will waste the advantage of 10-bit color depth display screens 20 that can display more colors.

[0030] Therefore, when determining the data accuracy of the LUT table for filter processing, the target data accuracy can be determined according to the color depth information. For example, the number of bits of the target data accuracy is determined to be equal to the number of bits of the color depth information. For example, the target image displayed on the display screen 20 with an 8-bit color depth is filtered through an LUT table with an 8-bit data accuracy. In this way, the minimum data accuracy is used for filter processing while ensuring the display effect of the display screen 20, thereby minimizing computing power consumption and reducing power consumption.

[0031] Optionally, generally for the data precision of LUT, there are generally multiple preset candidate data precisions, such as 8bit, 16bit half float, 32bit float. When performing filter processing, one of the data precisions can be selected. In order to ensure the display effect, it is generally necessary to make the number of bits of the target data precision greater than or equal to the number of bits of the color depth information, and the one with the closest number of bits to the target data precision (that is, the smallest difference in the number of bits with the color depth information) can be selected from the candidate data precisions that are greater than or equal to the number of bits of the color depth information, so that the computing power consumption and power consumption can be minimized while ensuring the display effect of the image after filter processing.

[0032] Step 013: Filter the target image according to the target data accuracy.

[0033] Specifically, after determining the target data accuracy, the target image can be filtered according to the target data accuracy, such as using the target data accuracy as the data accuracy when performing filter processing in the LUT table, and filtering the target image through the LUT table. In this way, the image after filter processing can be obtained with less computing power and power consumption, and the image after filter processing has a better display effect on the display screen 20.

[0034] See also Figure 3 In some embodiments, the image processing method further comprises:

[0035] Step 014: receiving an input operation to determine a target filter mode;

[0036] Step 015: Obtain a lookup table file corresponding to the target filter mode, the lookup table file including dimension information, size information, and multiple data precisions to be selected;

[0037] Step 012 includes:

[0038] Step 0121: Selecting a target data precision that matches the color bit depth information from a plurality of candidate data precisions;

[0039] Step 013 includes:

[0040] Step 0131: Filter the target image according to the dimension information, size information and target data accuracy.

[0041] Specifically, when performing filter processing, the display screen 20 first receives an input operation from the target object. For example, the display screen 20 displays multiple filter modes, and then the target object clicks one of the filter modes to select the filter mode as the target filter mode. Alternatively, when the target object does not perform an input operation, the default filter mode is used as the target filter mode.

[0042] Then, the lookup table file (i.e., LUT table) corresponding to the target filter mode is obtained. It can be understood that each filter mode has a corresponding LUT table. The LUT table contains dimension information, size information, and multiple data precisions to be selected.

[0043] The dimension information indicates the interpolation dimension when performing the filter interpolation processing. If the dimension information is one-dimensional, one-dimensional interpolation is performed during the filter processing. If the dimension information is three-dimensional, three-dimensional interpolation is performed during the filter processing. Therefore, the target interpolation method when performing the filter processing can be determined according to the dimension information.

[0044] The size information is used to represent the number of bits of color, such as 8 bits for color and 16 bits for color. It can be understood that the larger the number of bits, the more parts the color is divided into (that is, the more color levels). When interpolating, the interpolated color distribution is more uniform and the accuracy of the interpolation is also higher.

[0045] The multiple data precisions to be selected are the data processing precisions and data processing types when performing filter processing. For example, the data precision of 16-bit half float means that when performing filter processing, the data involved in the calculation has 16 effective digits and the data type is floating point. The LUT table corresponding to each filter is preset with multiple data precisions to be selected to meet the performance requirements of different electronic devices 100.

[0046] After obtaining the LUT table of the target filter mode pair, a target data precision that matches the color depth information can be selected from a plurality of candidate data precisions. The target data precision is the candidate data precision that is closest to the number of bits of the target data precision (i.e., the difference in the number of bits with the color depth information is the smallest) among the candidate data precisions that are greater than or equal to the number of bits of the color depth information. In this way, the computing power consumption and power consumption can be minimized while ensuring the display effect of the image processed by the filter.

[0047] Finally, the target image is filtered according to the target interpolation method determined by the dimension information and the target data accuracy and size information determined by the color depth information, so as to obtain the target image after filtering.

[0048] See also Figure 4 In some embodiments, the image processing method further comprises:

[0049] Step 016: When receiving an instruction to save the target image after filtering, the target image is filtered again using the candidate data precision with the largest number of bits among multiple candidate data precisions to generate a saved image and save it.

[0050] Specifically, it can be understood that when the target object uses the filter, it will switch different filters for preview. At this time, the previewed image does not need to be saved. After the target object selects the required filter through input operation or the preview interface continues to display the image processed by the current filter for a preset time (such as 5S), the target image processed by the filter can be saved.

[0051] When displaying the preview image, in order to reduce computing power and power consumption, the target data accuracy that matches the color depth is used to quickly perform filter processing. The image quality of the target image after filtering is not optimal. Therefore, in order to ensure that the image quality of the saved target image is good, when the target object is saved, the target image can be filtered again according to the maximum data accuracy of the filter, so as to generate a saved image with higher image quality and save it, so that the target object can use the high-quality saved image to share it in Moments, send it to friends, etc. in the future, to ensure that different display screens 20 can achieve the best display effect when displaying the saved image.

[0052] In the image processing method of the present application, the filter data accuracy most suitable for the current display screen 20 is obtained by judging the color depth of the display screen 20. For an 8-bit display screen 20, 8-bit or half-float 16-bit LUT table data can be used to convert the filter effect, reduce the memory usage at runtime, improve the performance of the filter algorithm, and reduce power consumption, while not affecting the preview effect or having a small impact on the preview effect; for a display screen 20 with a color depth of 10 bits or more, half-float 16 bits or flaot 32 bits LUT table data can be used to convert the filter effect, so that the advantage of the 10-bit color depth of the display screen 20 can be fully utilized to make the filter display more colors and better effects. This method improves the flexibility of filter operation, and LUT tables of different precisions can be loaded according to the type of the display screen 20 of the device at runtime, or they can be directly configured when the type of the display screen 20 is known in advance. Moreover, when saving the target image after the selected filter is processed by the filter, the filter processing can be performed again according to the maximum data precision in the LUT table, thereby ensuring the image quality of the saved image.

[0053] In order to better implement the image processing method of the embodiment of the present application, the embodiment of the present application also provides an image processing device 10. Figure 5 , Figure 5 The following is a schematic diagram of the structure of an image processing device 10 provided in an embodiment of the present application. The image processing device 10 may include:

[0054] A first acquisition module 11 is used to acquire color depth information of the display screen 20;

[0055] A first determination module 12, configured to determine target data accuracy according to color bit depth information; and

[0056] The processing module 13 is used to perform filter processing on the target image according to the target data accuracy.

[0057] The image processing device 10 further includes:

[0058] A receiving module 14, used for receiving an input operation to determine a target filter mode;

[0059] The second acquisition module 15 is used to acquire a lookup table file corresponding to a target filter mode, wherein the lookup table file includes dimension information, size information, and multiple data precisions to be selected;

[0060] The first determination module 12 is further specifically configured to select a target data precision that matches the color bit depth information from a plurality of candidate data precisions;

[0061] The processing module 13 is also specifically used to perform filter processing on the target image according to the dimension information, size information and target data accuracy.

[0062] The image processing device 10 further includes:

[0063] A second determination module 16, used to determine a target interpolation method according to the dimension information;

[0064] The processing module 13 is further specifically configured to perform interpolation processing on the pixel values ​​of the target image according to the target interpolation mode, size information and target data accuracy.

[0065] The image processing device 10 further includes:

[0066] The saving module 17 is used to, upon receiving an instruction to save the target image after filtering, filter the target image again using a candidate data precision with the largest number of bits among multiple candidate data precisions to generate and save a saved image.

[0067] Each module in the above-mentioned image processing device 10 can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0068] Please refer again Figure 2 The electronic device 100 of the embodiment of the present application includes a display screen 20 and a processor 30. The display screen 20 is also used to receive input operations, and the processor 30 is also used to obtain color depth information of the display screen 20; determine the target data accuracy according to the color depth information; and perform filter processing on the target image according to the target data accuracy.

[0069] The processor 30 may also implement the steps of the image processing method of any of the above embodiments, which will not be described in detail here for the sake of brevity.

[0070] The electronic device 100 may be a mobile phone, a smart phone, a personal digital assistant (PDA), a tablet computer and a video game device, a portable terminal (such as a laptop), or a larger device (such as a desktop computer and a television), or any other type of device with a display screen 20.

[0071] See also Figure 6 The embodiment of the present application also provides a computer-readable storage medium 300 on which a computer program 310 is stored. When the computer program 310 is executed by the processor 30, the steps of the image processing method of any of the above-mentioned embodiments are implemented. For the sake of brevity, they are not repeated here.

[0072] It can be understood that the computer program 310 includes computer program code. The computer program code can be in source code form, object code form, executable file or some intermediate form, etc. Computer readable storage media can include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), and software distribution media, etc.

[0073] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0074] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0075] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. An image processing method, characterized in that: include: Get the color depth information of the display; receiving an input operation to determine a target filter mode; Obtaining a lookup table file corresponding to the target filter mode, wherein the lookup table file includes dimension information, size information, and multiple data precisions to be selected; Selecting a target data precision that matches the color bit depth information from a plurality of the candidate data precisions; and The target image is subjected to filter processing according to the dimension information, the size information and the target data precision.

2. The image processing method according to claim 1, characterized in that: The number of bits of the target data precision is equal to the number of bits of the candidate data precision preset in the lookup table file, which is greater than or equal to the number of bits of the color bit depth information and has the smallest difference with the number of bits of the color bit depth information.

3. The image processing method according to claim 1 or 2, characterized in that: Also includes: Determine the target interpolation method according to the dimension information; The filtering the target image according to the target data accuracy includes: The pixel values ​​of the target image are interpolated according to the target interpolation mode, size information and the target data accuracy.

4. The image processing method according to claim 1, characterized in that: Also includes: When receiving an instruction to save the target image after filtering, the target image is filtered again using the candidate data precision with the largest number of bits among the multiple candidate data precisions to generate a saved image and save it.

5. An image processing device, characterized in that: include: A first acquisition module, used to acquire color depth information of the display screen; A receiving module, used for receiving an input operation to determine a target filter mode; A second acquisition module is used to acquire a lookup table file corresponding to the target filter mode, wherein the lookup table file includes dimension information, size information, and multiple data precisions to be selected; A first determination module, configured to select a target data precision matching the color bit depth information from a plurality of the candidate data precisions; A processing module is used to perform filter processing on the target image according to the dimension information, the size information and the target data accuracy.

6. An electronic device, characterized in that: It includes a display screen and a processor, wherein the display screen is used to receive an input operation, and the processor is used to obtain color bit depth information of the display screen; determine a target filter mode according to the input operation; obtain a lookup table file corresponding to the target filter mode, wherein the lookup table file includes dimension information, size information, and multiple data precisions to be selected; A target data precision matching the color bit depth information is selected from a plurality of the candidate data precisions; and a filter process is performed on the target image according to the dimension information, the size information and the target data precision.

7. The electronic device according to claim 6, characterized in that: The processor is also used to determine a target interpolation method according to the dimension information; and perform interpolation processing on the pixel values ​​of the target image according to the target interpolation method, size information and the target data accuracy.

8. A non-volatile computer-readable storage medium containing a computer program, characterized in that: When the computer program is executed by one or more processors, the image processing method according to any one of claims 1 to 4 is implemented.